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 #77245

Merged
merged 7 commits into from
Oct 22, 2024

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.

This is a duplicate of a prior PR made about 30 minutes, but I made a mistake of not using a branch, so this fixes it.

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.
To appease the iteminfo_test, I have adjusted the calorie range from 52 to 56, as somehow butter changes impact ice cream. Thanks to Harakka for and GuardianDll for helping me find this error.

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.
Missed linting this, hopefully this makes the bot happy.
@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 astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions labels Oct 22, 2024
@Maleclypse
Copy link
Member

Normally I would say adding raw butter as an analog to regular butter will result in calorie changes if there is a calorie difference between raw and regular. There’s some extra sentences in that error message that make me question that’s what’s happening here but it’s still my first guess.

Changes the minimum calorie range of ice cream from 52 to 56, so that the iteminfo_test for icecream won't fail.  This change is due to my butter changes.
@github-actions github-actions bot added Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` <Bugfix> This is a fix for a bug (or closes open issue) BasicBuildPassed This PR builds correctly, label assigned by github actions labels Oct 22, 2024
@Maleclypse Maleclypse merged commit 5b99282 into CleverRaven:master Oct 22, 2024
27 of 28 checks passed
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 BasicBuildPassed This PR builds correctly, label assigned by github actions <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Food / Vitamins Comestibles and drinks [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raw butter has inconsistent calories when crafted
2 participants