DayZ-CommunityFramework icon indicating copy to clipboard operation
DayZ-CommunityFramework copied to clipboard

Add persistence info to avoid read on first boot of CF after installation

Open Arkensor opened this issue 3 years ago • 4 comments

Right now because of the preparations for feature/modstorage CF attempts to read our data even when it was installed for the first time. When the server had existing mods / vanilla data these are then destroyed.

The proposed solution is a local information file (in appdata or maybe even $mission so it can use the existing persistence folders!) that stores the persistence IDs of all the objects CF has modified in OnSave, so we know its safe to let CF handle the OnLoad.

For existing servers that have CF installed @Jacob-Mango and I think that we can only do this bugfix together with a dayz version change to use the face that the persistence version can be used a switch to see if our system would be in place or not.

Arkensor avatar Jan 09 '22 10:01 Arkensor

Related to #53

Arkensor avatar Jan 15 '22 10:01 Arkensor

GetPeristentId might not be available on during data load. What could work is only use the file for players and their gear, and use the fact of the id file existing at all for the rest. First load do not read. Save write the file if not exist. Second load will now be able to safely access the cf_version.

Arkensor avatar Feb 14 '22 08:02 Arkensor

Does this also relate to cartents and largetents not being persistent after server reboots ? Partytent and mediumtent are unaffected. Only when I enable CF. cartents and largetents disappear after reboot

gjvdheuvel avatar Feb 16 '22 08:02 gjvdheuvel

Does this also relate to cartents and largetents not being persistent after server reboots ? Partytent and mediumtent are unaffected. Only when I enable CF. cartents and largetents disappear after reboot

No that is unrelated. Update your mods, one of your other mods breaks it.

Arkensor avatar Feb 18 '22 09:02 Arkensor