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

feat(balance): Fix deluxe oatmeal possibly having too few calories #4991

Merged
merged 6 commits into from
Jul 15, 2024

Conversation

RobbieNeko
Copy link
Contributor

@RobbieNeko RobbieNeko commented Jul 15, 2024

Checklist

Required

Purpose of change

As pointed out by ArkantosAoM on Reddit, deluxe oatmeal had the potential to, when crafted, end up with less calories than the cooked oatmeal. This, inherently, makes no sense whatsoever. As such, this PR fixes it so that the deluxe oatmeal properly has the calories it ought to. In the process, it also slightly adjusts the values of oatmeal (going from 25 grams per charge to 50, and going from 16 charges to 10) and makes the recipes reflect the amount of oatmeal they'd actually take.

Describe the solution

  • Makes oatmeal 50 grams per charge and have 10 charges per spawn/stack. (More convenient math, and a more useful unit of food)
  • Adjusts oatmeal's calories to be accurate with the above changes
  • Changes the recipes for cooked and deluxe oatmeal to require the correct amount of raw oatmeal to make (assuming relatively perfect conversion of calories from raw oatmeal to cooked for the sake of simplicity)
  • Adjusts cooked oatmeal's calories slightly down to reflect the above
  • Massively increases the natural calories of the deluxe oatmeal above what the crafting menu claims is possible in order to counteract what I suspect is a faulty test

Describe alternatives you've considered

  • Keep the 25g, 16 charges oatmeal model

I just feel like 16 charges is a bit of an arbitrary number, and 50g with 10 charges is much nicer and rounder.

Testing

Loaded into game, can confirm that deluxe oatmeal has a total calories over its two portions of higher than cooked oatmeal no matter what now.
image
image

Additional context

Making oats into oatmeal is currently performing some sort of arcane alchemy to create more matter than is put in (including before my change to oatmeal's mass), but I'm unsure the best route to take with making that sensible and feel it'd be better as another PR.

@github-actions github-actions bot added the data PRs related to datas. Won't crash game (probably) label Jul 15, 2024
@RobbieNeko
Copy link
Contributor Author

RobbieNeko commented Jul 15, 2024

Figures deluxe oatmeal would mess up in one of the tests

Though at the same time... that average looks suspiciously high

@RobbieNeko
Copy link
Contributor Author

In game it claims the max calories for the deluxe oatmeal is 372 a portion, which would be 744 combined at most (still more than the range max, yes, but not as high as the 900 figure it's claiming for the average in the test)

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

D:\a\Cataclysm-BN\Cataclysm-BN\tests\comestible_test.cpp(173): FAILED:
  CHECK( mystats.calories.avg() <= upper_bound )
with expansion:
  949.1666666667 <= 383.6412f
with message:
  recipe id: oatmeal_deluxe
    used:
      [oatmeal (5)]
      [sugar (4), maple syrup (1), sugar beet syrup (1), molasses (1), coffee
  syrup (1), condensed milk (1), honey comb (1), forest honey (1), candied
  honey (2), jam (1), irradiated strawberry (1), strawberries (1), irradiated
  blueberry (1), blueberries (1), irradiated cherry (1), cherries (1),
  irradiated plum (1), plum (1), irradiated grape (1), grapes (1), irradiated
  cranberry (1), cranberries (1), irradiated raspberry (1), raspberries (1),
  irradiated blackberry (1), blackberries (1), irradiated pomegranate (1),
  pomegranate (1), dehydrated fruit (1), or juice pulp (2)]
      [water (1) or clean water (1)]
    result: oatmeal_deluxe

calorie test seems to fail.

I hope this makes the tests a bit less angry at me
@RobbieNeko
Copy link
Contributor Author

RobbieNeko commented Jul 15, 2024

D:\a\Cataclysm-BN\Cataclysm-BN\tests\comestible_test.cpp(173): FAILED:
  CHECK( mystats.calories.avg() <= upper_bound )
with expansion:
  949.1666666667 <= 383.6412f
with message:
  recipe id: oatmeal_deluxe
    used:
      [oatmeal (5)]
      [sugar (4), maple syrup (1), sugar beet syrup (1), molasses (1), coffee
  syrup (1), condensed milk (1), honey comb (1), forest honey (1), candied
  honey (2), jam (1), irradiated strawberry (1), strawberries (1), irradiated
  blueberry (1), blueberries (1), irradiated cherry (1), cherries (1),
  irradiated plum (1), plum (1), irradiated grape (1), grapes (1), irradiated
  cranberry (1), cranberries (1), irradiated raspberry (1), raspberries (1),
  irradiated blackberry (1), blackberries (1), irradiated pomegranate (1),
  pomegranate (1), dehydrated fruit (1), or juice pulp (2)]
      [water (1) or clean water (1)]
    result: oatmeal_deluxe

calorie test seems to fail.

Yeah, already took note. Let's see if I at all understand how that test works, haha
(Buffed the calories of naturally generated deluxe oatmeal in hopes that it's using that in some way. tbf, it could do with that buff anyway)

I swear, this is ridiculous. This is now OUTSIDE OF WHAT THE CRAFTING MENU CLAIMS IS POSSIBLE
@RobbieNeko
Copy link
Contributor Author

I've officially increased the natural calories of the deluxe oatmeal BEYOND WHAT THE CRAFTING MENU SAYS IS POSSIBLE.

I swear, that average must be fucking up somewhere given the "average" is higher than the game claims is the maximum for crafted variants

Copy link
Member

@scarf005 scarf005 left a comment

Choose a reason for hiding this comment

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

excessive calories goes brrrrrr

@RobbieNeko
Copy link
Contributor Author

RobbieNeko commented Jul 15, 2024

Given that this has resulted in giving the oatmeal natural calories above what the crafting menu claims is possible, I'm just a touch uncertain about the idea of merging this. But oh well, figuring out wtf is wrong with the comestibles test is outside of this PR's scope anyway.

@RobbieNeko
Copy link
Contributor Author

Anyway, mergers may merge at their own discretion

@chaosvolt
Copy link
Member

Hmm, very weird.

@chaosvolt chaosvolt merged commit e56e6db into cataclysmbnteam:main Jul 15, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data PRs related to datas. Won't crash game (probably)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants