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

Weariness: partial solution for too much calorie burn #42343

Closed
I-am-Erk opened this issue Jul 21, 2020 · 56 comments
Closed

Weariness: partial solution for too much calorie burn #42343

I-am-Erk opened this issue Jul 21, 2020 · 56 comments
Assignees
Labels
Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics <Suggestion / Discussion> Talk it out before implementing

Comments

@I-am-Erk
Copy link
Member

I-am-Erk commented Jul 21, 2020

PROBLEM:

It is possible to spend an incredibly long time working at extreme exercise levels, burning enormous amounts of energy.

SOLUTION:

A weary effect which occurs after an amount of time working at high energy levels, and limits activities at those levels.

Weary comes at various levels:

  • Weary1: limits Extra activity only
  • Weary2: limits Active and Extra activities
  • Weary3: limits Moderate and up
  • Weary4: limits Light and up

SIMPLE VERSION 1:

When weary, activities at the affected levels are prevented with an error message, like "you're too tired for that". I dislike this one but I wouldn't be the one doing the programming... the implementation details below assume my more complex preferred version, even if it means some bugs or gaps around activities that don't easily allow a time change. I don't like that this version makes weary quite obnoxious. In this "hard barrier" version, it should take longer to become weary. My implementation suggestion uses 1/2 BMR as a baseline for when to become weary, for this version I would say it should just be BMR.

SIMPLE VERSION 2:

When weary, you suffer a flat speed, focus, and stamina regeneration penalty, minor at weary1, impactful at weary2, severe at weary3, and crippling at weary4. I kinda hate this because it's a coarse solution that affects all kinds of things but I have to admit, it's not terrible in terms of simulation. However I worry about the overarching effects of stacking penalties to these critical stats over time, since weariness ties to hunger and fatigue which also affect these stats.

In this as in the ideal version, I would suggest increasing stamina regeneration at weary0 (~15%?) to make up for the fact that the player will be spending a lot of time at weary1.

IDEAL VERSION:

the time at which you complete an activity is extended the more weary you are, according to the formula

Actual time = base time * [ (activity level of the thing you're trying to do in METs) / (max allowed activity level in METs) ]

The activity level of the activity would be reduced to the cap.

In general each activity level is 2 Mets lower than the next. This means at weary1, shoveling (10 Mets) would cap at High activity level (8 Mets), and take 25% longer (10/8 times as long). As the avatar keeps shoveling and gains Weary2 the time increases to 66% longer (10/6), and so on.

There should still be player feedback along the lines of a message like: You're beginning to tire out. It is taking you longer to complete this task.

Stamina regeneration should be reduced by the same factor Extreme activity time is increased. However the baseline stamina regeneration should be increased by around 15% at weary0 (I'm guesstimating this).

GAINING WEARY STATUS:

Weary status should be based on calories consumed versus expended, and be related to sleep/rest/fatigue. I propose this system:

  1. Weariness tracker: Every time you burn calories, they are added to a weariness tracker variable. Let's call it wtrack here.
  2. Food intake to mitigate weariness tracker: a separate variable, let's call it wintake here, tracks how many kcal you have eaten.
  3. A third variable, nicknamed wthreshold, is the bar that determines when you pass into another level of weariness. By default it is 1/2 of your BMR, but as we'll see, that can change. Weariness increases by 1 level each time wtrack-1/2(wintake), or wtrack/2 if wintake>wtrack, is higher than a multiple of wthreshold. So, for a character with a BMR of 1200 who has eaten no calories, weariness increases to weary1 after 600kcal of activity, weary2 after 1200 kcal of activity, and weary3 after 1800 kcal.
  4. Every 1 point of fatigue should reduce wthreshold by 1%. For example, a character with a BMR of 1200 and 50 points of fatigue would advance to weary1 when wtrack-1/2(wintake)>300, not 600.
  5. Every 2 points of positive net morale should increase wthreshold by 1%, and every 2 points of negative net morale should reduce it by 1%.
  6. Using my more granular hunger system, every point of hunger should reduce wthreshold by 2%.
  7. Wthreshold should have a minimum value of 1/10 BMR.
  8. Every 15 minutes of sleep or 30 minutes of ``no activity` activities (resting, reading, waiting, playing video games) should reduce wtrack and wintake by 1/20 of the total or 1/20 of the character's BMR, whichever is higher. Efficient sleeper mutations might change the sleep time unit, and 'no need for sleep' mutations might change the rest/wait time unit, or perhaps allow you to count light activity as rest.

The game doesn't need to constantly check to see your current Weariness level, it can probably update these values every 5 minutes or so.

Some notes/thoughts:

  • it's really a separate issue but we should rename fatigue to sleepiness to avoid confusion. As pointed out in the comments here, it might also be worth renaming stamina. We're probably going to have at least four different types of fatigue in the long run and we should be as specific as possible.
  • the proposed time penalties may be too mild, but I don't want to be too penalizing at running or fighting
  • sitting in a comfortable spot could reduce the time to recover when resting/waiting/reading. However if we implemented this we should also have a small chance to doze off for a few minutes.
  • I would love to see more downtime activities that you can do while you rest after a hard day if we implement this.
  • weariness would tie very well with a cardio or endurance stat that is improved by exercise. This would increase wthreshold.
  • The specific wthreshold numbers will need some playtesting, there is no way to get scientific backing on this kind of system beyond that it should exist.
  • There are some other changes that should happen to activity levels for Walking and Crafting, which should both have much more variable activity costs, but that's not directly related to this suggestion
  • My implementation here does assume that fatigue and hunger increases as you're doing high activity actions, which inherently increases weariness more smoothly over time and also gives you feedback to eat more food or sleep to reduce it. Some of this is currently the case but I don't think (especially for hunger) that it's fully implemented yet.
  • Having a full stomach and guts might temporarily raise weariness. It's hard to work hard with a full belly.
  • I'd love it if character age, fitness, bad back trait, and comfort level while sleeping could combine to give a chance of having a sore back and shoulders when you wake up after a particularly wearying day. Cataclysm: creaking joints ahead
@I-am-Erk I-am-Erk added Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics labels Jul 21, 2020
@matt32106
Copy link
Contributor

Associated traits:

  • indefatigable: *0.9 wtrack
  • tires quickly: *1.1 wtrack
  • achiever/Strong willed: can continue doing something even if too weary normally (can do things 1 weary level above)
  • lazy: can't do task if weariness not on par with task requirements

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Jul 21, 2020

I would say strong willed would only work if we go with Easy Solution 1. I like the rest, especially the idea that lazy could prevent you from working once you got too weary. Another option for it would be to make it further increase the time needed to complete harder tasks when weary. In that context, strong willed - I'd call it hard worker - could just reduce the time penalty.

@Alex-Folts
Copy link
Contributor

Maybe i dont understand concept, but it looks like duplicating already existing stamina+rest.
Playing with those 2 you can achieve similar effect, i guess need to tie stamina consumption to spend energy, and stamina regen to rest state, so when you regenerate stamina you increasing tiredness of character(become tired gradually), which restoring while you sleep, and when you burning calories you decrease stamina so after time you need to stay and rest for some time, and in the end of the hard work day you will be dead tired. Actions should burn calories directly, and proportional to how hard action and character total mass(in case of walking/running/fighting).

And finally might need to check/tweak idle calorie burn and calorie burn for different actions.
The overall goal is to get realistic experience. Just my thoughts.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Jul 21, 2020

Stamina is your short term burst energy. You don't become weary by sprinting for a few minutes, you'd become weary by sprinting and fighting for an hour until your muscles are sore and you're drenched in sweat.

The two are related both irl and mechanically, but actually not all that closely in either case. Stamina is panting for breath with your hands on your knees, weariness is flopping into the easy chair after a hard day's work. If you've been digging trenches all day, that doesn't mean your stamina is out and you can't run or do something active at all, but it does mean you're probably digging trenches a lot slower than when you started and you won't be able to run so far.

For the moment I haven't worked stamina expenditure into weariness calculations because it's too short term and calories are probably a better surrogate.

@I-am-Erk I-am-Erk added the <Suggestion / Discussion> Talk it out before implementing label Jul 21, 2020
@moxian
Copy link
Contributor

moxian commented Jul 22, 2020

Naming concern: "weary" sounds like it does the same thing as existing "tired" status, but these (i assume) want to achieve very different things. This is very confusing, and players will mistake one for the other.

Consider either merging mechanics together (might not be possible? no idea), or renaming either. Changing "Tired" to "Sleepy" might work, as an example.

P.s.: while at it, maybe renaming "Stamina" to "Breath" would also be a good idea (if it's, conceptually, the capacity for you to "run out of breath" and encumbering mouth reduces it)? That would make the distinction between all three very clear to a lay person.

@I-am-Erk
Copy link
Member Author

Changing stamina to breath and tired to sleepy (the latter in particular) would be fine. Part of why I picked weary is that unlike those it has a comparatively specific meaning.

@Marrim
Copy link
Contributor

Marrim commented Jul 22, 2020

Breath is good. Low stamina means being winded.
Could go with drowsy/very drowsy for sleep deprivation.
Some term suggestions for varying levels of weariness: fatigued, weary, sore, overworked.
And perhaps add clarifying messages in the log to reduce the chance of player misinterpreting the status keyword?

@I-am-Erk
Copy link
Member Author

I would not recommend using different words for different states of weary. Either a level or an emphasis word is fine. My preference would be "slightly weary", "weary", "very weary", and "dead weary".

@matt32106
Copy link
Contributor

You need also to think about the relation between weariness and tiredness and the effect of sleep on weariness?!

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Jul 22, 2020

You need also to think about the relation between weariness and tiredness and the effect of sleep on weariness?!

Read the issue, that's a core element of the implementation as I presented it. Check under "gaining weary status"

@matt32106
Copy link
Contributor

Oops, missed that part.

@I-am-Erk
Copy link
Member Author

No problem.

I am also thinking that Morale should have a pretty profound impact on weariness, and Hunger as described in #42348 as well - the latter would lead to a feedback loop where hunger makes you weary and being weary makes you hungry, so we'd have to tune it carefully, but I think it would be pretty easy to do so and honestly that feedback loop is pretty realistic.

I will edit the post when I get a chance, and clarify implementation details a bit in the process.

@matt32106
Copy link
Contributor

I am also thinking that Morale should have a pretty profound impact on weariness, and Hunger

Not so sure about this. If you consider weariness as physical medium term fatigue, am not sure morale should affect this quantity. IMO Morale may affect the will to do something (its cost?) but would not cause weariness. Morale and hunger? Low morale could as well lead to low appetite or craving for ice cream but am not sure cdda needs to become World of Psychanalytics :)

@I-am-Erk
Copy link
Member Author

Low morale wouldn't inherently cause weariness, it would lower the threshold to advance to another level of weariness, as does fatigue. Given that the principle effect of weariness is to lower the speed and energy you can put into hard tasks, I think that morale affecting that is in fact a very reasonable mechanic. That said, I don't intend to write it such that morale is as much of a driving factor as nutrition and sleep.

Don't forget that this is a two way street: if morale has an impact on how quickly you get weary, it can also increase your tolerance for work.

@I-am-Erk
Copy link
Member Author

Updated issue with morale and hunger

@Fosheze
Copy link
Contributor

Fosheze commented Sep 3, 2020

For the moment I haven't worked stamina expenditure into weariness calculations because it's too short term and calories are probably a better surrogate.

As far as working stamina into it couldn't you do something as simple as linking the players stamina recovery rate to their current Activity Level and having weariness level adjust their stamina cap? It would even make sense that a player doing Extra_Exercise to be losing stamina while doing it. For example a person who just looked up from digging a trench and saw a zombie approaching would already be winded from digging and not be in a good state to run away. From my personal experience as well, being weary doesn't really make it harder to catch your breath it just makes it run out sooner.

Side note changing stamina to "Windedness" would also be my suggestion for making the distinction more clear.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Sep 3, 2020

Having high level activities cost stamina would be a good but tricky change, but it doesn't tie too closely to weariness I think. It's possible we could later work out a system where the speed you conduct an activity is determined by your stamina, so you do high level activities slower as your stamina drops to keep from getting winded, which would tie this all together really smoothly. For now though, that would add another major variable for balancing, and it should probably be left to a later PR. We need weariness implemented sooner than that.

@lcy03406
Copy link
Contributor

In order to recover weariness you have to be exactly idle for at least 30 mins, but intake decreases on every hour. The problem is that we don't have so many options of NO_EXERCISE activities. Even walking is MODERATE_EXERCISE. We have to spend hours in reading, playing, or just looking up the sky.

Since we have reworked professions to encourage practicing not reading. The weariness brings no gameplay at all. It turns out to just limits the "hours in a day". It's better to just define there is only 10 hours in a day, at least for saving my keyboard and cpu.

@anothersimulacrum
Copy link
Member

It does not, but it's something I'd like to have.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Sep 23, 2020

I could probably work out a simple formula for how much rest to count LIGHT and MODERATE activity as based on your weariness.

Where sleeping counts as 2 "rest units" and NO ACTIVITY acounts as 1...

  • "light activity" should count as 1/current weariness level rest units. So at weariness 0 and 1, light activity is as good of rest as no activity. At weariness 2, it is 1/2 as good as no activity. At weariness 3, 1/3 as good, and 1/4 at weariness 4. It should never be less than 1/4
  • "moderate activity" should count as 1/(2* current weariness level) rest units, so at weary 0 and 1, it's 1/2 as good as no activity, at weary 2 it's 1/4 as good. After that it stops counting as rest.

There's no huge rush to implement this though, I know you're busy.

I still like the idea of making chairs increase the effectiveness of your current rest by 50%.

@Fosheze
Copy link
Contributor

Fosheze commented Sep 23, 2020

I still like the idea of making chairs increase the effectiveness of your current rest by 50%.

That is an awesome idea. You could even just add a "comfort level" modifier to various furniture. Now you've got me imagining my aftershock drone operator survivor sitting in their custom "survivor armchair" having everything delivered to them by robots WallE style.

@I-am-Erk
Copy link
Member Author

Furniture already has a "CAN_SIT" flag and a comfort attribute we can use. I am not sure comfort should have a role though, we're talking pretty micro-level changes there.

@Fosheze
Copy link
Contributor

Fosheze commented Sep 23, 2020

Mood could play a roll. Maybe it's just subjective but at least to me resting feels a bit more effective when I'm I'm comfortable and happy with whatever I was doing. Comfort factors into mood so therefore it would factor into rest rate. It does make sense that a survivor sitting in a comfortable chair reading a good book in an airconditioned or at least cooled room would be resting much more effectively than a bile covered survivor crouching in corpse filled pit in the rain. It would also add more reward to establishing a proper base with all of the nice amenities rather than just a dank hole with a RV Kitchen unit. As it is right now mood can be ignored for the most part except for the extreme low mood preventing crafting and the slight benefit that trying to keep focus high brings (how fast focus changes is a different conversation). I'm not saying that it should be a dramatic effect but even a small effect would work towards mood being more impactful as it is in real life.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Sep 23, 2020

I believe mood already affects your weariness threshold, which means that you are less weary if you're in a good mood. I can't remember how impactful we made it.

Major thought @anothersimulacrum: we currently have weariness recover as a fraction of BMR, but we should actually have it recover as a fraction of wthreshold, so that modifiers to wthreshold besides BMR also modify how quickly you recover.

@lcy03406
Copy link
Contributor

lcy03406 commented Sep 24, 2020

  • "light activity" should count as 1/current weariness level rest units. So at weariness 0 and 1, light activity is as good of rest as no activity. At weariness 2, it is 1/2 as good as no activity. At weariness 3, 1/3 as good, and 1/4 at weariness 4. It should never be less than 1/4

maybe the opposite is better, depending what you are simulating. think in real life, after a marason, slow jogging would be relaxing. when you wake up on morning, almost everything would increase weariness.

@lcy03406
Copy link
Contributor

lcy03406 commented Sep 24, 2020

"Gather some materials" involves more activity that you defined heavy

What is "defined heavy" in gathering materials? What would it matter if you get a little more tired picking berries or dragging lumber back to your base? Sleep it off.

There are some minor glitches to sort out around resting and recovery, these are already PR'd. Likely we'll need to make sure we've got all the set points sorted. This is an experimental version. However if you have a salient point, you're failing dramatically to make it

So by "Gather some materials" you mean "do not pick more then ZERO berries in 5 minutes"?

There are full of 'minor' glitches that mark time periods heavy, effectively left no periods for marking not heavy.

Since you have noticed the problem somehow, I won't argue further for that.

@I-am-Erk
Copy link
Member Author

The opposite doesn't make much sense: I set those time points to the point where you can no longer keep up that activity level. Also, I dunno about you, but I feel like I'd generally rest better by walking slowly or sitting down as opposed to hiking up a hill after a marathon.

There are full of 'minor' glitches that mark time periods heavy, effectively left no periods for marking not heavy.

That isn't a sentence.

@lcy03406
Copy link
Contributor

That isn't a sentence.
Thank you, my English teacher.

@I-am-Erk
Copy link
Member Author

I mean, it is incoherent, I have no idea what you were trying to say. I'm not nitpicking your grammar.

@lcy03406
Copy link
Contributor

Calm down and talk about the issue ok?

Also, I dunno about you, but I feel like I'd generally rest better by walking slowly or sitting down as opposed to hiking up a hill after a marathon.

I'm not comparing walking and hiking. I was reply for your post about light activity is less good when weariness is high.

Walking is good rest when you've finish a marathon, but standing up and walking is weary if you were sitting.

I thought it's not too complecate to understand.

@lcy03406
Copy link
Contributor

lcy03406 commented Sep 24, 2020

I mean, it is incoherent, I have no idea what you were trying to say. I'm not nitpicking your grammar.

Oh sorry for my poor english. I mean the activity level is not well tracked, so one heavy move marks a whole 5 min period as more heavier than light excersize. In order to receive resting benifit, players have to be very very carefull.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Sep 24, 2020

Calm down and talk about the issue ok?

I am presently very calm, and talking to you. If you keep patronising me one of those will no longer be the case.

Walking is good rest when you've finish a marathon, but standing up and walking is weary if you were sitting.

If you finished a marathon and are still not so tired you can't even walk at full speed, then walking would rest you with what I'm proposing. You suggested it be "the opposite", which would mean that walking would rest you better if you're right at the edge of being barely able to walk anymore.

standing up and walking is weary if you were sitting

I don't see why walking would be more tiring when you're fresh.

I mean the activity level is not well tracked, so one heavy move marks a whole 5 min period as more heavier than light excersize

That's a known issue, but it's a simple issue that will be fixed probably before the weekend at the current rate. I'm not sure why you are so stuck on it.

@lcy03406
Copy link
Contributor

If you finished a marathon and are still not so tired you can't even walk at full speed, then walking would rest you with what I'm proposing. You suggested it be "the opposite", which would mean that walking would rest you better if you're right at the edge of being barely able to walk anymore.

walking speed and resting are two things. I agree when you are really tired, walking will be a hard or impossible task. But compared to running, walking is rest. In fact it will harm your body to suddenly stop while your heartbeat is still fast.

I don't see why walking would be more tiring when you're fresh.

It's not more tiring, it's less resting.
You can define it's tiring when fresh, or it's nothing when fresh, which you prefer.
But it's resting when you are already very tired.

That's a known issue, but it's a simple issue that will be fixed probably before the weekend at the current rate. I'm not sure why you are so stuck on it.

So I said I won't argue further for that. I just explain my bad sentences. no problem.

@lcy03406
Copy link
Contributor

Think you run 10 mins and walk slowly 20 mins.

You are still tired. it's not as good as run 10 mins and sit 20 mins.

But it's better now than 20 mins ago. You can now try to increase walking speed.

@lcy03406
Copy link
Contributor

Furthermore, an idea. Combining aerobic exercise and anaerobic exercise can make weariness increment more slowly than only aerobic exercise or anaerobic exercise. Encourage players to do different things.

@I-am-Erk
Copy link
Member Author

So, the current implementation of weariness needs bugfixing, but the basic necessity of reducing the insane calorie expenditures we were seeing has been met. I think I'm going to move this issue do "done" in terms of 0.F feature requirements, and either edit and reopen it later or make a new issue for the stuff like stamina penalties and things. Any objections?

@lcy03406
Copy link
Contributor

The current implementation is pretty playable.

@Marrim
Copy link
Contributor

Marrim commented Sep 27, 2020

Agreed. It's playable.

It feels as if the messages are a little delayed, e.g. you can get things like "you're tiring out" during sleep and then "you're feeling a bit better rested" during hard work.

In the same vein, the nutrition messages are a little misleading, e.g. getting the "you need to eat more calorie-dense food" at midnight after eating 4 extremely hearty meals that day. I assumed since you're getting them at 12:00 and 00:00 they would sum up today's nutrition, but they apparently just comment on your current weight.

@actual-nh
Copy link
Contributor

I am reminded of the Endurance setup in the (paper-and-pencil RPG) Hero System (best-known for Champions). They had a quite detailed system for Endurance expended from moment to moment, and also a Recovery stat that regularly (or upon resting) gave you back some Endurance (every 12 seconds, technically). Optionally - usually for non-supertype characters - there was also a Long-Term Endurance system. This looked at the ratio between your Endurance expenditure and your Recovery. If it was more than half or so, you started accruing Long-Term Endurance expenditure, which in turn limited your maximum (short-term) Endurance. The Recovery stat also dictated how fast you could recover Long-Term Endurance.

Of the above, I like the idea of getting wearier based on how much of your body's/mind's recovery capacity you've been expending - how well you're pacing yourself.

A couple of other factors in this that may be of interest:

  • First, if you ran out of Endurance, you weren't prevented from doing things - but you could knock yourself out doing so (2 END below 0 converted to 1D6 Stun); in essence, you (depending on severity) would get so light-headed you couldn't function (or would even faint). Stun could be recovered pretty quickly, however, as long as you were still at least semi-conscious.
  • Second, one way to quickly use up Endurance was to "push" oneself - raise one's effective stat/ability at the cost of higher Endurance and (for non-supertypes) a Willpower (EGO) roll. In this instance, if it pushed you below 0 END and you thus started getting Stun, it could be interpreted as, for Strength, pulled muscles. (Technically, that shouldn't be just Stun, but it shouldn't kill you like Body loss would...) This is realistic for what happens when someone uses hysterical strength, BTW (particularly if untrained in the task in question).

Combining the above two suggests allowing not slowing down (or keeping up Stamina expenditure, depending on how one wanted to make it work) even if Weariness was getting in the way - but drop Morale, to represent pushing yourself through it.

@I-am-Erk
Copy link
Member Author

I-am-Erk commented Jun 5, 2021

At this point I think we're OK to close this issue: the basic weariness implementation is complete and mostly it's a matter of balance tweaks or adding cardio.

@I-am-Erk I-am-Erk closed this as completed Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

9 participants