From Terraria Wiki
(Redirected from Template:Iteminfo)
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:GetItemInfo/l10n for the localization of this template.
This template uses Lua.
This template uses Module:Iteminfo, a script written in the Lua programming language. To learn more about Lua, see Terraria Wiki:Lua.
Template-info.svg Documentation The documentation below is transcluded from Template:GetItemInfo/doc. (edit | history)

This template is used to dynamically and reliably display an item's stats. It is based on Module:Iteminfo, which takes its data directly from the source code. This facilitates displaying stats without having to change them in case of updates. {{iteminfo}} can be used as a shortcut for this template.


{{ iteminfo | <ID or name of the item> | <specific stat> | format = y/yes (optional) | raw = y/yes (optional) }}

First unnamed parameter / id

Name or ID of the item. If it is the ID, use the parameter $id instead, it is faster. If it is the name, it must be valid per Template:ItemIdFromName.

Second unnamed parameter / field

Specific stat to be displayed; see the tables below for valid values.

See below for how to output all stats.

Original raw variable name Alias Description
case-sensitive if raw=yes,
case-insensitive otherwise
type id / item id / itemId Item ID of the item
name name of the item.
internalName internal name Internal name of the item.
DD2Summon If set, it means this item is a Tavernkeep's sentry-summoning weapon(Desktop, Console and Mobile versions).
accessory acc If set, this is an accessory item.
ammo AmmoID (used in field useAmmo) not only, e.g. 353, 154
autoReuse auto / autoSwing If set, this item is capable of autoswing.
axe axe power / axePower Axe power.
backSlot Back slot ID. See Armor IDs § Accessories.
bait bait power / baitPower Bait power.
balloonSlot Balloon slot ID. See Armor IDs § Accessories.
bodySlot body slot Body (waist) slot ID. See Armor IDs.
buffTime buffDuration / buff duration Time the buff this item grants will be in effect.
buffType buffId / buff id Buff ID of the buff this item grants.
buff / buff name / buffName English name of the buff this item grants. If you need localized name, use {{getBuffInfo|<buffid>|name}}
cartTrack Is set for Minecart Tracks.
channel If set, means that the item can/needs be used continuously ("channeling cast", different from autoswing, though!) Is set for flails and yoyos, chainsaws and drills, Magic Missile and its upgrades, Dirt Rod, Piranha Gun, Chlorophyte Jackhammer, Laser Machinegun, Charged Blaster Cannon, Flying Knife, Medusa Head, Arkhalis, Portal Gun, Vortex Beater, Phantasm, The Grand Design, Last Prism, Sleepy Octopod, Ghastly Glaive, Phantom Phoenix, Sky Dragon's Fury. Is also set for certain pet/light pet/mount-summoning items, since they will continuously be in effect.
consumable Is set for items that are consumables (which means all items in Category:Consumable items). Note that this is distinct from the ingame concept "Consumable"! See Category:Consumable items for clarification. If this attribute is set to True, then one item from the stack is removed each time the item is used.
craftable If set, this item can be crafted.
createTile tile / tileId / tile id Tile ID of the tile this item produces when placed.
placeStyle tile sub id / tile subid / tileSubId Sub ID of the Tile ID.
createWall wall / wallId / wall id Wall ID of the wall this item produces when placed.
crit critical Critical strike chance of the item.
damage dmg Base damage of the item.
defense Defense this item grants.
dye If non-zero, this is a dye item.
expert If set, this item will be displayed as Rainbow rarity.
faceSlot Face slot ID. See Armor IDs § Accessories.
fishingPole fishingPower / fishing power Fishing Power of the item.
flame Set for each kind of Torch and for Water, Peace, Platinum, and regular Candle. Interestingly, it is also set for Brand of the Inferno.
frontSlot Front slot ID. See Armor IDs § Accessories.
hairDye hair dye 0 for Hair Dye Remover and positive number for other Hair Dyes.
hammer hammer power / hammerPower Hammer power.
handOffSlot Hand-off slot ID. See Armor IDs § Accessories.
handOnSlot Hand-on slot ID. See Armor IDs § Accessories.
headSlot head slot Head slot ID. See Armor IDs.
healLife Amount of health points this item restores when used.
healMana Amount of mana this item restores when used.
holdStyle How the item is held by the player when used or selected in the inventory. See Use Style IDs.
knockBack kb Knockback value of the item.
legSlot leg slot Leg slot ID. See Armor IDs.
lifeRegen Can only be 0 or 1. Is set to 1 for Band of Regeneration and Charm of Myths.
makeNPC If non-zero, will spawn NPC when used. The value is the NPC ID of the spawned NPC.
mana Amount of mana this item consumes upon use.
maxStack stack Maximum stack limit.
mech If set, this is a mechanism item, which means that it shows wire and Actuators when held.
melee damagetype If set, this item deals melee damage.
magic If set, this item deals magic damage.
ranged If set, this item deals ranged damage.
summon If set, this item deals summon damage.
thrown If set, this item deals thrown damage.
mountType mount / mountid / mount id Mount ID of the mount this item summons when used.
neckSlot Neck slot ID. See Armor IDs § Accessories.
noMelee 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 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.
noWet If set, the item cannot be held/placed underwater: Unicorn on a Stick, every kind of Candle and every kind of Torch (without Cursed and Ichor Torch). However, is also set for Timers which can be placed underwater.
notAmmo Is only set for coins, Ale, Wire. Aside from Wire, these share the trait of not being able to be put in the ammo slot of the inventory, even though there are used as ammunition. Wire can be placed in that slot, though.
paint If not 0, it means the item is Paint. The value is some sort of internal "Paint ID", ranging from 1 (Red Paint) to 30 (Negative Paint).
pick pick power / pickPower / pickaxe / pickaxe power / pickaxePower Pickaxe power.
potion If set, no other items with this attribute may be used until the cooldown elapses. This applies to healing items and Mushrooms.
questItem Is only set for Quest Fish.
rare rarity Rarity of the item. Not valid if expert is set, as that makes the item have the Rarity level: Rainbow rarity.
reuseDelay usedelay / use delay The time in ticks before this item may be used again, commonly called "Use Delay". There are 60 ticks in one second. Currently only set for Clockwork Assault Rifle, Medusa Head, Last Prism, Sky Fracture, and Betsy's Wrath.
sacrifices Required amount to research this item.
sentry If set, this item is a sentry summon item.
shieldSlot Shield slot ID. See Armor IDs § Accessories.
shoeSlot Shoe slot ID. See Armor IDs § Accessories.
shoot projectileId / projectile id If non-zero, this is the Projectile ID of the projectile fired by the item.
shootSpeed velocity Velocity of the projectile fired by the item, in pixels per tick. Use {{mph|<velocity> pixels}} to convert it to miles per hour.
shopCustomPrice Purchase prices of the Old One's Army(Desktop, Console and Mobile versions) items, in Defender Medals.
stringColor The color type of Strings, only for String items.
tileBoost Range bonus.
tileWand tile wand Item ID of the block this block-placing wand places.
uniqueStack Is only set for Quest Fish. See Fishing#Fishing Quests for details regarding the special quality of these items.
useAmmo Type of ammunition this item uses.
useAnimation use / usetime / use time Use time of the item. Note that this value is not correct for swords with autoswing capabilities; the actual in-game use time of those weapons is useAnimation-1. The template currently does not consider this, which leads to an incorrect result for those weapons.
UseSound sound / sounduse / use sound Sound effect that is played when this item is used, wrapped in {{sound}} without a caption. Note that the listed sound is only the base sound; it might be played with modified pitch and volume in-game.
useStyle use style How the item is held by the player when used or selected in the inventory. See Use Style IDs.
useTime tool speed / toolspeed Tool speed for tools, (internal) use time for others. How long it takes to use the item, in ticks. While the item is in use, you cannot take other actions.
useTurn 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.
value buy / price Buy value. If shopCustomPrice is set, it will display the price in Defender Medals. Note that this might output a value even if the item cannot be bought!
sell Sell value. Note that there is no original variable for this stat, because the game just divides an item's buy value by 5 to determine its sell value. Use {{#expr:floor({{iteminfo|item|value|raw=yes}}/5)}} to receive a raw, numerical value for the sell value.
Another alias is value. Due to its ambiguity with the original variable possibly causing confusion, it is now deprecated. Although it may still be used on some pages, it should no longer be used.
vanity If set, this item is a vanity item.
waistSlot Waist slot ID. See Armor IDs § Accessories.
wingSlot Wing slot ID. See Armor IDs § Accessories.
format = y/yes

Use this parameter to wrap the output in the magic word {{formatnum:}}. Only available when using a second unnamed parameter.

raw = y/yes

Use this parameter to output the value exactly as it exists in the source code, for instance for further calculations with the {{#expr:}} parser function. See Module:Iteminfo for information about how to interpret the output values. Only available when using a second unnamed parameter. Requires the second unnamed parameter to constitute an original variable name, i.e. no aliases are allowed. format is still applicable. Renders the second unnamed parameter case-sensitive.


Specific stats

  • The Regeneration Potion grants the [[{{iteminfo|Regeneration Potion|buff}}]] buff for {{iteminfo|id=289|field=buff duration}} and can be sold for {{iteminfo|Regeneration Potion|sell}}.
results in:
The Regeneration Potion grants the Regeneration buff for 8 minutes and can be sold for 2 SC.
  • {{iteminfo|Ballista Cane|buy}} results in: 150000*15 Defender Medal
  • {{iteminfo|Ballista Cane|sell}} results in: 5 GC

Maximum ID

Use {{iteminfo/maxId}} to display the greatest valid item ID: 5455. This is also possible via {{iteminfo||count}}, but note that this method is deprecated.

All stats

Use {{iteminfo/all}} or {{getItemInfo/all}} to display a box with all available stats of an item. Takes only one parameter – the ID or name of the item.

  • {{iteminfo/all|Terra Blade}} results in:
Terra Blade (ID = 757) Info:
active: 1
alpha: 0
ammo: 0
autoReuse: 1
axe: 0
backSlot: -1
bait: 0
balloonSlot: -1
beardSlot: -1
bodySlot: -1
buffTime: 0
buffType: 0
craftable: 1
createTile: -1
createWall: -1
crit: 0
damage: 85
defense: 0
dye: 0
faceSlot: -1
fishingPole: 0
frontSlot: -1
glowMask: -1
hairDye: -1
hammer: 0
handOffSlot: -1
handOnSlot: -1
headSlot: -1
healLife: 0
healMana: 0
height: 30
holdStyle: 0
internalName: TerraBlade
knockBack: 6.5
legSlot: -1
lifeRegen: 0
makeNPC: 0
mana: 0
manaIncrease: 0
material: 1
maxStack: 1
melee: 1
mountType: -1
name: Terra Blade
neckSlot: -1
netID: 757
noMelee: 1
paint: 0
paintCoating: 0
pick: 0
placeStyle: 0
prefix: 0
rare: 8
rarity: 0
reuseDelay: 0
sacrifices: 1
scale: 1
shieldSlot: -1
shoeSlot: -1
shoot: 985
shootsEveryUse: 1
shootSpeed: 12
shopSpecialCurrency: -1
tileBoost: 0
tileWand: -1
tooltipContext: -1
type: 757
useAmmo: 0
useAnimation: 18
UseSound: Item_1
useStyle: 1
useTime: 18
value: 1000000
waistSlot: -1
wetCount: 0
width: 30
wingSlot: -1

See also