7 Days to Die guide

7 Days to Die server settings and the sandbox code

What SandboxCode in serverconfig.xml holds since V3, the difficulty preset codes, how to read and write a code, and how to check what a server runs.

Updated · By the HostForge team

Since V3, a 7 Days to Die server takes its difficulty, day length, blood moons, loot, zombie speeds and most other gameplay rules from a single line in serverconfig.xml: SandboxCode. The older lines such as GameDifficulty and BloodMoonFrequency are gone from the file. This guide explains the code and how to change it.

Get a code from the game

The easiest way: in the game, start a new game, open the sandbox options, set them as you like and use the button that copies the code. Paste it as the value of SandboxCode and restart the server. The server reads the code at every start, so a new code applies to an existing world too.

<property name="SandboxCode" value="AAAJABJARFBNC"/>

The difficulty presets

The game's six difficulty presets are codes too. They set how much damage players deal (ranged and melee) and take:

PresetCodePlayers dealPlayers take
ScavengerAAAKABKARDBNB200%50%
Adventurer (the default)AAAJABJARFBNC150%75%
NomadA100%100%
WarriorAAAGABGARJ85%150%
True SurvivalistAAAEABEARKBNE65%200%
InsaneAAADABDARLBNF50%250%

Most presets also change how far zombies smell players. Nomad is every option at its default: A alone, or an empty value, as the game's own preset list has it.

How to read a code

A code starts with A, its format version. Then every option that differs from its default takes three letters: two for the option's number and one for the position of its value in the option's list, both counted from A as 0. Options left out stay at their defaults.

  • AA is option 0 (ranged damage), AR is 17 (damage players take), BN is 26 + 13 = 39 (how far zombies smell).
  • In AAJ, the value J is position 9 in the damage list (0%, 25%, 35%, 50%, 65%, 75%, 85%, 100%, 125%, 150%, …): 150%.

Some options worth knowing, with their numbers and values (the default in bold):

OptionLettersValues
XP gainAS0, 25, 50, 75, 100, 125, 150, 175, 200, 300, 500%
Drop on deathBB nothing, everything, toolbelt, backpack, equipment, carried only, delete all
Zombies by day, at night, in a blood moonBI, BJ, BL walk, jog, run, sprint, nightmare (walk by day, sprint otherwise)
Blood moon everyBWnever, 1 to 10, 14, 20, 30 days (7)
Blood moon hordeBZ4, 6, 8, 10, 12, 16, 24, 32, 64 zombies per player
Real minutes per dayCO10, 20, 30, 40, 50, 60, 90, 120
Hours of daylightCPalways night, 4 to 20 in steps of 2 (18), always day
Loot abundanceDA 0, 25, 35, 50, 65, 75, 85, 100, 125, 150, 200, 300, 400, 500%

So Insane with 120-minute days, 12 hours of daylight, no blood moons, double XP, half the loot, running zombies by day and nothing dropped on death is AAADABDARLASIBBABICBNFBWACOHCPFDAD.

Check what a server runs

On the server's console, getsandboxoptions prints the code the running game uses and every option that differs from its default, with its value and the default. It is the quickest way to check a code you pasted.

The settings outside the code

serverconfig.xml still holds the server's own settings as separate lines, each with a comment: the name, password and slots, the map (GameWorld), who can hurt whom (PlayerKillingMode: 0 no one, 1 allies only, 2 strangers only, 3 everyone), land claims, bedrolls, crossplay and the limits on zombies and animals.

On HostForge

Pick the settings, HostForge writes the code

On HostForge, the Settings tab offers the difficulty presets, day length and daylight, blood moon frequency and horde size, zombie speeds, XP, loot, drop on death, player damage and crossplay, and writes SandboxCode for you. A code you paste into serverconfig.xml under Configuration files stays until you next change those settings.

7 Days to Die server hosting · Set up a dedicated server

More 7 Days to Die guides