Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Tathar

Nutrition: picking up where meals left off

51 posts in this topic

TL;DR version: Nutrition encourages players to eat multiple types of food from each food group, therefore encouraging players to explore more and grow more crops.  Players also get a compelling reason to try animal husbandry.

 

I like how TFC spreads out resources and encourages travel and exploration, but that feature could be enhanced by reducing how interchangeable different resources of the same type can be.  After all, if I can survive off of nothing but tomatoes, peppers, and calamari, there should probably be something in TFC to encourage me to balance out my diet.  

 

I'm not seeing very much point in animal husbandry or ranching yet either.  You need grains to even get started, but if you have grains, why not just eat bread instead?  It seems more like a novelty feature than something genuinely useful.  

 

I have a solution that solves both issues.  There would need to be some sort of incentive for eating a variety of foods, or some sort of disincentive for eating the same foods continuously.  Meals should count as their respective ingredients, since there's nothing keeping someone from eating meals made from the same recipe continuously -- in fact, meal buffs tend to encourage it once they're discovered.  One possible way to do this would be to add a nutrition bar on the HUD that affects how quickly the food bar falls and how quickly health regenerates over time.  

 

Let's consider some use cases here:

  • Player A eats only calamari.  All other foods are ignored, stored away, or otherwise uneaten.  Needless to say, he doesn't eat very well, but at least it gets him through the first year.  
  • Player B eats only renewable foods that aren't fruit.  This includes calamari, tomatoes, red and yellow bell peppers, and maybe green bell peppers if she picks them in time.  Different colored bell peppers aren't much different from each other nutritionally, so we're pretty much looking at three different food sources from two food groups.  It's a little better than eating seafood all the time, but we're going to want more variety than that for the long term.  
  • Players C and D teamed up and did some exploring, so now they have a few different types of vegetables, a fruit tree, and calamari.  Player C managed to get some fishing in, and Player D killed a cow.  They still don't have enough metal for a pick or chisel, so they can't mill the wheat and rye yet, but after the first growing season, they should be eating pretty healthy.  Until then, they have more than enough greenbeans and soybeans than they need for farming, so they can eat those now, along with the calamari, fish, and beef they cooked.  The green bell peppers are useless for seeds, so they can eat those too.  For now, they're eating foods from four food groups (based on the food groups below, not RL ones) and multiple foods from two of them.  Pretty good, but if they can get a quern set up, then they'll be able to add multiple grains, a fruit, and some more from both vegetable groups.  
  • Player E is well established now, and he has a functional farm and animal pens set up.  He also has a quern and a fishing rod, and plenty of seeds for most types of vegetables and grains.  He got lucky and collected saplings from three types of fruit trees, and his animal pens have cows, pigs, and sheep, including a breeding pair of each.  He also takes care to eat several foods from each food group on a regular basis, so he's as healthy as he can be.

The above cases are sorted by an increasing level of nutrition levels, and they indicate two major factors in determining nutrition levels.  Nutrition would have to account for both the food groups covered and the individual foods eaten within each group.  The weighting for each is pretty much arbitrary, so for ease of illustration, I'll give each factor equal weight.  We need a sufficient history of past foods eaten to determine how well the factors are met, while not having so lengthy a food history that maintaining good nutrition is no longer important.  Although we could simply track the last couple hundred foods eaten from least recent to most and calculate nutrition on the fly, I have an alternative that would be a more prudent use of system resources that I'll outline below.  

  • Players start out at 50% nutrition so that the early game isn't too punishing to players who aren't immediately able to eat well.  (Internally, the saved nutrition values are all set to 50%)
  • Foods are tracked individually until an arbitrary number of foods are eaten (25, maybe?).
  • Once enough foods are eaten, the nutrition value of that set of foods is calculated.  The 10 most recent nutrition values calculated are saved.  
  • An average of the saved nutrition values is taken.  This average is the player's current nutrition level.  
  • (Optional) A GUI window may be implemented that shows a breakdown of the player's nutrition by food group.  Each food group would have a bar showing how well-represented it has been in the player's diet.  (To avoid specific numbers, a bar graph may be helpful here.)

Nutrition values used to calculate the nutrition level would be calculated as follows:

  • Meals count as one of each of the food items used to create that meal.  This means that a meal affects nutrition four times as quickly as individual foods.  (Balancing out meal effects with good nutrition should make for an interesting exercise in dietary management.  I see a future for aspiring cookbook authors on SMP servers.)
  • Food groups: One point is earned for each food item eaten, up to a maximum of 3 per food group.  (This number may need to be adjusted depending on the size of each food set.)  Divide by the maximum possible score (15 for now) and multiply by 50.
    • Meat: Cooked beef, mutton, pork, or chicken.  Other land animals can fit here too if they're edible.  (Suddenly, that huge pasture you leveled off is useful for something!)
    • Seafood/Eggs: Cooked calamari and fish.  Since this food group is poorly represented, eggs can go here too.  Cheese could go here too if it is ever added.  (I don't really like the name of this group, but I'd strongly recommend keeping it separate from meats so that animal farms are made more useful.)
    • Fruits: Anything growing on a fruit tree.  This group is well-represented, but the scarcity of wild fruit trees would offset that for most of the game.  (I like the idea of keeping tree fruits separate from other culinary fruits, since it encourages more exploration and foraging.)
    • Berries: If they ever get added to TFC, berries could either be their own group or made part of the fruits group.  Grapes could go here too.  There's a gameplay case for both, so it's Bioxx's call.  (I can picture berry bushes scattered across the world that function like wild tomato and bell pepper plants currently do.  Since wild crops in SMP tend to be harvested as soon as the first person spots them, wild berries could be a respawning alternative for those who are foraging or exploring areas that have already been picked clean of wild crops.)
    • Starches: The food crops that can be ground into flour go here.  Potatoes can also go here since they're mostly starch.  (I'd definitely like to see a reason to plant a large variety of crops. Splitting food crops into multiple categories would help encourage this more than the soil nutrient types ever could.)
    • Vegetables: Any food crop that isn't a starch.  This might work as two separate groups too, since it's very well-represented.  (Should I be able to fully cover this food group with tomatoes and a variety of bell peppers?  I think not.  There's definitely a case to make for splitting this into two groups.)
    • Spices: If herbs and spices ever get added to TFC, they should probably be their own food group.  (I would expect that these foods could only be eaten as part of a meal.  They may not be much in the way of calories, but many spices do contain significant micronutrients, so they should definitely factor into nutrition.)
  • Variety: One point is earned for each food type eaten, up to a maximum of 3 per food group.  (If this needs to be adjusted for food set size, take care to account for how small the "seafood" group is too.)  Divide by the maximum possible score (15 for now) and multiply by 50.
    • Foods that are nearly the same can be counted as a single food type.  Alternatively, you could give a half-point for each food in that sub-group after the first.  Specifically, I'm targeting apples and bell peppers.
  • Add the two scores together to calculate a nutrition value.  (If Bioxx decides to show a nutrition breakdown by food group, it may make more sense to calculate these scores for each food group separately instead.)

As I mentioned earlier, the last 10 nutrition values calculated would be averaged out to determine the player's current nutrition level.  I'll leave it to Bioxx to determine how much nutrition would affect hunger and health regeneration, but I recommend that current rates compare to a 50% nutrition level.  To prevent a dependence on diet micromanagement, I would encourage Bioxx to leave a healthy number separating the number of foods in each food set from the maximum "food groups" score.  Given current food items available, I wouldn't group the recent foods eaten into sets of less than 25, and I would consider sets of as high as 50.  

If nutrition gets implemented, more types of food should be added to help balance out the mechanic.  I mentioned several new foods above: cheese, berries, grapes, herbs, and spices.  Ideally, every food group should have at least 5 members so that players have to work to achieve 100% nutrition, but don't have to obtain and eat every food type that exists.  There should also be enough food groups to encourage people to try each of the gameplay features associated with food.  Specifically regarding berries and grapes, I believe these could present a good opportunity to bring the SMP game closer to the SSP game.  As an example of the gameplay divide, the wild crops recently added help the SSP game a lot, but have no real benefit in SMP since they don't regrow once harvested and players usually have to generate chunks to find anything.  Berry bushes and grapevines could act as a perennial alternative that regrow and replenish themselves over time, giving SMP foragers better chances of success.  Additionally, they could be limited to existing in the wild or requiring a block of space in between each bush on a farm.  Together, this and nutrition would place a stronger emphasis on long-term foraging and exploration in both SSP and SMP, and this would also give SMP players an opportunity to survive as nomads like SSP players can.  

 

EDIT: Apparently the forums don't like numbered lists.  Fixing that and adding spoiler tags.  TL;DR version for those who need it.

Edited by Tathar
7

Share this post


Link to post
Share on other sites

It would be pretty damn cool to make your own cook book! But since you start at full health, water and hunger doesn't make sense the nutrition should too?

0

Share this post


Link to post
Share on other sites

I'd leave that up to Bioxx and Dunk to decide among themselves.  I went with 50% starting nutrition here since it keeps the hunger rate and health regeneration at current levels to start with.  Depending on which direction they want to take it, it might make sense to start higher or lower.  I wanted to show that nutrition could be used for both positive and negative changes to hunger rate and health regeneration so they aren't locked into doing it a specific way.  

0

Share this post


Link to post
Share on other sites

For all the people "liking" my idea, I'd still like to get more actual feedback.  What do you like about it?  What are you merely OK with?  Do you have any questions about how it works, or why I decided on a particular part of the system?  I appreciate the "likes," but I still want to improve the idea if I can.  

0

Share this post


Link to post
Share on other sites

The main problem is interface. we can't technically allow player to see the actual values, however represented (numbers, bars, whatever) - it's not how it works with our body. And most other representations I can think of are confusing, if not more.

0

Share this post


Link to post
Share on other sites

With the body, you can still get a rough idea of how healthy you are through several indicators, taken together.  As a HUD element, the closest approximation to this would be a nutrition bar or some other "imprecise" indicator.  TFC already does this for other things.  You can't tell exactly how hungry you are in RL either, but we have a food bar for that.  

0

Share this post


Link to post
Share on other sites

But the rough indication does not show what nutrition you lack, especially in one-bar approach.

0

Share this post


Link to post
Share on other sites

Ah, I see what you're talking about now.  The "detailed" part is just an optional thing that Bioxx and Dunk could add if they felt it was appropriate.  I don't expect that they would, and I'd try nutrition without it at first, personally.  

0

Share this post


Link to post
Share on other sites

What do people think about adding berries and berry bushes to TFC?  I mentioned it here since it would add another food group to nutrition, but what about berries on their own?

1

Share this post


Link to post
Share on other sites

I would like them to add berries. (Pshhh... texture files... pshhhh...)

And mushrooms too - mushrooms are underrepresented.

1

Share this post


Link to post
Share on other sites

but berry bushes are a Age of Empires thing!

On topic I'd defiantly love to have some more 'scavenge friendly' food types!

0

Share this post


Link to post
Share on other sites

I don't like mushrooms, but if my character eats them, I don't have to!  That's how it works, right?  

0

Share this post


Link to post
Share on other sites

This is a great idea and I've been thinking about something along these lines ever since the topic of perishable foods came up.  My more primitive concept was to create a sort of "food fatigue" system that rewards variety by restoring more hunger.  So if the starting player eats nothing but calamari, eventually, that calamari restores less and less hunger.  This could be easily kludged into the current setup without too many additions/rewrites.

 

The nutritional aspect is a great addition of depth and I like this a lot more.  As far as presenting the data to the user, you could have buffs and debuffs that give you an idea of what food group you are missing out on or overindulging in.  Not enough fruits and veggies?  You get scurvy.  Limiting your protein and carb intake?  Lethargy.  Been eating nothing but bread for the last year?  Diabetes.  Balanced diet?  More energy.

 

My biggest concern is that a lot of things would have to be fixed, revamped, and rebalanced which could be non-trivial.  Additionally, since the world is randomly generated, it might be nice to have some sort of guarantee of a regular distribution of vital resources.  Lets say you need some sort of citrus to not die of scurvy, but there's only one orange tree in a 10k by 10k section of the northern hemisphere where you are and no other citrus.  This is mainly a balancing issue, but could be a major one nonetheless.

0

Share this post


Link to post
Share on other sites

 My biggest concern is that a lot of things would have to be fixed, revamped, and rebalanced which could be non-trivial.  Additionally, since the world is randomly generated, it might be nice to have some sort of guarantee of a regular distribution of vital resources.  Lets say you need some sort of citrus to not die of scurvy, but there's only one orange tree in a 10k by 10k section of the northern hemisphere where you are and no other citrus.  This is mainly a balancing issue, but could be a major one nonetheless.

Gangplank wants Scurvy! Lemons, oranges, dandelion greens, and liver for vitamin C. Eat them and you'll be K. Refining dandelions by putting them in with a knife in the crafting grid gives you dandelion greens as a side product of dandelion yellow. Liver is a side prospect of, well... New post of mine coming soon
0

Share this post


Link to post
Share on other sites

I really wanted to avoid tracking individual nutrients when I wrote up the OP.  There were several reasons for this decision: one, it would be difficult to understand and act upon; two, RL nutrients aren't well-aligned to individual food-related game mechanics in TFC; three, tracking RL nutrients would be an anachronism in TFC.  

 

There are a lot of important nutrients in real-life, and there's no simple system to remember which foods are good sources of which nutrients.  If TFC were to track individual RL nutrients, even TFC experts would have to routinely check the wiki to maintain their nutrition levels.  This is hardly desirable.  I expect that most players would give up on trying to maintain good nutrition if the mechanic was that complex.  

 

Picking on Vitamin C, oranges and other citrus fruits are well known for containing it, but actually all fresh, uncooked food contains Vitamin C, raw meat included.  Other nutrients also have good sources in multiple food groups.  Each of these sources are interchangeable for that nutrient, too.  If your goal is to encourage people to eat a greater variety of foods, tracking RL nutrients won't help at all.  Since TFC food production mechanics are tied closely to different food groups, if you want people to try each of those methods of food production, then you need to encourage people to eat from each food group too.  If you were to track RL nutrients, it doesn't help that you can obtain all required nutrients in a vegan diet, without supplements, as long as it contains soybeans.  

 

As for the nutrients themselves, you have to consider that TFC is designed with heavy (but not absolute) weight on historical accuracy, and anything from the 1700s or newer is generally considered too modern for inclusion.  RL nutrients don't fit at all into the historical theme.  Nutrition as an area of study in chemistry didn't even exist until the late 1700s.  We didn't even know that scurvy was linked to a Vitamin C deficiency until 1932, after Vitamin C was first isolated.  Even if you didn't know that, a system tracking chemical nutrients wouldn't be believable in a time period lacking sufficient understanding of chemistry in general.  In contrast, accounts of nutritional experiments based on food groups are found as far back as biblical times in the Book of Daniel.  

1

Share this post


Link to post
Share on other sites

It would be beyond the scope of this mod to develop (not to mention overwhelmingly ponderous to play) a system that tracks all of the variety of real life nutrients, vitamins, compounds, etc.  Certainly you shouldn't get a readout of your current nutrient levels.  I was mostly responding to transcengopher's comment on presentation.  Generalizing the effects of missing out on vital food groups into various ailments could still be a useful mechanic as opposed to an abstract "nutrition number".  This, in turn, would not be an anachronism as no matter what past time period we are talking about, if you eat nothing but bread, you'll most likely get diabetes.  And yes, nutrition as a science did not develop until very recently, but the effects of malnutrition were certainly observable throughout history.

1

Share this post


Link to post
Share on other sites

Abstraction isn't necessarily a bad thing.  TFC does have an abstract "health number" that determines how close you are to death.  That said, whether missing out on certain food groups should give you certain ailments depends on what type of gameplay we're trying to encourage.  I didn't want to force people to eat a variety of foods (especially not early on, when such foods are hard to obtain) by threat of illness or death.  Other people might be more willing to push for a more hardcore version of nutrition.  Maybe Bioxx would be one of them, but I doubt a hardcore version would make it past internal playtesting.  

0

Share this post


Link to post
Share on other sites

That's fair.  I'm not really promoting an Extreme Hardcore Nutritiontm component to the mod, just exploring ways to make the food aspect of the game potentially more rewarding.  A lot of the hardcore-ness would depend on how such an overhaul would be balanced: easy of acquiring necessary food groups, the gravity of the penalties for getting poor nutrition, and the benefits of being well nourished.  In my first post I brought up mainly examples of the detriments of poor nutrition which may have made it seem overly penalizing, but I wouldn't want it to be just that.

0

Share this post


Link to post
Share on other sites

I would suggest different effects when lacking nutrients of specific groups or gianing them:

1. Turning speed - One would have turning speed limited (even when mouse settings are sufficient).

2. Walking speed - Slowness already exits, could be applied as an effect of lack of some nutrients. Quickness would be applied with a rich amount of nutrients.

3. Jumping height - Low nutrients would allow to jump half a block. High nutrients would allow jumping up to two blocks.

4. Vision - Don't know how much it could be possible to do. I'd suggest something like limiting the distance things are shown or blurring everything when low on nutrients.

5. Stomach pains - A brand new effect where one would have a paralyzing pain for a second or more, randomly when the effect applies. Could be every 10, 15 or 20 seconds also. It would be a nuisance when travelling or doing something around your home, mine. This wouldn't ofcourse affect when riding a cart, boat, an animal or any other vehicle (if they are implemented).

6. HP/Energy limit - Low nutrients would allow the HP to heal up to half it's value. When having above health, it would slowly decrease it it's appropriate level. The same goes for Energy. High nutrients would allow a bonus to the maximum.

 

The limitations would have to be debated upon though. Each of the effects could be for a separate food group (knowing which effect affects which group would be an indication what your organism lacks). Another solution would be to add a random effect when low on nutrients.

 

Another idea for the whole topic: Storing information about the last 50 foods the player ate would be beneficial for defining if the player ate always the same food or not. This could be then analyzed against various food groups.

0

Share this post


Link to post
Share on other sites

I never could adapt to my turning speed being limited in games, and Minecraft game mechanics require at minimum the means to jump a full block high.  Other than that, those suggestions could work in theory.  However, keep in mind, nutrition would be a mechanic separate from hunger, so it's not really about having enough energy to do stuff.  

0

Share this post


Link to post
Share on other sites

As for the nutrients themselves, you have to consider that TFC is designed with heavy (but not absolute) weight on historical accuracy, and anything from the 1700s or newer is generally considered too modern for inclusion.  RL nutrients don't fit at all into the historical theme.  Nutrition as an area of study in chemistry didn't even exist until the late 1700s.  We didn't even know that scurvy was linked to a Vitamin C deficiency until 1932, after Vitamin C was first isolated.  Even if you didn't know that, a system tracking chemical nutrients wouldn't be believable in a time period lacking sufficient understanding of chemistry in general.  In contrast, accounts of nutritional experiments based on food groups are found as far back as biblical times in the Book of Daniel.  

Tathar, we've ALWAYS needed all of the RL nutrients to survive — we just didn't know we did until recently. As such, it would be perfectly within historical accuracy to track these nutrients silently, and the lack of nutrition only showing up as deficiency ailments like pellagra and scurvy when your inner reserves of these nutrients fell below a critical value.

 

The native cuisines you find in pre-nutrition science cultures were shaped by people futzing around with their diets until deficiency ailments settled to a background level (ie, when people stopped dying in droves of malnutrition — note that there can still be significant undernutrition in many such cultures, just not enough to change their diets).

 

That said, I don't think we would be well-served by such silent tracking of each and every nutrient. I say we keep it down to a few general nutrition scores, such as energy (fat/carbs), protein, and micronutrients (vitamins/minerals). Energy would be diminished when you do stuff, protein when the body maintains and repairs itself, and micronutrients to keep things humming along (note that there is a baseline consumption of all of this), and each food would refill a differing portion of each. (Protein may be divided into two parts to simulate RL complementary amino acids.) When a deficiency sets in, the hunger bar turns a different color to signify what may be wrong with you, as well as status effects.

0

Share this post


Link to post
Share on other sites

I am very much in favor of more complex nutrition systems. 

 

But I'd like to see the addition of a handful of more wild foods (no nuts and berries thus far) and more balanced dispersion of food spawns in different biomes, before such a thing happens. An emphasis on food variety by giving a small selection of bonuses for meeting various nutritional targets could be interesting and reward people for putting time and effort into more than one or two food types.

 

Penalties for falling below nutritional thresholds could work too, as long as they weren't overly harsh.

1

Share this post


Link to post
Share on other sites

Energy is tracked through the hunger bar.  Tracking micronutrients, even silently, would not be suitable for gameplay reasons I've already mentioned.  Even if it would be more realistic to do so, gameplay is an important factor that must also be considered.  Tracking micronutrients as an aggregate just results in a second hunger bar.  That is hardly ideal either.  There really isn't any good alternative to basing nutrition off of food groups that still encourages players to eat a variety of foods that require different gameplay mechanics to obtain.  If you ignore that critical objective, then adding a new self-maintenance meter serves no gameplay purpose.  

 

As for nuts, I don't know much about them, but if they have their own gameplay mechanic to obtain them, I see no reason not to add it to the available food groups for nutrition.  

0

Share this post


Link to post
Share on other sites

My suggestion is the an threshold of how much a kind of food can be consume per day.For example, if a player eat 2 egg perday then he get 100% efficiecy. If he eat the third egg, that one only has 50% its expected affect.So bringing more than 2 different kinds of food in inventory is better than only has the same food all the time. 

0

Share this post


Link to post
Share on other sites

I'm just now realizing how slowly the hunger bar depletes now.  I'm thinking that making the hunger bar deplete faster or making foods restore less of the bar might help complement nutrition.  What does everyone think about that?

 

My suggestion is the an threshold of how much a kind of food can be consume per day.For example, if a player eat 2 egg perday then he get 100% efficiecy. If he eat the third egg, that one only has 50% its expected affect.So bringing more than 2 different kinds of food in inventory is better than only has the same food all the time. 

Several problems with this.  Under the current hunger rate, you might not even eat two food items per day.  It would be wasted effort to code that feature.

 

Second, I really don't want to force people to carry several food items with them all the time.  If you get diminishing effects on how much of the hunger bar is restored by a specific food, it could easily result in that situation.  What about the early-game player who doesn't have several different foods to eat?  What about when the player has to venture far from home to collect a resource that isn't nearby?  If maintaining nutrition is required for survival, then players will have a very hard time surviving under these circumstances.

 

Third, how many different types of food will the player eat under this system?  If a player can achieve full benefits from just alternating between two or three foods, especially if they're collected the same way, then the goal of food variety hasn't been achieved.  

0

Share this post


Link to post
Share on other sites