3using System.Collections;
4using System.Collections.Generic;
6using Terraria.ModLoader.Config.UI;
21 public Mod mod {
get;
internal set; }
24 public string Name {
get;
internal set; }
76 if (reloadRequired !=
null)
static bool ObjectEquals(object a, object b)
static IEnumerable< PropertyFieldWrapper > GetFieldsAndProperties(object item)
ModConfig provides a way for mods to be configurable. ModConfigs can either be Client specific or Ser...
abstract ConfigScope Mode
virtual bool Autoload(ref string name)
virtual ModConfig Clone()
tModLoader will call Clone on ModConfig to facilitate proper implementation of the ModConfig user int...
virtual bool NeedsReload(ModConfig pendingConfig)
Whether or not a reload is required. The default implementation compares properties and fields annota...
virtual void OnChanged()
This hook is called anytime new config values have been set and are ready to take effect....
virtual bool AcceptClientChanges(ModConfig pendingConfig, int whoAmI, ref string message)
Called on the Server for ServerSide configs to determine if the changes asked for by the Client will ...
virtual void OnLoaded()
This method is called when the ModConfig has been loaded for the first time. This happens before regu...
This attribute hints that changing the value of the annotated property or field will put the config i...
Mod is an abstract class that you will override. It serves as a central place from which the mod's co...
ConfigScope
Each ModConfig class has a different scope. Failure to use the correct mode will lead to bugs.
@ ClientSide
This config is specific to the client. Use this for personalization options.
@ ServerSide
This config is shared between all clients and maintained by the server. Use this for game-play change...
bool Autoload
Whether or not this mod will autoload content by default. Autoloading content means you do not need t...