Nutrition rebalance project

So, I have been getting progressively more annoyed at the incredible variance of nutrition values in cooked products. Quite a few cooking recipes either destroy boatloads of nutrition, or create it out of thin air. Let me illustrate using two pretty extreme cases:

Sausage gravy – 76 total nutrition – created from:
1 chunk of meat (28 nutrition when cooked)
1 lard/tallow (worth ~36 nutrition in most other recipes)
1 flour (could have been baked into 2 2/3 bread, worth ~53 nutrition)
2 mushrooms (36 total nutrition when cooked)
Total nutrition of ingredients: 153
You lose 77 nutrition, over half the total, by making this recipe!!

On the other end of the spectrum:

Pemmican – 296 total nutrition – created from:
2 lard/tallow (again, worth about 72 nutrition in other, more reasonable recipes)
6 meat jerky (worth 54 nutrition)
2 dehydrated veggies (worth 40 nutrition) OR 1 raw fruit (worth anywhere from 8 to 30 nutrition)
Total nutrition of ingredients is at MOST, 166, even if you used inefficient ingredients. In which case, you created a whopping 130 nutrition out of thin air.

These and other inconsistencies have nagged at me for too long!! So I have started a project to balance food a bit. I got partway through, and realized, “It would be a damn shame if I did all this work and the community thoroughly despised my idea,” and so here I am, seeing if you guys approve of what I’ve done so far. I made a bit of a write-up, at first for myself to stay organized while I planned the changes, but I polished it for posting here. You can find it below.

I would greatly appreciate any positive feedback or constructive criticism, or even just your ideas (within reason of course; this is a pretty time-consuming undertaking already, and I have limited time to spend on it)

The Great Food Rebalance

Definitions:
BCN: Base Crafted Nutrition -- The nutrition value this food provides when crafted in the simplest possible way.
BCE: Base Crafted Enjoyability -- As above, but for enjoyability.

Axiom 1: Raw food should provide nutrition less than or equal to the BCN value.
Axiom 2: Processing foods should only ever add nutrition or leave it unchanged, never subtract. Nutrition gain should not exceed 10-20% of raw products in most cases.
Axiom 3: Processing foods should provide some benefit, usually enjoyability and/or nutrition, however health benefits or extended/perpetual preservation qualify as well.
Axiom 4: In recipes that take one of several food types, ratios of the possible ingredients should be adjusted such that the nutrition values are as even as possible. (Example: Granola used to
         take either 4 oatmeal and 4 rice, a choice between using 196 or 144 nutrition. This was adjusted to 4 oatmeal or 5 rice, a choice between using 196 and 180 nutrition.)


		 
List of BCN and BCE values being used to balance derivative foods:
		 
Food		Crafted to						BCN		BCE
Meat		Cooked Meat						28		0
Fish		Cooked Fish						23		0
Stomach		Boiled Stomach					15		-3
Offal		Cooked Offal					28		-5
Eggs		Boiled Egg						38		2
Fruit		Cooked Fruit					18		2
Vegetable	Cooked Mushroom, Baked Potato	~20		1 to 4
Oatmeal		Cooked Oatmeal					48		2
Rice		Cooked Rice						36		1
Beans		Cooked Beans					50		1
Flour		Bread							53		~3
Bread		-								20		1
Oil/Fat		~~Corn Tortilla					~36		?
Milk is more difficult to nail down, best guess is around 18 nutrition per unit (which is what you get if you process it into cheese)
Cheese		-								30		5
Bone		Bone Broth						2		0

Note on bread/flour: flour BCN and BCE were calculated with bread, not flatbread. This has the effect of making alternative uses for flour (pies, pancakes, etc) far more
attractive if yeast is not available, which seemed like the desired effect to me, even if it slightly breaks axiom 2.
Note on junkfood: Generally, I made junkfood have ever so slighly less nutrition than its base components (breaking axiom 2) but they generally have absurdly high enjoyability to compensate.



List of buffed nutrition values:

Food				Before	After
Dlx Cooked Oatmeal	32		34
Protein Shake		16		28
Dehydrated Fruit	16		18
Dehydrated Meat		20		28
Rehydrated Meat		22		28
Peanut Butter		5		20
PB Sandwich			30		60
PB&J Sandwich		45		72
PB&H Sandwich		45		66
PB&M Sandwich		45		66
Fruit Pie			16		22
Kompot				5		6
Waffle				37		40
Pancake				22		40
Fruit Pancake		25		45
Chocolate Pancake	25		40
Cookie				12		16
Nachos with meat	12		13
Chili Con Carne		48		76
Curry with Meat		50		60
Vegetable Soup		23		28
Mushroom Soup		20		26
Pelmeni				48		72
Sausage Gravy		38		86
Taco				15		17
Meat Pie			16		24
Salted Meat Slice	21		28
Bologna				3		6
Smoked Meat			26		28
Deluxe Sandwich		38		40
Dlx Scrambled eggs	33		36



List of nerfed nutrition values:

Food				Before	After
Pemmican			37		21
Fruit Juice			4		1
Juice Pulp			15		8
Cranberry Juice		3		2
Protein Drink		11		10
Granola				31		27
Nachos meat+cheese	24		23
Boiled noodles		30		28
Sloppy Joe			31		24
Meat Fried Rice		41		27
Baked Beans			44		22
Dlx Beans + Rice	36		21
Broth				40		20
Meat Soup			40		32
Woods Soup			35		31
Hamburger			30		24
Cheeseburger		35		32
Meat Pizza			50		45
Sushi Rice			36		20
Meat Temaki			40		36
Lasagne				38		22
Spaghetti Bolognese	25		22
Canned Meats		38		28
Aspic				25		18
Glazed Tenderloins	65		36
Pickled Meat		45		30
Meat Sandwich		30		25



List of changed enjoyability values:

Food				Before	After
Cranberry Juice		3		7
Dehydrated Fruit	2		-1
Rehydrated Fruit	4		2
Dehydrated Meat		0		-3
Rehydrated Meat		2		0
Jam Sandwich		15		12
PB&J Sandwich		6		16
PB&H Sandwich		6		16
PB&M Sandwich		6		16
Fruit Waffle		6		12
Chocolate Waffle	12		14
Fruit Pancake		3		8
Chocolate Pancake	6		9
Chili Con Carne		5		12
Curry with Meat		8		12
Broth				1		0
Bone Broth			10		0
[All soups]			1		4
Spaghetti Bolognese	4		10
Canned Meats		2		0
Salted Meat Slice	2		1



List of changed recipes:

Food					Ingredient(s) changed					Changed to...
Fruit Leather			1 fruit, 5 sugar						3 fruit, 15 sugar
Dlx Cooked Oatmeal		oatmeal, sweetener/fruit, water			oatmeal, sweetener, fruit, water
Granola					4 oatmeal/4 dried rice					4 oatmeal/5 dried rice
Cookie					flour/oatmeal/rice						flour/oatmeal
Pemmican				2 dried veggies/1 fruit					2 dried veggies/2 fruit
Sloppy Joe				red sauce/canned tomato/2 tomatoes		red sauce/canned tomato/tomato
Meat Fried Rice			meat/2 sausage/2 bacon					meat/sausage/bacon
Chile Con Carne			red sauce/chili pepper/powder			chili pepper/powder
Broth					egg/1 or 2 veggies						egg/1 veggie
Meat Soup				pasta/veggie/egg/beans/rice				pasta/2 veggies/egg/beans/rice
Vegetable Soup			pasta/veggie/egg/beans/rice				pasta/2 veggies/egg/beans/rice
Woods Soup				meat/2 eggs								3 meat/2 eggs
Taco					3 corn tortillas						1 corn tortilla
Lasagne					seasoning/red sauce/2 tomato			seasoning AND 2 red sauce
Spaghetti Bolognese		seasoning/red sauce/2 tomato			seasoning AND 2 red sauce
Vacuum-Packed Meat		2 meat									1 meat
Bologna					1 meat, 5 salt, 5 charcoal				2 meat, 10 salt, 10 charcoal



List of misc changes

Wherever Fruit Jam was usable instead of a raw fruit, it now requires 2 units per standard fruit rather than just 1.
Separated Kompot recipes: one that only allows Juice Pulp but is identical otherwise, and one that allows anything EXCEPT Juice Pulp but provides 2 units of Juice Pulp.
Wherever Powdered Eggs were used, 8 powdered egg units are required rather than 5, to make them nearly equivalent to normal eggs.
Most raw fruit changed to 16-18 nutrition.
All varieties of pancakes and waffles reduced to 5 days perishability.
Egg substitute removed from meat fried rice recipe, too much of a pain to balance. Besides, it is called MEAT fried rice, right?
Most recipes with cooked meat with a rot time of 15 days were reduced to 10 days.
Changed quench of cranberry juice from 37 to 40.
3 Likes

I have one requirement for something like this, you need to include a mechanism that prevents new additions from upsetting balance, and prevents adjustments to existing items or systems from regressing.
If you dont have a way to do that, I’m not interested in drawn-out discussions and reviews of changes that will make things temorarally consistent, but immediately start degrading again afterwards.

Can you elaborate a bit what you mean exactly? I’m sure I could easily write code that sums and averages the nutrition of all ingredients, and checks that nutrition_from_product is within 90% to 130% of nutrition_from_ingredients. Presumably that would fit the bill, but when would we check it? Each time the game is built? Each time the game loads all the JSON files? Both seem like significant time overhead. Additionally, I am a pretty good coder but C++ is certainly not my best language, and I am somewhat new to git; as such, I wouldn’t know where to begin to write a unit test that runs for each commit or whatever.

This is very nice, I’ve noticed the problem lots of times, so I really appreciate that somebody is looking to fix it.

Some notes from me personally:

  1. 86 nutrition for a sausage gravy? I don’t really want to starve my character to be able to consume those. Maybe make it 43 nutrition but double the amount? The same with all the items that exceed 50 nutrition, really.
  2. What about the vitamins? Some of them are lost completely in the recipes. Or sometimes one recipe yields more vitamins than other one, using the exact amount of ingridients. Like veggie pizza and pie having equal vitamin values and needing 2 veggies, but you get 4 pizzas and 6 pies. Or lemonade that needs 2 lemons to make (666% RDA for Vit. C?) and nets only 1 portion with 83%. Anyway, I understand that to make vitamins stay in food, one needs to make a ton of new recipes for each fruit, but maybe there is some other way?
  3. Also I can recall some food items having a choice between ingridients with nutritional value and without. Like pizza requiring either seasoning, which is empty in nutritional context, or some sause, which is not.
  4. Also, drinks! Bee Balm tea, Herbal tea, Dandelion tea are nearly useless right now. They restore less quench than water and you also lose some ingridients to get 1-3 nutrition without any other profit. Not that tea should be as filling as lard, but maybe some byproducts could fix this?

I’m no pogrammer, so please don’t throw bricks at me for not understanding how much code is required for simple things. I’m just telling you my thoughts.

dried fruit is tasty, why negative enjoyment?

Are you looking at adjusting any of the cooking times?

While I am annoyed whit this as well, nutrision /quench seems to be sacrificed for enjoyment or health-iness

@Rose
Great feedback!

  1. Yes, already thought of that, though I probably should have mentioned it in the write-up! I intend to do exactly what you said, reduce nutrition by half and double portions for all foods over 50 nutrition. I just wanted to list them this way so that it’s easy to tell at a glance how they are being changed
  2. Unfortunately, I don’t intend to touch vitamins. I play with them disabled, for precisely the reasons you’ve mentioned. I’ve thought about fixing them in the past, but making it so vitamins are carried through recipes is a problem would take a ton of code to implement from what I can tell.
  3. Yes, I have noticed that, and I have attempted to alter recipes in those cases. Often, (such as in the case of lasagne) I simply split the requirements into both nutritional and non-nutritional ingredients, and require one of each.
  4. Don’t worry, I intend to get to every food item in the game eventually! Teas could use a byproduct perhaps, but it won’t be a very good quality one. Most tea has medical uses; for the examples you’ve mentioned, Bee Balm Tea has the same effects as Cough Syrup I believe, though Herbal Tea and Dandelion admittedly don’t do anything special. I thought herbal tea was a mild depressant, helping you sleep a bit, but I can’t find evidence that is the case. Perhaps Herbal and Dandelion Tea could use some sort of health benefit (maybe a simple buff to the health stat bonus, in line with pine needle tea).

@dissociativity
Fair enough. My original thought was that a negative enjoyment encouraged cooking it into recipes rather than eating it plain, but I suppose that the enjoyment on fruit-based-foods is so ridiculously high that even with the original values, that incentive is already there. I’ll change it back.

@Gregbois1
I’m not against it per-say, I just don’t have a baseline to make changes using (like I do for nutrition and enjoyment, as laid out in the axioms at the top of the write-up). Without a baseline, changes I would make are arbitrary and pointless, and I’m not about to spend hours of my time researching how long it takes to cook different foods to obtain that baseline. I feel basically the same way about food bulk & weight.

@Brony_RainBoom
That’s a nice thought, but it’s just not the case. Some foods are very simply terrible in every way with no upside, and some foods are simply amazing in every way with no downside. It’s quite clear that the food recipes are simply a mishmash of stuff people thought would be cool over the years, and that most of those people didn’t put too much effort into balancing their addition with all the other foods. Which is why it’s understandable that Kevin wants a way to prevent that from continuing in the future.

Speaking of @kevin.granade, I was thinking about it, would a well-written and crystal-clear set of rules that are enforced manually by PR reviewers whenever food recipes are added/changed be enough? I would really appreciate some feedback/help brainstorming here, I have sunk quite a bit of time and thought into this already, and thus am committed to doing it, and doing it right. I am happy to write a bunch of C++ code to back this up, if that’s what’s required, but I need direction.

2 Likes

I have nothing much to add critique wise but I appreciate what you’re doing. The food system in any game is a critical but innocuous component and in a game with a list that could almost be called bloated, this could potentially be a massive QOL improvement. Thank you.

1 Like

Both work, right now were doing this at json load time because it can change based on mods, and mods aren’t necessarily present at build time. If we were to identify more extensive cross-checking to perform, perhaps we would do some kind of checking at build time.

Not significant no, consider that for each recipe you simply compare the sum of the attributes of the ingredients to the attributes of the output, it’s not that much processing.

Take a look at e.g. https://github.com/CleverRaven/Cataclysm-DDA/blob/4c0b3eee36d5b9f9c42ac4a898bdf17effb855e8/src/item_factory.cpp#L723 for some existing checking, though I’m not sure there are any consistency checks for recipes yet.

That would suffice, mostly because it would be sufficient to translate into automated checks.

1 Like

Great, thanks for the info. I will take a stab at implementing it myself (at json load time), I could use the C++ experience. If it ends up slowing down the project too much, I will write up some guidelines instead.

generally cooking things makes the item more digestible and enjoyable, at the cost of size/moisture (if water isn’t used to supplement this) and sometimes nutrition, just a thing to keep in mind.

Yes, that’s a good point, and I’m certainly trying to make sure enjoyability of food is increased through cooking, but as far as the other two, reducing nutrition through cooking seems like a huge gameplay sacrifice for a very minor realism benefit (if cooking reduces nutrition rather than increasing it, cooking will have too small a benefit for players to bother with it). And reducing quench through cooking makes sense, but it seems like a lot of effort for a change that just won’t have much impact (quench is not really a serious concern in most cases).

If anyone disagrees with any of that, I’d love to hear your perspective.

1 Like

I think that cooking is something players will naturally do, even if it’s at a slight loss. I’m not saying implement it, I’m just saying that if it were truly a minor reduction it would be outweighed by the increase to enjoyment/more rounded vitamins. Unfortunately, the values you listed initially are ridiculously imbalanced.

In spite of that, it never even crossed my mind to just eat low-end/non-cooked foods. My characters always eat pasta and breads and the other cooked dishes. There’s really no reason for it other than that I’m a human being and assumed that food needs to be cooked.

I don’t know how clear my point is, I’m just saying that I think the average player will naturally assume cooking food is better for them, and so they’ll do it whether it’s true or not. Only the players that want to min-max will change their behavior for a small (>5) difference in nutrition (I’m talking after you balance things).

I think that if you balance cooked foods, so that they provide a better distribution of vitamins, then there will be added incentive to those min-maxers to spend the time cooking things. IE: Cooked Vegetables will have roughly the same vitamin values as uncooked, but a veggie pizza will have more vitamin values in more categories, offering a reason to craft something more complex.

I often play with simplified nutrition, so I’m not overly knowledgeable of the different vitamin requirements, but that seems like the logical direction to go. I’m not sure how else to give incentives to cook.

Also, shout out to Rose, because her post very much took the words out of my mouth.

I think it’s a great idea you’re looking to invest some time in fixing the nutrition/quench system, as they both need it. It’s particularly bothersome to me that my character survives on around one bottle of water each day. Real life MurderUnicorn drinks 2 liters + every day of the week, and he’s not out there culling zombies and running marathons.

TLDR: Thanks for looking into working on the system. Good luck, I don’t have many ideas.

I think nutrition values should actually be slightly increased. The time cost sunk in cooking, especially in large batches, needs a better return than just more vitamins especially when multivitamins are extremely plentiful.

@TheMurderUnicorn

I think that cooking is something players will naturally do, even if it’s at a slight loss. … I think the average player will naturally assume cooking food is better for them, and so they’ll do it whether it’s true or not. Only the players that want to min-max will change their behavior for a small (>5) difference in nutrition (I’m talking after you balance things).

This is good to hear. Part of my motivation here is that I tend to min-max a lot, but I don’t particularly like min-maxing, I just naturally do it, unless there’s not much to be gained from doing so. So this project for me is an effort to get myself to stop crunching numbers and just enjoy the game :wink: But it’s good to hear that people with other playstyles/mindsets see this as a positive change.

I’m a human being and assumed that food needs to be cooked. … I think that if you balance cooked foods, so that they provide a better distribution of vitamins, then there will be added incentive to those min-maxers to spend the time cooking things.

The goal is to make the motivation for min-maxers three-fold. Firstly, the most nutrient dense foods either need to be cooked or are pretty harmful uncooked (flour, raw meat, raw fat). The other two benefits are morale increase, and the slight nutrition bonus most recipes provide (about 10%). For players who aren’t min-maxing, the motivation for cooking is unnecessary, because as you so elegantly put it, they are human beings and will assume food is better off cooked (and if I do a good job, they will be right).

It’s particularly bothersome to me that my character survives on around one bottle of water each day. Real life MurderUnicorn drinks 2 liters + every day of the week, and he’s not out there culling zombies and running marathons.

I did some quick testing with a brand new character (fixed scenario) without any of the thirst traits, waited 24 hours, then drank clean water til slaked, and she drank 1.5 L of water (3 bottles). This is on par with the numbers: characters lose 288 nutrition and 288 quench daily AFAIK, and 1.5 L of clean water is worth 300 quench. Check to see if your character really is drinking only 1 bottle of water, and if so, make sure you don’t have any relevant mutations or bionics (e.g. recycling unit), and that the food you’re eating isn’t super high on quench (e.g. soup).

In any case, I agree that characters should be going through more food/water when they are exerting themselves (which isn’t really the case right now) but that’s kind of out of scope for this project at the moment, maybe I’ll work on that next.

@Gunpowder17
You think nutrition values should be increased relative to what? Their current values, or the total nutrition of the ingredients? The goal is for the primary return from time spent cooking to be big morale bonuses, which are actually highly impactful. If there is a huge nutrition bonus to cooking food, it leads to silly stuff like starving characters spending 5+ hours cooking a perfectly spiced masterpiece, whereas realistically they would just be charring it over the fire and putting it in their mouth as fast as possible. Only survivors with a comfortable food supply would be spending extra time making it real tasty.

I do intend to add lots of batch-time-bonuses to recipes that don’t yet have them, though.

As I’ve mentioned, I’m not messing with vitamins in this project, that’s a whole can of worms I just don’t have the interest or experience to open.

Hmm. I didn’t realize I was consuming such volumes of liquid in game. I only really drink when I need to, never having waited 24 hours to actually see the total I was consuming. I also didn’t take into account the added liquids from food, which, even with basic fruits is enough to need accounting for.

I concede my point on quench. I also understand that affecting an exertion system is beyond your scope. Still think what you’re doing is great, even though I was wrong. x_x

EDIT: I also noticed I previously used > instead of < in my previous post. So now I really feel bad. That’s why I have a big frownie face representing me.

Probably not much honestly, a meat sandwich has a 30 nutrition value even though it’s made from 28+ cooked meat and two 20+ flatbread, a 10% increase in the final nutrition value would make a world of difference

Edit: This would be a nerf to the current value because the sandwich comes with three charges. The current recipe adds 21+ nutrition, basically adding the nutritional value of another flatbread from just two flat bread and cooked meat. If I can fill up two floor trunks with non perishable food and another ice box with perishable food in the middle of the apocalypse, foods a bit too easy.

this would help a lot with some foods that really need it. can i recommend food to add? deluxe pizza. have meat pizza, cheese pizza, and vegetable pizza (and poser pizza). and like a sandwich you should be able to combine all the toppings into one super pizza. should be 1 cooking skill higher then the lesser pizzas and more enjoyability.

Yes, as you can see in my write-up, I nerfed meat sandwich from 30 nutrition to 25, so taking into account the 3 charges, it now gains a total of 7 nutrition (just under 10%) upon making the recipe rather than 22 nutrition. This is indicative of the changes in general, 10% nutrition gain is the figure I am hovering around for most of the recipes.

@tarburst98
I am unlikely to be adding new foods in this project but if I do, that is a pretty good idea and I’ll keep it in mind.

1 Like