Arma 3
Ravage
sukhoi191 Nov 22, 2020 @ 2:40pm
Persistent save / load system - in development
Hello!

I'm currently working on a persistent save system for Ravage (and other) missions, since long-time playing on a vanilla save system doesn't ever go well, at least for me. There are many instances, in which it's impossible to continue playing, e.g. actions such as searching for loot or sleeping stop working, lag increases gradually until it gets really noticable (possibly due to a lot of unnecessary data being kept and processed) etc. Also, some of the mod functionalities behave oddly, for example: vehicles with dead bandits start to spawn and their bodies disappear, when you enter the vehicle.

Also, let's not forget about the fact, that ArmA updates make older save files incompatible.

So, instead of complaining, I've decided to fix this by creating my own load / save system. Well, it is my own, but it's based on the same principle as Antistasi persistent save system, i.e. by storing data in profileNamespace, so I have to give them credit and thank them for this clever solution :) System from Antistasi doesn't seem like it's prepared to be added to a custom mission, so I've started creating a new one from a scratch.

Now, how does it work?

- Technically: each ArmA 3 profile has a file called "<ProfileName>.vars.Arma3Profile". It is possible to store your own data in this file from any mission, and then load it by using profileNamespace. By storing only really important data, it is possible to start the mission again, load a persistent save and play without all the garbage present in default ArmA saves, which should prevent any problems I've described above. I think that default saving system isn't prepared for a long (or in this case - infinite) missions.

- Practically: player uses the radio to do the work (Juliet for saving, Alpha through India for loading slots). Oldest loading slot is overwritten automatically when saving, but I'm trying to keep things extensible enough to allow other save systems, such as using actions or anything a mission maker can think of. I'm also trying to not make it dependent on Ravage, so missions outside of this mod can use it as well.

Currently, I'm storing data listed below:
- Player (loadout, position, damages, stamina, identity, rating, units under his command - each unit also has the same details stored).
- Vehicles - only those, which player marks with a special action. Cargo, damages, fuel an position are stored.
- Custom units - it's possible to add units other than player to be stored by adding them to a specific array. Units under their command are stored as well.
- Containers - as in case of vehicles, cargo, damages and position are stored.
- Environment data - day, time and weather are stored.

I'm sure there's a lot more that can be stored, but for now it seems that most important parts are done and work pretty well, at least in my tests.

Unfortunately, I got stuck when it came to storing Ravage data. Ravage has functions to GET some information (such as days passed, hunger, thirst etc.), but it's impossible to SET them (at least I haven't found a solution to this problem). Restoring Ravage-specific data would be a very important part of this system, so here's a question to @Haleks - do you think it would be possible to add setters to your mod?

I will share the code of the saving system in the near future, I just need to do some cleaning and write a quick documentation :)

-- Edit 1 --

Here's the link: https://gitlab.com/sukhoi191_a3/arma-3-persistent-save-system

-- Edit 2 --

Nevermind about that problem regarding setting values. After quick look at Ravage functions, it turns out all I have to do is to call for example:

player setVariable ["hunger", 50];
Last edited by sukhoi191; Nov 29, 2020 @ 11:56am
< >
Showing 1-4 of 4 comments
TenuredCLOUD Feb 15, 2021 @ 11:31pm 
Following this, currently utilize inidb2. Would like a more robust system. :)
sukhoi191 Feb 16, 2021 @ 1:46pm 
Originally posted by TenuredCLOUD:
Following this, currently utilize inidb2. Would like a more robust system. :)

I've actually created a topic on BI forums a couple of days ago, regarding my implementation of persistent save system, first public version is ready to use :) You can try it out, although please remember, that it's still in alpha (it's perfectly usable, but you should expect some bugs, since noone tested it besides me). I'm using it for Ravage and it works really well, at least for my playing style. I plan on making a sample Ravage scenario for testing, which would utilize this system, as well as a video showing it's possibilities and usage. Stay tuned!

https://forums.bohemia.net/forums/topic/232713-persistent-save-system/
TenuredCLOUD Feb 16, 2021 @ 3:34pm 
Would this work in say a 40 slot persistent MP server? (it seems to only be for SP in your thread) We were thinking of utilizing it and then passing more info on to you. If you'd like feel free to join our Discord so we can further discuss goals! :)

https://discord.gg/r2aT3vp
sukhoi191 Feb 17, 2021 @ 8:54am 
Thanks, I've just joined, same username as on Steam, message me when you have time :)

As I wrote on BI forums, I didn't really create this with MP in mind and I didn't test it at all on MP. It should work to some extent, I think. Feel free to test it and let me know about any problems. I have no experience in creating scripts for MP, though, so I can't promise I'll be able to make fixes now, but I'm open to anyone who's willing to help with development and / or give me some advice on making it work on multi :)
< >
Showing 1-4 of 4 comments
Per page: 1530 50