tModLoader v2022.09
A mod to make and play Terraria mods
|
Classes | |
class | BackgroundColorAttribute |
Specifies a background color to be used for the property, field, or class in the ModConfig UI. More... | |
class | ColorHSLSliderAttribute |
Add this attribute to a Color item and the UI will present a Hue, Saturation, and Lightness sliders rather than Red, Green, and Blue sliders. Pass in false to skip Saturation and Lightness. More... | |
class | ColorNoAlphaAttribute |
Add this attribute to a Color item and Alpha will not be presented in the UI and will remain as 255 unless manually edited. More... | |
class | ConfigManager |
class | CustomModConfigItemAttribute |
Use this attribute to specify a custom UI element to be used for the annotated property, field, or class in the ModConfig UI. More... | |
class | DefaultDictionaryKeyValueAttribute |
Defines the default key value to be added when using the ModConfig UI to add elements to a Dictionary. Works the same as System.ComponentModel.DefaultValueAttribute, but can't inherit from it because it would break when deserializing any data structure annotated with it. This attribute compliments DefaultListValueAttribute when used annotating a Dictionary. More... | |
class | DefaultListValueAttribute |
Defines the default value to be added when using the ModConfig UI to add elements to a Collection (List, Set, or Dictionary value). Works the same as System.ComponentModel.DefaultValueAttribute, but can't inherit from it because it would break when deserializing any data structure annotated with it. More... | |
class | DrawTicksAttribute |
Add this attribute and the sliders will show white tick marks at each increment. More... | |
class | EntityDefinition |
Classes implementing EntityDefinition serve to function as a way to save and load the identities of various Terraria objects. Only the identity is preserved, no other data such as stack size, damage, etc. These classes are well suited for ModConfig, but can be saved and loaded in a TagCompound as well. More... | |
class | HeaderAttribute |
This attribute adds a label above this property or field in the ModConfig UI that acts as a header. Use this to delineate sections within your config. Note that fields will be in order, and properties will be in order, but fields and properties will not be interleaved together in the source code order. More... | |
class | IncrementAttribute |
Use this to set an increment for sliders. The slider will move by the amount assigned. Remember that this is just a UI suggestion and manual editing of config files can specify other values, so validate your values. Defaults are: float: 0.01f - byte/int/uint: 1 More... | |
class | ItemDefinition |
ItemDefinition represents an Item identity. A typical use for this class is usage in ModConfig, perhapse to facilitate an Item tweaking mod. More... | |
class | JsonDefaultDictionaryKeyValueAttribute |
Similar to JsonDefaultListValueAttribute, but for assigning to the Dictionary Key rather than the Value. More... | |
class | JsonDefaultListValueAttribute |
Similar to DefaultListValueAttribute but for reference types. It uses a json string that will be used populate new instances list elements. Defines the default value, expressed as json, to be added when using the ModConfig UI to add elements to a Collection (List, Set, or Dictionary value). More... | |
class | JsonDefaultValueAttribute |
Similar to DefaultValueAttribute but for reference types. It uses a json string that will be used populate this element when initialized. Defines the default value, expressed as json, to be used to populate an object with the NullAllowed attribute. Modders should only use this in conjuction with NullAllowed, as simply initializing the field with a default value is preferred. More... | |
class | LabelAttribute |
This attribute sets a label for the property, field, or class for use in the ModConfig UI. Starting the label with $ means the label should be interpreted as a Localization key. More... | |
class | ModConfig |
ModConfig provides a way for mods to be configurable. ModConfigs can either be Client specific or Server specific. When joining a MP server, Client configs are kept but Server configs are synced from the server. Using serialization attributes such as [DefaultValue(5)] or [JsonIgnore] are critical for proper usage of ModConfig. tModLoader also provides its own attributes such as ReloadRequiredAttribute and LabelAttribute. More... | |
class | NPCDefinition |
class | NullAllowedAttribute |
This attribute means the annotated item can possibly be null. This will allow the UI to make the item null. It is up to the modder to make sure the item isn't null in the ModConfig constructor and nested classes. More... | |
class | OptionStringsAttribute |
By default, string fields will provide the user with a text input field. Use this attribute to restrict strings to a selection of options. More... | |
class | PrefixDefinition |
class | ProjectileDefinition |
class | RangeAttribute |
Specifies a range for primitive data values. Without this, default min and max are as follows: float: 0, 1 - int/uint: 0, 100 - byte: 0, 255 More... | |
class | ReferenceDefaultsPreservingResolver |
Custom ContractResolver for facilitating refernce type defaults. The ShouldSerialize code enables unchanged-by-user reference type defaults to properly not serialize. The ValueProvider code helps during deserialization to not | |
class | ReloadRequiredAttribute |
This attribute hints that changing the value of the annotated property or field will put the config in a state that requires a reload. An overridden ModConfig.NeedsReload can further validate if more complex logic is needed. More... | |
class | SeparatePageAttribute |
This specifies that the annotated item will appear as a button that leads to a separate page in the UI. Use this to organize hierarchies. More... | |
class | SliderAttribute |
Affects whether this data will be presented as a slider or an input field. Add this attribute to use a slider. Currently only affects data of type int. More... | |
class | SliderColorAttribute |
Specifies a slider color for ModConfig elements that use a slider. The default color is white. More... | |
class | ToFromStringConverter |
This TypeConverter facilitates converting to and from the string Type. This is necessary for Objects that are to be used as Dictionary keys, since the JSON for keys needs to be a string. Classes annotated with this TypeConverter need to implement a static FromString method that returns T. More... | |
class | TooltipAttribute |
This attribute sets a hover tooltip for the annotated property or field to be shown in the ModConfig UI. This can be longer and more descriptive than Label. Starting the tooltip with $ means the tooltip should be interpreted as a Localization key. More... | |
Enumerations | |
enum | ConfigScope { ServerSide , ClientSide } |
Each ModConfig class has a different scope. Failure to use the correct mode will lead to bugs. More... | |
Each ModConfig class has a different scope. Failure to use the correct mode will lead to bugs.