9 static int m_SystemsMask;
12 bool m_ModifiersDisabled;
14 bool m_StaminaDisabled;
18 bool m_LogPlayerStats;
19 Shape m_VehicleFreeAreaBox;
20 ref EnvDebugData m_EnvDebugData;
21 ref FallDamageDebugData m_FallDamageDebugData;
30 protected void BindCallbacks()
231 super.OnRPC(player, rpc_type, ctx);
235 case ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA:
238 m_EnvDebugData =
new EnvDebugData();
240 ctx.
Read(m_EnvDebugData);
244 case ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA:
246 if (!m_FallDamageDebugData)
247 m_FallDamageDebugData =
new FallDamageDebugData();
249 ctx.
Read(m_FallDamageDebugData);
253 case ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_CONTENTS:
255 Param1<array<ref CrashDebugData>> par =
new Param1<array<ref CrashDebugData>>(null);
258 CrashDebugData.DumpDataArray(par.param1);
265 override void OnUpdate(
float delta_time)
267 super.OnUpdate(delta_time);
277 UpdateMiscVehicleGetOutBox();
278 UpdateEnvironmentDebug();
283 void CheckTimeAccel()
285 if (!FeatureTimeAccel.m_CurrentTimeAccel)
292 TimeAccelParam param = GetTimeAccelMenuState();
294 if (!FeatureTimeAccel.AreTimeAccelParamsSame(param, FeatureTimeAccel.m_CurrentTimeAccel))
296 int timeAccelBig = param.param2;
297 float timeAccelSmall = param.param2 - timeAccelBig;
298 FeatureTimeAccel.CopyTimeAccelClipboard(param.param1, timeAccelBig, timeAccelSmall, param.param3 );
300 FeatureTimeAccel.m_CurrentTimeAccel = param;
307 static void CBCraftingGenerate(
bool enabled,
int id)
309 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
310 DiagButtonAction(enabled,
id,
ScriptCaller.Create(pluginRecipesManager.CallbackGenerateCache));
314 static void CBCraftingInstant(
bool enabled)
316 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
317 DiagToggleRPC(enabled, pluginRecipesManager.IsEnableDebugCrafting(),
ERPCs.DIAG_CRAFTING_INSTANT);
321 static void CBCraftingDump(
bool enabled,
int id)
323 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
324 DiagButtonAction(enabled,
id,
ScriptCaller.Create(pluginRecipesManager.GenerateHumanReadableRecipeList));
328 static void CBCheatsModifiers(
bool enabled)
331 DiagToggleRPCServer(enabled, pluginDiag.m_ModifiersDisabled,
ERPCs.DIAG_CHEATS_MODIFIERS);
335 static void CBCheatsKillPlayer(
bool enabled,
int id)
337 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_KILL_PLAYER,
true);
341 static void CBCheatsInvincibility(
int value)
344 DiagToggleRPCServer(value, pluginDiag.m_IsInvincible,
ERPCs.DIAG_CHEATS_INVINCIBILITY);
348 static void CBCheatsStaminaDisable(
bool enabled)
351 DiagToggleRPCServer(enabled, pluginDiag.m_StaminaDisabled,
ERPCs.DIAG_CHEATS_DISABLE_STAMINA);
355 static void CBCheatsResetPlayer(
bool enabled,
int id)
359 player.ResetPlayer(
false);
360 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_RESET_PLAYER,
true);
364 static void CBCheatsResetPlayerMax(
bool enabled,
int id)
368 player.ResetPlayer(
true);
369 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_RESET_PLAYER_MAX,
true);
373 static void CBCheatsInventoryAccess(
bool enabled)
375 DiagToggleRPCServer(enabled,
PlayerBase.DEBUG_INVENTORY_ACCESS,
ERPCs.DIAG_CHEATS_INVENTORY_ACCESS);
379 static void CBCheatsFixItems(
bool enabled,
int id)
381 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_ITEMS_FIX,
true);
385 static void CBPlayerAgentsInjectActions(
bool enabled)
391 static void CBSoftSkillsShowDebug(
bool enabled)
398 static void CBSoftSkillsToggleState(
bool enabled)
405 static void CBSoftSkillsToggleModel(
bool enabled)
408 DiagToggleRPC(enabled, ssMngr.
IsLinear(),
ERPCs.DIAG_SOFT_SKILLS_TOGGLE_MODEL);
412 static void CBSoftSkillsSpecialtyValue(
float value)
419 static void CBLifespanBloodyHands(
bool enabled)
423 DiagToggleRPCServer(enabled, player.HasBloodyHands(),
ERPCs.DIAG_LIFESPAN_BLOODY_HANDS);
427 static void CBLifespanPlaytimeUpdate(
float value)
430 DiagToggleRPCServer(value * 60, pluginDiag.m_Playtime,
ERPCs.DIAG_LIFESPAN_PLAYTIME_UPDATE);
434 static void CBMiscPersonalLight(
bool enabled)
441 static void CBMiscItemDebugActions(
bool enabled)
447 static void CBMiscLogPlayerStats(
bool enabled)
450 DiagToggleRPC(enabled, pluginDiag.m_LogPlayerStats,
ERPCs.DIAG_MISC_LOG_PLAYER_STATS);
454 static void CBMiscPermanentCrossHair(
bool enabled)
456 PluginPermanentCrossHair crosshair = PluginPermanentCrossHair.Cast(
GetPlugin(PluginPermanentCrossHair));
457 crosshair.SwitchPermanentCrossHair(enabled);
461 void UpdateMiscVehicleGetOutBox()
465 if (m_VehicleFreeAreaBox)
467 m_VehicleFreeAreaBox.Destroy();
468 m_VehicleFreeAreaBox = null;
477 else if (m_VehicleFreeAreaBox)
479 m_VehicleFreeAreaBox.Destroy();
480 m_VehicleFreeAreaBox = null;
485 static void CBMiscToggleHud(
bool enabled)
500 static void CBMiscEnvironmentDebug(
bool enabled)
502 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG);
505 void UpdateEnvironmentDebug()
508 Environment.DisplayEnvDebugPlayerInfo(
true, m_EnvDebugData);
509 else if (m_EnvDebugData)
510 m_EnvDebugData = null;
513 static void CBMiscEnvironmentLoggingDryWet(
bool enabled)
515 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_DRYWET);
518 static void CBMiscFallDamageDebug(
bool enabled)
520 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG);
523 void UpdateFallDamageDebug()
527 else if (m_FallDamageDebugData)
528 m_FallDamageDebugData = null;
532 static void CBMiscDisplayPlayerInfo(
int value)
534 PluginRemotePlayerDebugClient prpdc = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
539 static void CBMiscUniversalTemperatureSources(
bool enabled)
546 static void CBMiscBulletImpact(
bool enabled,
int id)
555 static void CBMiscGoUnconscious(
bool enabled,
int id)
557 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_MISC_GO_UNCONSCIOUS,
true);
561 static void CBMiscGoUnconsciousDelayed(
bool enabled,
int id)
563 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_MISC_GO_UNCONSCIOUS_DELAYED,
true);
567 static void CBMiscQuickRestrain(
bool enabled)
570 DiagToggleRPC(enabled, player.IsQuickRestrain(),
ERPCs.DIAG_MISC_QUICK_RESTRAIN);
574 static void CBMiscHairHide(
bool enabled,
int id)
577 DiagButtonRPCIntInt(enabled,
id, value, enabled,
ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE,
true);
581 static void CBMiscHairHideAll(
bool enabled)
590 static void CBMiscCamShake(
bool enabled,
int id)
593 DiagButtonAction(enabled,
id,
ScriptCaller.Create(cam.SpawnDiagCameraShake));
597 static void CBMiscQuickFishing(
bool enabled)
600 DiagToggleRPC(enabled, player.IsQuickFishing(),
ERPCs.DIAG_MISC_QUICK_FISHING);
604 static void CBMiscShockImpact(
bool enabled,
int id)
606 DiagButtonAction(enabled,
id,
ScriptCaller.Create(ShockImpact));
609 static void ShockImpact()
611 static float intensity;
616 player.SpawnShockEffect(intensity);
620 static void CBMiscPlugArrows(
bool enabled)
622 GetGame().EnableEMPlugs(enabled);
626 static void CBMiscTargetableByAI(
bool enabled,
int id)
630 DiagToggleRPC(enabled, player.m_CanBeTargetedDebug,
ERPCs.DIAG_MISC_TARGETABLE_BY_AI);
634 static void CBMiscHitIndication()
664 static void CBMiscHitIndicationSpawnHit(
bool enabled,
int id)
666 DiagButtonAction(enabled,
id,
ScriptCaller.Create(SpawnHitDirEffect));
669 static void SpawnHitDirEffect()
676 static void CBMiscFreezeEntity(
bool enabled,
int id)
678 DiagButtonAction(enabled,
id,
ScriptCaller.Create(FreezeEntity));
681 static void FreezeEntity()
697 FreeDebugCamera camera = FreeDebugCamera.GetInstance();
698 entity =
EntityAI.Cast(camera.GetCrosshairObject());
702 entity.DisableSimulation(!entity.GetIsSimulationDisabled());
706 static void CBVehicleDebugOutput(
int value)
712 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED;
716 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.DAMAGE_CONSIDERED;
720 bitValue = EVehicleDebugOutputType.CONTACT;
724 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.CONTACT;
726 SendDiagRPC(bitValue,
ERPCs.DIAG_VEHICLE_DEBUG_OUTPUT,
true);
730 static void CBDumpCrashData(
bool value)
734 SendDiagRPC(
true,
ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST,
true);
742 static void SimulateMode(
bool enabled,
int id,
int rpc)
750 DiagButtonRPC(enabled,
id, rpc,
true);
755 DiagButtonRPCSelf(enabled,
id, rpc);
760 DiagButtonRPC(enabled,
id, rpc,
true);
761 DiagButtonRPCSelf(enabled,
id, rpc);
768 static void CBSimulateInfiniteLoop(
bool enabled,
int id)
770 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_INFINITE_LOOP);
774 static void CBSimulateNullPointer(
bool enabled,
int id)
776 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_NULL_POINTER);
780 static void CBSimulateDivisionByZero(
bool enabled,
int id)
782 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_DIVISION_BY_ZERO);
786 static void CBSimulateErrorFunction(
bool enabled,
int id)
788 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_ERROR_FUNCTION);
792 static void CBWeaponParticles(
bool enabled)
798 static void CBWeaponDebug(
bool enabled)
801 DiagToggleAction(enabled,
ScriptCaller.Create(player.ShowWeaponDebug), player.IsWeaponDebugEnabled());
805 static void CBWeaponAimNoise(
bool enabled)
816 static void CBWeaponRecoil(
bool enabled)
827 static void CBWeaponUnlimitedAmmo(
bool enabled)
833 static void CBWeaponBurstVersion(
int value)
837 DiagToggleRPC(value, wpnMngr.GetBurstOption(),
ERPCs.DIAG_WEAPON_BURST_VERSION);
841 static void CBBleedingSources(
bool enabled)
844 player.GetBleedingManagerRemote().SetDiag(enabled);
848 static void CBBleedingDisableBloodLoss(
bool enabled)
850 SendDiagRPC(enabled,
ERPCs.DIAG_BLEEDING_DISABLE_BLOOD_LOSS,
true);
854 static void CBBleedingActivateSource(
int value)
856 SendDiagRPC(value,
ERPCs.DIAG_BLEEDING_ACTIVATE_SOURCE,
true);
860 static void CBBleedingActivateAllSources(
bool enabled,
int id)
862 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_BLEEDING_ACTIVATE_ALL_SOURCES,
true);
866 static void CBBleedingActivateSourceLevel(
int value)
878 bone =
"lefttoebase";
892 for (
int i = 0; i < count; ++i)
902 CBBleedingActivateSource(idx);
906 static void CBBleedingReload(
bool enabled,
int id)
909 BleedingSourcesManagerRemote bsMngrRem = player.GetBleedingManagerRemote();
910 DiagButtonAction(enabled,
id,
ScriptCaller.Create(bsMngrRem.Reload));
914 static void CBBBleedingIndicators()
921 if (player && player.GetBleedingManagerRemote())
923 player.GetBleedingManagerRemote().Reload();
955 static void CBLogsActions(
bool enabled)
961 static void CBLogsWeapons(
bool enabled)
967 static void CBLogsSymptoms(
bool enabled)
973 static void CBLogsInventoryMove(
bool enabled)
979 static void CBLogsInventoryReservation(
bool enabled)
985 static void CBLogsInventoryHFSM(
bool enabled)
991 static void CBTriggerDebug(
bool enabled)
993 EnableDebugSystemClient(ESubscriberSystems.TRIGGERS, enabled);
997 static void CBBaseBuildingWood(
bool enabled)
999 SendDiagRPC(enabled,
ERPCs.DIAG_BASEBUILDING_WOOD,
true);
1003 static void CBBaseBuildingGate(
bool enabled)
1005 SendDiagRPC(enabled,
ERPCs.DIAG_BASEBUILDING_GATE,
true);
1009 static void CBFinishersFinisherForced(
int value)
1012 DiagToggleRPC(value - 1, player.GetMeleeCombat().DebugGetForcedFinisherType(),
ERPCs.DIAG_FINISHERS_FORCE_FINISHER);
1016 static void CBCameraToolsEnableRemoteCamera(
bool enabled)
1023 if (!enabled && player.m_CameraToolsMenuClient)
1025 player.m_CameraToolsMenuClient.DelayedDestroy();
1051 mask = (
ItemBase.GetDebugActionsMask() | type);
1055 mask = (
ItemBase.GetDebugActionsMask() & (~type));
1064 static void EnableDebugSystemClient(ESubscriberSystems system,
bool enable)
1069 mask = (m_SystemsMask | system);
1073 mask = (m_SystemsMask & (~system));
1076 if (mask != m_SystemsMask)
1080 m_SystemsMask = mask;
1088 static void DiagButtonActionParams(
bool enabled,
int id,
ScriptCaller action,
Param params)
1092 action.Invoke(params);
1098 static void DiagButtonAction(
bool enabled,
int id,
ScriptCaller action)
1100 DiagButtonActionParams(enabled,
id, action, null);
1104 static void DiagButtonRPC(
bool enabled,
int id,
int rpc,
bool serverOnly =
false)
1107 SendDiagRPCBasicParam params =
new SendDiagRPCBasicParam(rpc, serverOnly);
1109 DiagButtonActionParams(enabled,
id, action, params);
1113 static void DiagButtonRPCSelf(
bool enabled,
int id,
int rpc)
1116 SendDiagRPCSelfBasicParam params =
new SendDiagRPCSelfBasicParam(rpc);
1118 DiagButtonActionParams(enabled,
id, action, params);
1122 static void DiagButtonRPCIntInt(
bool enabled,
int id,
int value,
int value2,
int rpc,
bool serverOnly =
false)
1130 DiagButtonActionParams(enabled,
id, action, params);
1134 static void DiagToggleRPC(
bool value,
int current,
int rpc)
1136 if (value != current)
1138 SendDiagRPC(value, rpc,
false);
1143 static void DiagToggleRPC(
int value,
int current,
int rpc)
1145 if (value != current)
1147 SendDiagRPC(value, rpc,
false);
1152 static void DiagToggleRPC(
float value,
int current,
int rpc)
1154 if (value != current)
1156 SendDiagRPC(value, rpc,
false);
1161 static void DiagToggleRPCServer(
bool value, out
bool current,
int rpc)
1163 if (value != current)
1166 SendDiagRPC(value, rpc,
true);
1171 static void DiagToggleRPCServer(
int value, out
int current,
int rpc)
1173 if (value != current)
1176 SendDiagRPC(value, rpc,
true);
1181 static void DiagToggleRPCServer(
float value, out
float current,
int rpc)
1183 if (value != current)
1186 SendDiagRPC(value, rpc,
true);
1191 static void DiagToggleRPCAction(
int value,
ScriptCaller action,
int current,
int rpc)
1193 if (value != current)
1195 SendDiagRPC(value, rpc);
1196 action.Invoke(value);
1201 static void DiagToggleAction(
int value,
ScriptCaller action,
int current)
1203 if (value != current)
1205 action.Invoke(value);
1210 static void SendDiagRPCSelf(
Param value,
int rpc)
1220 static void SendDiagRPCSelfBasic(SendDiagRPCSelfBasicParam param)
1222 SendDiagRPCSelf(null, param.param1);
1226 static void SendDiagRPCSelfParam(SendDiagRPCSelfParamParam param)
1228 SendDiagRPCSelf(param.param2, param.param1);
1232 static void SendDiagRPC(
Param value,
int rpc,
bool serverOnly =
false)
1238 if (
GetGame().IsMultiplayer() && playerIdentity)
1243 if (!
GetGame().IsMultiplayer() || !serverOnly)
1245 SendDiagRPCSelf(value, rpc);
1251 static void SendDiagRPCBasic(SendDiagRPCBasicParam param)
1253 SendDiagRPC(null, param.param1, param.param2);
1257 static void SendDiagRPCParam(SendDiagRPCParamParam param)
1259 SendDiagRPC(param.param3, param.param1, param.param2);
1263 static void SendDiagRPC(
int rpc,
bool serverOnly =
false)
1265 SendDiagRPC(null, rpc, serverOnly);
1269 static void SendDiagRPC(
bool value,
int rpc,
bool serverOnly =
false)
1276 static void SendDiagRPC(
int value,
int rpc,
bool serverOnly =
false)
1283 static void SendDiagRPC(
float value,
int rpc,
bool serverOnly =
false)
class RecipeCacheData int
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
PluginBase GetPlugin(typename plugin_type)
ref map< string, ref BleedingSourceZone > m_BleedingSourceZone
proto native Mission GetMission()
void RPCSelfSingleParam(Object target, int rpcType, Param param)
proto native DayZPlayer GetPlayer()
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
static ref Param2< int, int > PARAM2_INT_INT
static ref Param1< bool > PARAM1_BOOL
static ref Param1< float > PARAM1_FLOAT
static ref Param2< float, float > PARAM2_FLOAT_FLOAT
static ref Param1< int > PARAM1_INT
static bool GetHitIndicationPPEEnabled()
bool IsProceduralRecoilEnabled()
void SetAimNoiseAllowed(bool state)
static info (non-constants)
static float m_DbgDropStartSize
static float m_DbgDropSlideDistance
static int m_DbgDropColorRed
static int m_DbgDropScatter
static int m_DbgDropColorGreen
static float m_DbgDropSizeVariationMax
static float m_DbgSequenceDuration
static bool m_DbgDropRotationRandom
static float m_DbgDropMinDelay
static int m_DbgDropColorAlphaEnd
static float m_DbgDropSizeVariationMin
static int m_DbgDropColorAlphaStart
static bool m_DbgDropDesaturate
static bool m_DbgEnableBleedingIndication
static float m_DbgDropEndSize
static float m_DbgDesaturationEnd
static int m_DbgDropColorBlue
static float m_DbgDropProgressTreshold
static float m_DbgDropDurationBase
static float m_DbgDropMaxDelay
static bool m_DbgUseOverrideValues
static float m_BreakPointBase
static float m_DurationMax
static int m_RotationOverride
static void CheckValues()
range 0..180, randomized offset of direction to make it less acurate
static float m_DistanceAdjust
range 0..1, a point where the fading starts
void SpawnHitDirEffect(DayZPlayer player, float hit_direction, float intensity_max)
proto native Transport GetTransport()
proto native int GetVehicleSeat()
static bool IsInventoryHFSMLogEnable()
static bool IsInventoryMoveLogEnable()
static bool IsWeaponLogEnable()
static bool IsActionLogEnable()
static bool IsInventoryReservationLogEnable()
static bool IsSymptomLogEnable()
void RefreshCrosshairVisibility()
void HideCrosshairVisibility()
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
The class that will be instanced (moddable)
void PluginUniversalTemperatureSourceClient()
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
void PluginSceneManager()
static bool m_GunParticlesState
Serialization general interface. Serializer API works with:
proto bool Read(void value_in)
bool GetSoftSkillsState()
void CreateDebugWindow(bool create)
float GetSpecialtyLevel()
override Shape DebugFreeAreaAtDoor(int currentSeat, float maxAllowedObjHeight=0.5, float horizontalExtents=0.5, float playerHeight=1.7)
class DayZPlayerCameraResult DayZPlayerCamera(DayZPlayer pPlayer, HumanInputController pInput)
proto native CGame GetGame()
static proto float WrapFloat(float f, float min, float max)
Returns wrap number to specified interval [min, max[.