The Spice of Life

The Spice of Life

16M Downloads

Request: New variable for the config "food.modifier.formula"

Xandermud opened this issue ยท 6 comments

commented

A variable that tracked the number of hunger points restored instead of the number of foods consumed would be awesome. Example would be eating 5 of a food that restores 4 hunger points would result in the variable returning 20 for said food instead of 5. Would be very useful when "use.hunger.restored.for.food.history.length" is set to true while using food groups.

commented

You could approximate the value using count*food_hunger_value. I'll consider adding this, though.

commented

Yeah, I was originally content with the expression I wrote: MAX(0, (1-(count*food_hunger_value)/max_history_length))

However, when you add foods into a food group it doesn't work quite as well as I thought it would. Eating several less-filling foods followed by a larger food in the same food group results in the mod counting the smaller foods as the larger food.

commented

So, for food groups, should this return the sum of the hunger values of all recently eaten foods in that food group?

Meaning, after eating two items in the same food group, one for 2 hunger and the other for 4 hunger, should the suggested variable have the value 6?

commented

That would be ideal, yes. Just if/when you feel like adding it, I would appreciate it.

commented

Hope you don't mind if I "bump" this issue (even though there is no such thing), as I've run into the exact same "issue" in the modpack I'm working on. Is this difficult to implement or is there a another reason it's not been done yet?

commented

No real reason it hasn't been done yet, I've just been working on other things. Will try to make some time for it soon.