Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 58
  1. #41
    I delved much deeper into the TFC source code to figure out exactly what happened this last update.

    What they did, was change how the decay value is stored. Simply put, it went from two decimal places, to four. Seems like a minor change, however, this has a _massive_ effect on lifespan of foods in certain areas.

    Consider a stack of fruit near the equator. Say its initial tick off zero is 0.2, or 0.20. Decay calculations are very precise, using float values for most calculations, with many, many decimal places; most early decay calculations in most climates return fractions of a percent decay. At 35C (pretty warm imho), this stack of raw fruit, which has a 2.0 decay multiplier sitting at a current decay of 0.20, will get it's decay tick calculated at 0.2097037845, or when truncated to two decimal places... is... 0.20.

    So, there was the problem.

    The decay tick would simply update the decay timer and rewrite the same decay value of 0.20 back to the stack of food. Wash, rinse, repeat. Like being in a freezer most of the time, but not. Until the player happens to be standing somewhere where the calculated decay gets over that hump, like in front of a firepit, or during a hot part of the day, the decay would never tick... and even when it did, still would probably not tick regularly due to changing temperatures, temperature caching etc, thus drastically or indefinitely increasing shelf life of the food. When you take into account all the fractional decay percentages being regularly tossed out effectively nullifying the majority of all early decay ticks, the bug was making almost all food everywhere last an artificially long time.

    Their truncation function simply took the very precise decay float value, multiplied it by 100, stored it as an int value (fancy name for a whole number), then returned it divided by 100 again as a float and stored it, thus effectively truncating the decay to 2 digits. All they did in the update was change the multiplier from 100 to 10,000, so now it truncates to 4 decimal places. Ironically, this in-house truncation function they wrote, is named "roundNumber" XD

    Now, taking into account that each tick is now actually logging decay far more accurately and not throwing away those all important early fractional decay ticks, and the fact the average temp is 45C near the equator, and the fact that a person who logs off while others rack up several hours total play time will receive hundreds of decay ticks in quick succession using a decay "protection" of only 50% a regular tick or more when they log in, it's not difficult to see why people's food is evaporating between logins near the equator on hardcore. It's just designed to be that way.

    So anyways, that's why decay is doing what it's doing. It's possible there may be a cauldron issue, but nothing I've seen myself personally really indicates the issue is any deeper than this. My initial tests were flawed because I was testing at the equator with fruit, at a temperature where every tick would have logged decay, so testing decay times showed little difference between current and previous versions. Using a mathematical model accounting for the decay truncation, everything became clear pretty quick.

    Decay protection on the other hand, now makes less sense in my head. According to the source code, if you've been offline more than 24 in-game hours, and less than 576, your food in inventory will take that many decay ticks (yes, it will process every last one of them individually) at logon, with a decay protection multiplier of 1 - (remainingTicks/576) which is multiplied in with the other decay multipliers. Logging in after 576 hours, however, you will simply take 24 ticks of regular decay. Go figure? The numbers aren't jiving in my brain, but I will have to do some further mathematical analysis to determine if anything is indeed awry...

    On a personal note, for others who haven't seen me online much lately, since food preservation isn't really my thing outside of pure mathematical curiosity, and I don't want to pack my smithing shop back north, I'll probably just pack my gear in the ark, await the flood, and focus efforts elsewhere for the next while... maybe towards getting the new maps ready

  2. #42
    Lazy Idle Couch Potato Heptagon_ru's Avatar
    Join Date
    Aug 2014
    Location
    Russia, near Moscow
    Posts
    1,154
    Awesome Awesome
    Quote Originally Posted by LarsonPacific View Post
    Decay protection on the other hand, now makes less sense in my head. According to the source code, if you've been offline more than 24 in-game hours, and less than 576, your food in inventory will take that many decay ticks (yes, it will process every last one of them individually) at logon, with a decay protection multiplier of 1 - (remainingTicks/576) which is multiplied in with the other decay multipliers. Logging in after 576 hours, however, you will simply take 24 ticks of regular decay. Go figure? The numbers aren't jiving in my brain, but I will have to do some further mathematical analysis to determine if anything is indeed awry...
    What is the remainingTicks(=decayTick) value in seconds or meaning? This tick occures once an hour? Or something like random tick? Because e.g. if these ticks are those 20 Hz plain ticks, then the value of the expression (1 - (remainingTicks/576)) can easily be negative.

    576 hours is 24 days. Which is afair 2.4 months 3 months, i.e. about 6.4 8 hours irl. So the explanation could be: if you went offline for "few" hours, the processes in game "still go" for you, you are still involved in game world. If you went for much longer and most likely "forgot" what it was at logoff - no need to care for your synchonization, you will anyway forget what your state was, better to give you some not-very-decayed food at start.

    Quote Originally Posted by LarsonPacific View Post
    focus efforts elsewhere for the next while
    You could try the AMP server
    Last edited by Heptagon_ru; 3rd February 2016 at 08:21.

  3. #43
    Yes, that's the decay protection, if you are offline over 24 game hours you get significantly reduced decay, under that it's proportional in some way I'm sure you guys will explain:-)

    It's clear this tiny change has had a large impact on decay. For us this is unfortunately compounded by the fact that we are in a somewhat artifical situation - compelled by circumstance to be living in the tropics, in close proximity to each other (thus keeping the chunks loaded) it has caused a significant change in game balance which has been frustrating for players.
    I'm sure it's been equally difficult for admins unable to provide easy answers to players due to the complexity of the decay mechanic, the potential involvement of KCauldron and the lack of information from the TFC devs who are most likely unaware of the extent of the change that fixing this tiny bug has caused.

    Thanks LarsonPacific for tracking that down and resolving this somewhat, it would seem that once we are on the new server and settled away the tropics and each other, far more aware of the food decay mechanic, we should be able to get closer to the game balance we have been used to without needing to change any default configs.
    Last edited by TheRealPoker; 2nd February 2016 at 13:04.

  4. #44
    Quote Originally Posted by TheRealPoker View Post
    Yes, that's the decay protection, if you are offline over 24 game hours you get significantly reduced decay, under that it's proportional in some way I'm sure you guys will explain:-)
    * Under 24 game hours, decay ticks will catch up regularly.
    * Game hour ticks from 25 to to 576, each decay tick will be multiplied by (1-(number ticks remaining/576))
    The exact code excerpt is: protMult = 1 - timeDiff / (TFCOptions.decayProtectionDays * 24);
    * Over 576 game hour ticks, your decay ticker will simply be set to t-24. Same as being gone only 24 game hours.

    This not only applies to just food in inventory, but any food stack anywhere in a loaded chunk that has been unticked for whatever reason.

    I modeled this today factoring in the decayProtection multiplier. It actually makes exactly as much sense as first appears... which is to say, it actually doesn't make sense.

    If you log in after 575 in game hours and the temperature is 40C, even cheese and raw grains in your inventory will fully decay before your eyes. Unlike if you had been playing normally, you'll also have no chance to remove decay. If you log in after that though, you will receive only a little tiny bit of decay (24 hours worth). So, you get rewarded with only small amounts of decay if you play less often using this mechanic. Go figure?

    This mechanic however, has never functioned properly before now, so it's actual effects have never been experienced before. In additon, there isn't really any reason the default is set to 24 days. The devs just picked it out of the air, and nobody has ever mentioned it because the underlying decay mechanics were broken, so it really didn't have much of an effect anyways.

    The only reason the mechanic exists to begin with, is to allow people who haven't logged in for a while to retain their food and not have to start over each time they play on a server, but also make it difficult for people on servers from exploiting the ability to do so and setting up an "unloaded chunk fridge".

    Based on my mathematical modelling, and the feel of the HappyDiggers community, I feel like a setting of decayProtectionDays of about 6 in TFCOptions.cfg would be more reasonable and mathematically sane, and be inline with actual developer intentions. That would mean a stack of raw meat should decay to a max of ~50% at 40C upon login after 144 in-game hours, actually giving a player a chance to retain at least a bit of what they harvested before their mom called them for dinner. XD That would be ~2 irl hours instead of the current ~9. If the player is gone for more than ~2 hrs, the decay will then just be treated like they were gone for 10 currently; that is to say, only 24 decay ticks would occur. Modifying that setting would also not otherwise affect core decay rates; only players returning to the game or to an unloaded chunk. It should also fix this issue of it being a total crapshoot as to whether your food will still be in your inventory when you log in, as the current setting makes it a game of boom-or-bust russian roulette on your food depending on how long you've been gone if you happen to be in a warmer area... yet it would still maintain a reasonable semblance of regular decay. Otherwise, why not just turn decay protections completely off? Given the math, I don't feel there's anything rational behind the current default value of 24 days, where food is completely disappearing after 8 hours in real life, but then would have been totally okay after 12... but that's simply my opinion.


  5. #45
    Thank you for investigating the decay mechanic more closely.

    If I understand you correctly it would seem that by fixing a bug the TFC devs have introduced strange and perhaps unintended behavior. Correct?

    We could perhaps try to work around it by changing config options. But it seems to me that as long as there is a situation where decay stops accumulating and switches from completely destroying food to rewarding players for playing less, that is not something anyone should want.

    Would you mind bringing this up on their support forum? If this was not intended they may release another update for this.

  6. #46
    Bah, I said 24 hours and meant 24 days - why did they both have to be 24? Perhaps that's how they came up with the figure in the first place:-)

    The other thing that makes it a lottery is the server time stops when no-one is on, so even if you've been gone a day irl, you could still be under 24 game days and get hit with an unprotected decay rate.

  7. #47
    While American Truck Simulator DLs/installs I will run their code through MATLAB and make some nice graphs.

    EDIT: Install finished before I could get the code running. I will get it thrown together tomorrow and run parameter sweeps. This may help us show the issue.
    Last edited by DOM; 2nd February 2016 at 23:53. Reason: Got bored

  8. #48
    Quote Originally Posted by InsaneJ View Post
    Thank you for investigating the decay mechanic more closely.

    If I understand you correctly it would seem that by fixing a bug the TFC devs have introduced strange and perhaps unintended behavior. Correct?
    Yes, that's basically what it boils down to. They fixed the decay rate so things are decaying properly in all conditions as intended, but now have created an acute lottery effect with the decay protection mechanic that rewards players for being offline longer.

    From the TFC Wiki on Food:
    This also means that items in environments that do not tick properly (such as on the ground, or in other mod's containers) will instantly update and make up the lost decay as soon as it enters a player's inventory. For example: A player kills a pig, and then walks away so that the items are in unloaded chunks. The player returns a few [in game] weeks later to pick up the pork that did not despawn because the chunks were unloaded. As soon as the pork enters the player's inventory, it will rapidly make up for the lost time, quickly decaying until it disintegrates in the player's hands.

    From that excerpt on decay, it would seem like the random complete disintegration depending on the time the player picks up the pork is indeed intended. In that example, if the player comes back four in-game weeks later instead of three to collect the pork, still only 24 ticks of decay would appear instead of it disintegrating in the players hands. In essence, they have simply arbitrarily chosen a lottery date, where if you leave food long enough, it will last indefinitely. Since it was chosen arbitrarily, I doubt they would bother changing it, and just say if we don't like it, change the option they have provided to do so.

    If we were to change the lottery date to six in-game days, the pork on the ground in the example would probably still be okay when picked up, taking at most ~50% decay, though I really don't see anyone consciously attempting to exploit this behavior. XD Nor do I forsee a town telling people to make sure to collectively wait six in-game days between refrigerator visits so the food gets ticked less... it would just be too inconvenient to be remotely worth it. So in essence, reduction of the value wouldn't really provide any other player benefit other than just limiting the lottery effect of the mechanic which currently rewards players for longer periods of inactivity...

  9. #49
    Well said LP.

    I choose this community/server/HappyDiggers in general because it was the first TFC server i found. I was looking because I've been playing games for over 20 years now on the computer and have learned solo play is for learning and multiplayer is for the fun and interaction with others. I love the people and rules. I've been off the server because of this 'trivial' issue. Decay by no means breaks the game and forces a new set of rules upon everyone. i choose the easy approach and to try something new. I've been on technode for a couple days now. same ole grind, same issues but i get to keep my food.

    i would like to see LP's idea at least considered. He is a great ambassador for HappyDiggers and the server. I will be back and may take up Ark again while dabbling in Technode and assisting in HC.

    learning can be fun in solo. learning with others, even better and more enjoyment that makes you take days off work to get more of it. I know nothing about servers, maintenance or otherwise, but i did notice the HC population rise considerably to only drop back down again. i look forward to this community growing bigger.

  10. #50
    Lazy Idle Couch Potato Heptagon_ru's Avatar
    Join Date
    Aug 2014
    Location
    Russia, near Moscow
    Posts
    1,154
    As I understand, keeping food in fridge with temp below zero keeps the food without much decay.
    So now you need to tp to fridge before logoff so later when you login the accumulated decay will be much less and food don't disappear in your hands.
    And after login do not tp to your warm base right away, let all the accumulated ticks bring the decay while you are still in cold climate.
    Same for the case when you tp to grab some food from the fridge.
    This seems to match my experiments.

Posting Permissions

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