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.
Sign in to follow this  
Followers 0
Darmo

Food decay & preservation

11 posts in this topic

There was some interesting discussion regarding food decay yesterday on the discord, so I wanted to kind of compile some of it  in this post so it doesn't get lost to discord history.  It's been stated that TFC1.12 won't have the original tfc food quantities - it'll just use stacks of pieces as regular MC.  Hence, there will also be no trimming.  I don't think anyone will be sad to see trimming go.   Basically 3 options are presented:

The most obvious perhaps, would be ARK-style, where the top piece of a stack is always decaying on a timer.  So if the normal decay time for vegetables is 5 minutes, after 5 minutes the top piece of the stack is removed.   A visual changing of the background of the food icon indicates the time until next decay.   This is what TFC2 was going for in the last iteration, and it's a pretty well known system I think.

@Bunsan presented another option:  "The thing to remember is that in 1.7.10 it did not care how old the food was, it just cared how long since last trim and how much decay is present. So that is effectively the same as having each item have a set chance to decay and then have it roll to decay every X number of ticks. Whether it just goes poof or turns into a decay item doesn't matter."  So basically that seemed to be suggesting that every piece of food in the inventory has a chance to decay every tick.  Which has the same statistical result as Ark style probably, in that statistically, per time period, you'll lose just 1 piece.  Sometimes maybe a bit more, sometimes less.  But statistically same result.  There's no icon background timer in this method, so on the one hand you aren't constantly nagging at the back of the player's mind with a visual reminder as each piece of food disappears.  But at the same time, it's a somewhat less predictable system.  Some people may actually appreciate the defined rate of decay in ARK style.

@TonyLiberatto presented another idea.  As I understand it, his idea is that when you harvest or create food, it is marked with an 'expiration date', which presumably will show in the tooltip.  Expiration dates are only to the day, not the hour.  So a carrot harvested at 1am of a given day will have the same expiration date as one harvested at 11pm.  Stacks of the same item with different expiration dates would not automatically stack.  When the stack reaches the expiration date, the entire stack vanishes or turns to rot or whatever.  SO in this system there is no constant drip of food disappearing.  You have it all available until the expiration date, and then it's all gone.   This is arguably a bit more realistic in that for most food, it does not immediately start having parts go bad.  I don't know if maybe it has some processor overhead advantage, in that you'd only check the food once a day, at a certain time, rather than having to check every X ticks?

The more I think on it, the more I like Tony's system, and I wanted to expand upon it a bit.  I think you could still allow manual combining of stacks to avoid too much clutter, but perhaps just inherit the lower expiration, to avoid hijinks with averaging.  This way the player can choose between less space used, and keeping a higher expiration date on some.   This also opens up a possible avenue for containers that are food-specialized, having many slots but only for food (in some cases maybe just certain kinds).  These containers allow the player to store many stacks of food with different expirations.  I also think this system might discourage people like me, from leaving crops in the ground forever in non-freezing climates and harvesting them when needed (though hopefully that won't be a thing anyway) since that would probably result in either more clutter or more wastage, vs. harvesting large amounts at once and properly preserving.

Another possibility I think expiration dates would open up, is for there to be food poisoning effects.  So your food is safe for some percentage of it's life - maybe the first 50 to 75% - but thereafter the background color changes (maybe to orange) and you get an increasing chance that if you eat this food, you'll get food poisoned or catch a disease or something.  Preserving the food might nullify that chance (the background is normal all the way to expiration) or it might delay it (only turns orange at 90% of expiration, and also the chance does not get as high due to reduce poison window). 

You could even do a sort of hybrid system.  Maybe the food doesn't decay for the first 40% of it's expiration date, but upon reaching 40% it gets orange background and starts to decay ark style or random style or whatever, but still no poison chance.   But at 70% of expiration it turns red, and now it is not only decaying, but you also have the poisoning chance.  So there the player gets a window with no decay, but then there's a significant window with decay, and at the tail end poisoning.

So ya, in the end I rather like Tony's system and think it presents some good hooks for other mechanics.

Edited by Darmo
4

Share this post


Link to post
Share on other sites

I like the food expiration concept, but perhaps instead of decaying away, if you eat a food that has "expired" past the given date, you have a chance to make yourself sick (exponentially increasing each day).

This would mimic real life more accurately, since I could conceive of eating food past its expiration if it "looks fine" in a survival situation if food is scarce, but if I had abundance then I wouldn't risk it.

For example, 1 day after is 10%, 2 days after is 25%, 3 days after is 50%, 4 days after is 75%, and 5 days after is 100% chance of sickness.

Sickness could be a hunger debuff (similar to vanilla hunger) and mining fatigue debuff over a long period. Possibly with random bouts of the nausea debuff.

It would give a sort of risk-reward factor. Additionally, would save on processing power since you would only have to check the expiration of the food item when its eaten, instead of daily.

I agree on combining stacks will set the expiration to the earliest expiration, as it would cause rot from one item to spread more easily.

I feel expiration dates on unpreserved foods should be relatively short compared to the rot system in 7.10 TFC. 1 week for fruits, meat and dairy; 2 weeks for veggies, 1 month for uncut grains; 6 months for cut grains and flour. Different preserved foods have specific expiration dates based on preservation type and independent of food type.

Main downside is figuring out how this would work with "basic" preservation methods such as freezing/chilling or putting food in pot.

I think making a separate "frozen" item and "thawed item" is best. Frozen has a 6 month expiration, thawed is only good for a few days. Unpreserved food becomes frozen when placed on a rack or shelf for 12 hours in an area whose temperature is freezing, and thaws after a day whenever not in a frozen area.

0

Share this post


Link to post
Share on other sites

In terms of mechanics about this topic I have 3 concerns about the decay method (any method). In order of importance:

1. Optimization. TFC is already a heavy mod, and decay is just a collection of more lag, particularly in multiplayer. I'm not that particular savvy about ticks in Minecraft, I don't know if there are ticks that happens every day or every 6/8 game hrs.  Thus, I think that the best decay mechanic would be one that it is easy on the game. Tony's idea, if it can be done every day, would be better in this regard.

2. Preservation. Some decay mechanics does not really align very well with preservation mechanics in an intuitive manner. The more complex it is, the less intuitive it becomes. Also, since trimming is gone, how to make the preservation system works with decaying food? Again, Tony's idea seems to work fine with expiration days if we expand the expiration days idea. For example, freshness labels: "Recently Harvested", "Fresh", "Decaying", "Rotten".  Now, if we add a number (hidden to the player or otherwise) "Recently Harvested 3", means that it has 3 days before becoming "Fresh". This also present an opportunity to a bit more of survival management and risk vs reward. First, rotten food is not discarded automatically until it reaches zero, but has a very high chance of diseases. Decaying has low chance of diseases while Fresh and Recently Harvested have no risk and are the only food that can be preserved.

3 Inventory Space. My third and least important concern is inventory space. What I liked about the use of weight is that some items were too light (like berries) and could stack more of those. Obviously this can be changed that different food has different stack sizes. Thus, I'm not that concern about this. But I wanted to address it since I think it is important.

Overall, I think Tony's idea may be the best if we just clean it a bit more.

2

Share this post


Link to post
Share on other sites

In minecraft there is no scheduled ticks. Basically everything ticks randomly and you just decide if something should happen based on number of ticks that have passed. So for example tree growth in 1.7.10. When you planted a sapling it got tagged with a time stamp. Then every time it randomly ticked it would check if the appropriate number of ticks had passed using the time stamp. If enough had passed it would roll to grow. 

In 1.7.10 the chests ticked randomly, which is how things cooled and rotted in them. Vanilla inventories do not tick, which is why things didn’t rot until you removed them and they randomly ticked in your inventory catching up on rot. 

0

Share this post


Link to post
Share on other sites
17 hours ago, gcook725 said:

Main downside is figuring out how this would work with "basic" preservation methods such as freezing/chilling or putting food in pot.

I think making a separate "frozen" item and "thawed item" is best. Frozen has a 6 month expiration, thawed is only good for a few days. Unpreserved food becomes frozen when placed on a rack or shelf for 12 hours in an area whose temperature is freezing, and thaws after a day whenever not in a frozen area.

Ya, that was actually another discord topic.  Bunsan Had a question on peoples' thoughts on the temperature gradient and in the course of that it turned to how it affects preservation.  I am of the opinion that being able to infinitely preserve food simply by storing your food in an environmentally cold area makes other preservation methods less useful, and so hurts the potential preservation tech tree, and that I'd rather see ambient temperature not affect it at all.  Counterpoint was that on servers it's good to have a no-maintenance permanent preservation, due to possible extremely long times passing while player is offline, and that's a good point.

Eventually I suggested something like what you propose gcook.  Basically that items stored at freezing temps eventually become "frozen", and in that state they cannot be eaten, and the stack can neither be combined nor divided.  In order to use the food the player must defrost it, which takes an amount of time commesurate with the stack size.  So the player now has a choice of whether to store efficient giant stacks of food that take forever to defrost, or many small stacks that they can defrost and use quicker, but that take a lot of storage space.  If you've ever tried to defrost a big turkey or ham, you know it takes days.  I'd suggest a stack of 64, for instance, take 4 or 5 days (2 hours per unit?).  This allows the player to still have simple infinite cold storage, but requires better planning to use it.  I further suggested that every time you thaw a stack, some portion of it is lost to 'freezer burn', as a deterrent to repetitive freezing and thawing.  The minimum loss is 1 piece, so the smaller the stack thawed, the  greater the percentage lost, which plays into the choice of freezing in large slow-thawing stacks, or small fast-thawing but high percent loss stacks.

To go with this, you'd have a 'chilled' tag or something, and this would get applied when the player uses 'constructed' cold storage that is part of the game progression - for instance ice boxes or ice houses or refrigerators, etc.  chilled items would be useable immediately, rather than having to be defrosted.

Items that are neither chilled nor frozen simply don't have a tag.

Immortal crops are the other big killer of preservation use, but that's a separate topic, and more easily addressed I think.
 

Spoiler

 

I'm going to store Bunsan's original temperature question here, for a potential poll later:

"Now something I’m curious for thoughts on is temperature gradient for altitude and depth. For the heights we are looking at in MC in real life the temperature goes down linearly. For 1.7.10 it was more exponential, so the amount the temp went down increased the higher up you go. Which do people prefer? Also below sea level y coordinate did not effect temperature. Real life it is much more complicated as dirt and rock insulate, so ground temperature depends on environmental temperature until you get pretty deep then temp goes up slowly as you go down. Thoughts about this?"

 

 

Edited by Darmo
0

Share this post


Link to post
Share on other sites
5 hours ago, Darmo said:

Immortal crops are the other big killer of preservation use, but that's a separate topic, and more easily addressed I think.

I'm not sure if I'm remembering this correctly, but wasn't there a config option for TFC which lets crops die out if not harvested in time? They already die in cold weather as well, so not so immortal if you're in a temperate or cold climate.

Either way, a config option would be best for that so server owners can determine how unforgiving they want the game to be.

Edited by gcook725
0

Share this post


Link to post
Share on other sites

Yes that's correct, in one of the final versions there was a config.  And yes, of course they die in cold weather.  There was a pretty significant swath of the world though, which never froze, and was easy street as far as food goes.  In practice I think servers is where you *want* immortal crops, due to time passing while players are absent.  So they were the least forgiving.   But there's other options.  You could have crops simply start over again when they reach a certain age.   That would make them a little less reliable in mild climates, as far as an easy-mode ready to go food source.

0

Share this post


Link to post
Share on other sites
2 hours ago, Darmo said:

Yes that's correct, in one of the final versions there was a config.  And yes, of course they die in cold weather.  There was a pretty significant swath of the world though, which never froze, and was easy street as far as food goes.  In practice I think servers is where you *want* immortal crops, due to time passing while players are absent.  So they were the least forgiving.   But there's other options.  You could have crops simply start over again when they reach a certain age.   That would make them a little less reliable in mild climates, as far as an easy-mode ready to go food source.

I think Bunsan mentioned in another thread experimenting with randomly respawning things such as berry bushes seaweed. Perhaps could be extrapolated to crops to some extent.

For example, you can have a very small amount of crops spawn at world generation than usual and have new crops spawn very slowly overtime. That would drastically reduce the amount of crops you find when exploring the world, but would allow you to still find some, and would also give some incentive to hunter-gatherer lifestyles for a bit longer early on since crops are initially more scarce, but will slowly, randomly respawn.

0

Share this post


Link to post
Share on other sites

Crops always did this. The respawn is spring was less than initial worldgen. 

0

Share this post


Link to post
Share on other sites
20 hours ago, Bunsan said:

Crops always did this. The respawn is spring was less than initial worldgen. 

See, I never noticed this because there were always so many crops everywhere anyways.

0

Share this post


Link to post
Share on other sites

Could make crops function somewhat similarly to fruits. They might be able to stay at adulthood indefinitely if the host so chooses, but limit the time of year in which they bear edible parts. There could be plenty of overlap, but nothing would be able to sit on the vine year-round regardless of where you are.
At least encourages crop variety, if a player is really intent on living in a tropical plantation where food is always plentiful.

Edited by Pyr0mrcow
0

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0