This guide explains how to edit types.xml to customise the loot economy on your DayZ server hosted with Legion Hosting. You will learn what each attribute controls, see examples for common tuning scenarios, and understand how to validate your changes. For general server configuration, see the DayZ Server Setup Guide.
types.xml or any other mission file. Changes written while the server is running may be overwritten or ignored on the next shutdown.
Locating types.xml
The loot economy in DayZ is controlled by the types.xml file. This file defines every item that can spawn on the map and how often each item appears. It is located at:
mpmissions/dayzOffline.chernarusplus/db/types.xml
If you are running a different map (such as Livonia), replace dayzOffline.chernarusplus with the folder name for your mission. Common mission folder names:
| Map | Mission Folder |
|---|---|
| Chernarus | dayzOffline.chernarusplus |
| Livonia | dayzOffline.enoch |
Open types.xml in the GPanel file editor or download it via SFTP, edit it locally, and re-upload.
Understanding the Key Attributes
Each item in types.xml is defined by a <type> element. The most important child elements for controlling loot frequency are:
| Element | Description |
|---|---|
nominal |
The target number of this item that the server tries to maintain across the map at all times. Increase this to make the item more common. Set to 0 to disable spawning entirely. |
min |
The minimum number of this item on the map before the restock system starts spawning more. Must be less than or equal to nominal. |
lifetime |
How long (in seconds) an item persists on the ground before it despawns if not interacted with. Increase this value to make items last longer before disappearing. |
restock |
Time (in seconds) between spawn attempts. Setting this to 0 means the item respawns as soon as the count drops below min. |
quantmin / quantmax |
Controls the quantity range when the item spawns (e.g., ammo count in a magazine). A value of -1 means the game uses its default. |
cost |
A priority weight used by the Central Economy. Higher values make the item spawn earlier during a restock cycle. Rare items typically have higher cost values. |
Flags Explained
Each <type> element includes a <flags> element that controls how the economy counts existing instances of the item:
| Flag | Description |
|---|---|
count_in_map |
Count items on the ground towards the nominal total. |
count_in_cargo |
Count items inside containers (backpacks, storage) towards the total. |
count_in_hoarder |
Count items in player stashes and buried containers towards the total. |
count_in_player |
Count items carried by online players towards the total. |
crafted |
Set to 1 if this item is craft-only and should not spawn naturally. |
deloot |
Set to 1 for Dynamic Event loot (helicopter crashes, etc.). |
Example: AKM Assault Rifle Entry
<type name="AKM">
<nominal>5</nominal>
<lifetime>14400</lifetime>
<restock>0</restock>
<min>2</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" crafted="0" deloot="0"/>
<category name="weapons"/>
<usage name="Military"/>
</type>
In this example the server tries to keep 5 AKMs on the map at all times (nominal=5). When the count drops below 2 (min=2), new ones spawn immediately (restock=0). Each AKM despawns after 4 hours if untouched (lifetime=14400 seconds). Only ground spawns are counted (count_in_map=1), so AKMs inside player backpacks or buried stashes are not subtracted from the total.
Category and Usage Tags
The <category> and <usage> tags control where items spawn on the map:
<category name="weapons"/>-- classifies the item type (weapons, clothes, tools, food, etc.)<usage name="Military"/>-- restricts spawns to military zones. Other values includeTown,Village,Farm,Industrial,Hunting,School,Medic,Police,Firefighter, andCoast.
You can add multiple <usage> tags to allow an item to spawn in several location types.
Common Loot Tuning Examples
| Goal | What to Change |
|---|---|
| Make an item more common | Increase nominal and min |
| Disable an item from spawning | Set nominal to 0 and min to 0 |
| Make items last longer before despawning | Increase lifetime (value is in seconds; 3600 = 1 hour) |
| Speed up item respawning after pickup | Decrease restock or set it to 0 |
| Make rare loot count even when hoarded | Set count_in_hoarder="1" and count_in_cargo="1" |
| Allow an item to spawn in towns and military areas | Add both <usage name="Town"/> and <usage name="Military"/> |
Validating Your Changes
types.xml must be valid XML. A single unclosed tag, mismatched bracket, or stray character will prevent the server from loading the mission and can cause it to crash on startup. Use a text editor with XML validation (such as Notepad++ or VS Code) when editing this file locally before uploading.
Common XML mistakes to watch for:
- Forgetting to close a
<type>element with</type> - Mismatched quotes in attribute values (e.g.,
name="AKMwithout a closing quote) - Stray characters or extra angle brackets
- Accidentally deleting the XML declaration at the top of the file
Mod Interactions with types.xml
If you are running mods that add new items, those mods may include their own types.xml entries in the mod's db/ folder. If your changes to the vanilla types.xml do not seem to take effect for modded items, check whether the mod overrides the entry. You may need to edit the mod's own types.xml instead.
Related Articles
- DayZ Server Setup Guide -- serverDZ.cfg configuration and how players connect
- DayZ Mod Installation -- Steam Workshop mods, load order, and key files
- DayZ Troubleshooting -- common errors, BattlEye issues, and RCON setup
- How to Upload Files via SFTP