-
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
Muscle strain: pass 1 #72733
Muscle strain: pass 1 #72733
Conversation
At the moment this is just "stamina but worse" and does not do anything. Bear with me.
Throwing things, drawing bows, and breaking sticks.
|
this is a coarse split that assumes all arms usage is the same, but honestly it might work fine.
Just off the top off my head things that should increase strain. Just spitballing increase there is something that you didn´t think off yet:
Implementing a strain drain for most activities wouldn´t add much at this stage but it would do much of the work for the next GAINZ part. Meaning you would only have to implement muscle gains and characters would start to automatically become buff from everything that should make them buff. |
The linked issue post is a good place to talk about things that should affect strain. In this PR I'm just trying to implement a prototypic version and it doesn't need to, nor should it, touch on every possible use case. |
Still needs work but it's a start
It works now. Still a bit clunky. weariness also impacts strain recovery at high levels.
This comment was marked as spam.
This comment was marked as spam.
tune strain to target ~8-10 sledge swings Add burn
This isn't really ready to merge, but it's ready for some more scrutiny now. |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Trying to add this in a simple form is just opening too many cans of worms, I am going to need to do a bit more infrastructure. not really surprising given the magnitude of the change.
I can do 2 pretty easily, but 1 will require a separate PR by me or someone smart. |
Becoming unable to attack (with a bow) due to strength loss was a major pain in the past, because the STR requirements were incredibly high, including a bow recipe for a bow that wasn't possible to be used by humans using either of the normal character generation methods (not the "grab whatever you feel like" one). |
Remember, rapidly tanking STR in this case can only kick in at the end of strain. For a bow, that means you've been holding it drawn for some time, and your muscles have given out. It's not something that kicks in due to externalities... being hit by a zombie doesn't change your strain, for example. In the longer term, strain should have different impacts on aim for the most part, and this should be mostly unimportant; on a first pass, having your aim action cancel because you tried to aim for a long time and your muscles gave out is not that big a problem, even if it's not where I want it to end. Remember too, strain recovers in a few seconds. If your str drops, you have to shake your arms out for a moment and then you can try again. |
what else needs to be done for this to be mergeable? |
|
@anoobindisguise, per the comment:
However I ran out of easy computer time to do c++, so it's hanging on that for the time being. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not bump or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered. |
Summary
Features "Adds 'strain', modelling muscle use separate from aerobic stamina"
Purpose of change
See #59862 for the basic theory. I'm doing this slightly differently than in that proposal.
Basically, currently despite having all kinds of different pools of stats that run out as you use them, "stamina" covers a wide range of things that shouldn't be the same. Put simply, you shouldn't be unable to run after drawing your bow. As long as 'stamina' is a single vague thing, we can't easily balance eg. the ability to swing your sword without getting winded, and we can't easily add a tool for gaining strength as you use your muscles.
Describe the solution
This is a first pass and will be a bit prototypic. It adds a new pool, "strain", which uses roughly the same units as stamina. On the UI end, I would like to represent strain as increasing as the pool is used up, but on the back end I am keeping them the same so that it's easier to shift stamina costs straight over without rebalancing them sometimes. I suspect this will be a little confusing for contributors but I hope not too bad. On the back end you have start at max strain and drop to zero, in other words, calls to update_strain() using negative numbers will lead you closer to muscle failure. The UI is the only place it goes the other way, partly because of the word choice 'strain' and partly because it helps distinguish the two bars.
Strain uses the same 'units' as stamina, whatever those are: to port sometihng over to strain, you can use whatever previous methods we used for stamina calcs. Anything that uses burn_energy_arms now builds up strain primarily, although it still burns stamina at 25% the previous rate. This is a ballpark, eyeballed measure to get things in place to work on. In my playtests I suspect I've set it too low and we should bump it up to like 50% or something but I am not sure. It might also be something we need more refinement on, like maybe stamina should drop faster for low strain weapons and slower for high strain ones.
Strain has a smaller pool than stamina: it reaches its cap much faster. It also recovers faster. When you cap strain out, you're supposed to stop being able to smash and attack, and have to stop aiming your bow; however, I haven't yet been able to get that working. In my playtests, I can make about 8-10 attacks with a
heavy sledge
, and a lot more with my fists (I lost count) before running out of strain.As your strain builds up, you also build up what I've called "Burn". This effectively reduces your maximum strain. In the current UI it's hidden, you just run out of strain faster the more you operate at high strain. Burn recovers much slower.
This pass will not add the big fun parts of strain, like the ability to transition Burn into Gainz that increase your strength. We'll get there.
And now a special category for everyone who notices that this totally messes with the game:
This totally messes with the game!
This is a huge paradigm shift to stamina and melee combat balance. I know. It's far, far too broad reaching for me to have even vaguely assembled playtest data, that's what happens next. I don't expect this to work well from the start, it's going to need your feedback.
Things that need fixing sooner rather than later:
||\......██
to indicate the latter part of the strain bar can no longer be accessed. EDIT: Renech helped me glue together a very messy solution to this problem, but it definitely needs refinement in a dedicated PR.So why are we changing things? Stamina worked okay.
It works okay, but not great. Besides the stuff listed, this change is something we've wanted for a long time. Here's some of the stuff it sets the stage for.
So, please bear with us as we try to add one of the most long-requested features in the game. After all, no pain, no gainz.
Describe alternatives you've considered
I really don't want to add yet another stat that we track, but I can't see any other very good way to balance this without sacrificing a lot of stuff we want.
Testing
Thanks to Renech for helping me do the UI stuff when my brain was too full.
When you get up to high levels of strain, for now it just stops you from doing things. This is meant to simulate "the wall" like in a workout, where you've just done so many pullups that your arms don't work any more (for me this happens after like, uh, like thirty pullups, I swear). For attacks, this is based on the stamina/strain cost of the weapon, for smashing this just kicks in if you've got less than 25% strain left. I'd like a finer tuned option for smashing but that can wait for later. Note that you can always make at least one attack even if it would cost more strain than you've got.
I've tested it a bunch, it's mostly working pretty well, but as I outlined above, the balance is not really bang on. I've tested it a fair bit but it's hard to recreate a realistic testing scenario after staring at the same thing for so long. Also, the balance is likely to change a fair bit as we refine the implementaiton
Additional context
Since it is quite confusing at first, here is the complete list of easily-confused terms for different types of fatigue: