squeek502 / SpiceOfLife

A Minecraft mod that encourages dietary variety through diminishing returns
The Unlicense
23 stars 24 forks source link

Suggestion: Weighting food groups #73

Open Yazzeh opened 8 years ago

Yazzeh commented 8 years ago

The modified food value is currently the average of all the food groups a food belongs to, right?

What about adding a weight attribute, so the average can be weighted towards one food group more than another. Let's say we have a Fruit food group and Dairy food group. A milkshake would be weighted more towards the Dairy food group, and so its modifier should count for more than the Fruit modifier.

squeek502 commented 8 years ago

Not totally sure it'd be worth it.

Yazzeh commented 8 years ago

I was thinking something along the lines of how COFH ore generation jsons handle weighting for entries. You assign an optional tag to food oreDict entries and item entries for weight that can accept a number. Each food group with the same food would use the ratio between the weights to assign relative values, they wouldn't have to equal 100.

You're right that it is a bit complicated, though how it would be communicated would probably be a percentage indicator next to each food group title on the food item's tooltip.

I guess it's an interesting concept that I know that I would use when I design my formulas for balanced nutrition, and how they will track and affect players' hunger. The idea is that there is a running overall tally of foods being eaten, say 250 foods before it resets. Then there is a sub tally of 50, within which you have to have about 10 of each food group to survive. After the 50 resets, you have to eat the same balanced diet, however, the affect of diminishing returns from the 250 food tally still counts, forcing players to make new foods in those food groups. The reason The weighted averages would be a nice addition is to re-average the nutrition gained from multi-grouped foods when you've already eaten the limit of one of their food groups.

Sorry if this is hard to understand, I just got a bit overexcited when I saw your latest update. I like the idea of a complex system that is intuitive based on real life, while still being playable.

squeek502 commented 8 years ago

No worries, I appreciate the suggestion.

However, I think this is slightly indicative of an issue that I've run into a lot with this mod, in that it's not really feasible for this mod to be a catch-all 'nutrition' mod. Many people have suggested many different features they'd need in order to implement their version of a nutrition system, but I can't really make this mod capable of doing anything anyone dreams up. For example, unless I'm misunderstanding, your '250 foods and subset of 50' is not currently possible.

I like the idea of making the mod very configurable, but at a certain point I'd like to draw the line in order to keep the focus of the mod manageable. Note that this was never really intended to be a realistic nutrition mod at all, and I'm somewhat opposed to the concept of 'realistic nutrition' as it's usually implemented because I think it perpetuates a false paradigm about what's necessary in a diet (e.g. dairy as a required food group is bogus).

Anyway, that's a total tangent. Back to the suggestion itself: I think it's fine, but I just don't know if it'd really affect much in practical, gameplay terms. I'll leave this open as I'm not really opposed to implementing it; I just don't know when or if it'll happen.

Yazzeh commented 8 years ago

That is totally understandable, and I get why you'd not want to include dairy as necessary nutrition, based on real life, but that's one of the distinctions I would make with game design (forcing players to find and keep cows so they don't die from lack of dairy). At the same time, food groups could just be used for more abstract nutrition, like protein, vitamins, minerals, fats, etc. There are endless possibilities, so you're entirely justified in drawing the line wherever you see fit.

I'm really grateful that you're actively maintaining these mods, and when I have the time, I'd love to try contributing actual code, or just making a more specialized branch.

squeek502 commented 8 years ago

Thanks for understanding. Something I've been thinking about is the idea that certain parts of the mod would probably be useful for the creation of other addons or similar mods, and that it might be worth adding an API to TSoL that would allow other mods to use the base functionality (food history, food groups) to do other things.