tModLoader v2024.08
A mod to make and play Terraria mods
EquipTexture Class Reference

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. More...

Public Member Functions

virtual void ArmorArmGlowMask (Player drawPlayer, float shadow, ref int glowMask, ref Color color)
 Allows you to modify which glow mask and in what color is drawn on the player's arms. Note that this is only called for body equipment textures. By default this will call the associated ModItem's ArmorArmGlowMask if there is an associated ModItem. More...
 
virtual void ArmorSetShadows (Player player)
 Allows you to determine special visual effects this vanity set has on the player without having to code them yourself. By default this will call the associated ModItem's ArmorSetShadows if there is an associated ModItem. More...
 
virtual void DrawArmorColor (Player drawPlayer, float shadow, ref Color color, ref int glowMask, ref Color glowMaskColor)
 Allows you to modify the colors in which this armor texture and surrounding accessories are drawn, in addition to which glow mask and in what color is drawn. By default this will call the associated ModItem's DrawArmorColor if there is an associated ModItem. More...
 
virtual void FrameEffects (Player player, EquipType type)
 Allows you to create special effects (such as dust) when this equipment texture is displayed on the player under the given equipment type. By default this will call the associated ModItem's UpdateVanity if there is an associated ModItem. More...
 
virtual void HorizontalWingSpeeds (Player player, ref float speed, ref float acceleration)
 Allows you to modify horizontal wing speeds. More...
 
virtual bool IsVanitySet (int head, int body, int legs)
 Returns whether or not the head armor, body armor, and leg armor textures make up a set. This hook is used for the PreUpdateVanitySet, UpdateVanitySet, and ArmorSetShadows hooks. By default this will return the same thing as the associated ModItem's IsVanitySet, or false if no ModItem is associated. More...
 
virtual void PreUpdateVanitySet (Player player)
 Allows you to create special effects (such as the necro armor's hurt noise) when the player wears this equipment texture's vanity set. This hook is called regardless of whether the player is frozen in any way. By default this will call the associated ModItem's PreUpdateVanitySet if there is an associated ModItem. More...
 
virtual void SetMatch (bool male, ref int equipSlot, ref bool robes)
 Allows you to modify the equipment that the player appears to be wearing. This hook will only be called for head, body and leg textures. Note that equipSlot is not the same as the item type of the armor the player will appear to be wearing. Worn equipment has a separate set of IDs. You can find the vanilla equipment IDs by looking at the headSlot, bodySlot, and legSlot fields for items, and modded equipment IDs by looking at EquipLoader. If this hook is called on body armor, equipSlot allows you to modify the leg armor the player appears to be wearing. If you modify it, make sure to set robes to true. If this hook is called on leg armor, equipSlot allows you to modify the leg armor the player appears to be wearing, and the robes parameter is useless. By default, if there is an associated ModItem, this will call that ModItem's SetMatch. More...
 
virtual void UpdateVanitySet (Player player)
 Allows you to create special effects (such as dust) when the player wears this equipment texture's vanity set. This hook will only be called if the player is not frozen in any way. By default this will call the associated ModItem's UpdateVanitySet if there is an associated ModItem. More...
 
virtual void VerticalWingSpeeds (Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
 Allows you to modify vertical wing speeds. More...
 
virtual bool WingUpdate (Player player, bool inUse)
 Allows for wing textures to do various things while in use. "inUse" is whether or not the jump button is currently pressed. Called when this wing texture visually appears on the player. Use to animate wings, create dusts, invoke sounds, and create lights. By default this will call the associated ModItem's WingUpdate if there is an associated ModItem. More...
 

Properties

ModItem Item [get, set]
 The item that is associated with this equipment texture. Null if no item is associated with this.
 
string Name [get, set]
 The internal name of this equipment texture.
 
int Slot [get, set]
 The slot (internal ID) of this equipment texture.
 
string Texture [get, set]
 The name and folders of the texture file used by this equipment texture.
 
EquipType Type [get, set]
 The type of equipment that this equipment texture is used as.
 

Detailed Description

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.

Member Function Documentation

◆ ArmorArmGlowMask()

virtual void EquipTexture.ArmorArmGlowMask ( Player  drawPlayer,
float  shadow,
ref int  glowMask,
ref Color  color 
)
virtual

Allows you to modify which glow mask and in what color is drawn on the player's arms. Note that this is only called for body equipment textures. By default this will call the associated ModItem's ArmorArmGlowMask if there is an associated ModItem.

Parameters
drawPlayer
shadow
glowMask
color

◆ ArmorSetShadows()

virtual void EquipTexture.ArmorSetShadows ( Player  player)
virtual

Allows you to determine special visual effects this vanity set has on the player without having to code them yourself. By default this will call the associated ModItem's ArmorSetShadows if there is an associated ModItem.

Parameters
player

◆ DrawArmorColor()

virtual void EquipTexture.DrawArmorColor ( Player  drawPlayer,
float  shadow,
ref Color  color,
ref int  glowMask,
ref Color  glowMaskColor 
)
virtual

Allows you to modify the colors in which this armor texture and surrounding accessories are drawn, in addition to which glow mask and in what color is drawn. By default this will call the associated ModItem's DrawArmorColor if there is an associated ModItem.

Parameters
drawPlayer
shadow
color
glowMask
glowMaskColor

◆ FrameEffects()

virtual void EquipTexture.FrameEffects ( Player  player,
EquipType  type 
)
virtual

Allows you to create special effects (such as dust) when this equipment texture is displayed on the player under the given equipment type. By default this will call the associated ModItem's UpdateVanity if there is an associated ModItem.

Parameters
player
type

◆ HorizontalWingSpeeds()

virtual void EquipTexture.HorizontalWingSpeeds ( Player  player,
ref float  speed,
ref float  acceleration 
)
virtual

Allows you to modify horizontal wing speeds.

Parameters
player
speed
acceleration

◆ IsVanitySet()

virtual bool EquipTexture.IsVanitySet ( int  head,
int  body,
int  legs 
)
virtual

Returns whether or not the head armor, body armor, and leg armor textures make up a set. This hook is used for the PreUpdateVanitySet, UpdateVanitySet, and ArmorSetShadows hooks. By default this will return the same thing as the associated ModItem's IsVanitySet, or false if no ModItem is associated.

Parameters
head
body
legs
Returns

◆ PreUpdateVanitySet()

virtual void EquipTexture.PreUpdateVanitySet ( Player  player)
virtual

Allows you to create special effects (such as the necro armor's hurt noise) when the player wears this equipment texture's vanity set. This hook is called regardless of whether the player is frozen in any way. By default this will call the associated ModItem's PreUpdateVanitySet if there is an associated ModItem.

Parameters
player

◆ SetMatch()

virtual void EquipTexture.SetMatch ( bool  male,
ref int  equipSlot,
ref bool  robes 
)
virtual

Allows you to modify the equipment that the player appears to be wearing. This hook will only be called for head, body and leg textures. Note that equipSlot is not the same as the item type of the armor the player will appear to be wearing. Worn equipment has a separate set of IDs. You can find the vanilla equipment IDs by looking at the headSlot, bodySlot, and legSlot fields for items, and modded equipment IDs by looking at EquipLoader. If this hook is called on body armor, equipSlot allows you to modify the leg armor the player appears to be wearing. If you modify it, make sure to set robes to true. If this hook is called on leg armor, equipSlot allows you to modify the leg armor the player appears to be wearing, and the robes parameter is useless. By default, if there is an associated ModItem, this will call that ModItem's SetMatch.

Parameters
male
equipSlot
robes

◆ UpdateVanitySet()

virtual void EquipTexture.UpdateVanitySet ( Player  player)
virtual

Allows you to create special effects (such as dust) when the player wears this equipment texture's vanity set. This hook will only be called if the player is not frozen in any way. By default this will call the associated ModItem's UpdateVanitySet if there is an associated ModItem.

Parameters
player

◆ VerticalWingSpeeds()

virtual void EquipTexture.VerticalWingSpeeds ( Player  player,
ref float  ascentWhenFalling,
ref float  ascentWhenRising,
ref float  maxCanAscendMultiplier,
ref float  maxAscentMultiplier,
ref float  constantAscend 
)
virtual

Allows you to modify vertical wing speeds.

Parameters
player
ascentWhenFalling
ascentWhenRising
maxCanAscendMultiplier
maxAscentMultiplier
constantAscend

◆ WingUpdate()

virtual bool EquipTexture.WingUpdate ( Player  player,
bool  inUse 
)
virtual

Allows for wing textures to do various things while in use. "inUse" is whether or not the jump button is currently pressed. Called when this wing texture visually appears on the player. Use to animate wings, create dusts, invoke sounds, and create lights. By default this will call the associated ModItem's WingUpdate if there is an associated ModItem.

Parameters
player
inUse
Returns