From 5c2c65850e3d59522188d5ad354861cb0f2bec28 Mon Sep 17 00:00:00 2001 From: boxswapper Date: Wed, 23 Sep 2026 21:21:52 -0600 Subject: [PATCH] add 3-4x wildlife modlet for 7dtd, re-enable mod deploy, strip dead v3.x serverconfig props --- roles/7dtd/files/mods/MoreAnimals.zip | Bin 0 -> 1962 bytes .../mods/MoreAnimals/Config/spawning.xml | 33 ++++++++++++ roles/7dtd/files/mods/MoreAnimals/ModInfo.xml | 7 +++ roles/7dtd/tasks/main.yml | 46 +++++++++------- roles/7dtd/templates/sdtdserver.xml.j2 | 51 ++++++------------ vars.yml | 30 ++++++++--- 6 files changed, 105 insertions(+), 62 deletions(-) create mode 100644 roles/7dtd/files/mods/MoreAnimals.zip create mode 100644 roles/7dtd/files/mods/MoreAnimals/Config/spawning.xml create mode 100644 roles/7dtd/files/mods/MoreAnimals/ModInfo.xml diff --git a/roles/7dtd/files/mods/MoreAnimals.zip b/roles/7dtd/files/mods/MoreAnimals.zip new file mode 100644 index 0000000000000000000000000000000000000000..538ace69e143475289fb326e0f74004be51d0f30 GIT binary patch literal 1962 zcmWIWW@h1H0D*)R=CNP~l;B~IVeri_N_EW3%uUQG)(;KgWMFEAYKgBaIEnlx9HwSFs`6*knKp4%y z*a?o_haCi3-~a1!_viBUdLPJfEn4f5;~u}s7x{9^rqA@9{HNO7l=Y+8hkcbb##gWG zUT(dhYU#W}Me`4jpGi!~*0;61{bt=uM;)tK|D7W=UBa%M+VV(#joQKc7ixFz|GHtT zmf>H{`<^|#i+8O15%=q4dB-W)r3*HAEOtMBPvz{6_nBFTA6z~>HRxaOR3T@ZABU_S zt1Nsjl<)lQw~g5e*A|bJwu>A1ElhfIr!Oo$WcSq7`^gOnw z@Qj=#GxTF0Wo@^4#|{c1?BOho7DCSXd1;yHL|iI zu{&dPT=st`k$)q74@GeCmmCJ7};s(aQ2;MgOem z(@z%i6#iPyD=__aN;sE6t$*$no|we#_<)IR9*1*XwZgw?8?LQdSJlbRy5rIu zPpx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 + + + 3 + 0.6,1.05,0.81,0.6,0.39,0.21 + \ No newline at end of file diff --git a/roles/7dtd/files/mods/MoreAnimals/ModInfo.xml b/roles/7dtd/files/mods/MoreAnimals/ModInfo.xml new file mode 100644 index 0000000..fe020df --- /dev/null +++ b/roles/7dtd/files/mods/MoreAnimals/ModInfo.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/roles/7dtd/tasks/main.yml b/roles/7dtd/tasks/main.yml index e67abac..6fa45da 100644 --- a/roles/7dtd/tasks/main.yml +++ b/roles/7dtd/tasks/main.yml @@ -36,33 +36,39 @@ # Mods live in the bind-mounted serverfiles; the container loads them on its next start # (recreate on every deploy re-reads them). zips come from roles/7dtd/files/mods (sdtd_mods # in vars.yml), extracted one level deep (each zip carries its own mod subfolder; prefix -# folders with z- if they must sort LAST for load order). unarchive only ADDS — it never -# removes, so a mod dropped from sdtd_mods would keep loading: with an empty list we wipe -# the whole dir and the create-task below rebuilds it empty. Partial mod swaps are not -# auto-cleaned (the role only knows zip names, not the folders zips unpack into) — remove -# those retired folders from the box by hand. +# folders with z- if they must sort LAST for load order). +# Deployed now: MoreAnimals — a PURE XML data patch (no DLL/Harmony) raising wild-game/predator +# spawn density (v3.x schema: maxcount per 80x80m chunk + 6-value respawndelay tuples). Works +# with EAC ON, needs NO client install (spawning is server-authoritative; the server pushes its +# XML state to clients on connect). GATE: XML values apply only while the sandbox Density options +# are Default — once sdtd_sandbox_code sets any density != Default, the sandbox value wins and +# this patch is inert; use SandboxCode Day/Night Animal Density + Respawn instead. +# unarchive only ADDS — it never removes, so a mod dropped from sdtd_mods would keep loading: +# with an empty list we wipe the whole dir and the create-task below rebuilds it empty. +# Partial mod swaps are not auto-cleaned (the role only knows zip names, not the folders zips +# unpack into) — remove those retired folders from the box by hand. - name: Remove 7 Days to Die Mods directory when no mods are deployed ansible.builtin.file: path: /opt/apps/7dtd/serverfiles/Mods state: absent when: sdtd_mods | length == 0 -# - name: Create 7 Days to Die Mods directory (container user) -# ansible.builtin.file: -# path: /opt/apps/7dtd/serverfiles/Mods -# state: directory -# owner: '1000' -# group: '1000' -# mode: '0755' +- name: Create 7 Days to Die Mods directory (container user) + ansible.builtin.file: + path: /opt/apps/7dtd/serverfiles/Mods + state: directory + owner: '1000' + group: '1000' + mode: '0755' -# - name: Deploy 7 Days to Die mods from vendored zips -# ansible.builtin.unarchive: -# src: "mods/{{ item }}" -# dest: /opt/apps/7dtd/serverfiles/Mods -# owner: '1000' -# group: '1000' -# mode: '0755' -# loop: "{{ sdtd_mods }}" +- name: Deploy 7 Days to Die mods from vendored zips + ansible.builtin.unarchive: + src: "mods/{{ item }}" + dest: /opt/apps/7dtd/serverfiles/Mods + owner: '1000' + group: '1000' + mode: '0755' + loop: "{{ sdtd_mods }}" - name: Template 7 Days to Die serverconfig from vars.yml ansible.builtin.template: diff --git a/roles/7dtd/templates/sdtdserver.xml.j2 b/roles/7dtd/templates/sdtdserver.xml.j2 index 243e595..6aa16e1 100644 --- a/roles/7dtd/templates/sdtdserver.xml.j2 +++ b/roles/7dtd/templates/sdtdserver.xml.j2 @@ -62,52 +62,35 @@ - - - - - - + +{% if sdtd_sandbox_code %} + +{% endif %} + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + diff --git a/vars.yml b/vars.yml index dfa47d0..9aa3497 100755 --- a/vars.yml +++ b/vars.yml @@ -184,6 +184,18 @@ sdtd_game_world: RWG sdtd_worldgen_seed: boxswapper sdtd_worldgen_size: 10240 sdtd_game_name: Boxswapper +## v3.0+ SandboxCode — the ONLY gameplay tuning v3.x reads. The vars below this block +## (sdtd_difficulty .. sdtd_airdrop_frequency) are REFERENCE-ONLY: v3.0 removed them from +## serverconfig.xml, the template no longer renders them, and the game IGNORES them. Empty +## code = Adventurer defaults. To restore the server's intended tuning generate a code: +## client -> New Game -> Sandbox Options -> set options to match the vars below +## (Difficulty Nomad, XP 250, DayNight 60, DayLight 18, Blood Moon 20 days, DropOnDeath +## Everything, Loot 150, AirDrop 24h) PLUS Day Animal Density = High and +## Day Animal Respawn = Fast (Night similar if you want night wildlife) -> copy -> paste here. +## While the code is empty, the MoreAnimals modlet controls wildlife density (it applies only +## while the sandbox Density options are Default). +sdtd_sandbox_code: "" +## ── REFERENCE VARS FOR SANDBOXCODE GENERATION (not rendered to serverconfig.xml on v3.x) ── ## Difficulty: 0 = Scavenger, 1 = Adventurer, 2 = Nomad, 3 = Warrior, 4 = Survivalist, 5 = Insane sdtd_difficulty: "2" sdtd_day_night_length: 60 @@ -200,15 +212,17 @@ sdtd_airdrop_frequency: 24 ## PlayerKillingMode: 0 = no killing, 1 = kill allies only, 2 = kill strangers only, 3 = kill everyone sdtd_player_killing_mode: "3" sdtd_max_spawned_zombies: 64 -## EAC is ON (default protection). It was OFF while code mods were deployed — EAC blocks -## their Harmony hooks, so keep "false" if mods are ever reinstalled. +## EAC is ON (default protection). EAC blocks CODE mods (Harmony DLL hooks) — that is why it was +## OFF while code mods were deployed. PURE XML data modlets (like MoreAnimals below) carry no DLL +## and work fine with EAC ON; keep "false" only if code mods are ever reinstalled. sdtd_eac_enabled: "true" -## Game mods: NONE deployed (Singularity 4.1.3 + No Respawn Near Backpack 2.0.0.0 were -## removed; EAC was flipped back on as part of that change). To re-add a mod: drop the zip -## into roles/7dtd/files/mods/ and list its name here. NOTE: the role's unarchive task only -## ADDS mods — retiring to an EMPTY list wipes the whole server Mods dir; swapping one mod -## for another (non-empty list) requires removing the retired folder from the box by hand. -sdtd_mods: [] +## Game mods deployed: MoreAnimals.zip — pure XML spawn-density patch (roles/7dtd/files/mods). +## Server-side only: clients join vanilla with EAC ON, nothing to install. To re-add/swap a mod: +## drop the zip into roles/7dtd/files/mods/ and list its name here. unarchive only ADDS — it +## never removes, so a mod dropped from this list would keep loading: with an EMPTY list we wipe +## the whole server Mods dir; swapping one mod for another (non-empty list) requires removing the +## retired folder from the box by hand. +sdtd_mods: [MoreAnimals.zip] sdtd_xp_multiplier: 250 sdtd_telnet_enabled: "true"