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

Adjust Raw Butter recipes, Adds raw butter to recipes that use butter. #77244

Closed
wants to merge 5 commits into from

Conversation

Sirbab
Copy link
Contributor

@Sirbab Sirbab commented Oct 22, 2024

Summary

Bugfixes "Fix raw butter calories, add salt to raw butter recipes, Add raw butter as option to recipes that use butter"

Purpose of change

Fixes #77224, or at least, as much as I'm able to.
Raw butter before was making super low calorie versions of butter, some recipes that used butter did not allow for using raw butter. Salt was added to raw butter recipes for two reasons, first as raw butter is used as a drop in replacement for butter it should match it vaguely in terms of taste. Secondly, when looking up homemade butter recipes, all four I examined had a line recommending adding salt to taste.

Describe the solution

From a few resources, like FDA definition of butter, and several recipes for homemade butter, I determined that homemade butter should be approximately 80-85% milkfat, and found that the current listing for raw butter at ~109 calories was more or less accurate.
This adjusts the output charges of raw butter from the churn from 99 to 22, resulting in raw butter with 111 calories per serving, and reduces the output of the shake method of raw butter from 33 to 13, resulting in raw butter with 113 calories per serving.
This PR also adds raw butter to recipes that seemingly lack it as an oversight, as they use butter. This particular facet of the PR may be considered over-reach and I'm happy to split it off if desired. The recipes changed for this facet are the condiment list, shillelagh, escargot, pbj toast, and lobster roll.
The PR also adds the requirement of 1 unit of salt per crafting operation of raw butter.

Describe alternatives you've considered

1: Remove Raw Butter entirely, make all current recipes craft regular butter instead. This means that crafted butter would last longer on average by a few days, but that seems reasonable. In the desire to not change more than necessary, I opted to not do this unless it's broadly desired.
2: Rename raw butter to homemade butter. I feel like the name raw implies a state that's better or more refined.
3: Add nutrient_override to raw butter, so we don't run into this mess of juggling calories. It would also allow for fixing the side issue of the buttermilk being magic calories. That said, given that seems to be part of a broader crafting issue, I opted not to do so.
4: Splitting this PR into several, as I worry this might be considered scope creep between the charge adjustments, adding the raw butter to recipes that use butter, and adding salt to the recipes.

Testing

Tested on:

  • OS: Windows
    • OS Version: 10.0.19045.4894 (22H2)
  • Game Version: cdda-experimental-2024-10-21-2303 7fc0414 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth]
    ]

I started a new game using these changes, encountered some errors, fixed them, loaded into the world, set skills to 10, spawned the "things to do with milk" book, several containers, tools etc, and turned milk jars into heavy cream. Next, I crafted one craft of raw butter using the churn method, observed the 111 calories that match calculation. Next, I crafted the shake method, encountered an issue where the calories in did not match calories out, meaning we have magic calories in this, as well as other recipes that use food and byproducts. That seems outside the scope of this issue, so for now I'm accepting the buttermilk being free calories. I adjusted the recipe again and found it to make raw butter with 113 calories, which is within the 5% difference I set for myself as a metric.
If one wishes to test the byproduct issue, spawn 2 units of chunk of fat, notice they have 1923 calories each, then craft lard, and notice you have 6 units of lard at 641, and one unit of cracklins at 270. This means that you have 3846 calories in, and 3846+270 calories out. Assuming this is correct and I'm not making an error, I believe this warrants a bug report.

Additional context

Please let me know if my changes need adjustment, or split up. I'm still trying to understand what degree of scope expanse would warrant making multiple PRs. I want to make clean edits, but I don't want to annoy reviewers with 3 different PRs if that's unnecessary.

Adjusts the recipes for creating raw milk to correct abnormal calorie outputs of raw butter, also adds salt to the recipe.
Changed the recipes for:
"condiment", Shillelagh, PBJ Toast, and Lobster Roll to allow for using raw butter as well as regular butter.  It seemed like oversight that these recipes lacked this option.
Whoops, forgot to lint, this commit fixes that.
Game was throwing array errors because I wasn't formatting the recipes correctly, this fixes that.
Turns out food byproducts aren't counted when comparing recipe input vs output, or they are in the cases of making lard, and making raw butter.  This changes the recipe to magically make more butter, but at least it's within 2% of the nominal calories of raw butter now.
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Items: Food / Vitamins Comestibles and drinks Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Oct 22, 2024
Copy link
Contributor

You are creating a pull request with the master branch as the head branch. This is likely a mistake unless you really know what you are doing. You may read https://docs.github.com/en/get-started/quickstart/contributing-to-projects#creating-a-branch-to-work-on for a typical workflow of contributing to a project on GitHub.

@github-actions github-actions bot added the <Bugfix> This is a fix for a bug (or closes open issue) label Oct 22, 2024
@@ -227,6 +227,6 @@
"activity_level": "LIGHT_EXERCISE",
"result": "PBJ_Toast",
"copy-from": "buttered_toast",
"components": [ [ [ "jam_fruit", 1 ] ], [ [ "butter", 1 ] ], [ [ "any_peanutbutter", 1, "LIST" ] ], [ [ "toast", 1 ] ] ]
"components": [ [ [ "jam_fruit", 1 ] ], [ [ "butter", 1 ], [ "raw_butter", 1 ] ], [ [ "any_peanutbutter", 1, "LIST" ] ], [ [ "toast", 1 ] ] ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JSON & C++ formatters] reported by reviewdog 🐶

Suggested change
"components": [ [ [ "jam_fruit", 1 ] ], [ [ "butter", 1 ], [ "raw_butter", 1 ] ], [ [ "any_peanutbutter", 1, "LIST" ] ], [ [ "toast", 1 ] ] ]
"components": [
[ [ "jam_fruit", 1 ] ],
[ [ "butter", 1 ], [ "raw_butter", 1 ] ],
[ [ "any_peanutbutter", 1, "LIST" ] ],
[ [ "toast", 1 ] ]
]

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Oct 22, 2024
@Sirbab Sirbab closed this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raw butter has inconsistent calories when crafted
1 participant