Get started

Free trial Try any game free for 3 days. No card needed. Start a free trial Start a free trial

Game servers

All games

Guides / Project Zomboid / Server and sandbox settings

Change when water and power shut off in Project Zomboid

Pick when the water and electricity shut off on a Project Zomboid server, from instant to never, and tune generators in the Config Editor. Restart to apply.

Updated , checked on Project Zomboid Build 42.21

Two sandbox rows decide this: Water shut (WaterShut) and Elec shut (ElecShut). Each is a list that runs from Instant to Disabled, and Disabled means it never shuts off. Open the Config Editor, choose the sandbox file, pick a choice and restart the server.

The choices

The game measures both from its default start date, July 9, 1993. A list gives a random day inside the range you pick, so an exact day is not offered.

Water shut. Sinks stop being an endless source of water.

  • Instant
  • 0 - 30 Days (the default)
  • 0 - 2 Months
  • 0 - 6 Months
  • 0 - 1 Year
  • 0 - 5 Years
  • 2 - 6 Months
  • 6 - 12 Months
  • Disabled

Elec shut. The world’s electricity turns off for good. Lights and fridges stop working.

  • Instant
  • 14 - 30 Days (the default)
  • 14 Days - 2 Months
  • 14 Days - 6 Months
  • 14 Days - 1 Year
  • 14 Days - 5 Years
  • 2 - 6 Months
  • 6 - 12 Months
  • Disabled

A range that starts above zero, such as 2 - 6 Months, gives players at least that long to prepare.

Change it

  1. Open the Config Editor and choose the sandbox file.
  2. Find Water shut or Elec shut.
  3. Pick a choice. For no shut-off ever, pick Disabled. For a shut-off from the first moment, pick Instant.
  4. Save, then restart the server.
Water shut and Elec shut rows with their modifiers in the sandbox file
  1. Water shut
  2. Elec shut
  3. Water shut modifier
  4. Elec shut modifier

Box 1 and box 2 are the two lists. Boxes 3 and 4 are the modifiers described below.

Water shut list open showing its choices
  1. Pick when water shuts off

The file also has Water shut modifier (WaterShutModifier) and Elec shut modifier (ElecShutModifier). Each takes a number from -1 up, and the default is 14. The game gives them the same description as the list rows. The game describes the modifier rows like the lists and gives no more. Not checked on Build 42.21 as of 18 October 2026: what the modifiers do.

Alarm batteries

Alarm decay (AlarmDecay) sets how long alarm batteries last after the power shuts off. It uses the choices Instant to 0 - 5 Years, and its default is 0 - 30 Days.

Generators

Generators matter once the power is gone.

  • Generator fuel consumption (GeneratorFuelConsumption). Fuel used per in-game hour, from 0.00 to 100.00. The default is 0.10.
  • Generator spawning (GeneratorSpawning). How often generators spawn on the map. The choices are None (not recommended), Insanely Rare, Extremely Rare, Rare (the default), Normal, Common and Abundant.
  • Allow exterior generator (AllowExteriorGenerator). When on, a generator works on outdoor tiles, so it can power gas pumps.
  • Generator vertical power range (GeneratorVerticalPowerRange). How many floors above and below a generator get power. From 1 to 15, default 3.

When it takes effect

A restart applies the change. Not checked on Build 42.21 as of 18 October 2026: how a change affects a world that has already passed its shut-off day. Set these before players start a new world.

By hand

In servertest_SandboxVars.lua (the file name starts with your server name) both rows are numbers:

WaterShut = 2,
ElecShut = 2,

Water shut: 1 = Instant, 2 = 0 - 30 Days (default), 3 = 0 - 2 Months, 4 = 0 - 6 Months, 5 = 0 - 1 Year, 6 = 0 - 5 Years, 7 = 2 - 6 Months, 8 = 6 - 12 Months, 9 = Disabled.

Elec shut: 1 = Instant, 2 = 14 - 30 Days (default), 3 = 14 Days - 2 Months, 4 = 14 Days - 6 Months, 5 = 14 Days - 1 Year, 6 = 14 Days - 5 Years, 7 = 2 - 6 Months, 8 = 6 - 12 Months, 9 = Disabled.

If it does not work

  • Nothing changed. Restart the server. The sandbox file is read at the start.
  • The power is still on after the day you expected. The shut-off date is a random day inside the range. Pick Instant to test.
  • The server will not start after an edit. Open Crashes. The panel puts back the last sandbox copy that worked and keeps the broken one as .broken.

More about the game: Project Zomboid servers.

Sources: pzwiki.net: Custom Sandbox

Project Zomboid serversAll Project Zomboid guides