tModLoader v2024.10
A mod to make and play Terraria mods
AutoloadEquip Class Reference

This attribute annotates a ModItem class to indicate that the game should autoload the specified equipment texture or textures and assign it to this item. The equipment texture is the texture that appears on the player itself when the item is worn and visible. Armor and most accessories will set at least one EquipType, but not every accessory needs on-player visuals. The equipment texture will be loaded from the path made from appending "_EquipTypeNameHere" to ModItem.Texture. An error will be thrown during mod loading if the texture can't be found. For example, a helmet item named "ExampleHelmet" annotated with [AutoloadEquip(EquipType.Head)] will need both a "ExampleHelmet.png" and "ExampleHelmet_Head.png" to work. Note that equipment textures must follow specific layouts, see ExampleMod examplesof similar items to use as a guide. More...

Inherits Attribute.

Public Member Functions

 AutoloadEquip (params EquipType[] equipTypes)
 

Public Attributes

readonly EquipType[] equipTypes
 

Detailed Description

This attribute annotates a ModItem class to indicate that the game should autoload the specified equipment texture or textures and assign it to this item. The equipment texture is the texture that appears on the player itself when the item is worn and visible. Armor and most accessories will set at least one EquipType, but not every accessory needs on-player visuals.

The equipment texture will be loaded from the path made from appending "_EquipTypeNameHere" to ModItem.Texture. An error will be thrown during mod loading if the texture can't be found. For example, a helmet item named "ExampleHelmet" annotated with [AutoloadEquip(EquipType.Head)] will need both a "ExampleHelmet.png" and "ExampleHelmet_Head.png" to work. Note that equipment textures must follow specific layouts, see ExampleMod examples

of similar items to use as a guide.