Explainer

DayZ cfglimitsdefinition.xml explained

Every item in types.xml has a category, usage flags such as Military or Farm, and value flags such as Tier3. Those words aren't free text. They're defined in cfglimitsdefinition.xml, and buildings in mapgroupproto.xml use the same words to say what loot they accept. Understanding this small file is the key to custom loot zones, like a military-only weapon list or a server where high tier loot only spawns in one area.

  • 4 min read
  • Updated
  • PlayStation, Xbox and PC
cfglimitsdefinitionuser.xmlExample
<user_lists>    <valueflags>        <user name="Tier34">            <value name="Tier3" />            <value name="Tier4" />        </user>    </valueflags></user_lists>

The four lists

The vanilla file is short, with four lists:

  • categories: tools, containers, clothes, lootdispatch, food, weapons, books and explosives
  • tags: floor, shelves and ground, which say where in a building an item can sit
  • usageflags: the kind of place, such as Military, Police, Medic, Firefighter, Industrial, Farm, Coast, Town, Village, Hunting, Office, School, Prison, Lunapark, SeasonalEvent, ContaminatedArea and Historical
  • valueflags: Tier1 to Tier4 plus Unique, which map to map areas from the coast (Tier1) to the inland military zones (Tier4)

How items and buildings meet

An item spawns somewhere only when the place and the item agree. A building's loot points carry usage flags and categories from mapgroupproto.xml, and the map area carries a tier. An item with usage Military and value Tier3 can spawn in military buildings in Tier3 areas, and nowhere else.

That's why removing all usage flags from an item stops it spawning, and why giving a gun the Town usage puts it in houses. See loot tiers explained.

The user file: your own groups

cfglimitsdefinitionuser.xml lets you name groups of existing flags so types.xml stays readable. Vanilla includes TownVillage (Town plus Village), and tier groups such as Tier12, Tier23, Tier34, Tier123, Tier234 and Tier1234.

In types.xml you can then write one user flag instead of listing each tier. It's a shorthand, not a new place: a user group only matches places that already carry one of its flags.

Make a custom loot zone

A popular use is keeping powerful weapons to one part of the map. Give those weapons only the Military usage and only the Tier4 value, and they'll spawn only at high tier military sites. To make a whole area special, combine this with gas zones, which have their own ContaminatedArea usage.

  • Coast-only starter food: usage Coast and Village, value Tier1
  • Police-only pistols: usage Police, values Tier1 to Tier3
  • End-game rifles: usage Military, value Tier4

Adding brand new flags

You can add new names to these lists, but a new usage only helps if buildings or events use it too, which means editing mapgroupproto.xml or the event's spawn rules. Mods sometimes add their own flags and ship the matching building changes. On a vanilla server, use the existing flags and user groups; they cover nearly every idea.

How tiers are mapped

Tiers aren't drawn by hand in an XML file. Each map has an area map, a picture that marks which tier each part of the map belongs to. On Chernarus, Tier1 covers most of the coast, Tier2 the near inland towns, Tier3 the bigger inland areas and Tier4 the far north-west military zones such as Tisy. Livonia and Sakhal have their own areas.

Because the areas are fixed, the easy way to shape loot is to change the item's flags, not the map. Moving an item from Tier4 to Tier3 widens where it can appear without touching anything else.

Avoid broken flags

A flag in types.xml that isn't defined here is a common cause of items that never spawn, and of warnings in the server log at start up. Check spelling and capitals: Military is not military. If loot vanishes after an edit, look for a mistyped flag first.

Tools for this

Common questions

What do Tier1 to Tier4 mean in DayZ?

They're value flags tied to map areas, roughly from the coast (Tier1) to the far inland military zones (Tier4). Items only spawn in the tiers they're flagged for.

Why isn't my item spawning?

Check its usage and value flags. If no building in a matching tier area has those flags, or a flag is misspelt, it can't spawn anywhere.

What is cfglimitsdefinitionuser.xml for?

Naming groups of existing flags, such as Tier34, so types.xml entries are shorter. It doesn't create new places.

Can I add my own usage flag?

Yes, but buildings or events must use it too, which means editing mapgroupproto.xml. On vanilla servers the existing flags and user groups are usually enough.

Can an item have more than one usage?

Yes. List several usage lines and the item can spawn in any of those places, which is how common items appear almost everywhere.

What is the Unique value flag?

It's a separate value flag for special areas a map marks as unique. Most servers leave it as it is.

Does this work on console?

Yes. Both files are part of the mission on PlayStation and Xbox too.

Run your DayZ server from one place

Free editors for every config file, plus a live dashboard and Discord feeds when you're ready.