RoR2-ChensGradiusMod

Gradius Mod in Risk of Rain 2.

View on GitHub

ChensGradiusMod

Chen.GradiusMod.Modules

ModuleBase Class

The base class of the items and artifacts of this mod. It replaces the module system that TILER2 used to provide.

public abstract class ModuleBase

Inheritance System.Object 🡒 ModuleBase

Derived
↳ ArtifactBase
↳ ItemBase

Properties  
config The config file where the module binds its config options.
configCategory The config section used by the module. This follows the same format TILER2 used so old config files are preserved.
configCategoryPrefix The prefix of the config section that is used by the module, e.g. “Items” or “Artifacts”.
enabled Determines if the module is enabled. Disabled modules are not registered to the game.
name The internal name of the module, which is the class name.
Methods  
Bind<T>(string, T, string) Binds a config option under the module’s config section.
Bind<T>(string, T, string, T, T) Binds a config option under the module’s config section, clamped within a range.
Install() Applies the hooks of the module.
NPlur(int) Returns the plural suffix “s” when the number is not 1.
Pct(float, uint) Formats a number into a percentage string, e.g. 0.25 becomes “25%”.
SetupAttributes() Creates and registers the definitions of the module to the game, such as the ItemDef or the ArtifactDef.
SetupBehavior() Sets up the behavior of the module such as language tokens and assets.
SetupConfig() Binds the config options of the module. Always call base.SetupConfig when overriding.
Uninstall() Removes the hooks of the module.