Saves your progress at the start of each stage. You can leave run as soon as the stage started. Only 1 save file for each profile for a singleplayer. If you die, the save will NOT be deleted.
- Save the zip file from the
Releasessection. - In R2ModMan, click on
Settingson the left side. - Search for
Import local modin the search bar and select it. - Click
Select fileand open the saved zip file.
Only the host must have this mod for it to work.
A Load button will be active if you are host and was found suitable save file (if save file has the same set of players as in the current lobby).
Each game mode (Classic, Eclipse, Simulacrum) has it's own save files, so that you can switch between game modes and not losing your progress.
UseCloudStorage- Store files in Steam/EpicGames cloud. Enabling this feature would not preserve current saves and disabling it wouldn't clear the cloud.CloudStorageSubDirectory- Sub directory name for cloud storage. Changing it allows to use different save files for different mod profiles.SavesDirectory- Directory where save files will be stored. "ProperSave" directory will be created in the directory you have specified. If the directory doesn't exist the default one will be used.
To save data you need to subscribe to ProperSave.SaveFile.OnGatherSaveData. It will be called every time the game is saved (this happens on RoR2.Stage.onStageStartGlobal) to gather info from mods that needs to be saved. You can add any value with any key, but remember that other mods can do the same thing, so keep keys unique (maybe add a mod name in front or something).
I would suggest adding only one object per mod because the type of the object is also stored to be able to deserialize objects, and it can take a lot of space in comparison with stored value.
An object that you add in the dictionary will be serialized to JSON. Here is some info about serialization:
- Only public properties/fields will be serialized.
- You can add
[DataMember()]attribute fromSystem.Runtime.Serializationto specify custom name for property/field in json file. - You can add
[IgnoreDataMember]attribute fromSystem.Runtime.Serializationto specify that this public property/field should be ignored on serialization.
Once save file is loaded you can get data you've previously saved and apply it anytime you want. Here are some things that will help you with that:
ProperSave.Loading.IsLoading- you can use this to check if theProperSaveis loading.ProperSave.Loading.FirstRunStage- you can use this to check if run is starting. Is set totrueonRoR2.Run.Start, is set tofalseonRoR2.Stage.onStageStartGlobalProperSave.Loading.OnLoadingStarted- event, fired whenIsLoadingset to true (this happens after save file is loaded into memory, before run started).ProperSave.Loading.OnLoadingEnded- event, fired whenIsLoadingset to false (this happens afterRoR2.TeamManager.Startbecause this is the last step of loading process).ProperSave.Loading.CurrentSave- current save file, you can access it afterOnLoadingStarted. Will be overwritten every time game is saved.CurrentSave.GetModdedData<Type>("")- use this method to get data that you've saved.ProperSave.Data- under this namespace you can find classes used to save some of vanilla data.
ps_force_load {path}- loads save from specified file ignoring user identifier. For debug purposes only. The file is not deleted on game over, saving is disabled in a run started with this command.
I tried to save all necessary data so that when you load the game would continue as it should have been without saving.
LoadButton is disabled when the player dies and returns to the lobby. Simply return to the lobby, select the game mode and click on the load button.- Minions would respawn at different positions each time you load the same save file. It's not big of an issue, and there is nothing I can do about it.
- I've not tested this mod much with achievements unlocking, but for most cases, it should be working as intended.