Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
plugindiagmenu.c
Go to the documentation of this file.
1 // For modding, see PluginDiagMenuModding.c
2 // !!! MODDING DISCLAIMER: These are debug functionality files, if you are thinking about modding the vanilla ones, do so at your own risk
3 // These files will not be maintained with the thought of "what if a modder modded this" (Excluding the modding functionality of course)
4 // Which is why the modding functionality was developed with the thought of the modded ones having their own isolated safe space
5 
7 {
11 };
12 
13 #ifdef DIAG_DEVELOPER
14 enum ESubscriberSystems
15 {
16  TRIGGERS = 0x00000001,
17  //SYSTEM2 = 0x00000002,
18  //SYSTEM3 = 0x00000004,
19  //SYSTEM4 = 0x00000008,
20 }
21 
22 typedef Param1<int> SendDiagRPCSelfBasicParam;
23 typedef Param2<int,Param> SendDiagRPCSelfParamParam;
24 
25 typedef Param2<int,bool> SendDiagRPCBasicParam;
26 typedef Param3<int,bool,Param> SendDiagRPCParamParam;
27 #endif
28 
30 {
31 #ifdef DIAG_DEVELOPER
32 
33  int m_ModdedDiagID = DiagMenuIDs.MODDED_MENU;
34 
35  // LEVEL 3 - Script > Misc > Hair Hiding
36  ref map<int,bool> m_HairHidingStateMap;
37  ref TStringArray m_HairSelectionArray;
38  int m_TotalHairLevelsAdjusted;
39 
40  override void OnInit()
41  {
42  //----------------------
43  m_HairHidingStateMap = new map<int,bool>;
44  m_HairSelectionArray = new TStringArray;
45 
46  g_Game.ConfigGetTextArray("cfgVehicles Head_Default simpleHiddenSelections", m_HairSelectionArray);
47  m_TotalHairLevelsAdjusted = m_HairSelectionArray.Count() - 1;
48  for (int i = 0; i < m_HairSelectionArray.Count(); ++i)
49  {
50  m_HairHidingStateMap.Insert(i, 1); //all considered "shown" on init
51  }
52 
53  //----------------------
54 
55  DiagMenu.InitScriptDiags();
56 
57  RegisterDiags();
58  }
59 
60  override void OnDestroy()
61  {
62  DiagMenu.ClearScriptDiags();
63  }
64 
65  protected void RegisterDiags()
66  {
67  RegisterDeveloperDiags();
68  RegisterModdedDiagsIDs();
69  RegisterModdedDiags();
70 
71  if (m_ModdedDiagID == DiagMenuIDs.MODDED_MENU)
72  {
73  DiagMenu.Unregister(DiagMenuIDs.MODDED_MENU);
74  }
75  }
76 
77  private void RegisterDeveloperDiags()
78  {
79  //---------------------------------------------------------------
80  // LEVEL 0
81  //---------------------------------------------------------------
82  DiagMenu.RegisterMenu(DiagMenuIDs.SCRIPTS_MENU, "Script", -1);
83  {
84  //---------------------------------------------------------------
85  // LEVEL 1 - Script
86  //---------------------------------------------------------------
87  DiagMenu.RegisterMenu(DiagMenuIDs.VEHICLES, "Vehicles", DiagMenuIDs.SCRIPTS_MENU);
88  {
89  //---------------------------------------------------------------
90  // LEVEL 2 - Script > Vehicles
91  //---------------------------------------------------------------
92  DiagMenu.RegisterItem(DiagMenuIDs.VEHICLE_DEBUG_OUTPUT, "", "Crash Log", DiagMenuIDs.VEHICLES, "None, Basic, Extended, Contact, Basic+Contact");
93  DiagMenu.RegisterBool(DiagMenuIDs.VEHICLE_DUMP_CRASH_DATA, "lalt+7", "Dump Crash Data", DiagMenuIDs.VEHICLES);
94  }
95 
96  //---------------------------------------------------------------
97  // LEVEL 1 - Script
98  //---------------------------------------------------------------
99  DiagMenu.RegisterMenu(DiagMenuIDs.INVENTORY_MENU, "Inventory", DiagMenuIDs.SCRIPTS_MENU);
100  {
101  //---------------------------------------------------------------
102  // LEVEL 2 - Script > Inventory
103  //---------------------------------------------------------------
104  DiagMenu.RegisterBool(DiagMenuIDs.INVENTORY_ENTITY_PLACEMENT_CALLBACK_DEBUG, "", "Placement Debug", DiagMenuIDs.INVENTORY_MENU);
105  }
106 
107  //---------------------------------------------------------------
108  // LEVEL 1 - Script
109  //---------------------------------------------------------------
110  DiagMenu.RegisterMenu(DiagMenuIDs.TRANSFER_VALUES_MENU, "TransferValues", DiagMenuIDs.SCRIPTS_MENU);
111  {
112  //---------------------------------------------------------------
113  // LEVEL 2 - Script > TransferValues
114  //---------------------------------------------------------------
115  DiagMenu.RegisterBool(DiagMenuIDs.TRANSFER_VALUES_SHOW, "", "ShowValues", DiagMenuIDs.TRANSFER_VALUES_MENU);
116  }
117 
118  //---------------------------------------------------------------
119  // LEVEL 1 - Script
120  //---------------------------------------------------------------
121  DiagMenu.RegisterMenu(DiagMenuIDs.CRAFTING_MENU, "Crafting", DiagMenuIDs.SCRIPTS_MENU);
122  {
123  //---------------------------------------------------------------
124  // LEVEL 2 - Script > Crafting
125  //---------------------------------------------------------------
126  DiagMenu.RegisterBool(DiagMenuIDs.CRAFTING_GENERATE, "", "Generate Cache", DiagMenuIDs.CRAFTING_MENU);
127  DiagMenu.RegisterBool(DiagMenuIDs.CRAFTING_INSTANT, "", "Debug Insta Crafting", DiagMenuIDs.CRAFTING_MENU);
128  DiagMenu.RegisterBool(DiagMenuIDs.CRAFTING_DUMP, "", "Dump recipes to file", DiagMenuIDs.CRAFTING_MENU);
129  }
130 
131  //---------------------------------------------------------------
132  // LEVEL 1 - Script
133  //---------------------------------------------------------------
134  DiagMenu.RegisterMenu(DiagMenuIDs.CHEATS_MENU, "Cheats", DiagMenuIDs.SCRIPTS_MENU);
135  {
136  //---------------------------------------------------------------
137  // LEVEL 2 - Script > Cheats
138  //---------------------------------------------------------------
139  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_MODIFIERS, "lalt+2", "Tick Modifiers", DiagMenuIDs.CHEATS_MENU);
140  DiagMenu.SetValue(DiagMenuIDs.CHEATS_MODIFIERS, true);
141  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_KILL_PLAYER, "", "Kill Player", DiagMenuIDs.CHEATS_MENU);
142  DiagMenu.RegisterItem(DiagMenuIDs.CHEATS_INVINCIBILITY, "lalt+1", "Invincibility (IDDQD)", DiagMenuIDs.CHEATS_MENU, "Disabled,Partial,Full");
143  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_DISABLE_STAMINA, "", "Disable stamina", DiagMenuIDs.CHEATS_MENU);
144  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_RESET_PLAYER, "", "Reset Player", DiagMenuIDs.CHEATS_MENU);
145  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_RESET_PLAYER_MAX, "lalt+3", "Reset Player Max", DiagMenuIDs.CHEATS_MENU);
146  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_INVENTORY_ACCESS, "", "Inventory Access", DiagMenuIDs.CHEATS_MENU);
147  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_FIX_ITEMS, "", "Fix Inventory Items", DiagMenuIDs.CHEATS_MENU);
148  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_CREATE_HIT, "lalt+5", "Create Hit Heavy", DiagMenuIDs.CHEATS_MENU);
149  DiagMenu.RegisterBool(DiagMenuIDs.CHEATS_CREATE_HIT_LIGHT, "lalt+6", "Create Hit Light", DiagMenuIDs.CHEATS_MENU);
150  }
151 
152  //---------------------------------------------------------------
153  // LEVEL 1 - Script
154  //---------------------------------------------------------------
155  DiagMenu.RegisterMenu(DiagMenuIDs.PLAYER_AGENTS_MENU, "Player Agents", DiagMenuIDs.SCRIPTS_MENU);
156  {
157  //---------------------------------------------------------------
158  // LEVEL 2 - Script > Player Agents
159  //---------------------------------------------------------------
160  DiagMenu.RegisterBool(DiagMenuIDs.PLAYER_AGENTS_INJECTS_SHOW, "", "Allow Inject Actions", DiagMenuIDs.PLAYER_AGENTS_MENU);
161  }
162 
163  //---------------------------------------------------------------
164  // LEVEL 1 - Script
165  //---------------------------------------------------------------
166  DiagMenu.RegisterMenu(DiagMenuIDs.SOFT_SKILLS_MENU, "Soft Skills", DiagMenuIDs.SCRIPTS_MENU);
167  {
168  //---------------------------------------------------------------
169  // LEVEL 2 - Script > Soft Skills
170  //---------------------------------------------------------------
171  DiagMenu.RegisterBool(DiagMenuIDs.SOFT_SKILLS_SHOW_DEBUG, "", "Show Debug", DiagMenuIDs.SOFT_SKILLS_MENU);
172  DiagMenu.RegisterBool(DiagMenuIDs.SOFT_SKILLS_TOGGLE_STATE, "", "Enable SoftSkills", DiagMenuIDs.SOFT_SKILLS_MENU);
173  DiagMenu.RegisterBool(DiagMenuIDs.SOFT_SKILLS_TOGGLE_MODEL, "", "Enable linear model", DiagMenuIDs.SOFT_SKILLS_MENU);
174  DiagMenu.RegisterRange(DiagMenuIDs.SOFT_SKILLS_SPECIALTY_VALUE, "", "Set specialty value", DiagMenuIDs.SOFT_SKILLS_MENU, "-1, 1, 0, 0.01");
175  }
176 
177  //---------------------------------------------------------------
178  // LEVEL 1 - Script
179  //---------------------------------------------------------------
180  DiagMenu.RegisterMenu(DiagMenuIDs.LIFESPAN_MENU, "Lifespan", DiagMenuIDs.SCRIPTS_MENU);
181  {
182  //---------------------------------------------------------------
183  // LEVEL 2 - Script > Lifespan
184  //---------------------------------------------------------------
185  DiagMenu.RegisterBool(DiagMenuIDs.LIFESPAN_BLOODY_HANDS, "", "Bloody hands", DiagMenuIDs.LIFESPAN_MENU);
186  DiagMenu.RegisterRange(DiagMenuIDs.LIFESPAN_PLAYTIME_UPDATE, "", "Playtime in minutes", DiagMenuIDs.LIFESPAN_MENU, "0, 600, 0, 10");
187  }
188 
189  //---------------------------------------------------------------
190  // LEVEL 1 - Script
191  //---------------------------------------------------------------
192  DiagMenu.RegisterMenu(DiagMenuIDs.MISC_MENU, "Misc", DiagMenuIDs.SCRIPTS_MENU);
193  {
194  //---------------------------------------------------------------
195  // LEVEL 2 - Script > Misc
196  //---------------------------------------------------------------
197  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ACTION_ON_CURSOR, "", "Perform Diag On Cursor", DiagMenuIDs.MISC_MENU);
198 #ifdef DIAG_MISC_ACTION_ON_CURSOR
199  DiagMenu.SetValue(DiagMenuIDs.MISC_ACTION_ON_CURSOR, true);
200 #endif
201  DiagMenu.RegisterBool(DiagMenuIDs.MISC_DISABLE_PERSONAL_LIGHT, "", "Disable Personal Light", DiagMenuIDs.MISC_MENU);
202  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ITEM_DEBUG_ACTIONS, "", "Item Debug Actions", DiagMenuIDs.MISC_MENU); // Is enabled by default now
203  DiagMenu.RegisterBool(DiagMenuIDs.MISC_LOG_PLAYER_STATS, "", "Log Player Stats", DiagMenuIDs.MISC_MENU);
204  DiagMenu.RegisterMenu(DiagMenuIDs.MISC_ACTION_TARGETS_MENU, "Action Targets", DiagMenuIDs.MISC_MENU);
205  {
206  //---------------------------------------------------------------
207  // LEVEL 3 - Script > Misc > Action Targets
208  //---------------------------------------------------------------
209  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ACTION_TARGETS_NEW, "", "New AT Selection", DiagMenuIDs.MISC_ACTION_TARGETS_MENU, true);
210  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ACTION_TARGETS_DEBUG, "", "Show Debug", DiagMenuIDs.MISC_ACTION_TARGETS_MENU);
211  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ACTION_TARGETS_SELPOS_DEBUG, "", "Show selection pos debug", DiagMenuIDs.MISC_ACTION_TARGETS_MENU);
212  }
213  //---------------------------------------------------------------
214  // LEVEL 2 - Script > Misc
215  //---------------------------------------------------------------
216  DiagMenu.RegisterBool(DiagMenuIDs.MISC_PERMANENT_CROSSHAIR, "", "Enable permanent crosshair", DiagMenuIDs.MISC_MENU);
217  DiagMenu.RegisterBool(DiagMenuIDs.MISC_TELEPORT_BREAKS_SYNC, "", "Teleport Breaks Sync", DiagMenuIDs.MISC_MENU);
218  DiagMenu.RegisterBool(DiagMenuIDs.MISC_VEHICLE_GETOUT_BOX, "", "Debug transport freespace", DiagMenuIDs.MISC_MENU);
219  DiagMenu.RegisterBool(DiagMenuIDs.MISC_VEHICLE_GETOUT_RAYCAST, "", "Debug transport get out raycast", DiagMenuIDs.MISC_MENU);
220  DiagMenu.RegisterBool(DiagMenuIDs.MISC_TOGGLE_HUD, "", "Toggle HUD on/off", DiagMenuIDs.MISC_MENU);
221  DiagMenu.RegisterMenu(DiagMenuIDs.MISC_ENVIRONMENT_MENU, "Environment", DiagMenuIDs.MISC_MENU);
222  {
223  //---------------------------------------------------------------
224  // LEVEL 3 - Script > Misc > Environment
225  //---------------------------------------------------------------
226  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ENVIRONMENT_DEBUG, "", "Show Environment stats", DiagMenuIDs.MISC_ENVIRONMENT_MENU);
227  DiagMenu.RegisterBool(DiagMenuIDs.MISC_ENVIRONMENT_LOGGING_DRYWET, "", "Log Player Dry/Wetness", DiagMenuIDs.MISC_ENVIRONMENT_MENU, false);
228 
229  }
230  DiagMenu.RegisterBool(DiagMenuIDs.MISC_FALLDAMAGE_DEBUG, "", "Show FallDamage stats", DiagMenuIDs.MISC_MENU);
231  DiagMenu.RegisterRange(DiagMenuIDs.MISC_DISPLAY_PLAYER_INFO, "", "Display Player Info", DiagMenuIDs.MISC_MENU, "0,2,0,1");
232  DiagMenu.RegisterBool(DiagMenuIDs.MISC_UNIVERSAL_TEMPERATURE_SOURCES, "lalt+u", "Universal Temp Sources", DiagMenuIDs.MISC_MENU);
233  DiagMenu.RegisterBool(DiagMenuIDs.MISC_DRAW_CHECKERBOARD, "", "Draw Checkerboard on screen", DiagMenuIDs.MISC_MENU);
234  DiagMenu.RegisterBool(DiagMenuIDs.MISC_BULLET_IMPACT, "", "BulletImpact", DiagMenuIDs.MISC_MENU);
235  DiagMenu.RegisterBool(DiagMenuIDs.MISC_PRESENCE_NOTIFIER_DBG, "", "Show Presence to AI dbg", DiagMenuIDs.MISC_MENU);
236  DiagMenu.RegisterBool(DiagMenuIDs.MISC_GO_UNCONSCIOUS, "lctrl+m", "Go Unconscious", DiagMenuIDs.MISC_MENU);
237  DiagMenu.RegisterBool(DiagMenuIDs.MISC_GO_UNCONSCIOUS_DELAYED, "", "Uncons. in 10sec", DiagMenuIDs.MISC_MENU);
238  DiagMenu.RegisterBool(DiagMenuIDs.MISC_QUICK_RESTRAIN, "", "Quick Restrain", DiagMenuIDs.MISC_MENU);
239  DiagMenu.RegisterMenu(DiagMenuIDs.MISC_HAIR_MENU, "Hair Hiding", DiagMenuIDs.MISC_MENU);
240  {
241  //---------------------------------------------------------------
242  // LEVEL 3 - Script > Misc > Hair Hiding
243  //---------------------------------------------------------------
244  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HAIR_DISPLAY_DEBUG, "", "Display Debug", DiagMenuIDs.MISC_HAIR_MENU);
245  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HAIR_LEVEL, "", "Hair Level#", DiagMenuIDs.MISC_HAIR_MENU, string.Format("0,%1,0,1", m_TotalHairLevelsAdjusted));
246  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HAIR_LEVEL_HIDE, "", "Toggle Hair Level", DiagMenuIDs.MISC_HAIR_MENU);
247  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HAIR_HIDE_ALL, "", "Hide/Show All", DiagMenuIDs.MISC_HAIR_MENU);
248  }
249  //---------------------------------------------------------------
250  // LEVEL 2 - Script > Misc
251  //---------------------------------------------------------------
252  DiagMenu.RegisterBool(DiagMenuIDs.MISC_CAM_SHAKE, "", "Simulate Cam Shake", DiagMenuIDs.MISC_MENU);
253  DiagMenu.RegisterBool(DiagMenuIDs.MISC_QUICK_FISHING, "", "Quick Fishing", DiagMenuIDs.MISC_MENU);
254  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HOLOGRAM, "lctrl+h", "Hologram placing debug", DiagMenuIDs.MISC_MENU);
255  DiagMenu.RegisterBool(DiagMenuIDs.MISC_SHOCK_IMPACT, "lalt+8", "ShockHitEffect", DiagMenuIDs.MISC_MENU);
256  DiagMenu.RegisterBool(DiagMenuIDs.MISC_SHOW_PLUG_ARROWS, "", "Show Energy Manager Plug Arrows", DiagMenuIDs.MISC_MENU);
257  DiagMenu.RegisterBool(DiagMenuIDs.MISC_BREATH_VAPOR_LVL, "", "Breath Vapor", DiagMenuIDs.MISC_MENU);
258  DiagMenu.SetValue(DiagMenuIDs.MISC_BREATH_VAPOR_LVL, true);
259  DiagMenu.RegisterBool(DiagMenuIDs.MISC_TARGETABLE_BY_AI, "lalt+t", "Toggle Targetable By AI", DiagMenuIDs.MISC_MENU);
260  DiagMenu.SetValue(DiagMenuIDs.MISC_TARGETABLE_BY_AI, true);
261  DiagMenu.RegisterMenu(DiagMenuIDs.MISC_HIT_INDICATION_MENU, "Hit Indication", DiagMenuIDs.MISC_MENU);
262  {
263  //---------------------------------------------------------------
264  // LEVEL 3 - Script > Misc > Hit Indication
265  //---------------------------------------------------------------
266  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HIT_INDICATION_DEBUG, "", "Enable Debug", DiagMenuIDs.MISC_HIT_INDICATION_MENU);
267  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HIT_INDICATION_SPAWN_HIT, "", "Spawn Hit", DiagMenuIDs.MISC_HIT_INDICATION_MENU);
268  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HIT_INDICATION_SPAWN_HIT_DIRECTION, "", "Spawn Hit Direction", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "0, 359, 0, 1");
269  DiagMenu.RegisterItem(DiagMenuIDs.MISC_HIT_INDICATION_MODE, "", "Mode", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "Disabled,Static,Dynamic");
270  DiagMenu.SetValue(DiagMenuIDs.MISC_HIT_INDICATION_MODE, 1);
271  DiagMenu.RegisterItem(DiagMenuIDs.MISC_HIT_INDICATION_TYPE, "", "Type", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "Splash,Spike,Arrow");
272  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HIT_INDICATION_DURATION, "", "Hit Duration Max", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "0.1, 5.0, 1.0, 0.1");
273  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HIT_INDICATION_BREAKPOINT, "", "Hit Breakpoint", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "0.0, 1.0, 0.8, 0.05");
274  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HIT_INDICATION_DISTANCE, "", "Distance Adjust", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "0.0, 1.0, 0.0, 0.01");
275  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HIT_INDICATION_ROTATION, "", "Rotation Override", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "0, 360, 0, 15");
276  DiagMenu.RegisterRange(DiagMenuIDs.MISC_HIT_INDICATION_SCATTER, "", "Direction Scatter", DiagMenuIDs.MISC_HIT_INDICATION_MENU, "0, 90, 0, 1");
277  DiagMenu.RegisterBool(DiagMenuIDs.MISC_HIT_INDICATION_DISABLE_PPE, "", "Disable Hit PPE", DiagMenuIDs.MISC_HIT_INDICATION_MENU);
278  }
279  //---------------------------------------------------------------
280  // LEVEL 2 - Script > Misc
281  //---------------------------------------------------------------
282  DiagMenu.RegisterBool(DiagMenuIDs.MISC_FREEZE_ENTITY, "lalt+x", "Freeze entity", DiagMenuIDs.MISC_MENU);
283  DiagMenu.RegisterBool(DiagMenuIDs.MISC_CONNECTION_STATS, "lalt+4", "Show Connection Stats", DiagMenuIDs.MISC_MENU);
284  DiagMenu.RegisterBool(DiagMenuIDs.MISC_PLAYER_SYMPTOMS_SHOW, "", "Show States", DiagMenuIDs.MISC_MENU);
285  DiagMenu.RegisterBool(DiagMenuIDs.MISC_INPUT_DEVICE_DISCONNECT_DBG, "", "InputDevice states", DiagMenuIDs.MISC_MENU);
286  DiagMenu.RegisterBool(DiagMenuIDs.MISC_DEBUG_MONITOR, "", "Debug Monitor", DiagMenuIDs.MISC_MENU);
287  DiagMenu.RegisterRange(DiagMenuIDs.MISC_FORCE_HINT_INDEX, "", "Force Hint Index", DiagMenuIDs.MISC_MENU, "-1, 512, -1, 1");
288  if (UiHintPanel.m_ForcedIndex != -1)
289  DiagMenu.SetRangeValue(DiagMenuIDs.MISC_FORCE_HINT_INDEX,UiHintPanel.m_ForcedIndex);
290  }
291 
292  //---------------------------------------------------------------
293  // LEVEL 1 - Script
294  //---------------------------------------------------------------
295  DiagMenu.RegisterMenu(DiagMenuIDs.SIMULATE_MENU, "Simulate script", DiagMenuIDs.SCRIPTS_MENU);
296  {
297  //---------------------------------------------------------------
298  // LEVEL 2 - Script > Simulate script
299  //---------------------------------------------------------------
300  DiagMenu.RegisterRange(DiagMenuIDs.SIMULATE_MODE, "", "Server/Client/Both", DiagMenuIDs.SIMULATE_MENU,"0,2,0,1");
301  DiagMenu.RegisterBool(DiagMenuIDs.SIMULATE_INFINITE_LOOP, "", "Simulate infinite loop", DiagMenuIDs.SIMULATE_MENU);
302  DiagMenu.RegisterBool(DiagMenuIDs.SIMULATE_NULL_POINTER, "", "Simulate null pointer", DiagMenuIDs.SIMULATE_MENU);
303  DiagMenu.RegisterBool(DiagMenuIDs.SIMULATE_DIVISION_BY_ZERO, "", "Simulate division by 0", DiagMenuIDs.SIMULATE_MENU);
304  DiagMenu.RegisterBool(DiagMenuIDs.SIMULATE_ERROR_FUNCTION, "", "Simulate Error() function", DiagMenuIDs.SIMULATE_MENU);
305  }
306 
307  //---------------------------------------------------------------
308  // LEVEL 1 - Script
309  //---------------------------------------------------------------
310  DiagMenu.RegisterMenu(DiagMenuIDs.MELEE_MENU, "Melee", DiagMenuIDs.SCRIPTS_MENU);
311  {
312  //---------------------------------------------------------------
313  // LEVEL 2 - Script > Melee
314  //---------------------------------------------------------------
315  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_DEBUG, "", "Enable Melee Debug", DiagMenuIDs.MELEE_MENU);
316  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_CONTINUOUS, "", "Continuous update", DiagMenuIDs.MELEE_MENU);
317  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_SHOW_TARGETS, "", "Show targets", DiagMenuIDs.MELEE_MENU);
318  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_DRAW_TARGETS, "", "Draw targets", DiagMenuIDs.MELEE_MENU);
319  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_DRAW_RANGE, "", "Draw range", DiagMenuIDs.MELEE_MENU);
320  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_DRAW_BLOCK_RANGE_AI, "", "Draw block range PVE", DiagMenuIDs.MELEE_MENU);
321  DiagMenu.RegisterBool(DiagMenuIDs.MELEE_DRAW_BLOCK_RANGE_PVP, "", "Draw block range PVP", DiagMenuIDs.MELEE_MENU);
322  }
323 
324  //---------------------------------------------------------------
325  // LEVEL 1 - Script
326  //---------------------------------------------------------------
327  DiagMenu.RegisterMenu(DiagMenuIDs.WEAPON_MENU, "Weapon", DiagMenuIDs.SCRIPTS_MENU);
328  {
329  //---------------------------------------------------------------
330  // LEVEL 2 - Script > Weapon
331  //---------------------------------------------------------------
332  DiagMenu.RegisterBool(DiagMenuIDs.WEAPON_PARTICLES, "", "Enable gun particles", DiagMenuIDs.WEAPON_MENU);
333  DiagMenu.SetValue(DiagMenuIDs.WEAPON_PARTICLES, true);
334  DiagMenu.RegisterBool(DiagMenuIDs.WEAPON_DEBUG, "", "Show Debug", DiagMenuIDs.WEAPON_MENU); // Doesn't do anything anymore currently
335  DiagMenu.RegisterBool(DiagMenuIDs.WEAPON_AIM_NOISE, "", "Weapon Sway", DiagMenuIDs.WEAPON_MENU);
336  DiagMenu.SetValue(DiagMenuIDs.WEAPON_AIM_NOISE, true);
337  DiagMenu.RegisterBool(DiagMenuIDs.WEAPON_RECOIL, "", "Procedural Recoil", DiagMenuIDs.WEAPON_MENU);
338  DiagMenu.SetValue(DiagMenuIDs.WEAPON_RECOIL, true);
339  DiagMenu.RegisterBool(DiagMenuIDs.WEAPON_UNLIMITED_AMMO, "lalt+9", "Unlimited Ammo", DiagMenuIDs.WEAPON_MENU);
340  DiagMenu.RegisterItem(DiagMenuIDs.WEAPON_BURST_VERSION, "lctrl+0", "Burst Version", DiagMenuIDs.WEAPON_MENU, "Hold, Press");
341  DiagMenu.RegisterBool(DiagMenuIDs.WEAPON_CLAYMORE_DEBUG, "", "Claymore debugs", DiagMenuIDs.WEAPON_MENU);
342  DiagMenu.RegisterItem(DiagMenuIDs.WEAPON_LIFT_DEBUG, "", "Weapon Lift Debug", DiagMenuIDs.WEAPON_MENU, "false,true,extended");
343  }
344 
345  //---------------------------------------------------------------
346  // LEVEL 1 - Script
347  //---------------------------------------------------------------
348  DiagMenu.RegisterMenu(DiagMenuIDs.BLEEDING_MENU, "Bleeding", DiagMenuIDs.SCRIPTS_MENU);
349  {
350  //---------------------------------------------------------------
351  // LEVEL 2 - Script > Bleeding
352  //---------------------------------------------------------------
353  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDING_SOURCES, "", "Show Bleeding Sources", DiagMenuIDs.BLEEDING_MENU);
354  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDING_DISABLE_BLOOD_LOSS, "", "Disable Blood Loss", DiagMenuIDs.BLEEDING_MENU);
355  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDING_ACTIVATE_SOURCE, "", "Activate Source #", DiagMenuIDs.BLEEDING_MENU, "1, 32, 0, 1");
356  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDING_ACTIVATE_ALL_SOURCES, "", "Activate All Sources", DiagMenuIDs.BLEEDING_MENU);
357  DiagMenu.RegisterItem(DiagMenuIDs.BLEEDING_ACTIVATE_SOURCE_LEVEL, "", "Activate Blsource Level", DiagMenuIDs.BLEEDING_MENU, "None, Low, Medium, High");
358  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDING_RELOAD, "", "Client Reload", DiagMenuIDs.BLEEDING_MENU);
359  DiagMenu.RegisterMenu(DiagMenuIDs.BLEEDINGINDICATORS_MENU, "Bleeding Indication", DiagMenuIDs.BLEEDING_MENU);
360  {
361  //---------------------------------------------------------------
362  // LEVEL 3 - Script > Bleeding > Bleeding Indication
363  //---------------------------------------------------------------
364  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDINGINDICATORS, "", "Enable BleedingIndicators", DiagMenuIDs.BLEEDINGINDICATORS_MENU);
365  DiagMenu.SetValue(DiagMenuIDs.BLEEDINGINDICATORS, true);
366  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDINGINDICATORS_USEVALUEOVERRIDES, "", "Enable Debug Overrides", DiagMenuIDs.BLEEDINGINDICATORS_MENU);
367  DiagMenu.SetValue(DiagMenuIDs.BLEEDINGINDICATORS_USEVALUEOVERRIDES, false);
368  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RANDOMROTATION, "", "Enable Random Rotation", DiagMenuIDs.BLEEDINGINDICATORS_MENU);
369  DiagMenu.SetValue(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RANDOMROTATION, true);
370  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_SEQUENCE_DURATION, "", "Sequence Duration", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.2, 5.0, " + BleedingIndicationConstants.SEQUENCE_DURATION_DEFAULT.ToString() + ", 0.01");
371  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_BASEDURATION, "", "Drop Anim Duration", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.1, 5.0, " + BleedingIndicationConstants.DROP_DURATION_LOW.ToString() + ", 0.05");
372  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_MINDELAY, "", "Drop Min Delay", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.0, 5.0, " + BleedingIndicationConstants.SEQUENCE_DROP_DELAY_MIN_LOW.ToString() + ", 0.05");
373  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_MAXDELAY, "", "Drop Max Delay", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.0, 5.0, " + BleedingIndicationConstants.SEQUENCE_DROP_DELAY_MAX_LOW.ToString() + ", 0.05");
374  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_PROGRESSTHRESHOLD, "", "Drop Progress Threshold", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.1, 1.0, " + BleedingIndicationConstants.DROP_PROGRESS_THRESHOLD.ToString() + ", 0.05");
375  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_STARTSIZE, "", "Drop Start Size", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.1, 1.0, " + BleedingIndicationConstants.DROP_SIZE_START_LOW.ToString() + ", 0.01");
376  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_ENDSIZE, "", "Drop End Size", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.1, 1.0, " + BleedingIndicationConstants.DROP_SIZE_END_LOW.ToString() + ", 0.01");
377  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RNDSCALEMIN, "", "Drop Size Random Min", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.0, 2.0, " + BleedingIndicationConstants.DROP_SIZE_VARIATION_MIN_LOW.ToString() + ", 0.01");
378  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_RNDSCALEMAX, "", "Drop Size Random Max", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.0, 2.0, " + BleedingIndicationConstants.DROP_SIZE_VARIATION_MAX_LOW.ToString() + ", 0.01");
379  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_SCATTER, "", "Drop Scatter px", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.0, 500.0, " + BleedingIndicationConstants.DROP_SCATTER_LOW.ToString() + ", 1.0");
380  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_SLIDEDISTANCE, "", "Drop Slide Distance", DiagMenuIDs.BLEEDINGINDICATORS_MENU, "0.0, 500.0, 0, 0.1");
381  DiagMenu.RegisterMenu(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "Color Debug", DiagMenuIDs.BLEEDINGINDICATORS_MENU);
382  {
383  //---------------------------------------------------------------
384  // LEVEL 4 - Script > Bleeding > Bleeding Indication > Color Debug
385  //---------------------------------------------------------------
386  DiagMenu.RegisterBool(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_ENABLEDESATURATION, "", "Desaturate", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU);
387  DiagMenu.SetValue(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_ENABLEDESATURATION, true);
388  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_DESATURATIONEND, "", "Saturation End Value", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "0.0, 1.0, " + BleedingIndicationConstants.DROP_COLOR_DESATURATIONEND.ToString() + ", 0.05");
389  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_R, "", "Red", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "0.0, 255.0, " + BleedingIndicationConstants.DROP_COLOR_RED.ToString() + ", 1.0");
390  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_G, "", "Green", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "0.0, 255.0, " + BleedingIndicationConstants.DROP_COLOR_GREEN.ToString() + ", 1.0");
391  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_B, "", "Blue", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "0.0, 255.0, " + BleedingIndicationConstants.DROP_COLOR_BLUE.ToString() + ", 1.0");
392  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_A_START, "", "Alpha - Start", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "0.0, 255.0, " + BleedingIndicationConstants.DROP_COLOR_ALPHA_START.ToString() + ", 1.0");
393  DiagMenu.RegisterRange(DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_A_END, "", "Alpha - End", DiagMenuIDs.BLEEDINGINDICATORS_DROP_COLOR_MENU, "0.0, 255.0, " + BleedingIndicationConstants.DROP_COLOR_ALPHA_END.ToString() + ", 1.0");
394  }
395  }
396  }
397 
398  //---------------------------------------------------------------
399  // LEVEL 1 - Script
400  //---------------------------------------------------------------
401  DiagMenu.RegisterMenu(DiagMenuIDs.LOGS_MENU, "Logs", DiagMenuIDs.SCRIPTS_MENU);
402  {
403  //---------------------------------------------------------------
404  // LEVEL 2 - Script > Logs
405  //---------------------------------------------------------------
406  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_ACTIONS, "", "Log Actions", DiagMenuIDs.LOGS_MENU);
407  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_WEAPONS, "", "Log Weapons", DiagMenuIDs.LOGS_MENU);
408  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_SYNC, "", "Log Sync", DiagMenuIDs.LOGS_MENU);
409  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_BASEBUILDING, "", "Log Base building", DiagMenuIDs.LOGS_MENU);
410  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_QUICKBAR, "", "Log Quickbar", DiagMenuIDs.LOGS_MENU);
411  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_SYMPTOMS, "", "Log Symptoms", DiagMenuIDs.LOGS_MENU);
412  DiagMenu.RegisterMenu(DiagMenuIDs.LOGS_INVENTORY_MENU, "Inventory Logs", DiagMenuIDs.LOGS_MENU);
413  {
414  //---------------------------------------------------------------
415  // LEVEL 3 - Script > Logs > InventoryLogs
416  //---------------------------------------------------------------
417  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_INVENTORY_MOVE, "", "Log Items move", DiagMenuIDs.LOGS_INVENTORY_MENU);
418  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_INVENTORY_RESERVATION, "", "Log Reservations", DiagMenuIDs.LOGS_INVENTORY_MENU);
419  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_INVENTORY_HFSM, "", "Log HandFSM", DiagMenuIDs.LOGS_INVENTORY_MENU);
420  }
421  DiagMenu.RegisterBool(DiagMenuIDs.LOGS_BLEEDING_CHANCES, "", "Bleeding Chances Logs", DiagMenuIDs.LOGS_MENU);
422  }
423 
424  //---------------------------------------------------------------
425  // LEVEL 1 - Script
426  //---------------------------------------------------------------
427  DiagMenu.RegisterMenu(DiagMenuIDs.TRIGGER_MENU, "Triggers", DiagMenuIDs.SCRIPTS_MENU);
428  {
429  //---------------------------------------------------------------
430  // LEVEL 2 - Script > Triggers
431  //---------------------------------------------------------------
432  DiagMenu.RegisterBool(DiagMenuIDs.TRIGGER_DEBUG, "", "Show Triggers", DiagMenuIDs.TRIGGER_MENU);
433  DiagMenu.RegisterBool(DiagMenuIDs.TRIGGER_PLAYER_DEBUG, "", "Show Player Touch", DiagMenuIDs.TRIGGER_MENU);
434  #ifdef TRIGGER_DEBUG_BASIC
435  DiagMenu.SetValue(DiagMenuIDs.TRIGGER_DEBUG, true);
436  DiagMenu.SetValue(DiagMenuIDs.TRIGGER_PLAYER_DEBUG, true);
437  #endif
438  }
439 
440  //---------------------------------------------------------------
441  // LEVEL 1 - Script
442  //---------------------------------------------------------------
443  DiagMenu.RegisterMenu(DiagMenuIDs.BASEBUILDING_MENU, "Base Building", DiagMenuIDs.SCRIPTS_MENU);
444  {
445  //---------------------------------------------------------------
446  // LEVEL 2 - Script > Base Building
447  //---------------------------------------------------------------
448  DiagMenu.RegisterBool(DiagMenuIDs.BASEBUILDING_WOOD, "", "Spawn uses wood/metal", DiagMenuIDs.BASEBUILDING_MENU);
449  DiagMenu.RegisterBool(DiagMenuIDs.BASEBUILDING_GATE, "", "Spawn Fence makes gate", DiagMenuIDs.BASEBUILDING_MENU);
450  }
451 
452  //---------------------------------------------------------------
453  // LEVEL 1 - Script
454  //---------------------------------------------------------------
455  DiagMenu.RegisterMenu(DiagMenuIDs.UNDERGROUND_MENU, "Underground Areas", DiagMenuIDs.SCRIPTS_MENU);
456  {
457  //---------------------------------------------------------------
458  // LEVEL 2 - Script > Underground Areas
459  //---------------------------------------------------------------
460  DiagMenu.RegisterBool(DiagMenuIDs.UNDERGROUND_SHOW_BREADCRUMB, "", "Show Breadcrumbs", DiagMenuIDs.UNDERGROUND_MENU);
461  DiagMenu.RegisterBool(DiagMenuIDs.UNDERGROUND_DISABLE_DARKENING, "lctrl+f", "Disable Darkening", DiagMenuIDs.UNDERGROUND_MENU);
462  }
463 
464  //---------------------------------------------------------------
465  // LEVEL 1 - Script
466  //---------------------------------------------------------------
467  DiagMenu.RegisterMenu(DiagMenuIDs.FINISHERS_MENU, "Finishers", DiagMenuIDs.SCRIPTS_MENU);
468  {
469  //---------------------------------------------------------------
470  // LEVEL 2 - Script > Finishers
471  //---------------------------------------------------------------
472  DiagMenu.RegisterItem(DiagMenuIDs.FINISHERS_FINISHER_FORCED, "", "Forced Finisher: ", DiagMenuIDs.FINISHERS_MENU, "None,Liver,Neck");
473  }
474 
475  //---------------------------------------------------------------
476  // LEVEL 1 - Script
477  //---------------------------------------------------------------
478  DiagMenu.RegisterMenu(DiagMenuIDs.SOUNDS_MENU, "Script Sounds", DiagMenuIDs.SCRIPTS_MENU);
479  {
480  //---------------------------------------------------------------
481  // LEVEL 2 - Script > Script Sounds
482  //---------------------------------------------------------------
483  DiagMenu.RegisterBool(DiagMenuIDs.SOUNDS_ITEM_IMPACT_SOUNDS, "", "Item impact sounds", DiagMenuIDs.SOUNDS_MENU);
484  }
485 
486  //---------------------------------------------------------------
487  // LEVEL 1 - Script
488  //---------------------------------------------------------------
489  DiagMenu.RegisterMenu(DiagMenuIDs.CAMERATOOLS_MENU, "Cinematic Camera Tools", DiagMenuIDs.SCRIPTS_MENU);
490  {
491  //---------------------------------------------------------------
492  // LEVEL 2 - Script > Cinematic Camera Tools
493  //---------------------------------------------------------------
494  DiagMenu.RegisterBool(DiagMenuIDs.CAMERATOOLS_ENABLE_REMOTE_CAMERA, "", "Show remote camera", DiagMenuIDs.CAMERATOOLS_MENU);
495  DiagMenu.RegisterBool(DiagMenuIDs.CAMERATOOLS_ENABLE_REMOTE_CAMERA_BROADCAST, "", "Broadcast camera", DiagMenuIDs.CAMERATOOLS_MENU);
496  }
497  //---------------------------------------------------------------
498  // LEVEL 1 - Script
499  //---------------------------------------------------------------
500  DiagMenu.RegisterMenu(DiagMenuIDs.FEATURE_TIME_ACCEL_MENU, "Time Accel", DiagMenuIDs.SCRIPTS_MENU);
501  {
502  //---------------------------------------------------------------
503  // LEVEL 2 - Script > Time Accel
504  //---------------------------------------------------------------
505  DiagMenu.RegisterBool(DiagMenuIDs.FEATURE_TIME_ACCEL, "lalt+0", "Apply Time Accel", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU);
506  DiagMenu.RegisterRange(DiagMenuIDs.FEATURE_TIME_ACCEL_VALUE1, "", "Accel Factor Big", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU,"0,100,1,1");
507  DiagMenu.RegisterRange(DiagMenuIDs.FEATURE_TIME_ACCEL_VALUE2, "", "Accel Factor Small", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU,"0,0.95 ,0,0.05");
508  DiagMenu.RegisterBool(DiagMenuIDs.FEATURE_TIME_ACCEL_UG_ENTRANCES, "", "Underground Entrances", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU);
509  DiagMenu.RegisterBool(DiagMenuIDs.FEATURE_TIME_ACCEL_UG_RESERVOIR, "", "Underground Reservoir", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU);
510  DiagMenu.RegisterBool(DiagMenuIDs.FEATURE_TIME_ACCEL_ENERGY_CONSUME, "", "Energy Consumption", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU);
511  DiagMenu.RegisterBool(DiagMenuIDs.FEATURE_TIME_ACCEL_FOOD_DECAY, "", "Decay", DiagMenuIDs.FEATURE_TIME_ACCEL_MENU);
512  }
513  }
514  }
515 
516  //---------------------------------------------
517  protected int GetModdedDiagID()
518  {
519  return ++m_ModdedDiagID;
520  }
521 
522  //---------------------------------------------
523  protected int GetModdedRootMenu()
524  {
525  return DiagMenuIDs.MODDED_MENU;
526  }
527 
528  //---------------------------------------------
529  protected void RegisterModdedDiagsIDs();
530 
531  //---------------------------------------------
532  protected void RegisterModdedDiags()
533  {
534  DiagMenu.RegisterMenu(DiagMenuIDs.MODDED_MENU, "Script - Modded", -1);
535  }
536 
537  //---------------------------------------------
538  void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
539  {
540  EntityAI parent;
541  Class.CastTo(parent, player.GetParent());
542 
543  switch (rpc_type)
544  {
545  //---------------------------------------------------------------
546  // Misc, multipurpose
547  //---------------------------------------------------------------
548  case ERPCs.DIAG_ITEM_DEBUG_ACTIONS:
549  {
550  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
551  ItemBase.SetDebugActionsMask(CachedObjectsParams.PARAM1_INT.param1);
552  break;
553  }
554 
555 
556  //---------------------------------------------------------------
557  // LEVEL 2 - Script > Player States
558  //---------------------------------------------------------------
559  case ERPCs.DIAG_PLAYER_SYMPTOMS_DEBUG_ON:
560  case ERPCs.DIAG_PLAYER_SYMPTOMS_DEBUG_OFF:
561  case ERPCs.DIAG_PLAYER_SYMPTOMS_DEBUG:
562  {
563  if (player.GetSymptomManager())
564  {
565  player.GetSymptomManager().OnRPCDebug(rpc_type, ctx);
566  }
567  break;
568  }
569 
570 
571 
572  //---------------------------------------------------------------
573  // LEVEL 2 - Script > Crafting
574  //---------------------------------------------------------------
575  case ERPCs.DIAG_CRAFTING_INSTANT:
576  {
577  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
578  {
579  PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(GetPlugin(PluginRecipesManager));
580  pluginRecipesManager.SetEnableDebugCrafting(CachedObjectsParams.PARAM1_INT.param1);
581  }
582  break;
583  }
584 
585 
586  //---------------------------------------------------------------
587  // LEVEL 2 - Script > Cheats
588  //---------------------------------------------------------------
589  case ERPCs.DIAG_CHEATS_MODIFIERS:
590  {
591  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
592  player.SetModifiers(CachedObjectsParams.PARAM1_INT.param1);
593  break;
594  }
595 
596  //---------------------------------------------------------------
597  case ERPCs.DIAG_CHEATS_KILL_PLAYER:
598  {
599  player.SetHealth("","", -1);
600  break;
601  }
602 
603  //---------------------------------------------------------------
604  case ERPCs.DIAG_CHEATS_INVINCIBILITY:
605  {
606  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
607  {
608  switch (CachedObjectsParams.PARAM1_INT.param1)
609  {
610  case 0:
611  {
612  if (parent)
613  {
614  parent.SetAllowDamage(true);
615  parent.SetCanBeDestroyed(true);
616  }
617 
618  player.SetAllowDamage(true);
619  player.SetCanBeDestroyed(true);
620  break;
621  }
622  case 1:
623  {
624  if (parent)
625  {
626  parent.SetAllowDamage(true);
627  parent.SetCanBeDestroyed(false);
628  }
629 
630  player.SetAllowDamage(true);
631  player.SetCanBeDestroyed(false);
632  break;
633  }
634  case 2:
635  {
636  if (parent)
637  {
638  parent.SetAllowDamage(false);
639  }
640 
641  player.SetAllowDamage(false);
642  break;
643  }
644  }
645  break;
646  }
647  }
648 
649  //---------------------------------------------------------------
650  case ERPCs.DIAG_CHEATS_DISABLE_STAMINA:
651  {
652  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
653  player.SetStaminaDisabled(CachedObjectsParams.PARAM1_BOOL.param1);
654  break;
655  }
656 
657  //---------------------------------------------------------------
658  case ERPCs.DIAG_CHEATS_RESET_PLAYER:
659  {
660  player.ResetPlayer(false);
661  break;
662  }
663 
664  //---------------------------------------------------------------
665  case ERPCs.DIAG_CHEATS_RESET_PLAYER_MAX:
666  {
667  player.ResetPlayer(true);
668  break;
669  }
670 
671  //---------------------------------------------------------------
672  case ERPCs.DIAG_CHEATS_INVENTORY_ACCESS:
673  {
674  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
675  player.DEBUG_INVENTORY_ACCESS = CachedObjectsParams.PARAM1_INT.param1;
676  break;
677  }
678 
679  //---------------------------------------------------------------
680  case ERPCs.DIAG_CHEATS_ITEMS_FIX:
681  {
682  player.FixAllInventoryItems();
683  break;
684  }
685  //---------------------------------------------------------------
686  //---------------------------DAMAGE DEBUG------------------------
687  // hardcoded for Heavy and Light, but Light can be converted to some sort of setup if we need to have even more times with more settings, ie. we could first set-up the hit params and then perform it
688  case ERPCs.DIAG_CHEATS_CREATE_HIT:
689  {
690  player.ProcessDirectDamage(DamageType.CUSTOM, player, "", "Dummy_Heavy", "0 0 0");
691  break;
692  }
693 
694  case ERPCs.DIAG_CHEATS_CREATE_HIT_LIGHT:
695  {
696  player.ProcessDirectDamage(DamageType.CUSTOM, player, "", "MeleeFist", "0 0 0");
697  break;
698  }
699 
700  //---------------------------------------------------------------
701  // LEVEL 2 - Script > Soft Skills
702  //---------------------------------------------------------------
703  case ERPCs.DIAG_SOFT_SKILLS_SHOW_DEBUG:
704  {
705  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
706  {
707  if (CachedObjectsParams.PARAM1_BOOL.param1)
708  {
709  player.GetSoftSkillsManager().StartSynchTimer();
710  }
711  else
712  {
713  player.GetSoftSkillsManager().StopSynchTimer();
714  player.GetSoftSkillsManager().ResetDebugWindow();
715  }
716  }
717  break;
718  }
719 
720  //---------------------------------------------------------------
721  case ERPCs.DIAG_SOFT_SKILLS_TOGGLE_STATE:
722  {
723  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
724  player.GetSoftSkillsManager().SetSoftSkillsState(CachedObjectsParams.PARAM1_BOOL.param1);
725  break;
726  }
727 
728  //---------------------------------------------------------------
729  case ERPCs.DIAG_SOFT_SKILLS_TOGGLE_MODEL:
730  {
731  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
732  player.GetSoftSkillsManager().SetLinearState(CachedObjectsParams.PARAM1_BOOL.param1) ;
733  break;
734  }
735 
736  //---------------------------------------------------------------
737  case ERPCs.DIAG_SOFT_SKILLS_SPECIALTY_VALUE:
738  {
739  if (ctx.Read(CachedObjectsParams.PARAM1_FLOAT))
740  {
741  SoftSkillsManager softSkillsMngr = player.GetSoftSkillsManager();
742  softSkillsMngr.SetSpecialtyLevel(CachedObjectsParams.PARAM1_FLOAT.param1);
743  softSkillsMngr.SynchSpecialtyLevel();
744  player.GetStatSpecialty().Set(CachedObjectsParams.PARAM1_FLOAT.param1);
745  }
746  break;
747  }
748 
749  //---------------------------------------------------------------
750  // LEVEL 2 - Script > Lifespan
751  //---------------------------------------------------------------
752  case ERPCs.DIAG_LIFESPAN_BLOODY_HANDS:
753  {
754  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
755  {
756  PluginLifespan pluginLifespan = PluginLifespan.Cast(GetPlugin(PluginLifespan));
757  pluginLifespan.UpdateBloodyHandsVisibility(player, CachedObjectsParams.PARAM1_BOOL.param1);
758  }
759  break;
760  }
761 
762  //---------------------------------------------------------------
763  case ERPCs.DIAG_LIFESPAN_PLAYTIME_UPDATE:
764  {
765  if (ctx.Read( CachedObjectsParams.PARAM1_FLOAT))
766  {
767  //reset playtime
768  player.StatUpdate(AnalyticsManagerServer.STAT_PLAYTIME, player.StatGet(AnalyticsManagerServer.STAT_PLAYTIME) * -1);
769  //set new playtime
770  player.StatUpdate(AnalyticsManagerServer.STAT_PLAYTIME, CachedObjectsParams.PARAM1_FLOAT.param1 );
771  player.SetLastShavedSeconds(0);
772  //update lifespan
773  PluginLifespan pluginLifespann = PluginLifespan.Cast(GetPlugin(PluginLifespan));
774  pluginLifespann.ChangeFakePlaytime( player, CachedObjectsParams.PARAM1_FLOAT.param1 );
775  pluginLifespann.UpdateLifespan(player, true);
776  }
777  break;
778  }
779 
780 
781  //---------------------------------------------------------------
782  // LEVEL 2 - Script > Misc
783  //---------------------------------------------------------------
784  case ERPCs.DIAG_MISC_LOG_PLAYER_STATS:
785  {
786  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
787  player.GetPlayerStats().SetAllowLogs(CachedObjectsParams.PARAM1_BOOL.param1);
788  break;
789  }
790 
791  //---------------------------------------------------------------
792 
793  //---------------------------------------------------------------
794  // LEVEL 2 - Script > Misc -> Environment
795  //---------------------------------------------------------------
796  case ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG:
797  {
798  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
799  {
800  if (player.m_Environment)
801  player.m_Environment.m_Debug = CachedObjectsParams.PARAM1_BOOL.param1;
802  }
803  break;
804  }
805 
806  case ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_DRYWET:
807  {
808  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
809  {
810  if (player.m_Environment)
811  player.m_Environment.m_DebugLogDryWet = CachedObjectsParams.PARAM1_BOOL.param1;
812  }
813  break;
814  }
815 
816  //---------------------------------------------------------------
817  // LEVEL 2 - Script > Misc
818  //---------------------------------------------------------------
819  case ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG:
820  {
821  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
822  {
823  if (player.GetFallDamage())
824  player.GetFallDamage().m_Debug = CachedObjectsParams.PARAM1_BOOL.param1;
825  }
826  break;
827  }
828 
829  //---------------------------------------------------------------
830  case ERPCs.DIAG_MISC_GO_UNCONSCIOUS:
831  {
832  GoUnconscious(player);
833  break;
834  }
835 
836  //---------------------------------------------------------------
837  case ERPCs.DIAG_MISC_GO_UNCONSCIOUS_DELAYED:
838  {
839  GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GoUnconscious, 10000, false, player);
840  break;
841  }
842 
843  //---------------------------------------------------------------
844  case ERPCs.DIAG_MISC_QUICK_RESTRAIN:
845  {
846  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
847  player.SetQuickRestrain(CachedObjectsParams.PARAM1_BOOL.param1);
848  break;
849  }
850 
851  //---------------------------------------------------------------
852  // LEVEL 3 - Script > Misc > Hair Hiding
853  //---------------------------------------------------------------
854  case ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE:
855  {
856  if (ctx.Read(CachedObjectsParams.PARAM2_INT_INT))
857  {
858  player.SetHairLevelToHide(CachedObjectsParams.PARAM2_INT_INT.param1, CachedObjectsParams.PARAM2_INT_INT.param2, true);
859  player.UpdateHairSelectionVisibility(true);
860  }
861  break;
862  }
863 
864  //---------------------------------------------------------------
865  // LEVEL 2 - Script > Misc
866  //---------------------------------------------------------------
867  case ERPCs.DIAG_MISC_QUICK_FISHING:
868  {
869  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
870  player.SetQuickFishing(CachedObjectsParams.PARAM1_BOOL.param1);
871  break;
872  }
873 
874  //---------------------------------------------------------------
875  case ERPCs.DIAG_MISC_TARGETABLE_BY_AI:
876  {
877  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
878  player.m_CanBeTargetedDebug = CachedObjectsParams.PARAM1_BOOL.param1;
879  break;
880  }
881 
882  //---------------------------------------------------------------
883  case ERPCs.DIAG_MISC_DEBUG_MONITOR:
884  {
885  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
886  GetGame().SetDebugMonitorEnabled(CachedObjectsParams.PARAM1_BOOL.param1);
887  break;
888  }
889 
890  //---------------------------------------------------------------
891  // LEVEL 2 - Script > Simulate script
892  //---------------------------------------------------------------
893  case ERPCs.DIAG_SIMULATE_INFINITE_LOOP:
894  {
895  while ( true )
896  {
897  Print("simulating infinite loop");
898  }
899  break;
900  }
901 
902  //---------------------------------------------------------------
903  case ERPCs.DIAG_SIMULATE_NULL_POINTER:
904  {
905  PlayerBase NULL_player = null;
906  NULL_player.SetHealth("","", -1);
907  break;
908  }
909 
910  //---------------------------------------------------------------
911  case ERPCs.DIAG_SIMULATE_DIVISION_BY_ZERO:
912  {
913  int zero = 0;
914  int division_by_zero = 1/zero;
915  break;
916  }
917 
918  //---------------------------------------------------------------
919  case ERPCs.DIAG_SIMULATE_ERROR_FUNCTION:
920  {
921  ErrorEx("Simulated error");
922  break;
923  }
924 
925 
926  //---------------------------------------------------------------
927  // LEVEL 2 - Script > Weapon
928  //---------------------------------------------------------------
929  case ERPCs.DIAG_WEAPON_PARTICLES:
930  {
931  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
932  PrtTest.m_GunParticlesState = CachedObjectsParams.PARAM1_BOOL.param1;
933  break;
934  }
935 
936  //---------------------------------------------------------------
937  case ERPCs.DIAG_WEAPON_RECOIL:
938  {
939  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
940  player.GetAimingModel().SetProceduralRecoilEnabled(CachedObjectsParams.PARAM1_BOOL.param1);
941  break;
942  }
943 
944  //---------------------------------------------------------------
945  case ERPCs.DIAG_WEAPON_BURST_VERSION:
946  {
947  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
948  player.GetWeaponManager().SetBurstOption(CachedObjectsParams.PARAM1_INT.param1);
949  break;
950  }
951 
952 
953  //---------------------------------------------------------------
954  // LEVEL 2 - Script > Bleeding
955  //---------------------------------------------------------------
956  case ERPCs.DIAG_BLEEDING_DISABLE_BLOOD_LOSS:
957  {
958  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
959  player.GetBleedingManagerServer().SetBloodLoss(CachedObjectsParams.PARAM1_BOOL.param1);
960  break;
961  }
962 
963  //---------------------------------------------------------------
964  case ERPCs.DIAG_BLEEDING_ACTIVATE_SOURCE:
965  {
966  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
967  player.GetBleedingManagerServer().DebugActivateBleedingSource(CachedObjectsParams.PARAM1_INT.param1);
968  break;
969  }
970 
971  //---------------------------------------------------------------
972  case ERPCs.DIAG_BLEEDING_ACTIVATE_ALL_SOURCES:
973  {
974  player.GetBleedingManagerServer().ActivateAllBS();
975  break;
976  }
977 
978 
979  //---------------------------------------------------------------
980  // LEVEL 2 - Script > Logs
981  //---------------------------------------------------------------
982  case ERPCs.DIAG_LOGS_ACTIONS:
983  {
984  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
985  LogManager.ActionLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
986  break;
987  }
988 
989  //---------------------------------------------------------------
990  case ERPCs.DIAG_LOGS_WEAPONS:
991  {
992  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
993  LogManager.WeaponLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
994  break;
995  }
996 
997  //---------------------------------------------------------------
998  case ERPCs.DIAG_LOGS_SYNC:
999  {
1000  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1001  LogManager.SyncLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1002  break;
1003  }
1004 
1005  //---------------------------------------------------------------
1006  case ERPCs.DIAG_LOGS_BASEBUILDING:
1007  {
1008  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1009  LogManager.BaseBuildingLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1010  break;
1011  }
1012 
1013  //---------------------------------------------------------------
1014  case ERPCs.DIAG_LOGS_SYMPTOMS:
1015  {
1016  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1017  LogManager.SymptomLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1018  break;
1019  }
1020 
1021  //---------------------------------------------------------------
1022  case ERPCs.DIAG_LOGS_INVENTORY_MOVE:
1023  {
1024  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1025  LogManager.InventoryMoveLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1026  break;
1027  }
1028 
1029  //---------------------------------------------------------------
1030  case ERPCs.DIAG_LOGS_INVENTORY_RESERVATION:
1031  {
1032  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1033  LogManager.InventoryReservationLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1034  break;
1035  }
1036 
1037  //---------------------------------------------------------------
1038  case ERPCs.DIAG_LOGS_INVENTORY_HFSM:
1039  {
1040  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1041  LogManager.InventoryHFSMLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1042  break;
1043  }
1044 
1045  //---------------------------------------------------------------
1046  case ERPCs.DIAG_LOGS_QUICKBAR:
1047  {
1048  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1049  LogManager.QuickbarLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1050  break;
1051  }
1052 
1053  //---------------------------------------------------------------
1054  case ERPCs.DIAG_LOGS_BLEEDING_CHANCES:
1055  {
1056  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1057  LogManager.BleedingChancesLogEnable(CachedObjectsParams.PARAM1_BOOL.param1);
1058  break;
1059  }
1060 
1061  //---------------------------------------------------------------
1062  // LEVEL 2 - Script > Base Building
1063  //---------------------------------------------------------------
1064  case ERPCs.DIAG_BASEBUILDING_WOOD:
1065  {
1066  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL) && DiagMenu.GetBool(DiagMenuIDs.BASEBUILDING_WOOD) != CachedObjectsParams.PARAM1_BOOL.param1)
1067  DiagMenu.SetValue(DiagMenuIDs.BASEBUILDING_WOOD, CachedObjectsParams.PARAM1_BOOL.param1);
1068  break;
1069  }
1070 
1071  //---------------------------------------------------------------
1072  case ERPCs.DIAG_BASEBUILDING_GATE:
1073  {
1074  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL) && DiagMenu.GetBool(DiagMenuIDs.BASEBUILDING_GATE) != CachedObjectsParams.PARAM1_BOOL.param1)
1075  DiagMenu.SetValue(DiagMenuIDs.BASEBUILDING_GATE, CachedObjectsParams.PARAM1_BOOL.param1);
1076  break;
1077  }
1078 
1079 
1080  //---------------------------------------------------------------
1081  // LEVEL 2 - Script > Finishers
1082  //---------------------------------------------------------------
1083  case ERPCs.DIAG_FINISHERS_FORCE_FINISHER:
1084  {
1085  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
1086  player.GetMeleeCombat().DebugSetForcedFinisherType(CachedObjectsParams.PARAM1_INT.param1);
1087  break;
1088  }
1089 
1090 
1091  //---------------------------------------------------------------
1092  // LEVEL 2 - Script > Cinematic Camera Tools
1093  //---------------------------------------------------------------
1094  case ERPCs.DIAG_CAMERATOOLS_CAM_DATA:
1095  {
1096  if (!player.m_CameraToolsMenuClient)
1097  {
1098  player.m_CameraToolsMenuClient = new CameraToolsMenuClient();
1099  }
1100 
1101  player.m_CameraToolsMenuClient.OnRPC(ctx);
1102  break;
1103  }
1104 
1105 
1106  //---------------------------------------------------------------
1107  // LEVEL 2 - Script > Time Accel
1108  //---------------------------------------------------------------
1109  case ERPCs.DIAG_TIMEACCEL:
1110  {
1111  TimeAccelParam tap = new TimeAccelParam(false, 0, 0);
1112 
1113  if (ctx.Read(tap))
1114  {
1115  FeatureTimeAccel.m_CurrentTimeAccel = tap;
1116  //Print("received from " + player);
1117  array<Man> players = new array<Man>();
1118  GetGame().GetPlayers(players);
1119  foreach (Man p : players)
1120  {
1121  if (p != player)// send to everyone except the one we receieved from
1122  {
1123  //Print("sending to " + p);
1124  GetGame().RPCSingleParam( p, ERPCs.DIAG_TIMEACCEL_CLIENT_SYNC, tap, true, p.GetIdentity());
1125  }
1126  }
1127 
1128  /*
1129  Print(" -------- TimeAccelParam -------");
1130  Print(tap.param1);
1131  Print(tap.param2);
1132  Print(tap.param3);
1133  Print(" -------------------------------");
1134  Print(FeatureTimeAccel.GetFeatureTimeAccelEnabled(ETimeAccelCategories.UNDERGROUND_ENTRANCE));
1135  Print(FeatureTimeAccel.GetFeatureTimeAccelValue());
1136  Print(" ===============================");
1137  */
1138  }
1139  break;
1140  }
1141 
1142  //---------------------------------------------------------------
1143  case ERPCs.DIAG_TIMEACCEL_CLIENT_SYNC:
1144  {
1145  TimeAccelParam tap2 = new TimeAccelParam(false, 0, 0);
1146 
1147  if (ctx.Read(tap2))
1148  {
1149  int bigFactor = tap2.param2;
1150  float smallFactor = tap2.param2 - bigFactor;
1151  SetTimeAccelMenuState(tap2.param1, bigFactor, smallFactor, tap2.param3);
1152  FeatureTimeAccel.m_CurrentTimeAccel = tap2;
1153  }
1154  break;
1155  }
1156 
1157  //---------------------------------------------------------------
1158  // LEVEL 2 - Script > Vehicles
1159  //---------------------------------------------------------------
1160  case ERPCs.DIAG_VEHICLE_DEBUG_OUTPUT:
1161  {
1162  if (ctx.Read(CachedObjectsParams.PARAM1_INT))
1163  CarScript.DEBUG_OUTPUT_TYPE = CachedObjectsParams.PARAM1_INT.param1;
1164  break;
1165  }
1166  //---------------------------------------------------------------
1167  case ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST:
1168  {
1169  if (ctx.Read(CachedObjectsParams.PARAM1_BOOL))
1170  CrashDebugData.SendData(player);
1171  break;
1172  }
1173  }
1174  }
1175 
1176  //---------------------------------------------
1177  void GoUnconscious(PlayerBase player)
1178  {
1179  if (player.IsUnconscious())
1180  {
1181  player.SetHealth("", "Shock", 100);
1182  }
1183  else
1184  {
1185  player.m_UnconsciousEndTime = -60;
1186  player.SetHealth("", "Shock", 0);
1187  }
1188  }
1189 
1190  //---------------------------------------------
1191  void InitTimeAccel()
1192  {
1193  FeatureTimeAccel.m_CurrentTimeAccel = GetTimeAccelMenuState();
1194 
1195  string value;
1196 
1197  if ( GetGame().CommandlineGetParam("timeAccel", value))
1198  {
1199  TStringArray params = new TStringArray();
1200 
1201  value.Replace(" ","");
1202  value.Split(",", params);
1203 
1204  bool enable = params[0].ToInt();
1205  int timeAccelBig = params[1].ToInt();
1206  float timeAccelSmall = params[2].ToFloat();
1207  int bitMask = params[3].ToInt();
1208 
1209  SetTimeAccelMenuState(enable, timeAccelBig, timeAccelSmall, bitMask);
1210  }
1211  }
1212 
1213  TimeAccelParam GetTimeAccelMenuState()
1214  {
1215  bool enable = DiagMenu.GetBool(DiagMenuIDs.FEATURE_TIME_ACCEL);
1216  float timeAccelBig = DiagMenu.GetRangeValue(DiagMenuIDs.FEATURE_TIME_ACCEL_VALUE1);
1217  float timeAccelSmall = DiagMenu.GetRangeValue(DiagMenuIDs.FEATURE_TIME_ACCEL_VALUE2);
1218  float timeAccel = timeAccelBig + timeAccelSmall;
1219  int bitMask = FeatureTimeAccel.GetTimeAccelBitmask();
1220 
1221  TimeAccelParam param = new TimeAccelParam(enable, timeAccel, bitMask);
1222  return param;
1223  }
1224 
1225  void SetTimeAccelMenuState(bool enable, int bigFactor, float smallFactor, int bitmask)
1226  {
1227  DiagMenu.SetValue(DiagMenuIDs.FEATURE_TIME_ACCEL, enable);
1228  DiagMenu.SetRangeValue(DiagMenuIDs.FEATURE_TIME_ACCEL_VALUE1, bigFactor);
1229  DiagMenu.SetRangeValue(DiagMenuIDs.FEATURE_TIME_ACCEL_VALUE2, smallFactor);
1230 
1231  for (int i = 0; i < EnumTools.GetEnumSize(ETimeAccelCategories); ++i)
1232  {
1233  int bit = 1 << i;
1234  bool on = (bit & bitmask);
1235  DiagMenu.SetValue(FeatureTimeAccel.GetDiagIDByCategory(bit), on);
1236  }
1237  }
1238 #endif
1239 }
ItemBase
Definition: inventoryitem.c:730
Param2
Definition: ppeconstants.c:66
GetGame
proto native CGame GetGame()
CALL_CATEGORY_SYSTEM
const int CALL_CATEGORY_SYSTEM
Definition: tools.c:8
BleedingIndicationConstants
Definition: bleedingindicationconstants.c:1
LogManager
Definition: debug.c:734
SoftSkillsManager
Definition: softskillsmanager.c:1
DiagMenu
Definition: endebug.c:232
TStringArray
array< string > TStringArray
Definition: enscript.c:685
AnalyticsManagerServer
Definition: analyticsmanagerserver.c:1
CarScript
Definition: civiliansedan.c:1
Print
proto void Print(void var)
Prints content of variable to console/log.
CachedObjectsParams
Definition: utilityclasses.c:9
UiHintPanel
void UiHintPanel(Widget parent_widget)
Definition: uihintpanel.c:30
Param3
Definition: entityai.c:95
PluginBase
Definition: pluginadminlog.c:1
ErrorEx
enum ShapeType ErrorEx
DebugActionType
DebugActionType
Definition: plugindiagmenu.c:6
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition: pluginmanager.c:316
Serializer
Serialization general interface. Serializer API works with:
Definition: serializer.c:55
OnRPC
void OnRPC(ParamsReadContext ctx)
Definition: displaystatus.c:216
DiagMenuIDs
DiagMenuIDs
Definition: ediagmenuids.c:1
PlayerBase
Definition: playerbaseclient.c:1
map
map
Definition: controlsxboxnew.c:3
PLAYER_AGENTS
@ PLAYER_AGENTS
Definition: plugindiagmenu.c:9
UNLIMITED_AMMO
@ UNLIMITED_AMMO
Definition: plugindiagmenu.c:10
PluginLifespan
void PluginLifespan()
Definition: pluginlifespan.c:45
EnumTools
Definition: enconvert.c:589
DamageType
DamageType
exposed from C++ (do not change)
Definition: damagesystem.c:10
g_Game
DayZGame g_Game
Definition: dayzgame.c:3727
GENERIC_ACTIONS
@ GENERIC_ACTIONS
Definition: plugindiagmenu.c:8
array< string >
PrtTest
Definition: gameplay.c:1496
ERPCs
ERPCs
Definition: erpcs.c:1
OnInit
void OnInit()
Definition: aibehaviour.c:49
Class
Super root of all classes in Enforce script.
Definition: enscript.c:10
PluginDiagMenu
Definition: plugindiagmenu.c:29
OnDestroy
override void OnDestroy()
Definition: plugindayzcreatureaidebug.c:113
EntityAI
Definition: building.c:5