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

Being sad makes you extremely tired #77882

Closed
tenehea opened this issue Nov 15, 2024 · 28 comments
Closed

Being sad makes you extremely tired #77882

tenehea opened this issue Nov 15, 2024 · 28 comments
Labels
(S3 - Duplicate) Bug that is duplicate of another one

Comments

@tenehea
Copy link

tenehea commented Nov 15, 2024

Describe the bug

I noticed after killing child zombie 9,552 that my character would dramatically slow down. Killing a zombie child causes your mood to plummet, and while your mood is low your character acts much more tired than they physically are. This interaction effectively makes children one of the most dangerous debuffers in the entire game, on par with some nether creatures. This doesn't seem particularly realistic or fun.

Attach save file

N/A

Steps to reproduce

  1. Kill one of the thousands of zombie children
  2. Notice your character is now much more exhausted
  3. Wait 30 minutes for the mood debuff to go away, notice you are not exhausted anymore

Expected behavior

  1. Kill one of the thousands of zombie children
  2. Notice nothing because your character is not tired

Screenshots

No response

Versions and configuration

N/A

Additional context

N/A

@tenehea tenehea added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Nov 15, 2024
@Fris0uman
Copy link
Contributor

Do you get tired or do you get slow? Low mood does give a speed debuff

@tenehea
Copy link
Author

tenehea commented Nov 15, 2024

From memory, the direct speed debuff is extremely low (around -1 or -2?). What seems new is the weariness debuff, which causes combat to be done much slower than just -1 or -2. The difference between Light and Medium weariness seems huge

@Fris0uman
Copy link
Contributor

You got weary after fighting a bunch of monsters? That seems completly intended

@tenehea
Copy link
Author

tenehea commented Nov 15, 2024

I got very weary, TEMPORARILY, from low mood. That is not normal.

@osuphobia
Copy link
Contributor

#63350

int Character::weary_threshold() const
{
const int bmr = base_bmr();
int threshold = bmr * get_option<float>( "WEARY_BMR_MULT" );
// reduce by 1% per 14 points of sleepiness after 150 points
threshold *= 1.0f - ( ( std::max( sleepiness, -20 ) - 150 ) / 1400.0f );
// Each 2 points of morale increase or decrease by 1%
threshold *= 1.0f + ( get_morale_level() / 200.0f );
// TODO: Hunger effects this
return std::max( threshold, bmr / 10 );
}

The problem is, low mood gives a huge penalty to weary_threshold.

@tenehea
Copy link
Author

tenehea commented Nov 15, 2024

Hmm, weariness doesn't work like I thought. It seems the thresholds don't affect your weariness directly but rather where the cutoffs for Fresh/Light/Medium are? In trying to reproduce this I didn't notice anything at all while Fresh and low mood, but I'm assuming the cutoff while Light and low mood is much more punitive, hopefully more punitive than intended?

@osuphobia
Copy link
Contributor

For fresh level, what you see in the widget is ( weary threshold - weariness amount ) / weary threshold, and once the weariness amount exceeds the weary threshold, we go to the next level of weariness, and the widget becomes ( ( n + 1 ) * weary threshold - weariness amount ) / weary threshold where n is the level of weariness.

As you can see in weary_threshold(), Each 2 points of morale increase or decrease by 1%, so low mood makes your weary threshold bar way shorter. For example, if you are in Light weariness level, guilty of killing a zed child will give you at least a 50% penalty ( 25% * 2 ).

Maybe we should:

  1. Cap the influence of minus morale.
  2. Lower the penalty factor.

@andrei8l
Copy link
Contributor

/duplicate of #63350

@github-actions github-actions bot added (S3 - Duplicate) Bug that is duplicate of another one and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Nov 15, 2024
@tenehea
Copy link
Author

tenehea commented Nov 15, 2024

January 2023 💀

@andrei8l
Copy link
Contributor

@tenehea
Copy link
Author

tenehea commented Nov 15, 2024

Lamenting the fact that it has worked like this for so long lmfao, not that it's a duplicate

@AlexMooney
Copy link
Contributor

AlexMooney commented Nov 16, 2024

I think if we want to land a change for this, we'd need to articulate what effect, if any, mood should have on weariness thresholds and justify the change. The code @osuphobia tagged goes back to the Basic implementation of weariness PR, so hasn't been touched at all since the introduction of weariness.

Zombie children start out with a -60 morale modifier (per spell_effect::guilt with sp.damage 100, sp.get_effective_level of 6, and shared_species being true) which linearly drops to no morale modifier at 100 kills.

Testing

I made a default survivor with Debug HVAC then did some active activity to become weary and tested shooting child zombies with an AK-47 (one shot each; about 2.5 seconds between kills):

Change Morale Threshold Weariness Display
Character Gen 0 1038 0 Fresh |||||
Unarmed Practice 180 min 0 1012 941 Fresh .....
Killed a child zombie -58 718 941 Light |||..
Killed 2 total -82 597 941 Light ||...
Killed 5 total -127 369 941 Moderate \....

Open Questions

  1. Should morale affect weariness at all?
  2. If yes, how should the penalty / bonus scale to morale?

I'm inclined to cap the morale modifier on the threshold to ~20% or to remove the morale modifiers on the threshold entirely and rely upon the morale speed modifier.

@kevingranade
Copy link
Member

I'm not seeing anything that's notably a problem. "Killed a child" is intended to come with severe pentalies and this does that but in a manageable way. If you aren't either on a threshold already or kill many children it's not going to have notable impact.

In short, this is working as intended. The previous issue focused on the sudden onset of the penalties, which is problematic, and a change to make the morale penalty grow to it's target magnitude over time would be welcome.

@kevingranade kevingranade closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2024
@tenehea
Copy link
Author

tenehea commented Nov 17, 2024

Killing a zombie child causing your character to turn slowmo in combat does not seem intended to me but alright lol. This isn't how people work, biologically or psychologically, especially not in life-or-death situations, and it's terrible gameplay.

@Zireael07
Copy link
Contributor

The highlighted part should be the child. Killing a child would mess most people up, even in life or death situations, so yes this is how people work.

However I agree this is bad gameplay (when combined with the fact you usually encounter LARGE groups of child Zs) AND I believe the "mood shortens your weary threshold" effect is overblown.

@tenehea
Copy link
Author

tenehea commented Nov 17, 2024

I highlighted zombie because Kevin completely left that part out. It's a zombie! I don't want to accuse anyone of pearl clutching but the whole zombie genre is built on the mechanic that humans are very apparently (judging by its immense popularity) generally okay with seeing humanoid things get killed so long as they're already dead and creepy enough to begin with. This is not the first time that I've thought about that, and personally I find the dynamic disturbing! But that's how it is. Zombies don't look or act like people, so we categorize them very differently. It's actually pretty bizarre to single out children at all. If the player sees a child when they look at a child zombie, then shouldn't all zombie kills reduce morale then?

@Zireael07
Copy link
Contributor

Re the final sentence: you do have a point. It is a bit inconsistent to treat all other Zs as fodder to be killed but Z children as children.

@AlexMooney
Copy link
Contributor

@kevingranade I think that modeling the penalty as weariness is backwards. It means that when you're severely distraught you take no penalty to mental activities like reading a book but you do take penalties on active things. I don't know about anyone else, but this is the opposite of what I expect: it's hard or impossible to engage in calm study but doing something active is distracting and less impacted by mood. None of this is to say the penalty should be reduced in overall impact.

@kevingranade
Copy link
Member

The weariness adjustment impacts active activities, the huuuuge focus hit directly from low morale pretty much tanks study and crafting. You need to evaluate all the aspects of it, not just one in isolation.

@AlexMooney
Copy link
Contributor

I don't think it's accurate to say there's a huuuuge focus hit:

Event Morale Focus
Disable all skills 0 100
Shoot a CZ -58 96
Wait 15 minutes -34 89
Wait another 15 min 0 89

@kevingranade
Copy link
Member

Yea that could stand fixing, seems like it's bitrotted because it used to make focus drop pretty precipitously.

@Procyonae
Copy link
Contributor

As a non overhaul I'd like to see the zombie child guilt split into guilt from killing any zombie period and guilt from killing specifically zombie children, I don't see why you'd be content killing any undead day 1 regardless of what other undead media shows. So if you killed a zombie child first you'd get a worse debuff than if you'd killed 100 other zeds first and come to terms with killing zeds period being ethically ok in your head. Military profs that have already killed could start immune to the zombie guilt (or at least progress towards it) but not child guilt.
A minor overhaul could be to delay the effects of guilt until you're "outside of combat" to simulate the player doing what they have to in the moment and coming to terms with what they've done afterwards. If there was some magic way to measure what an "unavoidable" kill looks like it'd be interesting to make the worst "tier" of guilt prevent you from attacking altogether but I don't see anyway we could ever do that without it being incredibly annoying and exploitable.

@IdleSol
Copy link
Contributor

IdleSol commented Nov 18, 2024

I don't see why you'd be content killing any undead day 1 regardless of what other undead media shows

Minor correction: The first day of the game does not always correspond to the first day of the cataclysm.

@Procyonae
Copy link
Contributor

Procyonae commented Nov 18, 2024

Minor correction: I didn't say it did :p

We could make it so you start with some guilt immunity depending on time since cata with a modifier for scenarios (so scenarios where you're a long way in but have barely done any combat still make sense) but that's independent to do with what I were on about, it's not like this exists in any form currently

@kevingranade
Copy link
Member

I'm fine with splitting the guilt into general killing vs specifically problematic targets like child zombies.
Delaying the onset of guilt is also fine, instead of trying to detect in combat vs out of const I suggest just having a time based delay and the player will have time to get out of combat.

@osuphobia
Copy link
Contributor

If you aren't either on a threshold already or kill many children it's not going to have notable impact.

So this is what Kevin's words mean:

Change Morale Threshold Weariness Weary level Display
Character Gen 0 1067 0 weary_0 Fresh |||||||||
Moderate exercise 180 min 2 973 538 weary_0 Fresh ||||.....
Killed a child zombie -56 694 538 weary_0 Fresh ||.......
Killed 3 child zombies -98 499 538 weary_1 Light |||||||.
Killed a child zombie(Pacifist) -245 178 538 weary_3 Weary ||\......
High exercise 180 min 8 943 1883 weary_1 Light .........
Killed a child zombie -50 680 1883 weary_3 Weary .........
Killed 3 child zombies -92 489 1883 weary_5 Extreme |\.......
Killed a child zombie(Pacifist) -239 178 1832 weary_8 Extreme .........
High exercise 240 min 8 834 2484 weary_3 Weary ||\......
Killed a child zombie -50 601 2484 weary_3 Weary |........
Killed 3 child zombies -92 433 2484 weary_8 Extreme .........
Killed a child zombie(Pacifist) -239 178 2484 weary_8 Extreme .........

Again, a fatal part of the process is that the penalties will be counted for multiple times.
Although your weary_threshold cannot be lower than one-tenth of base_bmr, having a 25%/50%/90% penalty counted for multiple times is deadly enough.
Also it may not be intuitive and consistent if player will barely suffer from the guilty of killing a zed child if they are not weary at all.

My suggestion:

Remove the morale multiplier from weary_threshold(), and add a factor in Character::weariness() that gives a penalty capped at 1000 (mostly one weary stage).

Some demo code:

 int Character::weariness() const
 {
-    return activity_history.weariness();
+    int amount = activity_history.weariness();
+    int morale = get_morale_level();
+    int effective_weariness = ( 1 - ( morale / 400.0f ) ) * amount - ( morale * 4 );
+    return std::clamp( effective_weariness, 0, amount + 1000 );
 }

And it will be like this:

Change Morale Threshold Weariness Weary level Display
Character Gen 0 1067 0 weary_0 Fresh |||||||||
Moderate exercise 180 min 2 960 520 weary_0 Fresh ||||.....
Killed a child zombie -56 960 829 weary_0 Fresh |........
Killed 3 child zombies -98 960 1053 weary_1 Light |||||||.
Killed a child zombie(Pacifist) -245 960 1531 weary_1 Light |||\.....
High exercise 180 min 8 900 1630 weary_1 Light |\.......
Killed a child zombie -50 900 2108 weary_2 Moderate |||\.....
Killed 3 child zombies -92 900 2454 weary_2 Moderate .........
Killed a child zombie(Pacifist) -239 900 2696 weary_3 Weary ||\......
High exercise 240 min 8 802 2388 weary_3 Weary ||\......
Killed a child zombie -50 812 2919 weary_4 Very .........
Killed 3 child zombies -92 812 3406 weary_6 Extreme .........
Killed a child zombie(Pacifist) -239 812 3470 weary_7 Extreme |........

We can combine this solution with Procyonae's one.

@tenehea
Copy link
Author

tenehea commented Nov 18, 2024

I'm fine with splitting the guilt into general killing vs specifically problematic targets like child zombies. Delaying the onset of guilt is also fine, instead of trying to detect in combat vs out of const I suggest just having a time based delay and the player will have time to get out of combat.

Vital to the suggestion (I think?) is that guilt resistance should specifically not be split, and that it is reasonable for desensitization to be needed for and shared by killing any human zombies, not just child zombies. That would make the early game rockier as the new survivor becomes acquainted with killing zombies, but it would make the occasional child zombie hidden in mid-game hordes less of a random psychological landmine to survivors who have already killed dozens if not hundreds of zombies and presumably come to terms with it

@AlexMooney
Copy link
Contributor

It's straightforward to change the system from only children causing guilt to one where all zombies cause guilt and children cause significantly more. It should also be possible to make it a linear combination, where being totally numb to killing normal zombies causes child zombies to have, say, half as much impact as killing a child zombie with no prior experience. We'd just need to decide how many zombie kills would make one totally numb, how much morale impact normal zombies would have, and how being accustomed to killing normal zombies should impact killing child zombies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S3 - Duplicate) Bug that is duplicate of another one
Projects
None yet
Development

No branches or pull requests

9 participants