|
static int | BuffType< T > () |
| Get the id (type) of a ModBuff by class. Assumes one instance per class. More...
|
|
static int | CloudType< T > () |
| Get the id (type) of a ModCloud by class. Assumes one instance per class. More...
|
|
static int | DustType< T > () |
| Get the id (type) of a ModDust by class. Assumes one instance per class. More...
|
|
static int | EmoteBubbleType< T > () |
| Get the id (type) of a ModEmoteBubble by class. Assumes one instance per class. More...
|
|
static bool | FileExists (string name) |
| Returns whether or not a file with the specified name exists. Note that this includes file extension, the folder path, and must start with the mod name at the start of the path: "ModFolder/OtherFolders/FileNameWithExtension"
|
|
static T | Find< T > (string fullname) |
| Attempts to find the template instance with the specified full name (not the clone/new instance which gets added to Items/Players/NPCs etc. as the game is played). Caching the result is recommended.This will throw exceptions on failure. More...
|
|
static T | Find< T > (string modName, string name) |
| Attempts to find the template instance with the specified name and mod name (not the clone/new instance which gets added to Items/Players/NPCs etc. as the game is played). Caching the result is recommended.This will throw exceptions on failure. More...
|
|
static IEnumerable< T > | GetContent< T > () |
| Returns all registered content instances that derive from the provided type and that are added by all currently loaded mods.
This only includes the 'template' instance for each piece of content, not all the clones/new instances which get added to Items/Players/NPCs etc. as the game is played More...
|
|
static EquipTexture | GetEquipTexture (EquipType type, int slot) |
|
static byte[] | GetFileBytes (string name) |
| Retrieves the contents of a file packaged within the .tmod file as a byte array. Should be used mainly for non-Asset<T> files. The name should be in the format of "ModFolder/OtherFolders/FileNameWithExtension". Throws an ArgumentException if the mod does not exist. Returns null if the file does not exist. A typical usage of this might be to load a text file containing structured data included within your mod. Make sure the txt file is UTF8 encoded and use the following to retrieve file's text contents: string pointsFileContents = Encoding.UTF8.GetString(ModContent.GetFileBytes("MyMod/data/points.txt")); More...
|
|
static T | GetInstance< T > () |
| Returns the template instance of the provided content type (not the clone/new instance which gets added to Items/Players/NPCs etc. as the game is played). More...
|
|
static int | GetModBackgroundSlot (string texture) |
|
static int | GetModBossHeadSlot (string texture) |
|
static ModBuff | GetModBuff (int type) |
|
static ModDust | GetModDust (int type) |
|
static int | GetModHeadSlot (string texture) |
|
static ModItem | GetModItem (int type) |
|
static ModMount | GetModMount (int type) |
|
static ModNPC | GetModNPC (int type) |
|
static ModProjectile | GetModProjectile (int type) |
|
static ModSurfaceBackgroundStyle | GetModSurfaceBackgroundStyle (int style) |
| Returns the ModSurfaceBackgroundStyle object with the given ID.
|
|
static ModTile | GetModTile (int type) |
|
static ModUndergroundBackgroundStyle | GetModUndergroundBackgroundStyle (int style) |
| Returns the ModUndergroundBackgroundStyle object with the given ID.
|
|
static ModWall | GetModWall (int type) |
|
static ModWaterfallStyle | GetModWaterfallStyle (int style) |
| Returns the ModWaterfallStyle with the given ID.
|
|
static ModWaterStyle | GetModWaterStyle (int style) |
| Returns the ModWaterStyle with the given ID.
|
|
static int | GoreType< T > () |
| Get the id (type) of a ModGore by class. Assumes one instance per class. More...
|
|
static bool | HasAsset (string name) |
| Returns whether or not a asset with the specified name exists. Includes the mod name prefix like Request
|
|
static int | ItemType< T > () |
| Get the id (type) of a ModItem by class. Assumes one instance per class. More...
|
|
static int | MountType< T > () |
| Get the id (type) of a ModMount by class. Assumes one instance per class. More...
|
|
static int | NPCType< T > () |
| Get the id (type) of a ModNPC by class. Assumes one instance per class. More...
|
|
static Stream | OpenRead (string assetName, bool newFileStream=false) |
|
static int | PrefixType< T > () |
| Get the id (type) of a ModPrefix by class. Assumes one instance per class. More...
|
|
static int | ProjectileType< T > () |
| Get the id (type) of a ModProjectile by class. Assumes one instance per class. More...
|
|
static TeleportPylonType | PylonType< T > () |
| Get the id (type) of a ModPylon by class. Assumes one instance per class. If nothing is found, returns 0, or the "Forest Pylon" type. More...
|
|
static int | RarityType< T > () |
| Get the id (type) of a ModRarity by class. Assumes one instance per class. More...
|
|
static Asset< T > | Request< T > (string name, AssetRequestMode mode=AssetRequestMode.AsyncLoad) |
| Gets the asset with the specified name. Throws an Exception if the asset does not exist. Modders may wish to use Mod.Assets.Request where the mod name prefix may be omitted for convenience. More...
|
|
static bool | RequestIfExists< T > (string name, out Asset< T > asset, AssetRequestMode mode=AssetRequestMode.AsyncLoad) |
|
static void | SplitName (string name, out string domain, out string subName) |
|
static int | TileEntityType< T > () |
| Get the id (type) of a ModTileEntity by class. Assumes one instance per class. More...
|
|
static int | TileType< T > () |
| Get the id (type) of a ModTile by class. Assumes one instance per class. More...
|
|
static bool | TryFind< T > (string fullname, out T value) |
| Safely attempts to find the template instance with the specified full name (not the clone/new instance which gets added to Items/Players/NPCs etc. as the game is played). Caching the result is recommended. More...
|
|
static bool | TryFind< T > (string modName, string name, out T value) |
| Safely attempts to find the template instance with the specified name and mod name (not the clone/new instance which gets added to Items/Players/NPCs etc. as the game is played). Caching the result is recommended. More...
|
|
static int | WallType< T > () |
| Get the id (type) of a ModWall by class. Assumes one instance per class. More...
|
|
Manages content added by mods. Liaisons between mod content and Terraria's arrays and oversees the Loader classes.