Results 1 to 10 of 10
  1. #1

    Deviation rates in food decay

    I've been trying to work out the actual decay rates of food in hard numbers. I started testing on my creative single player world but my results kept coming up different when I would repeat a test. This lead me to trying to work out deviation rates - how random are decay rates. So I filled my hot bar with raw beef and skipped forward 48000 ticks (2 days) using /time add 48000. After each test I put new beef in my hot bar and repeated that 10 times.

    Here is the chart I came up:

    Name:  Capture.PNG
Views: 251
Size:  84.6 KB

    The y axis is the decay rate recorded. the x axis is the test batch number. The red line shows the average of each test. The total average decay for a piece of raw beef is 1.86 decay. The highest recorded decay rate was 4.3 decay. The lowest was .1 decay.

    I was hoping that this would work out as a nice bell curve but when I organized the results by frequency within ranges I got this:
    Name:  Capture.PNG
Views: 233
Size:  16.3 KB

    In other words there is no pattern to the distribution of decay rates. Decay rates don't tend to be anything. Instead all I can say about there being a pattern is that decay rates on a piece of raw beef over 48,000 ticks can be anything between .1 and 4.3.

  2. #2
    Doesnt temperature and rain affect it also?
    If you keep going 2 days ahead wont that change temp due to season change?

  3. #3
    Quote Originally Posted by Rainnmannx View Post
    Doesnt temperature and rain affect it also?
    If you keep going 2 days ahead wont that change temp due to season change?
    And that ladies and gentlemen, is why we do peer review.


    Rainmaxx,
    Yes. That would change everything. The samples in each batch are consistent, (same temperature, season, and rain). However. the tenth batch was recorded 18 days after the first batch. This means that the batches shouldn't really be compared to one another, just the samples within each batch. I don't think this changes the basic finding though that decay rates are all over the place and cannot be predicted.

  4. #4
    There is a bug in decay and Kitty announced lately that she will try to fix is ASAP, but may be unable to do it before May...

  5. #5
    Quote Originally Posted by Chogata View Post
    There is a bug in decay and Kitty announced lately that she will try to fix is ASAP, but may be unable to do it before May...
    What bug? Can you link me?

  6. #6
    It's been analyzed and tracked down in the TFC code by our very own LarsonPacific:
    http://happydiggers.net/showthread.p...Decay-on-Crack

    And reported on the TFC forums as well:
    http://terrafirmacraft.com/f/topic/9...sian-roulette/

  7. #7
    In that case I''' hold off on trying to figure out decay rates until after this is fixed.

  8. #8
    Quote Originally Posted by latyper View Post
    In that case I''' hold off on trying to figure out decay rates until after this is fixed.
    Random decay is coded in, and works like this: All food stacks start life with a decay value of -24. The negative value then ticks towards 0. Once it reaches 0, the very first tick of decay on the food item is random and based on a function of it's weight. This usually results in a value ranging from 0 to .5%. This initial tick is the most important one, since decay compounds. So a piece of food that takes an initial tick of .5 will be gone long before a piece of food that takes an initial tick of .1. In this way, you can have several "identical" stacks of food in a container or in inventory, all placed there at the exact same time... and all will have vastly different decay values after a period of time.

    Temperature of course plays a role in decay rate, by way of being part of the calculation of the environmental decay factor, which is multiplied along with all with other decay factors, such as being cooked, being in a vessel, salted, dried, smoked, preserving etc, when determining the decay amount for each tick. Rain once had an effect on decay as well, but they removed that feature soon after introducing it...

    As far as I've observed, everything is working exactly as it's was coded to, and apart from that one bug, as the devs intended it to be...

  9. #9
    Quote Originally Posted by LarsonPacific View Post
    Random decay is coded in, and works like this: All food stacks start life with a decay value of -24. The negative value then ticks towards 0. Once it reaches 0, the very first tick of decay on the food item is random and based on a function of it's weight. This usually results in a value ranging from 0 to .5%. This initial tick is the most important one, since decay compounds. So a piece of food that takes an initial tick of .5 will be gone long before a piece of food that takes an initial tick of .1. In this way, you can have several "identical" stacks of food in a container or in inventory, all placed there at the exact same time... and all will have vastly different decay values after a period of time.

    Temperature of course plays a role in decay rate, by way of being part of the calculation of the environmental decay factor, which is multiplied along with all with other decay factors, such as being cooked, being in a vessel, salted, dried, smoked, preserving etc, when determining the decay amount for each tick. Rain once had an effect on decay as well, but they removed that feature soon after introducing it...

    As far as I've observed, everything is working exactly as it's was coded to, and apart from that one bug, as the devs intended it to be...
    Wow. Have you been hacking the code? How did you find out all this stuff about initial decays and everything?

  10. #10
    I think he just downloaded the sources from GitHub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •