Spawnable-Types: Attachments & Cargo Guide
Guide to attachments and cargo in DayZ types.xml — individual vs grouped spawns, optional attributes like damage, quantity, and hoarder, plus a full example.
Overview
In types.xml, the <attachments> and <cargo> blocks let you control what items spawn attached to a weapon or inside a container. Grouped entries randomly select one item — they do not spawn everything listed.
Attachments (Individual Spawn)
Always spawns this attachment. chance="1.00" = 100% spawn.
<attachments chance="1.00">
<item name="Attachment_Name" chance="1.00" />
</attachments>
Attachments (Grouped / Random)
Only one item from the group will spawn.
chance="0.30"= 30% chance the group spawns- Inner chance splits probability between items
<attachments chance="0.30">
<item name="Attachment_Name1" chance="0.50" />
<item name="Attachment_Name2" chance="0.50" />
</attachments>
Cargo (Individual Spawn)
Item will always spawn inside the container. Works for storage items (bags, crates, etc.).
<cargo chance="1.00">
<item name="ItemName" chance="1.00" />
</cargo>
Cargo (Grouped / Random)
Only one item from the group will spawn. Good for loot variety.
<cargo chance="1.00">
<item name="ItemName1" chance="0.50" />
<item name="ItemName2" chance="0.50" />
</cargo>
Important Note
Attachment & cargo presets are defined in cfgrandompresets.xml.
Make sure your presets exist there, or they won't work.
Optional Attributes
Damage (durability range)
Controls the condition of the spawned item.
<damage min="0.1" max="1.0" />
Quantity Settings
Used for ammo, liquids, etc.
quantmin="1"
quantmax="100"
Hoarder Tag
Items inside count toward the server economy — affects nominal & min values.
<hoarder />
Complete Example
<type name="M4A1">
<nominal>10</nominal>
<lifetime>7200</lifetime>
<restock>1800</restock>
<min>5</min>
<quantmin>-1</quantmin>
<quantmax>-1</quantmax>
<cost>100</cost>
<attachments chance="1.00">
<item name="M4_Mag30" chance="1.00" />
</attachments>
<attachments chance="0.30">
<item name="ACOGOptic" chance="0.50" />
<item name="ReflexOptic" chance="0.50" />
</attachments>
<cargo chance="1.00">
<item name="Ammo_556x45" chance="1.00" />
</cargo>
</type>
Final Notes
- Grouping = random selection (not all items)
- Use chances carefully to balance loot
- Always test presets after editing
- Check
cfgrandompresets.xmlif things don't spawn
Need help with your loot tables? Open a ticket — we've got you.
0 Comments
You need to be logged in to comment
No comments yet. Be the first to comment!
