Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

id Tech 1 games: Customizable ammo capacity #3565

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

KScl
Copy link
Contributor

@KScl KScl commented Jun 19, 2024

This is the AP counterpart to Daivuk/apdoom#18. Now that that commit has been merged in, this one is ready for review as well, as the client is now capable of handling the items added in this commit.

What is this fixing or adding?

Adds the following options to every id Tech 1 game:

  • split_backpack / split_bag_of_holding
    • In the Doom games, splits the Backpack into four separate capacity upgrade items, one for each ammo type.
    • In Heretic, splits the Bag of Holding into six separate capacity upgrade items, one for each ammo type.
  • backpack_count / bag_of_holding_count
    • Sets the amount of Backpacks or Bags of Holding that get added to the item pool, from 0 to 10.
    • These pickups now stack, so having multiple of them results in greater ammo capacity, up to a maximum of 999.
    • With the above option to split the Backpack or Bag of Holding, there will be this many copies of each capacity upgrade item.
  • max_ammo_(type)
    • Sets the maximum ammo you're allowed to carry for each ammo type at the start of the game.
    • Range varies, from the default starting value for that ammo type to a maximum of 999.
  • added_ammo_(type)
    • Sets the amount of ammo capacity gained from each Backpack, Bag of Holding, or capacity upgrade item.
    • Range varies, from 1/10th of the default ammo capacity value, to a maximum of 999.

Backpacks, Bags of Holding, and the new capacity upgrade items are now considered Useful instead of Progression. This has only changed logic for two extremely late game levels in Heretic (E5M8 and E5M9), which have had their logical Bag of Holding requirement removed. This was done because otherwise progression fill was really unhappy with the number of added Progression-marked items that don't actually give progression in any meaningful way.

How was this tested?

Many weeks of generation and playtesting, both locally and in sync games with friends.

@Daivuk
Copy link
Collaborator

Daivuk commented Jul 12, 2024

The changes in items.py and rules.py, did you made them directly here? Or did you use the tool to generate the files?
If you didn't use the tool, then next time we regenerate stuff it will override your changes.

@KScl
Copy link
Contributor Author

KScl commented Jul 13, 2024

They're all generated using ap_gen_tool; I make it a point not to modify the five python scripts it auto-generates directly, for precisely that reason.

@BadMagic100 BadMagic100 added the is: enhancement Issues requesting new features or pull requests implementing new features. label Jul 29, 2024
@ScipioWright ScipioWright added the waiting-on: other Issue/PR is waiting for something else, like another PR. label Aug 7, 2024
@Daivuk
Copy link
Collaborator

Daivuk commented Aug 9, 2024

All good from me

@KScl KScl marked this pull request as ready for review August 9, 2024 17:26
@ScipioWright ScipioWright added waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. and removed waiting-on: other Issue/PR is waiting for something else, like another PR. labels Aug 9, 2024
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants