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

Class that is some-what identical to

See also
LegacyNPCProfile

that allows for modded texture usage. Also allows for any potential children classes to mess with the fields. More...

Inherits ITownNPCProfile.

Public Member Functions

 DefaultNPCProfile (string texturePath, int headSlot, string partyTexturePath=null)
 
int GetHeadTextureIndex (NPC npc)
 
string GetNameForVariant (NPC npc)
 
Asset< Texture2D > GetTextureNPCShouldUse (NPC npc)
 
int RollVariation ()
 
int GetHeadTextureIndex (NPC npc)
 
string GetNameForVariant (NPC npc)
 
Asset< Texture2D > GetTextureNPCShouldUse (NPC npc)
 
int RollVariation ()
 

Protected Attributes

int currentHeadSlot
 
Asset< Texture2D > defaultTexture
 
Asset< Texture2D > partyTexture
 

Detailed Description

Class that is some-what identical to

See also
LegacyNPCProfile

that allows for modded texture usage. Also allows for any potential children classes to mess with the fields.

Member Function Documentation

◆ GetHeadTextureIndex()

int Profiles.DefaultNPCProfile.GetHeadTextureIndex ( NPC  npc)

Implements ITownNPCProfile.

◆ GetNameForVariant()

string Profiles.DefaultNPCProfile.GetNameForVariant ( NPC  npc)

Implements ITownNPCProfile.

◆ GetTextureNPCShouldUse()

Asset< Texture2D > Profiles.DefaultNPCProfile.GetTextureNPCShouldUse ( NPC  npc)

Implements ITownNPCProfile.

◆ RollVariation()

int Profiles.DefaultNPCProfile.RollVariation ( )

Implements ITownNPCProfile.