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

[DRAFT] Manual Reloading and Autoswitch Settings #366

Draft
wants to merge 4 commits into
base: port
Choose a base branch
from

Conversation

tunbridgep
Copy link

@tunbridgep tunbridgep commented Jan 26, 2024

This is designed to address #363.

This is my first major open source contribution, please be gentle.

This currently adds 3 new gameplay options:
image

  1. No Auto Weapon Switch. This stops automatically switching to a different weapon when you completely run out of ammo with a given weapon.
  2. No Auto Reloading. This prevents the game from automatically reloading your weapon once your current clip is empty.
  3. No Backpack Reloading. This prevents the game from automatically reloading weapons that are in your backpack. They should remember their existing ammo count.

Current Status:

  1. No Auto Weapon Switch. Completed
  2. No Auto Reloading. Completed.
  3. No Backpack Reloading. Not Started. I don't know how to realistically approach this. I know the Shotgun etc store their current ammo value, but I don't know how to extend it to every weapon or make it generic. I don't even know if that would be viable to do. I can remove this part of the feature request if it turns out to either be too difficult, or out of scope for the project.

@tunbridgep
Copy link
Author

tunbridgep commented Jan 26, 2024

Just a comment on this: Now that we have this, plus the potential FOV change (#96), plus the menu pausing feature (#358), it possibly doesn't make sense to put everything in the "Extended/Player %d/Game" options menu, as these settings are global gameplay settings, they aren't dependent on the individual players.

Proposal: What if there was a global "Gameplay Enhancements" menu in the Extended menu, which housed all the big gameplay change stuff - menu pausing, auto reloading, etc - that affects the whole game, so we don't clutter the per-user gameplay settings (crosshair colour etc).

How are these sorts of gameplay modifiers going to affect networked games?

@tunbridgep tunbridgep marked this pull request as ready for review January 26, 2024 11:14
@tunbridgep tunbridgep marked this pull request as draft January 26, 2024 11:15
@fgsfdsfgs
Copy link
Owner

fgsfdsfgs commented Jan 26, 2024

Yeah, there should be a "gameplay settings" or "compatibility settings" menu like in Doom source ports. With toggles for stuff like this. They can be synced in netgames in theory to host's settings, though neither pauseless menus nor autoreloading really require any sync (menus are already pauseless in netgames and reloading is signaled when the actual reload happens regardless of what triggered it).

@tunbridgep
Copy link
Author

tunbridgep commented Jan 26, 2024

Thanks for the response. Would you be up to helping me with the "can't reload when empty" issue? I'm having some trouble understanding the code. Between the strange function names (presumably from the decompiler) and the very complex/convoluted logic, it's very hard to follow what's going on.

I don't even know where to start with the backpack thing.

though neither pauseless menus nor autoreloading really require any sync (menus are already pauseless in netgames and reloading is signaled when the actual reload happens regardless of what triggered it).

I would argue manual reloading makes the game harder, and could disadvantage a player, therefore it should be a synced server option. No Backpack Reloading DEFINITELY disadvantages a player.

@2023PerfectDark
Copy link

You also might want to look into being able to swap weapons while reloading for this too.

@cylonicboom
Copy link

This is designed to address #363.

This is my first major open source contribution, please be gentle.

This currently adds 3 new gameplay options: image

1. No Auto Weapon Switch. This stops automatically switching to a different weapon when you completely run out of ammo with a given weapon.

2. No Auto Reloading. This prevents the game from automatically reloading your weapon once your current clip is empty.

3. No Backpack Reloading. This prevents the game from automatically reloading weapons that are in your backpack. They should remember their existing ammo count.

Current Status:

1. No Auto Weapon Switch. **Completed**

2. No Auto Reloading. **Partially Completed**. Functionality is in, but there's currently an issue where you can't manually reload when your clip is completely empty. I need some help with this.

3. No Backpack Reloading. **Not Started**. I don't know how to realistically approach this. I know the Shotgun etc store their current ammo value, but I don't know how to extend it to every weapon or make it generic. I don't even know if that would be viable to do. I can remove this part of the feature request if it turns out to either be too difficult, or out of scope for the project.

nit: I've always heard it referred to as "quick reloading" but this is actually self-descriptive to people not super-versed in pd.

@tunbridgep
Copy link
Author

tunbridgep commented Jan 27, 2024

Okay, I have figured out the reloading issue. Please review the code and test. I may move the No Backpack Reloading thing to a different PR, since it seems like a much harder task.

I would REALLY like if people could test this, so I can clean it up and un-draft this.

@fgsfdsfgs would you like me to add a new Gameplay Settings menu in Extended as part of this PR, since this is the first thing that's likely going to use it?

@tunbridgep
Copy link
Author

Sorry, I kind of dropped the ball on this one.

I might finish it up and un-draft it in the next week or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants