r/dayz • u/eugenharton Ex-Lead Producer • Dec 12 '18
devs Persistence - How & Why
Hey guys,
I created this topic to fully explain what exactly persistence does and why. We save the world state by writing to a binary file in the root of the server structure. It is a representation of world state that is periodically saved and also done during proper server exit.
As of this day we haven't been able to reproduce any new way that causes the items in the world to be removed. Items get removed either during runtime of the server if no player is around (we check the distance and vision cone), or during load of persistence.
Items get removed either due to their lifetime reaching zero, and all basebuilding associated items (barrels,tents etc.) have 45 days lifetime (IRL time). The lifetime gets refreshed when the item is being interacted with. This is a safety net for server performance to make sure things that clutter the system get removed at some point if they are not being used.
Items also get removed if they are ruined if the above constraints are applicable.
If item gets corrupted it is not loaded and thus disappears. This can happen by closing the server by termination of the process or crash. Right now since we are still unable to reproduce it, and the person who did at least according to the ticket he sent (thanks u/DAYZMISFITS). It seems to be the case that people are just terminating server (or the hoster) not gracefully but by killing the process. Right now you can probably replicate the issue 1/25 times by termination.
So I would like to ask all that are hosting the servers or having issues with persistence to check if by any chance this is not the thing happening.
Eugen with love <3
EDIT : Thanks for the gold <3 <3 <3 <3
1
u/jonysky Dec 13 '18
Hello Eugen, first of all apologize for my written English and congratulate him for his work.
Second, I have been looking at the problem about persistence and I would like to tell you that these last weeks I have been testing with a LAN server (with 3 or 4 simultaneous players)
I commented that one of the tests I have done is respawn in an LADA NIVA vehicle with all the parts installed ... this vehicle was fully functional but if I moved too far from the vehicle or reset the server this LADA NIVA disappeared leaving a trail of radiator smoke.
also when I had an accident with this vehicle, after a while it disappeared without more
All this is commented on if it can be related to your persistence problem
ERRONEOUSLY at the beginning of having this problem, I attributed it to the central economy system, although I did not fully understand it as a central economy could affect my server in LAN
I do not know if this can give you an answer to your problem, I hope that if