-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Stamina recovery no longer modified by move mode #38891
Conversation
My biggest concern with this change, especially this late in 0.E, is the potential impact on muscle-powered vehicles. Tuning those was a hassle (especially bicycles), and even the small shift in run distance discussed in the pull request text has meaningful implications on player safety for hit-and-run tactics. I think this is probably the right change in the long run, but I don't know if we can do this right now. An alternative that's kinda janky but would have less overall impact on the game as currently balanced would be to force "walk" mode when starting certain activities, such as butchery, waiting, etc. I don't like the feel of that one, though. |
I would disagree on forcing a mode on activities. With the crouching mechanic you can be hiding behind a crate trying to catch your breath, so a sudden switch to "walk" would be dangerous |
For a janky patch for 0.E, what about taking this change, but leaving in an override that if you're running AND cycling the old behavior still applies? |
I'm going to do some testing on cycling tonight to assess the impact, will report back. If anyone can think of other areas that should be assessed please drop a note here. |
OK I've done some bicycle testing. Before the change, it takes approximately 50 moves at top speed (30mph) on a bicycle to deplete 1 bar of stamina in "R" mode. ~90 moves in "W" mode. In "C" mode, it appears to be infinite, or near infinite. After the change, it takes approximately 80 moves at top speed on a bicycle to deplete 1 bar, whether in "R" mode, "W" mode, or "C" mode. I would suggest that this PR is worth accepting, and that stamina depletion can be tweaked from here by the consumption numbers rather than the (previously used) regeneration numbers? I don't have a strong opinion whether this should be pre- or post-0.E, there's a tradeoff between allowing crouch mode to be an effective loophole vs the numbers not being dialed in. |
Wow. Given that, I'm inclined to agree. |
Wow doesnt this mean fighting in melee combat right now while crouching is going to give you a stamina regen bonus? if so that's quite silly. |
Yes, it turns out crouch mode right now is exploitable in many situations! |
Summary
SUMMARY: Bugfixes "Stamina recovery no longer modified by move mode"
Purpose of change
Fixes #38877 by removing the stamina_move_cost_modifier from the update_stamina method.
Previously, the update_stamina method (called from update_body each turn) was modifying the amount of stamina recovered based on the move method.
This meant that a player's move mode would change the amount of stamina re-gained each turn, even when not actually moving. Activities like butchering were affected, but so was "wait until you catch your breath".
I think this happened to be particularly noticeable in butchery just because the amount of stamina lost (20) happened to be above stamina gained in run mode, but not in walk/crouch mode. The actual issue is more rampant than this.
Describe the solution
I simply removed the move modifier from the stamina recovery formula.
I was worried that this would extend running an unacceptable amount, but the recovery you get while running is not huge. This change extended my character's running range before hitting ":" stamina from 88 moves to 92 moves.
Describe alternatives you've considered
I considered simply removing the stamina cost from butchery, but that isn't really a fix, it would still make stamina recovery slower while in "R" mode doing non-movement (butchery, resting, etc).
Testing
Tested butchery before - all forms of butchery had this bug, afterwards stamina is not affected by run mode.
I tested running: before, I could run 88 moves before hitting ":" stamina, afterwards 92.
I tested waiting until catching my breath: before, your recovery was approximately 4x faster when in crouch-mode than when in run mode. In my character, from ":" stamina, it took 12:13 to recover in "R" mode, but 3:04 to recover in "C" mode and 6:02 in "W" mode.
After this change, recovery time was 7:46. It's longer than it previously was when in "W" mode because the normal stamina modifier gives a recovery bonus when your stamina is lower.
Additional context
I think this is a simple, sustainable fix that removes a big flaw from the code (that move-mode affected stamina recovery when not moving). I recognize this is a pretty fundamental change and am not fully comfortable with introducing it this late in a release, but I think it's a net positive! I'd love some eyes on this if we deem it mergeable in 0.E.