Fandom

Surfpup's tConfig Mod Wiki

Item Attributes

124pages on
this wiki
Add New Page
Comments81 Share

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


Item Attributes


Terraria Attributes Edit

Name Type Description
width int The width of the item's hitbox while in use. This is used for collision detection to see if a tile or NPC is being hit by it. This is multiplied by scale to get the final size. There are 16 pixels per tile, so a size of 8 to 20 is ideal.
height int As above, but for the height of the hitbox.
name string The name of the item shown in game.
  • Default value: "Unnamed"
crit int The amount of critical hit percentage that this item adds. An amount of 10 would add 10%, for example. When used as armor or an accessory, will always be applied. When it's on a weapon, will only apply to attacks with that weapon. The base percentage for all players is 4% for each attack.
mech bool Whether this item shows wires when held. Sadly, it does not apply to accessories, since the game checks if the held item has the mech attribute set to true, as opposed to any equipped items as well.
reuseDelay int The time in frames before this item may be used again. There are 60 frames in one second.
melee bool Whether the damage this item deals is considered melee. Affected by appropriate modifiers. Melee takes priority over ranged, and ranged takes priority over magic.
magic bool Whether the damage this item deals is considered magic. Affected by appropriate modifiers. Melee takes priority over ranged, and ranged takes priority over magic.
ranged bool Whether the damage this item deals is considered ranged. Affected by appropriate modifiers. Melee takes priority over ranged, and ranged takes priority over magic.
placeStyle int For placed tiles, this is the subimage to use. For example, torches
buffTime int When used, if the item has a valid buffType assigned to it, that buff will last this many frames. Remember that there are 60 frames in one second.
buffType int The type of buff to add to the player using the item, according to that buff's type attribute. This will last for a number of frames equal to buffTime. You can see the List of Buffs for more information or see the tutorial on How to Make a Custom Buff
noWet bool Whether the item will be held while selected and in the water. For example, a Breathing Reed will be held, but a Torch will not.
vanity bool Whether or not the item is a vanity item.
mana int How much mana is consumed to use this item. If you do not have enough mana, you cannot use it.
channel bool Whether the item is channeled or not. This means that while the use button is held, the item will remain in constant effect. An example of this is the spell Magic Missile.
manaIncrease int How much the player's max mana increases by when the item is used.
noMelee bool Whether this item is allowed to deal damage with its sprite. Typically set to true for a ranged weapon, which would rely on its projectiles to deal damage, instead.
noUseGraphic bool Whether this item's sprite is drawn while it is in use. Thrown weapons like Dynamite uses this, because it is immediately tossed to the ground to create the illusion of being used.
lifeRegen int The higher this value, the quicker life is regenerated
shootSpeed float If this item creates a valid projectile on use, this is the speed of the projectile that is created. It is the number of pixels it travels per second. There are 16 pixels per tile, and 60 frames per second. For reference, a Wooden Bow creates an arrow at the speed of 6.1.
alpha int The alpha blending value of the item's sprite. 255 is fully transparent (invisible) and 0 is fully opaque (solid).
ammo int If you set this attribute on an item, it is considered ammunition and can be consumed by another item that uses ammo. The item that uses this ammo needs to set its useAmmo attribute equal to this item's ammo attribute. You can also view the List of Ammo and List of Projectiles, the tutorial for How to Create Custom Ammo, and below for more information.
useAmmo int If this item requires ammo, specify the ammo attribute here. This only works for regular ammo already in the game. You can also view the List of Ammo. If you wanted to use custom ammo, please see below for more details.
autoReuse bool Whether the item is used continuously while the use button is held down. Contrast with the channeled attribute.
accessory bool Whether this item is equipped in the accessory slot.
axe int Used to determine how much power this item has as an axe. Tiles have an attribute called minAxe that checks this value, to see if the tile is affected by this item.
healMana int How much mana is restored when this item is used.
bodySlot int Which armor to draw on the body slot while worn. If set to -1, the item cannot be worn in that slot. Setting it to -2 will indicate a custom armor. Refer to How to Make Custom Armor and List of Armor Types for more information.
  • Default value: -1
legSlot int Which armor to draw on the leg slot while worn. If set to -1, the item cannot be worn in that slot. Setting it to -2 will indicate custom boots. Refer to How to Make Custom Armor and List of Armor Types for more information.
  • Default value: -1
headSlot int Which armor to draw on the head slot while worn. If set to -1, the item cannot be worn in that slot. Setting it to -2 will indicate a custom helmet. Refer to How to Make Custom Armor and List of Armor Types for more information.
  • Default value: -1
potion bool This attribute's name is misleading, as this refers to healing effects. If set to true, you may not use any other items with this attribute until the cooldown elapses. This applies to healing items and mushrooms.
color Color The color to blend the sprite with. By default, it will just draw the sprite normally. Items made of base metal (copper, gold, iron) have a grey sprite and use this to colorize them.
  • Default value: default(Color)
consumable bool If this attribute is set to True, then one item from the stack is removed each time the item is used.
createTile int The type of tile to place in the world, equal to that tile's type attribute. It will be placed at the mouse cursor and the game will check to ensure the tile is valid for placement, such as being adjacent to a wall or tile. For custom tiles, see tConfig Attributes below for more information.
createWall int The type of wall to place in the world, equal to that wall's type attribute. It will be placed at the mouse cursor and the game will check to ensure the wall is valid for placement, such as being adjacent to another wall or tile. For custom walls, see tConfig Attributes below for more information.
damage int How much damage the item does to the target, if it hits.
  • Default value: -1
defense int How much defense this item provides while worn. Will only work while the item is in an accessory slot or worn as armor. Remember that every two points of defense will reduce incoming damage by 1!
hammer int Used to determine how much power this item has as a hammer. Tiles have an attribute called minHammer that checks this value, to see if the tile is affected by this item.
healLife int How much life is restored when this item is used.
holdStyle int The way that the character will hold the item while in use. See List of Hold Styles for more information.
knockBack float How many pixels an enemy is knocked back when the item successfully damages them. Again, one tile is made of 16 pixels. Note that NPCs have an attribute called knockBackResist which, along with the NPC's scale attribute, act as multipliers to reduce or increase the knockBack amount. For example, compare Pinky with a King Slime.
maxStack int How many items can exist in the one inventory slot before a new one is used. For example, ammo and building materials stack up to 250.
  • Default value: 1
pick int Used to determine how much power this item has as a pick. Tiles have an attribute called minPick that checks this value, to see if the tile is affected by this item.
rare int The color to draw the item's name in, with rarer items having more exotic colors. This is strictly cosmetic. Items with rare value greater than 0 are immune to lava, so common building materials will be destroyed, while powerful ones are retained.
scale float A multiplier that scales the sprite's drawing size. A value of 1.0 makes it the same size as the sprite would normally be, while 2.0 is twice the size and 0.5 is half the size.
  • Default value: 1
shoot int The type of projectile to spawn when this item is used, based on that projectile's type attribute. You can also view the List of Projectiles. If you want to spawn a custom projectile see below for more information.
stack int How many items are in the current stack. Will not exceed maxStack. See above for more information.
  • Default value: 1
toolTip string A line of text just below the item's name which appears when the mouse is hovering over it and the inventory is open. This usually lists things such as flavor text and the effects the item performs. You can specify up to 8 custom lines of text.
toolTip2 string See above.
toolTip3 string See above.
toolTip4 string See above.
toolTip5 string See above.
toolTip6 string See above.
toolTip7 string See above.
tileBoost int  ???
type int Type refers to the unique identifier for a specific item type. If you set your custom item's type to 300, it would then act like a battle potion. For a full list of item types, see List of Items. For a custom item, if you set it to -1, the game will assign it a new, unique type value for your item. For more information, see the tConfig Classes page.
  • Default value: -1
useStyle int The animation that is played when the item is used. useStyles do not have any .ini files and are currently hardcoded into the game. See List of UseStyles for more information about the different styles available for use, or How to Create a Use Style for making your own!
useSound int The type of sound to play when the item is used. Sounds do not have any .ini files and are currently hardcoded into the game. See List of Sounds for more information on the different sounds available for use.
useTime int How long it takes to use the item, in frames. While the item is in use, you cannot take other actions. There are 60 frames in one second. Thus, a useTime of 120 would lock your actions for two full seconds.
  • Default value: 100
useAnimation int How long it takes the animation to play for the item, in frames. See above for more information. An interesting quirk is that if the useTime is lower than the useAnimation, it will be activated one or more times per use.
  • Default value: 100
value int How much the item is worth, in copper coins, when you sell it to a merchant. It costs 1/5th of this to buy it back from them. An easy way to remember the value is platinum, gold, silver, copper or PPGGSSCC. For example, an item worth 1 platinum, 50 gold, and 25 silver pieces:
  • value = 01502500
useTurn bool Whether the player will turn to face the direction the player is moving when the item is used. For example, a sword would make you face left or right, but a spear would not. Set this to false to prevent the player from switching directions while swinging a weapon.
beingGrabbed bool  ???
active bool  ???
bodyType int[]  ???
buy bool  ???
buyOnce bool  ???
headType int[]  ???
keepTime int  ???
lavaWet bool  ???
legType int[]  ???
material bool  ???
netID int  ???
noGrabDelay int  ???
owner int  ???
ownIgnore int  ???
ownTime int  ???
position Vector2  ???
potionDelay int  ???
prefix byte  ???
release int  ???
social bool  ???
spawnTime int  ???
velocity Vector2  ???
wet bool  ???
wetCount Byte  ???
wornArmor bool  ???

Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.