Understanding types.xml
types.xml is the Central Economy's item database. Every item the server is allowed to spawn in the world has an entry here. The CE reads this file at startup and uses it to decide what to place, how many to maintain, how long items should persist, and which areas of the map they belong to.
If an item has no entry in types.xml, the CE will not spawn it.
Anatomy of a type entry
Every item is defined inside a <type> block. Here is a complete example:
<type name="AKM">
<nominal>5</nominal>
<lifetime>14400</lifetime>
<restock>1800</restock>
<min>1</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="1" crafted="0" deloot="0"/>
<category name="weapons"/>
<usage name="Military"/>
<value name="Tier3"/>
<value name="Tier4"/>
</type>The name attribute must exactly match the item's internal class name — capitalisation matters.
<nominal>
The target population the CE tries to maintain in the world at all times. The CE will keep spawning this item until the world count reaches this number. Once reached, it stops.
- Set to
0and the CE will never spawn this item. - This is a target, not a hard cap. What counts toward this total is controlled by the
flags.
<lifetime>
How long (in seconds) a spawned item sits uninteracted with before the CE removes it. Internally clamped between 3 seconds and 316,224,000 seconds (10 years).
Common values for reference:
| Seconds | Human readable |
|---|---|
| 3600 | 1 hour |
| 14400 | 4 hours |
| 43200 | 12 hours |
| 86400 | 1 day |
| 172800 | 2 days |
| 604800 | 1 week |
Increasing lifetime means items persist longer on the ground before cleanup. Decreasing it means the world clears out faster.
<restock>
The cooldown in seconds before the CE will attempt to replace an item after it has been taken or cleaned up. This is the opposite of lifetime — it controls how long a spawn point sits idle before it becomes eligible for a new item.
0means the spawn point is immediately eligible for a replacement. The CE will restock it on its next pass.- Higher values slow down how quickly a given spot can be re-filled after being looted.
<min>
The minimum count the CE tries to always maintain. If the world count drops below this number, the CE treats restocking this item as a priority over everything else.
0means the CE does not aggressively prioritise this item — it will restock eventually when the CE gets to it.- Setting this equal to
nominalmakes the CE work hardest to keep the world fully stocked at all times. - Setting this higher than
nominalis not meaningful — the CE caps its target atnominal.
<quantmin> and <quantmax>
These control the quantity (fill percentage) of stackable items or magazines when they spawn. Values are percentages from 0 to 100.
-1means not applicable — used for non-stackable, non-magazine items.quantmin="30" quantmax="80"means the item spawns with somewhere between 30% and 80% of its capacity filled (e.g. a magazine spawns partially loaded).quantmin="100" quantmax="100"means it always spawns full.
Internally, the engine converts these to a 0.0–1.0 range when reading them from the file.
<cost>
A priority value the CE uses when deciding what to respawn and what to clean up first. Sourced from CEItemProfile.GetCost() in centraleconomy.c.
- Higher cost = higher priority for respawn, and longer protection during cleanup passes.
- The default is
100. Most items leave this untouched. - Practically, adjusting cost is rarely necessary for normal server configuration.
Flags
All six flags live on a single <flags> element. Each is either 0 (off) or 1 (on).
<flags count_in_cargo="0" count_in_hoarder="0" count_in_map="1" count_in_player="1" crafted="0" deloot="0"/>Count flags
These flags control what the CE counts toward the nominal total. Together they determine whether the server thinks it has "enough" of this item in the world.
| Flag | What it counts |
|---|---|
count_in_map | Items lying on the ground or inside buildings |
count_in_cargo | Items inside backpacks and containers carried by players |
count_in_hoarder | Items inside storage containers (barrels, tents, crates) placed in the world |
count_in_player | Items on a player's person (worn, in hands, pockets) |
Example: If count_in_player="0" and count_in_cargo="0", items held or carried by players are invisible to the CE's count. The server will keep spawning the item into the world regardless of how many players are carrying it. This is standard for high-value loot where you want the world to always have some available even if players have stocked up.
If all four count flags are 1, any instance of the item — on the ground, in a barrel, in a player's pocket — reduces the CE's willingness to spawn more.
count_in_map="1" is almost always on. Turning it off means items already lying on the ground do not reduce the nominal target, which can lead to the CE continually spawning more of an already-stocked item.
crafted
crafted="1"— The CE will not spawn this item in the world. It can only be obtained by crafting. The CE still tracks it according to the count flags.crafted="0"— Normal CE spawning applies.
deloot
deloot="1"— This item will be deleted by dynamic event cleanup (server-side scripted events that clear loot from an area). Used for items that are specifically placed by dynamic events and should be removed when the event ends.deloot="0"— Normal cleanup rules apply.
<category>
Assigns the item to a loot category group. Categories are defined in cfglimitsdefinition.xml and can be used by the CE to apply category-level limits. Valid vanilla categories are:
| Category | Used for |
|---|---|
tools | Tools, medical items, utility gear |
containers | Backpacks, bags, pouches |
clothes | Clothing and wearables |
lootdispatch | Internal CE routing — not typically set manually |
food | Food and drink items |
weapons | Firearms and melee weapons |
books | Books and readable items |
explosives | Grenades, mines, explosive devices |
An item can only have one <category>.
<usage>
Controls which zone types this item is allowed to spawn in. Zones are overlaid on the map — buildings are tagged with zone types, and the CE only places this item in buildings that match.
Valid usage flags (from cfglimitsdefinition.xml):
| Usage | Where it spawns |
|---|---|
Military | Military bases, barracks, checkpoints, airfields |
Police | Police stations |
Medic | Hospitals, clinics |
Firefighter | Fire stations |
Industrial | Factories, warehouses, garages |
Farm | Farms, stables, agricultural buildings |
Coast | Coastal and harbour areas |
Town | Town buildings, shops, houses |
Village | Village houses and outbuildings |
Hunting | Hunting cabins, deer stands, forestry buildings |
Office | Office buildings, city blocks |
School | Schools |
Prison | Prison facilities |
Lunapark | Amusement park |
SeasonalEvent | Seasonal event spawns |
ContaminatedArea | Contaminated zone spawners |
Historical | Historical sites and monuments |
An item can have multiple <usage> tags stacked to cover multiple zone types:
<usage name="Military"/>
<usage name="Police"/>Removing all <usage> tags means the item has no zone restriction — it can spawn anywhere the CE finds a valid spawn point that matches its tier.
cfglimitsdefinitionuser.xml lets you define shorthand groups for common combinations. For example, TownVillage expands to both Town and Village, and TownVillageOfficeSchool covers all four civilian zone types in a single tag. Use these in <usage name="TownVillage"/> to keep types.xml cleaner.
<value>
Controls which map tiers this item can spawn in. Tiers are geographic overlays that roughly correspond to how dangerous and remote an area of the map is.
| Value | Area on Chernarus |
|---|---|
Tier1 | Coastal and southern regions — the starting area |
Tier2 | Inland towns and moderate-risk areas |
Tier3 | Further inland — higher risk, better loot generally |
Tier4 | Northern military zones — NW Airfield, Tisy, NWAF surroundings |
Unique | Special spawns — not tied to the standard tier geography |
An item can have multiple <value> tags. A military rifle set to Tier3 and Tier4 only appears in the north and far inland military zones — never on the coast.
<value name="Tier3"/>
<value name="Tier4"/>As with <usage>, shorthand groups are available in cfglimitsdefinitionuser.xml:
| Group | Expands to |
|---|---|
Tier12 | Tier1 + Tier2 |
Tier23 | Tier2 + Tier3 |
Tier34 | Tier3 + Tier4 |
Tier123 | Tier1 + Tier2 + Tier3 |
Tier234 | Tier2 + Tier3 + Tier4 |
Tier1234 | All tiers |
How nominal, min, and count flags interact
This is the most commonly misunderstood part of types.xml.
The CE's decision to spawn an item is based on world count vs nominal.
World count = all instances of the item that match the enabled count flags.
- If world count is below
min, the CE prioritises spawning this item immediately. - If world count is between
minandnominal, the CE spawns more as part of its normal respawn cycle. - If world count reaches or exceeds
nominal, the CE stops spawning. - If world count drops again (items taken, lifetime expired), the CE starts spawning again.
The count flags determine what "world count" actually sees. If count_in_player="0", every item a player picks up becomes invisible to the CE, so the server will keep the world stocked even when players have taken a lot. This is why military weapons typically have player and cargo counting disabled — the CE fills the map regardless of how much is in player inventories.
Setting nominal very high without considering the count flags can cause unexpected results. If all count flags are enabled and players are carrying many of an item, the world count rises quickly, and the CE may stop spawning even though map buildings appear empty.