Topic: Strange nutrition when "drying" berries  (Read 10169 times)


koteko

« on: February 14, 2018, 07:47:09 PM »
I'm using this recipe to dry blueberries, but it seems that the output has zero fat and proteins.

Code: [Select]
.Dry Berries.       *COOKERY*  /5/ \6d\   |-2|  :151:  [patch:20]
{Berries}        [remove] [roast] [name:Dried %s] [naming:original] [patchwise]
{Board} '+to set the mushrooms on' [noquality]
[SPOILAGE_DAYS:0]
[COOK_WEIGHT_DIV:2]

I also tried using WATER:0 instead of COOK_WEIGHT_DIV, with even stranger results.

These are the nutrition values I get:

  • normal blueberry: 6 carb, 1 fat, 1 protein, weight 0.1
  • dried blueberry with WATER=0: 6 carb, 0 fat, 0 protein, weight 0.1
  • dried blueberry with COOK_WEIGHT_DIV=2: 12 carb, 0 fat, 0 protein, weight 0.05

I don't really understand why I get that output with either option. Can anyone shed light? :)
« Last Edit: February 14, 2018, 08:30:54 PM by koteko »

PALU

« Reply #1 on: February 14, 2018, 10:26:21 PM »
No insight, but the Njerpezit Cooking mod uses (I think I've made something to allow for mixed berries, but that's not important here) both divider and water tags:
.Dried berries.  (4)   *COOKERY*   /10/ \6d\  %30%    :151: 
{Berries}   #8#     [remove] [roast] [name:dried %s] [optional]
{Board} '+to lay out the berries in the sun'
[COOK_WEIGHT_DIV:10]
[WATER:0]
[SPOILAGE_DAYS:180]

Also, a max weight (optional) is used, rather than patch/patchwise.  I think skipping the optional berries completely results in berries with no nutrients (check the cooking mod, as it's recently been added to this board), or ask Bedlam what makes the recipe tick.

And, of course, using a mushroom board won't work with berries ;)

caethan

« Reply #2 on: February 15, 2018, 05:38:59 AM »
Played with modded items and COOK_WEIGHT_DIV a bit, and it looks like odd values in the nutrients get rounded down before applying the modifier.  I made some grey sludge to test with instead of collecting berries:

Code: [Select]
.Grey sludge. *COOKERY* /1/
[SPOILAGE_DAYS:0]
[WATER:9]
[CARB:45]
[PROTEIN:4]
[FAT:3]
[WEIGHT:0.1]

If I use COOK_WEIGHT_DIV like this:
Code: [Select]
.Dried sludge. *COOKERY* /1/
{Grey sludge}  [remove] [roast]
[COOK_WEIGHT_DIV:3]
then the original item has nutrients just as described, and the dried sludge has weight of 0.03333, just as expected, and water 24 (i.e., 8 * 3), carb 132 (i.e., 44 * 3), fat 6 (i.e., 2 * 3), and protein 12 (i.e., 4 * 3).

The same thing happens if I set one of the nutrients in the processing:
Code: [Select]
.Dried sludge. *COOKERY* /1/
{Grey sludge}  [remove] [roast]
[WATER:0]
then I get 0 water as requested, but the odd nutrients get rounded down, so the output item has 44 carb and 2 fat. 

The other interesting bit is that if you set COOK_WEIGHT_DIV too high, you can trigger an overflow - nutrients aren't allowed to be higher than 255, so setting CARB:100 and COOK_WEIGHT_DIV:3 will result in a CARB:255 item and a loss of 1/6th of your nutrients. 

My interpretation of this is that the object nutrients are stored in 8 bits, but the low order bit gets dropped during cooking processing for some reason and isn't ever restored.

caethan

« Reply #3 on: February 15, 2018, 05:42:27 AM »
Incidentally, the rounding doesn't happen when processing meat.  I pulled up my spreadsheet of meat nutrition values, and elk meat is normally 3 fat and 21 protein.  When smoked, the weight goes down to 1/8 the original (0.125 lbs) and the nutrients are 24 fat and 168 protein, no nutrient loss from rounding.  You do see the max nutrient thing, though, with dried bear meat.

koteko

« Reply #4 on: February 15, 2018, 05:55:00 AM »
Good insight, @caethan!

I wonder if there's a bug in there (seems like it, since it only affects odd numbers), or if we are misunderstanding the process?

@Sami, could you help?
« Last Edit: February 15, 2018, 06:05:25 AM by koteko »

koteko

« Reply #5 on: February 15, 2018, 06:05:00 AM »
No insight, but the Njerpezit Cooking mod uses (I think I've made something to allow for mixed berries, but that's not important here) both divider and water tags:
.Dried berries.  (4)   *COOKERY*   /10/ \6d\  %30%    :151: 
{Berries}   #8#     [remove] [roast] [name:dried %s] [optional]
{Board} '+to lay out the berries in the sun'
[COOK_WEIGHT_DIV:10]
[WATER:0]
[SPOILAGE_DAYS:180]

Also, a max weight (optional) is used, rather than patch/patchwise.  I think skipping the optional berries completely results in berries with no nutrients (check the cooking mod, as it's recently been added to this board), or ask Bedlam what makes the recipe tick.

I tried with both, and it's the same as using COOK_WEIGHT_DIV only. Apparently setting the water to zero doesn't change the weight (as you can see in my first post) which might be a bug, not sure.

Just in case you want a fix to that optional berry thing: one can just put one small compulsory berry, and then 8 lbs optional. I use that trick to render fat.

 

anything