aetherESDownload

Mod settings

A setting is a value the player can change without touching your code: a yes/no, a number, a text. That way your mod adapts to everyone.

private static ConfigEntry<bool> _enabled;

_enabled = AetherConfig.Bind("my_mod", "General", "Enabled", true,
    "Enable this mod.");

The parts are: your id, a group (for tidiness), the option name, its default value and an explanation.

Aether creates BepInEx/config/aether/my_mod.json the first time. The player edits it with any text editor and the changes are respected.

Read the value in your code with _enabled.Value. You can bind settings from your entrypoint safely.

There is a second way, BepInEx’s (Config.Bind(...)), used by the mods that ship with Aether. For third-party mods, use Aether’s: it is the recommended one.