DayZ Development
Dynamic documentation orchestrator for DayZ mod development. Supports vanilla Enforce Script, Community Framework (CF), and DayZ Expansion. Target version: DayZ 1.28+ (v1.28.161464)
Philosophy
- Fetch, don't memorize - Always get latest from authoritative sources
- Framework-aware thinking - Detect vanilla vs CF vs Expansion, adapt patterns
- Enforce Script correctness - DayZ uses Enforce Script (C-like), NOT C#/C++/Lua
- Server-side validation - Never trust client-side data
- Null-safe always - Every Cast<>, GetInventory(), GetIdentity() must be null-checked
CRITICAL: No Hallucination Policy
NEVER invent or guess Enforce Script classes, methods, config tokens, or parameters.
Rules:
- If unsure about a class/method -> MUST fetch from DayZ Scripts API or Script Diff repo
- If unsure about config.cpp tokens -> MUST fetch from BI wiki or DayZ Central Economy repo
- If a class doesn't exist -> Tell user honestly, suggest alternatives
- If parameters unknown -> Fetch documentation, don't guess
- NEVER use C#/C++ syntax -> Enforce Script looks like C but has key differences
Before writing any class or method call:
- Is this a real DayZ class? -> Verify at dayz-scripts.yadz.app or DayZ-Script-Diff
- Is this the correct method signature? -> Check parameter types and order
- Does this work on server/client/both? -> Check script module (3_Game/4_World/5_Mission)
- Am I null-checking accessors? -> Cast<>, GetInventory(), GetIdentity(), GetPlayer()
When you don't know:
"I'm not 100% certain about this class/method. Let me fetch the documentation..."
[Use WebFetch to get accurate info]
Verification Sources:
| Type | Source | Action |
|---|---|---|
| Script API (v1.28) | https://dayz-scripts.yadz.app/ | WebFetch for class/method docs |
| Script Diff (official) | https://github.com/BohemiaInteractive/DayZ-Script-Diff | Check exact source code |
| Enforce Syntax | https://community.bistudio.com/wiki/DayZ:Enforce_Script_Syntax | Language reference |
| Config tokens | https://community.bistudio.com/wiki/CfgVehicles_Config_Reference | Config.cpp reference |
| Central Economy | https://github.com/BohemiaInteractive/DayZ-Central-Economy | types.xml, events.xml |
| CF docs | https://github.com/Arkensor/DayZ-CommunityFramework | CF source + docs |
| Expansion wiki | https://github.com/salutesh/DayZ-Expansion-Scripts/wiki | Expansion reference |
| Server config | https://dzconfig.com/wiki/ | Server XML/JSON configs |
| DeepWiki Expansion | https://deepwiki.com/salutesh/DayZ-Expansion-Scripts | AI-analyzed Expansion architecture |
| DayZ Explorer | https://dayzexplorer.zeroy.com/ | Enforce essentials, Math, FileIO, Widget API |
Example - WRONG:
// DON'T: Using C# syntax or inventing methods
player.GetComponent<Inventory>().AddItem("AK74"); // NOT Enforce Script!
Example - RIGHT:
// DO: Use verified Enforce Script with null checks
PlayerBase player = PlayerBase.Cast(GetGame().GetPlayer());
if (player)
{
EntityAI item = player.GetInventory().CreateInInventory("AKM");
if (item)
{
// item created successfully
}
}
Content Map
Read ONLY relevant files based on the request:
| File | Description | When to Read |
|---|---|---|
scripting/enforce-script.md | Enforce Script language quick reference | Writing any code |
scripting/class-hierarchy.md | Class tree and key singletons | Looking up classes |
scripting/client-server.md | Script module architecture | New mod, client/server questions |
scripting/memory-management.md | ref, autoptr, Managed patterns | Memory/lifecycle issues |
systems/mod-structure.md | Mod folders, config.cpp, meta.cpp | Creating new mods |
systems/networking.md | RPC, NetSync, CF NetworkedVariables | Multiplayer sync |
systems/inventory.md | Inventory system, InventoryLocation | Item manipulation |
systems/actions.md | Action system hierarchy | Custom actions |
systems/weapons.md | Weapon FSM, configs | Weapon mods |
systems/vehicles.md | Vehicle config, SimulationModule | Vehicle mods |
frameworks/framework-detection.md | Detect vanilla vs CF vs Expansion | Starting new task |
frameworks/community-framework.md | CF modules, RPC, NetworkedVariables | Using CF |
frameworks/expansion.md | Expansion systems overview | Using Expansion |
config/config-cpp.md | config.cpp reference and patterns | Item/vehicle config |
config/types-xml.md | types.xml, economy system | Loot spawning |
config/server-config.md | Server configuration files | Server setup |
compatibility/version-128.md | 1.28 breaking changes and new features | Version questions, migration |
Dynamic Fetching - Decision Tree
Step 1: Classify the Request
| If user asks about... | Action |
|---|---|
| Enforce Script class/method (EntityAI, PlayerBase, etc.) | FETCH from DayZ Scripts API |
| Config.cpp tokens (CfgVehicles, CfgWeapons) | FETCH from BI Wiki |
| Central Economy (types.xml, events.xml) | FETCH from DayZ-Central-Economy repo |
| CF feature (RPCManager, Modules, NetworkedVariables) | FETCH from CF GitHub |
| Expansion system (Market, Quests, AI, Basebuilding) | FETCH from Expansion wiki |
| Script diff between versions | FETCH from DayZ-Script-Diff repo |
| Server configuration | FETCH from DZconfig wiki |
| Mod structure, best practices | READ local files |
| 1.28 compatibility/changes | READ local compatibility file |
Step 2: WebFetch URLs
Script API Reference (v1.28)
Base URL: https://dayz-scripts.yadz.app/
WebFetch(
url: "https://dayz-scripts.yadz.app/",
prompt: "Find documentation for the class or method '{CLASS_OR_METHOD}'.
Include: inheritance, methods, parameters, return types."
)
Key API Pages:
| Category | URL |
|---|---|
| Enforce Essentials | https://dayz-scripts.yadz.app/d5/d78/group___enforce |
| Math Library | https://dayz-scripts.yadz.app/d5/d98/group___math |
| String Methods | https://dayz-scripts.yadz.app/d5/da2/group___strings |
| Widget UI System | https://dayz-scripts.yadz.app/d9/d0e/group___widget_a_p_i |
| Math Class | https://dayz-scripts.yadz.app/d4/d34/class_math |
Alternate API Reference (older but comprehensive)
Base URL: https://dayzexplorer.zeroy.com/
Official Script Source (for exact implementations)
WebFetch(
url: "https://github.com/BohemiaInteractive/DayZ-Script-Diff/tree/main/scripts",
prompt: "Find the source code for '{CLASS_NAME}' in the DayZ script tree.
Show the class definition, methods, and inheritance."
)
Config References
WebFetch(
url: "https://community.bistudio.com/wiki/CfgVehicles_Config_Reference",
prompt: "Find the config token '{TOKEN_NAME}' and its usage.
Include: type, default value, parent class, example."
)
Central Economy
WebFetch(
url: "https://github.com/BohemiaInteractive/DayZ-Central-Economy",
prompt: "Find the economy configuration for '{ITEM_OR_SETTING}'.
Include: types.xml entry, spawn parameters, nominal/min values."
)
Community Framework
WebFetch(
url: "https://github.com/Arkensor/DayZ-Co