tModLoader v0.11.8.9
A mod to make and play Terraria mods
|
▼NTerraria | |
►NModLoader | |
►NAudio | |
CMusic | |
CMusicCue | |
CMusicStreaming | |
CMusicStreamingMP3 | |
CMusicStreamingOGG | |
CMusicStreamingWAV | |
►NConfig | |
CBackgroundColorAttribute | Specifies a background color to be used for the property, field, or class in the ModConfig UI. |
CColorHSLSliderAttribute | 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. |
CColorNoAlphaAttribute | Add this attribute to a Color item and Alpha will not be presented in the UI and will remain as 255 unless manually edited. |
CConfigManager | |
CCustomModConfigItemAttribute | Use this attribute to specify a custom UI element to be used for the annotated property, field, or class in the ModConfig UI. |
CDefaultDictionaryKeyValueAttribute | 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. |
CDefaultListValueAttribute | 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. |
CDrawTicksAttribute | Add this attribute and the sliders will show white tick marks at each increment. |
CEntityDefinition | 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. |
CHeaderAttribute | 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. |
CIncrementAttribute | 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 |
CItemDefinition | ItemDefinition represents an Item identity. A typical use for this class is usage in ModConfig, perhapse to facilitate an Item tweaking mod. |
CJsonDefaultDictionaryKeyValueAttribute | Similar to JsonDefaultListValueAttribute, but for assigning to the Dictionary Key rather than the Value. |
CJsonDefaultListValueAttribute | 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). |
CJsonDefaultValueAttribute | 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. |
CLabelAttribute | 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. |
CModConfig | 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. |
CNPCDefinition | |
CNullAllowedAttribute | 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. |
COptionStringsAttribute | By default, string fields will provide the user with a text input field. Use this attribute to restrict strings to a selection of options. |
CPrefixDefinition | |
CProjectileDefinition | |
CRangeAttribute | 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 |
►CReferenceDefaultsPreservingResolver | 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 |
CNullToDefaultValueProvider | |
CValueProviderDecorator | |
CReloadRequiredAttribute | 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. |
CSeparatePageAttribute | 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. |
CSliderAttribute | Affects whether this data will be presented as a slider of an input field. Add this attribute to use a slider. Currently only affects data of type int. |
CSliderColorAttribute | Specifies a slider color for ModConfig elements that use a slider. The default color is white. |
CToFromStringConverter | 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. |
CTooltipAttribute | 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. |
►NExceptions | |
CCustomModDataException | |
CFolderCreationFailedException | |
CLevenshteinDistance | |
CMissingResourceException | |
COldHookException | |
CRecipeException | |
CResourceLoadException | |
►NIO | |
CBigEndianReader | |
CBigEndianWriter | |
CBinaryIO | |
CBoolTagSerializer | |
CColorSerializer | |
CImageIO | |
CItemIO | |
CPoint16Serializer | |
CRectangleSerializer | |
CTagCompound | |
►CTagIO | |
CClassPayloadHandler | |
CPayloadHandler | |
CTagPrinter | |
CTagSerializable | |
CTagSerializer | |
CUIntTagSerializer | |
CULongTagSerializer | |
CUploadFile | |
CUShortTagSerializer | |
CVector2TagSerializer | |
CVector3TagSerializer | |
CAutoloadBossHead | |
CAutoloadEquip | |
CAutoloadHead | |
CBackgroundTextureLoader | This is the class that keeps track of all modded background textures and their slots/IDs. |
CBuffLoader | This serves as the central class from which buff-related functions are supported and carried out. |
CCombinedHooks | |
CCommandCaller | |
CCommandManager | This serves as the central class from which ModCommand functions are supported and carried out. |
►CContentInstance | |
CContentEntry | |
CDrawableTooltipLine | This class serves as a way to store information about a line that will be drawn of tooltip for an item. You will create and manipulate objects of this class if you use the draw hooks for tooltips in ModItem and GlobalItem. For examples, see ExampleSword |
CDrawLayer | This class represents a layer of the drawing of an object, using a certain type of InfoType to help with its drawing. |
CEquipLoader | This serves as a central place to store equipment slots and their corresponding textures. You will use this to obtain the IDs for your equipment textures. |
CEquipTexture | This serves as a place for you to program behaviors of equipment textures. This is useful for equipment slots that do not have any item associated with them (for example, the Werewolf buff). Note that this class is purely for visual effects. |
CErrorLogger | NOTE: This class is deprecated. Use Logging instead (see ExampleMod for example) This class consists of functions that write error messages to text files for you to read. It also lets you write logs to text files. |
CFrameworkVersion | |
CGlobalBgStyle | This class serves to collect functions that operate on any kind of background style, without being specific to one single background style. |
CGlobalBuff | This class allows you to modify the behavior of any buff in the game. |
CGlobalItem | This class allows you to modify and use hooks for all items, including vanilla items. Create an instance of an overriding class then call Mod.AddGlobalItem to use this. |
CGlobalNPC | This class allows you to modify and use hooks for all NPCs, including vanilla mobs. Create an instance of an overriding class then call Mod.AddGlobalNPC to use this. |
CGlobalProjectile | This class allows you to modify and use hooks for all projectiles, including vanilla projectiles. Create an instance of an overriding class then call Mod.AddGlobalProjectile to use this. |
CGlobalRecipe | This class provides hooks that control all recipes in the game. |
CGlobalTile | This class allows you to modify the behavior of any tile in the game. Create an instance of an overriding class then call Mod.AddGlobalTile to use this. |
CGlobalWall | This class allows you to modify the behavior of any wall in the game (although admittedly walls don't have much behavior). Create an instance of an overriding class then call Mod.AddGlobalWall to use this. |
►CItemLoader | This serves as the central class from which item-related functions are carried out. It also stores a list of mod items by ID. |
CHookList | |
CLogging | |
CMapLegend | |
CMod | Mod is an abstract class that you will override. It serves as a central place from which the mod's contents are stored. It provides methods for you to use or override. |
CModBuff | This class serves as a place for you to define a new buff and how that buff behaves. |
CModCactus | This class represents a type of modded cactus. The cactus will share a tile ID with the vanilla cacti (80), so that the cacti can freely convert between each other if the sand below is converted. This class encapsulates a function for retrieving the cactus's texture, the only difference between each type of cactus. Use ModTile.SetModCactus or GlobalTile.AddModCactus to make a tile able to grow this kind of cactus. |
CModCommand | This class represents a chat or console command. Use the CommandType to specify the scope of the command. |
CModContent | Manages content added by mods. Liasons between mod content and Terraria's arrays and oversees the Loader classes. |
CModDust | This class represents a type of dust that is added by a mod. Only one instance of this class will ever exist for each type of dust you add. |
CModGore | This class allows you to customize the behavior of a custom gore. Create a new instance of this and pass it as a parameter to Mod.AddGore to customize the gore you are adding. If you are autoloading gore, then give it the same name as the gore texture. |
CModHotKey | Represents a loaded hotkey. It is suggested to access the hotkey status only in ModPlayer.ProcessTriggers. |
CModItem | This class serves as a place for you to place all your properties and hooks for each item. Create instances of ModItem (preferably overriding this class) to pass as parameters to Mod.AddItem. |
CModLoader | This serves as the central class which loads mods. It contains many static fields and methods related to mods and their contents. |
CModMountData | This class serves as a place for you to place all your properties and hooks for each mount. Create instances of ModMoundData (preferably overriding this class) to pass as parameters to Mod.AddMount. Only one instance of ModMountData will exist for each mount, so storing player specific data on the ModMountData is not good. Modders can use player.mount._mountSpecificData or a ModPlayer class to store player specific data relating to a mount. Use SetMount to assign these fields. |
CModNet | |
CModNPC | This class serves as a place for you to place all your properties and hooks for each NPC. Create instances of ModNPC (preferably overriding this class) to pass as parameters to Mod.AddNPC. |
CModPacket | This class inherits from BinaryWriter. This means that you can use all of its writing functions to send information between client and server. This class also comes with a Send method that's used to actually send everything you've written between client and server |
CModPalmTree | This class represents a type of modded palm tree. The palm tree will share a tile ID with the vanilla palm trees (323), so that the trees can freely convert between each other if the sand below is converted. This class encapsulates several functions that distinguish each type of palm tree from each other. Use ModTile.SetModPalmTree or GlobalTile.AddModPalmTree to make a tile able to grow this kind of palm tree. |
CModPlayer | A ModPlayer instance represents an extension of a Player instance. You can store fields in the ModPlayer classes, much like how the Player class abuses field usage, to keep track of mod-specific information on the player that a ModPlayer instance represents. It also contains hooks to insert your code into the Player class. |
CModPrefix | |
CModProjectile | This class serves as a place for you to place all your properties and hooks for each projectile. Create instances of ModProjectile (preferably overriding this class) to pass as parameters to Mod.AddProjectile. |
CModProperties | This is a struct that stores the properties of a mod. Without setting it in your Mod constructor, all properties default to true. |
CModRecipe | This class extends Terraria.Recipe, meaning you can use it in a similar manner to vanilla recipes. However, it provides methods that simplify recipe creation. Recipes are added by creating new instances of ModRecipe, then calling the AddRecipe method. |
CModSideExtensions | |
CModSound | This class allows you to customize how a sound you add is played. To use this, pass an instance to Mod.AddSound, or if you are autoloading sounds, give an overriding class the same name as the file with the sound you are adding. |
CModSurfaceBgStyle | Each background style determines in its own way how exactly the background is drawn. This class serves as a collection of functions for above-ground backgrounds. |
CModTile | This class represents a type of tile that can be added by a mod. Only one instance of this class will ever exist for each type of tile that is added. Any hooks that are called will be called by the instance corresponding to the tile type. This is to prevent the game from using a massive amount of memory storing tile instances. |
CModTileEntity | Tile Entities are Entities tightly coupled with tiles, allowing the possibility of tiles to exhibit cool behavior. TileEntity.Update is called in SP and on Server, not on Clients. |
CModTranslation | |
CModTree | This class represents a type of modded tree. The tree will share a tile ID with the vanilla trees (5), so that the trees can freely convert between each other if the soil below is converted. This class encapsulates several functions that distinguish each type of tree from each other. Use ModTile.SetModTree or GlobalTile.AddModTree to make a tile able to grow this kind of tree. |
CModUgBgStyle | Each background style determines in its own way how exactly the background is drawn. This class serves as a collection of functions for underground backgrounds. |
CModWall | This class represents a type of wall that can be added by a mod. Only one instance of this class will ever exist for each type of wall that is added. Any hooks that are called will be called by the instance corresponding to the wall type. |
CModWaterfallStyle | Represents a style of waterfalls that gets drawn. This is mostly used to determine the color of the waterfall. |
CModWaterStyle | Represents a style of water that gets drawn, based on factors such as the background. This is used to determine the color of the water, as well as other things as determined by the hooks below. |
CModWorld | A ModWorld instance represents an extension of a World. You can store fields in the ModWorld classes to keep track of mod-specific information on the world. It also contains hooks to insert your code into the world generation process. |
CMonoModHooks | |
CMountLoader | This serves as the central place from which mounts are stored and mount-related functions are carried out. |
CNPCHeadLoader | This class serves as a central place from which NPC head slots are stored and NPC head textures are assigned. This can be used to obtain the corresponding slots to head textures. |
►CNPCLoader | This serves as the central class from which NPC-related functions are carried out. It also stores a list of mod NPCs by ID. |
CHookList | |
CNPCSpawnHelper | This server as a central class to help modders spawn their npcs. It's basically the vanilla spawn code if-else chains condensed into objects. See ExampleMod for usages. |
CNPCSpawnInfo | A struct that stores information regarding where an NPC is naturally spawning and the player it is spawning around. This serves to reduce the parameter count for ModNPC.CanSpawn and GlobalNPC.EditSpawnPool. |
CPlayerDrawInfo | A struct that contains information that may help with PlayerLayer drawing. |
CPlayerHeadDrawInfo | A struct that contains information that may help with PlayerHeadLayer drawing. |
CPlayerHeadLayer | This class represents a DrawLayer for the player's map icon, and uses PlayerDrawHeadInfo as its InfoType. Drawing should be done directly through drawInfo.spriteBatch. |
►CPlayerHooks | This is where all ModPlayer hooks are gathered and called. |
CHookList | |
CPlayerLayer | This class represents a DrawLayer for the player, and uses PlayerDrawInfo as its InfoType. Drawing should be done by adding Terraria.DataStructures.DrawData objects to Main.playerDrawData. |
►CProjectileLoader | This serves as the central class from which projectile-related functions are carried out. It also stores a list of mod projectiles by ID. |
CHookList | |
CRecipeEditor | This class allows you to make any changes you want to a recipe, whether it be adding/removing ingredients, changing the result, or removing the recipe entirely. |
CRecipeFinder | This class will search through all existing recipes for you based on criteria that you give it. It's useful for finding a particular vanilla recipe that you wish to remove or edit. Use this by creating new instances with the empty constructor for each search you perform. |
CRecipeHooks | This is where all ModRecipe and GlobalRecipe hooks are gathered and called. |
CSoundLoader | This class is used to keep track of and support the existence of custom sounds that have been added to the game. |
CSpawnCondition | |
CSurfaceBgStyleLoader | |
CTileLoader | This serves as the central class from which tile-related functions are supported and carried out. |
CTooltipLine | This class serves as a way to store information about a line of tooltip for an item. You will create and manipulate objects of this class if you use the ModifyTooltips hook. |
►CTopoSort | |
CSortingException | |
CUgBgStyleLoader | This serves as the central class from which ModUgBgStyle functions are supported and carried out. |
CUsageException | |
CWallLoader | This serves as the central class from which wall-related functions are supported and carried out. |
CWaterfallStyleLoader | |
CWaterStyleLoader | This serves as the central class from which WaterStyle functions are supported and carried out. |
CWorldHooks | This is where all ModWorld hooks are gathered and called. |
CAttribute | |
CBinaryReader | |
CBinaryWriter | |
CDefaultContractResolver | |
CException | |
CICloneable | |
CIEnumerable | |
CIOException | |
CIValueProvider | |
CPayloadHandler | |
CTagSerializer | |
CTileEntity | |
CTypeConverter |