Cataclysm-dda: Recipe display in crafting menu doesn't match resulting product.

Created on 12 Feb 2019  路  7Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug
Look at Vitamins/Calories/Volume/Weight for Cooked Oatmeal and Deluxe Cooked Oatmeal.

Cooked Oatmeal: Iron (12% RDA)
Deluxe Cooked Oatmeal (Using Sugar in my example): Vitamin C (58% RDA)

Wot?

I haven't checked values for other recipe results but I imagine similar things will be seen throughout these valuesfor different foods (I.E Nonsensical results).

To Reproduce
Steps to reproduce the behavior:

  1. Look at the foods in the crafting menu.

Expected behavior
Values should likely be calculated based off the food included in an recipe.

For example, if something is Cooked Meat + Zuchinni, it should combine the values of the two to reach the value of the prepared item.

While this isn't exactly how it works in real life (Bioavailble nutrients can change based off of how food is prepared if I'm not mistaken), it will likely make sense from a development and maintenance perspective.

Instead of the value of a resulting recipe being hard coded as they are now, we can do a larger initial amount of work adding values to all food recipe components and add a simple system to combine that value into an end result.

https://github.com/CleverRaven/Cataclysm-DDA/blob/7bbaecb61eb35e429f8619fe6ba74a67cee7018e/data/json/items/comestibles/wheat.json#L227

https://github.com/CleverRaven/Cataclysm-DDA/blob/7bbaecb61eb35e429f8619fe6ba74a67cee7018e/data/json/items/comestibles/wheat.json#L248

Versions and configuration(please complete the following information):

  • OS: Win10
  • Game Version: 0.C-37404-g6895100 (tiles)
  • Tiles
  • Mods loaded: ALL the mods. Really, there are a few.
Crafting / Construction / Recipes Balance Food / Vitamins

Most helpful comment

So my proposed fix for this: for item results with NUTRIENT_OVERRIDE flag, no change
otherwise, show a range of calories (and vitamins) instead of a static number in the crafting window

All 7 comments

This will also help resolve the issue of a resulting recipes vitamin (and caloric) values being hardcoded regardless of the included ingredients.

Continuing with Deluxe Cooked Oatmeal example:

  • Adding sugar will not add Vitamin C and the iron should remain from regular oatmeal.
  • Adding milk or condensed milk would add calcium
  • Etc.

Also worth noting is that the Volume and Weight Differ somewhat significantly for each of those recipes.

This should likely also be remediated in some way.

you are only looking at the values in the crafting menu. crafting the actual food will give you real values.

So i managed to re read your issue, and i have to say that it's already implemented by #27252

@KorGgenT

Thanks. I tried searching for a duplicate issue but did not find yours.

If this is still showing the incorrect values in the crafting menu perhaps I should update the ticket to reflect that?

Seems it would make sense to fix that as well, even if it's low priority.

So my proposed fix for this: for item results with NUTRIENT_OVERRIDE flag, no change
otherwise, show a range of calories (and vitamins) instead of a static number in the crafting window

Just to let people know: I am working on this issue. It's slow going, since I don't have much dev time at the moment, but I think I have a workable plan.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremyshannon picture jeremyshannon  路  3Comments

BorkBorkGoesTheCode picture BorkBorkGoesTheCode  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments

Coolthulhu picture Coolthulhu  路  3Comments

ituluwituluwzev picture ituluwituluwzev  路  3Comments