Details
Everything not listed in this reference is internal and may change without notice. Items marked experimental may change too.
- Target: Obenseuer 0.5.08 (buildid 25969064), Unity 6000.0.77f1 Mono, BepInEx 6 Unity.Mono (be.788, the tested build) or BepInEx 5 (5.4.23 or later).
- Namespace:
ObenseuerCore. Logs go toBepInEx\logs\ObenseuerCore.log.
When you can call it
- Call everything from your mod’s normal code, not from a background thread you started. The game and Unity only run safely on the main thread (see the glossary).
- Reads give you a plain default when nothing is ready. With no save or scene ready, you get
null,falseor an empty list. The writing calls returnfalse. - The only errors thrown are
ArgumentExceptionfor arguments that can never be valid.
If something fails to set up
- The framework changes some of the game’s methods when it starts. If a game update breaks one of them, the framework turns off the feature group that depends on it, and writes error lines to the group’s log file in
BepInEx\logs. The rest of the framework keeps working. - Mod data depends on one change to the game. If it cannot be made,
SetDatareturnsfalseand nothing is written to the save folder.Find,GuidOf,IsSaved,InfoOf,NearandSpawn.Itemdo not depend on it. (the change is onNewGame.SaveCharacter, which empties the mod data when a new game starts; the framework logs one warning, and the mod data store registers withSaveData)
Limits
- A load that fails after it started leaves the mod data as it was. The next save then writes that data into the slot it names, like any save does.