Dayz | Changing AI Spawn Rates in DayZ Server (types.xml)
In DayZ, you can modify the loot and spawn rates of items on your server by editing the types.xml
file. This file is responsible for controlling the characteristics of various items in the game world. Follow the steps below to adjust the AI spawn rates according to your preferences:
-
Locate the
types.xml
file, which can be found in either of the following folders, depending on the map you are playing on:- For Chernarus map:
\mpmissions\dayzOffline.chernarusplus\db\
- For Livonia map:
\mpmissions\dayzOffline.enoch\db\
- For Chernarus map:
-
You have two options to edit the
types.xml
file:- Use the Game Panel's Text Editor (Recommended):
- Alternatively, you can download the
types.xml
file to your local PC using an FTP client or our built in file manager. Once downloaded, use your favorite text editor to make the necessary changes. After editing, save the file, and then upload it back to the original location.
-
Within the
types.xml
file, you will find various sections corresponding to different items in the game. Each item entry contains specific attributes that control its spawn rate.
Let's say you want to adjust the spawn rate for Ammo_12gaPellets
, you will find its entry as follows:
<type name="Ammo_12gaPellets">
<nominal>100</nominal>
<lifetime>7200</lifetime>
<restock>0</restock>
<min>80</min>
<quantmin>20</quantmin>
<quantmax>100</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="Police"/>
<usage name="Farm"/>
<usage name="Town"/>
<usage name="Village"/>
<usage name="Hunting"/>
<value name="Tier1"/>
<value name="Tier2"/>
<value name="Tier3"/>
</type>
Important Attributes for Adjustments
Be cautious when changing values like nominal
, as setting it too high can impact server performance.
Element | Description |
---|---|
Name | Class Name of Item to Spawn |
Nominal | Number of items spawned in the world at any given time. (Ideal Value) Must be more or equal to min value. Be careful changing this number. Too many will bring your server to its knees. |
Lifetime | Time (In Seconds) before this type of items gets deleted in the world (If no players interact with it). Lifetime: 604800 (seven days), 3888000 (45 days) |
Restock | If Value=0, Respawn item type in bulk to reach Nominal Value, If !=0, then Value=Time in seconds to respawn 1 additional item type, until Nominal Value is reached. |
Min | Minimum number of items of this type in the world. Once the number falls below minimum, the Restock process begins. (must be less or equal to nominal value) |
QuantMin | Minimum % Value for quantity (Rags #, Mag Ammo Value, Ammo Counts). Use -1 if Not Applicable. (less or equal to quantmax value) See note below. |
QuantMax | Maximum % Value for quantity (Rags #, Mag Ammo Value, Ammo Counts). Use -1 if Not Applicable. (more or equal to quantmin value) See note below. |
Cost | Priority of Item Spawning in CE queue (100 is default). |
Flags | Flags direct the spawner, in what case it must take min and nominal values into consideration for every item counting for spawning: count_in_cargo - Count items stored in containers as part of Nominal Value (0=False, 1=True). count_in_hoarder - tents, barrels, underground stashes (0=False, 1=True). count_in_map - Count items in the map as part of Nominal Value (0=False, 1=True). count_in_player - Count items stored in Player Inventory as part of Nominal Value (0=False, 1=True). crafted - Is the item a crafted item (0=False, 1=True). deloot - dynamic event loot objects - helicrashes in the majority of cases only by default. |
Category Name | Useful for sorting, Internal Category. |
Tag Name (optional) | MUST be AFTER the category. |
Usage Name (optional) | Internal Category used in the mpmissions\dayzOffline.chernarusplus\cfgRandomPresets.xml file. |
Value Name (optional) | Used to specify Central Loot Economy Spawning Locations. |
Possible options
Category | Tag | Usage | Value |
---|---|---|---|
clothes | shelves | Coast | Tier1 |
containers | floor | Farm | Tier2 |
explosives | Firefighter | Tier3 | |
food | Hunting | Tier4 | |
tools | Industrial | ||
weapons | Medic | ||
vehiclesparts | Military | ||
Office | |||
Police | |||
Prison | |||
School | |||
Town | |||
Village |
- Save and exit the
types.xml
- You can now start your server
By following these steps and carefully adjusting the relevant attributes in the types.xml file, you can customize the AI spawn rates and tailor the gameplay experience on your DayZ server. Always keep in mind the potential impact of spawn rate changes on server performance, and thoroughly test the adjustments to ensure the desired gameplay balance is achieved.