DayZ Scripts
PC Stable Documentation
 
Loading...
Searching...
No Matches
CGame Class Reference

Private Member Functions

void DayZGame ()
 
private void ~DayZGame ()
 
void DeferredInit ()
 
void GlobalsInit ()
 
void RegisterProfilesOptions ()
 
void ResetProfileOptions ()
 
void SetMissionPath (string path)
 Called from C++.
 
string GetMissionPath ()
 
string GetMissionFolderPath ()
 
override ScriptCallQueue GetCallQueue (int call_category)
 
override ScriptInvoker GetUpdateQueue (int call_category)
 
override ScriptInvoker GetPostUpdateQueue (int call_category)
 
ScriptInvoker GetYieldDataInitInvoker ()
 
override TimerQueue GetTimerQueue (int call_category)
 
override DragQueue GetDragQueue ()
 
void OnGameplayDataHandlerLoad ()
 
int GetMissionState ()
 
void SetMissionState (int state)
 
bool GetProfileOption (EDayZProfilesOptions option)
 
bool GetProfileOptionBool (EDayZProfilesOptions option)
 
int GetProfileOptionInt (EDayZProfilesOptions option)
 
float GetProfileOptionFloat (EDayZProfilesOptions option)
 
bool GetProfileOptionDefault (EDayZProfilesOptions option)
 
bool GetProfileOptionDefaultBool (EDayZProfilesOptions option)
 
int GetProfileOptionDefaultInt (EDayZProfilesOptions option)
 
float GetProfileOptionDefaultFloat (EDayZProfilesOptions option)
 
void SetProfileOption (EDayZProfilesOptions option, bool value)
 
void SetProfileOptionBool (EDayZProfilesOptions option, bool value)
 
void SetProfileOptionInt (EDayZProfilesOptions option, int value)
 
void SetProfileOptionFloat (EDayZProfilesOptions option, float value)
 
map< EDayZProfilesOptions, ref DayZProfilesOptionGetProfileOptionMap ()
 
bool IsStressTest ()
 
bool IsAimLogEnabled ()
 
void SetGameState (DayZGameState state)
 
DayZGameState GetGameState ()
 
void SetLoadState (DayZLoadState state)
 
DayZLoadState GetLoadState ()
 
Backlit GetBacklit ()
 
override bool IsInventoryOpen ()
 
void EarlyAccessDialog (UIScriptedMenu parent)
 
override UIScriptedMenu CreateScriptedMenu (int id)
 create custom main menu part (submenu)
 
void ReloadMission ()
 
void CancelLoginQueue ()
 
void CancelLoginTimeCountdown ()
 
private void ClearConnectivityStates ()
 
override void OnEvent (EventType eventTypeId, Param params)
 
void SetConnectivityStatState (EConnectivityStatType type, EConnectivityStatLevel level)
 
protected bool OnConnectivityStatChange (EConnectivityStatType type, EConnectivityStatLevel newLevel, EConnectivityStatLevel oldLevel)
 
void AddVoiceNotification (VONStopSpeakingEventParams vonStartParams)
 
void RemoveVoiceNotification (VONStopSpeakingEventParams vonStopParams)
 
void UpdateLoginQueue (float timeslice)
 
void OnLoginTimeEvent (int loginTime)
 
void LoginTimeCountdown ()
 
void OnRespawnEvent (int time)
 
void OnPreloadEvent (vector pos)
 
void StoreLoginDataPrepare ()
 
void EnterLoginQueue (UIMenuPanel parent)
 
void EnterLoginTime (UIMenuPanel parent)
 
void OnMPConnectionLostEvent (int duration)
 
void LoadProgressUpdate (int progressState, float progress, string title)
 
override void OnAfterCreate ()
 
override void OnActivateMessage ()
 
override void OnDeactivateMessage ()
 
override bool OnInitialize ()
 
void InitNotifications ()
 
string GetDatabaseID ()
 
void SetDatabaseID (string id)
 
void CreateTitleScreen ()
 
void DeleteTitleScreen ()
 
bool ShouldShowControllerDisconnect ()
 
void UpdateInputDeviceDisconnectWarning ()
 
void JoinLaunch ()
 
void ConnectLaunch ()
 
void PartyLaunch ()
 
void MainMenuLaunch ()
 
void MissionLaunch ()
 
void AutoTestLaunch (string param)
 
void SelectUser (int gamepad=-1)
 
void SetPreviousGamepad (int gamepad)
 
int GetPreviousGamepad ()
 
void GamepadCheck ()
 
void SelectGamepad ()
 
void TryConnect ()
 
bool GetLastVisitedServer (out string ip, out int port)
 
void AddVisitedServer (string ip, int port)
 
bool IsVisited (string ip, int port)
 
void RefreshCurrentServerInfo ()
 
void Connect ()
 
void DisconnectSessionScript (bool displayJoinError=false)
 
void DisconnectSessionEx (DisconnectSessionFlags flags)
 
void ConnectFromServerBrowser (string ip, int port, string password="")
 
void ConnectFromServerBrowserEx (string ip, int port, int steamQueryPort, string password="")
 
void ConnectFromJoin (string ip, int port)
 
void ConnectFromCLI ()
 
bool IsLeftCtrlDown ()
 
override void OnKeyPress (int key)
 
override void OnKeyRelease (int key)
 
override void OnMouseButtonPress (int button)
 
override void OnMouseButtonRelease (int button)
 
override void OnDeviceReset ()
 
float GetDeltaT ()
 
override void OnUpdate (bool doSim, float timeslice)
 
override void OnPostUpdate (bool doSim, float timeslice)
 
override void OnRPC (PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
 
void DelayedMidAirDetonation (float x, float y, float z)
 
void CheckDialogs ()
 
void SetConnecting (bool value)
 Returns true when connecting to server.
 
bool IsConnecting ()
 
bool IsLoading ()
 
void SetKeyboardHandle (UIScriptedMenu handler)
 
void LoadingShow ()
 
void LoadingHide (bool force=false)
 
override string CreateDefaultPlayer ()
 
override string CreateRandomPlayer ()
 
override TStringArray ListAvailableCharacters ()
 
void ExplosionEffectsEx (Object source, Object directHit, int componentIndex, float energyFactor, float explosionFactor, HitInfo hitInfo)
 
void ExplosionEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, float energyFactor, float explosionFactor, bool isWater, string ammoType)
 
void OnProjectileStopped (ProjectileStoppedInfo info)
 
void OnProjectileStoppedInTerrain (TerrainCollisionInfo info)
 
void OnProjectileStoppedInObject (ObjectCollisionInfo info)
 
void FirearmEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, vector exitPos, vector inSpeed, vector outSpeed, bool isWater, bool deflected, string ammoType)
 
void CloseCombatEffects (Object source, Object directHit, int componentIndex, string surface, vector pos, vector surfNormal, bool isWater, string ammoType)
 
void UpdateVoiceLevel (int level)
 
void InitCharacterMenuDataInfo (int menudata_count)
 
void SetPlayerGameName (string name)
 
string GetPlayerGameName ()
 
void SetNewCharacter (bool state)
 
bool IsNewCharacter ()
 
void SetUserFOV (float pFov)
 
float GetUserFOV ()
 
float GetFOVByZoomType (ECameraZoomType type)
 
void SetHudBrightness (float value)
 
float GetHUDBrightnessSetting ()
 
void SetEVValue (float value)
 
float GetCurrentEVValue ()
 
float GetPreviousEVValue ()
 
int GetCurrentDisplayLanguageIdx ()
 
bool IsWorldWetTempUpdateEnabled ()
 
bool IsFoodDecayEnabled ()
 
float GetFoodDecayModifier ()
 
array< intGetConnectedInputDeviceList ()
 
void SetMouseCursorDesiredVisibility (bool visible)
 
bool GetMouseCursorDesiredVisibility ()
 
bool CanDisplayMouseCursor ()
 extend as needed, only game focus and M&K setting (consoles only!) are checked natively
 
void RefreshMouseCursorVisibility ()
 
BillboardSetHandler GetBillboardHandler ()
 
void CreateGamepadDisconnectMenu ()
 
void DeleteGamepadDisconnectMenu ()
 
void CGame ()
 
private void ~CGame ()
 
proto native WorkspaceWidget GetWorkspace ()
 
proto native WorkspaceWidget GetLoadingWorkspace ()
 
void OnEvent (EventType eventTypeId, Param params)
 Called when some system event occur.
 
void OnProcessLifetimeChanged (int plmtype)
 
void OnLicenseChanged ()
 
void OnAfterCreate ()
 Called after creating of CGame instance.
 
void OnActivateMessage ()
 Called when recieving focus (windows)
 
void OnDeactivateMessage ()
 Called when loosing focus (windows)
 
bool OnInitialize ()
 Called once before game update loop starts, ret value indicates if init was done in scripts, otherwise it is done in the engine.
 
void OnDeviceReset ()
 Called when inputs is not possible (Steam overlay active or something), all internal script variables should be reset here!
 
void OnUpdate (bool doSim, float timeslice)
 Called on World update.
 
void OnPostUpdate (bool doSim, float timeslice)
 Called on World update after simulation of entities.
 
void OnKeyPress (int key)
 Called when key is pressed.
 
void OnKeyRelease (int key)
 Called when key is released.
 
void OnMouseButtonPress (int button)
 Called when mouse button is pressed.
 
void OnMouseButtonRelease (int button)
 Called when mouse button is released.
 
UIScriptedMenu CreateScriptedMenu (int id)
 create custom main menu part (submenu)
 
UIScriptedWindow CreateScriptedWindow (int id)
 create custom window part
 
void OnRPC (PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
 Called after remote procedure call is recieved for this object.
 
proto native void RequestExit (int code)
 Sets exit code and quits in the right moment.
 
proto native void RequestRestart (int code)
 Sets exit code and restart in the right moment.
 
proto native bool IsAppActive ()
 Returns if the application is focused on PC, returns true always on console.
 
proto bool GetHostAddress (out string address, out int port)
 Gets the server address. (from client)
 
proto owned string GetHostName ()
 Gets the server name. (from client)
 
proto GetServersResultRow GetHostData ()
 Gets the server data. (from client)
 
proto native int Connect (UIScriptedMenu parent, string IpAddress, int port, string password)
 Connects to IsServer.
 
proto native int ConnectLastSession (UIScriptedMenu parent, int selectedCharacter=-1)
 Connects to last success network session.
 
proto native void DisconnectSession ()
 Disconnects from current multiplayer session.
 
proto native void DisconnectSessionForce ()
 Forces disconnect from current multiplayer session even if not yet in the game.
 
proto native void GetProfileStringList (string name, out TStringArray values)
 Gets array of strings from profile variable.
 
proto bool GetProfileString (string name, out string value)
 Gets string from profile variable.
 
proto native void SetProfileStringList (string name, TStringArray values)
 Sets array of strings to profile variable.
 
proto native void SetProfileString (string name, string value)
 Sets string to profile variable.
 
proto native void SaveProfile ()
 Saves profile on disk.
 
proto void GetPlayerName (out string name)
 Gets current player name.
 
proto void GetPlayerNameShort (int maxLength, out string name)
 Gets current player name. If length of player name is grater than maxLength, then it is omitted and append ellipsis.
 
proto native void SetPlayerName (string name)
 Sets current player name.
 
proto native Entity CreatePlayer (PlayerIdentity identity, string name, vector pos, float radius, string spec)
 Assign player entity to client (in multiplayer)
 
proto native void SelectPlayer (PlayerIdentity identity, Object player)
 Selects player's controlled object.
 
proto void GetPlayerNetworkIDByIdentityID (int playerIdentityID, out int networkIdLowBits, out int networkIdHightBits)
 returns player's network id from identity id in out parameters
 
proto native Object GetObjectByNetworkId (int networkIdLowBits, int networkIdHighBits)
 Returns entity identified by network id.
 
proto native bool RegisterNetworkStaticObject (Object object)
 Static objects cannot be replicated by default (there are too many objects on the map). Use this method when you want to replicate some scripted variables. Cannot be called in object's constructor, because networking is not initialized yet.
 
proto native bool IsNetworkInputBufferFull ()
 Returns the state of the buffer for network inputs (UAInterface)
 
proto native void SelectSpectator (PlayerIdentity identity, string spectatorObjType, vector position)
 Creates spectator object (mostly cameras)
 
proto native void UpdateSpectatorPosition (vector position)
 Updates spectator position on server = position of network bubble.
 
proto native void SendLogoutTime (Object player, int time)
 Inform client about logout time (creates logout screen on specified client)
 
proto native void DisconnectPlayer (PlayerIdentity identity, string uid="")
 Destroy player info and disconnect.
 
proto native void AddToReconnectCache (PlayerIdentity identity)
 Add player to reconnect cache to be able to rejoin character still existing in the world.
 
proto native void RemoveFromReconnectCache (string uid)
 Remove player from reconnect cache.
 
proto native void ClearReconnectCache ()
 Remove all player from reconnect cache.
 
proto native void StorageVersion (int iVersion)
 Set actual storage version - for next save.
 
proto native int LoadVersion ()
 Returns actual storage version - loading.
 
proto native int SaveVersion ()
 Returns actual storage version - saving.
 
proto native float GetDayTime ()
 Returns current daytime on server.
 
proto bool ConfigGetText (string path, out string value)
 Get string value from config on path.
 
proto bool ConfigGetTextRaw (string path, out string value)
 Get raw string value from config on path.
 
string ConfigGetTextOut (string path)
 Get string value from config on path.
 
bool FormatRawConfigStringKeys (inout string value)
 Changes localization key format to script-friendly format.
 
string GetModelName (string class_name)
 Get name of the p3d file of the given class name.
 
proto native float ConfigGetFloat (string path)
 Get float value from config on path.
 
proto native vector ConfigGetVector (string path)
 Get vector value from config on path.
 
proto native int ConfigGetInt (string path)
 Get int value from config on path.
 
proto native int ConfigGetType (string path)
 Returns type of config value.
 
proto native void ConfigGetTextArray (string path, out TStringArray values)
 Get array of strings from config on path.
 
proto native void ConfigGetTextArrayRaw (string path, out TStringArray values)
 Get array of raw strings from config on path.
 
proto native void ConfigGetFloatArray (string path, out TFloatArray values)
 Get array of floats from config on path.
 
proto native void ConfigGetIntArray (string path, out TIntArray values)
 Get array of integers from config on path.
 
proto bool ConfigGetChildName (string path, int index, out string name)
 Get name of subclass in config class on path.
 
proto bool ConfigGetBaseName (string path, out string base_name)
 Get name of base class of config class on path.
 
proto native int ConfigGetChildrenCount (string path)
 Get count of subclasses in config class on path.
 
proto native bool ConfigIsExisting (string path)
 
proto native void ConfigGetFullPath (string path, out TStringArray full_path)
 
proto native void ConfigGetObjectFullPath (Object obj, out TStringArray full_path)
 
proto native void GetModInfos (notnull out array< ref ModInfo > modArray)
 
proto native bool GetModToBeReported ()
 
string ConfigPathToString (TStringArray array_path)
 Converts array of strings into single string.
 
proto bool CommandlineGetParam (string name, out string value)
 Get command line parameter value.
 
proto native void CopyToClipboard (string text)
 
proto void CopyFromClipboard (out string text)
 
proto native void BeginOptionsVideo ()
 
proto native void EndOptionsVideo ()
 
proto native void AdminLog (string text)
 
proto native bool PreloadObject (string type, float distance)
 Preload objects with certain type in certain distance from camera.
 
proto native Object CreateStaticObjectUsingP3D (string p3dFilename, vector position, vector orientation, float scale=1.0, bool createLocal=false)
 
proto native Object CreateObject (string type, vector pos, bool create_local=false, bool init_ai=false, bool create_physics=true)
 Creates object of certain type.
 
proto native SoundOnVehicle CreateSoundOnObject (Object source, string sound_name, float distance, bool looped, bool create_local=false)
 
proto native SoundWaveOnVehicle CreateSoundWaveOnObject (Object source, SoundObject soundObject, AbstractWave soundWave)
 
proto native Object CreateObjectEx (string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
 Creates object of certain type.
 
proto native void ObjectDelete (Object obj)
 
proto native void ObjectDeleteOnClient (Object obj)
 
proto native void RemoteObjectDelete (Object obj)
 
proto native void RemoteObjectTreeDelete (Object obj)
 RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure what you do.
 
proto native void RemoteObjectCreate (Object obj)
 RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not sure what you do.
 
proto native void RemoteObjectTreeCreate (Object obj)
 RemoteObjectCreate - postponed registration of network object (and creation of remote object). do not use if not sure what you do.
 
proto native int ObjectRelease (Object obj)
 RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote objects). do not use if not sure what you do.
 
proto void ObjectGetType (Object obj, out string type)
 
proto void ObjectGetDisplayName (Object obj, out string name)
 
proto native vector ObjectGetSelectionPosition (Object obj, string name)
 
proto native vector ObjectGetSelectionPositionLS (Object obj, string name)
 
proto native vector ObjectGetSelectionPositionMS (Object obj, string name)
 
proto native vector ObjectGetSelectionPositionWS (Object obj, string name)
 
proto native vector ObjectModelToWorld (Object obj, vector modelPos)
 
proto native vector ObjectWorldToModel (Object obj, vector worldPos)
 
proto native bool IsObjectAccesible (EntityAI item, Man player)
 returns true if player can access item's cargo/attachments (check only distance)
 
proto native Input GetInput ()
 
proto native vector GetCurrentCameraPosition ()
 
proto native vector GetCurrentCameraDirection ()
 
proto native AbstractSoundScene GetSoundScene ()
 
proto native NoiseSystem GetNoiseSystem ()
 
proto native bool AddInventoryJuncture (Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData=null)
 
bool AddInventoryJunctureEx (Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms, Managed userData=null)
 
proto native bool HasInventoryJunctureItem (notnull EntityAI item)
 
proto native bool HasInventoryJuncture (Man player, notnull EntityAI item)
 
proto native bool HasInventoryJunctureDestination (Man player, notnull InventoryLocation dst)
 
proto native bool AddActionJuncture (Man player, notnull EntityAI item, int timeout_ms, Managed userData=null)
 
proto native bool ExtendActionJuncture (Man player, notnull EntityAI item, int timeout_ms)
 
proto native bool ClearJuncture (Man player, notnull EntityAI item)
 
bool ClearJunctureEx (Man player, notnull EntityAI item)
 
proto native bool ExecuteEnforceScript (string expression, string mainFnName)
 Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script console.
 
proto native void DumpInstances (bool csvFormatting)
 Delevoper only: Dump all script allocations.
 
proto native bool ScriptTest ()
 
proto native void GetDiagModeNames (out TStringArray diag_names)
 Get list of all debug modes.
 
proto native void SetDiagModeEnable (int diag_mode, bool enabled)
 Set specific debug mode.
 
proto native bool GetDiagModeEnable (int diag_mode)
 Gets state of specific debug mode.
 
proto native void GetDiagDrawModeNames (out TStringArray diag_names)
 Get list of all debug draw modes.
 
proto native void SetDiagDrawMode (int diag_draw_mode)
 Set debug draw mode.
 
proto native int GetDiagDrawMode ()
 Gets current debug draw mode.
 
proto native bool IsPhysicsExtrapolationEnabled ()
 If physics extrapolation is enabled, always true on retail release builds.
 
proto native int GizmoGetCount ()
 
proto native Class GizmoGetInstance (int index)
 
proto native Managed GizmoGetTracker (int index)
 
proto native int GizmoFindByTracker (Managed tracker)
 
proto native void GizmoClear (int index)
 
proto native void GizmoClearAll ()
 
proto native void GizmoSelectObject (Object object)
 
proto native void GizmoSelectPhysics (Physics physics)
 
proto native void GizmoSelectUser (Managed instance)
 
proto native float GetFps ()
 Returns average FPS of last 16 frames.
 
proto native float GetLastFPS ()
 Returns current framerate.
 
proto native float GetAvgFPS (int nFrames=64)
 Returns average framerate over last n frames.
 
proto native float GetMinFPS (int nFrames=64)
 Returns minimum framerate over last n frames.
 
proto native float GetMaxFPS (int nFrames=64)
 Returns maximum framerate over last n frames.
 
void GetFPSStats (out float min, out float max, out float avg, int nFrames=64)
 Outputs framerate statistics.
 
proto native float GetTickTime ()
 Returns current time from start of the game.
 
proto void GetInventoryItemSize (InventoryItem item, out int width, out int height)
 
proto native void GetObjectsAtPosition (vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
 Returns list of all objects in circle "radius" around position "pos".
 
proto native void GetObjectsAtPosition3D (vector pos, float radius, out array< Object > objects, out array< CargoBase > proxyCargos)
 Returns list of all objects in sphere "radius" around position "pos".
 
proto native World GetWorld ()
 
proto void GetWorldName (out string world_name)
 
string GetWorldName ()
 
proto native bool VerifyWorldOwnership (string sWorldName)
 
proto native bool GoBuyWorldDLC (string sWorldName)
 
proto void FormatString (string format, string params[], out string output)
 
proto void GetVersion (out string version)
 
proto native UIManager GetUIManager ()
 
proto native DayZPlayer GetPlayer ()
 
proto native void GetPlayers (out array< Man > players)
 
DayZPlayer GetPlayerByIndex (int index=0)
 
proto native void StoreLoginData (ParamsWriteContext ctx)
 Stores login userdata as parameters which are sent to server

 
proto native vector GetPointerDirection ()
 Returns the direction where the mouse points, from the camera view.
 
proto native vector GetWorldDirectionFromScreen (vector world_pos)
 Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.
 
proto native vector GetScreenPos (vector world_pos)
 Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.
 
proto native vector GetScreenPosRelative (vector world_pos)
 Transforms position in world to position in screen in percentage (0.0 - 1.0) as x, y component of vector, z parameter represents distance between camera and world_pos.
 
proto native MenuData GetMenuData ()
 Return singleton of MenuData class - at main menu contains characters played with current profile.
 
proto native void RPC (Object target, int rpcType, notnull array< ref Param > params, bool guaranteed, PlayerIdentity recipient=null)
 Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on server, RPC is executed on all clients.
 
proto native void RPCSingleParam (Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
 see CGame.RPC
 
proto native void RPCSelf (Object target, int rpcType, notnull array< ref Param > params)
 Not actually an RPC, as it will send it only to yourself.
 
proto native void RPCSelfSingleParam (Object target, int rpcType, Param param)
 
proto native void ProfilerStart (string name)
 Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.
 
proto native void ProfilerStop (string name)
 Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.
 
proto native void Chat (string text, string colorClass)
 Prints text into game chat.
 
proto native void ChatMP (Man recipient, string text, string colorClass)
 
proto native void ChatPlayer (string text)
 
proto native void MutePlayer (string muteUID, string playerUID, bool mute)
 Mutes voice of source player to target player.
 
proto native void MuteAllPlayers (string listenerId, bool mute)
 Mute all players for listenerId.
 
proto native void EnableVoN (Object player, bool enable)
 Enable/disable VoN for target player.
 
proto native void SetVoiceEffect (Object player, int effect, bool enable)
 Enable/disable VoN effect (only on server)
 
proto native void SetVoiceLevel (int level)
 Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)
 
proto native int GetVoiceLevel (Object player=null)
 Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)
 
proto native void EnableMicCapture (bool enable)
 Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmitted over network.
 
proto native bool IsMicCapturing ()
 Returns whether mic is currently capturing audio from user.
 
proto native bool IsInPartyChat ()
 Returns whether user is currently in a voice party (currently only supported on xbox)
 
proto native Mission GetMission ()
 
proto native void SetMission (Mission mission)
 
proto native void StartRandomCutscene (string world)
 Starts intro.
 
proto native void PlayMission (string path)
 Starts mission (equivalent for SQF playMission). You MUST use double slash \.
 
proto protected native void CreateMission (string path)
 Create only enforce script mission, used for mission script reloading.
 
proto native void RestartMission ()
 
proto native void AbortMission ()
 Returns to main menu, leave world empty for using last mission world.
 
proto native void RespawnPlayer ()
 
proto native bool CanRespawnPlayer ()
 
proto native void SetLoginTimerFinished ()
 
proto native void SetMainMenuWorld (string world)
 
proto native owned string GetMainMenuWorld ()
 
proto native void LogoutRequestTime ()
 Logout methods.
 
proto native void LogoutRequestCancel ()
 
proto native bool IsMultiplayer ()
 
proto native bool IsClient ()
 
proto native bool IsServer ()
 
proto native bool IsDedicatedServer ()
 Robust check which is preferred than the above, as it is valid much sooner.
 
proto native int ServerConfigGetInt (string name)
 Server config parsing. Returns 0 if not found.
 
proto native bool IsDebug ()
 
void SetDebugMonitorEnabled (int value)
 
bool IsDebugMonitor ()
 
proto native void GetPlayerIndentities (out array< PlayerIdentity > identities)
 
proto native bool GetSurface (SurfaceDetectionParameters params, SurfaceDetectionResult result)
 API for surface detection.
 
proto native float SurfaceY (float x, float z)
 
proto native float SurfaceRoadY (float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)
 
proto native float SurfaceRoadY3D (float x, float y, float z, RoadSurfaceDetection rsd)
 
proto float SurfaceGetType (float x, float z, out string type)
 Returns: Y position the surface was found.
 
proto float SurfaceGetType3D (float x, float y, float z, out string type)
 Y input: Maximum Y to trace down from; Returns: Y position the surface was found.
 
proto void SurfaceUnderObject (notnull Object object, out string type, out int liquidType)
 
proto void SurfaceUnderObjectEx (notnull Object object, out string type, out string impact, out int liquidType)
 
proto void SurfaceUnderObjectByBone (notnull Object object, int boneType, out string type, out int liquidType)
 
proto native float SurfaceGetNoiseMultiplier (Object directHit, vector pos, int componentIndex)
 
proto native vector SurfaceGetNormal (float x, float z)
 
proto native float SurfaceGetSeaLevelMin ()
 
proto native float SurfaceGetSeaLevelMax ()
 
proto native float SurfaceGetSeaLevel ()
 
proto native float SurfaceGetSeaWaveMax ()
 Get max sea wave height.
 
proto native float SurfaceGetSeaWaveCurrent ()
 Get current sea wave height.
 
proto native bool SurfaceIsSea (float x, float z)
 
proto native bool SurfaceIsPond (float x, float z)
 
proto native float GetWaterDepth (vector posWS)
 
proto native float GetWaterSurfaceHeightNoFakeWave (vector posWS)
 Get the nearest water or object surface under a point, ignoring land (without the fake wave that's on top of the real wave)
 
proto native float GetWaterSurfaceHeightWithFakeWave (vector posWS)
 Get the nearest water or object surface under a point, ignoring land (with the fake wave that's on top of the real wave)
 
proto native void UpdatePathgraphRegion (vector regionMin, vector regionMax)
 
float GetHighestSurfaceYDifference (array< vector > positions)
 Returns the largest height difference between the given positions.
 
vector GetSurfaceOrientation (float x, float z)
 Returns tilt of the ground on the given position in degrees, so you can use this value to rotate any item according to terrain.
 
bool IsSurfaceDigable (string surface)
 Checks if the surface is digable.
 
bool GetSurfaceDigPile (string surface, out string result)
 
bool IsSurfaceFertile (string surface)
 Checks if the surface is fertile.
 
int CorrectLiquidType (int liquidType)
 
void SurfaceUnderObjectCorrectedLiquid (notnull Object object, out string type, out int liquidType)
 
void SurfaceUnderObjectExCorrectedLiquid (notnull Object object, out string type, out string impact, out int liquidType)
 
void SurfaceUnderObjectByBoneCorrectedLiquid (notnull Object object, int boneType, out string type, out int liquidType)
 
void UpdatePathgraphRegionByObject (Object object)
 
proto native bool IsBoxColliding (vector center, vector orientation, vector edgeLength, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
 Finds all objects that are in choosen oriented bounding box (OBB)
 
proto native bool IsBoxCollidingGeometry (vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
 Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)
 
proto native bool IsBoxCollidingGeometryProxy (notnull BoxCollidingParams params, array< Object > excludeObjects, array< ref BoxCollidingResult > collidedObjects=NULL)
 
proto native Weather GetWeather ()
 Returns weather controller object.
 
proto native void SetEVUser (float value)
 Sets custom camera camera EV. range: -50.0..50.0? //TODO.
 
proto native void OverrideDOF (bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
 
proto native void AddPPMask (float ndcX, float ndcY, float ndcRadius, float ndcBlur)
 
proto native void ResetPPMask ()
 
proto native void OverrideInventoryLights (vector diffuse, vector ambient, vector ground, vector dir)
 
proto native void NightVissionLightParams (float lightIntensityMul, float noiseIntensity)
 
proto native void OpenURL (string url)
 
proto native void InitDamageEffects (Object effect)
 Initialization of damage effects.
 
proto native EntityAI GetEntityByPersitentID (int b1, int b2, int b3, int b4)
 
bool IsKindOf (string cfg_class_name, string cfg_parent_name)
 Returns is class name inherited from parent class name.
 
bool ObjectIsKindOf (Object object, string cfg_parent_name)
 Returns is object inherited from parent class name.
 
int ConfigFindClassIndex (string config_path, string searched_member)
 
proto int GetTime ()
 returns mission time in milliseconds

 
ScriptCallQueue GetCallQueue (int call_category)
 
ScriptInvoker GetUpdateQueue (int call_category)
 
ScriptInvoker GetPostUpdateQueue (int call_category)
 
TimerQueue GetTimerQueue (int call_category)
 
DragQueue GetDragQueue ()
 
string CreateDefaultPlayer ()
 returns class name of first valid survivor (TODO address confusing naming?)
 
string CreateRandomPlayer ()
 returns class name of random survivor (TODO address confusing naming?)
 
TStringArray ListAvailableCharacters ()
 outputs array of all valid survivor class names
 
bool IsInventoryOpen ()
 
proto native BiosUserManager GetUserManager ()
 
proto native ContentDLC GetContentDLCService ()
 Return DLC service (service for entitlement keys for unlock content)
 
bool IsMissionMainMenu ()
 Returns true when current mission is Main Menu.
 
MenuDefaultCharacterData GetMenuDefaultCharacterData (bool fill_data=true)
 
AnalyticsManagerServer GetAnalyticsServer ()
 
AnalyticsManagerClient GetAnalyticsClient ()
 
proto native int GetLogoutAfterCancelTimeout ()
 

Static Private Member Functions

static bool ReportModded ()
 
static float GetUserFOVFromConfig ()
 
static bool CheckAmmoCompability (EntityAI weaponInHand, EntityAI ammo)
 
static bool IsDigitalCopy ()
 

Private Attributes

protected ref BillboardSetHandler m_BillboardSetHandler
 
const int MISSION_STATE_MAINMENU = 0
 
const int MISSION_STATE_GAME = 1
 
const int MISSION_STATE_FINNISH = 2
 
bool m_AutotestEnabled
 
private const int STATS_COUNT = EConnectivityStatType.COUNT
 
private EConnectivityStatLevel m_ConnectivityStatsStates [STATS_COUNT]
 
private int m_MissionState
 
protected DayZGameState m_GameState
 
protected DayZLoadState m_LoadState
 
protected ref NotificationUI m_Notifications
 
protected bool m_FirstConnect = true
 
ref LoadingScreen m_loading
 
private ref LoginTimeBase m_LoginTimeScreen
 
private ref LoginQueueBase m_LoginQueue
 
private int m_LoginTime
 
private ref ConnectionLost m_connectionLost
 
private ref TimerQueue m_timerQueue [CALL_CATEGORY_COUNT]
 
private ref ScriptCallQueue m_callQueue [CALL_CATEGORY_COUNT]
 
private ref ScriptInvoker m_updateQueue [CALL_CATEGORY_COUNT]
 
private ref ScriptInvoker m_postUpdateQueue [CALL_CATEGORY_COUNT]
 
private ref DragQueue m_dragQueue
 
private ref ScriptInvoker m_YieldDataInitInvoker
 
private ref DayZProfilesOptions m_DayZProfileOptions
 
private bool m_early_access_dialog_accepted
 
private UIScriptedMenu m_keyboard_handler
 
private ScriptModule m_mission_module
 
private string m_MissionPath
 
private string m_MissionFolderPath
 
private bool m_IsCtrlHolding
 
private bool m_IsWinHolding
 
private bool m_IsLeftAltHolding
 
private bool m_IsRightAltHolding
 
private bool m_IsWorldWetTempUpdateEnabled = true
 
private bool m_IsFoodDecayEnabled = true
 
private float m_FoodDecayModifier
 
private bool m_IsStressTest
 
private bool m_AimLoggingEnabled
 
int m_OriginalCharactersCount
 
private string m_PlayerName
 
private bool m_IsNewCharacter
 
private bool m_IsConnecting
 
private bool m_ConnectFromJoin
 
private bool m_ShouldShowControllerDisconnect
 
private bool m_CursorDesiredVisibilityScript = true
 
private int m_PreviousGamepad
 
private float m_UserFOV
 
private float m_DeltaTime
 
float m_volume_sound
 
float m_volume_speechEX
 
float m_volume_music
 
float m_volume_VOIP
 
float m_volume_radio
 
float m_PreviousEVValue
 
float m_EVValue = 0
 
private ref Backlit m_Backlit
 
private ref array< stringm_CharClassNames = new array<string>()
 
private ref array< intm_ConnectedInputDeviceList
 
private ref EffectSound m_CrashSound
 
private ref EffectSound m_ArtySound
 
private const int MIN_ARTY_SOUND_RANGE = 300
 
protected ref Widget m_IntroMenu
 
protected ref Widget m_GamepadDisconnectMenu
 
protected int m_PrevBlur
 
protected string m_DatabaseID
 
protected string m_ConnectAddress
 
protected int m_ConnectPort
 
protected int m_ConnectSteamQueryPort
 
protected string m_ConnectPassword
 
protected const int MAX_VISITED = 50
 
protected ref TStringArray m_Visited
 
const float ARROW_PIERCE_DEPTH = 0.05
 
int m_DebugMonitorEnabled
 
ScriptModule GameScript
 
private ref array< ref Paramm_ParamCache
 
ref AnalyticsManagerServer m_AnalyticsManagerServer
 
ref AnalyticsManagerClient m_AnalyticsManagerClient
 
ref MenuDefaultCharacterData m_CharacterData
 

Static Private Attributes

static bool m_ReportModded
 
static ref AmmoCamParams m_AmmoShakeParams = new AmmoCamParams()
 
static ref ScriptInvoker Event_OnRPC = new ScriptInvoker()
 
static ref NoiseParams m_NoiseParams = new NoiseParams()
 
static ref TemperatureAccessManager m_TAManager = new TemperatureAccessManager()
 

Constructor & Destructor Documentation

◆ ~DayZGame()

◆ CGame()

◆ ~CGame()

Member Function Documentation

◆ AbortMission()

proto native void AbortMission ( )
private

Returns to main menu, leave world empty for using last mission world.

Referenced by OnEvent().

◆ AddActionJuncture()

proto native bool AddActionJuncture ( Man  player,
notnull EntityAI  item,
int  timeout_ms,
Managed  userData = null 
)
private

◆ AddInventoryJuncture()

proto native bool AddInventoryJuncture ( Man  player,
notnull EntityAI  item,
InventoryLocation  dst,
bool  test_dst_occupancy,
int  timeout_ms,
Managed  userData = null 
)
private

Referenced by AddInventoryJunctureEx().

◆ AddInventoryJunctureEx()

bool AddInventoryJunctureEx ( Man  player,
notnull EntityAI  item,
InventoryLocation  dst,
bool  test_dst_occupancy,
int  timeout_ms,
Managed  userData = null 
)
inlineprivate

◆ AddPPMask()

proto native void AddPPMask ( float  ndcX,
float  ndcY,
float  ndcRadius,
float  ndcBlur 
)
private

◆ AddToReconnectCache()

proto native void AddToReconnectCache ( PlayerIdentity  identity)
private

Add player to reconnect cache to be able to rejoin character still existing in the world.

Note
Works only on server and no database requests are sent
Parameters
identityof player

◆ AddVisitedServer()

void AddVisitedServer ( string  ip,
int  port 
)
inlineprivate

References SaveProfile(), and SetProfileStringList().

Referenced by OnEvent().

◆ AddVoiceNotification()

void AddVoiceNotification ( VONStopSpeakingEventParams  vonStartParams)
inlineprivate

◆ AdminLog()

proto native void AdminLog ( string  text)
private

◆ AutoTestLaunch()

void AutoTestLaunch ( string  param)
inlineprivate

◆ BeginOptionsVideo()

proto native void BeginOptionsVideo ( )
private

◆ CancelLoginQueue()

void CancelLoginQueue ( )
inlineprivate

References m_LoginQueue.

Referenced by OnEvent(), and OnLoginTimeEvent().

◆ CancelLoginTimeCountdown()

void CancelLoginTimeCountdown ( )
inlineprivate

◆ CanDisplayMouseCursor()

bool CanDisplayMouseCursor ( )
inlineprivate

extend as needed, only game focus and M&K setting (consoles only!) are checked natively

Only checking on console because while loading on PC, the mouse might not be detected

Platform defaults

References GetInput(), and Input::IsMouseConnected().

Referenced by RefreshMouseCursorVisibility().

◆ CanRespawnPlayer()

proto native bool CanRespawnPlayer ( )
private

◆ Chat()

proto native void Chat ( string  text,
string  colorClass 
)
private

Prints text into game chat.

Parameters
textto print
colorClass??
usage :
g_Game.Chat("Item splitted", "colorAction");
DayZGame g_Game
Definition DayZGame.c:3942

◆ ChatMP()

proto native void ChatMP ( Man  recipient,
string  text,
string  colorClass 
)
private

◆ ChatPlayer()

proto native void ChatPlayer ( string  text)
private

◆ CheckAmmoCompability()

static bool CheckAmmoCompability ( EntityAI  weaponInHand,
EntityAI  ammo 
)
inlinestaticprivate

References g_Game.

◆ CheckDialogs()

void CheckDialogs ( )
inlineprivate

◆ ClearConnectivityStates()

private void ClearConnectivityStates ( )
inlineprivate

References STATS_COUNT.

Referenced by OnEvent().

◆ ClearJuncture()

proto native bool ClearJuncture ( Man  player,
notnull EntityAI  item 
)
private

Referenced by ClearJunctureEx().

◆ ClearJunctureEx()

bool ClearJunctureEx ( Man  player,
notnull EntityAI  item 
)
inlineprivate

◆ ClearReconnectCache()

proto native void ClearReconnectCache ( )
private

Remove all player from reconnect cache.

Note
Works only on server

◆ CloseCombatEffects()

void CloseCombatEffects ( Object  source,
Object  directHit,
int  componentIndex,
string  surface,
vector  pos,
vector  surfNormal,
bool  isWater,
string  ammoType 
)
inlineprivate

◆ CommandlineGetParam()

proto bool CommandlineGetParam ( string  name,
out string  value 
)
private

Get command line parameter value.

Parameters
nameof parameter
valueoutput
Returns
true when parameter exists, false otherwise
usage :
// you run e.g.: DayZInt.exe -scriptDebug=true
string value;
if (g_Game.CommandlineGetParam("scriptDebug", value) && value == "true")
{
Print("Script debugging on!");
}
proto void Print(void var)
Prints content of variable to console/log.

Referenced by DayZGame().

◆ ConfigFindClassIndex()

int ConfigFindClassIndex ( string  config_path,
string  searched_member 
)
inlineprivate

Searches given config path (config_path) for the given member (searched_member) and returns its index. \nReturns -1 if not found.
usage:

int skinning_class_index = g_Game.ConfigFindClassIndex(cfgPath_animal, "Skinning");

References ConfigGetChildName(), and ConfigGetChildrenCount().

◆ ConfigGetBaseName()

proto bool ConfigGetBaseName ( string  path,
out string  base_name 
)
private

Get name of base class of config class on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
nameoutput
Returns
true on success, false if path or base is not exists

◆ ConfigGetChildName()

proto bool ConfigGetChildName ( string  path,
int  index,
out string  name 
)
private

Get name of subclass in config class on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
indexof subclass in class
nameoutput
Returns
true on success, false if path or child is not found

Referenced by ConfigFindClassIndex(), and DayZGame().

◆ ConfigGetChildrenCount()

proto native int ConfigGetChildrenCount ( string  path)
private

Get count of subclasses in config class on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
indexof parameter in class
nameoutput
Returns
true on success, false if path or child is not found

Referenced by ConfigFindClassIndex(), and DayZGame().

◆ ConfigGetFloat()

proto native float ConfigGetFloat ( string  path)
private

Get float value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value

Referenced by FirearmEffects().

◆ ConfigGetFloatArray()

proto native void ConfigGetFloatArray ( string  path,
out TFloatArray  values 
)
private

Get array of floats from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput

◆ ConfigGetFullPath()

proto native void ConfigGetFullPath ( string  path,
out TStringArray  full_path 
)
private

Referenced by IsKindOf().

◆ ConfigGetInt()

proto native int ConfigGetInt ( string  path)
private

Get int value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value

Referenced by DayZGame(), IsSurfaceDigable(), and IsSurfaceFertile().

◆ ConfigGetIntArray()

proto native void ConfigGetIntArray ( string  path,
out TIntArray  values 
)
private

Get array of integers from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput

◆ ConfigGetObjectFullPath()

proto native void ConfigGetObjectFullPath ( Object  obj,
out TStringArray  full_path 
)
private

Referenced by ObjectIsKindOf().

◆ ConfigGetText()

proto bool ConfigGetText ( string  path,
out string  value 
)
private

Get string value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput
Returns
true on success

Referenced by ConfigGetTextOut(), and GetSurfaceDigPile().

◆ ConfigGetTextArray()

proto native void ConfigGetTextArray ( string  path,
out TStringArray  values 
)
private

Get array of strings from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput
usage :
TStringArray characterAnimations = new TStringArray;
g_Game.ConfigGetTextArray("CfgMovesMaleSdr2 States menu_idleUnarmed0 variantsPlayer", characterAnimations);
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition IsBoxCollidingGeometryProxyClasses.c:28
array< string > TStringArray
Definition EnScript.c:712

◆ ConfigGetTextArrayRaw()

proto native void ConfigGetTextArrayRaw ( string  path,
out TStringArray  values 
)
private

Get array of raw strings from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput in raw format (localization keys '$STR_' are not translated)
usage :
TStringArray characterAnimations = new TStringArray;
g_Game.ConfigGetTextArrayRaw("CfgMovesMaleSdr2 States menu_idleUnarmed0 variantsPlayer", characterAnimations);
Note
use 'FormatRawConfigStringKeys' method to change localization keys to script-friendly

◆ ConfigGetTextOut()

string ConfigGetTextOut ( string  path)
inlineprivate

Get string value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value output string

References ConfigGetText(), and path.

◆ ConfigGetTextRaw()

proto bool ConfigGetTextRaw ( string  path,
out string  value 
)
private

Get raw string value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
valueoutput in raw format (localization keys '$STR_' are not translated)
Returns
true on success
Note
use 'FormatRawConfigStringKeys' method to change localization keys to script-friendly

◆ ConfigGetType()

proto native int ConfigGetType ( string  path)
private

Returns type of config value.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
one of constants CT_INT, CT_FLOAT, CT_STRING, CT_ARRAY, CT_CLASS, CT_OTHER

◆ ConfigGetVector()

proto native vector ConfigGetVector ( string  path)
private

Get vector value from config on path.

Parameters
pathof value, classes are delimited by empty space. You can specify config file by using "configFile" or "missionConfigFile" as a first class name.
Returns
value

◆ ConfigIsExisting()

proto native bool ConfigIsExisting ( string  path)
private

◆ ConfigPathToString()

string ConfigPathToString ( TStringArray  array_path)
inlineprivate

Converts array of strings into single string.

Parameters
Arrayof strings like {"All", "AllVehicles", "Land"}
Returns
Converts given array into something lile "All AllVehicles Land".
???

◆ Connect() [1/2]

◆ Connect() [2/2]

proto native int Connect ( UIScriptedMenu  parent,
string  IpAddress,
int  port,
string  password 
)
private

Connects to IsServer.

Parameters
IpAddressof the server
portof the server set to 0 for default port
passwordof the server
Returns
0 on success, error code from ErrorModuleHandler on not success

◆ ConnectFromCLI()

void ConnectFromCLI ( )
inlineprivate

References Connect(), GetCLIParam(), and string::ToInt().

Referenced by ConnectLaunch(), and TryConnect().

◆ ConnectFromJoin()

void ConnectFromJoin ( string  ip,
int  port 
)
inlineprivate

References Connect().

◆ ConnectFromServerBrowser()

void ConnectFromServerBrowser ( string  ip,
int  port,
string  password = "" 
)
inlineprivate

◆ ConnectFromServerBrowserEx()

void ConnectFromServerBrowserEx ( string  ip,
int  port,
int  steamQueryPort,
string  password = "" 
)
inlineprivate

◆ ConnectLastSession()

proto native int ConnectLastSession ( UIScriptedMenu  parent,
int  selectedCharacter = -1 
)
private

Connects to last success network session.

Returns
0 on success, error code from ErrorModuleHandler on not success

◆ ConnectLaunch()

◆ CopyFromClipboard()

proto void CopyFromClipboard ( out string  text)
private

◆ CopyToClipboard()

proto native void CopyToClipboard ( string  text)
private

◆ CorrectLiquidType()

◆ CreateDefaultPlayer() [1/2]

override string CreateDefaultPlayer ( )
inlineprivate

◆ CreateDefaultPlayer() [2/2]

string CreateDefaultPlayer ( )
inlineprivate

returns class name of first valid survivor (TODO address confusing naming?)

◆ CreateGamepadDisconnectMenu()

void CreateGamepadDisconnectMenu ( )
private

◆ CreateMission()

proto protected native void CreateMission ( string  path)
private

Create only enforce script mission, used for mission script reloading.

Referenced by ReloadMission().

◆ CreateObject()

proto native Object CreateObject ( string  type,
vector  pos,
bool  create_local = false,
bool  init_ai = false,
bool  create_physics = true 
)
private

Creates object of certain type.

Parameters
typeof objects to create
posposition where to create object
create_localif True, object is not spawned on clients only on server
init_aiif creating object is LightAI class, by this param is initialised AI or not
Returns
new Object

◆ CreateObjectEx()

proto native Object CreateObjectEx ( string  type,
vector  pos,
int  iFlags,
int  iRotation = RF_DEFAULT 
)
private

Creates object of certain type.

Parameters
typeof objects to create
posposition where to create object
iFlagsare used to setup object and/ or spawn behavior
iRotationare used to setup object rotation on spawn (or default if not specified)
Returns
new Object

◆ CreatePlayer()

proto native Entity CreatePlayer ( PlayerIdentity  identity,
string  name,
vector  pos,
float  radius,
string  spec 
)
private

Assign player entity to client (in multiplayer)

Note
Works only on server
Parameters
name

◆ CreateRandomPlayer() [1/2]

override string CreateRandomPlayer ( )
inlineprivate

◆ CreateRandomPlayer() [2/2]

string CreateRandomPlayer ( )
inlineprivate

returns class name of random survivor (TODO address confusing naming?)

◆ CreateScriptedMenu() [1/2]

override UIScriptedMenu CreateScriptedMenu ( int  id)
inlineprivate

create custom main menu part (submenu)

References Mission::CreateScriptedMenu(), GetMission(), and mission.

◆ CreateScriptedMenu() [2/2]

UIScriptedMenu CreateScriptedMenu ( int  id)
inlineprivate

create custom main menu part (submenu)

◆ CreateScriptedWindow()

UIScriptedWindow CreateScriptedWindow ( int  id)
inlineprivate

create custom window part

◆ CreateSoundOnObject()

proto native SoundOnVehicle CreateSoundOnObject ( Object  source,
string  sound_name,
float  distance,
bool  looped,
bool  create_local = false 
)
private

◆ CreateSoundWaveOnObject()

proto native SoundWaveOnVehicle CreateSoundWaveOnObject ( Object  source,
SoundObject  soundObject,
AbstractWave  soundWave 
)
private

◆ CreateStaticObjectUsingP3D()

proto native Object CreateStaticObjectUsingP3D ( string  p3dFilename,
vector  position,
vector  orientation,
float  scale = 1.0,
bool  createLocal = false 
)
private

◆ CreateTitleScreen()

◆ DayZGame()

◆ DeferredInit()

◆ DelayedMidAirDetonation()

void DelayedMidAirDetonation ( float  x,
float  y,
float  z 
)
inlineprivate

◆ DeleteGamepadDisconnectMenu()

void DeleteGamepadDisconnectMenu ( )
private

◆ DeleteTitleScreen()

void DeleteTitleScreen ( )
inlineprivate

◆ DisconnectPlayer()

proto native void DisconnectPlayer ( PlayerIdentity  identity,
string  uid = "" 
)
private

Destroy player info and disconnect.

Note
Works only on server

◆ DisconnectSession()

proto native void DisconnectSession ( )
private

Disconnects from current multiplayer session.

◆ DisconnectSessionEx()

◆ DisconnectSessionForce()

proto native void DisconnectSessionForce ( )
private

Forces disconnect from current multiplayer session even if not yet in the game.

Referenced by DisconnectSessionEx(), and TryConnect().

◆ DisconnectSessionScript()

void DisconnectSessionScript ( bool  displayJoinError = false)
inlineprivate

References DisconnectSessionEx().

Referenced by Connect(), and TryConnect().

◆ DumpInstances()

proto native void DumpInstances ( bool  csvFormatting)
private

Delevoper only: Dump all script allocations.

◆ EarlyAccessDialog()

void EarlyAccessDialog ( UIScriptedMenu  parent)
inlineprivate

References g_Game, and MENU_EARLYACCESS.

◆ EnableMicCapture()

proto native void EnableMicCapture ( bool  enable)
private

Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmitted over network.

Parameters
enableenables or disabled listening

◆ EnableVoN()

proto native void EnableVoN ( Object  player,
bool  enable 
)
private

Enable/disable VoN for target player.

Parameters
playerin question
enablesets if player can use VoN

◆ EndOptionsVideo()

proto native void EndOptionsVideo ( )
private

◆ EnterLoginQueue()

void EnterLoginQueue ( UIMenuPanel  parent)
inlineprivate

References GetUIManager(), and MENU_LOGIN_QUEUE.

Referenced by UpdateLoginQueue().

◆ EnterLoginTime()

void EnterLoginTime ( UIMenuPanel  parent)
inlineprivate

References GetUIManager(), and MENU_LOGIN_TIME.

Referenced by OnLoginTimeEvent(), and OnRespawnEvent().

◆ ExecuteEnforceScript()

proto native bool ExecuteEnforceScript ( string  expression,
string  mainFnName 
)
private

Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script console.

◆ ExplosionEffects()

void ExplosionEffects ( Object  source,
Object  directHit,
int  componentIndex,
string  surface,
vector  pos,
vector  surfNormal,
float  energyFactor,
float  explosionFactor,
bool  isWater,
string  ammoType 
)
inlineprivate

◆ ExplosionEffectsEx()

◆ ExtendActionJuncture()

proto native bool ExtendActionJuncture ( Man  player,
notnull EntityAI  item,
int  timeout_ms 
)
private

◆ FirearmEffects()

void FirearmEffects ( Object  source,
Object  directHit,
int  componentIndex,
string  surface,
vector  pos,
vector  surfNormal,
vector  exitPos,
vector  inSpeed,
vector  outSpeed,
bool  isWater,
bool  deflected,
string  ammoType 
)
inlineprivate

◆ FormatRawConfigStringKeys()

bool FormatRawConfigStringKeys ( inout string  value)
inlineprivate

Changes localization key format to script-friendly format.

Parameters
originalconfig string.
Returns
value output string with '$' substituted to script-friendly '#'. If not found, does nothing.

◆ FormatString()

proto void FormatString ( string  format,
string  params[],
out string  output 
)
private

◆ GamepadCheck()

◆ GetAnalyticsClient()

AnalyticsManagerClient GetAnalyticsClient ( )
inlineprivate

◆ GetAnalyticsServer()

AnalyticsManagerServer GetAnalyticsServer ( )
inlineprivate

◆ GetAvgFPS()

proto native float GetAvgFPS ( int  nFrames = 64)
private

Returns average framerate over last n frames.

Parameters
nFramesThe number of frames to compute average of, up to 64.
Returns
Average frames per second over last n frames.

Referenced by GetFPSStats().

◆ GetBacklit()

Backlit GetBacklit ( )
inlineprivate

References m_Backlit.

◆ GetBillboardHandler()

BillboardSetHandler GetBillboardHandler ( )
inlineprivate

References m_BillboardSetHandler.

◆ GetCallQueue() [1/2]

◆ GetCallQueue() [2/2]

ScriptCallQueue GetCallQueue ( int  call_category)
inlineprivate

Returns CallQueue for certain category

Parameters
call_categorycall category, valid values are:
CALL_CATEGORY_SYSTEM - calls & timers in this queue are processed every time without any restrictions
CALL_CATEGORY_GUI - calls & timers in this queue are processed when GUI is enabled (even during pase game)
CALL_CATEGORY_GAMEPLAY - calls & timers in this queue are processed only during mission, when game is not paused
usage:
g_Game.GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Refresh"); // calls "Refresh" function on "this" with no arguments
g_Game.GetCallQueue(CALL_CATEGORY_GUI).Call(this, "Show", new Param1<bool>(true)); // calls "Show" function on "this" with one bool argument
g_Game.GetCallQueue(CALL_CATEGORY_GUI).Call(this, "SetPos", new Param2<float, float>(0.2, 0.5)); // calls "SetPos" function on "this" with two float arguments
Definition PPEConstants.c:68
const int CALL_CATEGORY_GUI
Definition tools.c:9

◆ GetConnectedInputDeviceList()

array< int > GetConnectedInputDeviceList ( )
inlineprivate

◆ GetContentDLCService()

proto native ContentDLC GetContentDLCService ( )
private

Return DLC service (service for entitlement keys for unlock content)

◆ GetCurrentCameraDirection()

proto native vector GetCurrentCameraDirection ( )
private

◆ GetCurrentCameraPosition()

proto native vector GetCurrentCameraPosition ( )
private

◆ GetCurrentDisplayLanguageIdx()

int GetCurrentDisplayLanguageIdx ( )
inlineprivate

◆ GetCurrentEVValue()

float GetCurrentEVValue ( )
inlineprivate

References m_EVValue.

◆ GetDatabaseID()

string GetDatabaseID ( )
inlineprivate

References m_DatabaseID.

◆ GetDayTime()

proto native float GetDayTime ( )
private

Returns current daytime on server.

◆ GetDeltaT()

float GetDeltaT ( )
inlineprivate

References m_DeltaTime.

◆ GetDiagDrawMode()

proto native int GetDiagDrawMode ( )
private

Gets current debug draw mode.

◆ GetDiagDrawModeNames()

proto native void GetDiagDrawModeNames ( out TStringArray  diag_names)
private

Get list of all debug draw modes.

◆ GetDiagModeEnable()

proto native bool GetDiagModeEnable ( int  diag_mode)
private

Gets state of specific debug mode.

◆ GetDiagModeNames()

proto native void GetDiagModeNames ( out TStringArray  diag_names)
private

Get list of all debug modes.

◆ GetDragQueue() [1/2]

override DragQueue GetDragQueue ( )
inlineprivate

References m_dragQueue.

Referenced by OnUpdate().

◆ GetDragQueue() [2/2]

DragQueue GetDragQueue ( )
inlineprivate

Returns DragQueue. Callbacks are called on mouse move until mouse button is released, then the queue is cleaned.

◆ GetEntityByPersitentID()

proto native EntityAI GetEntityByPersitentID ( int  b1,
int  b2,
int  b3,
int  b4 
)
private

Returns EntityAI by its persistent ID parts or null if entity with given persistent ID does not exists.

This function returns valid data only inside AfterLoad event. Do not use this in anywhere else.

Its main purpose is only for keep track on object connections after server restarts, all data related to this function are deleted when server initialization is done.

◆ GetFoodDecayModifier()

float GetFoodDecayModifier ( )
inlineprivate

References m_FoodDecayModifier.

Referenced by IsFoodDecayEnabled().

◆ GetFOVByZoomType()

◆ GetFps()

proto native float GetFps ( )
private

Returns average FPS of last 16 frames.

Returns
fps in milliseconds

◆ GetFPSStats()

void GetFPSStats ( out float  min,
out float  max,
out float  avg,
int  nFrames = 64 
)
inlineprivate

Outputs framerate statistics.

Parameters
minOutputs minimum framerate over last n frames in frames per second.
maxOutputs maximum framerate over last n frames in frames per second.
avgOutputs average framerate over last n frames in frames per second.
nFramesThe number of frames to take into account, up to 64.

References GetAvgFPS(), GetMaxFPS(), and GetMinFPS().

◆ GetGameState()

DayZGameState GetGameState ( )
inlineprivate

References m_GameState.

Referenced by OnEvent(), OnMPConnectionLostEvent(), and TryConnect().

◆ GetHighestSurfaceYDifference()

float GetHighestSurfaceYDifference ( array< vector positions)
inlineprivate

Returns the largest height difference between the given positions.

References SurfaceRoadY(), and y.

◆ GetHostAddress()

proto bool GetHostAddress ( out string  address,
out int  port 
)
private

Gets the server address. (from client)

Referenced by Connect(), OnEvent(), RefreshCurrentServerInfo(), and TryConnect().

◆ GetHostData()

proto GetServersResultRow GetHostData ( )
private

Gets the server data. (from client)

◆ GetHostName()

proto owned string GetHostName ( )
private

Gets the server name. (from client)

◆ GetHUDBrightnessSetting()

float GetHUDBrightnessSetting ( )
inlineprivate

References g_Game.

Referenced by OnInitialize().

◆ GetInput()

◆ GetInventoryItemSize()

proto void GetInventoryItemSize ( InventoryItem  item,
out int  width,
out int  height 
)
private

◆ GetLastFPS()

proto native float GetLastFPS ( )
private

Returns current framerate.

Returns
Current framerate as frames per second.

◆ GetLastVisitedServer()

bool GetLastVisitedServer ( out string  ip,
out int  port 
)
inlineprivate

References string::Split().

◆ GetLoadingWorkspace()

proto native WorkspaceWidget GetLoadingWorkspace ( )
private

◆ GetLoadState()

DayZLoadState GetLoadState ( )
inlineprivate

◆ GetLogoutAfterCancelTimeout()

proto native int GetLogoutAfterCancelTimeout ( )
private

◆ GetMainMenuWorld()

proto native owned string GetMainMenuWorld ( )
private

Referenced by MainMenuLaunch(), and PartyLaunch().

◆ GetMaxFPS()

proto native float GetMaxFPS ( int  nFrames = 64)
private

Returns maximum framerate over last n frames.

Parameters
nFramesThe number of frames to find maximum of, up to 64.
Returns
Maximum frames per second over last n frames.

Referenced by GetFPSStats().

◆ GetMenuData()

proto native MenuData GetMenuData ( )
private

Return singleton of MenuData class - at main menu contains characters played with current profile.

Referenced by GetMenuDefaultCharacterData().

◆ GetMenuDefaultCharacterData()

MenuDefaultCharacterData GetMenuDefaultCharacterData ( bool  fill_data = true)
inlineprivate

◆ GetMinFPS()

proto native float GetMinFPS ( int  nFrames = 64)
private

Returns minimum framerate over last n frames.

Parameters
nFramesThe number of frames to find minimum of, up to 64.
Returns
Minimum frames per second over last 64 frames.

Referenced by GetFPSStats().

◆ GetMission()

◆ GetMissionFolderPath()

string GetMissionFolderPath ( )
inlineprivate

References m_MissionFolderPath.

◆ GetMissionPath()

string GetMissionPath ( )
inlineprivate

References m_MissionPath.

◆ GetMissionState()

int GetMissionState ( )
inlineprivate

References m_MissionState.

◆ GetModelName()

string GetModelName ( string  class_name)
inlineprivate

Get name of the p3d file of the given class name.

Parameters
classname of the desired object
Returns
Name of the object's p3d file (without the '.p3d' suffix)

References class_name, g_Game, string::Get(), string::Length(), and string::Substring().

◆ GetModInfos()

proto native void GetModInfos ( notnull out array< ref ModInfo modArray)
private

◆ GetModToBeReported()

proto native bool GetModToBeReported ( )
private

Referenced by DayZGame().

◆ GetMouseCursorDesiredVisibility()

bool GetMouseCursorDesiredVisibility ( )
inlineprivate

◆ GetNoiseSystem()

proto native NoiseSystem GetNoiseSystem ( )
private

◆ GetObjectByNetworkId()

proto native Object GetObjectByNetworkId ( int  networkIdLowBits,
int  networkIdHighBits 
)
private

Returns entity identified by network id.

Parameters
networkIdLowBitsidentity used in MP (use NULL in singleplayer)
networkIdHighBitsobject which should be controlled by player

◆ GetObjectsAtPosition()

proto native void GetObjectsAtPosition ( vector  pos,
float  radius,
out array< Object objects,
out array< CargoBase proxyCargos 
)
private

Returns list of all objects in circle "radius" around position "pos".

Parameters
pos
radius
objectsoutput array

◆ GetObjectsAtPosition3D()

proto native void GetObjectsAtPosition3D ( vector  pos,
float  radius,
out array< Object objects,
out array< CargoBase proxyCargos 
)
private

Returns list of all objects in sphere "radius" around position "pos".

Parameters
pos
radius
objectsoutput array

◆ GetPlayer()

proto native DayZPlayer GetPlayer ( )
private

Referenced by OnEvent(), OnRespawnEvent(), and OnUpdate().

◆ GetPlayerByIndex()

DayZPlayer GetPlayerByIndex ( int  index = 0)
inlineprivate

References GetPlayers().

◆ GetPlayerGameName()

string GetPlayerGameName ( )
inlineprivate

References m_PlayerName.

◆ GetPlayerIndentities()

proto native void GetPlayerIndentities ( out array< PlayerIdentity identities)
private

◆ GetPlayerName()

proto void GetPlayerName ( out string  name)
private

Gets current player name.

Parameters
nameoutput value

◆ GetPlayerNameShort()

proto void GetPlayerNameShort ( int  maxLength,
out string  name 
)
private

Gets current player name. If length of player name is grater than maxLength, then it is omitted and append ellipsis.

Parameters
maxLength- max chars in name
name- output value of player name with 'maxLength' characters and then ellipsis "..."

◆ GetPlayerNetworkIDByIdentityID()

proto void GetPlayerNetworkIDByIdentityID ( int  playerIdentityID,
out int  networkIdLowBits,
out int  networkIdHightBits 
)
private

returns player's network id from identity id in out parameters

Parameters
identityPlayerIdentity.id used in MP (use NULL in singleplayer)
networkIdLowBitslower bits of 64bit network id
networkIdHighBitshigher bits of 64bit network id
Note
Usable only on server

◆ GetPlayers()

proto native void GetPlayers ( out array< Man >  players)
private

Referenced by GetPlayerByIndex().

◆ GetPointerDirection()

proto native vector GetPointerDirection ( )
private

Returns the direction where the mouse points, from the camera view.

◆ GetPostUpdateQueue() [1/2]

override ScriptInvoker GetPostUpdateQueue ( int  call_category)
inlineprivate

Referenced by OnPostUpdate().

◆ GetPostUpdateQueue() [2/2]

ScriptInvoker GetPostUpdateQueue ( int  call_category)
inlineprivate

◆ GetPreviousEVValue()

float GetPreviousEVValue ( )
inlineprivate

References m_PreviousEVValue.

◆ GetPreviousGamepad()

int GetPreviousGamepad ( )
inlineprivate

References m_PreviousGamepad.

◆ GetProfileOption()

bool GetProfileOption ( EDayZProfilesOptions  option)
inlineprivate

Referenced by GetProfileOptionBool().

◆ GetProfileOptionBool()

bool GetProfileOptionBool ( EDayZProfilesOptions  option)
inlineprivate

References GetProfileOption().

◆ GetProfileOptionDefault()

bool GetProfileOptionDefault ( EDayZProfilesOptions  option)
inlineprivate

◆ GetProfileOptionDefaultBool()

bool GetProfileOptionDefaultBool ( EDayZProfilesOptions  option)
inlineprivate

◆ GetProfileOptionDefaultFloat()

float GetProfileOptionDefaultFloat ( EDayZProfilesOptions  option)
inlineprivate

◆ GetProfileOptionDefaultInt()

int GetProfileOptionDefaultInt ( EDayZProfilesOptions  option)
inlineprivate

◆ GetProfileOptionFloat()

float GetProfileOptionFloat ( EDayZProfilesOptions  option)
inlineprivate

◆ GetProfileOptionInt()

int GetProfileOptionInt ( EDayZProfilesOptions  option)
inlineprivate

◆ GetProfileOptionMap()

map< EDayZProfilesOptions, ref DayZProfilesOption > GetProfileOptionMap ( )
inlineprivate

◆ GetProfileString()

proto bool GetProfileString ( string  name,
out string  value 
)
private

Gets string from profile variable.

Parameters
nameof the variable
valueoutput value
Returns
true when successful

◆ GetProfileStringList()

proto native void GetProfileStringList ( string  name,
out TStringArray  values 
)
private

Gets array of strings from profile variable.

Parameters
nameof the variable
valuesoutput values
usage:
TStringArray lastInventoryArray = new TStringArray;
g_Game.GetProfileStringList("lastInventory", lastInventoryArray);

Referenced by OnInitialize().

◆ GetScreenPos()

proto native vector GetScreenPos ( vector  world_pos)
private

Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.

◆ GetScreenPosRelative()

proto native vector GetScreenPosRelative ( vector  world_pos)
private

Transforms position in world to position in screen in percentage (0.0 - 1.0) as x, y component of vector, z parameter represents distance between camera and world_pos.

◆ GetSoundScene()

proto native AbstractSoundScene GetSoundScene ( )
private

Referenced by DeferredInit().

◆ GetSurface()

proto native bool GetSurface ( SurfaceDetectionParameters  params,
SurfaceDetectionResult  result 
)
private

API for surface detection.

◆ GetSurfaceDigPile()

bool GetSurfaceDigPile ( string  surface,
out string  result 
)
inlineprivate

References ConfigGetText().

◆ GetSurfaceOrientation()

vector GetSurfaceOrientation ( float  x,
float  z 
)
inlineprivate

Returns tilt of the ground on the given position in degrees, so you can use this value to rotate any item according to terrain.

References g_Game, vector::VectorToAngles(), and x.

◆ GetTickTime()

proto native float GetTickTime ( )
private

Returns current time from start of the game.

Returns
time in seconds

◆ GetTime()

proto int GetTime ( )
private

returns mission time in milliseconds

◆ GetTimerQueue() [1/2]

override TimerQueue GetTimerQueue ( int  call_category)
inlineprivate

References m_timerQueue.

Referenced by OnUpdate().

◆ GetTimerQueue() [2/2]

TimerQueue GetTimerQueue ( int  call_category)
inlineprivate

Returns TimerQueue for certain category

Parameters
call_categorycall category, valid values are:
CALL_CATEGORY_SYSTEM - calls & timers in this queue are processed every time without any restrictions
CALL_CATEGORY_GUI - calls & timers in this queue are processed when GUI is enabled (even during pase game)
CALL_CATEGORY_GAMEPLAY - calls & timers in this queue are processed only during mission, when game is not paused

◆ GetUIManager()

◆ GetUpdateQueue() [1/2]

override ScriptInvoker GetUpdateQueue ( int  call_category)
inlineprivate

Referenced by OnUpdate().

◆ GetUpdateQueue() [2/2]

ScriptInvoker GetUpdateQueue ( int  call_category)
inlineprivate

◆ GetUserFOV()

float GetUserFOV ( )
inlineprivate

References m_UserFOV.

Referenced by GetFOVByZoomType().

◆ GetUserFOVFromConfig()

static float GetUserFOVFromConfig ( )
inlinestaticprivate

◆ GetUserManager()

◆ GetVersion()

proto void GetVersion ( out string  version)
private

◆ GetVoiceLevel()

proto native int GetVoiceLevel ( Object  player = null)
private

Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)

◆ GetWaterDepth()

proto native float GetWaterDepth ( vector  posWS)
private

◆ GetWaterSurfaceHeightNoFakeWave()

proto native float GetWaterSurfaceHeightNoFakeWave ( vector  posWS)
private

Get the nearest water or object surface under a point, ignoring land (without the fake wave that's on top of the real wave)

◆ GetWaterSurfaceHeightWithFakeWave()

proto native float GetWaterSurfaceHeightWithFakeWave ( vector  posWS)
private

Get the nearest water or object surface under a point, ignoring land (with the fake wave that's on top of the real wave)

◆ GetWeather()

proto native Weather GetWeather ( )
private

Returns weather controller object.

Referenced by OnUpdate().

◆ GetWorkspace()

proto native WorkspaceWidget GetWorkspace ( )
private

Referenced by CreateTitleScreen().

◆ GetWorld()

proto native World GetWorld ( )
private

Referenced by OnEvent().

◆ GetWorldDirectionFromScreen()

proto native vector GetWorldDirectionFromScreen ( vector  world_pos)
private

Transforms position in world to position in screen in pixels as x, y component of vector, z parameter represents distance between camera and world_pos.

◆ GetWorldName() [1/2]

string GetWorldName ( )
inlineprivate

References g_Game.

◆ GetWorldName() [2/2]

proto void GetWorldName ( out string  world_name)
private

◆ GetYieldDataInitInvoker()

ScriptInvoker GetYieldDataInitInvoker ( )
inlineprivate

◆ GizmoClear()

proto native void GizmoClear ( int  index)
private

Clear the gizmo

◆ GizmoClearAll()

proto native void GizmoClearAll ( )
private

Clear all gizmos

◆ GizmoFindByTracker()

proto native int GizmoFindByTracker ( Managed  tracker)
private

Returned index is invalid if any other Gizmo function is called

◆ GizmoGetCount()

proto native int GizmoGetCount ( )
private

Return the number of gizmos

◆ GizmoGetInstance()

proto native Class GizmoGetInstance ( int  index)
private

Return the instance passed in for the gizmo

◆ GizmoGetTracker()

proto native Managed GizmoGetTracker ( int  index)
private

Return the tracker passed in for the gizmo

◆ GizmoSelectObject()

proto native void GizmoSelectObject ( Object  object)
private

Applies impulses to set the position when dynamic, otherwise sets the transform in the physics scene

Tracker for 'GizmoFind' is the passed in object

◆ GizmoSelectPhysics()

proto native void GizmoSelectPhysics ( Physics  physics)
private

Applies impulses to set the position when dynamic, otherwise sets the transform in the physics scene. Doesn't work in multiplayer

Tracker for 'GizmoFind' is the owned Entity

Note: Currently, GizmoGetInstance doesn't work due to Script Error: 'Physics' can't be compared against 'Class'

◆ GizmoSelectUser()

proto native void GizmoSelectUser ( Managed  instance)
private

Scripted controls, requires the following methods to be implemented in the class void Gizmo_SetWorldTransform(vector[4] transform, bool finalize) void Gizmo_GetWorldTransform(vector[4] transform)

Tracker for 'GizmoFind' is the passed in instance

◆ GlobalsInit()

void GlobalsInit ( )
inlineprivate

◆ GoBuyWorldDLC()

proto native bool GoBuyWorldDLC ( string  sWorldName)
private

◆ HasInventoryJuncture()

proto native bool HasInventoryJuncture ( Man  player,
notnull EntityAI  item 
)
private

◆ HasInventoryJunctureDestination()

proto native bool HasInventoryJunctureDestination ( Man  player,
notnull InventoryLocation  dst 
)
private

◆ HasInventoryJunctureItem()

proto native bool HasInventoryJunctureItem ( notnull EntityAI  item)
private

◆ InitCharacterMenuDataInfo()

void InitCharacterMenuDataInfo ( int  menudata_count)
inlineprivate

◆ InitDamageEffects()

proto native void InitDamageEffects ( Object  effect)
private

Initialization of damage effects.

◆ InitNotifications()

void InitNotifications ( )
inlineprivate

◆ IsAimLogEnabled()

bool IsAimLogEnabled ( )
inlineprivate

References m_AimLoggingEnabled.

◆ IsAppActive()

proto native bool IsAppActive ( )
private

Returns if the application is focused on PC, returns true always on console.

Referenced by RefreshMouseCursorVisibility().

◆ IsBoxColliding()

proto native bool IsBoxColliding ( vector  center,
vector  orientation,
vector  edgeLength,
array< Object excludeObjects,
array< Object collidedObjects = NULL 
)
private

Finds all objects that are in choosen oriented bounding box (OBB)

Parameters
centervector, center of OBB
orientationvector, direction (front vector), used for calculation of OBB rotation
edgeLengthvector, sizes of whole box
excludeObjectsarray<Object>, objects that should be excluded from collision check
collidedObjectsarray<Object>, out parameter, objects that collided with OBB
Returns
bool, true if at least one object collided with OBB, false otherwise
Note
Object that doesn't have collision geometry will be ignored, as this only uses geometry
vector orientation = GetOrientation();
vector size = "10 4 8";
array<Object> excluded_objects = new array<Object>;
excluded_objects.Insert(this);
array<Object> nearby_objects = new array<Object>;
if(g_Game.IsBoxColliding( pos, orientation, size, excluded_objects, nearby_objects))
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}
vector GetOrientation()
Definition AreaDamageManager.c:306
Definition EnConvert.c:119
class array< Class T > PrintString
vector GetPosition()
Get the world position of the Effect.
Definition Effect.c:473

◆ IsBoxCollidingGeometry()

proto native bool IsBoxCollidingGeometry ( vector  center,
vector  orientation,
vector  edgeLength,
int  iPrimaryType,
int  iSecondaryType,
array< Object excludeObjects,
array< Object collidedObjects = NULL 
)
private

Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)

Parameters
centervector, center of OBB
orientationvector, direction (front vector), used for calculation of OBB rotation
edgeLengthvector, sizes of whole box
iPrimaryTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
iSecondaryTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
excludeObjectsarray<Object>, objects that should be excluded from collision check
collidedObjectsarray<Object>, out parameter, objects that collided with OBB
Returns
bool, true if at least one object collided with OBB, false otherwise
vector orientation = GetOrientation();
vector size = "10 4 8";
array<Object> excluded_objects = new array<Object>;
excluded_objects.Insert(this);
array<Object> nearby_objects = new array<Object>;
if(g_Game.IsBoxCollidingGeometry( pos, orientation, size, ObjIntersectView, ObjIntersectGeom, excluded_objects, nearby_objects))
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}

◆ IsBoxCollidingGeometryProxy()

proto native bool IsBoxCollidingGeometryProxy ( notnull BoxCollidingParams  params,
array< Object excludeObjects,
array< ref BoxCollidingResult >  collidedObjects = NULL 
)
private

◆ IsClient()

proto native bool IsClient ( )
private

Referenced by OnUpdate().

◆ IsConnecting()

bool IsConnecting ( )
inlineprivate

References m_IsConnecting.

◆ IsDebug()

proto native bool IsDebug ( )
private

◆ IsDebugMonitor()

bool IsDebugMonitor ( )
inlineprivate

◆ IsDedicatedServer()

proto native bool IsDedicatedServer ( )
private

Robust check which is preferred than the above, as it is valid much sooner.

Note
You may want to use #ifdef SERVER instead for slight performance gain...

Referenced by CGame().

◆ IsDigitalCopy()

static bool IsDigitalCopy ( )
inlinestaticprivate

◆ IsFoodDecayEnabled()

bool IsFoodDecayEnabled ( )
inlineprivate

◆ IsInPartyChat()

proto native bool IsInPartyChat ( )
private

Returns whether user is currently in a voice party (currently only supported on xbox)

◆ IsInventoryOpen() [1/2]

override bool IsInventoryOpen ( )
inlineprivate

References GetUIManager(), and MENU_INVENTORY.

◆ IsInventoryOpen() [2/2]

bool IsInventoryOpen ( )
inlineprivate

◆ IsKindOf()

bool IsKindOf ( string  cfg_class_name,
string  cfg_parent_name 
)
inlineprivate

Returns is class name inherited from parent class name.

Parameters
cfg_class_nameConfig Class name ("Animal_CervusElaphus")
cfg_parent_nameParent Config Class name ("DZ_LightAI")
Returns
bool is class name inherited from parent class name
bool is_kind = g_Game.IsKindOf( "Animal_CervusElaphus", "DZ_LightAI");
>> 1
proto string ToString()

References ConfigGetFullPath(), and string::ToLower().

Referenced by DayZGame().

◆ IsLeftCtrlDown()

bool IsLeftCtrlDown ( )
inlineprivate

References m_IsCtrlHolding.

◆ IsLoading()

bool IsLoading ( )
inlineprivate

Referenced by LoadingHide().

◆ IsMicCapturing()

proto native bool IsMicCapturing ( )
private

Returns whether mic is currently capturing audio from user.

◆ IsMissionMainMenu()

bool IsMissionMainMenu ( )
inlineprivate

Returns true when current mission is Main Menu.

References DayZGame(), and g_Game.

◆ IsMultiplayer()

proto native bool IsMultiplayer ( )
private

Referenced by CGame(), and OnUpdate().

◆ IsNetworkInputBufferFull()

proto native bool IsNetworkInputBufferFull ( )
private

Returns the state of the buffer for network inputs (UAInterface)

Note
See: NetworkInputBufferEventTypeID
Client side only, returns false on the server always
Returns
true, if the buffer is filled and client simulation must stop

◆ IsNewCharacter()

bool IsNewCharacter ( )
inlineprivate

References m_IsNewCharacter.

◆ IsObjectAccesible()

proto native bool IsObjectAccesible ( EntityAI  item,
Man  player 
)
private

returns true if player can access item's cargo/attachments (check only distance)

◆ IsPhysicsExtrapolationEnabled()

proto native bool IsPhysicsExtrapolationEnabled ( )
private

If physics extrapolation is enabled, always true on retail release builds.

◆ IsServer()

proto native bool IsServer ( )
private

◆ IsStressTest()

bool IsStressTest ( )
inlineprivate

References m_IsStressTest.

◆ IsSurfaceDigable()

bool IsSurfaceDigable ( string  surface)
inlineprivate

Checks if the surface is digable.

References ConfigGetInt().

◆ IsSurfaceFertile()

bool IsSurfaceFertile ( string  surface)
inlineprivate

Checks if the surface is fertile.

References ConfigGetInt().

◆ IsVisited()

bool IsVisited ( string  ip,
int  port 
)
inlineprivate

◆ IsWorldWetTempUpdateEnabled()

bool IsWorldWetTempUpdateEnabled ( )
inlineprivate

◆ JoinLaunch()

void JoinLaunch ( )
inlineprivate

◆ ListAvailableCharacters() [1/2]

override TStringArray ListAvailableCharacters ( )
inlineprivate

References m_CharClassNames.

◆ ListAvailableCharacters() [2/2]

TStringArray ListAvailableCharacters ( )
inlineprivate

outputs array of all valid survivor class names

◆ LoadingHide()

void LoadingHide ( bool  force = false)
inlineprivate

◆ LoadingShow()

void LoadingShow ( )
inlineprivate

Referenced by OnEvent().

◆ LoadProgressUpdate()

void LoadProgressUpdate ( int  progressState,
float  progress,
string  title 
)
inlineprivate

◆ LoadVersion()

proto native int LoadVersion ( )
private

Returns actual storage version - loading.

◆ LoginTimeCountdown()

void LoginTimeCountdown ( )
inlineprivate

◆ LogoutRequestCancel()

proto native void LogoutRequestCancel ( )
private

◆ LogoutRequestTime()

proto native void LogoutRequestTime ( )
private

Logout methods.

◆ MainMenuLaunch()

◆ MissionLaunch()

◆ MuteAllPlayers()

proto native void MuteAllPlayers ( string  listenerId,
bool  mute 
)
private

Mute all players for listenerId.

Parameters
listenerIduid of player
mutetrue, if player can not listen anybody. Otherwise false.

◆ MutePlayer()

proto native void MutePlayer ( string  muteUID,
string  playerUID,
bool  mute 
)
private

Mutes voice of source player to target player.

Parameters
muteUIDuid of player you want to mute
playerUIDuid of player that (doesnt't) want to hear muteUID

Referenced by OnRPC().

◆ NightVissionLightParams()

proto native void NightVissionLightParams ( float  lightIntensityMul,
float  noiseIntensity 
)
private

set night vission parameters (set to zero when to disable it)

Parameters
lightIntensityMulmultiplicator of lights intensity
noiseIntensityintensity of noise PP

◆ ObjectDelete()

proto native void ObjectDelete ( Object  obj)
private

◆ ObjectDeleteOnClient()

proto native void ObjectDeleteOnClient ( Object  obj)
private

◆ ObjectGetDisplayName()

proto void ObjectGetDisplayName ( Object  obj,
out string  name 
)
private

◆ ObjectGetSelectionPosition()

proto native vector ObjectGetSelectionPosition ( Object  obj,
string  name 
)
private

◆ ObjectGetSelectionPositionLS()

proto native vector ObjectGetSelectionPositionLS ( Object  obj,
string  name 
)
private

◆ ObjectGetSelectionPositionMS()

proto native vector ObjectGetSelectionPositionMS ( Object  obj,
string  name 
)
private

◆ ObjectGetSelectionPositionWS()

proto native vector ObjectGetSelectionPositionWS ( Object  obj,
string  name 
)
private

◆ ObjectGetType()

proto void ObjectGetType ( Object  obj,
out string  type 
)
private

◆ ObjectIsKindOf()

bool ObjectIsKindOf ( Object  object,
string  cfg_parent_name 
)
inlineprivate

Returns is object inherited from parent class name.

Parameters
objectObject
cfg_parent_nameParent Config Class name ("DZ_LightAI")
Returns
bool is object inherited from parent class name
bool is_kind = g_Game.IsKindOf( my_animal, "DZ_LightAI");
>> 1

References ConfigGetObjectFullPath(), and string::ToLower().

◆ ObjectModelToWorld()

proto native vector ObjectModelToWorld ( Object  obj,
vector  modelPos 
)
private

◆ ObjectRelease()

proto native int ObjectRelease ( Object  obj)
private

RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote objects). do not use if not sure what you do.

◆ ObjectWorldToModel()

proto native vector ObjectWorldToModel ( Object  obj,
vector  worldPos 
)
private

◆ OnActivateMessage() [1/2]

override void OnActivateMessage ( )
inlineprivate

◆ OnActivateMessage() [2/2]

void OnActivateMessage ( )
inlineprivate

Called when recieving focus (windows)

◆ OnAfterCreate() [1/2]

override void OnAfterCreate ( )
inlineprivate

References Math::Randomize().

◆ OnAfterCreate() [2/2]

void OnAfterCreate ( )
inlineprivate

Called after creating of CGame instance.

◆ OnConnectivityStatChange()

protected bool OnConnectivityStatChange ( EConnectivityStatType  type,
EConnectivityStatLevel  newLevel,
EConnectivityStatLevel  oldLevel 
)
inlineprivate

◆ OnDeactivateMessage() [1/2]

override void OnDeactivateMessage ( )
inlineprivate

◆ OnDeactivateMessage() [2/2]

void OnDeactivateMessage ( )
inlineprivate

Called when loosing focus (windows)

◆ OnDeviceReset() [1/2]

override void OnDeviceReset ( )
inlineprivate

◆ OnDeviceReset() [2/2]

void OnDeviceReset ( )
inlineprivate

Called when inputs is not possible (Steam overlay active or something), all internal script variables should be reset here!

◆ OnEvent() [1/2]

override void OnEvent ( EventType  eventTypeId,
Param  params 
)
inlineprivate

References AbortMission(), AddVisitedServer(), ScriptCallQueue::Call(), CALL_CATEGORY_GUI, CALL_CATEGORY_SYSTEM, CancelLoginQueue(), CancelLoginTimeCountdown(), Class::CastTo(), ChatMessageEventTypeID, ClearConnectivityStates(), OnlineServices::ClearCurrentServerInfo(), ConnectingAbortEventTypeID, ConnectingStartEventTypeID, ConnectivityStatsUpdatedEventTypeID, ProgressAsync::DestroyAllPendingProgresses(), DialogQueuedEventTypeID, DLCOwnerShipFailedEventTypeID, OnlineServices::EnterGameplaySession(), g_Game, GetCallQueue(), GetGameState(), GetHostAddress(), ErrorModuleHandler::GetInstance(), VONManager::GetInstance(), GetMission(), PlayerIdentityBase::GetPingAvg(), GetPlayer(), GetUserManager(), GetWorld(), OnlineServices::Init(), OnlineServices::LeaveGameplaySession(), string::Length(), LoadingHide(), LoadingShow(), LoadProgressUpdate(), OnlineServices::LoadVoicePrivilege(), LoginStatusEventTypeID, LoginTimeEventTypeID, LogoutEventTypeID, StatsEventDisconnectedData::m_CharacterId, StatsEventSpawnedData::m_CharacterId, StatsEventSpawnedData::m_DaytimeHour, StatsEventSpawnedData::m_Lifetime, StatsEventSpawnedData::m_Population, StatsEventSpawnedData::m_Position, StatsEventDisconnectedData::m_Reason, mission, MPConnectionLostEventTypeID, MPSessionEndEventTypeID, MPSessionFailEventTypeID, MPSessionPlayerReadyEventTypeID, MPSessionStartEventTypeID, Mission::OnEvent(), ErrorModuleHandler::OnEvent(), VONManagerBase::OnEvent(), OnLoginTimeEvent(), OnMPConnectionLostEvent(), OnPreloadEvent(), OnRespawnEvent(), ParticleManager(), Analytics::PlayerDisconnected(), Analytics::PlayerSpawned(), PreloadEventTypeID, Print(), ProgressEventTypeID, ClientData::ResetClientData(), RespawnEventTypeID, SelectedUserChangedEventTypeID, ServerFpsStatsUpdatedEventTypeID, SetConnecting(), SetConnectivityStatState(), SetGameState(), SetLoadState(), OnlineServices::SetMultiplayState(), StartupEventTypeID, UpdateInputDeviceDisconnectWarning(), WorldCleaupEventTypeID, and vector::Zero.

◆ OnEvent() [2/2]

void OnEvent ( EventType  eventTypeId,
Param  params 
)
inlineprivate

Called when some system event occur.

Parameters
eventTypeIdevent type.
paramsParam object, cast to specific param class to get parameters for particular event.

◆ OnGameplayDataHandlerLoad()

void OnGameplayDataHandlerLoad ( )
inlineprivate

◆ OnInitialize() [1/2]

◆ OnInitialize() [2/2]

bool OnInitialize ( )
inlineprivate

Called once before game update loop starts, ret value indicates if init was done in scripts, otherwise it is done in the engine.

◆ OnKeyPress() [1/2]

◆ OnKeyPress() [2/2]

void OnKeyPress ( int  key)
inlineprivate

Called when key is pressed.

Parameters
keydirect input key code (DIK)

◆ OnKeyRelease() [1/2]

override void OnKeyRelease ( int  key)
inlineprivate

◆ OnKeyRelease() [2/2]

void OnKeyRelease ( int  key)
inlineprivate

Called when key is released.

Parameters
keydirect input key code (DIK)

◆ OnLicenseChanged()

void OnLicenseChanged ( )
inlineprivate

◆ OnLoginTimeEvent()

◆ OnMouseButtonPress() [1/2]

override void OnMouseButtonPress ( int  button)
inlineprivate

◆ OnMouseButtonPress() [2/2]

void OnMouseButtonPress ( int  button)
inlineprivate

Called when mouse button is pressed.

Parameters
button- number of button Mouse API

◆ OnMouseButtonRelease() [1/2]

override void OnMouseButtonRelease ( int  button)
inlineprivate

◆ OnMouseButtonRelease() [2/2]

void OnMouseButtonRelease ( int  button)
inlineprivate

Called when mouse button is released.

Parameters
button- number of button Mouse API

◆ OnMPConnectionLostEvent()

void OnMPConnectionLostEvent ( int  duration)
inlineprivate

◆ OnPostUpdate() [1/2]

◆ OnPostUpdate() [2/2]

void OnPostUpdate ( bool  doSim,
float  timeslice 
)
inlineprivate

Called on World update after simulation of entities.

Parameters
doSimFalse when simulation is paused, True otherwise
timeslicetime elapsed from last call

◆ OnPreloadEvent()

void OnPreloadEvent ( vector  pos)
inlineprivate

◆ OnProcessLifetimeChanged()

void OnProcessLifetimeChanged ( int  plmtype)
inlineprivate

◆ OnProjectileStopped()

◆ OnProjectileStoppedInObject()

◆ OnProjectileStoppedInTerrain()

void OnProjectileStoppedInTerrain ( TerrainCollisionInfo  info)
inlineprivate

◆ OnRespawnEvent()

◆ OnRPC() [1/2]

override void OnRPC ( PlayerIdentity  sender,
Object  target,
int  rpc_type,
ParamsReadContext  ctx 
)
inlineprivate

References NotificationSystem::AddNotification(), NotificationSystem::AddNotificationExtended(), CALL_CATEGORY_GAMEPLAY, ScriptCallQueue::CallLater(), GameConstants::CAMERA_SHAKE_ARTILLERY_DISTANCE, GameConstants::CAMERA_SHAKE_ARTILLERY_DISTANCE2, ParticleList::CONTAMINATED_AREA_GAS_SHELL, DayZPlayerCamera(), vector::DistanceSq(), ErrorEx, g_Game, GetCallQueue(), PlayerIdentityBase::GetPlainId(), CrashSoundSets::GetSoundSetByHash(), Math::InverseLerp(), DebugWeatherRPCData::m_FogDuration, DebugWeatherRPCData::m_FogInterpolation, DebugWeatherRPCData::m_FogValue, DebugWeatherRPCData::m_OvercastDuration, DebugWeatherRPCData::m_OvercastInterpolation, DebugWeatherRPCData::m_OvercastValue, DebugWeatherRPCData::m_RainDuration, DebugWeatherRPCData::m_RainInterpolation, DebugWeatherRPCData::m_RainValue, DebugWeatherRPCData::m_SnowfallDuration, DebugWeatherRPCData::m_SnowfallInterpolation, DebugWeatherRPCData::m_SnowfallValue, DebugWeatherRPCData::m_VolFogDistanceDensity, DebugWeatherRPCData::m_VolFogDistanceDensityTime, DebugWeatherRPCData::m_VolFogHeightBias, DebugWeatherRPCData::m_VolFogHeightBiasTime, DebugWeatherRPCData::m_VolFogHeightDensity, DebugWeatherRPCData::m_VolFogHeightDensityTime, DebugWeatherRPCData::m_WindDDuration, DebugWeatherRPCData::m_WindDInterpolation, DebugWeatherRPCData::m_WindDirectionValue, DebugWeatherRPCData::m_WindMagnitudeValue, MutePlayer(), CfgGameplayHandler::OnRPC(), CfgPlayerRestrictedAreaHandler::OnRPC(), UndergroundAreaLoader::OnRPC(), ParticleManager(), SEffectManager::PlaySound(), Serializer::Read(), EffectSound::SetAutodestroy(), Math::Sqrt(), and vector::Zero.

◆ OnRPC() [2/2]

void OnRPC ( PlayerIdentity  sender,
Object  target,
int  rpc_type,
ParamsReadContext  ctx 
)
inlineprivate

Called after remote procedure call is recieved for this object.

Parameters
targetobject on which remote procedure is called, when NULL, RPC is evaluated by CGame as global
rpc_typeuser defined identification of RPC
ctxread context for params

◆ OnUpdate() [1/2]

◆ OnUpdate() [2/2]

void OnUpdate ( bool  doSim,
float  timeslice 
)
inlineprivate

Called on World update.

Parameters
doSimFalse when simulation is paused, True otherwise
timeslicetime elapsed from last call

◆ OpenURL()

proto native void OpenURL ( string  url)
private

◆ OverrideDOF()

proto native void OverrideDOF ( bool  enable,
float  focusDistance,
float  focusLength,
float  focusLengthNear,
float  blur,
float  focusDepthOffset 
)
private

◆ OverrideInventoryLights()

proto native void OverrideInventoryLights ( vector  diffuse,
vector  ambient,
vector  ground,
vector  dir 
)
private

override inventory light

Parameters
diffusedirectional light
ambientambient light
groundground light
dirdirection of light, Vector(0,0,1) is from camera

◆ PartyLaunch()

◆ PlayMission()

proto native void PlayMission ( string  path)
private

Starts mission (equivalent for SQF playMission). You MUST use double slash \.

Referenced by AutoTestLaunch(), MissionLaunch(), and SelectGamepad().

◆ PreloadObject()

proto native bool PreloadObject ( string  type,
float  distance 
)
private

Preload objects with certain type in certain distance from camera.

Parameters
typeof objects which should be preloaded
distancefrom camera in which objects should be preloaded
Returns
true on success

◆ ProfilerStart()

proto native void ProfilerStart ( string  name)
private

Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.

◆ ProfilerStop()

proto native void ProfilerStop ( string  name)
private

Use for profiling code from start to stop, they must match have same name, look wiki pages for more info: https://confluence.bistudio.com/display/EN/Profiler.

◆ RefreshCurrentServerInfo()

void RefreshCurrentServerInfo ( )
inlineprivate

◆ RefreshMouseCursorVisibility()

void RefreshMouseCursorVisibility ( )
inlineprivate

◆ RegisterNetworkStaticObject()

proto native bool RegisterNetworkStaticObject ( Object  object)
private

Static objects cannot be replicated by default (there are too many objects on the map). Use this method when you want to replicate some scripted variables. Cannot be called in object's constructor, because networking is not initialized yet.

Parameters
objectstatic object to replicate
Returns
false, if registration wasn't successful or when object is already registered

◆ RegisterProfilesOptions()

◆ ReloadMission()

void ReloadMission ( )
inlineprivate

References CreateMission(), and Print().

◆ RemoteObjectCreate()

proto native void RemoteObjectCreate ( Object  obj)
private

RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not sure what you do.

◆ RemoteObjectDelete()

proto native void RemoteObjectDelete ( Object  obj)
private

◆ RemoteObjectTreeCreate()

proto native void RemoteObjectTreeCreate ( Object  obj)
private

RemoteObjectCreate - postponed registration of network object (and creation of remote object). do not use if not sure what you do.

◆ RemoteObjectTreeDelete()

proto native void RemoteObjectTreeDelete ( Object  obj)
private

RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure what you do.

◆ RemoveFromReconnectCache()

proto native void RemoveFromReconnectCache ( string  uid)
private

Remove player from reconnect cache.

Note
Works only on server
Parameters
uidof the player

◆ RemoveVoiceNotification()

void RemoveVoiceNotification ( VONStopSpeakingEventParams  vonStopParams)
inlineprivate

◆ ReportModded()

static bool ReportModded ( )
inlinestaticprivate

References m_ReportModded.

◆ RequestExit()

proto native void RequestExit ( int  code)
private

Sets exit code and quits in the right moment.

Referenced by AutoTestLaunch(), and OnKeyPress().

◆ RequestRestart()

proto native void RequestRestart ( int  code)
private

Sets exit code and restart in the right moment.

◆ ResetPPMask()

proto native void ResetPPMask ( )
private

◆ ResetProfileOptions()

void ResetProfileOptions ( )
inlineprivate

Referenced by SelectGamepad().

◆ RespawnPlayer()

proto native void RespawnPlayer ( )
private

◆ RestartMission()

proto native void RestartMission ( )
private

◆ RPC()

proto native void RPC ( Object  target,
int  rpcType,
notnull array< ref Param params,
bool  guaranteed,
PlayerIdentity  recipient = null 
)
private

Initiate remote procedure call. When called on client, RPC is evaluated on server; When called on server, RPC is executed on all clients.

Parameters
targetobject on which remote procedure is called, when NULL, RPC is evaluated by CGame as global
rpc_typeuser defined identification of RPC
paramscustom params array
recipientspecified client to send RPC to. If NULL, RPC will be send to all clients (specifying recipient increase security and decrease network traffic)
const int RPC_LOW_BLOOD_PRESSURE_EFFECT = 0;
...
// on server side, after blood pressure of player is low...
Param1<float> p = new Param1<float>(m_blood_pressure);
params.Insert(p);
g_Game.RPC(player, RPC_LOW_BLOOD_PRESSURE_EFFECT, params);
// or shortcut
g_Game.RPCSingleParam(player, RPC_LOW_BLOOD_PRESSURE_EFFECT, p);
...
// on client
{
// override OnRPC function
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
{
// dont forget to propagate this call trough class hierarchy!
super.OnRPC(rpc_type, ctx);
switch(rpc_type)
{
case RPC_LOW_BLOOD_PRESSURE_EFFECT:
Param1<float> p = Param1<float>(0);
if (ctx.Read(p))
{
float blood_pressure = p.param1;
float effect_intensity = 1.0 - blood_pressure;
ShowFancyScreenEffect(effect_intensity);
}
break;
}
}
}
override void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
Definition DayZGame.c:3086
Definition PlayerBaseClient.c:2
The class that will be instanced (moddable)
Definition gameplay.c:389
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
proto bool Read(void value_in)

◆ RPCSelf()

proto native void RPCSelf ( Object  target,
int  rpcType,
notnull array< ref Param params 
)
private

Not actually an RPC, as it will send it only to yourself.

◆ RPCSelfSingleParam()

proto native void RPCSelfSingleParam ( Object  target,
int  rpcType,
Param  param 
)
private

◆ RPCSingleParam()

proto native void RPCSingleParam ( Object  target,
int  rpc_type,
Param  param,
bool  guaranteed,
PlayerIdentity  recipient = null 
)
private

see CGame.RPC

◆ SaveProfile()

proto native void SaveProfile ( )
private

Saves profile on disk.

Referenced by AddVisitedServer().

◆ SaveVersion()

proto native int SaveVersion ( )
private

Returns actual storage version - saving.

◆ ScriptTest()

proto native bool ScriptTest ( )
private

◆ SelectGamepad()

◆ SelectPlayer()

proto native void SelectPlayer ( PlayerIdentity  identity,
Object  player 
)
private

Selects player's controlled object.

Parameters
identityidentity used in MP (use NULL in singleplayer)
playerobject which should be controlled by player
Note
We can use only instances of DayZPlayer now

◆ SelectSpectator()

proto native void SelectSpectator ( PlayerIdentity  identity,
string  spectatorObjType,
vector  position 
)
private

Creates spectator object (mostly cameras)

Parameters
identityidentity used in MP (use NULL in singleplayer)
spectatorObjTypeclassname for spectator object (like cameras)
positionwhere to create spectator instance

◆ SelectUser()

◆ SendLogoutTime()

proto native void SendLogoutTime ( Object  player,
int  time 
)
private

Inform client about logout time (creates logout screen on specified client)

Note
Works only on server
Parameters
playerobject which is logging out
timelength of logout

◆ ServerConfigGetInt()

proto native int ServerConfigGetInt ( string  name)
private

Server config parsing. Returns 0 if not found.

◆ SetConnecting()

void SetConnecting ( bool  value)
inlineprivate

Returns true when connecting to server.

Referenced by Connect(), and OnEvent().

◆ SetConnectivityStatState()

void SetConnectivityStatState ( EConnectivityStatType  type,
EConnectivityStatLevel  level 
)
inlineprivate

◆ SetDatabaseID()

void SetDatabaseID ( string  id)
inlineprivate

◆ SetDebugMonitorEnabled()

void SetDebugMonitorEnabled ( int  value)
inlineprivate

References m_DebugMonitorEnabled.

◆ SetDiagDrawMode()

proto native void SetDiagDrawMode ( int  diag_draw_mode)
private

Set debug draw mode.

◆ SetDiagModeEnable()

proto native void SetDiagModeEnable ( int  diag_mode,
bool  enabled 
)
private

Set specific debug mode.

◆ SetEVUser()

proto native void SetEVUser ( float  value)
private

Sets custom camera camera EV. range: -50.0..50.0? //TODO.

Referenced by SetEVValue().

◆ SetEVValue()

void SetEVValue ( float  value)
inlineprivate

References m_EVValue, and SetEVUser().

◆ SetGameState()

void SetGameState ( DayZGameState  state)
inlineprivate

◆ SetHudBrightness()

void SetHudBrightness ( float  value)
inlineprivate

Referenced by OnInitialize().

◆ SetKeyboardHandle()

void SetKeyboardHandle ( UIScriptedMenu  handler)
inlineprivate

◆ SetLoadState()

void SetLoadState ( DayZLoadState  state)
inlineprivate

◆ SetLoginTimerFinished()

proto native void SetLoginTimerFinished ( )
private

◆ SetMainMenuWorld()

proto native void SetMainMenuWorld ( string  world)
private

Referenced by DayZGame().

◆ SetMission()

proto native void SetMission ( Mission  mission)
private

◆ SetMissionPath()

void SetMissionPath ( string  path)
inlineprivate

Called from C++.

References string::IndexOfFrom(), path, and string::Substring().

◆ SetMissionState()

void SetMissionState ( int  state)
inlineprivate

◆ SetMouseCursorDesiredVisibility()

void SetMouseCursorDesiredVisibility ( bool  visible)
inlineprivate

◆ SetNewCharacter()

void SetNewCharacter ( bool  state)
inlineprivate

◆ SetPlayerGameName()

void SetPlayerGameName ( string  name)
inlineprivate

References name.

Referenced by SelectGamepad().

◆ SetPlayerName()

proto native void SetPlayerName ( string  name)
private

Sets current player name.

Parameters
name

Referenced by SelectGamepad().

◆ SetPreviousGamepad()

void SetPreviousGamepad ( int  gamepad)
inlineprivate

◆ SetProfileOption()

void SetProfileOption ( EDayZProfilesOptions  option,
bool  value 
)
inlineprivate

Referenced by SetProfileOptionBool().

◆ SetProfileOptionBool()

void SetProfileOptionBool ( EDayZProfilesOptions  option,
bool  value 
)
inlineprivate

References SetProfileOption().

◆ SetProfileOptionFloat()

void SetProfileOptionFloat ( EDayZProfilesOptions  option,
float  value 
)
inlineprivate

◆ SetProfileOptionInt()

void SetProfileOptionInt ( EDayZProfilesOptions  option,
int  value 
)
inlineprivate

◆ SetProfileString()

proto native void SetProfileString ( string  name,
string  value 
)
private

Sets string to profile variable.

Parameters
nameof the variable
valueto set

◆ SetProfileStringList()

proto native void SetProfileStringList ( string  name,
TStringArray  values 
)
private

Sets array of strings to profile variable.

Parameters
nameof the variable
valuesto set

Referenced by AddVisitedServer().

◆ SetUserFOV()

void SetUserFOV ( float  pFov)
inlineprivate

Referenced by SelectGamepad().

◆ SetVoiceEffect()

proto native void SetVoiceEffect ( Object  player,
int  effect,
bool  enable 
)
private

Enable/disable VoN effect (only on server)

Parameters
playerin question
voiceeffect (VoiceEffectMumbling = 1, VoiceEffectExtortion = 2, VoiceEffectObstruction = 4)
enableor disable effect

◆ SetVoiceLevel()

proto native void SetVoiceLevel ( int  level)
private

Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1, VoiceLevelShout = 2)

Parameters
levelof voice

◆ ShouldShowControllerDisconnect()

bool ShouldShowControllerDisconnect ( )
inlineprivate

◆ StartRandomCutscene()

proto native void StartRandomCutscene ( string  world)
private

Starts intro.

Referenced by MainMenuLaunch(), and PartyLaunch().

◆ StorageVersion()

proto native void StorageVersion ( int  iVersion)
private

Set actual storage version - for next save.

Referenced by CGame().

◆ StoreLoginData()

proto native void StoreLoginData ( ParamsWriteContext  ctx)
private

Stores login userdata as parameters which are sent to server

Referenced by StoreLoginDataPrepare().

◆ StoreLoginDataPrepare()

◆ SurfaceGetNoiseMultiplier()

proto native float SurfaceGetNoiseMultiplier ( Object  directHit,
vector  pos,
int  componentIndex 
)
private

◆ SurfaceGetNormal()

proto native vector SurfaceGetNormal ( float  x,
float  z 
)
private

◆ SurfaceGetSeaLevel()

proto native float SurfaceGetSeaLevel ( )
private

◆ SurfaceGetSeaLevelMax()

proto native float SurfaceGetSeaLevelMax ( )
private

◆ SurfaceGetSeaLevelMin()

proto native float SurfaceGetSeaLevelMin ( )
private

◆ SurfaceGetSeaWaveCurrent()

proto native float SurfaceGetSeaWaveCurrent ( )
private

Get current sea wave height.

◆ SurfaceGetSeaWaveMax()

proto native float SurfaceGetSeaWaveMax ( )
private

Get max sea wave height.

◆ SurfaceGetType()

proto float SurfaceGetType ( float  x,
float  z,
out string  type 
)
private

Returns: Y position the surface was found.

◆ SurfaceGetType3D()

proto float SurfaceGetType3D ( float  x,
float  y,
float  z,
out string  type 
)
private

Y input: Maximum Y to trace down from; Returns: Y position the surface was found.

◆ SurfaceIsPond()

proto native bool SurfaceIsPond ( float  x,
float  z 
)
private

◆ SurfaceIsSea()

proto native bool SurfaceIsSea ( float  x,
float  z 
)
private

◆ SurfaceRoadY()

proto native float SurfaceRoadY ( float  x,
float  z,
RoadSurfaceDetection  rsd = RoadSurfaceDetection.LEGACY 
)
private

◆ SurfaceRoadY3D()

proto native float SurfaceRoadY3D ( float  x,
float  y,
float  z,
RoadSurfaceDetection  rsd 
)
private

◆ SurfaceUnderObject()

proto void SurfaceUnderObject ( notnull Object  object,
out string  type,
out int  liquidType 
)
private

◆ SurfaceUnderObjectByBone()

proto void SurfaceUnderObjectByBone ( notnull Object  object,
int  boneType,
out string  type,
out int  liquidType 
)
private

◆ SurfaceUnderObjectByBoneCorrectedLiquid()

void SurfaceUnderObjectByBoneCorrectedLiquid ( notnull Object  object,
int  boneType,
out string  type,
out int  liquidType 
)
inlineprivate

◆ SurfaceUnderObjectCorrectedLiquid()

void SurfaceUnderObjectCorrectedLiquid ( notnull Object  object,
out string  type,
out int  liquidType 
)
inlineprivate

◆ SurfaceUnderObjectEx()

proto void SurfaceUnderObjectEx ( notnull Object  object,
out string  type,
out string  impact,
out int  liquidType 
)
private

◆ SurfaceUnderObjectExCorrectedLiquid()

void SurfaceUnderObjectExCorrectedLiquid ( notnull Object  object,
out string  type,
out string  impact,
out int  liquidType 
)
inlineprivate

◆ SurfaceY()

proto native float SurfaceY ( float  x,
float  z 
)
private

◆ TryConnect()

◆ UpdateInputDeviceDisconnectWarning()

◆ UpdateLoginQueue()

void UpdateLoginQueue ( float  timeslice)
inlineprivate

Display login queue position dialog

manually update static login queue dialog

References UIManager::CloseAll(), EnterLoginQueue(), UIManager::GetLoginQueuePosition(), UIManager::GetMenu(), GetMission(), GetUIManager(), UIScriptedMenu::SetPosition(), and UIManager::ShowScriptedMenu().

Referenced by OnUpdate().

◆ UpdatePathgraphRegion()

proto native void UpdatePathgraphRegion ( vector  regionMin,
vector  regionMax 
)
private

◆ UpdatePathgraphRegionByObject()

void UpdatePathgraphRegionByObject ( Object  object)
inlineprivate

◆ UpdateSpectatorPosition()

proto native void UpdateSpectatorPosition ( vector  position)
private

Updates spectator position on server = position of network bubble.

Parameters
position

◆ UpdateVoiceLevel()

void UpdateVoiceLevel ( int  level)
inlineprivate

◆ VerifyWorldOwnership()

proto native bool VerifyWorldOwnership ( string  sWorldName)
private

Field Documentation

◆ ARROW_PIERCE_DEPTH

const float ARROW_PIERCE_DEPTH = 0.05
private

◆ Event_OnRPC

ref ScriptInvoker Event_OnRPC = new ScriptInvoker()
staticprivate

◆ GameScript

ScriptModule GameScript
private

◆ m_AimLoggingEnabled

private bool m_AimLoggingEnabled
private

Referenced by IsAimLogEnabled().

◆ m_AmmoShakeParams

ref AmmoCamParams m_AmmoShakeParams = new AmmoCamParams()
staticprivate

◆ m_AnalyticsManagerClient

ref AnalyticsManagerClient m_AnalyticsManagerClient
private

Referenced by CGame(), and GetAnalyticsClient().

◆ m_AnalyticsManagerServer

ref AnalyticsManagerServer m_AnalyticsManagerServer
private

Referenced by CGame(), and GetAnalyticsServer().

◆ m_ArtySound

private ref EffectSound m_ArtySound
private

◆ m_AutotestEnabled

bool m_AutotestEnabled
private

◆ m_Backlit

private ref Backlit m_Backlit
private

Referenced by GetBacklit().

◆ m_BillboardSetHandler

protected ref BillboardSetHandler m_BillboardSetHandler
private

Referenced by GetBillboardHandler().

◆ m_callQueue

private ref ScriptCallQueue m_callQueue[CALL_CATEGORY_COUNT]
private

◆ m_CharacterData

ref MenuDefaultCharacterData m_CharacterData
private

◆ m_CharClassNames

private ref array<string> m_CharClassNames = new array<string>()
private

Referenced by ListAvailableCharacters().

◆ m_ConnectAddress

protected string m_ConnectAddress
private

Referenced by Connect().

◆ m_ConnectedInputDeviceList

private ref array<int> m_ConnectedInputDeviceList
private

◆ m_ConnectFromJoin

private bool m_ConnectFromJoin
private

◆ m_connectionLost

private ref ConnectionLost m_connectionLost
private

◆ m_ConnectivityStatsStates

private EConnectivityStatLevel m_ConnectivityStatsStates[STATS_COUNT]
private

◆ m_ConnectPassword

protected string m_ConnectPassword
private

◆ m_ConnectPort

protected int m_ConnectPort
private

◆ m_ConnectSteamQueryPort

protected int m_ConnectSteamQueryPort
private

◆ m_CrashSound

private ref EffectSound m_CrashSound
private

◆ m_CursorDesiredVisibilityScript

private bool m_CursorDesiredVisibilityScript = true
private

◆ m_DatabaseID

protected string m_DatabaseID
private

Referenced by GetDatabaseID().

◆ m_DayZProfileOptions

private ref DayZProfilesOptions m_DayZProfileOptions
private

◆ m_DebugMonitorEnabled

int m_DebugMonitorEnabled
private

◆ m_DeltaTime

private float m_DeltaTime
private

Referenced by GetDeltaT().

◆ m_dragQueue

private ref DragQueue m_dragQueue
private

Referenced by GetDragQueue().

◆ m_early_access_dialog_accepted

private bool m_early_access_dialog_accepted
private

◆ m_EVValue

float m_EVValue = 0
private

Referenced by GetCurrentEVValue(), and SetEVValue().

◆ m_FirstConnect

protected bool m_FirstConnect = true
private

◆ m_FoodDecayModifier

private float m_FoodDecayModifier
private

Referenced by GetFoodDecayModifier().

◆ m_GamepadDisconnectMenu

protected ref Widget m_GamepadDisconnectMenu
private

◆ m_GameState

protected DayZGameState m_GameState
private

Referenced by GetGameState().

◆ m_IntroMenu

protected ref Widget m_IntroMenu
private

Referenced by DeleteTitleScreen().

◆ m_IsConnecting

private bool m_IsConnecting
private

Referenced by IsConnecting().

◆ m_IsCtrlHolding

private bool m_IsCtrlHolding
private

Referenced by IsLeftCtrlDown().

◆ m_IsFoodDecayEnabled

private bool m_IsFoodDecayEnabled = true
private

◆ m_IsLeftAltHolding

private bool m_IsLeftAltHolding
private

◆ m_IsNewCharacter

private bool m_IsNewCharacter
private

Referenced by IsNewCharacter().

◆ m_IsRightAltHolding

private bool m_IsRightAltHolding
private

◆ m_IsStressTest

private bool m_IsStressTest
private

Referenced by IsStressTest().

◆ m_IsWinHolding

private bool m_IsWinHolding
private

◆ m_IsWorldWetTempUpdateEnabled

private bool m_IsWorldWetTempUpdateEnabled = true
private

◆ m_keyboard_handler

private UIScriptedMenu m_keyboard_handler
private

◆ m_loading

ref LoadingScreen m_loading
private

◆ m_LoadState

protected DayZLoadState m_LoadState
private

Referenced by GetLoadState().

◆ m_LoginQueue

private ref LoginQueueBase m_LoginQueue
private

Referenced by CancelLoginQueue().

◆ m_LoginTime

private int m_LoginTime
private

◆ m_LoginTimeScreen

private ref LoginTimeBase m_LoginTimeScreen
private

◆ m_mission_module

private ScriptModule m_mission_module
private

◆ m_MissionFolderPath

private string m_MissionFolderPath
private

Referenced by GetMissionFolderPath().

◆ m_MissionPath

private string m_MissionPath
private

Referenced by GetMissionPath().

◆ m_MissionState

private int m_MissionState
private

Referenced by GetMissionState().

◆ m_NoiseParams

ref NoiseParams m_NoiseParams = new NoiseParams()
staticprivate

◆ m_Notifications

protected ref NotificationUI m_Notifications
private

◆ m_OriginalCharactersCount

int m_OriginalCharactersCount
private

◆ m_ParamCache

private ref array<ref Param> m_ParamCache
private

Referenced by CGame().

◆ m_PlayerName

private string m_PlayerName
private

Referenced by GetPlayerGameName().

◆ m_postUpdateQueue

private ref ScriptInvoker m_postUpdateQueue[CALL_CATEGORY_COUNT]
private

◆ m_PrevBlur

protected int m_PrevBlur
private

◆ m_PreviousEVValue

float m_PreviousEVValue
private

Referenced by GetPreviousEVValue().

◆ m_PreviousGamepad

private int m_PreviousGamepad
private

Referenced by GetPreviousGamepad().

◆ m_ReportModded

bool m_ReportModded
staticprivate

Referenced by ReportModded().

◆ m_ShouldShowControllerDisconnect

private bool m_ShouldShowControllerDisconnect
private

◆ m_TAManager

ref TemperatureAccessManager m_TAManager = new TemperatureAccessManager()
staticprivate

◆ m_timerQueue

private ref TimerQueue m_timerQueue[CALL_CATEGORY_COUNT]
private

◆ m_updateQueue

private ref ScriptInvoker m_updateQueue[CALL_CATEGORY_COUNT]
private

◆ m_UserFOV

private float m_UserFOV
private

Referenced by GetUserFOV().

◆ m_Visited

protected ref TStringArray m_Visited
private

◆ m_volume_music

float m_volume_music
private

◆ m_volume_radio

float m_volume_radio
private

◆ m_volume_sound

float m_volume_sound
private

◆ m_volume_speechEX

float m_volume_speechEX
private

◆ m_volume_VOIP

float m_volume_VOIP
private

◆ m_YieldDataInitInvoker

private ref ScriptInvoker m_YieldDataInitInvoker
private

Referenced by GetYieldDataInitInvoker().

◆ MAX_VISITED

protected const int MAX_VISITED = 50
private

◆ MIN_ARTY_SOUND_RANGE

private const int MIN_ARTY_SOUND_RANGE = 300
private

◆ MISSION_STATE_FINNISH

const int MISSION_STATE_FINNISH = 2
private

◆ MISSION_STATE_GAME

const int MISSION_STATE_GAME = 1
private

Referenced by DayZGame().

◆ MISSION_STATE_MAINMENU

const int MISSION_STATE_MAINMENU = 0
private

◆ STATS_COUNT

private const int STATS_COUNT = EConnectivityStatType.COUNT
private

Referenced by ClearConnectivityStates().


The documentation for this class was generated from the following files: