Skip to content

Engine API Quick Reference ​


Condensed single-page reference for the most commonly used DayZ engine methods. For detailed explanations and examples, see the full chapters linked in each section header. Signatures below omit declaration modifiers such as proto native; ellipses explicitly mark abbreviated parameter lists. Checked against the supplied extraction on 2026-09-11; release identity is unconfirmed and examples were not compiled.


Table of Contents ​


Entity Methods ​

Full reference: Chapter 6.1: Entity System

Position & Orientation (Object) ​

MethodSignatureDescription
GetPositionvector GetPosition()World position
SetPositionvoid SetPosition(vector pos)Set world position
GetOrientationvector GetOrientation()Yaw, pitch, roll in degrees
SetOrientationvoid SetOrientation(vector ori)Set yaw, pitch, roll
GetDirectionvector GetDirection()Forward direction vector
SetDirectionvoid SetDirection(vector dir)Set forward direction
GetScalefloat GetScale()Current scale
SetScalevoid SetScale(float scale)Set scale

Transform (IEntity) ​

MethodSignatureDescription
GetOriginvector GetOrigin()World position (engine level)
SetOriginvoid SetOrigin(vector orig)Set world position (engine level)
GetYawPitchRollvector GetYawPitchRoll()Rotation as yaw/pitch/roll
GetTransformvoid GetTransform(out vector mat[4])Full 4x3 transform matrix
SetTransformvoid SetTransform(vector mat[4])Set full transform
VectorToParentvector VectorToParent(vector vec)Local direction to world
CoordToParentvector CoordToParent(vector coord)Local point to world
VectorToLocalvector VectorToLocal(vector vec)World direction to local
CoordToLocalvector CoordToLocal(vector coord)World point to local

Hierarchy (IEntity) ​

MethodSignatureDescription
AddChildbool AddChild(notnull IEntity child, int pivot, bool positionOnly = false)Attach child to bone
RemoveChildbool RemoveChild(notnull IEntity child, bool keepTransform = false)Detach child
GetParentIEntity GetParent()Parent entity or null
GetChildrenIEntity GetChildren()First child entity
GetSiblingIEntity GetSibling()Next sibling entity

Display Info (Object) ​

MethodSignatureDescription
GetTypestring GetType()Config class name (e.g., "AKM")
GetDisplayNamestring GetDisplayName()Localized display name
IsKindOfbool IsKindOf(string type)Check config inheritance

Bone Positions (Object) ​

MethodSignatureDescription
GetBonePositionLSvector GetBonePositionLS(int pivot)Bone position in local space
GetBonePositionMSvector GetBonePositionMS(int pivot)Bone position in model space
GetBonePositionWSvector GetBonePositionWS(int pivot)Bone position in world space

Config Access (Object) ​

MethodSignatureDescription
ConfigGetBoolbool ConfigGetBool(string entry)Read bool from config
ConfigGetIntint ConfigGetInt(string entry)Read int from config
ConfigGetFloatfloat ConfigGetFloat(string entry)Read float from config
ConfigGetStringstring ConfigGetString(string entry)Read string from config
ConfigGetTextArrayvoid ConfigGetTextArray(string entry, out TStringArray values)Read string array
ConfigIsExistingbool ConfigIsExisting(string entry)Check if config entry exists

Health & Damage ​

Full reference: Chapter 6.1: Entity System

MethodSignatureDescription
GetHealthfloat GetHealth(string zone, string type)Get health value
GetMaxHealthfloat GetMaxHealth(string zone, string type)Get max health
SetHealthvoid SetHealth(string zone, string type, float value)Set health
SetHealthMaxvoid SetHealthMax(string zone = "", string type = "")Set to max
AddHealthvoid AddHealth(string zone, string type, float value)Add health
DecreaseHealthvoid DecreaseHealth(string zone, string type, float value, bool auto_delete)Reduce health; native three-argument overload also exists
SetAllowDamagevoid SetAllowDamage(bool val)Enable/disable damage
GetAllowDamagebool GetAllowDamage()Check if damage allowed
IsAlivebool IsAlive()Alive check (defined on Object, works on any Object subclass)
ProcessDirectDamagevoid ProcessDirectDamage(int dmgType, EntityAI source, string component, string ammoType, vector modelPos, float coef = 1.0, int flags = 0)Apply damage (defined on Object)

Common zone/type pairs: ("", "Health") global, ("", "Blood") player blood, ("", "Shock") player shock, ("Engine", "Health") vehicle engine.


Type Checking ​

MethodClassDescription
IsMan()ObjectIs this a player?
IsBuilding()ObjectIs this a building?
IsTransport()ObjectIs this a vehicle?
IsDayZCreature()ObjectIs this a creature (zombie/animal)?
IsKindOf(string)ObjectConfig inheritance check
IsItemBase()ObjectIs this an inventory item?
IsWeapon()ObjectIs this a weapon?
IsMagazine()ObjectIs this a magazine?
IsClothing()ObjectIs this clothing?
IsFood()ObjectIs this food?
Class.CastTo(out, obj)ClassSafe downcast (returns bool)
ClassName.Cast(obj)ClassInline cast (returns null on failure)

Inventory ​

Full reference: Chapter 6.1: Entity System

MethodSignatureDescription
GetInventoryGameInventory GetInventory()Get inventory component (EntityAI)
CreateInInventoryEntityAI CreateInInventory(string type)Create in attachment or cargo slot
CreateEntityInCargoEntityAI CreateEntityInCargo(string type)Create item in cargo
CreateAttachmentEntityAI CreateAttachment(string type)Create item as attachment
EnumerateInventorybool EnumerateInventory(InventoryTraversalType tt, out array<EntityAI> items)List all items
CountInventoryint CountInventory()Count items
HasEntityInInventorybool HasEntityInInventory(notnull EntityAI item)Check for item
AttachmentCountint AttachmentCount()Number of attachments
GetAttachmentFromIndexEntityAI GetAttachmentFromIndex(int idx)Get attachment by index
FindAttachmentBySlotNameEntityAI FindAttachmentBySlotName(string slot_name)EntityAI method (not GameInventory)

Entity Creation & Deletion ​

Full reference: Chapter 6.1: Entity System

MethodSignatureDescription
CreateObjectObject GetGame().CreateObject(string type, vector pos, bool local = false, bool ai = false, bool physics = true)Create entity
CreateObjectExObject GetGame().CreateObjectEx(string type, vector pos, int flags, int rotation = RF_DEFAULT)Create with ECE flags
ObjectDeletevoid GetGame().ObjectDelete(Object obj)Native object deletion request
ObjectDeleteOnClientvoid GetGame().ObjectDeleteOnClient(Object obj)Client-only deletion
Deletevoid obj.Delete()Deferred deletion; EntityAI can delay while inventory operations are pending

Common ECE Flags ​

FlagValueDescription
ECE_NONE0No special behavior
ECE_CREATEPHYSICS1024Create collision
ECE_INITAI2048Initialize AI
ECE_EQUIP24576Spawn with attachments + cargo
ECE_PLACE_ON_SURFACE1060Physics + path + trace
ECE_LOCAL1073741824Local creation (not replicated)
ECE_NOLIFETIME4194304Do not set lifetime at creation; not an absolute no-deletion guarantee
ECE_KEEPHEIGHT524288Keep Y position

Player Methods ​

Full reference: Chapter 6.14: Player System

MethodSignatureDescription
GetIdentityPlayerIdentity GetIdentity()Player identity object
GetIdentity().GetName()string GetName()Steam/platform display name
GetIdentity().GetId()string GetId()Hashed/platform unique ID; not necessarily BattlEye GUID
GetIdentity().GetPlainId()string GetPlainId()Steam64 ID
GetIdentity().GetPlayerId()int GetPlayerId()Session player ID
GetHumanInventory().GetEntityInHands()EntityAI GetEntityInHands()Item in hands
GetDrivingVehicleEntityAI GetDrivingVehicle()Vehicle being driven
IsAlivebool IsAlive()Alive check
IsUnconsciousbool IsUnconscious()Unconscious check
IsRestrainedbool IsRestrained()Restrained check
IsInVehiclebool IsInVehicle()In vehicle check
SpawnEntityOnGroundOnCursorDirEntityAI SpawnEntityOnGroundOnCursorDir(string type, float dist)Spawn in front of player

Vehicle Methods ​

Full reference: Chapter 6.2: Vehicle System

Crew (Transport) ​

MethodSignatureDescription
CrewSizeint CrewSize()Total seat count
CrewMemberHuman CrewMember(int idx)Get human at seat
CrewMemberIndexint CrewMemberIndex(Human member)Get seat of human
CrewGetOutHuman CrewGetOut(int posIdx)Force eject from seat
CrewDeathvoid CrewDeath(int idx)Handle crew death; do not treat as a documented damage API

Engine (Car) ​

MethodSignatureDescription
EngineIsOnbool EngineIsOn()Engine running?
EngineStartvoid EngineStart()Start engine
EngineStopvoid EngineStop()Stop engine
EngineGetRPMfloat EngineGetRPM()Current RPM
EngineGetRPMRedlinefloat EngineGetRPMRedline()Redline RPM
GetGearint GetGear()Current gear
GetSpeedometerfloat GetSpeedometer()Speed in km/h

Fluids (Car) ​

MethodSignatureDescription
GetFluidCapacityfloat GetFluidCapacity(CarFluid fluid)Max capacity
GetFluidFractionfloat GetFluidFraction(CarFluid fluid)Fill level 0.0-1.0
Fillvoid Fill(CarFluid fluid, float amount)Add fluid
Leakvoid Leak(CarFluid fluid, float amount)Remove fluid
LeakAllvoid LeakAll(CarFluid fluid)Drain all fluid

Common CarFluid values: FUEL, OIL, BRAKE, COOLANT; the declaration also reserves USER1–USER4 for modding.

Controls (Car) ​

MethodSignatureDescription
SetBrakevoid SetBrake(float value, float unused0 = 0, bool unused1 = false)0.0-1.0
SetHandbrakevoid SetHandbrake(float value)0.0-1.0
SetSteeringvoid SetSteering(float value, bool unused0 = false)Steering input
SetThrottlevoid SetThrottle(float value)0.0-1.0 throttle (replaces obsolete SetThrust)

Weather Methods ​

Full reference: Chapter 6.3: Weather System

Access ​

MethodSignatureDescription
GetGame().GetWeather()Weather GetWeather()Get weather singleton

Phenomena (Weather) ​

MethodSignatureDescription
GetOvercastWeatherPhenomenon GetOvercast()Cloud cover
GetRainWeatherPhenomenon GetRain()Rain
GetFogWeatherPhenomenon GetFog()Fog
GetSnowfallWeatherPhenomenon GetSnowfall()Snow
GetWindMagnitudeWeatherPhenomenon GetWindMagnitude()Wind speed
GetWindDirectionWeatherPhenomenon GetWindDirection()Wind direction
GetWindvector GetWind()Wind direction vector
GetWindSpeedfloat GetWindSpeed()Wind speed m/s
SetStormvoid SetStorm(float density, float threshold, float timeout)Lightning config

WeatherPhenomenon ​

MethodSignatureDescription
GetActualfloat GetActual()Current interpolated value
GetForecastfloat GetForecast()Target value
GetNextChangefloat GetNextChange()Time when next forecast is computed (seconds)
Setvoid Set(float forecast, float time = 0, float minDuration = 0)Set target (server only)
SetLimitsvoid SetLimits(float min, float max)Value range limits
SetForecastTimeLimitsvoid SetForecastTimeLimits(float ftMin, float ftMax)Change speed limits
SetForecastChangeLimitsvoid SetForecastChangeLimits(float fcMin, float fcMax)Magnitude change limits

File I/O Methods ​

Full reference: Chapter 6.8: File I/O & JSON

Path Prefixes ​

PrefixLocationWritable
$profile:Server/client profile directoryYes
$saves:Save directoryYes
$mission:Current mission folderRead typically
$CurrentDir:Not established by the inspected DayZ file APIVerify before use

File Operations ​

MethodSignatureDescription
FileExistbool FileExist(string path)Check if file exists
MakeDirectorybool MakeDirectory(string path)Create directory
OpenFileFileHandle OpenFile(string path, FileMode mode)Open file (0 = fail)
CloseFilevoid CloseFile(FileHandle fh)Close file
FPrintvoid FPrint(FileHandle fh, void value)Write text (no newline)
FPrintlnvoid FPrintln(FileHandle fh, void value)Write text + newline
FGetsint FGets(FileHandle fh, string line)Read one line
ReadFileint ReadFile(FileHandle file, void param_array, int length)Read into int array or string (returns byte count)
DeleteFilebool DeleteFile(string path)Delete file
CopyFilebool CopyFile(string src, string dst)Copy file

JSON (JsonFileLoader) ​

MethodSignatureDescription
JsonLoadFilevoid JsonFileLoader<T>.JsonLoadFile(string path, out T obj)Legacy/deprecated; returns void and can log parse errors
JsonSaveFilevoid JsonFileLoader<T>.JsonSaveFile(string path, T obj)Legacy/deprecated save

Prefer static bool JsonFileLoader<T>.LoadFile(string path, out T obj, out string error) and static bool JsonFileLoader<T>.SaveFile(string path, T obj, out string error) when callers need a success result.

FileMode Enum ​

ValueDescription
FileMode.READOpen for reading
FileMode.WRITEOpen for writing (creates/overwrites)
FileMode.APPENDOpen for appending

Timer & CallQueue Methods ​

Full reference: Chapter 6.7: Timers & CallQueue

Access ​

ExpressionReturnsDescription
GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY)ScriptCallQueueGameplay call queue
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM)ScriptCallQueueSystem call queue
GetGame().GetCallQueue(CALL_CATEGORY_GUI)ScriptCallQueueGUI call queue
GetGame().GetUpdateQueue(CALL_CATEGORY_GAMEPLAY)ScriptInvokerPer-frame update queue

ScriptCallQueue ​

MethodSignatureDescription
CallLatervoid CallLater(func fn, int delay = 0, bool repeat = false, void param1 = NULL, ... void param9 = NULL)Schedule delayed/repeating call
Callvoid Call(func fn, void param1 = NULL, ... void param9 = NULL)Execute next frame
CallByNamevoid CallByName(Class obj, string fnName, Param params = NULL)Call method by string name
CallLaterByNamevoid CallLaterByName(Class obj, string fnName, int delay = 0, bool repeat = false, Param params = NULL)Delayed/repeating call by string name
Removevoid Remove(func fn)Cancel scheduled call
RemoveByNamevoid RemoveByName(Class obj, string fnName)Cancel by string name
GetRemainingTimeint GetRemainingTime(func fn)Get remaining time on CallLater (ms)
GetRemainingTimeByNameint GetRemainingTimeByName(Class obj, string fnName)Remaining time by string name (ms)

Timer Class ​

MethodSignatureDescription
Timer()void Timer(int category = CALL_CATEGORY_SYSTEM)Constructor
Runvoid Run(float duration, Managed obj, string fnName, Param params = null, bool loop = false)Start timer
Stopvoid Stop()Stop timer
Pausevoid Pause()Pause timer
Continuevoid Continue()Resume timer
IsRunningbool IsRunning()Timer active? (false while paused)
GetRemainingfloat GetRemaining()Duration minus elapsed time; stopped timers may report full duration

ScriptInvoker ​

MethodSignatureDescription
Insertbool Insert(func fn, int flags = EScriptInvokerInsertFlags.IMMEDIATE)Register callback
Removebool Remove(func fn, int flags = EScriptInvokerRemoveFlags.ALL)Unregister callback
Invokevoid Invoke(void param1 = NULL, ... void param9 = NULL)Fire all callbacks
Countint Count(func fn)How many times this fn is registered
Clearvoid Clear()Remove all callbacks

Widget Creation Methods ​

Full reference: Chapter 3.5: Programmatic Creation

MethodSignatureDescription
GetGame().GetWorkspace()WorkspaceWidget GetWorkspace()Get UI workspace
CreateWidgetsWidget CreateWidgets(string layout, Widget parent = null, bool immedUpdate = true)Load .layout file
FindAnyWidgetWidget FindAnyWidget(string name)Find child by name (recursive)
Showvoid Show(bool show, bool immedUpdate = true)Show/hide widget
SetTextvoid TextWidget.SetText(string text, bool immedUpdate = true)Set text content
SetImagebool ImageWidget.SetImage(int num)Set image index
SetColorvoid SetColor(int color)Set widget color (ARGB)
SetAlphavoid SetAlpha(float alpha)Set transparency 0.0-1.0
SetSizevoid SetSize(float w, float h, bool immedUpdate = true)Set widget size
SetPosvoid SetPos(float x, float y, bool immedUpdate = true)Set widget position
GetScreenSizevoid GetScreenSize(out float x, out float y)Widget dimensions in screen pixels; global resolution helper uses int outputs
Unlinkvoid Widget.Unlink()Remove and destroy widget (and children)

ARGB Color Helper ​

FunctionSignatureDescription
ARGBint ARGB(int a, int r, int g, int b)Create color int (0-255 each)
ARGBFint ARGBF(float a, float r, float g, float b)Create color int (0.0-1.0 each)

RPC / Networking Methods ​

Full reference: Chapter 6.9: Networking & RPC

Environment Checks ​

MethodSignatureDescription
GetGame().IsServer()bool IsServer()True on server / listen-server host
GetGame().IsClient()bool IsClient()True on client
GetGame().IsMultiplayer()bool IsMultiplayer()True in multiplayer
GetGame().IsDedicatedServer()bool IsDedicatedServer()True only on dedicated server

ScriptRPC ​

MethodSignatureDescription
ScriptRPC()void ScriptRPC()Constructor
Writebool Write(void value)Serialize a value (int, float, bool, string, vector, array)
Sendvoid Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient = null)Send RPC
Resetvoid Reset()Clear written data

Receiving (Override on Object) ​

MethodSignatureDescription
OnRPCvoid OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)RPC receive handler

ParamsReadContext ​

MethodSignatureDescription
Readbool Read(void value)Deserialize a value (same types as Write)

Legacy RPC (CGame) ​

MethodSignatureDescription
RPCSingleParamvoid GetGame().RPCSingleParam(Object target, int rpc, Param param, bool guaranteed, PlayerIdentity recipient = null)Send single Param object
RPCvoid GetGame().RPC(Object target, int rpc, notnull array<ref Param> params, bool guaranteed, PlayerIdentity recipient = null)Send multiple Params

ScriptInputUserData (Input-Verified) ​

MethodSignatureDescription
CanStoreInputUserDatabool ScriptInputUserData.CanStoreInputUserData()Check if queue has space
Writebool Write(void value)Serialize value
Sendvoid Send()Send to server (client only)

Math Constants & Methods ​

Full reference: Chapter 1.7: Math & Vectors

Constants ​

ConstantValueDescription
Math.PI3.14159...Pi
Math.PI26.28318...2 * Pi
Math.PI_HALF1.57079...Pi / 2
Math.DEG2RAD0.01745...Degrees to radians multiplier
Math.RAD2DEG57.2957...Radians to degrees multiplier
int.MAX2147483647Maximum int
int.MIN-2147483648Minimum int
float.MAX3.4028e+38Maximum float
float.MIN1.175e-38Minimum positive float

Random ​

MethodSignatureDescription
Math.RandomIntint RandomInt(int min, int max)Random int [min, max)
Math.RandomIntInclusiveint RandomIntInclusive(int min, int max)Random int [min, max]
Math.RandomFloat01float RandomFloat01()Random float [0, 1]
Math.RandomBoolbool RandomBool()Random true/false

Rounding ​

MethodSignatureDescription
Math.Roundfloat Round(float f)Round to nearest
Math.Floorfloat Floor(float f)Round down
Math.Ceilfloat Ceil(float f)Round up

Clamping & Interpolation ​

MethodSignatureDescription
Math.Clampfloat Clamp(float val, float min, float max)Clamp to range
Math.Minfloat Min(float a, float b)Minimum of two
Math.Maxfloat Max(float a, float b)Maximum of two
Math.Lerpfloat Lerp(float a, float b, float t)Linear interpolation
Math.InverseLerpfloat InverseLerp(float a, float b, float val)Inverse lerp

Absolute & Power ​

MethodSignatureDescription
Math.AbsFloatfloat AbsFloat(float f)Absolute value (float)
Math.AbsIntint AbsInt(int i)Absolute value (int)
Math.Powfloat Pow(float base, float exp)Power
Math.Sqrtfloat Sqrt(float f)Square root
Math.SqrFloatfloat SqrFloat(float f)Square (f * f)

Trigonometry (Radians) ​

MethodSignatureDescription
Math.Sinfloat Sin(float rad)Sine
Math.Cosfloat Cos(float rad)Cosine
Math.Tanfloat Tan(float rad)Tangent
Math.Asinfloat Asin(float val)Arc sine
Math.Acosfloat Acos(float val)Arc cosine
Math.Atan2float Atan2(float y, float x)Angle from components

Smooth Damping ​

MethodSignatureDescription
Math.SmoothCDfloat SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxSpeed, float dt)Smooth damp toward target (like Unity's SmoothDamp)
c
// Smooth damping usage
// val: current value, target: target value, velocity: inout float[] (persisted between calls)
// smoothTime: smoothing time, maxSpeed: speed cap, dt: delta time
float m_Velocity[1] = {0};  // MUST be float array, not plain float
float result = Math.SmoothCD(current, target, m_Velocity, 0.3, 1000.0, dt);

Angle ​

MethodSignatureDescription
Math.NormalizeAnglefloat NormalizeAngle(float deg)Wrap to 0-360

Vector Methods ​

MethodSignatureDescription
vector.Distancefloat Distance(vector a, vector b)Distance between points
vector.DistanceSqfloat DistanceSq(vector a, vector b)Squared distance (faster)
vector.Directionvector Direction(vector from, vector to)Direction vector
vector.Dotfloat Dot(vector a, vector b)Dot product
vector.Lerpvector Lerp(vector a, vector b, float t)Interpolate positions
v.Length()float Length()Vector magnitude
v.LengthSq()float LengthSq()Squared magnitude (faster)
v.Normalized()vector Normalized()Unit vector
v.VectorToAngles()vector VectorToAngles()Direction to yaw/pitch
v.AnglesToVector()vector AnglesToVector()Yaw/pitch to direction
v.Multiply3vector Multiply3(vector mat[3])Matrix multiply
v.InvMultiply3vector InvMultiply3(vector mat[3])Inverse matrix multiply
Vector(x, y, z)vector Vector(float x, float y, float z)Create vector

Global Functions ​

FunctionSignatureDescription
GetGame()DayZGame GetGame()Game instance; declared 3_game/gameplay.c:636 as { return g_Game; }. DayZGame extends CGame (3_game/dayzgame.c:908); GetDayZGame() (:3973) is an equivalent accessor
GetGame().GetPlayer()DayZPlayer GetPlayer()Local player (CLIENT only)
GetGame().GetPlayers(out arr)void GetPlayers(out array<Man> arr)All players (server)
GetGame().GetWorld()World GetWorld()World instance
GetGame().GetTickTime()float GetTickTime()Elapsed time since game start (seconds), on the current instance
GetGame().GetWorkspace()WorkspaceWidget GetWorkspace()UI workspace
GetGame().SurfaceY(x, z)float SurfaceY(float x, float z)Terrain height at position
GetGame().SurfaceGetType(x, z, type)float SurfaceGetType(float x, float z, out string type)Surface material type (in out param)
GetGame().GetObjectsAtPosition(pos, radius, objects, proxyCargo)void GetObjectsAtPosition(vector pos, float radius, out array<Object> objects, out array<CargoBase> proxyCargo)Find objects near position
GetScreenSize(w, h)void GetScreenSize(out int w, out int h)Get screen resolution
GetGame().IsServer()bool IsServer()Server check
GetGame().IsClient()bool IsClient()Client check
GetGame().IsMultiplayer()bool IsMultiplayer()Multiplayer check
Print(string)void Print(void value)Write to script log
ErrorEx(string)void ErrorEx(string msg, ErrorExSeverity sev = ErrorExSeverity.ERROR)Log error with severity
DumpStackString()void DumpStackString(out string stack)Get call stack as string (fills out param)
string.Format(fmt, ...)string Format(string fmt, ...)Format string (%1..%9)

Mission Hooks ​

Full reference: Chapter 6.11: Mission Hooks

Server-side (modded MissionServer) ​

MethodDescription
override void OnInit()Initialize managers, register RPCs
override void OnMissionStart()Mission start callback
override void OnUpdate(float timeslice)Per-frame (use accumulator!)
override void OnMissionFinish()Cleanup singletons, unsubscribe events
override void OnEvent(EventType eventTypeId, Param params)Chat, voice events
override void InvokeOnConnect(PlayerBase player, PlayerIdentity identity)Player joined
override void InvokeOnDisconnect(PlayerBase player)Player left
override void OnClientReadyEvent(PlayerIdentity identity, PlayerBase player)Client ready for data
override void OnClientPrepareEvent(PlayerIdentity identity, out bool useDB, out vector pos, out float yaw, out int preloadTimeout)Identity available before character creation (missionserver.c:436)

Client-side (modded MissionGameplay) ​

MethodDescription
override void OnInit()Initialize client managers, create HUD
override void OnUpdate(float timeslice)Per-frame client update
override void OnMissionFinish()Cleanup
override void OnKeyPress(int key)Key pressed
override void OnKeyRelease(int key)Key released

Action System ​

Full reference: Chapter 6.12: Action System

Register Actions on an Item ​

c
override void SetActions()
{
    super.SetActions();
    AddAction(MyAction);           // Add custom action
    RemoveAction(ActionEat);       // Remove vanilla action
}

Action Callback Methods ​

OnExecuteServer / OnExecuteClient are declared on AnimatedActionBase, not directly on every ActionBase subclass. Choose the base class that provides the callback.

MethodDescription
override void CreateConditionComponents()Set CCINone/CCTNone distance conditions
override bool ActionCondition(...)Custom validation logic
override void OnExecuteServer(ActionData action_data)Server-side execution
override void OnExecuteClient(ActionData action_data)Client-side effects
override string GetText()Display name (supports #STR_ keys)

Full documentation: Home | Cheat Sheet | Entity System | Vehicles | Weather | Timers | File I/O | Networking | Mission Hooks | Action System


Audit Sources and Limits ​

Independently checked 2026-09-11 against D:/DayZ Projects/scripts/, whose release identity is unconfirmed. Source families below are relative to that root.

Reference sectionsPrimary source
Entity, damage, type, inventory1_core/proto/enentity.c; 3_game/entities/object.c, entityai.c; 3_game/systems/inventory/inventory.c
Player and vehicles3_game/entities/man.c, gameplay.c, vehicles/car.c, vehicles/transport.c; 4_world/entities/manbase/playerbase.c
Weather and creation flags3_game/weather.c; 3_game/ce/centraleconomy.c; 3_game/global/game.c
Files, JSON, timers and queues1_core/proto/ensystem.c; 3_game/tools/jsonfileloader.c, tools.c; 2_gamelib/tools.c
Widgets, RPC and math1_core/proto/enwidgets.c, serializer.c, enmath.c, enconvert.c, enmath3d.c; 3_game/gameplay.c
Mission and action hooks3_game/gameplay.c; 5_mission/mission/missionserver.c; 4_world/classes/useractionscomponent/actionbase.c, animatedactionbase.c; 4_world/entities/itembase.c

Declarations establish signatures, not runtime guarantees or availability in every build/context. Native behavior not described in the source remains unverified. 3_game/dayzgame.c:3971 declares DayZGame g_Game, and 3_game/gameplay.c:636 declares the script accessor DayZGame GetGame() { return g_Game; }, so the GetGame().X form used throughout this page is the vanilla-declared path. (A separate Game GetGame() at 2_gamelib/gamelib.c:4 sits inside #ifdef GAME_TEMPLATE and is not the DayZ path.) MyAction is an illustrative class you must implement; the action and smoothing snippets belong inside suitable surrounding code.

Released under CC BY-SA 4.0 | Code examples under MIT License