Custom scripts for testing new addons.
This commit is contained in:
		
							
								
								
									
										124
									
								
								.scripts/TobyCustom/'
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										124
									
								
								.scripts/TobyCustom/'
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,124 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
pushd "$doomPath"
 | 
			
		||||
 | 
			
		||||
# Set up the pk3 and wad files 
 | 
			
		||||
gameOption=(
 | 
			
		||||
    "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
 | 
			
		||||
    "${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
 | 
			
		||||
    "${doomPath}/PB-Toby-Compatibility-Addon.pk3"
 | 
			
		||||
    "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
 | 
			
		||||
    "${doomPath}/TobyDeathArena_V1-0.wad"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Death match setup
 | 
			
		||||
ipAddress="$(dialog --backtitle "Deathmatch Options" \
 | 
			
		||||
    --clear \
 | 
			
		||||
    --no-tags \
 | 
			
		||||
    --ok-label "Join" \
 | 
			
		||||
    --cancel-label "Exit" \
 | 
			
		||||
    --extra-button \
 | 
			
		||||
    --extra-label "Host" \
 | 
			
		||||
    --inputbox "Enter ip or URL, required for join." -1 -1 --stdout)"
 | 
			
		||||
buttonCode=$?
 | 
			
		||||
[[ $buttonCode -eq 1 ]] && exit 0
 | 
			
		||||
if [[ $buttonCode -eq 0 ]]; then
 | 
			
		||||
    if [[ "${#ipAddress}" -lt 3 ]]; then
 | 
			
		||||
        dialog --backtitle "Deathmatch" --clear --msgbox "No ip address or URL given." -1 -1 --stdout
 | 
			
		||||
        exit 1
 | 
			
		||||
    fi
 | 
			
		||||
    flags=('-join' "${ipAddress}")
 | 
			
		||||
else
 | 
			
		||||
    # List of maps included:
 | 
			
		||||
    maps=(
 | 
			
		||||
        "1" "Com Station (2-4 players)"
 | 
			
		||||
        "2" "Warehouse (2-4 players)"
 | 
			
		||||
        "3" "Sector 3 (2-4 players)"
 | 
			
		||||
        "4" "Dungeon of Doom (2-4 players)"
 | 
			
		||||
        "5" "Ocean Fortress (2-4 players)"
 | 
			
		||||
        "6" "Water Treatment Facility (2-4 players)"
 | 
			
		||||
        "7" "Phobos Base Site 4 (2-4 players)"
 | 
			
		||||
        "8" "Hangar Bay 18 (2-4 players)")
 | 
			
		||||
    # Array of how many players a given map supports in dialog rangebox syntax
 | 
			
		||||
    declare -a mapPlayers=(
 | 
			
		||||
        [1]="2 4"
 | 
			
		||||
        [2]="2 4"
 | 
			
		||||
        [3]="2 4"
 | 
			
		||||
        [4]="2 4"
 | 
			
		||||
        [5]="2 4"
 | 
			
		||||
        [6]="2 4"
 | 
			
		||||
        [7]="2 4"
 | 
			
		||||
        [8]="2 4")
 | 
			
		||||
    map="$(dialog --backtitle "Select Map" \
 | 
			
		||||
        --clear \
 | 
			
		||||
        --no-tags \
 | 
			
		||||
        --cancel-label "Exit" \
 | 
			
		||||
        --ok-label "Next" \
 | 
			
		||||
        --menu "Please select one" 0 0 0 "${maps[@]}" --stdout)"
 | 
			
		||||
    fraglimit="$(dialog --backtitle "Fraglimit" \
 | 
			
		||||
        --clear \
 | 
			
		||||
        --ok-label "Next" \
 | 
			
		||||
        --cancel-label "Exit" \
 | 
			
		||||
        --rangebox "Select Fraglimit" -1 -1 1 500 20 --stdout)"
 | 
			
		||||
    [[ $? -eq 1 ]] && exit 0
 | 
			
		||||
    # Get ip address
 | 
			
		||||
    yourIpAddress="$(curl -4s https://icanhazip.com)"
 | 
			
		||||
    players="$(dialog --backtitle "Host Deathmatch Game" \
 | 
			
		||||
        --clear \
 | 
			
		||||
        --ok-label "Next" \
 | 
			
		||||
        --cancel-label "Exit" \
 | 
			
		||||
        --rangebox "Select number of players. Remember to give them your IP address: ${yourIpAddress}" -1 -1 ${mapPlayers[$map]} --stdout)"
 | 
			
		||||
    [[ $? -eq 1 ]] && exit 0
 | 
			
		||||
    skillLevel="$(dialog --backtitle "Host Deathmatch Game" \
 | 
			
		||||
        --clear \
 | 
			
		||||
        --ok-label "Start" \
 | 
			
		||||
        --cancel-label "Exit" \
 | 
			
		||||
        --extra-button \
 | 
			
		||||
        --extra-label "Bots Only" \
 | 
			
		||||
        --rangebox "Select difficulty. 1 easiest, 5 hardest." -1 -1 1 5 3 --stdout)"
 | 
			
		||||
    code=$?
 | 
			
		||||
    [[ $code -eq 1 ]] && exit 0
 | 
			
		||||
    if [[ $code -eq 3 ]]; then
 | 
			
		||||
        players=1
 | 
			
		||||
        dialog --backtitle "Preparing to Launch" \
 | 
			
		||||
            --msgbox "When the game starts, press \` to open the console. Type addbot, press enter. Repeat addbot for as many bots as you would like. Press \`    again to close the console." -1 -1 --stdout
 | 
			
		||||
    fi
 | 
			
		||||
    flags=(
 | 
			
		||||
            '-host' "${players}"
 | 
			
		||||
            '-skill' "${skillLevel}"
 | 
			
		||||
            '-deathmatch'
 | 
			
		||||
            '+set' 'sv_cheats' '1'
 | 
			
		||||
            '+fraglimit' "$fraglimit"
 | 
			
		||||
            '+dmflags' '16384' '+dmflags' '4' '+dmflags' '128' '+dmflags' '4096'
 | 
			
		||||
            '+dmflags2' '512'   '+dmflags2' '1024'
 | 
			
		||||
                    '-extratic' '-dup' '3'
 | 
			
		||||
            '-warp' "$map"
 | 
			
		||||
    )
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Check for and include if present a wad. Some people may not have it.
 | 
			
		||||
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
 | 
			
		||||
    gameOption+=" DoomMetalVol7.wad"
 | 
			
		||||
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
 | 
			
		||||
    gameOption+=" DoomMetalVol6.wad"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Extend the search for new messages to be read.
 | 
			
		||||
grepStrings+=('-e' ' died.'
 | 
			
		||||
    '-e' 'Ectoplasmic Surge!'
 | 
			
		||||
    '-e' ' has been '
 | 
			
		||||
    '-e' '^(Armor|Health) boosted!'
 | 
			
		||||
    '-e' 'Lesser demon energy'
 | 
			
		||||
    '-e' '^Found '
 | 
			
		||||
    '-e' 'Got the '
 | 
			
		||||
    '-e' 'Picked up '
 | 
			
		||||
    '-e' '^(Mega|Soul)sphere$'
 | 
			
		||||
    '-e' '^Took '
 | 
			
		||||
    '-e' ' was .*(\.|!)'
 | 
			
		||||
    '-e' '^Vanguard of the gods!$'
 | 
			
		||||
    '-e' "You've found "
 | 
			
		||||
    '-e' 'You (collected|got|found|picked up) ')
 | 
			
		||||
 | 
			
		||||
# 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[@]} "${flags[@]}" | 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
 | 
			
		||||
@@ -2,17 +2,12 @@
 | 
			
		||||
 | 
			
		||||
pushd "$doomPath"
 | 
			
		||||
 | 
			
		||||
# Add all the TobyDoom stuff we need, exclude things we do not.
 | 
			
		||||
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Set up the pk3 and wad files 
 | 
			
		||||
gameOption=(
 | 
			
		||||
    "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
 | 
			
		||||
    "${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
 | 
			
		||||
    ${addons[@]}
 | 
			
		||||
    "${doomPath}/PB-Toby-Compatibility-Addon.pk3"
 | 
			
		||||
    "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
 | 
			
		||||
    "${doomPath}/TobyDeathArena_V1-0.wad"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -109,15 +104,21 @@ elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Extend the search for new messages to be read.
 | 
			
		||||
grepStrings+=('-e' 'New PDA Entry:'
 | 
			
		||||
    '-e' ' died.'
 | 
			
		||||
grepStrings+=('-e' ' died.'
 | 
			
		||||
    '-e' ' Swiss Cheese '
 | 
			
		||||
    '-e' 'Ectoplasmic Surge!'
 | 
			
		||||
    '-e' ' has been '
 | 
			
		||||
    '-e' ' killed '
 | 
			
		||||
    '-e' '^(Armor|Health) boosted!'
 | 
			
		||||
    '-e' 'Lesser demon energy'
 | 
			
		||||
    '-e' ' was '
 | 
			
		||||
    '-e' '^Found '
 | 
			
		||||
    '-e' 'Got the '
 | 
			
		||||
    '-e' 'Picked up '
 | 
			
		||||
    '-e' '^(Mega|Soul)sphere$'
 | 
			
		||||
    '-e' '^Took '
 | 
			
		||||
    '-e' ' (sucked|was) .*(\.|!)'
 | 
			
		||||
    '-e' '^Vanguard of the gods!$'
 | 
			
		||||
    '-e' "You've found "
 | 
			
		||||
    '-e' 'Slot ')
 | 
			
		||||
    '-e' 'You (collected|got|found|picked up) ')
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
 
 | 
			
		||||
@@ -3,36 +3,44 @@
 | 
			
		||||
# Set the current path to the Doom path required by some OS.
 | 
			
		||||
pushd "${doomPath}"
 | 
			
		||||
 | 
			
		||||
# Add all the TobyDoom stuff we need, exclude things we do not.
 | 
			
		||||
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Guns.pk3"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Set up the pk3 and wad files 
 | 
			
		||||
gameOption=(
 | 
			
		||||
    "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
 | 
			
		||||
    "${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
 | 
			
		||||
    ${addons[@]}
 | 
			
		||||
    "${doomPath}/PB-Toby-Compatibility-Addon.pk3"
 | 
			
		||||
    "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
 | 
			
		||||
    "${doomPath}/OpMDK.wad"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Check for and include if present a wad. Some people may not have it.
 | 
			
		||||
if [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
 | 
			
		||||
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
 | 
			
		||||
    gameOption+=("${doomPath}/DoomMetalVol7.wad")
 | 
			
		||||
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
 | 
			
		||||
    gameOption+=("${doomPath}/DoomMetalVol6.wad")
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Extend the search for new messages to be read.
 | 
			
		||||
grepStrings+=('-e' 'New PDA Entry:'
 | 
			
		||||
    '-e' '^\*\*\* Brutality Bonus awarded!'
 | 
			
		||||
    '-e' ' died.'
 | 
			
		||||
    '-e' 'Ectoplasmic Surge!'
 | 
			
		||||
    '-e' '^Game Saved.'
 | 
			
		||||
    '-e' ' has been '
 | 
			
		||||
    '-e' '^(Armor|Health) boosted!'
 | 
			
		||||
    '-e' 'Lesser demon energy'
 | 
			
		||||
    '-e' '^Found '
 | 
			
		||||
    '-e' 'Got the '
 | 
			
		||||
    '-e' '^\([^?]*\)\(was\)\([^?]*\)$'
 | 
			
		||||
    '-e' 'Picked up '
 | 
			
		||||
    '-e' '^(Mega|Soul)sphere$'
 | 
			
		||||
    '-e' '^Took '
 | 
			
		||||
    '-e' ' was .*(\.|!)'
 | 
			
		||||
    '-e' '^Vanguard of the gods!$'
 | 
			
		||||
    '-e' "You've found "
 | 
			
		||||
    '-e' 'Slot ')
 | 
			
		||||
    '-e' 'You (collected|got|found|picked up) ')
 | 
			
		||||
 | 
			
		||||
antiGrepStrings+=('-e' 'key card'
 | 
			
		||||
    '-e' ' was .*\?'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										51
									
								
								.scripts/TobyCustom/Project_Brutality_Operation_MDK.sh.bak
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										51
									
								
								.scripts/TobyCustom/Project_Brutality_Operation_MDK.sh.bak
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# Set the current path to the Doom path required by some OS.
 | 
			
		||||
pushd "${doomPath}"
 | 
			
		||||
 | 
			
		||||
# Add all the TobyDoom stuff we need, exclude things we do not.
 | 
			
		||||
# mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
 | 
			
		||||
    #-not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
 | 
			
		||||
    #-not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3" \
 | 
			
		||||
    #-not -iname "TobyV${tobyVersion%%-*}_Guns.pk3"
 | 
			
		||||
#)
 | 
			
		||||
 | 
			
		||||
# Set up the pk3 and wad files 
 | 
			
		||||
gameOption=(
 | 
			
		||||
    "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
 | 
			
		||||
    "${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
 | 
			
		||||
    ${addons[@]}
 | 
			
		||||
    "${doomPath}/PB-Toby-Compatibility-Addon.pk3"
 | 
			
		||||
    "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
 | 
			
		||||
    "${doomPath}/OpMDK.wad"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Check for and include if present a wad. Some people may not have it.
 | 
			
		||||
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
 | 
			
		||||
    gameOption+=("${doomPath}/DoomMetalVol7.wad")
 | 
			
		||||
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
 | 
			
		||||
    gameOption+=("${doomPath}/DoomMetalVol6.wad")
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Extend the search for new messages to be read.
 | 
			
		||||
grepStrings+=('-e' 'New PDA Entry:'
 | 
			
		||||
    '-e' ' died.'
 | 
			
		||||
    '-e' 'Ectoplasmic Surge!'
 | 
			
		||||
    '-e' ' has been '
 | 
			
		||||
    '-e' '^(Armor|Health) boosted!'
 | 
			
		||||
    '-e' 'Lesser demon energy'
 | 
			
		||||
    '-e' '^Found '
 | 
			
		||||
    '-e' 'Got the '
 | 
			
		||||
    '-e' 'Picked up '
 | 
			
		||||
    '-e' '^(Mega|Soul)sphere$'
 | 
			
		||||
    '-e' '^Took '
 | 
			
		||||
    '-e' '^\([^?]*\)\(was\)\([^?]*\)$'
 | 
			
		||||
    '-e' '^Vanguard of the gods!$'
 | 
			
		||||
    '-e' "You've found "
 | 
			
		||||
    '-e' 'You (collected|got|found|picked up) ')
 | 
			
		||||
 | 
			
		||||
antiGrepStrings+=('-e' 'key card')
 | 
			
		||||
 | 
			
		||||
# 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
 | 
			
		||||
@@ -3,36 +3,42 @@
 | 
			
		||||
# Set the current path to the Doom path required by some OS.
 | 
			
		||||
pushd "${doomPath}"
 | 
			
		||||
 | 
			
		||||
# Add all the TobyDoom stuff we need, exclude things we do not.
 | 
			
		||||
mapfile -t addons < <(find "${doomPath}/Addons/" -type f -iname "TobyV${tobyVersion%%-*}_*" \
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Decorations.pk3" \
 | 
			
		||||
    -not -iname "TobyV${tobyVersion%%-*}_Monsters.pk3"
 | 
			
		||||
)
 | 
			
		||||
                                                                                                                                                                          
 | 
			
		||||
# Set up the pk3 and wad files
 | 
			
		||||
# Set up the pk3 and wad files 
 | 
			
		||||
gameOption=(
 | 
			
		||||
    "$(find /usr/share/games/ -name 'Project_Brutality-master.pk3')"
 | 
			
		||||
    "${doomPath}/TobyAccMod_V${tobyVersion}.pk3"
 | 
			
		||||
    ${addons[@]}
 | 
			
		||||
    "${doomPath}/PB-Toby-Compatibility-Addon.pk3"
 | 
			
		||||
    "${doomPath}/Toby-Universal-Pickup-Beacon-Prototype.pk3"
 | 
			
		||||
    "${doomPath}/TobyDoomLevels.wad"
 | 
			
		||||
)
 | 
			
		||||
                                                                                                                                                                          
 | 
			
		||||
 | 
			
		||||
# Check for and include if present a wad. Some people may not have it.
 | 
			
		||||
if [[ -e "${doomPath}/DoomMetalVol7.wad" ]]; then
 | 
			
		||||
    gameOption+=" DoomMetalVol7.wad"
 | 
			
		||||
    gameOption+=("${doomPath}/DoomMetalVol7.wad")
 | 
			
		||||
elif [[ -e "${doomPath}/DoomMetalVol6.wad" ]]; then
 | 
			
		||||
    gameOption+=" DoomMetalVol6.wad"
 | 
			
		||||
    gameOption+=("${doomPath}/DoomMetalVol6.wad")
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Extend the search for new messages to be read.
 | 
			
		||||
grepStrings+=('-e' 'New PDA Entry:'
 | 
			
		||||
    '-e' '^\*\*\* Brutality Bonus awarded!'
 | 
			
		||||
    '-e' ' died.'
 | 
			
		||||
    '-e' 'Ectoplasmic Surge!'
 | 
			
		||||
    '-e' '^Game Saved.'
 | 
			
		||||
    '-e' ' has been '
 | 
			
		||||
    '-e' '^(Armor|Health) boosted!'
 | 
			
		||||
    '-e' 'Lesser demon energy'
 | 
			
		||||
    '-e' '^Found '
 | 
			
		||||
    '-e' 'Got the '
 | 
			
		||||
    '-e' '^\([^?]*\)\(was\)\([^?]*\)$'
 | 
			
		||||
    '-e' 'Picked up '
 | 
			
		||||
    '-e' '^(Mega|Soul)sphere$'
 | 
			
		||||
    '-e' '^Took '
 | 
			
		||||
    '-e' ' was .*(\.|!)'
 | 
			
		||||
    '-e' '^Vanguard of the gods!$'
 | 
			
		||||
    '-e' "You've found "
 | 
			
		||||
    '-e' 'Slot ')
 | 
			
		||||
    '-e' 'You (collected|got|found|picked up) ')
 | 
			
		||||
 | 
			
		||||
antiGrepStrings+=('-e' 'key card')
 | 
			
		||||
 | 
			
		||||
# 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.
 | 
			
		||||
 
 | 
			
		||||
@@ -27,6 +27,7 @@ grepStrings+=('-e' 'New PDA Entry:'
 | 
			
		||||
    '-e' ' died.'
 | 
			
		||||
    '-e' ' has been '
 | 
			
		||||
    '-e' 'Lesser demon energy'
 | 
			
		||||
    '-e' '^\([^?]*\)\(was\)\([^?]*\)$'
 | 
			
		||||
    '-e' 'Got the '
 | 
			
		||||
    '-e' "You've found "
 | 
			
		||||
    '-e' 'Slot ')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user