Jump to content
Thomas Banks

Persistent save/load and respawn (PAID)

Recommended Posts

Hi all, this is going to be fairly long-winded with no tldr and is an extremely large project, at least for me.

There's a lot of "I would like" in this post, I'm not a supercilious person I'm just unsure how else to word things.

I'm making a scenario to run with my mates whenever we feel like it, usually 8 hours or so every second night, I have a dedicated machine I run the server from but I don't like leaving it on 24/7. I have maybe 200 hours basic scenario creation experience and the scenario itself is a big passion project for me, the basic issues I run into are a nice thing to sort out, the scripting issues or more so lack of scripts are stopping my ideas.
I have a few problems which naturally snowballed into more what-ifs and issues. I haven't delved into scripts at all, just basic commands in triggers and game logic, improving along the way. I have very minor coding experience, 2 University courses worth and a lot of this is way above my head so I'm reaching out for help, I'm hoping people will help out of the kindness of their heart but I know time is money and there are a lot of issues, so if it is allowed I'm willing to pay privately with details also discussed privately. I'd hire a private programmer but much of the arma3 context would be lost which is important.

Persistent saving/loading:

The scenario is essentially a campaign completing tasks as we see fit to retake land and reach an ultimate goal, which I'm undecided on. I'd like essentially all vehicles, player loadouts, player positions, gear in 'crates' and a virtual arsenal we can load with gear from missions, to save upon server shutdown and load upon server start-up. I've looked at a few mods that promise some of these things but they all require player intervention or won't work with custom scenarios, I want an automated system from the moment we first join the server to the moment the campaign finishes. The virtual arsenal is a problem on it's own as I have no clue how to create something that saves gear, much like the antistasi community have made. The other things I know exist because there are multiplayer servers with these features but I'd have no clue how to go about setting it up properly.

Problems with the start of the mission:
The mission starts with no respawn and 6 playable characters in a boat, spectator enabled, with respawnOnStart -1 and respawn as BASE.
Once the first objective is complete the respawn enables (lore critical).  Disabling spectator mode isn't an option as people just respawn on their dead bodies, plus I'd rather people have something to do after they die in the first section of the scenario.
The mission plays out how I want it to with AI disabled and all players connected when I launch the mission (not using autoinit) however there are other issues.

With AI Disabled, players that hotjoin once the mission has started spawn where the playable characters are placed, rather than as a spectator until the respawn is enabled, which I want to fix. Furthermore if players die and rejoin they spawn in the initial playable character spot, out in the ocean, 2km from land, even if they have already died as that character. In my experience not using respawnOnStart -1 results in everyone being a spectator when the mission starts, so I assume 'running the respawn script' once the mission has started would fix this since players that join would be spectators due to being forced to respawn on joining, but I'm not sure how to do that. I also suspect this would cause more issues with further questions about persistent saving and loading.

With AI Enabled, players that hotjoin once the mission has started replace the AI, which is fine for something temporary, but the issue is I don't want to run the mission with AI Enabled on the playable characters. Again much like with AI Disabled with an added bonus, upon leaving the server an AI spawns on the playable characters initial position and then once the player joins they take control of it, even if they have already died.

I haven't tested with autoinit but I presume they would spawn in the boat if taking control of an AI with AI enabled, otherwise in the water underneath the boat with AI disabled. The same issues with leaving and rejoining would likely occur in either case.


I realise this is a complex issue once taking into account persistent saving and loading and will involve a custom respawn script, but I'm not even sure where i'd begin myself.

What I would like to work up to:
I would like to have the initial 5 minutes of server start to be the editor placed player positions from the roles selected, even if the boat has moved (which i'm not sure is possible and open to alternatives) as people may take longer to load. Further respawns and hotjoins should be spectator up until the point the respawn is enabled, spectator should then disable, then a custom loadout be the default respawn loadout and the respawn point be a selectable spawn after death, it must be selectable since we'll have more respawns enabled as the campaign continues. After the initial respawn is enabled any players positions and gear are saved and loaded on player disconnect and reconnect respectively, along with their gear. When the server is shutdown I would like the mission file to save and overwrite (completing missions triggers deletion of clutter not needed anymore), vehicles to save where they are, in their current health/fuel state with current 'gear', containers with 'gear' to do the same. I would also like to have a virtual arsenal as mentioned before that takes in gear and saves it much like antistasi does only with no 'unlock' feature, just what is put in. On server startup I would like all of this to load in and continue from where it was saved.

If you're interested in helping me out please send me a message, any comments that can help are welcome.

Share this post

Link to post
Share on other sites

Hellow, I read your wishes about respawn, spectator and mission progress save. Well, In my opinion there is no way to turn on/off/change spectator and respawn mode DURING mission (on the fly, that you need right ?). This params are fixed and you can set them only in editor/description.ext and you cant change them after mission start. Its all just my opinion which base on my personal experience as arma 3 editor user, mabye I dont know something. The only thing I can recomend with respawn it is to set up "menu position" respawn mode and add "respawn point/location" only after first objective complete, so you cant respawn before 1st objective complete because there is no respawn point (its just example and my vision).  About mission progress save, recommend to try this script: https://github.com/gruppe-adler/grad-persistence . 

  • Like 1

Share this post

Link to post
Share on other sites

Thanks for your reply, I managed to get ALiVE going for all my persistence 'issues', found a handler on the forums that deletes dead bodies on disconnect to sort out players re-logging and looting their bodies, and had a few more looks to through the editor and found the option to disable ai in the mission. Now players now spawn in as the playable character on the initial server start, and where they left off every login, assuming they use the player exit. I haven't tested being able to re-log to respawn at the initial spot in the first section of the scenario, but I assume ALiVE will have sorted that as well, as long as people aren't using the regular abort. I've just left spectator on, not a huge deal if mates want to spectate each other and I see it as the only workaround short of having a respawn for the first task.

The only issue standing now is the default respawn loadout, I want 1 loadout to be the automatic respawn loadout and I spent a few hours trying to get it working last night.


in my initServer.sqf:

[east, "V_Rifleman"] call BIS_fnc_addRespawnInventory;

in my description.ext:

#include "RespawnLoadout.hpp"

in RespawnLoadout.hpp:


class CfgRoles
	class Rifleman
		displayName = "VC";
		icon = "a3\Ui_f\data\GUI\Cfg\RespawnRoles\assault_ca.paa";
class CfgRespawnInventory
	class V_Rifleman
		displayName = "VietCong";
		role = "Rifleman";
		icon = "\A3\ui_f\data\map\VehicleIcons\iconManLeader_ca.paa";
		show = "side group _this == east";
		weapons[] = {
		magazines[] = {
		items[] = {
		linkedItems[] = {
		uniformClass = "vn_o_uniform_vc_reg_12_10";


I think replacing east with missionNamespace in initServer might to the trick, unsure though.


Replacing east with missionNamespace did not work, still respawn with default character loadout.
Placing CfgRoles and CfgRespawnInventory directly into description.ext also didn't work.

If it assists anyone who can help me, all playable characters are Rifleman (M1 Carbine) in Men (VC Local).
in config viewer vn_o_men_vc_local_16.
I'd like to change the icons once it's working.


Got it working, had to have 'select loadout on respawn' in the multiplayer options of the editor....

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