-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Better Gas masks - Model concentration better, and make gas mask cartiges last longer #68570
Merged
Maleclypse
merged 13 commits into
CleverRaven:master
from
MorvarchPrincess:morvarch/improvegasmasklifespan
Oct 13, 2023
Merged
Better Gas masks - Model concentration better, and make gas mask cartiges last longer #68570
Maleclypse
merged 13 commits into
CleverRaven:master
from
MorvarchPrincess:morvarch/improvegasmasklifespan
Oct 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… as I can't get the intensity level
github-actions
bot
added
Game: Balance
Balancing of (existing) in-game features.
[JSON]
Changes (can be) made in JSON
[C++]
Changes (can be) made in C++. Previously named `Code`
Fields / Furniture / Terrain / Traps
Objects that are part of the map or its features.
labels
Oct 9, 2023
…in thick toxic gas
github-actions
bot
added
the
json-styled
JSON lint passed, label assigned by github actions
label
Oct 9, 2023
github-actions
bot
removed
the
json-styled
JSON lint passed, label assigned by github actions
label
Oct 9, 2023
github-actions
bot
added
the
json-styled
JSON lint passed, label assigned by github actions
label
Oct 9, 2023
github-actions
bot
added
<Documentation>
Design documents, internal info, guides and help.
[Markdown]
Markdown issues and PRs
labels
Oct 9, 2023
Add linting suggestions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions
bot
added
the
astyled
astyled PR, label is assigned by github actions
label
Oct 9, 2023
ZhilkinSerg
reviewed
Oct 9, 2023
github-actions
bot
removed
the
astyled
astyled PR, label is assigned by github actions
label
Oct 9, 2023
ehughsbaird
reviewed
Oct 9, 2023
…MorvarchPrincess/Cataclysm-DDA into morvarch/improvegasmasklifespan
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Oct 9, 2023
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions
bot
added
astyled
astyled PR, label is assigned by github actions
and removed
astyled
astyled PR, label is assigned by github actions
labels
Oct 9, 2023
detahramet
pushed a commit
to detahramet/Cataclysm-DDA
that referenced
this pull request
Nov 6, 2023
…iges last longer (CleverRaven#68570) * Some initial work on better modelling of gas mask usage, doesn't work as I can't get the intensity level * add absorbtion calculation * Modify calculation to make gas mask last 20 minutes from full charge in thick toxic gas * Add low gas charges warning * Change gas_absorption _factor to be a timescale * Fix loading of concentration * Add documentation * linting C++ code * Apply suggestions from code review Add linting suggestions Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Apply suggestions from code review * Better documentation clarity * Update src/iuse.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Zhilkin Serg <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
BasicBuildPassed
This PR builds correctly, label assigned by github actions
[C++]
Changes (can be) made in C++. Previously named `Code`
<Documentation>
Design documents, internal info, guides and help.
Fields / Furniture / Terrain / Traps
Objects that are part of the map or its features.
Game: Balance
Balancing of (existing) in-game features.
[JSON]
Changes (can be) made in JSON
json-styled
JSON lint passed, label assigned by github actions
[Markdown]
Markdown issues and PRs
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Balance "Gas mask cartriges last quite a bit longer, and lower concentration gas takes less charges"
Purpose of change
Per issue #68554, our gas masks last a really short amount of time. I considered just about tripling the gas mask charge costs to bring it in line with estimates mentioned in the issue, but decided it would be better to have a concentration calculation in the charge buildup.
Describe the solution
My aim is to have an additional entry for gasses that is "concentration" that acts as a multiplier on charges spent, so thick toxic gas burns through your charges quicker than thin gas. I'll then go adjust numbers for gasses so that thick toxic gas means your gas mask will last about 20 minutes, and less problematic substances (read normal smoke) arn't as bad.
I also switched how the gas_absorption_factor works, it's now no longer what percent of a charge it uses per tick, its now how long a full 100 charge filter lasts in a concentration 1 gas.
Finally I also added another little message to the player when their gas mask charges go under 10. IRL a gas mask gets harder to breathe in as the filter clogs up, so it made sense for players to get a warning as they are running out.
Describe alternatives you've considered
I could just not add concentration, which would just require adjusting the gas absorption numbers, but it would still leave light gasses to unrealistically burn through charges.
I also considered basing the multiplier on intensity, but that doesn't work great as that number is primarily used for the amount of effect, and as such the numbers don't line up (toxic gas and thick toxic gas have the same number at 4) and could get modified and cause unintentional changes to gas mask charges.
Finally, I could have left gas absorption values the same, but it ended up with some very messy calculations so I decided it was better to change how the system works to be more based on how we measure gas mask lifetime in real life.
Testing
Tested both manually and via walking through code.
I booted up the game and spawned a gas vent in a small building. then waited till the room filled up. I then both watched the calculation via stepping through code, and confirmed it was taking the appropriate amount of charges off by waiting in the cloud with a mask on.
Additional context