Customizing World Generation with leveldataoverride.lua
How to use leveldataoverride.lua to customize season lengths, starting conditions, and world presets for both shards.
Overview
leveldataoverride.lua lets you customize world generation parameters for each shard before the world is created. The file is optional — if absent, the server uses default generation settings. Changes to this file take effect on the next world generation, meaning you must wipe the existing world (delete the save/ folder) for changes to apply to an existing server.
File Locations
Cluster_1/Master/leveldataoverride.lua -- Overworld settings
Cluster_1/Caves/leveldataoverride.lua -- Caves settings
Each shard has its own independent override file. Overworld settings do not affect Caves and vice versa.
Overworld Example
A complete example for a custom overworld configuration:
return {
override_enabled = true,
preset = "SURVIVAL_TOGETHER",
overrides = {
-- Season configuration
season_start = "autumn",
autumn = "default",
winter = "short",
spring = "default",
summer = "long",
-- Starting conditions
start_location = "default",
world_size = "default",
branching = "default",
loop = "default",
-- Resource overrides
bees = "more",
flowers = "default",
berrybush = "default",
-- Difficulty
difficulty = "default",
hounds = "more",
meteorshowers = "rare",
lightning = "default",
},
}
Season Length Values
The named length values map to approximate day counts:
| Value | Approximate Days |
|---|---|
"noseason" |
Season disabled |
"veryshort" |
5 days |
"short" |
10 days |
"default" |
Varies (15–20 days) |
"long" |
25 days |
"verylong" |
35 days |
"random" |
Random each world |
The season_start option accepts: "autumn", "winter", "spring", "summer", "random".
Start Location
start_location = "default", -- Standard balanced start
start_location = "plus", -- Increased resources at start
start_location = "darkness", -- Extra challenge start
Caves Override Example
For the Caves shard, use the cave preset:
return {
override_enabled = true,
preset = "DST_CAVE",
overrides = {
-- Cave-specific options
wormhole_prefabs = "default",
fissure = "default",
bats = "default",
spider_warriors = "default",
mushtree = "default",
},
}
Applying Changes to an Existing World
Changing leveldataoverride.lua on an already-running world has no effect until you regenerate. To regenerate a shard:
- Stop the server
- Delete the
save/folder for the target shard:- Overworld:
Cluster_1/Master/save/ - Caves:
Cluster_1/Caves/save/
- Overworld:
- Start the server — the world regenerates using the new settings
Character data and player inventories are stored separately and persist across world regenerations in most cases.
Peaceful Mode
To disable most hostile mobs for a casual server:
overrides = {
difficulty = "peaceful",
hounds = "never",
meteorshowers = "never",
krampus = "never",
}
Common Mistakes
File has no effect: Make sure override_enabled = true is set. Without this, all other overrides are ignored.
Wrong preset for shard: Using SURVIVAL_TOGETHER as the preset in a Caves leveldataoverride.lua can generate an incorrect or broken Caves world. Use DST_CAVE for the Caves shard.
Changes not appearing: The override only applies to newly generated worlds. If the save/ folder exists, the world loads from the save and ignores the override file until the save is deleted.