DayZ Spawn Loadouts: Starting Gear With cfggameplay.json

Published on

Set DayZ spawn loadouts without a loadout generator: switch on cfggameplay.json, list spawnGearPresetFiles and build a preset from Bohemia's own example.

DayZ key art with a survivor in a knitted hat holding a rifle

You want fresh spawns on your DayZ server to start with more than the vanilla T-shirt, chemlight and piece of fruit, and a loadout generator hands you a JSON file without explaining a single line. DayZ has a built-in system for this: spawn gear presets, switched on through cfggameplay.json. This guide builds two preset files from the examples on Bohemia's wiki and explains every field and where it comes from.

We have not run these files on a live server. We checked the JSON syntax, compared every field with the 1.30 game scripts Bohemia publishes on GitHub (build 1.30.164200, 21 October 2026), and looked up every class name in Bohemia's vanilla types.xml for Chernarus and Nasdara.

Quick answer: To set DayZ spawn loadouts, add enableCfgGameplayFile = 1; to serverDZ.cfg, add "spawnGearPresetFiles": ["custom/fresh_spawn.json"] to the PlayerData block of cfggameplay.json in your mission folder, and write that preset file: a name, a spawnWeight, the clothes per attachment slot and the items for the inventory. Then restart the server. A preset replaces StartingEquipSetup() in init.c for every new character, so you do not need a DayZ loadout generator, only a file you understand.

How DayZ picks a spawn loadout

Bohemia's wiki page Spawning Gear Configuration calls it a way "to override vanilla character spawning without touching the mission init file". When a new character is created, the server:

  1. picks one preset file at random, weighted by its spawnWeight;
  2. picks a character model from that preset's characterTypes, or uses the normal model choice when the list is empty;
  3. picks one item option per attachment slot, again by weight, and puts it on the character;
  4. picks one cargo set by weight and puts its items into free space in the clothes and bag.

That order comes from MissionServer.OnClientNewEvent() and PlayerSpawnHandler in Bohemia's 1.30 scripts. Two consequences matter before you write anything:

  • The vanilla StartingEquipSetup() in init.c does not run for a character that gets a preset. The wiki says so, and the script returns before it is called. Every item from init.c you still want has to go into the preset.
  • The clothes a player picked in the main menu are not used either. A slot your preset leaves out stays empty, so give every preset at least Body, Legs and Feet.

Step 1: switch on cfggameplay.json

Add this line to serverDZ.cfg:

enableCfgGameplayFile = 1;

Bohemia's 1.30 change log says "cfgGameplay is now on, by default", but the script still reads enableCfgGameplayFile, and a config that sets it to 0 makes the server skip the file, presets included.

The file has to sit in your mission folder, for example mpmissions/dayzOffline.chernarusplus/cfggameplay.json. Bohemia's vanilla missions on GitHub include one (version 123 for Chernarus and 130 for Nasdara on 3 November 2026). Without one there, the script falls back to a copy inside the game's own data, not to anything you wrote. On our DayZ server hosting you have full FTP access, so you edit serverDZ.cfg and upload mission files yourself.

Step 2: list your presets in spawnGearPresetFiles

Neither vanilla file contains spawnGearPresetFiles. Add it inside the PlayerData block and leave the other keys as they are. This is an excerpt, not a whole file:

"PlayerData":
{
    "disablePersonalLight": false,
    "spawnGearPresetFiles": ["custom/fresh_spawn.json", "custom/medic.json"],
    "StaminaData":
    {

The paths are relative to the mission folder: the script loads each one as $mission: plus the path, and the wiki says files can sit in subfolders. With the line above, your files go here:

mpmissions/dayzOffline.chernarusplus/cfggameplay.json
mpmissions/dayzOffline.chernarusplus/custom/fresh_spawn.json
mpmissions/dayzOffline.chernarusplus/custom/medic.json

Each file holds one preset as a single JSON object. The wiki's "Presets" table speaks of an array, but its examples are one object per file, and the 1.30 PlayerSpawnHandler.LoadData() reads every file as one PlayerSpawnPreset.

Step 3: the preset file

Save this as custom/fresh_spawn.json. Most of it follows the "Vanilla setup" and "Use case" examples on Bohemia's wiki page.

{
    "name": "Fresh spawn",
    "spawnWeight": 3,
    "characterTypes": [],
    "attachmentSlotItemSets": [
        {
            "slotName": "Body",
            "discreteItemSets": [
                {
                    "itemType": "TShirt_Beige",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.45, "healthMax": 0.65, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                },
                {
                    "itemType": "TShirt_Grey",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.45, "healthMax": 0.65, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        },
        {
            "slotName": "Legs",
            "discreteItemSets": [
                {
                    "itemType": "CanvasPantsMidi_Beige",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.45, "healthMax": 0.65, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                },
                {
                    "itemType": "CanvasPantsMidi_Blue",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.45, "healthMax": 0.65, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        },
        {
            "slotName": "Feet",
            "discreteItemSets": [
                {
                    "itemType": "AthleticShoes_Black",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.45, "healthMax": 0.65, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        },
        {
            "slotName": "Back",
            "discreteItemSets": [
                {
                    "itemType": "TaloonBag_Blue",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.5, "healthMax": 0.8, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1,
                    "simpleChildrenUseDefaultAttributes": true,
                    "simpleChildrenTypes": ["Rag"]
                },
                {
                    "itemType": "",
                    "spawnWeight": 2,
                    "attributes": { "healthMin": 1.0, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        },
        {
            "slotName": "shoulderR",
            "discreteItemSets": [
                {
                    "itemType": "BaseballBat",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.5, "healthMax": 0.8, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": 4
                }
            ]
        }
    ],
    "discreteUnsortedItemSets": [
        {
            "name": "Starter cargo",
            "spawnWeight": 1,
            "attributes": { "healthMin": 1.0, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
            "complexChildrenTypes": [
                {
                    "itemType": "Chemlight_White",
                    "attributes": { "healthMin": 0.45, "healthMax": 0.65, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": 1
                },
                {
                    "itemType": "BandageDressing",
                    "attributes": { "healthMin": 1.0, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": 2
                }
            ],
            "simpleChildrenUseDefaultAttributes": false,
            "simpleChildrenTypes": ["Apple"]
        }
    ]
}

Every new character that gets this preset wears a T-shirt, canvas trousers and black running shoes, carries a baseball bat, a white chemlight, a bandage and an apple, and in one of three spawns also wears a blue Taloon backpack with a rag inside.

The preset file, line by line

FieldWhat it doesWhere it comes from
"name": "Fresh spawn"A label, any stringWiki, Presets table
"spawnWeight": 3This preset's share of new characters against the other files; below 1 the script skips the presetWiki; IsValid() in cfgplayerspawndatajson.c
"characterTypes": []Character models to pick from; empty or left out keeps the model the player would get without presetsWiki note; OnClientNewEvent()
"slotName": "Body"The attachment slot on the characterWiki, AttachmentSlots table (names from CfgSlots)
"slotName": "shoulderR"Shortcut the script turns into the Melee slot; shoulderL becomes Shoulder, for long gunsWiki note; TranslateAndValidateSlot()
"discreteItemSets"The options for one slot; one is drawn by spawnWeightWiki, DiscreteItemSets table
"itemType": "TShirt_Beige"The item's class nameVanilla types.xml
"itemType": ""An empty option: nothing spawns in that slotWiki Use case (empty Eyewear option)
"attributes"Health and quantity from 0 to 1, drawn at random between min and max; for magazines, quantity is the share of the maximum roundsWiki, Attributes table; ApplyAttributes()
"quickBarSlot": 2Puts the item on that quickbar position; -1 leaves it offWiki; vanilla init.c uses 1 for the chemlight, 2 for the bandage, 3 for the fruit
"simpleChildrenTypes"Items spawned inside the parent, here a rag in the bagWiki
"simpleChildrenUseDefaultAttributes"true: children spawn with the game's own health and quantity; false: they take the parent's attributes blockSpawnSimpleChildrenItems()
"discreteUnsortedItemSets"Cargo sets; one is drawn by weight and its items go into free space on the characterWiki; CreateChildItem()
"complexChildrenTypes"Items with their own attributes, quickbar slot and contentsWiki, ComplexChildrenTypes table

The clothes use health 0.45 to 0.65 because that is the range Bohemia's "Vanilla setup" example and the vanilla init.c use for starting clothes. Three details trip people up:

Give the empty option an attributes block. Bohemia's Use case example leaves attributes out of its empty Eyewear option. In the 1.30 script, a slot option without attributes fails IsValid() and is left out of the draw. By that reading, the wiki's aviator glasses would spawn every time instead of half the time, so our empty option has one. With the bag at weight 1 and the empty option at weight 2, one in three characters gets the bag.

Simple children cannot get a quickbar slot. Only slot items and complexChildrenTypes have a quickBarSlot. That is why the chemlight and the bandage are complex children and the apple is a simple child.

Cargo needs room. Cargo items go into whatever free space the clothes and bag have, and an item that fits nowhere is skipped. Two in three of our characters have no bag, so the cargo set holds only small items like the vanilla ones. The bat hangs in the Melee slot and needs no cargo space.

A second preset, and how spawnWeight splits players

Save this as custom/medic.json. It is a shortened version of the wiki's "medic" example:

{
    "name": "Medic",
    "spawnWeight": 1,
    "attachmentSlotItemSets": [
        {
            "slotName": "Body",
            "discreteItemSets": [
                {
                    "itemType": "MedicalScrubsShirt_Blue",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.7, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        },
        {
            "slotName": "Legs",
            "discreteItemSets": [
                {
                    "itemType": "MedicalScrubsPants_Blue",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.7, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        },
        {
            "slotName": "Feet",
            "discreteItemSets": [
                {
                    "itemType": "WorkingBoots_Yellow",
                    "spawnWeight": 1,
                    "attributes": { "healthMin": 0.7, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": -1
                }
            ]
        }
    ],
    "discreteUnsortedItemSets": [
        {
            "name": "Medic cargo",
            "spawnWeight": 1,
            "attributes": { "healthMin": 1.0, "healthMax": 1.0, "quantityMin": 1.0, "quantityMax": 1.0 },
            "complexChildrenTypes": [
                {
                    "itemType": "FirstAidKit",
                    "attributes": { "healthMin": 0.7, "healthMax": 0.8, "quantityMin": 1.0, "quantityMax": 1.0 },
                    "quickBarSlot": 3,
                    "simpleChildrenUseDefaultAttributes": true,
                    "simpleChildrenTypes": ["BandageDressing", "TetracyclineAntibiotics"]
                }
            ]
        }
    ]
}

This one leaves characterTypes out entirely, which the script treats like an empty list. The first aid kit is a complex child with two simple children, so the bandage and the tetracycline spawn inside the kit. The wiki's version adds a bag and a vest; without them the kit must fit in the scrubs, so check your first test character and add a Back slot as in fresh_spawn.json if the kit is missing.

The script adds each valid preset to a list as many times as its spawnWeight and draws one entry, so with fresh_spawn.json at 3 and medic.json at 1, three in four new characters get the fresh spawn kit and one in four the medic kit. Slot options and cargo sets are drawn the same way.

Check the files before you restart

  1. Validate the syntax. On any machine with Python, python3 -m json.tool custom/fresh_spawn.json prints the file or the first error. A trailing comma after the last field, for example, gives Expecting property name enclosed in double quotes: line 4 column 1. Check every file: in the 1.30 PlayerSpawnHandler.LoadData(), one file that fails to load stops the loading, no preset is used, and every new character spawns the vanilla way through init.c.
  2. Check the class names. Look each itemType up in your mission's db/types.xml. A preset does not need a types.xml entry, but that file is the easiest full list of vanilla class names. A misspelled name leaves the slot or item empty. Our types.xml guide explains the file itself.
  3. Check the slot names. Use the names from Bohemia's examples (Body, Legs, Feet, Back, Vest, Eyewear, shoulderL, shoulderR) or another CfgSlots name such as Headgear. The script skips a slot the character does not have.
  4. Restart, then test with a new character. Presets load once when the mission starts (MissionServer.OnInit()), and they apply only when a new character is created. A player whose character is alive keeps that character's gear.

Custom characters after respawn: Bohemia's tracker report

Bohemia's feedback tracker has a report about this, T176846, "New player loadout system seems to break choosing a custom character model" (7 November 2023). The reporter wrote that with spawnGearPresetFiles, "When they Respawn Custom, it still gives them a random character", while loadouts set through init.c kept the chosen character. Bohemia replied: "This server-side configured spawning method completely overrides the spawning of the character." The same sentence is now on the wiki page. In the last copy we could read (Internet Archive, 15 August 2024) the ticket stood at Reviewed with resolution Open; the live tracker did not load for us on 3 November 2026.

The 1.30 script explains it. If a preset lists characterTypes, the new character is always one of those, whatever the player chose; Bohemia's first answer on the ticket assumed the reporter's preset allowed only two characters. If the list is empty or missing, the script uses the type it would pick without presets: the main menu character when the server runs in custom respawn mode and the player did not ask for a random one, a random character otherwise. Custom respawn mode means disableRespawnDialog is false in the GeneralData block of cfggameplay.json; set to true, every respawn is random.

So if players should keep their own survivor, leave characterTypes empty and keep disableRespawnDialog at false; their clothes still come from the preset. That is what the 1.30 code says, not something we tested on a live server.

Map notes for Nasdara and Sakhal

Bohemia's init.c for the newer maps does more in StartingEquipSetup() than hand out items: on Nasdara it sets water to 1000 and energy to 800, and on Sakhal it sets water to 750 and energy to 1000 and gives a temporary resistance to influenza. A preset skips StartingEquipSetup() and has no field for stats, so preset characters miss those changes. Desert clothes such as KameezShirt_Beige, MensShalwarPants_Beige and SandalsShoes_Brown are in the vanilla types.xml of both Nasdara and Chernarus, so you can put them in a Nasdara preset. Our Nasdara guide covers the rest of that mission.

Do you need a DayZ loadout generator?

No. A generator writes the same fields this guide explains, so check its output the same way: one object per file, every spawnWeight at 1 or more, an attributes block on every slot option including empty ones, and class names that exist in types.xml. After that, changing a kit is one edit and a restart.

FAQ

Why do new players still spawn with the vanilla T-shirt and fruit? Usually one of these: enableCfgGameplayFile is 0 in serverDZ.cfg, cfggameplay.json is not in the mission folder, one preset file has a JSON error (which switches all presets off), or a mod or your init.c overrides how characters are created. The wiki also warns that a custom CreateCharacter() with its own character selection ignores characterTypes.

Can I give fresh spawns a gun? Yes. The wiki's first Use case example puts an AKM in shoulderL with Mag_AKM_30Rnd as a complex child; when the parent is a weapon, the script loads a magazine child into it, and quantityMin and quantityMax set the share of rounds. Every fresh spawn with that preset gets the weapon, so weigh it against your server's balance.

Do spawn loadouts work with modded items? Yes, as long as the mod is loaded on the server. Use the mod's own class names, usually from the types.xml it ships. If the mod has its own loadout system, read its documentation first, because it may replace the code path that reads spawnGearPresetFiles.

Do I need to wipe the server to change spawn loadouts? No. Presets apply when a new character is created, so a restart is enough. Players with a living character get the new kit the next time they spawn as a new character.

Sources

All opened on 3 November 2026. Bohemia's wiki and feedback tracker showed a browser check that our tools could not pass, so we read the latest Internet Archive copies and checked them against Bohemia's 1.30 scripts: