Skip to content

Change starter gear on a DayZ PC server

By

Updated

For vanilla DayZ PC, register a gear preset in PlayerData.spawnGearPresetFiles inside the mission’s cfggameplay.json. This gives newly created characters a defined loadout without editing StartingEquipSetup() in init.c.

A starting preset replaces the character’s spawn equipment. Adding a bandage to an otherwise empty preset does not mean the rest of the vanilla starter gear will be retained.

Stop a test copy of your server and save its active configuration, cfggameplay.json, init.c and existing presets. Find the mission from the configuration selected by -config; use the matching directory under mpmissions.

Download the small starter-kit example. It contains a grey T-shirt, blue canvas pants, grey athletic shoes, a dressing and a pear. Use it to test the procedure before designing your server’s loadout. These clothes are unsuitable as a winter outfit on Sakhal.

Place it in the active mission as:

custom/starter-gear.json

Rename the downloaded file to starter-gear.json. Create the custom directory if needed. Keep it inside the mission, not in the server’s Workshop directory.

The example’s empty characterTypes leaves the model choice to the character creation selection under Bohemia’s documented behavior. It uses one choice per clothing slot and one cargo set so you can check the expected result before adding random variants. Its classnames and structure come from the official spawning-gear examples.

The kit sets healthMin and healthMax to 1.0 for full condition. Its quantity values of 1.0 request the full available amount of each item, not one use. Bohemia’s gear-loader script converts the quantity fraction to an item amount or magazine ammunition count. Check those results in game when you add consumables or weapons.

In the active server configuration, enable gameplay-file loading:

enableCfgGameplayFile = 1;

In the existing PlayerData object of cfggameplay.json, add or edit this property:

"spawnGearPresetFiles": ["custom/starter-gear.json"]

Keep the surrounding properties and commas valid. This line is a field edit, not a complete gameplay file. If the array already names other presets, record those paths before replacing them for the test. Multiple registered presets can introduce weighted random selection, making a one-preset test easier to assess.

Bohemia’s gameplay reference defines the enable flag. The spawning-gear reference defines mission-relative preset paths and explains that this method overrides StartingEquipSetup(). A custom CreateCharacter() or spawn-selection mod can affect the result; review those integrations before layering another loadout system onto them.

Enabling the gameplay file also activates its other settings. Review damage, personal-light and lighting values before the first restart. Keep the complete gameplay file for your map and server build; the older full-file examples in the gear reference are useful for structure, but should not replace your current file.

Do not put the preset into types.xml or register its JSON as a Central Economy <ce> file. Natural world loot and fresh-player gear use different mechanisms.

Add a rifle, magazine and attachments to a preset

Section titled “Add a rifle, magazine and attachments to a preset”

Download the starter kit with an AKM example for a complete preset. It keeps the small kit’s clothing, dressing and pear, then adds a rifle on the left shoulder. Save it as custom/starter-gear.json on the test copy, replacing the small example for this test.

To make the same addition manually, append this object to the existing attachmentSlotItemSets array, retaining its clothing entries and the comma between objects:

{
"slotName": "shoulderL",
"discreteItemSets": [
{
"itemType": "AKM",
"spawnWeight": 1,
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 1.0,
"quantityMax": 1.0
},
"quickBarSlot": 2,
"complexChildrenTypes": [
{
"itemType": "Mag_AKM_30Rnd",
"attributes": {
"healthMin": 1.0,
"healthMax": 1.0,
"quantityMin": 0.5,
"quantityMax": 0.5
},
"quickBarSlot": -1
}
],
"simpleChildrenUseDefaultAttributes": false,
"simpleChildrenTypes": [
"AK_PlasticBttstck",
"AK_PlasticHndgrd",
"PSO11Optic"
]
}
]
}

The magazine uses complexChildrenTypes so it can have its own quantity settings. In the linked gear-loader code, a compatible magazine child is created through the weapon’s ammunition loader. Here 0.5 requests half the magazine’s ammunition capacity. The stock 30-round magazine therefore requests 15 rounds in the magazine; check the chamber separately. A loose spare magazine would belong in the character’s cargo set instead.

The stock, handguard and optic use simpleChildrenTypes. With simpleChildrenUseDefaultAttributes set to false, they use the rifle entry’s attributes. These classes appear in Bohemia’s pinned AKM spawnable-types definition; the JSON structure follows its gear reference.

Parse the complete preset, then create a fresh test character. Check the shoulder slot, optic, magazine count and quickbar entry. Test chambering, firing and reloading before reconnecting and restarting with the saved weapon. If a part is missing, inspect the gear-loader message and that part’s classname and attachment slot before adding more items.

Add an item while keeping the mission’s starting kit

Section titled “Add an item while keeping the mission’s starting kit”

Use this alternative when you want the existing init.c kit plus an extra item. Stop the test server and save init.c and cfggameplay.json. If native gear presets are enabled, save their array and set PlayerData.spawnGearPresetFiles to [] for this test. Keep the gameplay enable flag and unrelated settings intact. A loaded preset overrides StartingEquipSetup(), so editing that method while the preset remains active won’t test this approach.

Find the existing StartingEquipSetup(PlayerBase player, bool clothesChosen) override in the active mission’s init.c. Keep its clothing, fruit and other equipment code. Add the following inside that method, immediately before its closing brace, after its existing statements:

EntityAI extraPear = player.GetInventory().CreateInInventory("Pear");
if (!extraPear)
{
Print("Starter gear: could not create extra Pear. Check classname and inventory space.");
}

Bohemia’s pinned Chernarus init.c uses the same inventory call for its fruit. Find the method by name; line numbers vary. Add the fragment once, without replacing the method or creating a second override. Preserve main(), CreateCharacter() and CreateCustomMission(). If a custom mission or mod owns equipment creation, check that integration before inserting the fragment.

Upload while stopped, start the test server and check its script log for compilation errors. Create a fresh character and compare its original kit with the baseline, including the extra pear. A failed creation can mean an invalid class or no inventory space. Check a returning survivor too. Roll back by restoring the saved script and preset array; keep the world and existing characters intact.

From your downloaded mission folder, run:

Terminal window
Get-Content -LiteralPath './cfggameplay.json' -Raw | ConvertFrom-Json | Out-Null
Get-Content -LiteralPath './custom/starter-gear.json' -Raw | ConvertFrom-Json | Out-Null

Check the registered path against the uploaded filename, including spelling and case. JSON parsing catches syntax errors; it does not check clothing slots, available classes, inventory space or interactions with mods.

Upload the reviewed files while stopped. Start the test server and check logs for preset or gameplay-file loading errors.

Use a disposable test character on the test copy. Joining with an existing survivor tests saved inventory, which is a separate path.

  1. Create a fresh character and inspect worn clothing and cargo.
  2. Check the dressing and fruit quantities, condition and quickbar assignments.
  3. Reconnect and confirm those items persist.
  4. Create another fresh character after a restart and repeat the check.
  5. Verify a returning survivor keeps its previous equipment.

A failed spawn needs the exact log message and active file paths. If the loadout is unchanged, check enableCfgGameplayFile, the selected mission, every path in the registered array and any custom spawn script. An unreadable preset can prevent the gear loader from initializing, so check all registered files. If only some items are absent, check their classnames, slots and cargo capacity. For a Workshop classname, the required PC mod must be loaded.

Once the small preset works, change one clothing choice or cargo set at a time. Test a weapon’s magazine, ammunition and attachments together before offering a combat loadout. Weights express relative selection chances; they are not percentage labels.

Restore the previous preset array and files while stopped, restart and test another fresh character. Keep unrelated gameplay changes. You do not need to wipe the world to change future spawn equipment, and the rollback does not remove gear already given to saved characters.

Use the player-spawn guide to change where a new character appears. Use the loot guide to change items found in buildings.

Configure Expansion equipment through its spawn-selection procedure. Review its gear objects and loadout chooser as a separate schema from these native presets.

The rifle preset and additive script instructions used AI-assisted research and drafting on 8 October 2026. The linked publisher files and gear-loader code were inspected, and both downloadable presets parse as JSON. The script fragment has not been compiled by DayZ here. Character spawning, firing, inventory fit and saved-state recovery remain untested.

DayZ hosting for your community.

Review DayZ plans with VxShield DDoS protection and no added player-slot fee.