From 1e57c7530f0399b1eee74cf429333b1422700fc1 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Tue, 13 Aug 2024 00:54:48 -0400 Subject: [PATCH] Added Army of Darkness example for custom games. Requires aoddoom1.wad https://www.moddb.com/mods/army-of-darkness-total-conversion/addons/army-of-darkness-doom-wad --- .scripts/TobyCustom/ArmyOfDarknessDoom.sh | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 .scripts/TobyCustom/ArmyOfDarknessDoom.sh diff --git a/.scripts/TobyCustom/ArmyOfDarknessDoom.sh b/.scripts/TobyCustom/ArmyOfDarknessDoom.sh new file mode 100755 index 0000000..9cdd8aa --- /dev/null +++ b/.scripts/TobyCustom/ArmyOfDarknessDoom.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# requires aoddoom1.wad +# https://www.moddb.com/mods/army-of-darkness-total-conversion/addons/army-of-darkness-doom-wad + +# Set the current path to the Doom path required by some OS. +pushd "${doomPath}" + +gamePath=~/.local/games/doom +# Set up the pk3 and wad files +gameOption=( + "${gamePath}/TobyAccMod_V${tobyVersion}.pk3" + "${gamePath}/Addons/DOOM/TobyV7_Pickups.pk3" + "$gamePath/Addons/MENU/TobyV${tobyVersion%%-*}_"* + "${gamePath}/TobyDoomLevels.wad" + "${gamePath}/aoddoom1.wad" +) + +# Check for and include if present a wad. Some people may not have it. +if [[ -e "${gamePath}/DoomMetalVol7.wad" ]]; then + gameOption+=("${gamePath}/DoomMetalVol7.wad") +elif [[ -e "${gamePath}/DoomMetalVol6.wad" ]]; then + gameOption+=("${gamePath}/DoomMetalVol6.wad") +fi + +# Source common variable extensions. +pbrc="$(find "${0%/*}/" -type f -name '.projectbrutalityrc')" +source "${pbrc}" + +# Launch the game and pipe things to be spoken through speech-dispatcher. +# This also leaves the console output intact for people who may want to read it. +exec stdbuf -oL ${gzdoom} ${gameOption[@]} | while IFS= read -r l ; do echo "$l" | { grep "${grepStrings[@]}" | grep "${antiGrepStrings[@]}" | sed "${sedStrings[@]}" | spd-say -e ${spd_module} ${spd_pitch} ${spd_rate} ${spd_voice} ${spd_volume} -- > /dev/null 2>&1; }; echo "$l";done