Currently the player gains hunger at a constant rate regardless of activity. They gain 288 units of hunger per day. This seems to have been intended to be approximately 2880 k-calories per day. This is a good average value for someone who exercises a lot every day. For reference, soldiers marching are allotted around 3500 k-calories per day. In Cataclysm, I personally find that 2880 k-calories per day isn't accurate. In most cases, at least for me, I'm either camping in my base, where I should be at my resting metabolic rate, close to 1900 k-calories, or running and fighting where I should be expending more energy than 2880 k-calories. Also, even with this value in consideration, the amount of food required often seems wrong. For example, Pizzas are about 20% less calorie value than they should be. Soft-drinks should be about 130 k-calories, but are only 30 k-calories.
This proposal has two main parts to it.
First, adjust the value of all food & drink in the game to match their real world values for nutrition, so that the nutrition value = k-calories. Currently they're kind of off this, at 1 nutrition kind of = 10 k-calories, but its off by a lot on a lot of foods. This will allow future modders to use real world data sources as an oracle to get values for new foods and drinks.
Second, currently, the player always gains hunger at constant rate regardless of activity. Instead, the player should gain hunger based on their activity. Currently:
hunger_gain_per_hour = 12
The goal is to replace it with something like:
hunger_gain_per_hour = 6+ (moved * 2) + (((1-stamina) * 9)
This way, simply sitting in your base will save a lot food. Moving around as an explorer will be a bit more expensive. Lastly, if you're running/or fighting such that you're down on stamina, that will cost you more hunger. This is much more realistic, but also makes waiting less tedious while allowing combat to remain dynamic.
That's a lot of work though.
Who's gonna do it?
Currently the player gains hunger at a constant rate regardless of activity. They gain 288 units of hunger per day. This seems to have been intended to be approximately 2880 k-calories per day.
No it is intended to be 2500kcal per day. See itype.h. (just pointing out the error, as there is already code for kcal values of foods).
It'd be cool. Could be balanced by changing the spawn rates and spoil-rates for foodstuffs. But it's a lot of work, and maybe not very noticeable gameplay-wise.
@tyrael93 I think A.Fulcrum (discord) already did this for the drinks. I can do the second part and a few hundred foods. It is a lot of tedious work, but it isn't hard.
@Soyweiser Ah, thank you. So this raises a question then: why the extra layer of indirection? It looks like things are just converted into "nutrition units" but the reasoning behind what "nutrition" value to use is decided in kcals.
@OliverUv Part 2 would be noticeable. Part 1 is good to do so that Part 2 can be handled in a saner manner.
@mrkybe probably an historical artefact. The game started with arbitrary values, and some new standard was picked for the kcal->nutrition stuff. I don't know.
For the record, I think linking nutrition to kcal is a bad idea for game balance reasons. If you do this you will be forever stuck untweakable nutrition values. And the only turn-able knob you get is the (way less easy to change) consumption value while doing stuff. This is probably the reason why junkfood has a low nutrition value (while IRL it has a high kcal value) game balance.
The idea sounds well enough, but the question is, does this solve any game balance problem, or does it introduce any? Does it introduce any fun, or remove any? Or is it just making the game more simulationist?
And implementation wise, I think we should complete the hard part (introducing the new consumption system) before we tweak the nutrition values. And we might need to test it a bit so the early game is at least survivable.
So, in conclusion, hardcore linking of nutrition values to real world values is a bad idea imho. Making hunger/thirst increase more dynamic isn't. One problem the former is way easer than the latter, so I'm afraid that people will only do the former.
A long time ago I tried to replace the nutrition with calories.
https://github.com/CleverRaven/Cataclysm-DDA/pull/13857
This was probably before a kcal-> nutrition value was decided in itype.h.
Btw, if anybody is doing food rework, it might help to use the system which is used for meats, where various types of meat inherit values from each other. See https://github.com/CleverRaven/Cataclysm-DDA/blob/master/data/json/items/comestibles/carnivore.json would be a shame to not use this system.
Is there any actual gameplay benefit to this? I hate to be a debbie downer, but if you guys spent 10 hours coding this, whats the actual gameplay benefit? CATA DDA is already complex enough where dwarf fortress players complain about the realism hurting gameplay. Dwarf. Fortress. Players. I mean, your the devs, its your free time, it just seems like it does zero to make the game 'better', and would require a ton of accounting for different things (mutations, cybernetics, activity levels, etc.) - and would add zero to the game vs an easy simple abstraction.
@secretfire42 So the gameplay benefit is that you need less food if you're reading, crafting (that doesn't use stamina), or sleeping, and more food when you are doing things. The additional complexity should be pretty minimal, since there's nothing surprising about being hungrier after being more active. If anything, the current system is more surprising since hunger gain is just a constant value. The implementation on the code side should also be relatively straightforward, since activity level can pretty closely be gotten from stamina.
There's already a stamina system that regenerates and is used by physical activity, and there's already code in (some?, all?) of the long actions to add hunger/thirst levels. Seems like just tying in using stamina to adding hunger/thirst wouldn't be super difficult.
Someone on IRC suggested that it stamina regain could increase hunger/thirst. Seems sensible enough, and is probably simple to implement. Doesn't require rebalancing all foods or reworking nutrition systems, food spawns, food spoil rates, adding disgust/throw-up stuff to chugging cooking oil etc.
Perhaps changing the hunger_gain_per_hour, and the quench one depending on body temperature could also be possible? The hotter you are the more you sweat, and the colder you are the more energy your body needs from food.
I didn't re-read all posts, so I'm not sure no one said it before, but calories
is already a legal field for nutrition definition, take a look on a diet pill
as example. It was introduced here: #14613
_IF_ this gets implemented, the most reasonable and intuitive approach would be to change the daily calorie requirement to the minimum 1900, then cause all actions which use stamina to cause additional hunger with an upper limit of 2800 calories a day.
You're operating on a bit of a false assumption there, @RedPine91; 1900 calories a day is only a minimum for elderly men who spend the majority of their day bedridden and people with similarly sedentary lifestyles. It's not the basal rate for everyone, especially not for generally physically fit humans having to make their way in a non-modern (until they build it themselves, anyways) situation. Even the most basic tasks in CDDA actually take a lot of energy. Have you ever actually butchered an animal (or even field dressed one)? Or stacked 40 rocks on on top of the other so they're seated relatively securely with as few gaps as possible, to make a forge? Ever been sitting for hours with something, spinning the handle of a quern, or grinding the pestle in a mortar? That takes a LOT of muscle energy. Even welding things together actually takes a lot of effort, having to brace the pieces together and tack-weld them, then slowly and carefully welding along the seam, and repeating for as many edges need to be welded together. Even just carrying around a basic early kit setup (say, bone boots, nomad cowl & suit, leather chaps, leather gauntlets, quiver of arrows and a longbow) and going out walking- not running- and coming back without doing anything else (a failed hunting trip, in other words), is carrying about half the load that army soldiers typically carry. You'd have to deliberately dress down in just a t-shirt, shorts, socks and sneakers for your walk, and stop and just hit 5 a bunch to pass turns, to reflect such a casual walk. Seriously, BMI/BMR are terrible metrics to base anything off of for an apocalyptic scenario because they're explicitly designed around the work level of the modern person in the western world. Just look at the meal portions recommended by federal governments; they are geared to the overall much less physical labour that is involved in the typical person's day.
2500 marks a good basal rate for the Survivor, because they need the extra energy to survive, just doing basic actions like butchering, harvesting, preparing, and so on. It's also not THAT difficult to get food, even in a Lab Start bare of food drops placed about (though you won't be happy eating blob globs, tainted meat, and human flesh, that's for sure). While you could sim it out to weight carried adding varied amounts over time, abstracting it out and just having it tied to stamina consumption is fine.
Referring #18625 as it has also a nice discussion regarding availability of calcium.
No discussion in over half a year, closing.
Most helpful comment
There's already a stamina system that regenerates and is used by physical activity, and there's already code in (some?, all?) of the long actions to add hunger/thirst levels. Seems like just tying in using stamina to adding hunger/thirst wouldn't be super difficult.