diff --git a/ansible/roles/podman/templates/zomboid/entrypoint.sh.j2 b/ansible/roles/podman/templates/zomboid/entrypoint.sh.j2 index 4c0ca9b..06e32aa 100644 --- a/ansible/roles/podman/templates/zomboid/entrypoint.sh.j2 +++ b/ansible/roles/podman/templates/zomboid/entrypoint.sh.j2 @@ -47,6 +47,33 @@ if [ "${AUTO_UPDATE:-true}" = "true" ]; then echo "=== Update complete ===" fi +# Strip scripts the dedicated-server package ships but the client no longer has. +# +# The two Steam apps are packaged separately and have drifted. Base.Log_Stack_01 +# was removed from the client in 42.16, but app 380870 still ships +# entity_logstack.txt. The server registers every script it can see into a new +# world's WorldDictionary, so the entry lands in the save, and then every client +# fails at world load with: +# +# WorldDictionaryException: [SpriteConfigs] Missing dictionary script on +# client: Base.Log_Stack_01 +# +# Nothing in multiplayer can legitimately use a script no client has, so +# removing it server-side costs nothing. This runs after the SteamCMD update on +# purpose: validate restores the file on every boot, so it has to be stripped +# each time, not once. +# +# Removing the file does not fix a world whose dictionary already records the +# entry -- that save needs regenerating. +strip_client_missing_scripts() { + local stale="${INSTALL_DIR}/media/scripts/generated/entities/misc/entity_logstack.txt" + if [ -f "${stale}" ]; then + echo "=== Removing ${stale##*/} (shipped by server, absent from client) ===" + rm -f "${stale}" + fi +} +strip_client_missing_scripts + # Configure JVM memory settings in ProjectZomboid64.json (Build 42 uses JSON config) configure_memory() { local json_file="${INSTALL_DIR}/ProjectZomboid64.json"