Project Zomboid SandboxVars.lua: Key Settings Reference

A ruined Knox County street at dusk with zombies in the distance

 

    Project Zomboid keeps its gameplay difficulty in a single Lua file, <Servername>_SandboxVars.lua. It controls how many zombies spawn, how fast they move, how rare loot is, how quickly you level up and how long a day lasts. On your gamever server this file lives on the File Manager and you edit it with the server stopped. This guide is a reference to the keys that matter most — the exact names as they appear in the current Build 42 file (VERSION = 6) — so you can find and change them with confidence. For the step-by-step editing walkthrough, see sandbox settings; this page focuses on which keys to touch.

 

Where it lives

 

    Open the File Manager and go to /home/configs/Server/. The sandbox file sits beside the main config:

 

The Project Zomboid Server config folder in the File Manager

 

    Always stop the server (Overview → Stop) before editing — the server rewrites this file on shutdown, so edits made while it is running are lost. Keep the Lua syntax valid: a missing comma, = or brace will stop the sandbox loading. Back up the file first.

 

SandboxVars.lua vs the main .ini

 

    These are two different files and it is easy to confuse them:

 

  • <Servername>.ini holds connection, admin and rules settings — passwords, player slots, PVP, mods, ports. Most of these are exposed on Settings → Server Settings in the panel. See server settings explained.
  • <Servername>_SandboxVars.lua holds the gameplay difficulty values below. The panel does not expose every one as its own field, so you edit the file.

 

Zombie population and spawns

 

    The headline knob is Zombies, a preset that also sets the advanced multiplier for you:

 

KeyWhat it doesValues / default
ZombiesOverall zombie population preset. Changing it also sets PopulationMultiplier.1=Insane, 2=Very High, 3=High, 4=Normal (default), 5=Low, 6=None
DistributionHow zombies are spread across the map.1=Urban Focused (default), 2=Uniform
ZombieRespawnRespawn preset for cleared areas.1=High, 2=Normal, 3=Low, 4=None (default)

 

    For fine control, the advanced values sit in the nested ZombieConfig = { ... } block:

 

Key (under ZombieConfig)What it doesDefault
PopulationMultiplierTotal population multiplier. Set by Zombies, or type a custom number (e.g. Normal 0.65, High 1.2, Insane 2.5).0.65
PopulationStartMultiplierDesired population at game start.1.0
PopulationPeakMultiplierDesired population on the peak day.1.5
PopulationPeakDayDay the population reaches its peak (1–365).28
RespawnHoursHours before zombies may respawn in a cell. 0 disables respawn.0.0
RespawnUnseenHoursHours a chunk must be unseen before it can respawn zombies.0.0
RespawnMultiplierFraction (0–1) of a cell's population that respawns each cycle.0.0

 

Zombie behaviour (ZombieLore)

 

    Speed, strength and senses live in the nested ZombieLore = { ... } block:

 

Key (under ZombieLore)What it doesValues / default
SpeedMovement speed.1=Sprinters, 2=Fast Shamblers, 3=Shamblers, 4=Random (default)
StrengthDamage per attack.1=Superhuman, 2=Normal (default), 3=Weak, 4=Random
ToughnessHow hard they are to kill.1=Tough, 2=Normal, 3=Fragile, 4=Random (default)
CognitionNavigation intelligence.1=Navigate+doors, 2=Navigate, 3=Basic (default), 4=Random
MemoryHow long they chase after losing you.1=Long, 2=Normal (default), 3=Short, 4=None
TransmissionHow the infection spreads.1=Blood+Saliva (default), 2=Saliva Only, 3=Everyone's Infected, 4=None

 

Loot, respawn and XP

 

    In Build 42 each loot category is a multiplier (0.00–4.00), not a rarity word. A few of the common keys:

 

KeyWhat it doesDefault
FoodLootNewPerishable food abundance.0.8
CannedFoodLootNewCanned and dried food, drinks.0.6
WeaponLootNewMelee weapons.0.6
RangedWeaponLootNewFirearms (incl. attachments).1.2
AmmoLootNewLoose ammo, boxes, magazines.0.6
MedicalLootNewMedicine, bandages, first aid.0.6
HoursForLootRespawnIn-game hours before looted town/trailer-park containers respawn loot. 0 = never.0
SeenHoursPreventLootRespawnIf >0, loot won't respawn in zones seen within this many hours.0
MaxItemsForLootRespawnContainers with this many items or more won't respawn.5

 

    Experience gain moved into a nested MultiplierConfig = { ... } block in Build 42 (there is no top-level XpMultiplier any more):

 

Key (under MultiplierConfig)What it doesDefault
GlobalThe rate at which all skills level up (0.00–1000.00).1.0
GlobalToggleWhen true, every skill uses Global. Set false to use the per-skill values (Fitness, Strength, Axe, etc.) below it.true

 

World and time

 

KeyWhat it doesValues / default
DayLengthReal-time length of an in-game day.1=15 min … 4=1h30 (default) … 27=Real-time
StartMonth / StartDay / StartTimeWhen the world begins.7 (July) / 9 / 2 (9 AM)
WaterShutModifierDays after the start date before the water supply cuts out. -1 disables.14
ElecShutModifierDays after the start date before electricity cuts out for good. -1 disables.14
NightDarknessHow dark nights are.1=Pitch Black, 2=Dark, 3=Normal (default), 4=Bright
Temperature / RainGlobal climate.3=Normal (default) each

 

Additional Tips

 

  • Stop the server before editing — it rewrites SandboxVars.lua on shutdown and will overwrite live edits.
  • Keep the Lua valid — one stray comma or missing brace and the sandbox won't load. Back the file up first.
  • Nested keys need context — PopulationMultiplier, RespawnHours and the senses sit inside ZombieConfig / ZombieLore blocks; don't add them at the top level.
  • The preset writes the advanced value — changing Zombies overwrites ZombieConfig.PopulationMultiplier, so set the preset first, then fine-tune.
  • Population changes apply to fresh ground — raising the count takes full effect in areas players haven't explored yet.
  • Tune in single-player first if you're unsure — it produces the same keys, which you can copy across.

 

Conclusion

 

    <Servername>_SandboxVars.lua is where Project Zomboid's real difficulty lives — zombie numbers and spawns, behaviour, loot, XP and the length of your days. On gamever you edit it in the File Manager with the server stopped, and the keys above are the ones worth knowing. For the editing walkthrough see sandbox settings, for the main .ini see server settings explained, and for population tuning to cut lag see fix server lag.

 

    Rent your Project Zomboid server at gamever.io — a browser file editor and full FTP so you can tune every sandbox value, Build 42 ready. Free trial, promo code WELCOME.

Survive the apocalypse together. Your own Project Zomboid server. Free with code WELCOME
Create serverStart hosting your server now
Knowledge Base