diff --git a/ansible/roles/podman/defaults/main.yml b/ansible/roles/podman/defaults/main.yml index d8bb661..9d195ea 100644 --- a/ansible/roles/podman/defaults/main.yml +++ b/ansible/roles/podman/defaults/main.yml @@ -83,6 +83,28 @@ zomboid_mods_excluded: mod_id: IconsInventory reason: Sophie recommends removing Icon Inventory +# Mod IDs the Sophie preset's `Mods=` line gets wrong for a 42.20.3 server. +# +# Every workshop item below is in the preset's own WorkshopItems= list and +# downloads fine -- only the ID it is referenced by is stale, so the server +# logs `required mod ... not found` and quietly runs without it. Verified +# against the id= field of each mod.info on disk, not guessed from folder +# names (folder name and mod ID are unrelated). Applied by server.ini.j2 so a +# re-vendor of a newer preset keeps the corrections. +zomboid_mods_renamed: + - old: "FWOBenchPress&Treadmill" + new: FWOBenchPressTreadmill + reason: preset carries a stray ampersand; mod.info in 2940354599 has none + - old: Ladders42131 + new: Ladders4220 + reason: 3629835761 ships per-build variants; 42131 is the 42.16 one, 4220 is ours + - old: ServingPlatesB42 + new: ServingPlates42 + reason: mod.info in 3399320470 declares ServingPlates42 + - old: NewMusic_OrchestraMix + new: NewMusic_CMM + reason: author renamed it to "Classical Music Mix" in 3760471726 + # Server config is seeded once and then left alone, so it can be hand-edited # between world regenerations. Set true to overwrite it from the templates. zomboid_config_force: false diff --git a/ansible/roles/podman/templates/zomboid/server.ini.j2 b/ansible/roles/podman/templates/zomboid/server.ini.j2 index 6579c13..66e5da4 100644 --- a/ansible/roles/podman/templates/zomboid/server.ini.j2 +++ b/ansible/roles/podman/templates/zomboid/server.ini.j2 @@ -14,6 +14,10 @@ server and admins can hand-edit this file between world regenerations. Re-push it deliberately with -e zomboid_config_force=true. -#} +{% set rename_map = {} %} +{% for r in zomboid_mods_renamed %}{% set _ = rename_map.update({r.old: r.new}) %}{% endfor %} +{% set resolved_mod_ids = [] %} +{% for m in zomboid_sophie_mod_ids %}{% set _ = resolved_mod_ids.append(rename_map.get(m, m)) %}{% endfor %} {% set excluded_mod_ids = zomboid_mods_excluded | map(attribute='mod_id') | list %} {% set excluded_workshop_ids = zomboid_mods_excluded | map(attribute='workshop_id') | list %} # Players can hurt and kill other players @@ -82,7 +86,7 @@ UDPPort=16262 ResetID=6953472 # Enter the mod loading ID here. It can be found in \Steam\steamapps\workshop\modID\mods\modName\info.txt -Mods={{ zomboid_sophie_mod_ids | reject('in', excluded_mod_ids) | join(';') }} +Mods={{ resolved_mod_ids | reject('in', excluded_mod_ids) | join(';') }} # Enter the foldername of the mod found in \Steam\steamapps\workshop\modID\mods\modName\media\maps\ Map={{ zomboid_map }}