Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_GameplaySettings.c
Go to the documentation of this file.
8
9class SCR_GameplaySettings : ModuleGameSettings
10{
11 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Allow controls hints on screen.")]
12 bool m_bControlHints;
13
14 [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Allow controls hints on screen.")]
16
17 [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Show nametag platform icon.")]
19
20 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Enable Logitech LED support.")]
22
23 [Attribute(defvalue: "127.0.0.1", uiwidget: UIWidgets.EditBox, desc: "Last IP used for server connection.")]
24 string m_sLastIP;
25
26 [Attribute(defvalue: "2001", uiwidget: UIWidgets.EditBox, desc: "Last port used for server connection.")]
28
29 [Attribute(defvalue: "", uiwidget: UIWidgets.EditBox, desc: "Player's local profile name.")]
31
32 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Show radio protocol subtitles in chat.")]
34
35 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Preserve selected gadget after performing actions like sprinting.")]
37
38 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Preserve aim down sights after performing actions like sprinting.")]
40
41 [Attribute(defvalue: "1", uiwidget: UIWidgets.CheckBox, desc: "Whether or not the game should automatically equip next placeable item when previous one was placed")]
43
44 [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Use mouse input for steering instead of for freelook when piloting aircrafts.")]
46
47 [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Use gamepad input for freelook instead of for steering when piloting aircrafts.")]
49
50 [Attribute(defvalue: SCR_Enum.GetDefault(ECollectiveModeForSettings.Default), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ECollectiveModeForSettings), desc: ".")]
52
53 [Attribute(defvalue: SCR_Enum.GetDefault(ECollectiveModeForSettings.Direct), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ECollectiveModeForSettings), desc: ".")]
55
56 [Attribute(defvalue: SCR_Enum.GetDefault(ECollectiveModeForSettings.Direct), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ECollectiveModeForSettings), desc: ".")]
58
59 [Attribute(defvalue: SCR_Enum.GetDefault(EVehicleDrivingAssistanceMode.FULL), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(EVehicleDrivingAssistanceMode), desc: "Player's vehicle driving assistance mode. Controls gearbox, engine and persistent handbrake automation.")]
61};
62
64{
65 [Attribute(defvalue: "74", uiwidget: UIWidgets.Slider, params: "40 90 1", desc: "Field of view in first person camera")]
66 float m_fFirstPersonFOV;
67
68 [Attribute(defvalue: "74", uiwidget: UIWidgets.Slider, params: "40 90 1", desc: "Field of view in third person camera.")]
69 float m_fThirdPersonFOV;
70
71 [Attribute(defvalue: "74", uiwidget: UIWidgets.Slider, params: "40 90 1", desc: "Field of view in vehicle camera.")]
72 float m_fVehicleFOV;
73
74 [Attribute(defvalue: "0.5", uiwidget: UIWidgets.Slider, params: "0 1 0.01", desc: "Aiming down sights focus intensity.")]
75 float m_fFocusInADS;
76
77 [Attribute(defvalue: "1", uiwidget: UIWidgets.Slider, params: "0 1 0.01", desc: "Scale of aiming down sight focus intensity for PIP scopes.")]
78 float m_fFocusInPIP;
79
80 [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Use focus mode by holding right mouse button.")]
81 bool m_bEnableFocus;
82};
83
85{
86 [Attribute(defvalue: "100", uiwidget: UIWidgets.Slider, params: "0 200 5", desc: "Audio dynamic range.")]
87 float m_fDynamicRange;
88
89 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Enable/Disable Tinnitus Sound Playback")]
90 bool m_bGTinnitus;
91
92 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Enable/Disable HQ Announcer")]
93 bool m_bHQAnnouncer;
94};
95
97{
98 // Simple dof as default, using enum DepthOfFieldTypes
99 [Attribute("1")]
100 float m_iDofType;
101
102 // Enable or disable nearby DepthOfField
103 [Attribute("1")]
104 bool m_bNearDofEffect;
105
106 [Attribute("2500")]
107 int m_iViewDistance;
108
109 [Attribute("-1")]
110 int m_iLastUsedPreset;
111};
112
114{
115 [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Allow context hints on screen")]
116 protected bool m_bHintsEnabled;
117
118 [Attribute(desc: "Types of hints which were already shown and should not be displayed again.", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EHint))]
119 protected ref array<EHint> m_aShownHints;
120
121 [Attribute(desc: "How many times were hints in Shown Hints attribute displayed. Order of array items is the same.")]
122 protected ref array<int> m_aShownHintCounts;
123
128 {
129 return m_bHintsEnabled;
130 }
131
132 //------------------------------------------------------------------------------------------------
133 void SetHintsEnabled(bool enabled)
134 {
135 m_bHintsEnabled = enabled;
136 }
137
138 //------------------------------------------------------------------------------------------------
145 {
146 if (!m_aShownHints)
147 return 0;
148
149 int index = m_aShownHints.Find(type);
150 if (index == -1)
151 return 0;
152 else
154 }
155
161 int AddCount(EHint type, int delta = 1)
162 {
163 if (!m_aShownHints)
164 return 0;
165
166 int index = m_aShownHints.Find(type);
167 if (index == -1)
168 {
169 index = m_aShownHints.Insert(type);
170 m_aShownHintCounts.Insert(delta);
171 }
172 else
173 {
175 }
176
178 }
179
180 //------------------------------------------------------------------------------------------------
182 {
183 if (!m_aShownHints)
184 return;
185
186 int index = m_aShownHints.Find(type);
187 if (!m_aShownHintCounts.IsIndexValid(index))
188 return;
189
191
192 SaveShownHints(container);
193 }
194
199 void LoadShownHints(out BaseContainer container)
200 {
201 BaseContainerTools.WriteToInstance(this, container);
202
203 //--- Arrays don't match, assume that data are corrupted and erase them completely
204 if (m_aShownHints.Count() != m_aShownHintCounts.Count())
205 {
206 Debug.Error2("SCR_HintSettings.LoadShownHints()", "Error when loading persistent hints, number of hint IDs does not match the number of repetitions. Memory of shown hints was erased to prevent issues.");
207 m_aShownHints.Clear();
208 m_aShownHintCounts.Clear();
209 SaveShownHints(container);
210 }
211
212 //--- When hints are disabled, clear the memory. All hints will be shown again upon re-enabling.
213 if (!m_bHintsEnabled && !m_aShownHints.IsEmpty())
214 {
215 m_aShownHints.Clear();
216 m_aShownHintCounts.Clear();
217 SaveShownHints(container);
218 Print("Persistent state of hints cleared!", LogLevel.VERBOSE);
219 }
220 }
221
226 {
227 container.Set("m_aShownHints", m_aShownHints);
228 container.Set("m_aShownHintCounts", m_aShownHintCounts);
229 GetGame().UserSettingsChanged();
230 }
231};
232
234{
235 [Attribute("", UIWidgets.ResourceAssignArray, "Recent game headers", "conf")]
236 ref array<ResourceName> m_aRecentMissions;
237
238 [Attribute("3")]
239 int m_iMaxRecentEntries;
240
241 [Attribute("false")]
242 bool m_bEAScreenShown;
243
244 [Attribute("false")]
245 bool m_bTutorialPlayed;
246
247 [Attribute("true")]
248 bool m_bFirstTimePlay;
249
250 [Attribute("0")]
251 int m_iPlayTutorialShowCount;
252
253 [Attribute("3")]
254 int m_iPlayTutorialShowMax;
255};
256
258{
259 [Attribute("", UIWidgets.ResourceAssignArray, "Already read hints", "conf")]
260 ref array<LocalizedString> m_aReadHints;
261};
262
263
272
EHint
Definition EHint.c:11
ArmaReforgerScripted GetGame()
Definition game.c:1398
EDamageType type
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
ECollectiveModeForSettings
bool m_bStickyGadgets
ECollectiveModeForSettings m_eGamepadCollective
string m_sLastPort
ECollectiveModeForSettings m_eHotasCollective
bool m_bLogitechSupport
string m_sLastIP
string m_sProfileName
EVehicleDrivingAssistanceMode m_eDrivingAssistance
bool m_bGamepadFreelookInAircraft
bool m_bAutoEquipNextPlaceableItem
bool m_bMouseControlAircraft
bool m_b2DScopes
ECollectiveModeForSettings m_eKeyboardCollective
bool m_bStickyADS
bool m_bPlatformIconNametag
bool m_bShowRadioProtocolText
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition Debug.c:13
By inheriting of this class you define a settings module.
ref array< EHint > m_aShownHints
int GetCount(EHint type)
void DontShowAgain(EHint type, BaseContainer container)
ref array< int > m_aShownHintCounts
void SaveShownHints(BaseContainer container)
void SetHintsEnabled(bool enabled)
int AddCount(EHint type, int delta=1)
void LoadShownHints(out BaseContainer container)
EVehicleDrivingAssistanceMode
Player vehicle driving assistance modes. Individual features may become separate options in future.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute
@ Direct
@ Sticky
@ Manual
Lens flare is determined manually by lens flare index.