fix(zomboid): re-sync the world settings from the live server

The vendored Sophie preset and the running debbzoid world had drifted, and the
repo only held the preset. That is not a restore point: force-pushing it would
have reverted the admins' in-game tuning rather than recovering it, which is
exactly how a Sophie world quietly became an Apocalypse one once already -- 139
values reverted, loot from 0.35 back to 0.9, CharacterFreePoints 0 to 60.

files/zomboid/sophie/SandboxVars.lua is now a snapshot of the live world taken
2026-08-31, not the preset as shipped. The modlist is untouched and still
upstream, which is why zomboid_preset_version now names the two halves and their
separate dates. server.ini.j2 carries the eight keys that had drifted:

  PlayerSafehouse              false -> true
  SafehouseAllowNonResidential false -> true   (the diner/gas-station case)
  SafehouseAllowRespawn        false -> true
  SafehouseAllowLoot           true  -> false
  SafehouseAllowFire           true  -> false
  TrashDeleteAll               false -> true
  MapRemotePlayerVisibility    1     -> 4
  ResetID                      6953472 -> 826046

ResetID is in that list on purpose, and matters most. It is the world's
soft-reset token: a file value that differs from the one the live world was
created with tells every connected client to roll a new character. Carrying the
live value makes a deliberate force-push a no-op instead of a server-wide wipe
prompt.

Spawn config gets its own switch, zomboid_spawn_force. spawnregions.lua and
spawnpoints.lua are the only config a running world re-reads -- at every server
start, where SandboxVars is read once, when the world is created -- so a spawn
edit is deployable on the live world without a wipe. Sharing zomboid_config_force
between them would have meant force-pushing the whole preset to land a one-line
spawn edit, rewriting the INI (hence the ResetID hazard above) and the world's
SandboxVars along with it.

config-template/ now tracks the repo unconditionally. Nothing on the host writes
that directory and the server cannot see it, so it has no hand edits to protect;
if it does not track the repo it is not a restore point, just an older world's
settings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016QdWYhwUtwM2NQGukiRh12
This commit is contained in:
Bastian de Byl
2026-09-05 09:11:31 -04:00
co-authored by Claude Opus 5
parent 9954d774e7
commit ba9c4f2bfe
7 changed files with 456 additions and 226 deletions
@@ -8,11 +8,30 @@
Only the keys this deployment actually owns are templated -- credentials,
RCON, Discord, backup cadence, and the mod lists. Every gameplay setting
(PVP, safety system, safehouses, sleep, MaxPlayers, PauseEmpty, ResetID,
the welcome message) is left exactly as the preset author shipped it.
the welcome message) is a literal, and was the preset author's value until
the live-config sync below.
Seeded once, then left alone: the deploy task uses force=false so the
server and admins can hand-edit this file between world regenerations.
Re-push it deliberately with -e zomboid_config_force=true.
Synced from the running debbzoid server on 2026-08-31, so a deliberate
force-push cannot silently revert what the admins set in-game. Eight keys
had drifted from the preset and now carry the live values:
PlayerSafehouse false -> true
SafehouseAllowNonResidential false -> true (the diner/gas-station case)
SafehouseAllowRespawn false -> true
SafehouseAllowLoot true -> false
SafehouseAllowFire true -> false
TrashDeleteAll false -> true
MapRemotePlayerVisibility 1 -> 4
ResetID 6953472 -> 826046
ResetID is in that list on purpose. It is the world's soft-reset token: if
the file's value ever differs from the one the live world was created with,
every connected client is told to roll a new character. Carrying the live
value means a force-push is a no-op instead of a server-wide wipe prompt.
-#}
{% set rename_map = {} %}
{% for r in zomboid_mods_renamed %}{% set _ = rename_map.update({r.old: r.new}) %}{% endfor %}
@@ -83,7 +102,7 @@ DefaultPort=16261
UDPPort=16262
# Reset ID determines if the server has undergone a soft-reset. If this number does match the client, the client must create a new character. Used in conjunction with PlayerServerID. It is strongly advised that you backup these IDs somewhere Min: 0 Max: 2147483647 Default: 985847558
ResetID=6953472
ResetID=826046
# Enter the mod loading ID here. It can be found in \Steam\steamapps\workshop\modID\mods\modName\info.txt
Mods={{ resolved_mod_ids | reject('in', excluded_mod_ids) | join(';') }}
@@ -131,7 +150,7 @@ AnnounceAnimalDeath=false
SaveWorldEveryMinutes=10
# Both admins and players can claim safehouses
PlayerSafehouse=false
PlayerSafehouse=true
# Only admins can claim safehouses
AdminSafehouse=false
@@ -140,13 +159,13 @@ AdminSafehouse=false
SafehouseAllowTrepass=true
# Allow fire to damage safehouses
SafehouseAllowFire=true
SafehouseAllowFire=false
# Allow non-members to take items from safehouses
SafehouseAllowLoot=true
SafehouseAllowLoot=false
# Players will respawn in a safehouse that they were a member of before they died
SafehouseAllowRespawn=false
SafehouseAllowRespawn=true
# Players must have survived this number of in-game days before they are allowed to claim a safehouse Min: 0 Max: 2147483647 Default: 0
SafehouseDaySurvivedToClaim=0
@@ -155,7 +174,7 @@ SafehouseDaySurvivedToClaim=0
SafeHouseRemovalTime=144
# Governs whether players can claim non-residential buildings.
SafehouseAllowNonResidential=false
SafehouseAllowNonResidential=true
SafehouseDisableDisguises=true
@@ -328,7 +347,7 @@ BanKickGlobalSound=true
RemovePlayerCorpsesOnCorpseRemoval=false
# If true, player can use the "delete all" button on bins.
TrashDeleteAll=false
TrashDeleteAll=true
# If true, player can hit again when struck by another player.
PVPMeleeWhileHitReaction=false
@@ -352,7 +371,7 @@ CarEngineAttractionModifier=0.5
PlayerBumpPlayer=false
# Controls display of remote players on the in-game map. 1=Hidden 2=Friends 3=Friends and nearby players 4=Everyone Min: 1 Max: 4 Default: 1
MapRemotePlayerVisibility=1
MapRemotePlayerVisibility=4
# Min: 1 Max: 300 Default: 5
BackupsCount=10