Wiki Navigation

Configuration File
XML Format

cfgRandomPresets.xml Configuration

Define random item groups that spawn together in your DayZ server. Create themed loot bundles with configurable spawn probabilities for more realistic item distribution.

Overview

The cfgRandomPresets.xml file defines groups of items that can spawn together. It enables themed item groups like medical supplies or hunting gear, controls individual item probabilities within each group, and creates more realistic loot distribution by spawning contextually related items together.

File Structure

Each <cargo> element defines a preset group with a name and chance, containing multiple <item> elements.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<randompresets>
    <cargo chance="1.0" name="MedicalSupplies">
        <item name="BandageDressing" chance="0.8" />
        <item name="DisinfectantAlcohol" chance="0.5" />
        <item name="PainkillerTablets" chance="0.5" />
        <item name="Morphine" chance="0.2" />
        <item name="Epinephrine" chance="0.1" />
    </cargo>
    <cargo chance="1.0" name="HuntingGear">
        <item name="HuntingKnife" chance="0.7" />
        <item name="Box_762x54_20Rnd" chance="0.5" />
        <item name="HuntingOptic" chance="0.3" />
    </cargo>
</randompresets>

Cargo Parameters

name string

The unique identifier for this preset group. Use descriptive names that indicate the theme or purpose of the item collection, like "MedicalSupplies" or "MilitaryGear".

chance float

The probability (0.0 to 1.0) of this preset group being selected when applicable. A value of 1.0 means the group is always considered when its context matches.

Item Parameters

name string

The classname of the item. This must exactly match a classname defined in types.xml. Case-sensitive and must be spelled correctly for the item to spawn.

chance float

The probability (0.0 to 1.0) of this specific item spawning when its parent cargo group is selected. Each item rolls independently, so multiple items from the same group can spawn together.

How It Works

When the server decides to spawn items at a location, it can use these presets to determine which items should appear together. The system creates more realistic and contextual loot distribution.

Preset Selection

When spawning items in a medical location, the server might select the "MedicalSupplies" preset based on location tags and context.

Independent Rolls

Each item in the preset rolls its chance independently. A 0.8 chance item and a 0.5 chance item can both spawn, or neither, or just one.

Contextual Spawning

Finding bandages alongside painkillers in a hospital feels natural. Presets enable this thematic consistency across your server.

Rarity Control

Common items get higher chances (0.7-0.9), rare items get lower chances (0.1-0.3). This maintains item rarity within themed groups.

Common Preset Examples

MedicalSupplies

Bandages, disinfectant, painkillers, antibiotics

HuntingGear

Knives, rifle ammo, optics, camouflage

CampingEquipment

Tents, sleeping bags, cooking pots, matches

FishingGear

Fishing rods, hooks, bait, tackle boxes

MilitaryAmmo

Various ammunition types, magazines, grenades

ToolsBasic

Hammers, pliers, screwdrivers, duct tape

Best Practices

Recommended

  • Create thematically consistent groups that make logical sense
  • Balance item chances based on rarity - common items higher, rare items lower
  • Verify all item names exactly match those in types.xml
  • Test presets to ensure balanced loot distribution

Avoid

  • Mixing unrelated items in the same preset group
  • Setting all items to 1.0 chance which removes randomization
  • Typos in item classnames which cause silent failures
  • Too many high-value items in a single preset

Example Configuration

Medical Supplies Preset

Balanced medical loot for hospitals and clinics

<cargo chance="1.0" name="MedicalSupplies">
    <item name="BandageDressing" chance="0.85" />
    <item name="Rag" chance="0.80" />
    <item name="DisinfectantAlcohol" chance="0.50" />
    <item name="DisinfectantSpray" chance="0.45" />
    <item name="PainkillerTablets" chance="0.55" />
    <item name="VitaminBottle" chance="0.40" />
    <item name="CharcoalTablets" chance="0.35" />
    <item name="TetracyclineAntibiotics" chance="0.25" />
    <item name="Morphine" chance="0.15" />
    <item name="Epinephrine" chance="0.10" />
    <item name="Defibrillator" chance="0.05" />
</cargo>

Pro Tips

Structure your chance values in tiers: common items (0.7-0.9), uncommon (0.4-0.6), rare (0.2-0.3), and very rare (0.05-0.15). This creates natural loot progression where players find basic items easily but must search harder for valuable gear. Consider creating multiple presets for the same theme with different rarity distributions for different location types.