id Tech Games: Customizable ammo capacity (#3565)

* Doom, Doom 2, Heretic: customizable ammo capacity

* Do not progression balance capacity up items

* Prog fill still doesn't agree, just go with our original idea

* Clean up the new options a bit

- Gave all options a consistent and easily readable naming scheme
  (`max_ammo_<type>` and `added_ammo_<type>`)
- Don't show the new options in the spoiler log,
  as they do not affect logic
- Fix the Doom games' Split Backpack option accidentally referring to
  Heretic's Bag of Holding

The logging change across all three games is incidental, as at some
point I did run into that condition by happenstance and it turns out
that it throws an exception due to bad formatting if it's reached

* Do the visibility change for Heretic as well

* Update required client version

* Remove spoiler log restriction on options

* Remove Visibility import now made redundant
This commit is contained in:
Kaito Sinclaire
2025-03-08 07:37:54 -08:00
committed by GitHub
parent 00a6ac3a52
commit b5269e9aa4
10 changed files with 469 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
import typing
from Options import PerGameCommonOptions, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool
from Options import PerGameCommonOptions, Range, Choice, Toggle, DeathLink, DefaultOnToggle, StartInventoryPool
from dataclasses import dataclass
@@ -136,6 +136,84 @@ class SecretLevels(Toggle):
display_name = "Secret Levels"
class SplitBackpack(Toggle):
"""Split the Backpack into four individual items, each one increasing ammo capacity for one type of weapon only."""
display_name = "Split Backpack"
class BackpackCount(Range):
"""How many Backpacks will be available.
If Split Backpack is set, this will be the number of each capacity upgrade available."""
display_name = "Backpack Count"
range_start = 0
range_end = 10
default = 1
class MaxAmmoBullets(Range):
"""Set the starting ammo capacity for bullets."""
display_name = "Max Ammo - Bullets"
range_start = 200
range_end = 999
default = 200
class MaxAmmoShells(Range):
"""Set the starting ammo capacity for shotgun shells."""
display_name = "Max Ammo - Shells"
range_start = 50
range_end = 999
default = 50
class MaxAmmoRockets(Range):
"""Set the starting ammo capacity for rockets."""
display_name = "Max Ammo - Rockets"
range_start = 50
range_end = 999
default = 50
class MaxAmmoEnergyCells(Range):
"""Set the starting ammo capacity for energy cells."""
display_name = "Max Ammo - Energy Cells"
range_start = 300
range_end = 999
default = 300
class AddedAmmoBullets(Range):
"""Set the amount of bullet capacity added when collecting a backpack or capacity upgrade."""
display_name = "Added Ammo - Bullets"
range_start = 20
range_end = 999
default = 200
class AddedAmmoShells(Range):
"""Set the amount of shotgun shell capacity added when collecting a backpack or capacity upgrade."""
display_name = "Added Ammo - Shells"
range_start = 5
range_end = 999
default = 50
class AddedAmmoRockets(Range):
"""Set the amount of rocket capacity added when collecting a backpack or capacity upgrade."""
display_name = "Added Ammo - Rockets"
range_start = 5
range_end = 999
default = 50
class AddedAmmoEnergyCells(Range):
"""Set the amount of energy cell capacity added when collecting a backpack or capacity upgrade."""
display_name = "Added Ammo - Energy Cells"
range_start = 30
range_end = 999
default = 300
@dataclass
class DOOM2Options(PerGameCommonOptions):
start_inventory_from_pool: StartInventoryPool
@@ -153,3 +231,14 @@ class DOOM2Options(PerGameCommonOptions):
episode2: Episode2
episode3: Episode3
episode4: SecretLevels
split_backpack: SplitBackpack
backpack_count: BackpackCount
max_ammo_bullets: MaxAmmoBullets
max_ammo_shells: MaxAmmoShells
max_ammo_rockets: MaxAmmoRockets
max_ammo_energy_cells: MaxAmmoEnergyCells
added_ammo_bullets: AddedAmmoBullets
added_ammo_shells: AddedAmmoShells
added_ammo_rockets: AddedAmmoRockets
added_ammo_energy_cells: AddedAmmoEnergyCells