Fiddi 68 Posted March 13, 2018 Hello, I was wondering exactly what is saved when using the existing save function on missions. I get that units, vehicles and stuff that is placed inside the editor is saved and such, but are variables in the init.sqf saved? How about dead bodies and destroyed vehicles? Are there any event handlers for when the game is saved and loaded? I'm trying to design my mission with as few external scripts and functions as possible, mainly because I want to be able to use the vanilla save and load. But I need to know what kind of limitations I will be encountering. Thanks! Share this post Link to post Share on other sites
Larrow 2814 Posted March 13, 2018 1 hour ago, Fiddi said: I was wondering exactly what is saved when using the existing save function on missions. You can see exactly what is saved by using CfgConvert on your .Arma3save file. Arma3 tools > CfgConvert > BINToCPP.bat. Just drop your save file on the batch file and a readable version will be created next to the original file. Which will show you a whole host of things including (but not limited to) all entities, their states and namespace variables, eventhandlers, as well as scripts their variable values and current instruction. I would recommend starting with something simple, like just the player in a VR mission (no map objects or wildlife agents) with a simple looping scheduled code (spawn-ed) from the init.sqf to show you script state, as there is a lot of information saved from all things BI and data needed for the engine. 1 hour ago, Fiddi said: Are there any event handlers for when the game is saved and loaded? There is the mission eventHandler "Loaded". For saving I suppose you could hook into the escape menus button. 1 Share this post Link to post Share on other sites
HazJ 1289 Posted March 13, 2018 You can also check these out: https://community.bistudio.com/wiki/saveProfileNamespace https://community.bistudio.com/wiki/profileNamespace Share this post Link to post Share on other sites
Muzzleflash 111 Posted March 13, 2018 AFAIK everything needed for single player resumption, except UI scripts and other scripts containing disableSerialization, is properly saved and restored upon loading. Share this post Link to post Share on other sites
Fiddi 68 Posted March 14, 2018 @Larrow That all sounds very complicated. Is the init executed on every mission load? If so there's a simple possibility to just have a few ifs and thens to load whatever necessary from profileNamespace. And I was thinking manual saving as in trigger or action induced. So as to have clear checkpoints which makes loading and saving easier. Share this post Link to post Share on other sites
Muzzleflash 111 Posted March 15, 2018 If you are making single player mission and want to use vanilla save system, just run the command when needed. I think whether the player can manual save depends on the difficulty chosen. Otherwise to ensure the player can manually save you can run, e.g. from init.sqf: enableSaving [true, false]; And to manually make a checkpoint (autosave), for example, you have a trigger with some condition, then in on act you just have: saveGame; Share this post Link to post Share on other sites