Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GameplaySettings.c
Go to the documentation of this file.
1 class SCR_GameplaySettings : ModuleGameSettings
2 {
3  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Allow controls hints on screen.")]
4  bool m_bControlHints;
5 
6  [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Allow controls hints on screen.")]
7  bool m_b2DScopes;
8 
9  [Attribute(defvalue: "127.0.0.1", uiwidget: UIWidgets.EditBox, desc: "Last IP used for server connection.")]
10  string m_sLastIP;
11 
12  [Attribute(defvalue: "2001", uiwidget: UIWidgets.EditBox, desc: "Last port used for server connection.")]
13  string m_sLastPort;
14 
15  [Attribute(defvalue: "", uiwidget: UIWidgets.EditBox, desc: "Player's local profile name.")]
16  string m_sProfileName;
17 
18  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Show radio protocol subtitles in chat.")]
19  bool m_bShowRadioProtocolText;
20 
21  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Preserve selected gadget after performing actions like sprinting.")]
22  bool m_bStickyGadgets;
23 
24  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Preserve aim down sights after performing actions like sprinting.")]
25  bool m_bStickyADS;
26 
27  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Use mouse input for steering instead of for freelook when piloting aircrafts.")]
28  bool m_bMouseControlAircraft;
29 
30  [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.")]
31  EVehicleDrivingAssistanceMode m_eDrivingAssistance;
32 };
33 
34 class SCR_FieldOfViewSettings : ModuleGameSettings
35 {
36  [Attribute(defvalue: "74", uiwidget: UIWidgets.Slider, params: "40 90 1", desc: "Field of view in first person camera")]
37  float m_fFirstPersonFOV;
38 
39  [Attribute(defvalue: "74", uiwidget: UIWidgets.Slider, params: "40 90 1", desc: "Field of view in third person camera.")]
40  float m_fThirdPersonFOV;
41 
42  [Attribute(defvalue: "74", uiwidget: UIWidgets.Slider, params: "40 90 1", desc: "Field of view in vehicle camera.")]
43  float m_fVehicleFOV;
44 
45  [Attribute(defvalue: "0.5", uiwidget: UIWidgets.Slider, params: "0 1 0.01", desc: "Aiming down sights focus intensity.")]
46  float m_fFocusInADS;
47 
48  [Attribute(defvalue: "false", uiwidget: UIWidgets.CheckBox, desc: "Use focus mode by holding right mouse button.")]
49  bool m_bEnableFocus;
50 };
51 
52 class SCR_AudioSettings : ModuleGameSettings
53 {
54  [Attribute(defvalue: "100", uiwidget: UIWidgets.Slider, params: "0 200 5", desc: "Audio dynamic range.")]
55  float m_fDynamicRange;
56 
57  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Enable/Disable Tinnitus Sound Playback")]
58  bool m_bGTinnitus;
59 };
60 
61 class SCR_VideoSettings : ModuleGameSettings
62 {
63  // Simple dof as default, using enum DepthOfFieldTypes
64  [Attribute("1")]
65  float m_iDofType;
66 
67  // Enable or disable nearby DepthOfField
68  [Attribute("1")]
69  bool m_bNearDofEffect;
70 
71  [Attribute("2500")]
72  int m_iViewDistance;
73 
74  [Attribute("-1")]
75  int m_iLastUsedPreset;
76 };
77 
78 class SCR_HintSettings : ModuleGameSettings
79 {
80  [Attribute(defvalue: "true", uiwidget: UIWidgets.CheckBox, desc: "Allow context hints on screen")]
81  protected bool m_bHintsEnabled;
82 
83  [Attribute(desc: "Types of hints which were already shown and should not be displayed again.", uiwidget: UIWidgets.SearchComboBox, enums: ParamEnumArray.FromEnum(EHint))]
84  protected ref array<EHint> m_aShownHints;
85 
86  [Attribute(desc: "How many times were hints in Shown Hints attribute displayed. Order of array items is the same.")]
87  protected ref array<int> m_aShownHintCounts;
88 
92  bool AreHintsEnabled()
93  {
94  return m_bHintsEnabled;
95  }
101  int GetCount(EHint type)
102  {
103  if (!m_aShownHints)
104  return 0;
105 
106  int index = m_aShownHints.Find(type);
107  if (index == -1)
108  return 0;
109  else
110  return m_aShownHintCounts[index];
111  }
118  int AddCount(EHint type, int delta = 1)
119  {
120  if (!m_aShownHints)
121  return 0;
122 
123  int index = m_aShownHints.Find(type);
124  if (index == -1)
125  {
126  index = m_aShownHints.Insert(type);
127  m_aShownHintCounts.Insert(delta);
128  }
129  else
130  {
131  m_aShownHintCounts[index] = m_aShownHintCounts[index] + 1;
132  }
133  return m_aShownHintCounts[index];
134  }
139  void LoadShownHints(out BaseContainer container)
140  {
141  BaseContainerTools.WriteToInstance(this, container);
142 
143  //--- Arrays don't match, assume that data are corrupted and erase them completely
144  if (m_aShownHints.Count() != m_aShownHintCounts.Count())
145  {
146  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.");
147  m_aShownHints.Clear();
148  m_aShownHintCounts.Clear();
149  SaveShownHints(container);
150  }
151 
152  //--- When hints are disabled, clear the memory. All hints will be shown again upon re-enabling.
153  if (!m_bHintsEnabled && !m_aShownHints.IsEmpty())
154  {
155  m_aShownHints.Clear();
156  m_aShownHintCounts.Clear();
157  SaveShownHints(container);
158  Print("Persistent state of hints cleared!", LogLevel.VERBOSE);
159  }
160  }
165  void SaveShownHints(BaseContainer container)
166  {
167  container.Set("m_aShownHints", m_aShownHints);
168  container.Set("m_aShownHintCounts", m_aShownHintCounts);
169  GetGame().UserSettingsChanged();
170  }
171 };
172 
173 class SCR_AimSensitivitySettings : ModuleGameSettings
174 {
175  [Attribute(defvalue: "1", uiwidget: UIWidgets.Slider, params: "0.1 2 0.01", desc: "Mouse aim sensitivity")]
176  float m_fMouseSensitivity;
177 
178  [Attribute(defvalue: "1", uiwidget: UIWidgets.Slider, params: "0.1 2 0.01", desc: "Stick aim sensitivity")]
179  float m_fStickSensitivity;
180 
181  [Attribute(defvalue: "1", uiwidget: UIWidgets.Slider, params: "0.1 2 0.01", desc: "Additional aim sensitivity multiplier for ADS")]
182  float m_fAimADS;
183 };
184 
185 class SCR_RecentGames : ModuleGameSettings
186 {
187  [Attribute("", UIWidgets.ResourceAssignArray, "Recent game headers", "conf")]
188  ref array<ResourceName> m_aRecentMissions;
189 
190  [Attribute("3")]
191  int m_iMaxRecentEntries;
192 
193  [Attribute("false")]
194  bool m_bEAScreenShown;
195 
196  [Attribute("false")]
197  bool m_bTutorialPlayed;
198 
199  [Attribute("true")]
200  bool m_bFirstTimePlay;
201 
202  [Attribute("0")]
203  int m_iPlayTutorialShowCount;
204 
205  [Attribute("3")]
206  int m_iPlayTutorialShowMax;
207 };
208 
209 class SCR_LoadingHints : ModuleGameSettings
210 {
211  [Attribute("", UIWidgets.ResourceAssignArray, "Already read hints", "conf")]
212  ref array<LocalizedString> m_aReadHints;
213 };
214 
215 
216 class SCR_InventoryHintSettings : ModuleGameSettings
217 {
218  [Attribute()]
219  protected int m_iInventoryOpenCount;
220 
221  [Attribute()]
222  protected int m_iQuickSlotShowCount;
223 };
224 
225 class SCR_DeployMenuSettings : ModuleGameSettings
226 {
227  [Attribute("1")]
228  protected bool m_bShowPersistentFactionWarning;
229 };
SCR_DeployMenuSettings
Definition: SCR_GameplaySettings.c:225
SCR_Enum
Definition: SCR_Enum.c:1
SCR_RecentGames
Definition: SCR_GameplaySettings.c:185
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_AudioSettings
Definition: SCR_GameplaySettings.c:52
SCR_FieldOfViewSettings
Definition: SCR_GameplaySettings.c:34
Attribute
typedef Attribute
Post-process effect of scripted camera.
EVehicleDrivingAssistanceMode
EVehicleDrivingAssistanceMode
Player vehicle driving assistance modes. Individual features may become separate options in future.
Definition: EVehicleDrivingAssistanceMode.c:13
SCR_LoadingHints
Definition: SCR_GameplaySettings.c:209
SCR_VideoSettings
Definition: SCR_GameplaySettings.c:61
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
SCR_AimSensitivitySettings
Definition: SCR_GameplaySettings.c:173
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
SCR_HintSettings
Definition: SCR_GameplaySettings.c:78
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_InventoryHintSettings
Definition: SCR_GameplaySettings.c:216
SCR_GameplaySettings
Definition: SCR_GameplaySettings.c:1
EHint
EHint
Definition: EHint.c:10