9 proto native
int GetVariableCount();
10 proto native owned
string GetVariableName(
int index);
11 proto native
int GetVariableType(
int index);
12 proto native
int GetVariableInt(
int index);
13 proto native
float GetVariableFloat(
int index);
14 proto native
bool GetVariableBool(
int index);
16 proto native
int SetVariableInt(
int index,
int value);
17 proto native
float SetVariableFloat(
int index,
float value);
18 proto native
bool SetVariableBool(
int index,
bool value);
20 proto native
int GetCommandCount();
21 proto native owned
string GetCommandName(
int index);
22 proto native
int GetCommandID(
int index);
24 proto native
void ActivateCommand(
int index,
int userInt,
float userFloat);
26 const int m_iMaxAnimEventsCount = 50;
33 void OnAnimationEventsStart()
35 m_AnimPredictions.Clear();
39 void OnAnimationEvent(
string evType,
int userInt,
string userString)
41 if (m_EventsFilter.Find(evType) != -1)
48 if (m_AnimEvents.Count() > m_iMaxAnimEventsCount)
50 m_AnimEvents.Remove(m_AnimEvents.Count() - 1);
54 void OnAnimationPrediction(
string predName)
59 void OnAnimationTag(
string tagName)
65enum PluginDayZCreatureAIDebugSyncMessageType
127 override void OnUpdate(
float delta_time)
129 if (!
GetGame().IsDedicatedServer())
142 strVal = valInt.ToString();
146 strVal = valFloat.ToString();
174 strValType =
"float";
202 for (
int idxVar = 0; idxVar < toAddCount; idxVar++)
211 for (
int idxCmd = 0; idxCmd < toAddCount; idxCmd++)
256 #ifdef DIAG_DEVELOPER
257 creatureAI.DebugRestoreAIControl();
262 #ifdef DIAG_DEVELOPER
263 creatureAI.DebugDisableAIControl();
277 for (
int i=0; i < varCount; i++)
279 DbgUI.BeginCleanupScope();
281 DbgUI.EndCleanupScope();
287 const int INPUT_BOX_SIZE = 35;
289 DbgUI.PushID_Str(
"VariablesEdit");
292 for (
int i=0; i < varCount; i++)
294 DbgUI.BeginCleanupScope();
299 DbgUI.Check(
"", result);
303 bool setButtonPressed =
DbgUI.Button(
"Set");
320 DbgUI.EndCleanupScope();
328 const int INPUT_BOX_SIZE = 35;
330 DbgUI.PushID_Str(
"CommandsEdit");
332 for (
int i=0; i < cmdCount; i++)
334 DbgUI.BeginCleanupScope();
339 DbgUI.Check(
"", result);
343 bool setButtonPressed =
DbgUI.Button(
"Set");
347 DbgUI.InputText(
"int", strUserInt, INPUT_BOX_SIZE);
351 DbgUI.InputText(
"float", strUserFloat, INPUT_BOX_SIZE);
363 DbgUI.EndCleanupScope();
371 bool buttonPressed =
false;
374 buttonPressed =
DbgUI.Button(
"Disable AI");
378 buttonPressed =
DbgUI.Button(
"Enable AI");
393 if (
DbgUI.Button(
"Bulk set"))
401 DbgUI.PushID_Str(
"AnimEvents");
403 const int panelMinSizeX = 350;
405 DbgUI.Panel(
"MinimumSize", panelMinSizeX, 1);
408 for (
int tagIdx = 0; tagIdx <
m_EntityAnimDbg.m_AnimTags.Count(); ++tagIdx)
416 string strPredictions;
417 for (
int predIdx = 0; predIdx <
m_EntityAnimDbg.m_AnimPredictions.Count(); ++predIdx)
420 strPredictions +=
", ";
425 DbgUI.PushID_Str(
"AnimTagsDisplay");
429 DbgUI.PushID_Str(
"AnimPredictionsDisplay");
430 DbgUI.Text(strPredictions);
434 DbgUI.InputText(
"Filter", strFilter, panelMinSizeX);
439 DbgUI.Button(
"TakeMyFocus");
441 const int evDisplayCount = 15;
444 for (
int evIdx = 0; evIdx < evToDisplayCount; ++evIdx)
446 DbgUI.PushID_Int(evIdx);
465 DbgUI.BeginCleanupScope();
473 DbgUI.Text(
"Capturing...");
477 if (
DbgUI.Button(
"Capture"))
484 DbgUI.Begin(
"CreatureAI EditMenu");
487 DbgUI.Begin(
"CreatureAI AnimEvents");
496 bool btnReleasePressed =
DbgUI.Button(
"Release");
501 #ifdef _DAYZ_CREATURE_DEBUG_SHADOW
502 if (!
GetGame().IsMultiplayer())
505 if (
DbgUI.Button(
"CreateShadow"))
507 GUIAction_CreateShadow();
512 if (!
GetGame().IsMultiplayer())
514 const int simLODInputSize = 20;
516 DbgUI.InputInt(
"SimLOD", simLOD, simLODInputSize);
518 if (
DbgUI.Button(
"UpdateSimulationPrecision"))
524 if (btnReleasePressed)
552 DbgUI.EndCleanupScope();
585 m_TickTimer.Run(0.1,
this,
"OnGUITimer", NULL,
true);
600 const float MAX_RAYCAST_RANGE = 1000;
608 vector to = pos + (dir * MAX_RAYCAST_RANGE);
611 int contact_component;
612 set<Object> objects =
new set<Object>;
616 for (
int i = 0; i < objects.Count(); i++ )
618 Object obj = objects.Get(i);
643 #ifdef _DAYZ_CREATURE_DEBUG_SHADOW
644 void GUIAction_CreateShadow()
670 int intValue = strVal.ToInt();
681 float floatValue = strVal.ToFloat();
694 if (strVal.Contains(
"true"))
698 else if (strVal.Contains(
"false"))
704 boolValue = (
bool)strVal.ToInt();
753 Param1<int> paramCount =
new Param1<int>(count);
764 if (rpc_type ==
ERPCs.DEV_RPC_PLUGIN_DZCREATURE_DEBUG)
772 Param1<int> count =
new Param1<int>(0);
776 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.COUNT);
777 for (
int i=0; i < count.param1; ++i)
783 case PluginDayZCreatureAIDebugSyncMessageType.INIT_DEBUG_OBJECT:
786 case PluginDayZCreatureAIDebugSyncMessageType.RELEASE_DEBUG_OBJECT:
789 case PluginDayZCreatureAIDebugSyncMessageType.SET_VALUE_INT:
792 case PluginDayZCreatureAIDebugSyncMessageType.SET_VALUE_FLOAT:
795 case PluginDayZCreatureAIDebugSyncMessageType.SET_VALUE_BOOL:
798 case PluginDayZCreatureAIDebugSyncMessageType.ACTIVATE_COMMAND:
801 case PluginDayZCreatureAIDebugSyncMessageType.ENABLE_AI:
804 case PluginDayZCreatureAIDebugSyncMessageType.DISABLE_AI:
809 type.param1 = PluginDayZCreatureAIDebugSyncMessageType.COUNT;
816 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.INIT_DEBUG_OBJECT);
817 Param1<Object>
object =
new Param1<Object>(obj);
825 Param1<Object>
object =
new Param1<Object>(NULL);
826 if (ctx.Read(
object))
834 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.RELEASE_DEBUG_OBJECT);
846 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.SET_VALUE_INT);
857 if (ctx.Read(paramValue))
865 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.SET_VALUE_FLOAT);
876 if (ctx.Read(paramValue))
884 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.SET_VALUE_BOOL);
895 if (ctx.Read(paramValue))
903 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.ACTIVATE_COMMAND);
914 if (ctx.Read(command))
922 Param1<int> type =
new Param1<int>(PluginDayZCreatureAIDebugSyncMessageType.COUNT);
925 type.param1 = PluginDayZCreatureAIDebugSyncMessageType.ENABLE_AI;
929 type.param1 = PluginDayZCreatureAIDebugSyncMessageType.DISABLE_AI;
do not process rotations !
Plugin interface for controlling of agent pool system.
Serialization general interface. Serializer API works with:
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
DayZCreatureAnimScriptDebugVarType
proto native CGame GetGame()
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
proto native float GetWorldTime()
ref array< bool > m_SetCommandCheckStates
Param4< float, string, int, string > DayZCreatureAnimScriptDebugAnimEventData
class DayZCreatureAnimScriptDebug SET_VALUE_INT
ref DayZCreatureAnimScriptDebug m_EntityAnimDbg
string GetStrValueType(int index)
Param1< string > DayZCreatureAnimScriptDebugAnimPredictionData
class DayZCreatureAnimScriptDebug ACTIVATE_COMMAND
void SyncReceiveDisableAI(ParamsReadContext ctx)
void PluginDayZCreatureAIDebug()
class DayZCreatureAnimScriptDebug INIT_DEBUG_OBJECT
void GUIAction_ActivateCommand(int commandIdx, int userInt, float userFloat)
Param1< string > DayZCreatureAnimScriptDebugAnimTagData
void SyncSetValueBool(int index, bool value)
class DayZCreatureAnimScriptDebug SET_VALUE_BOOL
void OnRpc(PlayerBase player, int rpc_type, ParamsReadContext ctx)
string GetStrValue(int index)
class DayZCreatureAnimScriptDebug RELEASE_DEBUG_OBJECT
void SetDebugShowMode(int mode)
void SetValueInt(int index, int value)
void ActivateCommand(int commandIdx, int userInt, float userFloat)
void ~PluginDayZCreatureAIDebug()
void GUIAction_InitDebugObject(Object obj)
void SyncSetValueInt(int index, int value)
void GUIAction_SetValue(int index, string strVal)
void SetValueFloat(int index, float value)
DayZCreatureAI m_DebugEntity
void EnableAI(bool enable)
void SetValueBool(int index, bool value)
void SyncInitDebugObject(Object obj)
class DayZCreatureAnimScriptDebug SET_VALUE_FLOAT
void SyncReceiveInitDebugObject(ParamsReadContext ctx)
class DayZCreatureAnimScriptDebug ENABLE_AI
class DayZCreatureAnimScriptDebug m_iDebugMenu
DayZCreatureAnimScriptDebugVarType GetVariableType(int index)
void ReleaseDebugObject()
void SyncEnableAI(bool enable)
override void OnDestroy()
void SyncReceiveReleaseDebugObject(ParamsReadContext ctx)
void OnGUI_VariablesEdit()
void SyncReceiveEnableAI(ParamsReadContext ctx)
void InitDebugObject(Object obj)
void SyncActivateCommand(int commandIdx, int userInt, float userFloat)
void OnGUI_CommandsEdit()
string m_sDebugEntityName
void SyncReceiveValueInt(ParamsReadContext ctx)
void GUIAction_UpdateSimulationPrecision(int simLOD)
void GUIAction_ReleaseDebugObject()
void OnGUI_AIControlEdit()
void SyncReceiveValueFloat(ParamsReadContext ctx)
void SyncReceiveMessage(ParamsReadContext ctx)
void SyncReleaseDebugObject()
ref array< ref Param > m_SyncMessages
ref array< bool > m_SetVariableCheckStates
void SyncReceiveValueBool(ParamsReadContext ctx)
void SyncReceiveActivateCommand(ParamsReadContext ctx)
void GUIAction_EnableAI(bool enable)
void SyncSetValueFloat(int index, float value)
class DayZCreatureAnimScriptDebug DISABLE_AI
class PresenceNotifierNoiseEvents windowPosX
dbgUI settings