This data was retrieved from Config.cs, running Terraria v1.1.2.

NPC Attributes

Terraria Attributes Edit

Name Type Description
netAlways bool  ???
buffImmune bool[] Whether a particular buff may be placed on this NPC.
  • Default value: buffImmune[31] = true
lifeRegen int How much life the NPC regenerates each second.
npcSlots float How many slots this NPC takes up in memory storage. There is a hard cap of 200 onscreen at once. Different monsters contribute different amounts. For example, bosses have a number very close to this cap to prevent monsters from spawning during a fight.
  • Default value: 1f
lavaImmune bool Whether this NPC is harmed by lava or not.
townNPC bool Whether this NPC can live in a house or not.
friendly bool Whether this NPC deals damage when it collides with a player.
behindTiles bool Whether this NPC will be drawn behind tiles. This is used for enemies like the Man Eater; it is drawn behind tiles but in front of walls.
boss bool Whether this NPC is considered a boss. This changes the background music, among other things.
noTileCollide bool Whether this NPC ignores tile collisions.
alpha int An integer value representing the alpha blending for this NPC when drawn.
color Color A color overlay to draw on the NPC, represented as a (R,G,B) value.
  • Default value: default(Color)
knockBackResist float How resistant this NPC is to knockback. See the Item Attributes section on knockback for more information. This value may be a multiplier.
name string Sets the name of the NPC. Prioritized over the filename.
  • Default value: "Unnamed"
displayName string The name of the NPC which is displayed when you mouse over it.
  • Default value: ""
noGravity bool Whether this NPC is affected by gravity.
scale float A multiplier for how large to draw this NPC's sprite.
  • Default value: 1f
soundHit int Which sound to play when this monster is damaged. See List of Sounds for more information.
soundKilled int Which sound to play when this monster is slain. See List of Sounds for more information.
timeLeft int This may be so the NPC lasts only a short duration before disappearing. Effects unknown.

Default value: NPC.activeTime

type int A unique identifier assigned to this NPC so that other things can refer to it. Set it to -1 to indicate a custom NPC. See List of NPCs for more information.

Default value: -1

value float How many coins the NPC drops on death.
height int The height of this NPC's hitbox, in pixels.
width int The width of this NPC's hitbox, in pixels.
aiStyle int Which default AI behavior this NPC exhibits. See List of NPC AI Styles for more information.
damage int How much damage this NPC does when touching the player.
defense int How much defense this NPC has. Remember that every 2 points of defense lowers incoming damage by 1.
lifeMax int The maximum amount of life this NPC may have.
Music int The music what is playing when NPC is alive. This is cool feature for bosses.

tConfig Attributes Edit

Name Type Description
This will be filled out later