How to Configure Loot in types.xml
How does types.xml control DayZ loot? Learn what nominal, min, lifetime, restock, category, usage, value and tier settings do.
Looking for DayZ console bot setup guides?
See our feature pages for DayZ auto ban, and DayZ economy bot.
types.xml
types.xml tells the Central Economy how to treat an entity class. It does not place an item in a particular building by itself. The category, usage, value and tag values are filters that work with the map's building prototypes and loot points.
A normal entry
<type name="ExampleItem">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>0</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<flags count_in_cargo="1" count_in_hoarder="1" count_in_map="1" count_in_player="1" crafted="0" deloot="0" />
<category name="tools" />
<usage name="Town" />
<value name="Tier2" />
<tag name="floor" />
</type>The classname in name must be a class the game knows. The numbers describe population and respawn behaviour; they are targets used by the CE, not a promise that the item will always be visible at that number.
What the fields mean
- nominal is the approximate population target.
- min is the minimum available count the CE tries to maintain.
- lifetime is the maximum ground-idle lifetime in seconds.
- restock is the delay before a replacement is allowed when the CE needs one.
- quantmin and quantmax control the starting quantity for quantity-based items. -1 means the type does not supply a quantity range.
- cost is an internal CE priority used during spawning and cleanup. It is not a shop price.
- category is the broad loot class, such as weapons, tools or food.
- usage describes places such as Town, Village, Military or Medic.
- value is the map value/tier filter, such as Tier1 to Tier4 or Unique.
- tag narrows the kind of loot point, such as floor, shelves or ground.
The flags decide which kinds of stored objects count toward the CE count and whether the type is treated as crafted or deloot. Use the exact flag names from the supplied file version.
Where the item actually appears
The item needs a compatible loot point. mapgroupproto.xml describes the points inside building prototypes, while mapgrouppos.xml places those prototypes in the world. The point's category, usage, value and tag are matched against the type entry. That is why changing usage can move an item between towns, villages, military areas or medical buildings without changing its classname.
For the complete per-item record, use the DayZ item database. It includes the supplied map records and links to the relevant class page.
Practical changes
To make an existing item easier to find, first keep its classname and change only its existing usage, value or category to another identifier already present in cfglimitsdefinition.xml. For example, changing a supported item from Village to Town changes which compatible building points can be considered; it does not place the item at one named town.
To make a quantity-based item appear with a usable amount, use its quantity fields rather than treating nominal as a stack size. nominal controls how many item entities the economy targets. quantmin and quantmax control the amount inside an item that supports quantity. If a type uses -1 for those fields, leave them alone unless the class's item data proves that it accepts quantity.
Why an item can still be missing
An item can be valid in types.xml and still not appear because its filters do not match any loot point, its minimum/nominal population has not been reached, the item is already counted in the configured storage flags, or its classname is hidden/unsupported. $UNT$ records in the supplied database are hidden entries and are not normal vanilla loot recommendations.
Source basis: supplied types.xml, cfglimitsdefinition.xml, mapgroupproto.xml, mapgrouppos.xml and the Central Economy explainer. The example shows the editable shape; it is not a recommendation to add an unsupported class.