diff --git a/roles/7dtd/files/mods/No-Respawn-Near-Backpack-2-0-0-0.zip b/roles/7dtd/files/mods/No-Respawn-Near-Backpack-2-0-0-0.zip new file mode 100644 index 0000000..5507fdd Binary files /dev/null and b/roles/7dtd/files/mods/No-Respawn-Near-Backpack-2-0-0-0.zip differ diff --git a/roles/7dtd/files/mods/Singularity-v4.1.3.zip b/roles/7dtd/files/mods/Singularity-v4.1.3.zip new file mode 100644 index 0000000..c42c1e8 Binary files /dev/null and b/roles/7dtd/files/mods/Singularity-v4.1.3.zip differ diff --git a/roles/7dtd/tasks/main.yml b/roles/7dtd/tasks/main.yml index 23ef93c..f5ef0b0 100644 --- a/roles/7dtd/tasks/main.yml +++ b/roles/7dtd/tasks/main.yml @@ -33,6 +33,27 @@ group: '1000' mode: '0755' +# 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 (the zips already carry their own _Singularity/ +# and zByteblazarsNoRespawnNearBackpack/ subfolders, which fix load order by name). +- 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: "{{ 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: src: sdtdserver.xml.j2 diff --git a/vars.yml b/vars.yml index f375ff2..da4d68c 100755 --- a/vars.yml +++ b/vars.yml @@ -198,7 +198,22 @@ sdtd_airdrop_frequency: 72 ## 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 -sdtd_eac_enabled: "true" +## EAC must be OFF because we deploy code mods (Singularity framework + the No Respawn Near +## Backpack patch below) — EAC blocks their Harmony hooks. Keep "false" while mods are installed. +sdtd_eac_enabled: "false" +## Game mods, vendored under roles/7dtd/files/mods/ and extracted into serverfiles/Mods (the +## container's bind-mounted Mods dir) by the role. Source of truth: add the zip name here AND +## drop the file into the role's files/mods dir. Load order is handled by folder prefixes — +## Singularity's leading underscore loads FIRST, the mod's z- prefix loads LAST (7dtd sorts +## Mods alphabetically). +## - Singularity (4.1.3): Byteblazar's core framework; No Respawn Near Backpack is a server +## policy implemented here, disabled by default, enabled via XML (the mod below). +## - No Respawn Near Backpack for V2 (2.0.0.0): server-side XML patch that sets Singularity's +## ServerPolicies.NoRespawnNearBackpack=true -> players CANNOT respawn near their backpack, +## they respawn at a world starting point instead. Requires EAC off (see above). +sdtd_mods: + - Singularity-v4.1.3.zip + - No-Respawn-Near-Backpack-2-0-0-0.zip sdtd_xp_multiplier: 100 sdtd_telnet_enabled: "true"