-
Notifications
You must be signed in to change notification settings - Fork 58
Mod Spotter
Sometimes it can be helpful to identify when a player is running your mod for the first time. Perhaps you would like to display a welcome message or a tutorial window, or take care of some one-time setup.
This can be done using the HugsLib mod spotter, accessible via HugsLibController.instance.ModSpotter
. Spotted mods are updated at game startup, and are stored in a persistent XML file in the user profile directory.
All methods require a PackageId argument. If you have a ModBase
-extending class in your mod, you can access yours via ModContentPack.PackageIdPlayerFacing
. In the context of the spotter, PackageIds are case-insensitive.
Returns true, if this run of game is the first time the specified mod PackageId was loaded together with HugsLib.
Manually marks a mod PackageId as FirstTimeSeen
, or not. The change only lasts until the game is restarted.
This is mostly useful to testing purposes..