# Project Zomboid Sandbox Settings Guide (/docs/project-zomboid/sandbox-settings)



The `SandboxVars.lua` file controls almost every gameplay aspect of your Project Zomboid server. This guide covers the most important settings organized by category.

How to Edit [#how-to-edit]

<div className="fd-steps">
  <div className="fd-step">
    Open the file [#1-open-the-file]

    On XGamingServer, go to **Files** and navigate to:

    ```
    Zomboid/Server/[servername]_SandboxVars.lua
    ```
  </div>

  <div className="fd-step">
    Edit the values [#2-edit-the-values]

    Change the settings you want to modify. Values are in Lua format.
  </div>

  <div className="fd-step">
    Save and restart [#3-save-and-restart]

    Save the file and restart from the **Dashboard**.

    > 📝 **Note:** For zombie and loot settings specifically, see [Zombie Settings](/docs/project-zomboid/zombie-settings) and [Loot Respawn](/docs/project-zomboid/loot-respawn).
  </div>
</div>

Time & Day Settings [#time--day-settings]

| Setting       | Default | Description                                                                  |
| ------------- | ------- | ---------------------------------------------------------------------------- |
| `DayLength`   | 1       | Day length (1=15 min, 2=30 min, 3=1 hr, 4=2 hr ... up to real-time)          |
| `StartMonth`  | 7       | Starting month (1=Jan, 7=Jul, etc.)                                          |
| `StartDay`    | 1       | Starting day of the month                                                    |
| `StartTime`   | 2       | Start time (1=7am, 2=9am, 3=12pm, 4=2pm, 5=5pm, 6=9pm, 7=12am, 8=2am, 9=5am) |
| `NightLength` | 1       | Night length modifier (1=Short, 2=Normal, 3=Long, 4=Always Night)            |

Weather & Season [#weather--season]

| Setting        | Default | Description                                                                   |
| -------------- | ------- | ----------------------------------------------------------------------------- |
| `Temperature`  | 3       | Temperature severity (1=Very Cold, 2=Cold, 3=Normal, 4=Warm, 5=Very Warm)     |
| `Rain`         | 3       | Rain frequency (1=Very Dry, 2=Dry, 3=Normal, 4=Rainy, 5=Very Rainy)           |
| `ErosionSpeed` | 3       | How fast nature reclaims (1=Very Fast, 2=Fast, 3=Normal, 4=Slow, 5=Very Slow) |
| `ErosionDays`  | 0       | Days before erosion starts (0 = immediate)                                    |

Water & Electricity [#water--electricity]

| Setting                    | Default | Description                                                                                                 |
| -------------------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
| `WaterShut`                | 2       | When water shuts off (0=Instant, 1=0-30 days, 2=0-2 months, 3=0-6 months, 4=0-1 year, 5=0-5 years, 6=Never) |
| `ElecShut`                 | 2       | When electricity shuts off (same scale as water)                                                            |
| `WaterShutModifier`        | -1      | Exact day for water shutoff (-1 = use random within WaterShut range)                                        |
| `ElecShutModifier`         | -1      | Exact day for electricity shutoff                                                                           |
| `GeneratorSpawning`        | 3       | Generator spawn frequency (1=Extremely Rare ... 5=Abundant)                                                 |
| `GeneratorFuelConsumption` | 1.0     | Fuel consumption multiplier                                                                                 |

Never Shut Off Utilities [#never-shut-off-utilities]

```lua
WaterShut = 6,
ElecShut = 6,
```

XP & Skills [#xp--skills]

| Setting                      | Default | Description                                        |
| ---------------------------- | ------- | -------------------------------------------------- |
| `XPMultiplier`               | 1.0     | Global XP multiplier                               |
| `XPMultiplierAffectsPassive` | true    | Whether multiplier applies to passive XP gain      |
| `StatsDecrease`              | 3       | How fast needs decay (1=Very Fast ... 5=Very Slow) |

Boosted XP for Faster Progression [#boosted-xp-for-faster-progression]

```lua
XPMultiplier = 3.0,
XPMultiplierAffectsPassive = true,
```

Farming & Nature [#farming--nature]

| Setting            | Default | Description                                          |
| ------------------ | ------- | ---------------------------------------------------- |
| `Farming`          | 3       | Farm speed (1=Very Fast ... 5=Very Slow)             |
| `NatureAbundance`  | 3       | Foraging abundance (1=Very Poor ... 5=Very Abundant) |
| `FishingAbundance` | 3       | Fishing success rate                                 |
| `PlantResilience`  | 3       | How resilient plants are                             |
| `PlantAbundance`   | 3       | How many crops plants yield                          |

Vehicles [#vehicles]

| Setting               | Default | Description                                           |
| --------------------- | ------- | ----------------------------------------------------- |
| `EnableVehicles`      | true    | Enable/disable vehicles                               |
| `CarSpawnRate`        | 3       | Vehicle spawn frequency (1=Very Rare ... 5=Abundant)  |
| `ChanceHasGas`        | 3       | Chance vehicles have fuel                             |
| `InitialGas`          | 3       | Starting fuel level in vehicles                       |
| `CarGeneralCondition` | 3       | Average vehicle condition (1=Terrible ... 5=Pristine) |
| `CarDamageOnImpact`   | 3       | Damage vehicles take on impact                        |
| `CarGasConsumption`   | 1.0     | Fuel consumption rate                                 |

Construction & Crafting [#construction--crafting]

| Setting                   | Default | Description                 |
| ------------------------- | ------- | --------------------------- |
| `ConstructionBonusPoints` | 0       | Bonus construction XP       |
| `CookingBonusPoints`      | 0       | Bonus cooking XP            |
| `FarmingBonusPoints`      | 0       | Bonus farming XP            |
| `MaxPlanksPerTree`        | 3       | Planks obtained per tree    |
| `AllClothesUnlocked`      | false   | Unlock all clothing recipes |

Recommended Presets [#recommended-presets]

Casual PvE [#casual-pve]

```lua
DayLength = 3,
XPMultiplier = 2.0,
WaterShut = 6,
ElecShut = 6,
Temperature = 3,
ZombieCount = 4,
LootRespawn = 4,
```

Hardcore Survival [#hardcore-survival]

```lua
DayLength = 2,
XPMultiplier = 1.0,
WaterShut = 1,
ElecShut = 1,
Temperature = 2,
ZombieCount = 2,
LootRespawn = 2,
HoursForLootRespawn = 0,
```

Roleplay Server [#roleplay-server]

```lua
DayLength = 4,
XPMultiplier = 1.5,
WaterShut = 6,
ElecShut = 6,
ZombieCount = 5,
PopulationMultiplier = 0.3,
EnableVehicles = true,
CarSpawnRate = 4,
```

Related Guides [#related-guides]

See also: [Zombie Settings](/docs/project-zomboid/zombie-settings) | [Loot Respawn](/docs/project-zomboid/loot-respawn) | [Configure Your Server](/docs/project-zomboid/server-config)

If you need help, join our [Discord](https://discord.xgamingserver.com/).
