25 for (
int i = 0;
i <
GetGame().m_EnergyManagerArray.Count(); ++
i)
27 if (
GetGame().m_EnergyManagerArray[
i])
460 ret =
value.Replace(
"$STR_",
"#STR_");
496 return "UNKNOWN_P3D_FILE";
1053 float high = -9999999;
1054 float low = 99999999;
1090 return ConfigGetInt(
"CfgSurfaces " + surface +
" isDigable");
1096 return ConfigGetInt(
"CfgSurfaces " + surface +
" isFertile");
1103 vector pos =
object.GetPosition();
1105 float radius =
object.ClippingInfo(
min_max);
1376 return (
g_Game.GetMissionState() ==
DayZGame.MISSION_STATE_MAINMENU);
1388 GetGame().GetMenuData().RequestGetDefaultCharacterData();
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
static int GAME_STORAGE_VERSION
class OptionSelectorMultistate extends OptionSelector class_name
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
enum WaveKind AbstractSoundScene()
class SoundObjectBuilder SoundObject(SoundParams soundParams)
Static data holder for certain ammo config values.
static void Cleanup()
Clean up the data.
static void Init()
Initialize the containers: this is done this way, to have these not exist on server.
Class that holds parameters to feed into CGame.IsBoxCollidingGeometryProxy.
proto void ObjectGetDisplayName(Object obj, out string name)
proto native UIManager GetUIManager()
proto native vector GetScreenPosRelative(vector world_pos)
Transforms position in world to position in screen in percentage (0.0 - 1.0) as x,...
proto native void ConfigGetTextArrayRaw(string path, out TStringArray values)
Get array of raw strings from config on path.
proto bool ConfigGetChildName(string path, int index, out string name)
Get name of subclass in config class on path.
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 GetServersResultRow GetHostData()
Gets the server data. (from client)
float GetHighestSurfaceYDifference(array< vector > positions)
Returns the largest height difference between the given positions.
proto native void MuteAllPlayers(string listenerId, bool mute)
Mute all players for listenerId.
proto void SurfaceUnderObjectByBone(notnull Object object, int boneType, out string type, out int liquidType)
proto native void CopyToClipboard(string text)
void OnRPC(PlayerIdentity sender, Object target, int rpc_type, ParamsReadContext ctx)
Called after remote procedure call is recieved for this object.
proto native void ConfigGetFullPath(string path, out TStringArray full_path)
proto native int GetDiagDrawMode()
Gets current debug draw mode.
proto native void RestartMission()
proto native bool AddInventoryJuncture(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms)
proto native void ResetPPMask()
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 IsMicCapturing()
Returns whether mic is currently capturing audio from user.
proto native NoiseSystem GetNoiseSystem()
proto native bool HasInventoryJunctureDestination(Man player, notnull InventoryLocation dst)
proto native int LoadVersion()
Returns actual storage version - loading.
proto native vector ConfigGetVector(string path)
Get vector value from config on path.
proto native bool IsInPartyChat()
Returns whether user is currently in a voice party (currently only supported on xbox)
proto void GetWorldName(out string world_name)
proto native float SurfaceY(float x, float z)
proto native float GetTickTime()
Returns current time from start of the game.
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 void GetInventoryItemSize(InventoryItem item, out int width, out int height)
proto native bool VerifyWorldOwnership(string sWorldName)
proto native void AddPPMask(float ndcX, float ndcY, float ndcRadius, float ndcBlur)
proto native float ConfigGetFloat(string path)
Get float value from config on path.
proto native float SurfaceGetSeaLevel()
proto native void GetPlayers(out array< Man > players)
proto native void EnableVoN(Object player, bool enable)
Enable/disable VoN for target player.
proto native float GetWaterDepth(vector posWS)
proto native void GetPlayerIndentities(out array< PlayerIdentity > identities)
proto native WorkspaceWidget GetLoadingWorkspace()
proto owned string GetHostName()
Gets the server name. (from client)
void OnMouseButtonPress(int button)
Called when mouse button is pressed.
proto native void PlayMission(string path)
Starts mission (equivalent for SQF playMission). You MUST use double slash \.
void OnPostUpdate(bool doSim, float timeslice)
Called on World update after simulation of entities.
proto native void SetVoiceEffect(Object player, int effect, bool enable)
Enable/disable VoN effect (only on server)
proto native void SelectPlayer(PlayerIdentity identity, Object player)
Selects player's controlled object.
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 i...
void OnAfterCreate()
Called after creating of CGame instance.
string CreateDefaultPlayer()
returns class name of first valid survivor (TODO address confusing naming?)
proto native void SetPlayerName(string name)
Sets current player name.
proto native void SetProfileString(string name, string value)
Sets string to profile variable.
proto native void AddToReconnectCache(PlayerIdentity identity)
Add player to reconnect cache to be able to rejoin character still existing in the world.
proto native World GetWorld()
string ConfigPathToString(TStringArray array_path)
Converts array of strings into single string.
proto native void ConfigGetIntArray(string path, out TIntArray values)
Get array of integers from config on path.
proto native vector GetScreenPos(vector world_pos)
Transforms position in world to position in screen in pixels as x, y component of vector,...
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 bool GoBuyWorldDLC(string sWorldName)
proto native vector ObjectGetSelectionPositionMS(Object obj, string name)
proto native void BeginOptionsVideo()
proto void SurfaceGetType3D(float x, float y, float z, out string type)
proto native vector GetWorldDirectionFromScreen(vector world_pos)
Transforms position in world to position in screen in pixels as x, y component of vector,...
proto native bool IsBoxCollidingGeometryProxy(notnull BoxCollidingParams params, array< Object > excludeObjects, array< ref BoxCollidingResult > collidedObjects=NULL)
proto native bool IsMultiplayer()
string GetModelName(string class_name)
Get name of the p3d file of the given class name.
proto native float SurfaceRoadY(float x, float z, RoadSurfaceDetection rsd=RoadSurfaceDetection.LEGACY)
proto native void MutePlayer(string muteUID, string playerUID, bool mute)
Mutes voice of source player to target player.
proto native void RequestRestart(int code)
Sets exit code and restart in the right moment.
DayZPlayer GetPlayerByIndex(int index=0)
proto native bool SurfaceIsSea(float x, float z)
proto native vector ObjectGetSelectionPositionWS(Object obj, string name)
bool IsKindOf(string cfg_class_name, string cfg_parent_name)
Returns is class name inherited from parent class name.
proto native int SaveVersion()
Returns actual storage version - saving.
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
proto native SoundWaveOnVehicle CreateSoundWaveOnObject(Object source, SoundObject soundObject, AbstractWave soundWave)
proto native Entity CreatePlayer(PlayerIdentity identity, string name, vector pos, float radius, string spec)
Assign player entity to client (in multiplayer)
proto native void UpdateSpectatorPosition(vector position)
Updates spectator position on server = position of network bubble.
void OnKeyPress(int key)
Called when key is pressed.
void SetDebugMonitorEnabled(int value)
proto native void GetProfileStringList(string name, out TStringArray values)
Gets array of strings from profile variable.
ref array< ref Param > m_ParamCache
proto native void SelectSpectator(PlayerIdentity identity, string spectatorObjType, vector position)
Creates spectator object (mostly cameras)
proto native BiosUserManager GetUserManager()
proto native void DumpInstances(bool csvFormatting)
Delevoper only: Dump all script allocations.
proto native bool IsDebug()
proto native void ConfigGetObjectFullPath(Object obj, out TStringArray full_path)
string ConfigGetTextOut(string path)
Get string value from config on path.
bool IsSurfaceFertile(string surface)
Checks if the surface is fertile.
proto native void GetDiagModeNames(out TStringArray diag_names)
Get list of all debug modes.
ScriptCallQueue GetCallQueue(int call_category)
proto native void GetModInfos(notnull out array< ref ModInfo > modArray)
proto bool ConfigGetTextRaw(string path, out string value)
Get raw string value from config on path.
proto native bool GetModToBeReported()
proto native vector SurfaceGetNormal(float x, float z)
proto native void SetMainMenuWorld(string world)
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)
void RPCSelfSingleParam(Object target, int rpcType, Param param)
proto native void RequestExit(int code)
Sets exit code and quits in the right moment.
bool ClearJunctureEx(Man player, notnull EntityAI item)
proto native vector GetPointerDirection()
Returns the direction where the mouse points, from the camera view.
bool ObjectIsKindOf(Object object, string cfg_parent_name)
Returns is object inherited from parent class name.
proto native void ClearReconnectCache()
Remove all player from reconnect cache.
bool FormatRawConfigStringKeys(inout string value)
Changes localization key format to script-friendly format.
proto native MenuData GetMenuData()
Return singleton of MenuData class - at main menu contains characters played with current profile.
proto native bool ConfigIsExisting(string path)
proto native AbstractSoundScene GetSoundScene()
proto native void ChatMP(Man recipient, string text, string colorClass)
proto native vector ObjectGetSelectionPositionLS(Object obj, string name)
proto native bool AddActionJuncture(Man player, notnull EntityAI item, int timeout_ms)
proto native void RemoteObjectTreeDelete(Object obj)
RemoteObjectDelete - deletes only remote object (unregisters from network). do not use if not sure wh...
proto native void UpdatePathgraphRegion(vector regionMin, vector regionMax)
void OnProcessLifetimeChanged(int plmtype)
proto native void InitDamageEffects(Object effect)
Initialization of damage effects.
proto native int ConfigGetInt(string path)
Get int value from config on path.
proto native bool IsServer()
proto native void DisconnectPlayer(PlayerIdentity identity, string uid="")
Destroy player info and disconnect.
proto native void SetMission(Mission mission)
void OnActivateMessage()
Called when recieving focus (windows)
bool IsSurfaceDigable(string surface)
Checks if the surface is digable.
UIScriptedMenu CreateScriptedMenu(int id)
create custom main menu part (submenu)
proto native void ObjectDeleteOnClient(Object obj)
proto bool ConfigGetBaseName(string path, out string base_name)
Get name of base class of config class on path.
proto native bool RegisterNetworkStaticObject(Object object)
Static objects cannot be replicated by default (there are too many objects on the map)....
void UpdatePathgraphRegionByObject(Object object)
proto native void ConfigGetTextArray(string path, out TStringArray values)
Get array of strings from config on path.
proto native bool IsPhysicsExtrapolationEnabled()
If physics extrapolation is enabled, always true on retail release builds.
proto native bool ClearJuncture(Man player, notnull EntityAI item)
proto void FormatString(string format, string params[], out string output)
proto native void AdminLog(string text)
proto native int GetVoiceLevel(Object player=null)
Get voice level of VoN (on both client and server) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
bool IsMissionMainMenu()
Returns true when current mission is Main Menu.
proto native void OverrideInventoryLights(vector diffuse, vector ambient, vector ground, vector dir)
proto native void LogoutRequestTime()
Logout methods.
proto native bool SurfaceIsPond(float x, float z)
proto native void LogoutRequestCancel()
proto bool ConfigGetText(string path, out string value)
Get string value from config on path.
proto bool GetProfileString(string name, out string value)
Gets string from profile variable.
proto native void Chat(string text, string colorClass)
Prints text into game chat.
int m_DebugMonitorEnabled
ScriptInvoker GetUpdateQueue(int call_category)
proto native float GetFps()
Returns average FPS of last 16 frames.
void OnEvent(EventType eventTypeId, Param params)
Called when some system event occur.
proto native owned string GetMainMenuWorld()
proto native bool ScriptTest()
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 ser...
proto native DayZPlayer GetPlayer()
proto native void StorageVersion(int iVersion)
Set actual storage version - for next save.
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 i...
proto native WorkspaceWidget GetWorkspace()
UIScriptedWindow CreateScriptedWindow(int id)
create custom window part
proto native void RemoteObjectDelete(Object obj)
proto native void EndOptionsVideo()
proto native void OverrideDOF(bool enable, float focusDistance, float focusLength, float focusLengthNear, float blur, float focusDepthOffset)
proto native void SendLogoutTime(Object player, int time)
Inform client about logout time (creates logout screen on specified client)
AnalyticsManagerServer GetAnalyticsServer()
proto native Object CreateObjectEx(string type, vector pos, int iFlags, int iRotation=RF_DEFAULT)
Creates object of certain type.
proto void SurfaceGetType(float x, float z, out string type)
proto native void SaveProfile()
Saves profile on disk.
bool AddInventoryJunctureEx(Man player, notnull EntityAI item, InventoryLocation dst, bool test_dst_occupancy, int timeout_ms)
proto native Weather GetWeather()
Returns weather controller object.
proto native void EnableMicCapture(bool enable)
Enable microphone to locally capture audio from user. Audio heard does NOT automatically get transmit...
TimerQueue GetTimerQueue(int call_category)
proto native bool IsDedicatedServer()
Robust check which is preferred than the above, as it is valid much sooner.
proto native bool IsAppActive()
Returns if the application is focused on PC, returns true always on console.
proto native vector GetCurrentCameraPosition()
void OnKeyRelease(int key)
Called when key is released.
proto native bool IsObjectAccesible(EntityAI item, Man player)
returns true if player can access item's cargo/attachments (check only distance)
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 a...
proto native float SurfaceRoadY3D(float x, float y, float z, RoadSurfaceDetection rsd)
proto int GetTime()
returns mission time in milliseconds
bool OnInitialize()
Called once before game update loop starts, ret value indicates if init was done in scripts,...
proto native void SetVoiceLevel(int level)
Set voice level of VoN (only on client) (VoiceLevelWhisper = 0, VoiceLevelNormal = 1,...
proto native void NightVissionLightParams(float lightIntensityMul, float noiseIntensity)
proto native bool IsClient()
proto native int ObjectRelease(Object obj)
RemoteObjectTreeCreate - postponed registration of network object tree (and creation of remote object...
proto native int ConfigGetType(string path)
Returns type of config value.
proto native vector ObjectWorldToModel(Object obj, vector worldPos)
proto void SurfaceUnderObject(notnull Object object, out string type, out int liquidType)
proto native Object CreateStaticObjectUsingP3D(string p3dFilename, vector position, vector orientation, float scale=1.0, bool createLocal=false)
proto native void SetDiagModeEnable(int diag_mode, bool enabled)
Set specific debug mode.
proto native void RespawnPlayer()
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 ...
proto native int Connect(UIScriptedMenu parent, string IpAddress, int port, string password)
Connects to IsServer.
proto native void SetProfileStringList(string name, TStringArray values)
Sets array of strings to profile variable.
proto native void RemoveFromReconnectCache(string uid)
Remove player from reconnect cache.
native void CreateMission(string path)
Create only enforce script mission, used for mission script reloading.
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
AnalyticsManagerClient GetAnalyticsClient()
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
proto native int ConnectLastSession(UIScriptedMenu parent, int selectedCharacter=-1)
Connects to last success network session.
proto native void RemoteObjectTreeCreate(Object obj)
RemoteObjectCreate - postponed registration of network object (and creation of remote object)....
proto native void SetDiagDrawMode(int diag_draw_mode)
Set debug draw mode.
void OnDeactivateMessage()
Called when loosing focus (windows)
proto native float SurfaceGetNoiseMultiplier(Object directHit, vector pos, int componentIndex)
proto void GetPlayerName(out string name)
Gets current player name.
proto native int ConfigGetChildrenCount(string path)
Get count of subclasses in config class on path.
ref AnalyticsManagerServer m_AnalyticsManagerServer
proto native vector GetCurrentCameraDirection()
proto void GetVersion(out string version)
proto native bool ExecuteEnforceScript(string expression, string mainFnName)
Delevoper only: Executes Enforce Script expression, if there is an error, is printed into the script ...
void OnUpdate(bool doSim, float timeslice)
Called on World update.
proto native bool HasInventoryJunctureItem(notnull EntityAI item)
proto native EntityAI GetEntityByPersitentID(int b1, int b2, int b3, int b4)
proto native void OpenURL(string url)
proto bool CommandlineGetParam(string name, out string value)
Get command line parameter value.
string CreateRandomPlayer()
returns class name of random survivor (TODO address confusing naming?)
static bool IsDigitalCopy()
proto native void ConfigGetFloatArray(string path, out TFloatArray values)
Get array of floats from config on path.
void OnDeviceReset()
Called when inputs is not possible (Steam overlay active or something), all internal script variables...
void OnMouseButtonRelease(int button)
Called when mouse button is released.
proto native float GetDayTime()
Returns current daytime on server.
proto void CopyFromClipboard(out string text)
proto native void SetLoginTimerFinished()
int ConfigFindClassIndex(string config_path, string searched_member)
proto native void SetEVUser(float value)
Sets custom camera camera EV. range: -50.0..50.0? //TODO.
proto native bool PreloadObject(string type, float distance)
Preload objects with certain type in certain distance from camera.
ref AnalyticsManagerClient m_AnalyticsManagerClient
proto native void AbortMission()
Returns to main menu, leave world empty for using last mission world.
proto native int ServerConfigGetInt(string name)
Server config parsing. Returns 0 if not found.
proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local=false)
proto void SurfaceUnderObjectEx(notnull Object object, out string type, out string impact, out int liquidType)
proto native void ChatPlayer(string text)
proto native vector ObjectGetSelectionPosition(Object obj, string name)
proto native bool GetDiagModeEnable(int diag_mode)
Gets state of specific debug mode.
proto void GetPlayerNetworkIDByIdentityID(int playerIdentityID, out int networkIdLowBits, out int networkIdHightBits)
returns player's network id from identity id in out parameters
proto native Input GetInput()
proto native ContentDLC GetContentDLCService()
Return DLC service (service for entitlement keys for unlock content)
proto native void StartRandomCutscene(string world)
Starts intro.
proto native bool ExtendActionJuncture(Man player, notnull EntityAI item, int timeout_ms)
ScriptInvoker GetPostUpdateQueue(int call_category)
proto native Mission GetMission()
MenuDefaultCharacterData GetMenuDefaultCharacterData(bool fill_data=true)
TStringArray ListAvailableCharacters()
outputs array of all valid survivor class names
proto native Object GetObjectByNetworkId(int networkIdLowBits, int networkIdHighBits)
Returns entity identified by network id.
proto native bool CanRespawnPlayer()
proto native void DisconnectSession()
Disconnects from current multiplayer session.
proto native void ObjectDelete(Object obj)
proto native void RemoteObjectCreate(Object obj)
RemoteObjectDelete - deletes only remote object tree (unregisters from network). do not use if not su...
proto void ObjectGetType(Object obj, out string type)
proto native vector ObjectModelToWorld(Object obj, vector modelPos)
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 GetDiagDrawModeNames(out TStringArray diag_names)
Get list of all debug draw modes.
ref MenuDefaultCharacterData m_CharacterData
proto native void StoreLoginData(ParamsWriteContext ctx)
Stores login userdata as parameters which are sent to server.
ContentDLC is for query installed DLC (only as entitlement keys, not content)
static void InventoryReservationLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
static string DumpToStringNullSafe(InventoryLocation loc)
static bool IsInventoryReservationLogEnable()
static bool IsGameActive(bool sim)
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
The class that will be instanced (moddable)
Manager class for managing Effect (EffectParticle, EffectSound)
static void Cleanup()
Cleanup method to properly clean up the static data.
static void Init()
Initialize the containers.
ScriptCallQueue Class provide "lazy" calls - when we don't want to execute function immediately but l...
ScriptInvoker Class provide list of callbacks usage:
Module containing compiled scripts.
Serialization general interface. Serializer API works with:
Manager class which handles Voice-over-network functionality while player is connected to a server.
static void CleanupInstance()
Uninitializes VONManager, runs when user disconnects from server.
static void Init()
Initializes VONManager, runs when user first connects to a server.
proto native CGame GetGame()
array< string > TStringArray
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static proto int Randomize(int seed)
Sets the seed for the random number generator.