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] Option for a Alternative Starvation Tracker #45

Closed SonicX8000 closed 4 years ago

SonicX8000 commented 4 years ago

The default Starvation Tracker is based off the outline for your Max Hunger which goes from Green to Yellow to Orange to Red, etc. Or if you define two custom colors for it, such as white to dark red, etc.

I was wondering if there could be a option for tracking the Starvation Tracker differently, something like this in this image...

When you take starve damage... a dark red outline begins to overlay the hunger bar. Based in the above image this is if the 'starvation frequency loss' is set at 6.

No starve damage, no outline, aka you just ran out of hunger, so it's empty 1st starve damage, 2 hunger icons with have a dark red outline 2nd hit will be 4 icons 3rd hit will be 6 icons 4th hit will be 8 icons 5th hit would be all 10 icons

At this point the 6th starve damage will clear the outline and your max hunger drops, making it require another 6 starve damage before losing max hunger again, in which the hunger bar starts filling up again with the outline. No matter the starvation frequency loss... if you're 1 starve damage away from losing max hunger the hunger bar will always be completely outlined with a dark red color. If the starvation frequency loss was set at 1... then the hunger bar will always have a dark red outline as it's a warning that your next starve damage at that point will reduce max hunger.

The outline can use the textures that are used for the Saturation Outline although the REVERSE saturation outline might look off when the hunger bar shakes. The image is based with the Overlay Style being set at DEFAULT. The textures that are used will depend on what the starvation frequency loss is set at.

While I did mention the color for the starve outline to be a dark red. It could be configurable if one want's to change it's color. I think the dark red color via hex values is... AA0000? Or was it 550000? If going with a default color option.

yeelp commented 4 years ago

The reason I didn't do this before is because the amount of starvation damage needed (which I'll just call starvation ticks for convenience) to be punished is configurable, so the amount of starvation ticks may not evenly divide into 10. However, it's easy to use the saturation textures like you mentioned, so maybe I dismissed this idea a little too early.

This brings up an interesting point of discussion. Should the red outlines show ONLY when the hunger bar is empty? Or should they only show when the player has no saturation? Or perhaps it's drawn under the saturation so it can show whenever possible. I'm thinking of leaning to the second option.

I may need to reorder the way the HUD elements are drawn (currently, hunger, then saturation, then max) depending on which implementation I choose (from the three mentioned in the last paragraph).

Also, with the potential config options for this feature, it may make sense to split the hud config options into separate categories for hunger, saturation and max. This shift will unfortunately break previous config options. In beta, I decided that such breaks were fine, but now I'd like to see if its possible to set config versions and find a way to preserve config options by being able to transfer to new config versions. I'm sure there are plenty of ways this can be done, but I'd need to include such a feature in the following release.

My internal ramblings aside, this may take some additional work due to config organization and trying to not break compatibility with 1.3.1. I want to avoid bumping the major patch number if possible.

But yeah, I can add this feature.

SonicX8000 commented 4 years ago

This brings up an interesting point of discussion. Should the red outlines show ONLY when the hunger bar is empty? Or should they only show when the player has no saturation? Or perhaps it's drawn under the saturation so it can show whenever possible. I'm thinking of leaning to the second option.

The Red Outline would only show when your hunger bar is empty & took starve damage, since at that point you have 0 saturation & 0 hunger so now it's... erm... onto the 'starvation ticks' phase where max hunger is now at risk if you let the red outline overtake the hunger bar.

The red outline will clear whenever you lose a unit of max hunger due to taking enough starve damage or when you recover hunger by eating food... unless there's an config option I'm not aware of to not reset the starvation ticks or something... since by eating food, you are recovering hunger as well as saturation so you'll get the hunger shanks & saturation overlays back thus ending the 'starvation ticks' phase which means no more red outline.