Wiki Navigation

cfgRandomPresets.xml Configuration

The cfgRandomPresets.xml file defines random item groups that can spawn together in your DayZ server.

Overview

The cfgRandomPresets.xml file is used to define groups of items that can spawn together in your DayZ server. This file helps control:

  • Themed item groups that spawn together (e.g., medical supplies, hunting gear)
  • Probability of specific items appearing within a group
  • More realistic and contextual loot distribution

File Structure

The cfgRandomPresets.xml file consists of <randompresets> and <cargo> 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="DisinfectantSpray" chance="0.5" />
        <item name="PainkillerTablets" chance="0.5" />
        <item name="VitaminBottle" chance="0.4" />
        <item name="IodineTincture" chance="0.3" />
        <item name="TetracyclineAntibiotics" chance="0.3" />
        <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="Box_308Win_20Rnd" chance="0.5" />
        <item name="HuntingOptic" chance="0.3" />
        <item name="ImprovisedSuppressor" chance="0.2" />
    </cargo>
</randompresets>

Cargo Parameters

name string

The name of the preset group.

chance float

The probability (0.0 to 1.0) of this preset group being selected when applicable.

Item Parameters

name string

The classname of the item (must match a classname in types.xml).

chance float

The probability (0.0 to 1.0) of this specific item spawning when its parent cargo group is selected.

How It Works

The cfgRandomPresets.xml file works in conjunction with other configuration files:

  • When the server spawns items, it can use these presets to determine which items should appear together
  • Each item in a cargo group has its own chance of spawning, independent of other items in the group
  • This system allows for more realistic loot distribution, such as finding related medical supplies together

For example, when the server decides to spawn items in a medical location, it might select the "MedicalSupplies" preset. Then, for each item in that preset, it rolls a random number to determine if that specific item will spawn based on its chance value.

Best Practices

When configuring random presets, consider the following best practices:

  • Create thematically consistent groups that make logical sense (e.g., fishing gear, camping supplies)
  • Balance item chances based on their rarity and value - common items should have higher chances
  • Consider the gameplay impact - presets can create interesting loot hotspots
  • Ensure all item names exactly match those in types.xml

Need Help?

For more information about random presets and loot distribution, check the types.xml documentation or join our Discord community for assistance.