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

More refined weight gain/loss #36976

Open
I-am-Erk opened this issue Jan 12, 2020 · 15 comments
Open

More refined weight gain/loss #36976

I-am-Erk opened this issue Jan 12, 2020 · 15 comments
Labels
Info / User Interface Game - player communication, menus, etc. Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing

Comments

@I-am-Erk
Copy link
Member

I-am-Erk commented Jan 12, 2020

Is your feature request related to a problem? Please describe.
Our current system of directly translating extra calories to weight gain/loss makes these things fluctuate too quickly. Really, it's very difficult to lose more than 1/2 a kilo a week, and more than 1 kilo a week is exceptional unless you're starving. Weight gain is tougher to determine: it's got less of a cap, but it's still hard to put on fat at the rate our survivors can.

Describe the solution you'd like

  • Calculate the survivor's average stored calories loss or gain over the last week based on activity and intake.

Addendum to following: when I wrote this I used flat kcal values for cutoffs, but I think we should actually use the character's base calorie needs per day, BMR in code. For the numbers I've used, consider every 2000kcal to be 1 BMR, so 4000kcal means "2x the character's BMR".

Weight Loss:

  • No changes if the total stored loss is 4000kcal or less, roughly 1/2 kg of weight.
  • Add messages at 4000, 6000, and 8000 kcal deficit to indicate that the player is dieting: "your blood sugar is a bit low, it's hard to concentrate." "You just find it hard to get enough energy."
  • From 4000-8000 kcal, decrease wthreshold, per weariness system recommendation, by [(deficit-4000)/4000]*25%], so at a deficit of 8000 kcal this caps to a 50% penalty to wthreshold.
  • If anyone wants to get mathy, what we really want is a sigmoid curve where the inflection points are at 4000kcal and 8000kcal deficit and the asymptote is a 50% penalty.

Weight Gain

  • Change hunger messages at 4000 kcal to indicate that the player is overeating, unless the player is at a dangerously low BMI already. "You're hungry, but also feeling a bit bloated." "Despite feeling hungry, you can still feel the weight of the last few meals in your guts."
  • After 4000 kcal, reduce the amount of calories going into storage by 1% per 100kcal over 4000. So if you've stored 5000kcal extra in the last week you still get full calories from the food you eat, but whatever excess there is is reduced by 10% before going into storage. This isn't much but it does limit the possibility of absolutely absurd weight gain.

Describe alternatives you've considered
We may want to figure out some sort of time-based cap to weight changes as well, so the effects aren't seen instantly.

Debatably, the average weight lost or gained could also impact hunger. There's a better argument for the loss side of things: if you're constantly dieting you could feel a bit more hungry. There's less of an argument for overeating reducing your appetite irl, but in game it might be helpful just for the feedback element.

Additional context
Adding penalties for too much weight loss, along with the effects associated with them, would help limit people from losing weight too quickly I think.

BOUNTY NOTE: If someone implements this, I'll make at least two sprites of their choice for any mainline tileset

@I-am-Erk I-am-Erk added <Suggestion / Discussion> Talk it out before implementing Info / User Interface Game - player communication, menus, etc. Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics labels Jan 12, 2020
@I-am-Erk I-am-Erk added this to the 0.F milestone Jan 12, 2020
@I-am-Erk I-am-Erk changed the title Slower weight gain/loss More refined weight gain/loss Jan 12, 2020
@Ichthysdekilt
Copy link

This feels like it may eventually veer into the need for an excretion/elimination system. Trying to rectify real-world effects of eating, hunger, and weight loss/gain without the entire elimination process is always going to be just a tad flawed.

Plus sewers and raw sewage must exist for some reason or other, right?

@I-am-Erk
Copy link
Member Author

Elimination doesn't really have much to do with weight gain. We will eventually need to manage sewage when you're running a community, but measuring survivor poop isn't really related to calories and weight gain.

@I-am-Erk
Copy link
Member Author

Added integration to #42343

@EvgenijM86
Copy link
Contributor

You can loose about 1kg a day if you only drink water. Or more, if you do something active that day.

@I-am-Erk
Copy link
Member Author

Sure, and if you do so you'll rapidly run into major problems with inanition, which is exactly what this models

@I-am-Erk I-am-Erk changed the title More refined weight gain/loss More refined weight gain/loss (sprite bounty for implementing) Aug 16, 2020
@EvgenijM86
Copy link
Contributor

Your body adjust to burning fat if you have excess of it. I had tried not eating anything for 3 full days and on 3rd day I was feeling good enough to do some light workout in the gym. But for about 1.5 first days I was feeling very tired and just wanted to rest. I think it's called ketosis.

@I-am-Erk
Copy link
Member Author

If you can provide reasonable data to model your claims besides anecdotes, I can see if there's reason for implementing them in the model. I'd argue though that such a feature might make it harder, not easier, to track if you're getting enough calories.

@meelock
Copy link
Contributor

meelock commented Sep 4, 2020

Another thing to consider is adding protein values to various foods, and adding a mechanic to increase strength/dex through various exercises, and maybe even perception through meditations learned from manuals scattered throughout the world. As well as muscular dystrophy/sensory dulling through long periods of low physical/mental activity. Though these increases and decreases would be astronomically slow (and limited) compared to say, implanting bionics or mutation, it would allow for some interesting long term characters.

@actual-nh
Copy link
Contributor

Protein content is not as much of a worry for muscle gain as people tend to think. The problem that vegan athletes tend to have is with adequate calories (since a lot of vegan food is high in fiber, which fills you up faster) - same problem with children (you have to feed them white bread, not wheat bread, for instance). Healing may be more of a factor in need for protein, although I'm not sure how much research basis the usual advice for after surgery of "protein heals" actually has.

Regarding ketosis, yes, that's how some people react to it (thus part of the appeal of keto diets). It is quite variable, however... and, at least if done with a high-fat/protein diet, causes a lot of health problems long-term. (Intermittent fasting is another matter altogether.)

@kevingranade kevingranade removed this from the 0.F milestone Dec 14, 2020
@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/weight-gain-loss/25540/2

@actual-nh
Copy link
Contributor

One way to make weight gain (and to a lesser degree loss) a bit more reasonable is to account for roughly 1/10 of caloric intake going for digestion - if the caloric intake goes up, that will also go up, on the average (food composition will make significant differences, but CDDA is not (yet) tracking that). I can re-pull-up the research if of interest.

@I-am-Erk I-am-Erk changed the title More refined weight gain/loss (sprite bounty for implementing) More refined weight gain/loss Sep 3, 2021
@I-am-Erk
Copy link
Member Author

This is still desired, it occurs to me that the values should be based on BMI or height rather than flat kcal values to allow them to scale with size for larger mutants.

@ErekoseTCE
Copy link

Managing weight is often over emphasized and surrounded by a lot of myths in real life. Evidence based studies of outcomes have lead Kaiser, for instance, to cease raising concerns for high BMI with patients since those lead to worse health outcomes. Care should be taken to incorporate those biases into the game. That said, acquiring sufficient food is key to any survival game and can't be ignored, so given that

  1. Acquiring enough food would require a lot of physical effort by the survivor, so excessive calorie intake would likely be regulated by the time and activity required to survive in that world
  2. The challenges of other body attributes such as height or strength on a character's performance are way more influential for survival
  3. Intentional out of balance calorie intake (high or low) in a end of world scenario is probably better modeled as an eating disorder, which may better as a trait.
  4. People with eating disorders could be triggered by a an avoidable part of the game mechanics that requires them to micromanage food intake, but as a trait they could just choose not to play with that.

I suggest that removing references to being overweight indicators/penalties in the base game while leaving in place the penalties for not getting enough food to function. Not addressing weight gain at and saving the design and implementation time/thought/effort for features more relevant and influential to actual survival like height or arm reach. If people want to model it, make it a trait so that it can be optional.

I think this would make the game more realistic, more approachable, and kinder.

@I-am-Erk
Copy link
Member Author

That really has nothing to do with this issue, which is exclusively about smoothing out rapid fluctuations in stored weight.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2022

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.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label Dec 5, 2022
@I-am-Erk I-am-Erk added (P5 - Long-term) Long-term WIP, may stay on the list for a while. and removed stale Closed for lack of activity, but still valid. labels Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Info / User Interface Game - player communication, menus, etc. Items: Food / Vitamins Comestibles and drinks Mechanics: Character / Player Character / Player mechanics (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

7 participants