Jump to content
target_practice

What exactly do savegames save?

Recommended Posts

This unfortunately seems to be a rather opaque topic with essentially no documentation on the BIKI that I can find.

I understand that saving the game records the position and status of objects in the game world, along with the time and other environmental factors.

However there seems to be an indication that it can also record the execution status of some scripts (or at least the values of variables), but not others?

 

In short, I essentially don't know what a savegame does and doesn't record the state of.

Share this post


Link to post
Share on other sites

From experience when you load you start at your last location but the tasks are again completed once you load. Its like the game is running the scripts all over again from the start. So when you load sometimes it works sometimes it does not.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, target_practice said:

However there seems to be an indication that it can also record the execution status of some scripts (or at least the values of variables), but not others?

 

As far as I know, saving does record all variables, maybe even local ones (I'm not sure on this).

You can auto-delete variables before the game is saved with an EH - this is how I'd do it :

[missionNamespace, "OnSaveGame", {
	call {
		{
			missionNamespace setVariable [_x, nil];
		} forEach ((allVariables missionNamespace) select {(_x find "var_to_delete_") isNotEqualTo -1});
	};
}] call BIS_fnc_addScriptedEventHandler;

Attach a key word to any global variable you want to destroy before saving, and you won't have to worry about them anymore. 😉 

If you have scripts running that populate those variables, you might want to terminate or pause them first.

  • Like 3
  • Thanks 1

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

×