Details
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.
Everything not listed in this reference is internal and may change without notice.
The framework changes some of the game’s methods when it starts, so it can tell your mod when a landmark is added and keep your landmarks across saves. This page calls that a feature group. Its name, the one you will see in the log, is obenseuer.moddingframework.landmarks.
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). That includes the code that handles
Added. - It is safe to call at any time. With no map scene or no save loaded,
Alllists the landmarks in memory withOwnedset tofalse, andHasandUnlockgive backfalse. - Nothing throws. A null or empty
idfinds nothing. UnlockandPlacegive backfalsewhile a save is loading or being written. (They checkSaveData.Busy.)Addedis not held back while a save loads. If your handler should ignore landmarks added while a save loads, checkSaveData.Busy, which istruewhile a save is loading or being written.
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.
- If one of the three game changes cannot be made, or the landmark save file cannot be registered, the feature group is turned off and
Landmarks.IsAvailableisfalse. The reads andUnlockkeep working.Addedstops, andCreate,Markand the restore on load stop too. (The changes are a postfix onMapController.AddLandMark, a prefix and finalizer onSaveController.SaveGame, and a postfix onMapController.OnLoadingGame.)