What are ModOptions
Mod options are a way for modders to add configuration options to their scripted mods which appear in the player menu.
They are attributes in c# which sit in top of static methods, properties or fields and automatically add the options to the player menu without the need for additional json.
What are the features of ModOptions
- Supports multiple types out of the box:
- float / int / bool / UnityEngine.Color / Any Enum / Strings / CatalogDatas
- Can be used on static methods, properties or fields.
- Supports Buttons or Left / Right arrows as Input options on the player menu - configurable within the mod option
- Option values are automatically saved to the players save files - this can be disabled per mod option
- Localization is supported for Mod Options names
- Mod Options can be grouped by categories
- Categories can be ordered
- Mod Options can be ordered within or outwith categories
- Predefined lists of default values for the options are used when no defined list of options values is given
- Mod Options can have tool tips which appear underneith the option when you hover over it
When are ModOptions Loaded
Mod Options are loaded for each mod after all of the assemblies, addressable bundles and catalog files for all mods are loaded.
They are loaded before ThunderScripts.
How do I use ModOptions
Mod options are attributes that can be put onto static method, properties or fields within a script.