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

Pain is Painful #72687

Merged
merged 12 commits into from
Apr 4, 2024
Merged

Pain is Painful #72687

merged 12 commits into from
Apr 4, 2024

Conversation

GuardianDll
Copy link
Member

@GuardianDll GuardianDll commented Mar 29, 2024

Summary

Balance "Pain is painful"

Purpose of change

Venera told me that the current formula for pain is bullshit: pain 100 can be obtained by taking 400 damage, which is pretty dang close to being dead; but 100 pain decreases only 4 of each stat, except perception, that decreases only for 3 unit. what the fuck

Describe the solution

Change formula from (pain^0.8)/10 to pain/10 = now 100 pain would result in 10 stat decrease, except for int and per, for this two it would be 20 stat decrease
Changed the formula for int and per penalty, while str and dex penalty is untoched
Red is str and dex formula, Blue is int and per formula
Changed the formula to be percent based for each pain you lose 1% of your int and per stat, and for each pain you lose 0.7% of your str and dex

Testing

I'll make test in #72681 when this PR would be merged

Additional context

I didn't touch speed decrease because i don't know how this should be calculated

Additional context 2

image

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. labels Mar 29, 2024
src/character.cpp Outdated Show resolved Hide resolved
src/character.cpp Outdated Show resolved Hide resolved
src/character.cpp Outdated Show resolved Hide resolved
src/character.cpp Outdated Show resolved Hide resolved
src/character.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added the json-styled JSON lint passed, label assigned by github actions label Mar 29, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Mar 29, 2024
@PatrikLundell
Copy link
Contributor

So you're changing pain from being crippling to being lethal, which doesn't seem to be a good idea.

If you're brave enough to play a character with "normal" stats any stat affecting pain will cause you to being unable to carry your weapon and armor (as STR will barely be sufficient without penalties, and you probably had to sacrifice some armor due to the weight), while at the same time slowing you down to be significantly slower than most enemies. You can't waste time to dump weight apart from possibly your held weapon or you'll be mauled further, making sure you can't get away.

If you want to make something that's dangerous for the super characters resulting from extreme stats gained from character generation, stat growth from whatever, or mutations/CBMs, you should make sure it doesn't knock out more sane builds.
One way would be to scale penalties with stats. Getting hit by -10 STR is a death sentence to a "normal" character (-2 seems rather dead), but only quite bad for a 20 STR one.

@Hyperseeker
Copy link
Contributor

An alternative would be to make pain modify limb scores instead of stats directly. One does not suddenly lose their muscle mass or the flexibility of their joints due to pain: they lose their capacity to exert the force of their muscles (sensory overload, concentration, and/or willingness to fight) and the coordination. The same, I believe, would apply to intelligence and perception, although we barely have their bonuses quantified as limb scores per se. (The only ones I see as being viable are reaction score and [night] vision score.)

While that would be outside of the scope of this PR, I believe that, if accepted as a better solution, this solution would supersede it.

@GuardianDll
Copy link
Member Author

that sound like a good solution indeed, tho i should ask @Venera3 first

@Venera3
Copy link
Member

Venera3 commented Mar 29, 2024

That comment was specifically re tanking intelligence and perception earlier, the rest of the stat scaling is not in a horrible place.

Limb scores are an optional add-on, but e.g. intelligence will never be limbed in any capacity and it should be the first to go - pain hurts, and you're distracted earlier than you let your sword go or whatever.

@GuardianDll
Copy link
Member Author

GuardianDll commented Mar 29, 2024

so i should tweak int (and optionally per), and str/dex should use the old scale? do i understand you right?

@RedMisao
Copy link
Contributor

Agreeing with the people before me: this would worsen the current pain stunlock problem
(Basically, characters with certain amount of pain (the soft cap) quickly spiral into becoming effectively disabled (the hard cap), as when the character is hit it reduces their dodge and speed, which makes them an easier target for monsters, which gives them more pain and makes it worse for them to react, repeat until you're dead)

I don't mean "I want to clear the entire city in a single night with my katana" kind of situation
I'm talking how just getting lots of pain in a short period of time already makes the character virtually useless until they recover, regardless of hp or any other stat/number/value/effect. This change will make it so getting a smaller amount of pain will have the same outcome

Not only that, as pain not just reduces speed and dodge and Dex and Str for melee oriented characters, but reducing Int also greatly reduces spellcasting abilities, as the mana pool is directly proportional to Int

@SirPendrak
Copy link
Contributor

Also, in current state, adrenaline is mutation or bionic only, while in reality, most fights would make normal people high enough on adreanaline that they would not notice some injuiries

@ADekema
Copy link

ADekema commented Mar 29, 2024

It feels wierd that pain scales liniarly. It would make more sense to make it a exponentional curve. Most people can deal with a bit of pain and be affected minimally especially if you have higher pain tolerance or experience with pain. But past a certain point pain becomes increasingly hard to deal with until you simply pass out.

@PatrikLundell
Copy link
Contributor

I agree with @Venera3 that the STR/DEX penalties aren't in a horrible place currently (at least for characters with reasonably normal stats). Penalties hurt, and you typically need to withdraw/flee when beyond a couple of stat points in penalties, assuming you can: some enemies are too fast to get away from, so you have to bring out your emergency measures to try to kill it off before fleeing the scene.

However, there's probably room for additional penalties for superhuman characters so they get a meaningful impact from penalties (although they probably still won't be badly affected until close to death, but that's superhuman for you).
There may also be room for some capping of penalties for low score characters so they won't end up with negative scores from getting a cold (look at the horrible scores of the beggars when the RNGs produce a bad roll, one of mine had an INT of 0 when not subjected to any penalties at all).

I don't do magic mods, but normally fantasy magic is heavy on concentration, so being severely impacted by pain seems appropriate for normal types of magic (pain or emotions as fuel may work differently). Similarly, precise aiming of ranged weapons may also seem reasonable targets for precision reduction due to pain (presumably via PER).

@GuardianDll GuardianDll marked this pull request as draft March 30, 2024 00:08
@Aerin-of-the-Toast
Copy link
Contributor

Aerin-of-the-Toast commented Mar 30, 2024

Also, in current state, adrenaline is mutation or bionic only, while in reality, most fights would make normal people high enough on adreanaline that they would not notice some injuiries

Adrenaline isn't magic, people do fight worse as a fight drags on and they get more and more battered and tired. (Hell they usually fight worse partially because of the adrenaline but we don't model that)

Regardless of adrenaline levels you're going to get worse as you get more injured even if you're not necessarily paying attention to the pain. Especially if you're fighting zombie after zombie and constantly fighting new, fresh enemies compared to you getting more and more battered.

Far as I'm concerned we could be modeling adrenaline already as a reason why the stat penalties aren't even worse or why your character still tries to fight instead of flopping over and giving up when sufficiently wounded lol.

@GuardianDll GuardianDll marked this pull request as ready for review March 30, 2024 09:56
@GuardianDll
Copy link
Member Author

changed the formula based on discussion with Venera

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Code: Tests Measurement, self-control, statistics, balancing. labels Mar 30, 2024
GuardianDll added a commit to GuardianDll/Cataclysm-DDA that referenced this pull request Mar 30, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 31, 2024
@I-am-Erk
Copy link
Member

I-am-Erk commented Apr 4, 2024

So, I think you're in a decent place here for the concept, but if we're going to change this I think we may as well finish it off: rather than a flat penalty, eg -1 int, make it a percent penalty based on your base stat. Having a 20 int should not mean you can shrug off pain penalties.

What I'd suggest is that for int and per, 1 pain drops your max stat by 1%, rounded appropriately. You could either do the equivalent for str and dex, or leave them unchanged for now, since they'll probably get limbified soon anyway.

@GuardianDll
Copy link
Member Author

Won't it has an opposite issue, where character with, for example, 4 int, won't be affected by pain until, like, 25 pain (ignoring rounding)? Characters with higher stat would be penalized more, sure, but opposite would be true, and i don't think it's correct
I'll redo formula anyway

@I-am-Erk
Copy link
Member

I-am-Erk commented Apr 4, 2024

A person with 4 int already doesn't experience much penalty, they're not substantially affected by losing three int

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. [Markdown] Markdown issues and PRs and removed BasicBuildPassed This PR builds correctly, label assigned by github actions labels Apr 4, 2024
@I-am-Erk
Copy link
Member

I-am-Erk commented Apr 4, 2024

All right, let's see where this takes us.

@I-am-Erk I-am-Erk merged commit 3143ea6 into CleverRaven:master Apr 4, 2024
26 checks passed
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 5, 2024
@GuardianDll GuardianDll deleted the pain_is_pain branch April 5, 2024 05:31
@AcidAntOnAMinefield
Copy link

Out of curiosity: is there a table or something that mentions what certain levels of pain should be equivalent to?

Something like: Pain 1 being equivalent to being pinched by your granny, pain 5 being accidentally biting your tongue when chewing, pain 20 when you tweak/sprain your ankle when walking, etc etc?

@kholat
Copy link
Contributor

kholat commented Apr 5, 2024

At this point its kinda like - you cant even lift a glass of water after you take a few hits.

Besides, where is the rationale in this PR? Theres just a screen of Veneras msg from discord.
Where are the people like Kevin asking things like "what makes you think pain should be amplified? Can you link at least 1 paper that explains how debilitating pain is to a human body?".
Is this really okay?

@I-am-Erk
Copy link
Member

I-am-Erk commented Apr 5, 2024

Some of the discussion took place in other venues, but since one of the lead devs reviewed it and decided it was okay, yeah it's ok. Feel free to read and comment in the follow up issues for more.

@gnneo
Copy link

gnneo commented Apr 5, 2024

Although there are some results regarding the effects of acute pain on muscle strength (cf. [1], [2] and their references), the exact relationship is complicated. Naively speaking, the maximum reduction should be around 50% initially and return to normal strength after a few minutes.

To the best of my knowledge, there is no scholarly justification for reducing perception or intelligence from pain. Anecdotally speaking, I thought far more clearly and decisively when I was in serious pain, and was more keenly aware of my surroundings. So the relationship here may be more complicated still.

  1. Farina D, Arendt-Nielsen L, Graven-Nielsen T. Experimental muscle pain reduces initial motor unit discharge rates during sustained submaximal contractions. J Appl Physiol (1985). 2005 Mar;98(3):999-1005. doi: 10.1152/japplphysiol.01059.2004. Epub 2004 Oct 29. PMID: 15516369.
  2. Graven-Nielsen T, Arendt-Nielsen L. Impact of clinical and experimental pain on muscle strength and activity. Curr Rheumatol Rep. 2008 Dec;10(6):475-81. doi: 10.1007/s11926-008-0078-6. PMID: 19007539.

@I-am-Erk
Copy link
Member

I-am-Erk commented Apr 6, 2024

See #72851

A closed pull request is a bad place for further discussion, and this is splitting relevant feedback between multiple topics which can make it hard to find important info later on.

@CleverRaven CleverRaven locked as off-topic and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. <Documentation> Design documents, internal info, guides and help. 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 NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.