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