Explainer

DayZ cfgspawnabletypes.xml explained

types.xml decides how many of an item exist. cfgspawnabletypes.xml decides what each one comes with: the condition it spawns in, which attachments are on a gun, what's inside a backpack or a crate, and whether an item counts as storage. It's the file behind "why do all my AKMs spawn without a stock?" and "how do I make cars spawn with wheels?". Here's how it works.

  • 4 min read
  • Updated
  • PlayStation, Xbox and PC
cfgspawnabletypes.xmlExample
<type name="AKM">    <damage min="0.45" max="0.85" />    <attachments chance="0.25">        <item name="AK_PlasticBttstck" chance="1.00" />    </attachments>    <attachments chance="0.50">        <item name="KashtanOptic" chance="0.30" />        <item name="PSO11Optic" chance="0.20" />    </attachments></type>

Where it is and what it covers

cfgspawnabletypes.xml is in the root of your mission folder. It has one type block per item that needs extra rules. Items not listed spawn bare, using only their types.xml values. Vehicles, weapons, clothing with pouches, containers and infected and animal loot all live here.

Damage: what condition items spawn in

A damage line sets the range of damage an item can spawn with, from 0 (pristine) to 1 (ruined). The vanilla AKM, for example, spawns between 0.45 and 0.85 damage, which is why most found AKMs are worn or damaged. Lower the range for better condition guns, or leave it for a tougher server.

Attachments: chance groups

Each attachments block is one slot or group, with its own chance of being filled. Inside it, each item has a chance of being the one picked. In vanilla, the AKM has a 25% chance of a buttstock, always has a handguard, and a 50% chance of an optic, which is then a Kashtan or a PSO-1-1.

So to make guns spawn with more attachments, raise the chance on the attachments block, not just the items inside it. See make guns spawn with attachments for the step by step.

Cargo: what's inside

cargo blocks work the same way for what spawns inside an item, such as food in a backpack or ammo in a crate. Keep cargo modest: every item inside counts towards the economy, and very full containers make a server's loot feel unearned.

Presets

Instead of listing items, an attachments or cargo block can name a preset from cfgrandompresets.xml. Presets are reusable lists, such as a set of common magazines or tools, shared across many items. Change the preset and every item using it changes too.

Hoarder: items that count as storage

A hoarder tag marks an item as storage, such as tents, barrels, crates and sea chests. The economy treats these differently because they hold players' gear. Leave hoarder tags as they are unless you're adding a modded container that should behave the same way.

Vehicles and their parts

Cars spawn with their parts through cfgspawnabletypes too: wheels, doors, bonnet, boot, battery and spark plug, each with a chance. That's why cars often turn up missing wheels. Raise the chances on the parts you want and cars spawn more complete. Pair it with more cars in events.xml.

Infected and animal loot

Infected carry loot through cfgspawnabletypes too. Each infected type, such as a soldier or a police officer, has cargo blocks listing what might be in their pockets. Raise those chances for a server where killing infected is worth the risk, or lower them to make players search buildings instead.

Worked example: better military rifles

Say you want military rifles to turn up in better shape and with optics more often:

  • Find the rifle's type block, such as M4A1 or AKM
  • Lower the damage range, for example min 0.1 and max 0.5
  • Raise the chance on the optic attachments block from 0.5 to 0.8
  • Leave the individual optic chances alone so the mix stays varied
  • Restart and check a few rifles in game before changing others

Edit it safely

The file is long (the vanilla Chernarus one has thousands of lines), so search for the item's class name rather than scrolling. Change one item, restart and check in game before moving on. New spawns use the new rules; items already on the map keep what they spawned with.

Tools for this

Common questions

How do I make DayZ cars spawn with all their wheels?

Raise the chance on the wheel attachments for that car in cfgspawnabletypes.xml, then restart. New cars spawn with the new chances.

Why do my guns spawn so damaged?

The damage range in cfgspawnabletypes.xml. Lower min and max for that weapon, for example 0 to 0.3, for better condition guns.

Is cfgspawnabletypes.xml the same as types.xml?

No. types.xml sets how many of an item exist and where. cfgspawnabletypes.xml sets what each one spawns with.

What does hoarder mean in cfgspawnabletypes.xml?

It marks an item as storage, such as a tent, barrel or crate. Leave these tags alone unless you add a modded container.

Where do I find an item's class name?

In types.xml, or by searching the item in the Types Editor, which lists every vanilla item with its class name.

Do changes affect items already on the map?

No. Only new spawns use the new rules. Items already on the map keep what they spawned with until they despawn.

Does it work on console?

Yes. PlayStation and Xbox servers use the same file.

Run your DayZ server from one place

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