Arma Reforger Script API
Loading...
Searching...
No Matches
SaveGameManager Interface Reference
Inheritance diagram for SaveGameManager:

Public Member Functions

proto external void StartPlaythrough (ResourceName missionResource, string optionalName=string.Empty, bool transition=true)
 Remember info for save-point creation and kick off transition to mission load.
 
proto external bool IsSavingPossible ()
 True if saving is currently possible.
 
proto external void SetEnabledSaveTypes (ESaveGameType enabled)
 Configures which save types are currently available.
 
proto external ESaveGameType GetEnabledSaveTypes ()
 Get the currently enabled save types.
 
proto external void SetSavingAllowed (bool allowed)
 Allow or disallow saving.
 
proto external bool IsSavingAllowed ()
 True if saving is currently possible (incl. busy state) AND allowed.
 
proto external int GetCurrentPlaythroughNumber ()
 Get the number of the current playthrough.
 
proto external bool RequestSavePoint (ESaveGameType type, string displayName=string.Empty, ESaveGameRequestFlags flags=0, SaveGameOperationCb callback=null)
 Request a new save point to be created.
 
proto external bool RequestSavePointOverwrite (notnull SaveGame save, ESaveGameRequestFlags flags=0, SaveGameOperationCb callback=null)
 Request to overridde a save with new data.
 
proto external bool IsBusy ()
 Busy state is entered on e.g. save creation, migration, deletion.
 
proto external bool RetrieveSaveGameInfo (array< ResourceName > missionfilter=null, SaveGameOperationCb callback=null)
 Attempts to retrieve save game info from storage source.
 
proto external int GetSaves (notnull out array< SaveGame > outSaveGames, ResourceName missionfilter=ResourceName.Empty)
 Access data for known save game info (RetrieveSaveGameInfo has to complete first to load existing saves).
 
proto external SaveGame GetActiveSave ()
 Get save game currently being played.
 
proto external void ResetActiveSave ()
 Resets the active save to none. So e.g. quick load no longer uses it.
 
proto external void Load (notnull SaveGame saveGame, bool transition=true)
 Continue the game from this save point.
 
proto external void Delete (notnull SaveGame saveGame, SaveGameOperationCb callback=null)
 Delete the save point.
 
proto external void DeletePlaythrough (ResourceName mission, int playthrough, SaveGameOperationCb callback=null)
 Delete all save points of the given playthrough.
 
void OnSaveCreated (SaveGame save)
 Called when a new save point was created.
 
void OnSaveDeleted (SaveGame save)
 Called when a new save point was created.
 
void OnBusyStateChanged (bool busy)
 Called when busy state changes.
 

Static Public Member Functions

static proto ResourceName GetCurrentMissionResource ()
 Get the currently active mission name (Mission header or world file)
 

Member Function Documentation

◆ Delete()

proto external void SaveGameManager.Delete ( notnull SaveGame saveGame,
SaveGameOperationCb callback = null )

Delete the save point.

◆ DeletePlaythrough()

proto external void SaveGameManager.DeletePlaythrough ( ResourceName mission,
int playthrough,
SaveGameOperationCb callback = null )

Delete all save points of the given playthrough.

◆ GetActiveSave()

proto external SaveGame SaveGameManager.GetActiveSave ( )

Get save game currently being played.

◆ GetCurrentMissionResource()

static proto ResourceName SaveGameManager.GetCurrentMissionResource ( )
static

Get the currently active mission name (Mission header or world file)

◆ GetCurrentPlaythroughNumber()

proto external int SaveGameManager.GetCurrentPlaythroughNumber ( )

Get the number of the current playthrough.

◆ GetEnabledSaveTypes()

proto external ESaveGameType SaveGameManager.GetEnabledSaveTypes ( )

Get the currently enabled save types.

◆ GetSaves()

proto external int SaveGameManager.GetSaves ( notnull out array< SaveGame > outSaveGames,
ResourceName missionfilter = ResourceName.Empty )

Access data for known save game info (RetrieveSaveGameInfo has to complete first to load existing saves).

Returns count of save games matching missing filter.

◆ IsBusy()

proto external bool SaveGameManager.IsBusy ( )

Busy state is entered on e.g. save creation, migration, deletion.

◆ IsSavingAllowed()

proto external bool SaveGameManager.IsSavingAllowed ( )

True if saving is currently possible (incl. busy state) AND allowed.

◆ IsSavingPossible()

proto external bool SaveGameManager.IsSavingPossible ( )

True if saving is currently possible.

◆ Load()

proto external void SaveGameManager.Load ( notnull SaveGame saveGame,
bool transition = true )

Continue the game from this save point.

◆ OnBusyStateChanged()

void SaveGameManager.OnBusyStateChanged ( bool busy)

Called when busy state changes.

◆ OnSaveCreated()

void SaveGameManager.OnSaveCreated ( SaveGame save)

Called when a new save point was created.

◆ OnSaveDeleted()

void SaveGameManager.OnSaveDeleted ( SaveGame save)

Called when a new save point was created.

◆ RequestSavePoint()

proto external bool SaveGameManager.RequestSavePoint ( ESaveGameType type,
string displayName = string.Empty,
ESaveGameRequestFlags flags = 0,
SaveGameOperationCb callback = null )

Request a new save point to be created.

It will be created as soon as saving is possible.

Parameters
[in]typeWhat save game type should be created. Used mainly for UI logic
[in]displayNameName shown in UIs
[in]flagsOptions for blocking (save all immediately) and shutdown after save complte (callback will invoke prior to it)
[in]callbackAsync result handler that invokes after commit of save data completed
Returns
False if a save was already requested or saving is currently not possible (e.g. scripted scene).

◆ RequestSavePointOverwrite()

proto external bool SaveGameManager.RequestSavePointOverwrite ( notnull SaveGame save,
ESaveGameRequestFlags flags = 0,
SaveGameOperationCb callback = null )

Request to overridde a save with new data.

It will keep i's old type, display name,playthrough and savepoint number. If the override fails the old save remains intact.

Parameters
[in]saveWhich save instance to overwrite
[in]flagss. RequestSavePoint
[in]callbacks. RequestSavePoint
Returns
False if the provided save can not be overwritten, another save was already requested or saving is currently not possible (e.g. scripted scene).

◆ ResetActiveSave()

proto external void SaveGameManager.ResetActiveSave ( )

Resets the active save to none. So e.g. quick load no longer uses it.

◆ RetrieveSaveGameInfo()

proto external bool SaveGameManager.RetrieveSaveGameInfo ( array< ResourceName > missionfilter = null,
SaveGameOperationCb callback = null )

Attempts to retrieve save game info from storage source.

Filter can be filled with mission resource names. If no filter is provided it loads all. Returns false if an operation is already in progress

◆ SetEnabledSaveTypes()

proto external void SaveGameManager.SetEnabledSaveTypes ( ESaveGameType enabled)

Configures which save types are currently available.

◆ SetSavingAllowed()

proto external void SaveGameManager.SetSavingAllowed ( bool allowed)

Allow or disallow saving.

Can be used to avoid auto-save or manual save during cutscenes or other non-saveable events. If an auto-save was due it will execute as soon as it allowed again. Manual saves requested are ignored and will not be resumed later.

◆ StartPlaythrough()

proto external void SaveGameManager.StartPlaythrough ( ResourceName missionResource,
string optionalName = string.Empty,
bool transition = true )

Remember info for save-point creation and kick off transition to mission load.


The documentation for this interface was generated from the following file: