About this mod
Modding Framework that allows you to save/load variables easily. It also checks to see if a save file is modded.
- Requirements
- Permissions and credits
- Changelogs
Fixed saving non-modded variables, though there may be a better way...
This API allows for easy saving / loading of variables onto the save file. All you need to do is register your plugin into the framework, then create a Save/Load method. Inside the Save/Load method any changes to the ES3File will be saved on game save/load. This may or may not be combined into a larger API in the future.
private string stringName;
private void Awake()
{
// ... Your awake code
ModRegistry.RegisterMod(Info);
// string variable names (not necessary)
stringName = ModRegistry.GetVariableString(this, "VariableToBeSaved");
}
public void Save(ES3File file)
{
file.Save<int>(stringName, 27);
}
public void Load(ES3File file)
{
if (file.KeyExists(stringName))
{
int num = file.Load<int>(stringName);
Logger.LogInfo("Number loaded is: " + num); // Output: Number loaded is: 27
}
}
Installation for Players:
1. Install BepInEx
2. Download and extract this mod.
3. Copy the extracted file(s) to your <outpath-install>/BepInEx/plugins directory.
4. Run the game. Enjoy!
Installation for Modders:
1. Install BepInEx
2. Download and extract this mod.
3. Add the SaveFileFramework.dll to your references.
4. Enjoy saving and loading!
Disclaimer:
This mod uses BepInEx, with no framework. Mods that use another Mod Loader may not be compatible with this mod.
Known Issues:
None, currently.
Support:
There is a modding discord for Outpath! You can join it here. If you need me, you can ping me there (@Nanopoison). But there are people there who can also help you install BepInEx if you need. Feel free to report any bugs in the bugs section here on nexusmods, or in the discord.
My Other Mods:
You can find my other Outpath Mods here.
Source:
You can find the source for this mod here.