Jump to content

Sp persistent gameplay save

Recommended Posts

Random one for you eden editor experts. 
I'm trying to setup a persistent zombie/survival game, on a single player scenario, with weeks of playtime.
 Basically a map with caches, bandits, zombies etc. 
I want to do one big build and setup on eden, but I want to be able to load the scenario  back into eden after I've actually played it, I want it loaded in with all the changes that will have happened to my character and the map as I've played it.
Basically, does arma have the ability to load a saved, being played scenario into eden? And then play on from that version.. ..
Any help appreciated, two days looking foe answers on this..   

  • Like 1

Share this post

Link to post
Share on other sites

Have a look into these things, let me know if you can't figure it out, saw this on my phone while doing something else so only wrote a quick reply:


https://community.bistudio.com/wiki/saveProfileNamespace (<= does the actual persistant save)

https://community.bistudio.com/wiki/profileNamespace (<= needed for the save)

https://community.bistudio.com/wiki/setVariable (<= sets what you're gonna save)

https://community.bistudio.com/wiki/getVariable (<= loads stuff back in after a restart with this)

  • Thanks 1

Share this post

Link to post
Share on other sites

Could you explain a little of how to actually do this? I didn't understand which order or what and how to enter these in, thanks for your help. 

Share this post

Link to post
Share on other sites

So first things first, identify which variables you want saved.  In my example that's gonna be _ammoCount and _dayTime.

Once you have those do the following:
profileNamespace setVariable ["_ammoCount", _ammoCount];

profileNamespace setVariable ["_dayTime", _dayTime];


You've not successfully saved those 2 variables to a document in the users profile (username.vars.Arma3Profile to be exact).
Now that's not really useful unless you can also read those variables out of that document.  That's what getVariable is for.  Now keep in mind that the very first time someone plays your mission he won't have any variables set in his profile.  So you'll need to give the getVariable command a default value.
_ammoCount = profileNamespace getVariable ["_ammoCount", 30];
_dayTime = profileNamespace getVariable ["_dayTime", 0700];


That's all you basically need.  
This is the script way of doing it, you could always just pack your mission into a pbo and play it the regular way allowing you to save it with BIs build in save option. 

Also on a side note don't do that saveProfileNamespace in a loop, it's a heavy operation.  Give the user the ability to save it with an addaction or something like that.

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now