Compare commits
7 Commits
c9f9e66c7c
...
96fc322d6e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96fc322d6e | ||
|
|
f1e197729a | ||
|
|
5ac894a6ec | ||
|
|
d906292d5e | ||
|
|
e9ca4f02e0 | ||
|
|
34c42fa55c | ||
|
|
1c9d1127d1 |
@@ -23,7 +23,7 @@
|
||||
# Update version number here for new releases of Toby Doom Accessibility Mod
|
||||
# Example: 8.0 for version 8.0, 8.5 for version 8.5, etc
|
||||
|
||||
TOBY_VERSION_NUMBER = 8.0
|
||||
TOBY_VERSION_NUMBER = 9.0
|
||||
|
||||
# DO NOT EDIT ANYTHING BELOW THIS LINE!
|
||||
# ===================================
|
||||
@@ -903,6 +903,7 @@ class DoomLauncher(QMainWindow):
|
||||
"""Main launcher window for Toby Doom"""
|
||||
|
||||
deathmatchMaps = [
|
||||
"lobby",
|
||||
"Com Station (2-4 players)",
|
||||
"Warehouse (2-4 players)",
|
||||
"Sector 3 (2-4 players)",
|
||||
@@ -1347,28 +1348,27 @@ class DoomLauncher(QMainWindow):
|
||||
if dialog.exec():
|
||||
values = dialog.get_dialog_values()
|
||||
|
||||
# Set up game files
|
||||
gameFiles = [
|
||||
str(self.gamePath / f"TobyAccMod_V{self.tobyVersion}.pk3")
|
||||
]
|
||||
|
||||
# Add menu addons
|
||||
menuPath = self.gamePath / "Addons/MENU"
|
||||
if menuPath.exists():
|
||||
gameFiles.extend(str(p) for p in menuPath.glob("Toby*.pk3"))
|
||||
|
||||
# Add selected mod
|
||||
gameFiles.append(selectedMod)
|
||||
# Get base game files (includes TobyAccMod and all addons)
|
||||
gameFiles = self.get_selected_game_files()
|
||||
|
||||
# Note: selectedMod is already included in base game files via get_selected_game_files()
|
||||
|
||||
# Add deathmatch map only if checkbox is checked
|
||||
if values.get('use_toby_maps', True):
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V1-5.wad")
|
||||
# Add bot spawner menu
|
||||
botSpawnerMenu = str(self.gamePath / "Addons/MENU/TobyBotSpawnerMenu.pk3")
|
||||
if Path(botSpawnerMenu).exists():
|
||||
gameFiles.append(botSpawnerMenu)
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V2-0.wad")
|
||||
if Path(deathMatchMap).exists():
|
||||
gameFiles.append(deathMatchMap)
|
||||
|
||||
# Get deathmatch flags and add map selection
|
||||
gameFlags = self.get_deathmatch_flags(values)
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
if selectedMap.lower() == "lobby":
|
||||
gameFlags.extend(["+map", "lobby"])
|
||||
else:
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
|
||||
# Check/set freedm.wad as IWAD
|
||||
freedmPath = self.find_freedm()
|
||||
@@ -1459,8 +1459,10 @@ class DoomLauncher(QMainWindow):
|
||||
mapFiles = ["None"] # Start with None option
|
||||
mapsDir = self.gamePath / "Addons/MAPS"
|
||||
if mapsDir.exists():
|
||||
mapFiles.extend([p.name for p in mapsDir.glob("*.wad")
|
||||
if p.name != "TobyDeathArena_V1-5.wad"])
|
||||
# Include both .wad and .pk3 files for maps
|
||||
for extension in ["*.wad", "*.pk3"]:
|
||||
mapFiles.extend([p.name for p in mapsDir.glob(extension)
|
||||
if p.name not in ["TobyDeathArena_V2-0.wad"]])
|
||||
|
||||
# Add Operation MDK as special case
|
||||
opMDK = self.gamePath / "OpMDK.wad"
|
||||
@@ -1496,7 +1498,7 @@ class DoomLauncher(QMainWindow):
|
||||
if Path(mapPath).exists():
|
||||
gameFiles.append(mapPath)
|
||||
|
||||
if selectedMap == "TobyDoomLevels.wad":
|
||||
if selectedMap == "TobyDoomLevels.pk3":
|
||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||
if musicRenamer.exists():
|
||||
gameFiles.append(str(musicRenamer))
|
||||
@@ -1524,11 +1526,12 @@ class DoomLauncher(QMainWindow):
|
||||
if fullPath.exists():
|
||||
gameFiles.append(str(fullPath))
|
||||
|
||||
# Add optional files last
|
||||
# Add optional files last (only first one found, for priority)
|
||||
for optFile in config.get('optional_files', []):
|
||||
optPath = self.gamePath / optFile
|
||||
if optPath.exists():
|
||||
gameFiles.append(str(optPath))
|
||||
break # Only add the first optional file found
|
||||
|
||||
# Get any custom flags
|
||||
gameFlags = config.get('flags', [])
|
||||
@@ -1762,6 +1765,19 @@ class DoomLauncher(QMainWindow):
|
||||
mainLayout.addWidget(QLabel("Narration Style:"))
|
||||
mainLayout.addWidget(self.narrationCombo)
|
||||
|
||||
# Speech method selection (only show when TTS is enabled)
|
||||
self.speechMethodCombo = AccessibleComboBox(self)
|
||||
self.speechMethodCombo.setAccessibleName("Speech Method")
|
||||
self.populate_speech_methods()
|
||||
self.speechMethodCombo.currentTextChanged.connect(self.speech_method_changed)
|
||||
|
||||
self.speechMethodLabel = QLabel("Speech Method:")
|
||||
mainLayout.addWidget(self.speechMethodLabel)
|
||||
mainLayout.addWidget(self.speechMethodCombo)
|
||||
|
||||
# Show/hide speech method based on current narration type
|
||||
self.update_speech_method_visibility()
|
||||
|
||||
# Create button layouts with pairs of launch and generate buttons
|
||||
# Single Player
|
||||
singlePlayerLayout = QHBoxLayout()
|
||||
@@ -1907,12 +1923,125 @@ class DoomLauncher(QMainWindow):
|
||||
else:
|
||||
# Update speech handler state directly
|
||||
self.speechHandler.set_tts_state(value == 2)
|
||||
# Update speech method visibility
|
||||
self.update_speech_method_visibility()
|
||||
|
||||
def detect_available_speech_providers(self):
|
||||
"""Detect which speech providers are available on the current platform"""
|
||||
available_providers = []
|
||||
|
||||
if platform.system() == "Windows":
|
||||
# On Windows, only accessible_output2 is used
|
||||
try:
|
||||
import accessible_output2.outputs.auto
|
||||
available_providers.append("accessible_output2")
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
# On Linux, check each provider
|
||||
# Check Orca remote controller
|
||||
orca_remote = OrcaRemoteController()
|
||||
if orca_remote.available:
|
||||
available_providers.append("orca_remote")
|
||||
|
||||
# Check Cthulhu
|
||||
try:
|
||||
subprocess.check_output(["pgrep", "cthulhu"])
|
||||
available_providers.append("cthulhu")
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
pass
|
||||
|
||||
# Check accessible_output2
|
||||
try:
|
||||
import accessible_output2.outputs.auto
|
||||
available_providers.append("accessible_output2")
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
# Check speechd
|
||||
try:
|
||||
import speechd
|
||||
available_providers.append("speechd")
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
return available_providers
|
||||
|
||||
def populate_speech_methods(self):
|
||||
"""Populate the speech method combobox with available providers"""
|
||||
available_providers = self.detect_available_speech_providers()
|
||||
|
||||
# Map internal names to user-friendly names
|
||||
provider_names = {
|
||||
"accessible_output2": "Accessible Output2",
|
||||
"orca_remote": "Orca Remote",
|
||||
"cthulhu": "Cthulhu",
|
||||
"speechd": "Speech Dispatcher"
|
||||
}
|
||||
|
||||
self.speechMethodCombo.clear()
|
||||
for provider in available_providers:
|
||||
friendly_name = provider_names.get(provider, provider)
|
||||
self.speechMethodCombo.addItem(friendly_name, provider)
|
||||
|
||||
# Set current selection based on global speech provider
|
||||
current_provider = self.get_current_speech_provider()
|
||||
for i in range(self.speechMethodCombo.count()):
|
||||
if self.speechMethodCombo.itemData(i) == current_provider:
|
||||
self.speechMethodCombo.setCurrentIndex(i)
|
||||
break
|
||||
|
||||
def get_current_speech_provider(self):
|
||||
"""Get the current speech provider being used globally"""
|
||||
global speechProvider
|
||||
return speechProvider
|
||||
|
||||
def update_speech_method_visibility(self):
|
||||
"""Show/hide speech method combobox based on narration type"""
|
||||
is_tts = self.get_narration_type() == 2
|
||||
self.speechMethodLabel.setVisible(is_tts)
|
||||
self.speechMethodCombo.setVisible(is_tts)
|
||||
|
||||
def speech_method_changed(self, text: str):
|
||||
"""Handle speech method combobox changes"""
|
||||
selected_provider = self.speechMethodCombo.currentData()
|
||||
if selected_provider:
|
||||
self.set_speech_provider(selected_provider)
|
||||
|
||||
def set_speech_provider(self, provider: str):
|
||||
"""Update the global speech provider"""
|
||||
global speechProvider, s, spd, orca
|
||||
|
||||
try:
|
||||
if provider == "accessible_output2":
|
||||
import accessible_output2.outputs.auto
|
||||
s = accessible_output2.outputs.auto.Auto()
|
||||
speechProvider = "accessible_output2"
|
||||
elif provider == "orca_remote":
|
||||
orca_remote = OrcaRemoteController()
|
||||
if orca_remote.available:
|
||||
orca = orca_remote
|
||||
speechProvider = "orca_remote"
|
||||
else:
|
||||
QMessageBox.warning(self, "Error", "Orca Remote is not available")
|
||||
return
|
||||
elif provider == "cthulhu":
|
||||
try:
|
||||
subprocess.check_output(["pgrep", "cthulhu"])
|
||||
speechProvider = "cthulhu"
|
||||
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||
QMessageBox.warning(self, "Error", "Cthulhu is not running")
|
||||
return
|
||||
elif provider == "speechd":
|
||||
import speechd
|
||||
spd = speechd.Client()
|
||||
speechProvider = "speechd"
|
||||
except Exception as e:
|
||||
QMessageBox.warning(self, "Error", f"Failed to initialize {provider}: {e}")
|
||||
|
||||
def populate_game_list(self):
|
||||
"""Populate the game selection combo box"""
|
||||
gameList = [
|
||||
"Toby Demo Map",
|
||||
"Funny Pack - Demo Map",
|
||||
"Classic Doom",
|
||||
"Funny Pack - Classic Doom",
|
||||
"Toby Doom",
|
||||
@@ -1960,28 +2089,54 @@ class DoomLauncher(QMainWindow):
|
||||
use_funny_pack: Whether to use the Funny Pack instead of normal monsters
|
||||
"""
|
||||
addonFiles = []
|
||||
# MENU addons are common to all games
|
||||
menuPath = self.gamePath / "Addons" / "MENU"
|
||||
if menuPath.exists():
|
||||
addonFiles.extend(str(p) for p in menuPath.glob("Toby*.pk3"))
|
||||
|
||||
# Game specific addons
|
||||
|
||||
# Game specific addons first (following bat file order)
|
||||
gamePath = self.gamePath / "Addons" / game_type
|
||||
if gamePath.exists():
|
||||
if game_type == "HERETIC":
|
||||
pattern = "TobyHeretic*.pk3"
|
||||
addonFiles.extend(str(p) for p in gamePath.glob(pattern))
|
||||
heretic_addons = [
|
||||
"TobyHereticWeaponsV8.pk3",
|
||||
"TobyHereticMonsters.pk3",
|
||||
"TobyHereticItemsV8.pk3",
|
||||
"TobyHereticDecorations.pk3",
|
||||
"TobyHereticMenu.wad",
|
||||
"TobyHereticBeacons.pk3"
|
||||
]
|
||||
|
||||
for addon in heretic_addons:
|
||||
addon_path = gamePath / addon
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
|
||||
elif game_type == "HEXEN":
|
||||
pattern = "TobyHexen*.pk3"
|
||||
addonFiles.extend(str(p) for p in gamePath.glob(pattern))
|
||||
hexen_addons = [
|
||||
"TobyHexenWeapons.pk3",
|
||||
"TobyHexenMonsters.pk3",
|
||||
"TobyHexenItems.pk3",
|
||||
"TobyHexenDecorations.pk3",
|
||||
"TobyHexenMenu.wad"
|
||||
]
|
||||
|
||||
for addon in hexen_addons:
|
||||
addon_path = gamePath / addon
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
else: # DOOM
|
||||
# Add normal Doom addons (but skip monster packs if using Funny Pack)
|
||||
# Add Doom addons in specific order matching bat file
|
||||
doom_addons = [
|
||||
"TobyV8_Guns.pk3",
|
||||
"TobyV7_Monsters.pk3" if not use_funny_pack else None,
|
||||
"TobyV8_Pickups.pk3",
|
||||
"TobyV8_Decorations.pk3"
|
||||
]
|
||||
|
||||
for addon in doom_addons:
|
||||
if addon:
|
||||
addon_path = gamePath / addon
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
|
||||
if use_funny_pack:
|
||||
# Only add non-monster Doom addons
|
||||
for pk3Path in gamePath.glob("Toby*.pk3"):
|
||||
if "Monsters" not in pk3Path.name:
|
||||
addonFiles.append(str(pk3Path))
|
||||
|
||||
# Look for Funny Pack in the APRIL folder
|
||||
aprilPath = self.gamePath / "Addons" / "APRIL"
|
||||
funnyPackPath = aprilPath / "Toby_Funny_Pack.pk3"
|
||||
@@ -1995,10 +2150,20 @@ class DoomLauncher(QMainWindow):
|
||||
"Funny Pack Missing",
|
||||
f"Toby_Funny_Pack.pk3 not found in {aprilPath}. Please make sure it's installed correctly in the Addons/APRIL folder."
|
||||
)
|
||||
else:
|
||||
# Normal behavior for non-Funny Pack games
|
||||
pattern = "Toby*.pk3"
|
||||
addonFiles.extend(str(p) for p in gamePath.glob(pattern))
|
||||
|
||||
# MENU addons after game addons (following bat file order)
|
||||
menuPath = self.gamePath / "Addons" / "MENU"
|
||||
if menuPath.exists():
|
||||
# Add menu files in order
|
||||
menu_addons = [
|
||||
"TobyV9_SimpleMenu.pk3",
|
||||
f"TobySoundDirectory_{game_type}.pk3"
|
||||
]
|
||||
|
||||
for addon in menu_addons:
|
||||
addon_path = menuPath / addon
|
||||
if addon_path.exists():
|
||||
addonFiles.append(str(addon_path))
|
||||
|
||||
return addonFiles
|
||||
|
||||
@@ -2015,34 +2180,45 @@ class DoomLauncher(QMainWindow):
|
||||
# Determine game type and get corresponding addons
|
||||
if "Heretic" in selectedGame:
|
||||
gameType = "HERETIC"
|
||||
elif "Hexen" in selectedGame:
|
||||
gameType = "HEXEN"
|
||||
else: # Doom games
|
||||
gameType = "DOOM"
|
||||
|
||||
# Get game-specific addons first (following bat file order)
|
||||
baseFiles.extend(self.get_addon_files(gameType, isFunnyPack))
|
||||
|
||||
# Then add maps and other game-specific files
|
||||
if "Heretic" in selectedGame:
|
||||
if "Toby Heretic" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyHereticLevels.wad"))
|
||||
elif "Hexen" in selectedGame:
|
||||
gameType = "HEXEN"
|
||||
if "Toby Hexen" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyHexen.pk3"))
|
||||
else: # Doom games
|
||||
gameType = "DOOM"
|
||||
if "Demo Map" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/Toby-Demo-Level.wad"))
|
||||
elif "Toby Doom" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyDoomLevels.wad"))
|
||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||
if musicRenamer.exists() and not isFunnyPack:
|
||||
baseFiles.append(str(musicRenamer))
|
||||
elif "OperationMDK" in selectedGame:
|
||||
if "OperationMDK" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "OpMDK.wad"))
|
||||
|
||||
if not isFunnyPack:
|
||||
metalV7 = self.gamePath / "DoomMetalVol7.wad"
|
||||
metalV6 = self.gamePath / "DoomMetalVol6.wad"
|
||||
if metalV7.exists():
|
||||
baseFiles.append(str(metalV7))
|
||||
elif metalV6.exists():
|
||||
baseFiles.append(str(metalV6))
|
||||
if "Toby Doom" in selectedGame:
|
||||
baseFiles.append(str(self.gamePath / "Addons/MAPS/TobyDoomLevels.pk3"))
|
||||
|
||||
# Add music files at the end for Doom games
|
||||
if gameType == "DOOM" and not isFunnyPack:
|
||||
metalV10 = self.gamePath / "DOOM Metal X IDKFA Soundtrack.pk3"
|
||||
metalV7 = self.gamePath / "DoomMetalVol7.wad"
|
||||
metalV6 = self.gamePath / "DoomMetalVol6.wad"
|
||||
if metalV10.exists():
|
||||
baseFiles.append(str(metalV10))
|
||||
elif metalV7.exists():
|
||||
baseFiles.append(str(metalV7))
|
||||
elif metalV6.exists():
|
||||
baseFiles.append(str(metalV6))
|
||||
|
||||
if "Toby Doom" in selectedGame:
|
||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||
if musicRenamer.exists():
|
||||
baseFiles.append(str(musicRenamer))
|
||||
|
||||
# Get game-specific addons (but we'll modify if it's Funny Pack)
|
||||
baseFiles.extend(self.get_addon_files(gameType, isFunnyPack))
|
||||
return baseFiles
|
||||
|
||||
def show_custom_deathmatch_dialog(self):
|
||||
@@ -2149,28 +2325,27 @@ class DoomLauncher(QMainWindow):
|
||||
if dialog.exec():
|
||||
values = dialog.get_dialog_values()
|
||||
|
||||
# Set up game files
|
||||
gameFiles = [
|
||||
str(self.gamePath / f"TobyAccMod_V{self.tobyVersion}.pk3")
|
||||
]
|
||||
|
||||
# Add menu addons
|
||||
menuPath = self.gamePath / "Addons/MENU"
|
||||
if menuPath.exists():
|
||||
gameFiles.extend(str(p) for p in menuPath.glob("Toby*.pk3"))
|
||||
|
||||
# Add selected mod
|
||||
gameFiles.append(selectedMod)
|
||||
# Get base game files (includes TobyAccMod and all addons)
|
||||
gameFiles = self.get_selected_game_files()
|
||||
|
||||
# Note: selectedMod is already included in base game files via get_selected_game_files()
|
||||
|
||||
# Add deathmatch map only if checkbox is checked
|
||||
if values.get('use_toby_maps', True):
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V1-5.wad")
|
||||
# Add bot spawner menu
|
||||
botSpawnerMenu = str(self.gamePath / "Addons/MENU/TobyBotSpawnerMenu.pk3")
|
||||
if Path(botSpawnerMenu).exists():
|
||||
gameFiles.append(botSpawnerMenu)
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V2-0.wad")
|
||||
if Path(deathMatchMap).exists():
|
||||
gameFiles.append(deathMatchMap)
|
||||
|
||||
# Get deathmatch flags and add map selection
|
||||
gameFlags = self.get_deathmatch_flags(values)
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
if selectedMap.lower() == "lobby":
|
||||
gameFlags.extend(["+map", "lobby"])
|
||||
else:
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
|
||||
# Check/set freedm.wad as IWAD
|
||||
freedmPath = self.find_freedm()
|
||||
@@ -2288,8 +2463,10 @@ class DoomLauncher(QMainWindow):
|
||||
mapFiles = ["None"] # Start with None option
|
||||
mapsDir = self.gamePath / "Addons/MAPS"
|
||||
if mapsDir.exists():
|
||||
mapFiles.extend([p.name for p in mapsDir.glob("*.wad")
|
||||
if p.name != "TobyDeathArena_V1-5.wad"])
|
||||
# Include both .wad and .pk3 files for maps
|
||||
for extension in ["*.wad", "*.pk3"]:
|
||||
mapFiles.extend([p.name for p in mapsDir.glob(extension)
|
||||
if p.name not in ["TobyDeathArena_V2-0.wad"]])
|
||||
|
||||
# Add Operation MDK as special case
|
||||
opMDK = self.gamePath / "OpMDK.wad"
|
||||
@@ -2339,7 +2516,7 @@ class DoomLauncher(QMainWindow):
|
||||
if Path(mapPath).exists():
|
||||
gameFiles.append(mapPath)
|
||||
|
||||
if selectedMap == "TobyDoomLevels.wad":
|
||||
if selectedMap == "TobyDoomLevels.pk3":
|
||||
musicRenamer = self.gamePath / "Toby-Doom-Level-Music-Renamer.pk3"
|
||||
if musicRenamer.exists():
|
||||
gameFiles.append(str(musicRenamer))
|
||||
@@ -2369,11 +2546,12 @@ class DoomLauncher(QMainWindow):
|
||||
if fullPath.exists():
|
||||
gameFiles.append(str(fullPath))
|
||||
|
||||
# Add optional files last
|
||||
# Add optional files last (only first one found, for priority)
|
||||
for optFile in config.get('optional_files', []):
|
||||
optPath = self.gamePath / optFile
|
||||
if optPath.exists():
|
||||
gameFiles.append(str(optPath))
|
||||
break # Only add the first optional file found
|
||||
|
||||
# Get any custom flags
|
||||
gameFlags = config.get('flags', [])
|
||||
@@ -2536,13 +2714,20 @@ class DoomLauncher(QMainWindow):
|
||||
|
||||
# Add deathmatch map only if checkbox is checked
|
||||
if values.get('use_toby_maps', True):
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V1-5.wad")
|
||||
# Add bot spawner menu
|
||||
botSpawnerMenu = str(self.gamePath / "Addons/MENU/TobyBotSpawnerMenu.pk3")
|
||||
if Path(botSpawnerMenu).exists():
|
||||
gameFiles.append(botSpawnerMenu)
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V2-0.wad")
|
||||
if Path(deathMatchMap).exists():
|
||||
gameFiles.append(deathMatchMap)
|
||||
|
||||
gameFlags = self.get_deathmatch_flags(values)
|
||||
# Add map selection flag
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
if selectedMap.lower() == "lobby":
|
||||
gameFlags.extend(["+map", "lobby"])
|
||||
else:
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
|
||||
# Check/set freedm.wad as IWAD
|
||||
freedmPath = self.find_freedm()
|
||||
@@ -2630,14 +2815,21 @@ class DoomLauncher(QMainWindow):
|
||||
|
||||
# Add deathmatch map only if checkbox is checked
|
||||
if values.get('use_toby_maps', True):
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V1-5.wad")
|
||||
# Add bot spawner menu
|
||||
botSpawnerMenu = str(self.gamePath / "Addons/MENU/TobyBotSpawnerMenu.pk3")
|
||||
if Path(botSpawnerMenu).exists():
|
||||
gameFiles.append(botSpawnerMenu)
|
||||
deathMatchMap = str(self.gamePath / "Addons/MAPS/TobyDeathArena_V2-0.wad")
|
||||
if Path(deathMatchMap).exists():
|
||||
gameFiles.append(deathMatchMap)
|
||||
|
||||
gameFlags = self.get_deathmatch_flags(values)
|
||||
|
||||
# Add map selection flag
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
if selectedMap.lower() == "lobby":
|
||||
gameFlags.extend(["+map", "lobby"])
|
||||
else:
|
||||
gameFlags.extend(["-warp", str(mapIndex)])
|
||||
|
||||
# Check/set freedm.wad as IWAD
|
||||
freedmPath = self.find_freedm()
|
||||
|
||||
124
TobyCustom/'
124
TobyCustom/'
@@ -1,124 +0,0 @@
|
||||
#!/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
|
||||
@@ -14,6 +14,7 @@
|
||||
"aoddoom1.wad"
|
||||
],
|
||||
"optional_files": [
|
||||
"DOOM Metal X IDKFA Soundtrack.pk3",
|
||||
"DoomMetalVol7.wad",
|
||||
"DoomMetalVol6.wad"
|
||||
],
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"DoomguyVsTheDaleks_V1.1.wad"
|
||||
],
|
||||
"optional_files": [
|
||||
"DOOM Metal X IDKFA Soundtrack.pk3",
|
||||
"DoomMetalVol7.wad",
|
||||
"DoomMetalVol6.wad"
|
||||
],
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"Project_Brutality.pk3"
|
||||
],
|
||||
"optional_files": [
|
||||
"DOOM Metal X IDKFA Soundtrack.pk3",
|
||||
"DoomMetalVol7.wad",
|
||||
"DoomMetalVol6.wad"
|
||||
],
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
"Project_Brutality-Latest.pk3"
|
||||
],
|
||||
"optional_files": [
|
||||
"DOOM Metal X IDKFA Soundtrack.pk3",
|
||||
"DoomMetalVol7.wad",
|
||||
"DoomMetalVol6.wad"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user