yeelp / Scaling-Feast

A simple, balanced way to increase your maximum hunger in Minecraft over the course of a world.
MIT License
0 stars 1 forks source link

[Suggestion] Possible for Hunger Points going beyond your Max Hunger to be converted into Bloated Points? #91

Closed SonicX8000 closed 3 years ago

SonicX8000 commented 3 years ago

Unsure if this is do-able since Bloated is currently only obtainable via potion effects / Iron Apples, etc.

So... say for example your Hunger is 19/22 and you eat a food item that restores 6 Hunger. By normal means... you will only gain 3 Hunger since that's how much you had remaining at the time thus losing out on 3 Hunger. I was wondering if... instead of that hunger going to waste... it instead gets added as Bloated Points.

Using the same as above, you will still recover 3 Hunger but the remaining 3 points will be put towards Bloated so it doesn't go to waste. So you'll have 22/22 Hunger as well as 3 Bloated. Although some food items if I recall can be eaten at full hunger so perhaps only apply the overflow when you aren't at full hunger to prevent stacking.

I am unsure how this will work out with mods that add in bonus hunger/saturation, although the only mod that I know of is REWired which has a Cyberstomach augment that adds in extra bonus hunger & saturation when consuming food items.

This could be a config option to allow hunger overflowing to be converted into bloated.

James103 commented 3 years ago

The proposed config option would be one of two types:

yeelp commented 3 years ago

One Proposal

Let's take the example where you have 19/22 food and you eat a food item that gives you +7 hunger (just assume a food item like that exists). So, you would be at 26/22 hunger. We find the nearest Bloated potion effect that would match the excess hunger you got (which in this case is level 1) and give it to the player for some (perhaps configurable) duration. Now they have 22/22 hunger and 4 bloated hunger (which essentially gives them 26/22 hunger), but now the bloated hunger only lasts for a certain duration to incentivize players to be smart about when they overeat. In this case, it's not a perfect transfer of hunger, as if you ate a food item that gave you +8 hunger, you would be at 27/22 hunger. The nearest Bloated effect that matches the player's current hunger level is still Bloated I (Bloated increases in increments of 4 bloated shanks per level, as stated here) so you essentially lose one point of hunger in that trade. I like this approach as you're making a trade off. You're trading potentially some of the food value (and all the saturation) of the food item for a temporary bonus in max hunger - and that trade doesn't have to be a perfect 1:1 trade. In fact, it's a lot more interesting if it wasn't a perfect 1:1 trade. Now the player has to ask themselves if it's worth the bloated hunger or not.

A Second Proposal

A second option would be to replace the Bloated effect altogether with Hunger Plus. If a player overeats and they don't have Hunger Plus already, they get a Hunger Plus effect that lasts some configurable duration. So they can bump their max hunger once, and then they must wait for the effect to expire before bumping it again. This prevents it from stacking out of control. Since Hunger Plus gives 1 hunger per level, this will be an exact trade plus you keep some of the saturation too.

Out of the two, my vote goes to the first option, as it's more dynamic. It might not always be the best choice to stuff your face whenever possible with this proposal. Maybe you only stuff your face when you're about to go into combat (and perhaps you even have hunger damage turned on so there's even more incentive) or when you need to sprint past a horde of Ghasts with no shelter in the Nether. But when you're in base and safe from mobs, you'd be more conservative.

Thoughts?

SonicX8000 commented 3 years ago

I like the first option, so depending on how much hunger gets converted into bloat, you'll get the Bloated ? Effect.

This would mean that if you had 21/22 Hunger and you eat something that restores 3 Hunger, thus being 24/22, you wouldn't get any bloat points? Since that's below 4 bloat points which is what Bloated I gives.

In short... like this kind of overflow?

0-3 = No Bloat 4-7 = Bloated I 8-11 = Bloated II 12-15 = Bloated III etc.

I am curious of how that works when you get a bonus Hunger boost from the Cyberstomach augment from REWired. Would it apply the effect before the bonus? Or after the bonus?

yeelp commented 3 years ago

Yeah, the overflow you have there is right.

How this interacts with Cyberstomach depends entirely on how it's implemented. Looking at the source, I'm guessing it won't work out how you might think. Cyberstomach doesn't increase the value of food items, it actually just adds extra hunger to the player's food stats when appropriate. So it would go something like this. Let's say you eat something that restores 3 hunger when at 19/20 hunger. A LivingUseItem.Finish event fires, which ReWIRED is subscribed to.

  1. ReWIRED detects Cyberstomach augment, and gives the player extra hunger.
  2. AppleCore fires a FoodStatsAdditionEvent, which ScalingFeast subscribes to
  3. ScalingFeast sees that the player only got 2 hunger at 19/20 hunger, so there's only one overflow hunger. So, ScalingFeast doesn't apply a Bloated effect.
  4. The food item consumed adds to the FoodStats, which causes the same FoodStatsAdditionEvent to fire. ScalingFeast sees there's 3 overflow hunger and so the Bloated effect still isn't applied.

At least, that's my hypothesis of how it works.

However with a Gluttony chestplate, things would work because the enchantment uses AppleCore methods to modify food values. So the bonus hunger from the Gluttony chestplate is applied together with the original food values.