Loading savegame

Users who are viewing this thread

ProSkilz58

Recruit
Wanted to try a simple mod by adding a button on startscreen to directly load last saved game. However the 'MBSaveLoad.LoadSaveGameData' method does not directly load the game.

The return LoadGameResult object has a root object which is of type object, but runtime contains a 'Game' object, which I guess is not the correct way of initializing a savegame load.

Im new to modding, so forgive me if im missing something. Also any tips to make it easier to find stuff are more than welcome!
 
Found it myself.

Creating an instance of SavedGameVM with the SaveGameFileInfo I retrieved from MBSaveLoad I could call a ExecuteSaveLoad method, that does the correct sequence of actions to load. I have a simple mod on nexusmods now that adds a Quick Resume option to the main menu as well as renames Resume game to Load Game (also disabled this option if no savegames are available).
 
Upvote 0
Back
Top Bottom