DayZ Central Economy: Understanding types.xml and events.xml
Loot control in DayZ: types.xml attributes, events.xml, cfgeconomycore and how to tune spawns precisely.
DayZ Central Economy: Understanding types.xml and events.xml
The Central Economy (CE) is the heart of loot distribution in DayZ. It controls what spawns, where, and how often — from canned beans to rifles to vehicles and helicopter crashes. This guide covers the key files, their attributes and typical changes.
Where the CE Files Live
All CE files sit inside your server’s mission folder, e.g.:
mpmissions/dayzOffline.chernarusplus/
├── db/
│ ├── types.xml # item definitions and spawn quotas
│ ├── events.xml # dynamic events (heli crashes, animals, vehicles)
│ ├── globals.xml # global server variables
│ └── messages.xml # server messages
├── cfgeconomycore.xml # CE file routing (which XMLs are loaded)
├── cfgeventspawns.xml # spawn coordinates for events
├── cfgspawnabletypes.xml # contents of spawning containers
├── cfglimitsdefinition.xml # available tags, categories, usage
├── cfglimitsdefinitionuser.xml # user-defined spawn filter values
├── init.c # mission script (spawn points, custom logic)
└── storage_1/ # persistence (player data, bases, world items)
For Livonia the mission folder is dayzOffline.enoch, for Sakhal dayzOffline.sakhal — structure is identical.
Understanding types.xml
types.xml defines per item how many of them may exist on the map, how long they stay, and which building types they spawn in.
A typical entry:
<type name="AKM">
<nominal>10</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0"/>
<category name="weapons"/>
<usage name="Military"/>
<value name="Tier3"/>
<value name="Tier4"/>
</type>
Key Attributes
| Attribute | Meaning |
|---|---|
name | Item class name (e.g. AKM, Apple, Mosin9130) |
nominal | Target count on the map. CE tries to maintain this. |
min | Minimum count. Below this, the item spawns with priority. |
lifetime | Seconds the item stays on the ground. 14400 = 4 hours. |
restock | Seconds before a new one spawns after pickup. 0 = immediate. |
quantmin / quantmax | For items with ammo/contents: min/max fill % (1-100, or -1 for “n/a”). |
cost | Spawn priority. Higher = picked more often. Default 100. |
category | Building filter (food, weapons, tools, clothes, containers, explosives). |
usage | Where it can spawn: Military, Police, Medic, Farm, Industrial, Hunting, Town, Village, Coast. |
value | Loot tier: Tier1 (coast) up to Tier4 (Tisy/NW). |
tag | Indoor placement: floor, shelves. |
Flag Attributes
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="0"/>
| Flag | When 1 |
|---|---|
count_in_cargo | Items in backpacks/containers count toward nominal |
count_in_hoarder | Items in player storage (tents, barrels, buried sacks) count |
count_in_map | Items on the world floor count (default: 1) |
count_in_player | Items in player inventory count |
Practical use: if you want to stop hoarding, set count_in_hoarder="1" and count_in_cargo="1". Then nothing new spawns while items are stacked anywhere.
Example: Make Loot More Common
Want more AKMs?
<type name="AKM">
<nominal>30</nominal> <!-- was 10 -->
<min>15</min> <!-- was 5 -->
<restock>600</restock> <!-- was 1800 (10 instead of 30 min) -->
...
</type>
Important: scale ammo and magazines too — otherwise you have plenty of useless rifles.
Understanding events.xml
events.xml controls dynamic events: helicopter crashes, animal spawns, vehicles, loot containers, contaminated zones.
A heli crash event:
<event name="StaticHeliCrash">
<nominal>5</nominal>
<min>3</min>
<max>8</max>
<lifetime>14400</lifetime>
<restock>0</restock>
<saveforce>0</saveforce>
<active>1</active>
<children>
<child lootmax="0" lootmin="0" max="0" min="0" type="Land_Wreck_Mi8_DZ"/>
<child lootmax="0" lootmin="0" max="0" min="0" type="Land_Wreck_UH1Y"/>
</children>
</event>
| Attribute | Meaning |
|---|---|
nominal | Target number of simultaneously active events |
min / max | Hard min/max (overrides nominal) |
lifetime | Seconds before the event despawns |
restock | Wait time between spawns |
active | 1 = enabled, 0 = disabled |
children | Possible wrecks/items that can spawn |
Spawn Coordinates: cfgeventspawns.xml
Where an event can spawn is controlled in cfgeventspawns.xml:
<event name="StaticHeliCrash">
<pos x="2200" z="3500" />
<pos x="6700" z="9800" />
...
</event>
Coordinates are internal map coordinates (X = east-west, Z = north-south).
Container Contents: cfgspawnabletypes.xml
Want a Mosin to spawn with a scope and ammo? Define it in cfgspawnabletypes.xml:
<type name="Mosin9130">
<attachments chance="0.40">
<item name="PUScopeOptic" chance="0.30"/>
<item name="HuntingOptic" chance="0.30"/>
</attachments>
<cargo chance="0.50">
<item name="Ammo_762x54" chance="0.40" quantmin="5" quantmax="20"/>
</cargo>
</type>
chance is the probability (0.0-1.0) the slot is filled.
cfgeconomycore.xml
This file controls which XMLs are loaded at all. Mods use it to attach their own types.xml without overwriting yours:
<economycore>
<classes>
<rootclass name="ce" folder="ce">
<file name="expansion_types.xml" type="types"/>
<file name="expansion_events.xml" type="events"/>
</rootclass>
</classes>
</economycore>
Cleaner than dumping everything into a single types.xml.
Common Tweaks
1. Reduce zombies (events.xml):
<event name="InfectedArmy">
<nominal>50</nominal> <!-- instead of 80 -->
...
</event>
2. Longer loot lifetime for RP servers:
<type name="AKM">
<lifetime>28800</lifetime> <!-- 8h instead of 4h -->
</type>
3. Global loot multiplier via script:
In init.c you can scale all nominals via code at mission start — see Bohemia’s wiki “DayZ:Central Economy mission files modding”.
Validation and Debugging
Symptoms of a broken CE:
- Nothing spawns
- Console spam “Type X not found”
- Loot stacked somewhere but absent from buildings
Workflow:
- Open
profiles/server_console.log - Search
[CE]orType - For syntax errors: use an XML validator (e.g. xmllint)
- For “Type X not found”: the item no longer exists, remove it from
types.xml
FAQ
Question: How do I integrate types.xml from a mod?
Two routes: copy the mod’s items into your types.xml, or use cfgeconomycore.xml to load a separate file from the mod template. The latter survives mod updates better.
Question: Where do I find item class names?
In mod workshops, inside types.xml itself (all vanilla items), or via tools like DayZ-Tools and class-list generators. Mods almost always ship a types.xml template.
Question: What does lifetime = 0 do?
Very short lifetime — effectively the item despawns almost immediately once it’s not in a container or inventory. Use lifetime = 60 instead if you want short-lived loot.
Question: How does CE know whether an item spawns indoors or outdoors?
Through the tag entry (floor, shelves) and the loot point in the building. Mappers defined spawn points per building type, and each item has matching tags.
Question: When does CE restart?
On every server restart, economy.xml is evaluated and items with init=1 are spawned. During runtime CE checks every few minutes and rebalances inventory against nominal values.
Question: How do I do a “complete loot wipe” without changing the map?
Delete the storage_1 folder in your mission directory. On next boot persistence regenerates — all player camps and built structures are gone.
Question: Do mods break my types.xml?
Mods that write directly into your types.xml — yes, when they update, your tweaks are gone. Load mod items via cfgeconomycore.xml instead.
Question: What about quantmin = -1?
Means “not applicable” — for items without quantity (weapons, tools). For consumables like ammo or water bottles, set quantmin and quantmax as a percentage (1-100).