API plugin for Silksong mods requiring configuration settings tied to the currently loaded save file.
Save Scoped Config is a small BepInEx helper/API plugin for Hollow Knight: Silksong mods.
Most BepInEx configuration values are global, meaning a single setting applies to all save files. Save Scoped Config allows mods to define settings that are stored per save slot instead. When you load Save 1, Configuration Manager displays Save 1's settings. When you load Save 2, it switches to Save 2's settings.
This is mainly a dependency for other mods. You usually don’t need to change anything here unless another mod tells you to install it. Check the requirements for a list of mods that use this API.
What It Does- Stores config values separately for each save slot.
- Detects active save changes.
- Updates Configuration Manager when the active save changes.
- Hides save-specific settings when no save is loaded.
- Lets mods keep global settings and save-specific settings side by side.
InstallationYou should end up with:
[Steam Install]\steamapps\common\Hollow Knight Silksong\BepInEx\plugins\SaveScopedConfig.dll
For PlayersThis mod does not add gameplay features by itself. It is an API/dependency used by other mods so their settings can be save-specific.
If another mod lists Save Scoped Config as a requirement, install this mod first, or install it alongside that mod.
For Mod AuthorsAdd the dependency:
[BepInDependency(SaveScopedConfigPlugin.PluginGuid)]
Import the API:
using WheresWolfgang.SaveScopedConfig;
Basic usage:
private SaveScopedConfigFile saveConfig;
private SaveScopedConfigEntry<bool> enabled;
private void Awake()
{
saveConfig = SaveScopedConfig.For(this);
enabled = saveConfig.Bind("General", "Enabled", true, "Enable this mod for this save.");
}
private void OnDestroy()
{
saveConfig.Dispose();
}
enabled.Value automatically reads and writes the setting for the currently active save.
CompatibilityThis is an API plugin and should be compatible with other BepInEx mods.
Mods that depend on Save Scoped Config should list it as a requirement. If a dependent mod fails to load, make sure SaveScopedConfig.dll is installed in BepInEx/plugins.
**Requirements**My Mods