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
- Health & Damage
- Type Checking
- Inventory
- Entity Creation & Deletion
- Player Methods
- Vehicle Methods
- Weather Methods
- File I/O Methods
- Timer & CallQueue Methods
- Widget Creation Methods
- RPC / Networking Methods
- Math Constants & Methods
- Vector Methods
- Global Functions
- Mission Hooks
- Action System
Entity Methods
Full reference: Chapter 6.1: Entity System
Position & Orientation (Object)
| Method | Signature | Description |
|---|---|---|
GetPosition | vector GetPosition() | World position |
SetPosition | void SetPosition(vector pos) | Set world position |
GetOrientation | vector GetOrientation() | Yaw, pitch, roll in degrees |
SetOrientation | void SetOrientation(vector ori) | Set yaw, pitch, roll |
GetDirection | vector GetDirection() | Forward direction vector |
SetDirection | void SetDirection(vector dir) | Set forward direction |
GetScale | float GetScale() | Current scale |
SetScale | void SetScale(float scale) | Set scale |
Transform (IEntity)
| Method | Signature | Description |
|---|---|---|
GetOrigin | vector GetOrigin() | World position (engine level) |
SetOrigin | void SetOrigin(vector orig) | Set world position (engine level) |
GetYawPitchRoll | vector GetYawPitchRoll() | Rotation as yaw/pitch/roll |
GetTransform | void GetTransform(out vector mat[4]) | Full 4x3 transform matrix |
SetTransform | void SetTransform(vector mat[4]) | Set full transform |
VectorToParent | vector VectorToParent(vector vec) | Local direction to world |
CoordToParent | vector CoordToParent(vector coord) | Local point to world |
VectorToLocal | vector VectorToLocal(vector vec) | World direction to local |
CoordToLocal | vector CoordToLocal(vector coord) | World point to local |
Hierarchy (IEntity)
| Method | Signature | Description |
|---|---|---|
AddChild | bool AddChild(notnull IEntity child, int pivot, bool positionOnly = false) | Attach child to bone |
RemoveChild | bool RemoveChild(notnull IEntity child, bool keepTransform = false) | Detach child |
GetParent | IEntity GetParent() | Parent entity or null |
GetChildren | IEntity GetChildren() | First child entity |
GetSibling | IEntity GetSibling() | Next sibling entity |
Display Info (Object)
| Method | Signature | Description |
|---|---|---|
GetType | string GetType() | Config class name (e.g., "AKM") |
GetDisplayName | string GetDisplayName() | Localized display name |
IsKindOf | bool IsKindOf(string type) | Check config inheritance |
Bone Positions (Object)
| Method | Signature | Description |
|---|---|---|
GetBonePositionLS | vector GetBonePositionLS(int pivot) | Bone position in local space |
GetBonePositionMS | vector GetBonePositionMS(int pivot) | Bone position in model space |
GetBonePositionWS | vector GetBonePositionWS(int pivot) | Bone position in world space |
Config Access (Object)
| Method | Signature | Description |
|---|---|---|
ConfigGetBool | bool ConfigGetBool(string entry) | Read bool from config |
ConfigGetInt | int ConfigGetInt(string entry) | Read int from config |
ConfigGetFloat | float ConfigGetFloat(string entry) | Read float from config |
ConfigGetString | string ConfigGetString(string entry) | Read string from config |
ConfigGetTextArray | void ConfigGetTextArray(string entry, out TStringArray values) | Read string array |
ConfigIsExisting | bool ConfigIsExisting(string entry) | Check if config entry exists |
Health & Damage
Full reference: Chapter 6.1: Entity System
| Method | Signature | Description |
|---|---|---|
GetHealth | float GetHealth(string zone, string type) | Get health value |
GetMaxHealth | float GetMaxHealth(string zone, string type) | Get max health |
SetHealth | void SetHealth(string zone, string type, float value) | Set health |
SetHealthMax | void SetHealthMax(string zone = "", string type = "") | Set to max |
AddHealth | void AddHealth(string zone, string type, float value) | Add health |
DecreaseHealth | void DecreaseHealth(string zone, string type, float value, bool auto_delete) | Reduce health; native three-argument overload also exists |
SetAllowDamage | void SetAllowDamage(bool val) | Enable/disable damage |
GetAllowDamage | bool GetAllowDamage() | Check if damage allowed |
IsAlive | bool IsAlive() | Alive check (defined on Object, works on any Object subclass) |
ProcessDirectDamage | void 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
| Method | Class | Description |
|---|---|---|
IsMan() | Object | Is this a player? |
IsBuilding() | Object | Is this a building? |
IsTransport() | Object | Is this a vehicle? |
IsDayZCreature() | Object | Is this a creature (zombie/animal)? |
IsKindOf(string) | Object | Config inheritance check |
IsItemBase() | Object | Is this an inventory item? |
IsWeapon() | Object | Is this a weapon? |
IsMagazine() | Object | Is this a magazine? |
IsClothing() | Object | Is this clothing? |
IsFood() | Object | Is this food? |
Class.CastTo(out, obj) | Class | Safe downcast (returns bool) |
ClassName.Cast(obj) | Class | Inline cast (returns null on failure) |
Inventory
Full reference: Chapter 6.1: Entity System
| Method | Signature | Description |
|---|---|---|
GetInventory | GameInventory GetInventory() | Get inventory component (EntityAI) |
CreateInInventory | EntityAI CreateInInventory(string type) | Create in attachment or cargo slot |
CreateEntityInCargo | EntityAI CreateEntityInCargo(string type) | Create item in cargo |
CreateAttachment | EntityAI CreateAttachment(string type) | Create item as attachment |
EnumerateInventory | bool EnumerateInventory(InventoryTraversalType tt, out array<EntityAI> items) | List all items |
CountInventory | int CountInventory() | Count items |
HasEntityInInventory | bool HasEntityInInventory(notnull EntityAI item) | Check for item |
AttachmentCount | int AttachmentCount() | Number of attachments |
GetAttachmentFromIndex | EntityAI GetAttachmentFromIndex(int idx) | Get attachment by index |
FindAttachmentBySlotName | EntityAI FindAttachmentBySlotName(string slot_name) | EntityAI method (not GameInventory) |
Entity Creation & Deletion
Full reference: Chapter 6.1: Entity System
| Method | Signature | Description |
|---|---|---|
CreateObject | Object GetGame().CreateObject(string type, vector pos, bool local = false, bool ai = false, bool physics = true) | Create entity |
CreateObjectEx | Object GetGame().CreateObjectEx(string type, vector pos, int flags, int rotation = RF_DEFAULT) | Create with ECE flags |
ObjectDelete | void GetGame().ObjectDelete(Object obj) | Native object deletion request |
ObjectDeleteOnClient | void GetGame().ObjectDeleteOnClient(Object obj) | Client-only deletion |
Delete | void obj.Delete() | Deferred deletion; EntityAI can delay while inventory operations are pending |
Common ECE Flags
| Flag | Value | Description |
|---|---|---|
ECE_NONE | 0 | No special behavior |
ECE_CREATEPHYSICS | 1024 | Create collision |
ECE_INITAI | 2048 | Initialize AI |
ECE_EQUIP | 24576 | Spawn with attachments + cargo |
ECE_PLACE_ON_SURFACE | 1060 | Physics + path + trace |
ECE_LOCAL | 1073741824 | Local creation (not replicated) |
ECE_NOLIFETIME | 4194304 | Do not set lifetime at creation; not an absolute no-deletion guarantee |
ECE_KEEPHEIGHT | 524288 | Keep Y position |
Player Methods
Full reference: Chapter 6.14: Player System
| Method | Signature | Description |
|---|---|---|
GetIdentity | PlayerIdentity 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 |
GetDrivingVehicle | EntityAI GetDrivingVehicle() | Vehicle being driven |
IsAlive | bool IsAlive() | Alive check |
IsUnconscious | bool IsUnconscious() | Unconscious check |
IsRestrained | bool IsRestrained() | Restrained check |
IsInVehicle | bool IsInVehicle() | In vehicle check |
SpawnEntityOnGroundOnCursorDir | EntityAI SpawnEntityOnGroundOnCursorDir(string type, float dist) | Spawn in front of player |
Vehicle Methods
Full reference: Chapter 6.2: Vehicle System
Crew (Transport)
| Method | Signature | Description |
|---|---|---|
CrewSize | int CrewSize() | Total seat count |
CrewMember | Human CrewMember(int idx) | Get human at seat |
CrewMemberIndex | int CrewMemberIndex(Human member) | Get seat of human |
CrewGetOut | Human CrewGetOut(int posIdx) | Force eject from seat |
CrewDeath | void CrewDeath(int idx) | Handle crew death; do not treat as a documented damage API |
Engine (Car)
| Method | Signature | Description |
|---|---|---|
EngineIsOn | bool EngineIsOn() | Engine running? |
EngineStart | void EngineStart() | Start engine |
EngineStop | void EngineStop() | Stop engine |
EngineGetRPM | float EngineGetRPM() | Current RPM |
EngineGetRPMRedline | float EngineGetRPMRedline() | Redline RPM |
GetGear | int GetGear() | Current gear |
GetSpeedometer | float GetSpeedometer() | Speed in km/h |
Fluids (Car)
| Method | Signature | Description |
|---|---|---|
GetFluidCapacity | float GetFluidCapacity(CarFluid fluid) | Max capacity |
GetFluidFraction | float GetFluidFraction(CarFluid fluid) | Fill level 0.0-1.0 |
Fill | void Fill(CarFluid fluid, float amount) | Add fluid |
Leak | void Leak(CarFluid fluid, float amount) | Remove fluid |
LeakAll | void LeakAll(CarFluid fluid) | Drain all fluid |
Common CarFluid values: FUEL, OIL, BRAKE, COOLANT; the declaration also reserves USER1–USER4 for modding.
Controls (Car)
| Method | Signature | Description |
|---|---|---|
SetBrake | void SetBrake(float value, float unused0 = 0, bool unused1 = false) | 0.0-1.0 |
SetHandbrake | void SetHandbrake(float value) | 0.0-1.0 |
SetSteering | void SetSteering(float value, bool unused0 = false) | Steering input |
SetThrottle | void SetThrottle(float value) | 0.0-1.0 throttle (replaces obsolete SetThrust) |
Weather Methods
Full reference: Chapter 6.3: Weather System
Access
| Method | Signature | Description |
|---|---|---|
GetGame().GetWeather() | Weather GetWeather() | Get weather singleton |
Phenomena (Weather)
| Method | Signature | Description |
|---|---|---|
GetOvercast | WeatherPhenomenon GetOvercast() | Cloud cover |
GetRain | WeatherPhenomenon GetRain() | Rain |
GetFog | WeatherPhenomenon GetFog() | Fog |
GetSnowfall | WeatherPhenomenon GetSnowfall() | Snow |
GetWindMagnitude | WeatherPhenomenon GetWindMagnitude() | Wind speed |
GetWindDirection | WeatherPhenomenon GetWindDirection() | Wind direction |
GetWind | vector GetWind() | Wind direction vector |
GetWindSpeed | float GetWindSpeed() | Wind speed m/s |
SetStorm | void SetStorm(float density, float threshold, float timeout) | Lightning config |
WeatherPhenomenon
| Method | Signature | Description |
|---|---|---|
GetActual | float GetActual() | Current interpolated value |
GetForecast | float GetForecast() | Target value |
GetNextChange | float GetNextChange() | Time when next forecast is computed (seconds) |
Set | void Set(float forecast, float time = 0, float minDuration = 0) | Set target (server only) |
SetLimits | void SetLimits(float min, float max) | Value range limits |
SetForecastTimeLimits | void SetForecastTimeLimits(float ftMin, float ftMax) | Change speed limits |
SetForecastChangeLimits | void SetForecastChangeLimits(float fcMin, float fcMax) | Magnitude change limits |
File I/O Methods
Full reference: Chapter 6.8: File I/O & JSON
Path Prefixes
| Prefix | Location | Writable |
|---|---|---|
$profile: | Server/client profile directory | Yes |
$saves: | Save directory | Yes |
$mission: | Current mission folder | Read typically |
$CurrentDir: | Not established by the inspected DayZ file API | Verify before use |
File Operations
| Method | Signature | Description |
|---|---|---|
FileExist | bool FileExist(string path) | Check if file exists |
MakeDirectory | bool MakeDirectory(string path) | Create directory |
OpenFile | FileHandle OpenFile(string path, FileMode mode) | Open file (0 = fail) |
CloseFile | void CloseFile(FileHandle fh) | Close file |
FPrint | void FPrint(FileHandle fh, void value) | Write text (no newline) |
FPrintln | void FPrintln(FileHandle fh, void value) | Write text + newline |
FGets | int FGets(FileHandle fh, string line) | Read one line |
ReadFile | int ReadFile(FileHandle file, void param_array, int length) | Read into int array or string (returns byte count) |
DeleteFile | bool DeleteFile(string path) | Delete file |
CopyFile | bool CopyFile(string src, string dst) | Copy file |
JSON (JsonFileLoader)
| Method | Signature | Description |
|---|---|---|
JsonLoadFile | void JsonFileLoader<T>.JsonLoadFile(string path, out T obj) | Legacy/deprecated; returns void and can log parse errors |
JsonSaveFile | void 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
| Value | Description |
|---|---|
FileMode.READ | Open for reading |
FileMode.WRITE | Open for writing (creates/overwrites) |
FileMode.APPEND | Open for appending |
Timer & CallQueue Methods
Full reference: Chapter 6.7: Timers & CallQueue
Access
| Expression | Returns | Description |
|---|---|---|
GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY) | ScriptCallQueue | Gameplay call queue |
GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM) | ScriptCallQueue | System call queue |
GetGame().GetCallQueue(CALL_CATEGORY_GUI) | ScriptCallQueue | GUI call queue |
GetGame().GetUpdateQueue(CALL_CATEGORY_GAMEPLAY) | ScriptInvoker | Per-frame update queue |
ScriptCallQueue
| Method | Signature | Description |
|---|---|---|
CallLater | void CallLater(func fn, int delay = 0, bool repeat = false, void param1 = NULL, ... void param9 = NULL) | Schedule delayed/repeating call |
Call | void Call(func fn, void param1 = NULL, ... void param9 = NULL) | Execute next frame |
CallByName | void CallByName(Class obj, string fnName, Param params = NULL) | Call method by string name |
CallLaterByName | void CallLaterByName(Class obj, string fnName, int delay = 0, bool repeat = false, Param params = NULL) | Delayed/repeating call by string name |
Remove | void Remove(func fn) | Cancel scheduled call |
RemoveByName | void RemoveByName(Class obj, string fnName) | Cancel by string name |
GetRemainingTime | int GetRemainingTime(func fn) | Get remaining time on CallLater (ms) |
GetRemainingTimeByName | int GetRemainingTimeByName(Class obj, string fnName) | Remaining time by string name (ms) |
Timer Class
| Method | Signature | Description |
|---|---|---|
Timer() | void Timer(int category = CALL_CATEGORY_SYSTEM) | Constructor |
Run | void Run(float duration, Managed obj, string fnName, Param params = null, bool loop = false) | Start timer |
Stop | void Stop() | Stop timer |
Pause | void Pause() | Pause timer |
Continue | void Continue() | Resume timer |
IsRunning | bool IsRunning() | Timer active? (false while paused) |
GetRemaining | float GetRemaining() | Duration minus elapsed time; stopped timers may report full duration |
ScriptInvoker
| Method | Signature | Description |
|---|---|---|
Insert | bool Insert(func fn, int flags = EScriptInvokerInsertFlags.IMMEDIATE) | Register callback |
Remove | bool Remove(func fn, int flags = EScriptInvokerRemoveFlags.ALL) | Unregister callback |
Invoke | void Invoke(void param1 = NULL, ... void param9 = NULL) | Fire all callbacks |
Count | int Count(func fn) | How many times this fn is registered |
Clear | void Clear() | Remove all callbacks |
Widget Creation Methods
Full reference: Chapter 3.5: Programmatic Creation
| Method | Signature | Description |
|---|---|---|
GetGame().GetWorkspace() | WorkspaceWidget GetWorkspace() | Get UI workspace |
CreateWidgets | Widget CreateWidgets(string layout, Widget parent = null, bool immedUpdate = true) | Load .layout file |
FindAnyWidget | Widget FindAnyWidget(string name) | Find child by name (recursive) |
Show | void Show(bool show, bool immedUpdate = true) | Show/hide widget |
SetText | void TextWidget.SetText(string text, bool immedUpdate = true) | Set text content |
SetImage | bool ImageWidget.SetImage(int num) | Set image index |
SetColor | void SetColor(int color) | Set widget color (ARGB) |
SetAlpha | void SetAlpha(float alpha) | Set transparency 0.0-1.0 |
SetSize | void SetSize(float w, float h, bool immedUpdate = true) | Set widget size |
SetPos | void SetPos(float x, float y, bool immedUpdate = true) | Set widget position |
GetScreenSize | void GetScreenSize(out float x, out float y) | Widget dimensions in screen pixels; global resolution helper uses int outputs |
Unlink | void Widget.Unlink() | Remove and destroy widget (and children) |
ARGB Color Helper
| Function | Signature | Description |
|---|---|---|
ARGB | int ARGB(int a, int r, int g, int b) | Create color int (0-255 each) |
ARGBF | int 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
| Method | Signature | Description |
|---|---|---|
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
| Method | Signature | Description |
|---|---|---|
ScriptRPC() | void ScriptRPC() | Constructor |
Write | bool Write(void value) | Serialize a value (int, float, bool, string, vector, array) |
Send | void Send(Object target, int rpc_type, bool guaranteed, PlayerIdentity recipient = null) | Send RPC |
Reset | void Reset() | Clear written data |
Receiving (Override on Object)
| Method | Signature | Description |
|---|---|---|
OnRPC | void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx) | RPC receive handler |
ParamsReadContext
| Method | Signature | Description |
|---|---|---|
Read | bool Read(void value) | Deserialize a value (same types as Write) |
Legacy RPC (CGame)
| Method | Signature | Description |
|---|---|---|
RPCSingleParam | void GetGame().RPCSingleParam(Object target, int rpc, Param param, bool guaranteed, PlayerIdentity recipient = null) | Send single Param object |
RPC | void GetGame().RPC(Object target, int rpc, notnull array<ref Param> params, bool guaranteed, PlayerIdentity recipient = null) | Send multiple Params |
ScriptInputUserData (Input-Verified)
| Method | Signature | Description |
|---|---|---|
CanStoreInputUserData | bool ScriptInputUserData.CanStoreInputUserData() | Check if queue has space |
Write | bool Write(void value) | Serialize value |
Send | void Send() | Send to server (client only) |
Math Constants & Methods
Full reference: Chapter 1.7: Math & Vectors
Constants
| Constant | Value | Description |
|---|---|---|
Math.PI | 3.14159... | Pi |
Math.PI2 | 6.28318... | 2 * Pi |
Math.PI_HALF | 1.57079... | Pi / 2 |
Math.DEG2RAD | 0.01745... | Degrees to radians multiplier |
Math.RAD2DEG | 57.2957... | Radians to degrees multiplier |
int.MAX | 2147483647 | Maximum int |
int.MIN | -2147483648 | Minimum int |
float.MAX | 3.4028e+38 | Maximum float |
float.MIN | 1.175e-38 | Minimum positive float |
Random
| Method | Signature | Description |
|---|---|---|
Math.RandomInt | int RandomInt(int min, int max) | Random int [min, max) |
Math.RandomIntInclusive | int RandomIntInclusive(int min, int max) | Random int [min, max] |
Math.RandomFloat01 | float RandomFloat01() | Random float [0, 1] |
Math.RandomBool | bool RandomBool() | Random true/false |
Rounding
| Method | Signature | Description |
|---|---|---|
Math.Round | float Round(float f) | Round to nearest |
Math.Floor | float Floor(float f) | Round down |
Math.Ceil | float Ceil(float f) | Round up |
Clamping & Interpolation
| Method | Signature | Description |
|---|---|---|
Math.Clamp | float Clamp(float val, float min, float max) | Clamp to range |
Math.Min | float Min(float a, float b) | Minimum of two |
Math.Max | float Max(float a, float b) | Maximum of two |
Math.Lerp | float Lerp(float a, float b, float t) | Linear interpolation |
Math.InverseLerp | float InverseLerp(float a, float b, float val) | Inverse lerp |
Absolute & Power
| Method | Signature | Description |
|---|---|---|
Math.AbsFloat | float AbsFloat(float f) | Absolute value (float) |
Math.AbsInt | int AbsInt(int i) | Absolute value (int) |
Math.Pow | float Pow(float base, float exp) | Power |
Math.Sqrt | float Sqrt(float f) | Square root |
Math.SqrFloat | float SqrFloat(float f) | Square (f * f) |
Trigonometry (Radians)
| Method | Signature | Description |
|---|---|---|
Math.Sin | float Sin(float rad) | Sine |
Math.Cos | float Cos(float rad) | Cosine |
Math.Tan | float Tan(float rad) | Tangent |
Math.Asin | float Asin(float val) | Arc sine |
Math.Acos | float Acos(float val) | Arc cosine |
Math.Atan2 | float Atan2(float y, float x) | Angle from components |
Smooth Damping
| Method | Signature | Description |
|---|---|---|
Math.SmoothCD | float SmoothCD(float val, float target, inout float velocity[], float smoothTime, float maxSpeed, float dt) | Smooth damp toward target (like Unity's SmoothDamp) |
// 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
| Method | Signature | Description |
|---|---|---|
Math.NormalizeAngle | float NormalizeAngle(float deg) | Wrap to 0-360 |
Vector Methods
| Method | Signature | Description |
|---|---|---|
vector.Distance | float Distance(vector a, vector b) | Distance between points |
vector.DistanceSq | float DistanceSq(vector a, vector b) | Squared distance (faster) |
vector.Direction | vector Direction(vector from, vector to) | Direction vector |
vector.Dot | float Dot(vector a, vector b) | Dot product |
vector.Lerp | vector 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.Multiply3 | vector Multiply3(vector mat[3]) | Matrix multiply |
v.InvMultiply3 | vector InvMultiply3(vector mat[3]) | Inverse matrix multiply |
Vector(x, y, z) | vector Vector(float x, float y, float z) | Create vector |
Global Functions
| Function | Signature | Description |
|---|---|---|
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)
| Method | Description |
|---|---|
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)
| Method | Description |
|---|---|
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
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.
| Method | Description |
|---|---|
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 sections | Primary source |
|---|---|
| Entity, damage, type, inventory | 1_core/proto/enentity.c; 3_game/entities/object.c, entityai.c; 3_game/systems/inventory/inventory.c |
| Player and vehicles | 3_game/entities/man.c, gameplay.c, vehicles/car.c, vehicles/transport.c; 4_world/entities/manbase/playerbase.c |
| Weather and creation flags | 3_game/weather.c; 3_game/ce/centraleconomy.c; 3_game/global/game.c |
| Files, JSON, timers and queues | 1_core/proto/ensystem.c; 3_game/tools/jsonfileloader.c, tools.c; 2_gamelib/tools.c |
| Widgets, RPC and math | 1_core/proto/enwidgets.c, serializer.c, enmath.c, enconvert.c, enmath3d.c; 3_game/gameplay.c |
| Mission and action hooks | 3_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.
