On this page

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 0 and 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:

SecondsHuman readable
36001 hour
144004 hours
4320012 hours
864001 day
1728002 days
6048001 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.

  • 0 means 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.

  • 0 means the CE does not aggressively prioritise this item — it will restock eventually when the CE gets to it.
  • Setting this equal to nominal makes the CE work hardest to keep the world fully stocked at all times.
  • Setting this higher than nominal is not meaningful — the CE caps its target at nominal.

<quantmin> and <quantmax>

These control the quantity (fill percentage) of stackable items or magazines when they spawn. Values are percentages from 0 to 100.

  • -1 means 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.

FlagWhat it counts
count_in_mapItems lying on the ground or inside buildings
count_in_cargoItems inside backpacks and containers carried by players
count_in_hoarderItems inside storage containers (barrels, tents, crates) placed in the world
count_in_playerItems 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:

CategoryUsed for
toolsTools, medical items, utility gear
containersBackpacks, bags, pouches
clothesClothing and wearables
lootdispatchInternal CE routing — not typically set manually
foodFood and drink items
weaponsFirearms and melee weapons
booksBooks and readable items
explosivesGrenades, 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):

UsageWhere it spawns
MilitaryMilitary bases, barracks, checkpoints, airfields
PolicePolice stations
MedicHospitals, clinics
FirefighterFire stations
IndustrialFactories, warehouses, garages
FarmFarms, stables, agricultural buildings
CoastCoastal and harbour areas
TownTown buildings, shops, houses
VillageVillage houses and outbuildings
HuntingHunting cabins, deer stands, forestry buildings
OfficeOffice buildings, city blocks
SchoolSchools
PrisonPrison facilities
LunaparkAmusement park
SeasonalEventSeasonal event spawns
ContaminatedAreaContaminated zone spawners
HistoricalHistorical 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.

ValueArea on Chernarus
Tier1Coastal and southern regions — the starting area
Tier2Inland towns and moderate-risk areas
Tier3Further inland — higher risk, better loot generally
Tier4Northern military zones — NW Airfield, Tisy, NWAF surroundings
UniqueSpecial 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:

GroupExpands to
Tier12Tier1 + Tier2
Tier23Tier2 + Tier3
Tier34Tier3 + Tier4
Tier123Tier1 + Tier2 + Tier3
Tier234Tier2 + Tier3 + Tier4
Tier1234All 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.

  1. If world count is below min, the CE prioritises spawning this item immediately.
  2. If world count is between min and nominal, the CE spawns more as part of its normal respawn cycle.
  3. If world count reaches or exceeds nominal, the CE stops spawning.
  4. 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.