Terraria Wiki
Registre-se
Terraria Wiki
1 574
páginas
mSem resumo de edição
Ryebot (discussão | contribs)
(sync :: en revid:1178423::)
 
(Há 25 revisões intermédias de 4 utilizadores que não estão a ser apresentadas)
Linha 1: Linha 1:
 
<includeonly><!--
 
<includeonly><!--
-->{{item/options|smallicons=y}}<!--
 
-->{{eicons/options|small=y}}<!--
 
   
  +
==========================================================================================================================
-->{{#dplvar:set<!--
 
  +
=========================================== INITIALIZATION ===========================================
-->|_item_infobox:name|{{{name|{{ROOTPAGENAME}}}}}<!--
 
  +
==========================================================================================================================
-->}}<!--
 
   
--><div class="infobox item {{lc:{{{type|}}}}} {{#if:{{{float|}}}|float-{{{float}}}}}" style="<!--
 
-->{{#if:{{{boxwidth|}}}|width:{{{boxwidth|}}};}}{{{css|}}};{{{style|}}}<!--
 
-->"><!--
 
 
--><div class="title">{{#dplvar:_item_infobox:name}}{{#if:{{{namesub|}}}|<span>{{{namesub|}}}</span>}}</div><!--
 
   
  +
+++++++++++++ 1. Localization +++++++++++++
--><div class="section images"><!--
 
  +
--><ul class="{{#if:{{{imagebreak|}}}|block|inline}}"><!--
 
  +
// localization info is autoloaded from Template:Item infobox/l10n
//female image check first(used in equipped image)
 
  +
-->{{#dplvar:set|_item_infobox:male_image_postfix|(male)}}<!--
 
  +
// additional l10n: how to get english item name from {{BASEPAGENAME}}?
-->{{#dplvar:set|_item_infobox:female_image|<!--
 
  +
-->{{#vardefine:itemnamefrompagename|{{pagename2en|{{#titleparts:{{ROOTPAGENAME}}}}}}}}<!--
-->{{#if:{{{imagefemale|}}}|<!--
 
  +
--><li>{{{imagefemale|}}}</li><!--
 
  +
-->|<!--
 
  +
+++++++++++++ 2. View-related options +++++++++++++
-->{{#ifexist:Media:{{#dplvar:_item_infobox:name}} female.png|<!--
 
  +
--><li>[[File:{{#dplvar:_item_infobox:name}} female.png|{{#dplvar:_item_infobox:name}} equipped (female)|link=]]</li><!--
 
  +
-->{{#vardefine:viewname|{{lc:{{{mode|{{{output|{{{view|{{options/get|item infobox|view}}}}}}}}}}}}}}}<!--
-->|<!--
 
  +
-->{{#switch:{{#var:viewname}}<!--
-->{{#dplvar:set|_item_infobox:male_image_postfix|}}<!-- no image for female, so male image doesn't need postfix.
 
-->}}<!--
+
-->|infobox=<!--
  +
-->{{#arraydefine:extargs|float/css/style/boxwidth/imagebreak/showids/idshow/idtileshow/projectileblock/projectilename/projectileimage/showenglishname/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!--
-->}}<!--
 
-->}}<!--
+
-->|table=<!--
  +
-->{{#arraydefine:extargs|cols/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!--
//main image
 
  +
-->{{#arraydefine:ii:table:cols|{{{cols|{{options/get|item infobox|cols}}}}}|{{{colsep|{{#or:{{options/get|item infobox|colsep}}|/}}}}}}}<!-- default cols value from options
--><li>{{{image|[[File:{{#dplvar:_item_infobox:name}}.png|{{#dplvar:_item_infobox:name}} {{#ifeq:{{lc:{{{type2|}}}}}|set|equipped {{#dplvar:_item_infobox:male_image_postfix}}|item sprite}}|link=]]}}}</li><!--
 
  +
// and pass all custom col values.
//placed image
 
  +
-->{{#arrayprint:ii:table:cols||@@@@|{{#if:{{#rmatch:@@@@|/^col:/|y}}|{{#vardefine:ii:@@@@|{{{@@@@|}}} }}}}}}<!--
-->{{#if:{{{imageplaced|}}}|<!--
 
--><li>{{{imageplaced|}}}</li><!--
+
-->|custom=<!--
  +
-->{{#arraydefine:extargs|template/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!--
  +
-->|item=<!--
  +
-->{{#arraydefine:extargs|mode/nolink/link/wrap/icons/note/note2/anchor/showid/class/css/t/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!--
  +
-->|#default=<!--
  +
-->{{#arraydefine:extargs|{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!--
  +
-->}}<!--
  +
-->{{#arrayprint:extargs||@@@@|{{#if:@@@@|{{#vardefine:ii:ext:@@@@|{{{@@@@|}}}}}}}}}<!-- ext parameters for view
  +
-->{{#vardefine:imagemode|{{{imagemode|{{#ifeq:{{#var:viewname}}|infobox|full|{{options/get|item infobox|imagemode}}}}}}}}}<!-- image mode
  +
  +
  +
  +
==========================================================================================================================
  +
============================================= DATA MODEL =============================================
  +
==========================================================================================================================
  +
  +
Note: All "#lst*" parser functions ([[gphelp:Extension:ParserPower/List handling functions]]) will trim whitespace and discard empty elements.
  +
  +
  +
+++++++++++++ 1. Set types, listcats, and tags from parameter input +++++++++++++
  +
  +
// types: separated with "/".
  +
-->{{#vardefine:ii:types|{{lcfirst:{{{type|}}}}}/{{lcfirst:{{{type2|}}}}}}}<!--
  +
// listcats: separated with "/".
  +
-->{{#vardefine:ii:listcats|{{{listcat|}}}/{{{listcat2|}}}/{{{listcat3|}}}/{{{listcat4|}}}/{{{listcat5|}}}}}<!--
  +
// tags: separated with "/".
  +
-->{{#vardefine:ii:tags|{{{tags|{{{tag|}}}}}}}}<!--
  +
  +
// check for certain tags to add to listcats:
  +
* tag "xxx" -> add listcat "xxx items"
  +
-->{{#vardefine:ii:listcats|{{#lstjoin:{{#var:ii:listcats}}|/|{{#lstmap:{{#lstfltr:drop/loot/plunder/fished/unobtainable/developer/furniture/storage/informational/light source/novelty/mechanism/bag loot|/|{{#var:ii:tags}}|/|/}}|/|@@@|@@@ items|/}}|/|/}}}}<!--
  +
* tag "xxx" -> add listcat "xxx"
  +
-->{{#vardefine:ii:listcats|{{#lstjoin:{{#var:ii:listcats}}|/|{{#lstfltr:potion ingredients/quest rewards|/|{{#var:ii:tags}}|/|/}}|/|/}}}}<!--
  +
* custom mapping
  +
-->{{#if:{{#lstind:bagloot|{{#var:ii:tags}}|/}}|{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|bag loot items}}}}}}<!--
  +
-->{{#if:{{#lstind:treasure bag loot|{{#var:ii:tags}}|/}}|{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|Treasure Bag loot items}}}}}}<!--
  +
  +
// check for certain listcats:
  +
* listcat "Broadswords"/"Shortswords" -> add listcat "Swords"
  +
-->{{#if:{{#lstfltr:broadswords/shortswords|/|{{#var:ii:listcats}}|}}|{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|swords}}}}}}<!--
  +
* listcat "Explosives" -> add type "weapon"
  +
-->{{#if:{{#lstind:explosives|{{#var:ii:listcats}}|/}}|{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|weapon}}}}}}<!--
  +
  +
// is armor/vanity set?
  +
-->{{#vardefine:ii:isArmorSet|{{#lstind:set|{{#var:ii:types}}|/}}}}<!--
  +
  +
// summon weapons:
  +
-->{{#if:{{#var:ii:isArmorSet}}||<!-- exclude armor sets (e.g. Stardust armor)
  +
-->{{#if:{{#lstfltr:minion/sentry|/|{{#var:ii:tags}}|/|/}}|<!--
  +
* tag "minion"/"sentry" -> add listcat "minion/sentry summon items"
  +
-->{{#vardefine:ii:listcats|{{#lstjoin:{{#var:ii:listcats}}|/|{{#lstmap:{{#lstfltr:minion/sentry|/|{{#var:ii:tags}}|/|/}}|/|@@@|@@@ summon items|/}}|/|/}}}}<!--
  +
* add type "weapon"
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|weapon}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
  +
  +
+++++++++++++ 2. Fetch automatic data +++++++++++++
  +
  +
-->{{#vardefine:ii:auto_id|{{#if:{{{auto|}}}|<!--
  +
-->{{#if:{{isNumber|{{{auto|}}}}}|<!--
  +
-->{{{auto|}}}<!-- $auto is number, use it as-is
  +
-->|<!--
  +
-->{{{id|{{ItemIdFromName|{{{name|{{#var:itemnamefrompagename}}}}}}}}}}<!-- $id -> idFromName
  +
-->}}<!--
  +
-->}}}}<!--
  +
-->{{#vardefine:ii:auto_id|{{#var:ii:auto_id|0}}}}<!-- default to 0 if $auto is empty/unset or $id is empty/unset or idFromName failed
  +
-->{{#invoke:Iteminfo|getInfo|prefix=ii:info:|id={{#var:ii:auto_id}}}}<!-- fetch data or reset the data-filled vars
  +
  +
  +
+++++++++++++ 3. Process auto data, overriding with manual input if necessary +++++++++++++
  +
  +
---- id and name ----
  +
-->{{#vardefine:ii:id|{{{id|{{#ifexpr:{{#dplvar:ii:info:type}}|{{#dplvar:ii:info:type}}}}}}}}}<!--
  +
-->{{#vardefine:ii:name|{{{name|{{#or:{{#dplvar:ii:info:name}}|{{#var:itemnamefrompagename}}}}}}}}}<!--
  +
-->{{#vardefine:ii:namesub|{{{namesub|}}}}}<!--
  +
-->{{#vardefine:ii:lname|{{{lname|{{tr|{{#var:ii:name|}}}}}}}}}<!--
  +
-->{{#vardefine:ii:internalName|{{#dplvar:ii:info:internalName}}}}<!--
  +
--------
  +
  +
---- autoswing and stack ----
  +
-->{{#vardefine:ii:autoswing|{{{autoswing|{{#dplvar:ii:info:autoReuse}}}}}}}<!--
  +
-->{{#vardefine:ii:stack|<!--
  +
-->{{#ifeq:{{{stack|-unset}}}|{{{stack|unset-}}}|<!-- allow "|stack=" to suppress stack display
  +
-->{{#rreplace:{{{stack|}}}|@@@@|{{#dplvar:ii:info:maxStack}}}}<!--
  +
-->|<!--
  +
-->{{#dplvar:ii:info:maxStack}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- hammer, pick, axe power ----
  +
-->{{#vardefine:ii:hammer|{{#ifexpr:{{#dplvar:ii:info:hammer}}|{{#dplvar:ii:info:hammer}}%}}}}<!--
  +
-->{{#if:{{{hammer|}}}|<!--
  +
-->{{#vardefine:ii:hammer|{{#rreplace:{{{hammer|}}}|@@@@|{{#var:ii:hammer}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:pick|{{#ifexpr:{{#dplvar:ii:info:pick}}|{{#dplvar:ii:info:pick}}%}}}}<!--
  +
-->{{#if:{{{pick|}}}|<!--
  +
-->{{#vardefine:ii:pick|{{#rreplace:{{{pick|}}}|@@@@|{{#var:ii:pick}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:axe|{{#ifexpr:{{#dplvar:ii:info:axe}}|{{#expr:{{#dplvar:ii:info:axe}}*5}}%}}}}<!--
  +
-->{{#if:{{{axe|}}}|<!--
  +
-->{{#vardefine:ii:axe|{{#rreplace:{{{axe|}}}|@@@@|{{#var:ii:axe}}}}}}<!--
  +
-->}}<!--
  +
// add "tool" to types, and try to detect chainsaws/drills/hamaxes...
  +
-->{{#ifexpr:{{#dplvar:ii:info:axe}}{{#dplvar:ii:info:hammer}}{{#dplvar:ii:info:pick}}|<!-- if at least one of the three is non-zero
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|tool}}}}<!--
  +
// hammers and hamaxes
  +
-->{{#ifexpr:{{#dplvar:ii:info:hammer}}|<!--
  +
-->{{#ifexpr:{{#dplvar:ii:info:axe}}|<!--
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|hamaxes}}}}<!--
  +
-->|<!--
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|hammers}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
// axes and chainsaws
  +
-->{{#ifexpr:{{#dplvar:ii:info:axe}}|<!--
  +
-->{{#ifexpr:{{#dplvar:ii:info:hammer}}||<!-- exclude hamaxes
  +
-->{{#ifexpr:{{#dplvar:ii:info:shoot}}|<!--
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|chainsaws}}}}<!--
 
-->|<!--
 
-->|<!--
-->{{#ifexist: Media:{{#dplvar:_item_infobox:name}} (colocado).gif|<!--
+
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|axes}}}}<!--
--><li>[[File:{{#dplvar:_item_infobox:name}} (colocado).gif|{{#dplvar:_item_infobox:name}} placed|link=]]</li><!--
 
-->|{{#ifexist: Media:{{#dplvar:_item_infobox:name}} (colocado).png|<!-- elseif
 
--><li>[[File:{{#dplvar:_item_infobox:name}} (colocado).png|{{#dplvar:_item_infobox:name}} placed|link=]]</li><!--
 
-->}}}}<!--
 
 
-->}}<!--
 
-->}}<!--
//equipped image
 
-->{{#if:{{{imageequipped|}}}|<!--
 
--><li>{{{imageequipped|}}}</li><!--
 
-->|<!--
 
-->{{#ifexist: Media:{{#dplvar:_item_infobox:name}} (equipped).gif|<!--
 
--><li>[[File:{{#dplvar:_item_infobox:name}} (equipped).gif|{{#dplvar:_item_infobox:name}} equipped|link=]]</li><!--
 
-->|{{#ifexist: Media:{{#dplvar:_item_infobox:name}} (equipped).png|<!-- elseif
 
--><li>[[File:{{#dplvar:_item_infobox:name}} (equipped).png|{{#dplvar:_item_infobox:name}} equipped|link=]]</li><!--
 
-->}}}}<!--
 
-->}}<!--
 
//female image
 
-->{{#dplvar:_item_infobox:female_image}}<!--
 
--></ul><!--
 
//autoswing
 
-->{{#if:{{{auto|}}}|<div class="auto">[[File:Auto icon.png|18px|link=Autoswing|{{item infobox/autotext|{{{auto|}}}|{{{type|}}}}}]]</div>}}<!--
 
//stack
 
-->{{#if:{{{stack|}}}|{{#iferror:{{#expr:{{{stack|}}}>0}}||<div class="stack" title="Max Stack: {{{stack}}}">{{stack|{{{stack}}}}}</div>}}}}<!--
 
--></div><!-- div.section.images
 
--><div class="section statistics"><!--
 
-->{{#if:{{{type|}}}{{{rare|}}}|<div class="title">Atributos</div>}}<!--
 
-->{{#ifexpr:{{#dplnum:0{{{hammer|}}}{{{pick|}}}{{{axe|}}}}}>0|<!--
 
--><ul class="toolpower"><!--
 
--><li title="Poder de mineração">[[File:Pickaxe icon.png|16px|link=]] {{{pick|0}}}%</li><!--
 
--><li title="Hammer Power">[[File:Hammer icon.png|16px|link=]] {{{hammer|0}}}%</li><!--
 
--><li title="Axe Power">[[File:Axe icon.png|16px|link=]] {{{axe|0}}}%</li><!--
 
--></ul><!--
 
 
-->}}<!--
 
-->}}<!--
--><table class="stat"><!--
+
-->}}<!--
  +
// pickaxes and drills
-->{{#if: {{{type|}}}|<!--
 
  +
-->{{#ifexpr:{{#dplvar:ii:info:pick}}|<!--
--><tr><!--
 
--><th>Tipo</th><!--
+
-->{{#ifexpr:{{#dplvar:ii:info:shoot}}|<!--
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|drills}}}}<!--
--><td><!--
 
  +
-->|<!--
-->{{ifexists|{{{type}}}|[[{{{type}}}]]|{{{type}}}}}<!--
 
-->{{#if:{{{type2|}}}|&#32;&ndash;&#32;{{ifexists|{{{type2}}}|[[{{{type2}}}]]|{{{type2}}}}}}}<!--
+
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|pickaxes}}}}<!--
--></td><!--
+
-->}}<!--
--></tr><!--
+
-->}}<!--
-->}}<!--
+
-->}}<!--
  +
--------
-->{{#if:{{{bait|}}}|<!--
 
  +
--><tr><!--
 
  +
---- pick-/hammerreq ----
--><th>[[Bait]] Power</th><!--
 
--><td>{{{bait|}}}%</td><!--
+
-->{{#vardefine:ii:pickreq|{{{pickreq|}}}}}<!--
  +
-->{{#vardefine:ii:hammerreq|{{{hammerreq|}}}}}<!--
--></tr><!--
 
  +
--------
  +
  +
---- ammo type ----
  +
-->{{#vardefine:ii:ammo|{{#dplvar:ii:info:ammo}}}}<!--
  +
-->{{#ifexpr:{{#var:ii:ammo}}|<!-- Ammo type/cate
  +
// add "Ammunition" to type.
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|ammunition}}}}<!--
  +
// add ammo type to listcat: (by AmmoID)
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|{{#switch:{{#var:ii:ammo}}<!--
  +
-->|40=arrows<!--
  +
-->|71=coins<!--
  +
-->|97=bullets<!--
  +
-->|169=sands<!--
  +
-->|283=darts<!--
  +
-->|771=rockets<!--
  +
-->|780=solutions<!--
  +
-->|931=flares<!--
  +
-->}}}}}}<!--
  +
-->}}<!--
  +
// use ammo type
  +
-->{{#vardefine:ii:useammo|{{#switch:{{#dplvar:ii:info:useAmmo}}<!--
  +
-->|23=gel<!--
  +
-->|40=arrows<!--
  +
-->|71=coins<!--
  +
-->|75=fallenStar<!--
  +
-->|97=bullets<!--
  +
-->|169=sands<!--
  +
-->|283=darts<!--
  +
-->|353=ale<!--
  +
-->|771=rockets<!--
  +
-->|780=solutions<!--
  +
-->|931=flares<!--
  +
-->|949=snowball<!--
  +
-->|1261=styngerBolt<!--
  +
-->|1783=candyCorn<!--
  +
-->|1785=jackOLantern<!--
  +
-->|1836=stake<!--
  +
-->|3108=nailFriendly<!--
  +
-->}}}}<!--
  +
--------
  +
  +
---- various types, listcats, and tags ----
  +
-->{{#if:{{#dplvar:ii:info:accessory}}|<!-- accessory?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|accessory}}}}<!--
  +
-->}}<!--
  +
-->{{#if:{{#dplvar:ii:info:cartTrack}}|<!-- cart track?
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|minecart track items}}}}<!--
  +
-->}}<!--
  +
-->{{#ifexpr:{{#dplvar:ii:info:dye}}|<!-- is dye?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|dye}}}}<!--
  +
-->}}<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:hairDye}}|-1}}>-1|<!-- is hair dye?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|hair dye}}}}<!--
  +
-->}}<!--
  +
-->{{#if:{{#dplvar:ii:info:string}}|<!-- string?
  +
-->{{#vardefine:ii:tags|{{#lstapp:{{#var:ii:tags}}|/|string}}}}<!--
  +
-->}}<!--
  +
-->{{#if:{{#dplvar:ii:info:vanity}}|<!-- vanity?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|vanity}}}}<!--
  +
-->}}<!--
  +
-->{{#if:{{#dplvar:ii:info:mech}}|<!-- mech?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|mechanism}}}}<!--
  +
-->}}<!--
  +
-->{{#ifeq:{{#invoke:Iteminfo/idSets|value|IsFood|{{#var:ii:auto_id}}}}|true|<!-- food?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|food}}}}<!--
  +
-->}}<!--
  +
  +
---- fishing power and bait ----
  +
-->{{#vardefine:ii:fishing|{{#dplvar:ii:info:fishingPole}}}}<!--
  +
-->{{#ifeq:{{{fishing|-unset}}}|{{{fishing|unset-}}}|<!-- allow "|fishing=" to suppress fishing power display
  +
-->{{#vardefine:ii:fishing|{{#rreplace:{{{fishing|}}}|@@@@|{{percent|{{#var:ii:fishing}}%}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:bait|{{{bait|{{#dplvar:ii:info:bait}}}}}}}<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:bait}}|0}}|<!-- bait?
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|bait}}}}<!--
  +
-->}}<!--
  +
  +
---- damage and damagetype ----
  +
// use damage if damage>0 or "weapon" in types
  +
-->{{#vardefine:ii:damage|{{#ifexpr:(0{{#dplvar:ii:info:damage}}>0) or {{#or:{{#lstind:weapon|{{#var:ii:types}}|/}}|0}}|{{#dplvar:ii:info:damage}}}}}}<!--
  +
-->{{#ifeq:{{{damage|-unset}}}|{{{damage|unset-}}}|<!-- allow "|damage=" to suppress damage display
  +
-->{{#vardefine:ii:damage|{{#rreplace:{{{damage|}}}|@@@@|{{#var:ii:damage}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:damagetype|{{#if:{{#var:ii:damage}}|{{#switch:1<!--
  +
-->|{{#dplvar:ii:info:melee}}=Melee<!--
  +
-->|{{#dplvar:ii:info:ranged}}=Ranged<!--
  +
-->|{{#dplvar:ii:info:magic}}=Magic<!--
  +
-->|{{#dplvar:ii:info:summon}}=Summon<!--
  +
-->|{{#dplvar:ii:info:thrown}}=Throwing<!--
  +
-->}}}}}}<!--
  +
// other, non-weapon items with autodamage
  +
-->{{#ifexpr:0{{#dplvar:ii:info:damage}}>0|<!--
  +
-->{{#if:{{#lstind:tool|{{#var:ii:types}}|/}}|<!--
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|weapon items}}}}<!-- tools with damage need "weapon items" in listcat
  +
-->|<!-- else
  +
-->{{#if:{{#lstind:ammunition|{{#var:ii:types}}|/}}||<!-- is not ammo
  +
-->{{#if:{{#dplvar:ii:info:accessory}}||<!-- and is not accessory
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|weapon}}}}<!-- add "weapon" to types
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{{damage|}}}|<!--
+
-->}}<!--
--><tr><!--
+
-->}}<!--
--><th>Dano</th><!--
+
-->}}<!--
  +
// add "<auto damagetype> weapons" to listcats
--><td><!--
 
-->{{{damage|}}} <!--
+
-->{{#if:{{#var:ii:damagetype}}|<!--
-->{{#dplvar:set|_damagetype|{{item infobox/damagetype|{{{damagetype|}}}|{{{type|}}}}}}}<!--
+
-->{{#if:{{#lstind:weapon|{{#var:ii:types}}|/}}|<!--
-->{{#if:{{#dplvar:_damagetype}}|<small>{{#dplvar:_damagetype}}</small>}}</td><!--
+
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|{{#var:ii:damagetype}} weapons}}}}<!--
--></tr><!--
+
-->}}<!--
-->}}<!--
+
-->}}<!--
  +
// NOTE: for all non-auto damage type (input by |damagetype=) including pre-1.4 throwing weapons, you should manually add "<damagetype> weapons" (e.g. "throwing weapons") to their listcats, because we've already added the auto damagetype to types (in consequence, listcats)
-->{{#if:{{{knockback|}}}|<!--
 
  +
// manually override:
--><tr><!--
 
  +
-->{{#vardefine:ii:damagetype|<!--
--><th>[[Knockback]]</th><!--
 
  +
-->{{#if:{{{damagetype|}}}|<!--
--><td>{{#if:{{#dplreplace:{{{knockback|}}}|/^\s*\d+(\.\d+)?\s*$/|}}|{{{knockback|}}}|{{kb|{{{knockback|}}}}}}}<!-- if input is pure number, wrap it with {{kb}}, or leave it as is. --></td><!--
 
  +
-->{{#rreplace:{{{damagetype|}}}|@@@@|{{l10n|item_infobox|damagetype:{{lc:{{#var:ii:damagetype}}}}}}}}<!--
--></tr><!--
 
  +
-->|<!--
  +
-->{{#var:ii:damagetype}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- research ----
  +
-->{{#vardefine:ii:sacrifices|{{#ifexpr:0{{#dplvar:ii:info:sacrifices}}>0|{{#dplvar:ii:info:sacrifices}}}}}}<!--
  +
-->{{#if:{{{research|}}}|<!--
  +
-->{{#vardefine:ii:sacrifices|{{#rreplace:{{{research|}}}|@@@@|{{#var:ii:sacrifices}}}}}}<!--
  +
-->}}<!--
  +
  +
--------
  +
  +
---- knockback ----
  +
// use kb if autokb>0, always use kb for all axe/hammer/pick tools, always use kb for all weapons
  +
-->{{#vardefine:ii:knockback|<!--
  +
-->{{#ifexpr:(0{{#dplvar:ii:info:knockBack}}>0) or 0{{#dplvar:ii:info:axe}} or 0{{#dplvar:ii:info:hammer}} or 0{{#dplvar:ii:info:pick}} or 0{{#lstind:weapon|{{#var:ii:types}}|/}}|{{#dplvar:ii:info:knockBack}}}}<!--
  +
-->}}<!--
  +
-->{{#ifeq:{{{knockback|-unset}}}|{{{knockback|unset-}}}|<!-- allow "|knockback=" to suppress knockback display
  +
-->{{#vardefine:ii:knockback|{{#rreplace:{{{knockback|}}}|@@@@|{{knockback|{{#var:ii:knockback}}|full=y}}}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- defense ----
  +
-->{{#vardefine:ii:defense|{{#ifexpr:0{{#dplvar:ii:info:defense}}>0|<!--
  +
-->{{#dplvar:ii:info:defense}}<!--
  +
-->|<!--
  +
-->{{#if:{{#var:ii:isArmorSet}}|{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}||<!-- auto defense for non-vanity armor sets
  +
-->{{#ifexpr:{{#explode:{{#explode:{{getSetInfo|{{#var:ii:name}}|defense|raw=y}}|₪}}|¤|1}}|{{getSetInfo|{{#var:ii:name}}|defense}}}}<!--
  +
-->}}}}<!--
  +
-->}}}}<!--
  +
-->{{#if:{{{defense|}}}|<!--
  +
-->{{#vardefine:ii:defense|{{#rreplace:{{{defense|}}}|@@@@|{{#var:ii:defense|0}}}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- tile (range) boost ----
  +
-->{{#vardefine:ii:tileboost|{{{tileboost|{{#ifexpr:{{#dplvar:ii:info:tileBoost}}|{{#dplvar:ii:info:tileBoost}}}}}}}}}<!--
  +
--------
  +
  +
---- mana cost and mana and health heal ----
  +
-->{{#vardefine:ii:mana|{{#ifexpr:0{{#dplvar:ii:info:mana}}>0|{{#dplvar:ii:info:mana}}}}}}<!--
  +
-->{{#if:{{{mana|}}}|<!--
  +
-->{{#vardefine:ii:mana|{{#rreplace:{{{mana|}}}|@@@@|{{#var:ii:mana}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:mheal|{{#ifexpr:0{{#dplvar:ii:info:healMana}}>0|{{#dplvar:ii:info:healMana}}}}}}<!--
  +
-->{{#if:{{{mheal|}}}|<!--
  +
-->{{#vardefine:ii:mheal|{{#rreplace:{{{mheal|}}}|@@@@|{{#var:ii:healMana}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:hheal|{{#ifexpr:0{{#dplvar:ii:info:healLife}}>0|{{#dplvar:ii:info:healLife}}}}}}<!--
  +
-->{{#if:{{{hheal|}}}|<!--
  +
-->{{#vardefine:ii:hheal|{{#rreplace:{{{hheal|}}}|@@@@|{{#var:ii:healLife}}}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- critical strike chance ----
  +
-->{{#vardefine:ii:critical|<!--
  +
-->{{#if:{{#var:ii:damage}}|<!-- if $damage
  +
-->{{#ifexpr:0{{#dplvar:ii:info:crit}}>0|<!-- if auto critical
  +
-->{{#expr:{{#dplvar:ii:info:crit}}+4}}<!-- use autocrit+4
  +
-->|<!--
  +
-->{{#if:{{#lstfltr:weapon/tool/accessory|/|{{#var:ii:types}}|/}}|<!-- $type=(weapon, tool or accessory)
  +
if $damagetype and ("summon" not in $damagetype) then 4
  +
-->{{#if:{{#var:ii:damagetype}}|{{#if:{{#rmatch:{{#var:ii:damagetype}}|/summon/i|y}}||4}}}}<!--
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{{defense|}}}|<!--
+
-->}}<!--
--><tr><!--
+
-->}}<!--
--><th>Defense</th><!--
+
-->}}<!--
--><td>{{{defense|}}}</td><!--
+
-->{{#if:{{{critical|}}}|<!--
  +
-->{{#vardefine:ii:critical|{{#rreplace:{{{critical|}}}|@@@@|{{#var:ii:critical}}%}}}}<!--
--></tr><!--
 
-->}}<!--
+
-->}}<!--
  +
--------
-->{{#if:{{{bonus|}}}|<!--
 
  +
--><tr><!--
 
  +
---- use time and tool speed ----
--><th>Bonus</th><!--
 
  +
-->{{#vardefine:ii:use|{{#ifexpr:0{{#dplvar:ii:info:useAnimation}}<100|{{#dplvar:ii:info:useAnimation}}}}}}<!--
--><td>{{{bonus|}}}</td><!--
 
  +
-->{{#ifeq:{{{use|-unset}}}|{{{use|unset-}}}|<!-- allow "|use=" to suppress use time display
--></tr><!--
 
  +
-->{{#vardefine:ii:use|{{#rreplace:{{{use|}}}|@@@@|{{use time|{{#var:ii:use}}|full=y}}}}}}<!--
-->}}<!--
 
-->{{#if:{{{setbonus|}}}|<!--
+
-->}}<!--
  +
-->{{#vardefine:ii:toolspeed|<!--
--><tr><!--
 
  +
-->{{#ifexpr:(0{{#dplvar:ii:info:useAnimation}}<100) and (0{{#dplvar:ii:info:useTime}}<100) and 0{{#dplvar:ii:info:axe}}{{#dplvar:ii:info:hammer}}{{#dplvar:ii:info:pick}}|<!--
--><th>Set Bonus</th><!--
 
--><td>{{{setbonus|}}}</td><!--
+
-->{{#dplvar:ii:info:useTime}}<!--
--></tr><!--
+
-->}}<!--
-->}}<!--
+
-->}}<!--
-->{{#if:{{{placeable|}}}|<!--
+
-->{{#if:{{{toolspeed|}}}|<!--
  +
-->{{#vardefine:ii:toolspeed|{{#rreplace:{{{toolspeed|}}}|@@@@|{{#var:ii:toolspeed}}}}}}<!--
--><tr><!--
 
  +
-->}}<!--
--><th>[[Placement|Colocável]]</th><!--
 
  +
--------
--><td>{{#switch:{{lc:{{{placeable|}}}}}|yes={{yes}}|no={{no}}|#default={{{placeable|}}}}}</td><!--
 
  +
--></tr><!--
 
  +
---- buffs and debuffs ----
-->}}<!--
 
-->{{#if:{{{width|}}}{{{height|}}}|<!--
+
-->{{#vardefine:ii:buffs|}}<!--
  +
-->{{#vardefine:ii:debuffs|}}<!--
--><tr><!--
 
  +
-->{{#vardefine:ii:buff-1:id|}}<!--
--><th>Dimensions</th><!--
 
  +
-->{{#vardefine:ii:buff-1:duration|}}<!--
--><td>{{#if:{{{width|}}}|{{{width}}} wide}}{{#switch: |{{{width|}}}|{{{height|}}}=|&nbsp;×&nbsp;}}{{#if:{{{height|}}}|{{{height}}} high}}</td><!--
 
  +
-->{{#vardefine:ii:debuff-1:id|}}<!--
--></tr><!--
 
  +
-->{{#vardefine:ii:debuff-1:duration|}}<!--
-->}}<!--
 
  +
// auto buff info:
-->{{#if:{{{mana|}}}|<!--
 
  +
-->{{#vardefine:ii:autobuff:id|{{#ifexpr:0{{#dplvar:ii:info:buffType}}>0|<!--
--><tr><!--
 
  +
-->{{#dplvar:ii:info:buffType}}<!--
--><th>[[Mana]]</th><!--
 
--><td>{{{mana|}}}</td><!--
+
-->|<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:mountType}}|-1}}>-1|{{buffIdFromName|{{getMountInfo|{{#dplvar:ii:info:mountType}}|name}}}}}}<!--
--></tr><!--
 
-->}}<!--
+
-->}}}}<!--
-->{{#if:{{{mregen|}}}|<!--
+
-->{{#if:{{#var:ii:autobuff:id}}|<!--
  +
-->{{#vardefine:ii:autobuff:type|{{lc:{{getBuffInfo|{{#var:ii:autobuff:id}}|type}}}}}}<!--
--><tr><!--
 
  +
-->{{#vardefine:ii:autobuff:duration|{{#ifexpr:0{{#dplvar:ii:info:buffTime}}>0|{{duration|{{#expr:{{#dplvar:ii:info:buffTime}}/60}}}}}}}}<!-- in seconds (autoduration is in millis)
--><th>[[Mana]] regen</th><!--
 
  +
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}-1:id|{{#var:ii:autobuff:id}}}}<!--
--><td>{{{mregen|}}}</td><!--
 
  +
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}-1:duration|{{#var:ii:autobuff:duration}}}}<!--
--></tr><!--
 
  +
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}s|-1}}<!--
-->}}<!--
 
-->{{#if:{{{mheal|}}}|<!--
+
-->}}<!--
  +
--><tr><!--
 
  +
// loop: {{#var:bufftype}} is "buff" during first iteration and "debuff" during second iteration
--><th>Heals [[Mana]]</th><!--
 
  +
// (buff and debuff handling is identical, only the names are different)
--><td>{{{mheal|}}}</td><!--
 
  +
-->{{#loop:_i|0|2|{{#vardefine:bufftype|{{#ifexpr:{{#var:_i}}|de}}buff}}<!--
--></tr><!--
 
  +
// we have an ii:buffs and an ii:debuffs array ("ii:{{#var:bufftype}}s"), which hold the indices of all $de-/buff parameters
-->}}<!--
 
  +
// the unindexed "|buff=" / "|debuff=" parameters are represented by "-1", which is always the first element of these arrays, if those parameters are set
-->{{#if:{{{lregen|}}}|<!--
 
  +
// the "-1" is therefore also set if there is buff information in the autodata, since that auto information can be overwritten using the unindexed parameter
--><tr><!--
 
  +
-->{{#if:{{{ {{#var:bufftype}}|}}}|{{#vardefine:ii:{{#var:bufftype}}s|-1}}}}<!-- set first array element to -1
--><th>Regeneração de vida</th><!--
 
  +
-->{{#forargs:{{#var:bufftype}}|k|_|{{#if:{{#rmatch:{{#var:k}}|/^\d+$/|y}}|<!-- for all parameters: if parameter name is "{de-/buff}<integer>"
--><td>{{{lregen|}}}</td><!--
 
  +
-->{{#vardefine:ii:{{#var:bufftype}}s|{{#lstapp:{{#var:ii:{{#var:bufftype}}s}}|₪|{{#var:k}}}}}}<!-- then add buff index to de-/buffs array
--></tr><!--
 
-->}}<!--
+
-->}}}}<!--
  +
-->{{#vardefine:ii:{{#var:bufftype}}s|{{#lstsrt:{{#var:ii:{{#var:bufftype}}s}}|₪|₪|numeric}}}}<!-- sort parameter indices
-->{{#if:{{{hheal|}}}|<!--
 
  +
-->{{#loop:i|1|{{#lstcnt:{{#var:ii:{{#var:bufftype}}s}}|₪}}|<!-- iterate over parameter indices
--><tr><!--
 
  +
-->{{#vardefine:j|{{#lstelem:{{#var:ii:{{#var:bufftype}}s}}|₪|{{#var:i}}}}}}<!-- j is the parameter index
--><th>Heals [[Health]]</th><!--
 
  +
-->{{#vardefine:k|{{#ifeq:{{#var:j}}|-1||{{#var:j}}}}}}<!-- k=j, unless j==-1, in which case k=(empty), since we use "${de-/buff}" instead of "${de-/buff}-1"
--><td>{{{hheal|}}}</td><!--
 
  +
-->{{#arraydefine:buffinfo|{{{ {{#var:bufftype}}{{#var:k}}|}}}|/}}<!--
--></tr><!--
 
  +
// we store the information that the view needs in variables with a "ii:<bufftype><parameter index>:<stat>" format
-->}}<!--
 
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:mobile|}}<!--
-->{{#if:{{{critical|{{#if:{{{damage|}}}|{{#switch:{{lc:{{{type|}}}}}|weapon|Ferramenta={{#ifeq:{{lc:{{{damagetype|}}}}}|summon||4%}}}}}}}}}|<!--
 
  +
// buff id
--><tr><!--
 
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:id|{{{id{{#var:bufftype}}{{#var:k}}|{{#or:<!--
--><th>[[Critical hit|Critical chance]]</th><!--
 
  +
-->{{buffIdFromName|{{#arrayindex:buffinfo|0}}}}<!-- buffinfo[0] will always contain the de-/buff name, regardless of whether compact mode was used or not
--><td>{{{critical|4%}}}</td><!--
 
--></tr><!--
+
-->|<!--
  +
-->{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}<!-- falback for autobuff (this var is only already set to something if j==-1)
-->}}<!--
 
-->{{#if:{{{body slot|}}}|<!--
+
-->}}}}}}}<!--
  +
-->{{#if:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|{{#ifeq:{{#sub:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|0|1}}|m|<!-- if is mobile id
--><tr><!--
 
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:id|{{#sub:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|1}}}}<!--
--><th>Body slot</th><!--
 
--><td>{{{body slot|}}}</td><!--
+
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:mobile|m}}<!--
--></tr><!--
+
-->}}}}<!--
  +
// de-/buff name
-->}}<!--
 
-->{{#if:{{{use|}}}|<!--
+
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:name|<!--
  +
-->{{#if:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|<!--
--><tr><!--
 
  +
-->{{getBuffInfo|{{#var:ii:{{#var:bufftype}}{{#var:j}}:mobile}}{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|ename}}<!--
--><th>[[Velocidade de uso]]</th><!--
 
  +
-->|<!--
--><td>{{{use|}}} <small>{{use time|{{{use}}}}}</small></td><!--
 
--></tr><!--
+
-->{{#arrayindex:buffinfo|0}}<!--
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{{velocity|{{{sspeed|}}}}}}|<!--
+
-->}}<!--
  +
// de-/buff duration, chance, tooltip, and link
--><tr><!--
 
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:duration|{{#if:{{#var:k}}|<!-- in seconds
--><th>[[Velocidade]]</th><!--
 
  +
// for ${de/buff}<integer>
--><td>{{{velocity|{{{sspeed|}}}}}}</td><!--
 
  +
-->{{{ {{#var:bufftype}}duration{{#var:k}}|{{#arrayindex:buffinfo|1}}}}}<!--
--></tr><!--
 
  +
-->|<!--
  +
// for ${de-/buff} (potentially overriding auto data)
  +
// $duration -> ${de-/buff}duration -> ${de-/buff} compact mode -> auto data
  +
-->{{#rreplace:<!--
  +
-->{{#ifeq:{{{duration|-unset}}}|{{{duration|unset-}}}|<!-- allow "|duration=" to suppress duration display
  +
-->{{{duration|}}}<!--
  +
-->|{{#ifeq:{{{ {{#var:bufftype}}duration|-unset}}}|{{{ {{#var:bufftype}}duration|unset-}}}|<!-- allow "|{de-/buff}duration=" to suppress duration display
  +
-->{{{ {{#var:bufftype}}duration|}}}<!--
  +
-->|<!--
  +
-->{{#or:{{#arrayindex:buffinfo|1}}|@@@@}}<!--
  +
-->}}}}<!--
  +
-->|/@@@@/|{{#var:ii:{{#var:bufftype}}-1:duration}}}}<!--
  +
-->}}}}<!--
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:chance|{{{ {{#var:bufftype}}chance{{#var:k}}|{{#arrayindex:buffinfo|2}}}}}}}<!--
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:tooltip|{{{ {{#var:bufftype}}tip{{#var:k}}|{{getBuffInfo|{{#var:ii:{{#var:bufftype}}{{#var:j}}:mobile}}{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|tooltip}}}}}}}<!--
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:link|{{{ {{#var:bufftype}}link{{#var:k}}|{{getBuffInfo|{{#var:ii:{{#var:bufftype}}{{#var:j}}:mobile}}{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|page}}}}}}}<!--
  +
-->{{#ifeq:{{#var:ii:{{#var:bufftype}}{{#var:j}}:link}}|{{PAGENAME}}|<!-- if is self link (using PAGENAME instead of BASEPAGENAME/ROOTPAGENAME, to incorporate all languages)
  +
// add "de-/buffs" to listcat
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|{{#var:bufftype}}s}}}}<!--
  +
-->}}<!--
  +
// de-/buff vanity id
  +
-->{{#vardefine:ii:{{#var:bufftype}}{{#var:j}}:idshow|{{{id{{#var:bufftype}}show{{#var:k}}|}}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- rarity ----
  +
-->{{#vardefine:ii:rawrare|{{#dplvar:ii:info:rare}}}}<!--
  +
-->{{#if:{{#dplvar:ii:info:questItem}}|<!-- quest
  +
-->{{#vardefine:ii:rawrare|quest}}<!--
  +
-->|<!--
  +
-->{{#ifeq:{{#dplvar:ii:info:rare}}|-11|{{#vardefine:ii:rawrare|quest}}}}<!--
  +
-->}}<!--
  +
// auto rarity for armor/vanity sets
  +
-->{{#if:{{#var:ii:isArmorSet}}|<!--
  +
-->{{#vardefine:ii:rawrare|{{getSetInfo|{{#var:ii:name}}|rare|raw=y}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:rare|<!--
  +
-->{{#ifeq:{{{rare|-unset}}}|{{{rare|unset-}}}|<!-- allow "|rare=" to suppress rarity display
  +
-->{{#vardefineecho:ii:rawrare|{{#rreplace:{{{rare|}}}|@@@@|{{#if:{{#var:ii:rawrare}}|{{rare|{{#var:ii:rawrare}}}}}}}}}}<!--
  +
-->|<!--
  +
-->{{#if:{{#var:ii:rawrare}}|{{rare|{{#var:ii:rawrare}}}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- buy price and sell value ----
  +
-->{{#vardefine:ii:shopCustomPrice|{{#dplvar:ii:info:shopCustomPrice}}}}<!-- defender medals (dm)
  +
-->{{#vardefine:ii:value|{{{value|{{#ifexpr:0{{#dplvar:ii:info:value}}>0|{{#dplvar:ii:info:value}}}}}}}}}<!--
  +
// sell/buy VALUES
  +
-->{{#vardefine:ii:sell|}}<!--
  +
-->{{#if:{{#var:ii:isArmorSet}}|<!-- auto sell for armor/vanity set
  +
-->{{#vardefine:ii:sell|{{#ifexpr:{{#explode:{{#explode:{{getSetInfo|{{#var:ii:name}}|sell|raw=y}}|₪}}|¤|1}}|{{getSetInfo|{{#var:ii:name}}|sell}}}}}}<!--
  +
-->|<!-- regular, single item
  +
-->{{#if:{{#var:ii:value}}|<!--
  +
-->{{#vardefine:ii:sell|{{#expr:floor({{#expr:{{#var:ii:value}}/5}})}}}}<!-- divide by 5, round down, in cc
  +
-->{{#ifexpr:0{{#var:ii:sell}}<1|{{#vardefine:ii:sell|1}}}}<!-- never less than 1cc
  +
-->{{#vardefine:ii:sell|{{coin|{{#var:ii:sell}}}}}}<!-- convert to coins
  +
-->}}<!--
  +
-->}}<!--
  +
-->{{#ifeq:{{{sell|-unset}}}|{{{sell|unset-}}}|<!-- allow "|sell=" to suppress sell value display
  +
-->{{#vardefine:ii:sell|{{#rreplace:{{{sell|}}}|@@@@|{{#var:ii:sell}}}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:buy|<!--
  +
-->{{#if:{{#var:ii:shopCustomPrice}}|<!--
  +
-->{{dm|{{#var:ii:shopCustomPrice}}}}<!--
  +
-->|<!--
  +
//use buy if $buy or "buy"/"buyable"/"vendor" in tags
  +
-->{{#vardefine:ii:buy|{{#if:{{{buy|}}}{{#lstfltr:buy/buyable/vendor|/|{{#var:ii:tags}}|/|}}|<!--
  +
-->{{#ifexpr:{{#var:ii:value|0}}>0|<!--
  +
-->{{coin|{{#var:ii:value}}}}<!--
  +
-->|<!-- auto buy for armor/vanity set
  +
-->{{#if:{{#var:ii:isArmorSet}}|<!--
  +
-->{{#ifexpr:{{#replace:{{#explode:{{#explode:{{getSetInfo|{{#var:ii:name}}|buy|raw=y}}|₪}}|¤|1}}|_dm_|}}|<!--
  +
-->{{getSetInfo|{{#var:ii:name}}|buy}}<!--
  +
-->}}<!--
  +
-->}}<!--
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{{toolspeed|}}}|<!--
+
-->}}}}<!--
  +
-->{{#if:{{#if:{{{buy|}}}|{{#switch:{{lc:{{{buy|}}}}}|y|yes|true|show=|#default=y}}}}|<!-- if $buy != ("y" or "yes" or "true" or "show")
--><tr><!--
 
  +
-->{{#rreplace:{{{buy|}}}|@@@@|{{#var:ii:buy}}}}<!--
--><th>[[Velocidade de mineração|Vel. de Mineração]]</th><!--
 
--><td>{{{toolspeed|}}}</td><!--
+
-->|<!--
--></tr><!--
+
-->{{#var:ii:buy}}<!--
-->}}<!--
+
-->}}<!--
-->{{#if:{{{tool|}}}|<!--
+
-->}}<!--
--><tr><!--
+
-->}}<!--
  +
--------
--><th>Ferramenta</th><!--
 
  +
--><td>{{{tool|}}}</td><!--
 
--></tr><!--
+
---- ids ----
  +
-->{{#vardefine:ii:idtile|{{{idtile|<!--
-->}}<!--
 
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:createTile}}|-1}}>-1|{{#dplvar:ii:info:createTile}}}}<!--
-->{{#if:{{{tooltip|}}}|<!--
 
--><tr><!--
+
-->}}}}}<!--
  +
-->{{#vardefine:ii:idtilesub|{{#if:{{{idtile|}}}||{{{idtilesub|<!--
--><th>[[Tooltips|Tooltip]]</th><!--
 
  +
-->{{#ifexpr:({{#or:{{#dplvar:ii:info:createTile}}|-1}}>-1) and (0{{#dplvar:ii:info:placeStyle}}>0)|{{#expr:{{#dplvar:ii:info:placeStyle}}+1}}}}<!--
--><td><i>{{{tooltip|}}}</i></td><!-- Using apostrophes here can cause some tooltips to be bolded
 
--></tr><!--
+
-->}}}}}}}<!--
  +
-->{{#vardefine:ii:idwall|{{{idwall|<!--
-->}}<!--
 
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:createWall}}|-1}}>-1|<!-- item is a wall as defined by auto info
-->{{#if:{{{buff|}}}|<!--
 
-->{{#vardefine:_bufftxt|{{#explode:{{{buff}}}|(buff)|0}}}}<!--
+
-->{{#dplvar:ii:info:createWall}}<!--
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|wall}}}}<!-- add "wall" to types
--><tr class="buff"><!--
 
  +
-->}}<!--
--><th>Grants [[Buff]]</th><!--
 
--><td><b>{{#ifeq:{{{bufflink|}}}|no|<!--
+
-->}}}}}<!--
-->{{item|{{{buff}}}|{{#var:_bufftxt}}|link=}}<!--
+
-->{{#vardefine:ii:idarmor|}}<!--
  +
-->{{#vardefine:ii:bodyslot|}}<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:headSlot}}|-1}}>-1|<!-- head armor?
  +
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:headSlot}}}}<!--
  +
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!--
  +
-->{{#vardefine:ii:bodyslot|social helmet}}<!-- vanity body slot
  +
-->|<!--
  +
-->{{#vardefine:ii:bodyslot|helmet}}<!-- armor body slot
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|armor}}}}<!-- add "armor" to types
  +
-->}}<!--
  +
-->}}<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:bodySlot}}|-1}}>-1|<!-- body armor?
  +
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:bodySlot}}}}<!--
  +
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!--
  +
-->{{#vardefine:ii:bodyslot|social shirt}}<!--
  +
-->|<!--
  +
-->{{#vardefine:ii:bodyslot|shirt}}<!--
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|armor}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:legSlot}}|-1}}>-1|<!-- legs armor?
  +
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:legSlot}}}}<!--
  +
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!--
  +
-->{{#vardefine:ii:bodyslot|social pants}}<!--
  +
-->|<!--
  +
-->{{#vardefine:ii:bodyslot|pants}}<!--
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|armor}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:idarmor|{{{idarmor|{{#var:ii:idarmor}}}}}}}<!--
  +
-->{{#vardefine:ii:bodyslot|{{{body slot|{{#var:ii:bodyslot}}}}}}}<!--
  +
-->{{#vardefine:ii:idmount|{{{idmount|<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:mountType}}|-1}}>-1|<!-- item is a mount summon as defined by auto info
  +
-->{{#dplvar:ii:info:mountType}}<!--
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|mount summon}}}}<!-- add "mount summon" to type
  +
-->}}<!--
  +
-->}}}}}<!--
  +
-->{{#vardefine:ii:idbuff|<!--
  +
-->{{#lstmap:{{#var:ii:buffs}}|₪|@@@@|<esc><!--
  +
-->{{#var:ii:buff@@@@:mobile}}₰{{#var:ii:buff@@@@:id}}₰{{#var:ii:buff@@@@:idshow}}<!--
  +
--></esc>|₪}}<!--
  +
-->{{#listmap:intro=₪|list={{#var:ii:debuffs}}|insep=₪|token=@@@@|pattern=<esc><!--
  +
-->{{#var:ii:debuff@@@@:mobile}}₰{{#var:ii:debuff@@@@:id}}₰{{#var:ii:debuff@@@@:idshow}}<!--
  +
--></esc>|outsep=₪}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:idprojectile|{{{idprojectile|{{{shoot|{{#if:{{#var:ii:useammo}}||<!-- don't show default projectile id for items which use ammo.
  +
-->{{#ifexpr:0{{#dplvar:ii:info:shoot}}>0|{{#dplvar:ii:info:shoot}}}}<!--
  +
-->}}}}}}}}}}<!--
  +
--------
  +
  +
---- velocity ----
  +
// velocity & extraUpdate fix
  +
-->{{#vardefine:ii:velocity|<!--
  +
-->{{#ifexpr:0{{#dplvar:ii:info:shootSpeed}}>0|{{#dplvar:ii:info:shootSpeed}}}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:rawVelocity|{{#var:ii:velocity}}}}<!--
  +
-->{{#vardefine:ii:velocityMultiplier|}}<!--
  +
-->{{#if:{{#var:ii:idprojectile}}|{{#if:{{#var:ii:rawVelocity}}|<!--
  +
-->{{#vardefine:ii:extraUpdates|0{{getProjectileInfo|{{#explode:{{#var:ii:idprojectile}}|,|0}}|extraUpdates}}}}<!-- extra updates of first projectile in list
  +
-->{{#ifexpr:0{{#var:ii:extraUpdates}}>0|<!--
  +
-->{{#if:{{#lstind:ammunition|{{#var:ii:types}}|/}}|<!-- ammo items
  +
-->{{#vardefine:ii:velocityMultiplier|{{#expr:{{#var:ii:extraUpdates}}+1}}}}<!--
  +
-->|<!-- other items
  +
-->{{#vardefine:ii:velocity|{{#expr:{{#var:ii:velocity}}*({{#var:ii:extraUpdates}}+1)}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
-->}}}}<!--
  +
-->{{#ifeq:{{{velocity|{{{sspeed|-unset}}}}}}|{{{velocity|{{{sspeed|unset-}}}}}}|<!-- allow "|velocity=" to suppress velocity display
  +
-->{{#vardefine:ii:velocity|{{#rreplace:{{{velocity|{{{sspeed|}}}}}}|@@@@|{{#var:ii:velocity}}}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- tooltip ----
  +
-->{{#vardefine:ii:tooltip|{{itemTooltip|{{#var:ii:auto_id}}|right={{l10n|item_infobox|rightclick}}}}}}<!--
  +
-->{{#ifeq:{{{tooltip|-unset}}}|{{{tooltip|unset-}}}|<!-- allow "|tooltip=" to suppress tooltip display
  +
-->{{#vardefine:ii:tooltip|{{#rreplace:{{{tooltip|}}}|@@@@|{{#var:ii:tooltip}}}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- consumable and placeable ----
  +
-->{{#vardefine:ii:consumable|{{{consumable|{{#dplvar:ii:info:consumable}}}}}}}<!--
  +
-->{{#vardefine:ii:placeable|{{{placeable|{{#if:{{#var:ii:idtile}}{{#var:ii:idwall}}|y}}}}}}}<!--
  +
-->{{#if:{{#lstfltr:block/brick|/|{{#var:ii:types}}|/}}|<!--
  +
-->{{#vardefine:ii:width|{{{width|1}}}}}{{#vardefine:ii:height|{{{height|1}}}}}<!-- default to 1×1 for blocks
  +
-->|<!--
  +
-->{{#vardefine:ii:width|{{{width|}}}}}{{#vardefine:ii:height|{{{height|}}}}}<!-- don't default to anything for other items
  +
-->}}<!--
  +
--------
  +
  +
---- sounds ----
  +
// sounds array (ii:sounds): "name1:sound1_1.wav,sound1_2.wav;name2:sound2_1.wav,sound2_2.wav; ..."
  +
-->{{#vardefine:ii:sounds|<!--
  +
-->{{#vardefine:_tile_sound_mode|}}<!--
  +
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:createWall}}|-1}}>-1|<!--
  +
-->{{#vardefine:_tile_sound_mode|wall}}<!--
  +
-->}}<!--
  +
  +
// put all usesounds in the first element of the ii:sounds array
  +
-->{{#if:{{{sounduse|{{#dplvar:ii:info:UseSound}}}}}|<!--
  +
-->{{l10n|item_infobox|th:use}}:{{{sounduse|{{#lstmap:{{#dplvar:ii:info:UseSound}}|,|@@|@@.wav|,}}}}};<!--
  +
-->}}<!--
  +
-->{{#if:{{{soundplaced|{{#var:_tile_sound_mode}}}}}|<!--
  +
-->{{l10n|item_infobox|th:placed}}:{{{soundplaced|{{getWallInfo|{{#dplvar:ii:info:createWall}}|soundplaced}}}}};<!--
  +
-->}}<!--
  +
-->{{#if:{{{soundbreak|{{#var:_tile_sound_mode}}}}}|<!--
  +
-->{{l10n|item_infobox|th:broken}}:{{{soundbreak|{{getWallInfo|{{#dplvar:ii:info:createWall}}|soundbreak}}}}};<!--
  +
-->}}<!--
  +
-->}}<!--
  +
-->{{#forargs:sound|k|v|<!--
  +
-->{{#if:{{{soundcaption{{#var:k}}|}}}|<!--
  +
-->{{#vardefine:ii:sounds|{{#lstapp:{{#var:ii:sounds}}|;|<!--
  +
array element: "<caption n>:soundn_1.wav,soundn_2.wav, ..."
  +
-->{{{soundcaption{{#var:k}}|}}}:{{#var:v}}<!--
  +
-->}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- crafting type and listcat ----
  +
-->{{#vardefine:ii:material|{{#dplvar:ii:info:material}}}}<!--
  +
-->{{#vardefine:ii:craftable|{{#dplvar:ii:info:craftable}}}}<!--
  +
// crafting cate/type
  +
-->{{#if:{{#var:ii:name}}|<!--
  +
// is crafting material?
  +
-->{{#if:{{#var:ii:material}}|<!--
  +
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|crafting material}}}}<!-- add "crafting material" to types
  +
-->}}<!--
  +
// is craftable?
  +
-->{{#if:{{#var:ii:craftable}}|<!--
  +
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|craftable items}}}}<!-- add "craftable items" to listcat
  +
-->}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- dd2 sentry weapon ----
  +
-->{{#vardefine:ii:DD2Summon|<!--
  +
-->{{#if:{{#lstind:dd2|{{#var:ii:tags}}|/}}|1|{{#dplvar:ii:info:DD2Summon}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
  +
+++++++++++++ 4. Process additional parameter input, unrelated to auto data +++++++++++++
  +
  +
---- bonus and set bonus ----
  +
-->{{#vardefine:ii:bonus|{{{bonus|}}}}}<!--
  +
-->{{#vardefine:ii:setbonus|{{#if:{{#var:ii:isArmorSet}}|{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}||<!-- for armor sets:
  +
-->{{getSetInfo|{{#var:ii:name}}|setbonuslist|sep=<br/>}}<!-- auto setbonus
  +
-->}}}}}}<!--
  +
-->{{#ifeq:{{{setbonus|-unset}}}|{{{setbonus|unset-}}}|<!-- allow "|setbonus=" to suppress set bonu display
  +
-->{{#vardefine:ii:setbonus|{{#rreplace:{{{setbonus|}}}|@@@@|{{#var:ii:setbonus}}}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- hardmode and allversions ----
  +
-->{{#vardefine:ii:hardmodeonly|{{{hardmode|{{#if:{{#lstfltr:hardmodeonly/hardmode|/|{{#var:ii:tags}}|/}}|y}}}}}}}<!--
  +
-->{{#vardefine:ii:allversions|{{#switch:{{lc:{{{allversions|}}}}}<!-- allversions?
  +
-->|y|yes|true=y<!--
  +
-->|n|no|false=<!--
  +
-->|#default=<!-- auto detect
  +
-->{{#if:{{#lstind:allversions|{{#var:ii:tags}}|/}}|y<!-- "allversions" in tags, or:
  +
-->|{{#if:{{#var:ii:id}}|{{#if:{{eversions|{{#var:ii:name}}|raw=y}}|<!--not all versions-->|y}}}}}}<!-- id and eversions
  +
-->}}}}<!--
  +
--------
  +
  +
---- images ----
  +
-->{{#vardefine:ii:imagealt|}}<!-- full image code for image area
  +
-->{{#vardefine:ii:imagefile|}}<!-- main image file
  +
-->{{#vardefine:ii:image|}}<!-- main image name
  +
-->{{#vardefine:ii:imageold|}}<!-- old image
  +
-->{{#vardefine:ii:imagefemale|}}<!--
  +
-->{{#vardefine:ii:imageplaced|}}<!--
  +
-->{{#vardefine:ii:imageequipped|}}<!--
  +
-->{{#vardefine:ii:imageext|}}<!-- custom extra images. full image code.
  +
// images: There are some expensive calls in image auto detection, so run detection based on view mode.
  +
-->{{#vardefine:ii:imagealt|{{{imagealt|}}}}}<!-- custom full image code.
  +
-->{{#if:{{#var:ii:imagealt}}||<!--
  +
-->{{#ifeq:{{#var:imagemode}}|full|<!-- full mode
  +
// female image check first (used in equipped image)
  +
-->{{#vardefine:ii:imagefemale|<!--
  +
-->{{#if:{{{imagefemale|}}}|<!--
  +
-->[[File:{{{imagefemale|}}}|{{l10n|item_infobox|imagealt:female|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->|<!--
  +
-->{{image|{{#var:ii:name}} female.{{{ext|png}}}|{{l10n|item_infobox|imagealt:female|$name$={{#var:ii:lname}}}}|link=}}<!-- check ext as main image
  +
-->}}<!--
  +
-->}}<!--
  +
-->{{#vardefine:ii:imagefemale|{{#var:ii:imagefemale|<!-- second try to fetch female image (armor/vanity sets are named "<name> female.png"; regular items are named "<name> (equipped) female.png")
  +
-->{{image|{{#var:ii:name}} (equipped) female.{{{ext|png}}}|{{l10n|item_infobox|imagealt:female|$name$={{#var:ii:lname}}}}|link=}}<!-- check ext as main image
  +
-->}}}}<!--
  +
-->{{#vardefine:_male_image_suffix|{{#if:{{#var:ii:imagefemale}}|y|}}}}<!--
  +
// main image
  +
-->{{#vardefine:ii:image|<!--
  +
-->{{#vardefine:alttext|<!--
  +
-->{{#if:{{#var:ii:isArmorSet}}|<!--
  +
-->{{#if:{{#var:ii:imagefemale}}|<!-- if there is a female image, the main (male) image needs a suffix
  +
-->{{l10n|item_infobox|imagealt:equipped_suffixed|$name$={{#var:ii:lname}}}}<!--
 
-->|<!--
 
-->|<!--
-->{{ifexists|{{{buff}}}|<!--
+
-->{{l10n|item_infobox|imagealt:equipped|$name$={{#var:ii:lname}}}}<!--
-->{{item|{{{buff}}}|{{#var:_bufftxt}}}}<!--
 
-->|<!--
 
-->{{item|{{{buff}}}|{{#var:_bufftxt}}|link=}}<!--
 
-->}}<!--
 
-->}}</b></td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{duration|}}}|<!--
 
--><tr class="buff"><!--
 
--><th>Buff duration</th><!--
 
--><td>{{{duration|}}}</td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{bufftip|}}}|<!--
 
--><tr class="buff"><!--
 
--><th>Buff tooltip</th><!--
 
--><td>''{{{bufftip|}}}''</td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{debuff|}}}|<!--
 
--><tr class="buff"><!--
 
--><th>Inflicts [[Debuff]]</th><!--
 
--><td><b>{{#ifeq:{{{debufflink|}}}|no|<!--
 
-->{{item|{{{debuff}}}|link=}}<!--
 
-->|<!--
 
-->{{ifexists|{{{debuff|}}}|<!--
 
-->{{item|{{{debuff}}}}}<!--
 
-->|<!--
 
-->{{item|{{{debuff}}}|link=}}<!--
 
-->}}<!--
 
-->}}</b></td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{debuffduration|}}}|<!--
 
--><tr class="buff"><!--
 
--><th>Debuff duration</th><!--
 
--><td>{{{debuffduration|}}}</td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{debufftip|}}}|<!--
 
--><tr class="buff"><!--
 
--><th>Debuff tooltip</th><!--
 
--><td>''{{{debufftip|}}}''</td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{stack|}}}|{{#iferror:{{#expr:{{{stack|}}}>0}}|<!--
 
--><tr><!--
 
--><th>Max stack</th><!--
 
--><td>{{{stack|}}}</td><!--
 
--></tr><!--
 
-->|}}}}<!--
 
-->{{#if:{{{rare|}}}|<!--
 
--><tr><!--
 
--><th>[[Raridade]]</th><!--
 
--><td>{{rare|{{{rare|}}}|category}}</td><!--
 
--></tr><!--
 
-->}}<!--
 
-->{{#if:{{{buy|}}}{{{sell|}}}|<!--
 
-->{{#dplvar:set|_sep|{{#switch:|{{{buy|}}}|{{{sell|}}}=|{{#pos:{{{buy|}}}{{{sell|}}}|//}}}}}}<!--
 
-->{{#if:{{#dplvar:_sep}}|<!-- 2 lines ?
 
-->{{#dplvar:set<!-- f
 
-->|_buy|{{#dplreplace:{{{buy|}}}|/\/\//|}}<!--
 
-->|_sell|{{#dplreplace:{{{sell|}}}|/\/\//|}}<!--
 
 
-->}}<!--
 
-->}}<!--
--><tr><!--
 
--><th>[[Valor|Comprar]]</th><!--
 
--><td>{{#dplvar:_buy}}</td><!--
 
--></tr><!--
 
--><tr><!--
 
--><th>[[Valor|Vender]]</th><!--
 
--><td>{{#dplvar:_sell}}</td><!--
 
--></tr><!--
 
 
-->|<!--
 
-->|<!--
  +
-->{{l10n|item_infobox|imagealt:default|$name$={{#var:ii:lname}}}}<!--
--><tr><!--
 
--><th>[[Valor|{{#if:{{{buy|}}}|Comprar}}{{#switch:|{{{buy|}}}|{{{sell|}}}=|&nbsp;/&nbsp;}}{{#if:{{{sell|}}}|Vender}}]]</th><!--
 
--><td>{{{buy|}}}{{#switch:|{{{buy|}}}|{{{sell|}}}=|&nbsp;/&nbsp;}}{{{sell|}}}</td><!--
 
--></tr><!--
 
 
-->}}<!--
 
-->}}<!--
 
-->}}<!--
 
-->}}<!--
--></table><!--
+
-->{{#if:{{{image|}}}|<!--
  +
-->{{#vardefine:ii:imagefile|{{{image|}}}}}<!--
--></div><!-- div.section.statistics
 
-->{{#if:{{{id|}}}{{{shoot|}}}{{{idbuff|}}}{{{idtile|}}}{{{idwall|}}}{{{idmount|}}}|<!--
+
-->[[File:{{{image|}}}|{{#var:alttext}}|link=]]<!--
--><div class="section ids"><ul><!--
+
-->|<!--
  +
-->{{#vardefine:ii:imagefile|{{#rreplace:{{#var:ii:name}}|/:\s*/|_}}.{{{ext|png}}}}}<!-- replace ":" and ": " in filename with "_"
-->{{#if:{{{id|}}}|<!--
 
--><li>Internal [[Item IDs|Item ID]]: '''{{{id}}}'''</li><!--
+
-->{{#ifeq:{{{imageinfo|}}}|no|<!--
  +
-->[[File:{{#var:ii:imagefile}}|{{#var:alttext}}|link=]]<!--
-->}}<!--
 
-->{{#if:{{{idbuff|}}}|<!--
+
-->|<!--
  +
-->{{image|{{#var:ii:imagefile}}|{{#var:alttext}}|link=}}<!--
--><li>Internal [[Buff IDs|Buff ID]]: '''{{{idbuff}}}'''</li><!--
 
-->}}<!--
+
-->}}<!--
-->{{#if:{{{idtile|}}}|<!--
+
-->}}<!--
  +
-->}}<!--
--><li>Internal [[Tile IDs|Tile ID]]: '''{{{idtile}}}'''</li><!--
 
-->}}<!--
+
-->|<!-- else simple mode
  +
// main image
-->{{#if:{{{idwall|}}}|<!--
 
  +
-->{{#vardefine:ii:image|<!--
--><li>Internal [[Wall IDs|Wall ID]]: '''{{{idwall}}}'''</li><!--
 
-->}}<!--
+
-->{{#if:{{{image|}}}|<!--
-->{{#if:{{{idmount|}}}|<!--
+
-->{{#vardefine:ii:imagefile|{{{image|}}}}}<!--
  +
-->[[File:{{{image|}}}|{{l10n|item_infobox|imagealt:default|$name$={{#var:ii:lname}}}}|link=]]<!--
--><li>Internal [[Mount IDs|Mount ID]]: '''{{{idmount}}}'''</li><!--
 
-->}}<!--
+
-->|<!--
  +
-->{{#vardefine:ii:imagefile|{{#rreplace:{{#var:ii:name}}|/:\s*/|_}}.{{{ext|png}}}}}<!-- replace ":" and ": " in filename with "_"
-->{{#if:{{{shoot|}}}|<!--
 
--><li>Internal [[Projectile IDs|Projectile ID]]: '''{{{shoot}}}'''</li><!--
+
-->{{#ifeq:{{{imageinfo|}}}|no|<!--
  +
-->[[File:{{#var:ii:imagefile}}|{{l10n|item_infobox|imagealt:default|$name$={{#var:ii:lname}}}}|link=]]<!--
-->}}<!--
 
--></ul></div><!-- div.section.ids
+
-->|<!--
  +
-->{{image|{{#var:ii:imagefile}}|{{l10n|item_infobox|imagealt:default|$name$={{#var:ii:lname}}}}|link=}}<!--
-->}}<!--
 
--></div><!--END div.infobox
+
-->}}<!--
-->{{item/options|reset}}<!--
+
-->}}<!--
-->{{eicons/options|reset}}<!--
+
-->}}<!--
  +
-->}}<!--
  +
// fallback if {{image}} failed (red link)
  +
-->{{#if:{{#var:ii:image}}||<!--
  +
-->{{#vardefine:ii:image|[[File:{{#var:ii:name}}.png|{{l10n|item_infobox|imagealt:missing}}|link=]]}}<!--
  +
-->}}<!--
  +
// old, placed, and equipped images: always fetch if using full mode, else only if respective mode is set
  +
// old image
  +
-->{{#if:{{#ifeq:{{#var:imagemode}}|full|y}}{{#pos:{{#var:imagemode}}|old}}|<!--
  +
-->{{#vardefine:ii:imageold|{{{imageoldalt|<!--
  +
-->{{#if:{{{imageold|}}}|<!--
  +
-->[[File:{{{imageold|}}}|{{l10n|item_infobox|imagealt:old|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->|<!--
  +
-->{{#if:{{bool|{{{autoimageold|{{options/get|item infobox|autoimageold}}}}}|y}}|<!--
  +
-->{{image|{{#var:ii:name}} (old)|{{l10n|item_infobox|imagealt:old|$name$={{#var:ii:lname}}}}|link=}}<!-- check .gif, then .png
  +
-->|{{#if:{{#vardefineecho:ii:temp:extold|{{{extold|{{options/get|item infobox|extold}}}}}}}|<!--
  +
-->[[file:{{#var:ii:name}} (old).{{#var:ii:temp:extold}} |{{l10n|item_infobox|imagealt:old|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->}}}}<!--
  +
-->}}<!--
  +
-->}}}}}<!--
  +
-->}}<!--
  +
// placed image (full mode or (voidView and placeable))
  +
-->{{#if:{{#ifeq:{{#var:imagemode}}|full|y}}{{#ifeq:{{#var:viewname}}|void|{{#if:{{#var:ii:placeable}}|y}}}}{{#pos:{{#var:imagemode}}|placed}}|<!--
  +
-->{{#vardefine:ii:imageplaced|{{{imageplacedalt|<!--
  +
-->{{#if:{{{imageplaced|}}}|<!--
  +
-->[[File:{{{imageplaced|}}}|{{l10n|item_infobox|imagealt:placed|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->|<!--
  +
-->{{#if:{{bool|{{{autoimageplaced|{{options/get|item infobox|autoimageplaced}}}}}|y}}|<!--
  +
-->{{image|{{#var:ii:name}} (placed)|{{l10n|item_infobox|imagealt:placed|$name$={{#var:ii:lname}}}}|link=}}<!-- check .gif, then .png
  +
-->|{{#if:{{#vardefineecho:ii:temp:extplaced|{{{extplaced|{{options/get|item infobox|extplaced}}}}}}}|<!--
  +
-->[[file:{{#var:ii:name}} (placed).{{#var:ii:temp:extplaced}} |{{l10n|item_infobox|imagealt:placed|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->}}}}<!--
  +
-->}}<!--
  +
-->}}}}}<!--
  +
-->}}<!--
  +
// equipped image
  +
-->{{#if:{{#ifeq:{{#var:imagemode}}|full|y}}{{#pos:{{#var:imagemode}}|equipped}}|<!--
  +
-->{{#vardefine:ii:imageequipped|{{{imageequippedalt|<!--
  +
-->{{#if:{{{imageequipped|}}}|<!--
  +
-->[[File:{{{imageequipped|}}}|{{l10n|item_infobox|imagealt:equipped|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->|<!--
  +
-->{{#if:{{bool|{{{autoimageequipped|{{options/get|item infobox|autoimageequipped}}}}}|y}}|<!--
  +
-->{{image|{{#var:ii:name}} (equipped)|{{l10n|item_infobox|imagealt:equipped|$name$={{#var:ii:lname}}}}|link=}}<!-- check .gif, then .png
  +
-->|{{#if:{{#vardefineecho:ii:temp:extequipped|{{{extequipped|{{options/get|item infobox|extequipped}}}}}}}|<!--
  +
-->[[file:{{#var:ii:name}} (equipped).{{#var:ii:temp:extequipped}} |{{l10n|item_infobox|imagealt:equipped|$name$={{#var:ii:lname}}}}|link=]]<!--
  +
-->}}}}<!--
  +
-->}}<!--
  +
-->}}}}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
--------
   
-->{{#ifeq:{{NAMESPACE}}|{{ns:0}}|<!--
 
   
  +
+++++++++++++ 5. Categorize and store to cargo +++++++++++++
//cate
 
-->{{#if:{{{type|}}}|[[Category:Todos os {{#ifeq:{{{type}}}|Blocos|blocos|{{{type}}}}}{{#ifeq:{{{type}}}|Grab bag|{{!}}*}}]]{{#ifeq:{{lc:{{{type2|}}}}}|set|[[Category:{{{type}}} sets]]}}}}<!--
 
-->{{#if:{{{type2|}}}|[[Category:Todos os {{{type2}}}]]}}<!--
 
-->{{#if:{{{listcat|}}}|[[Category:{{{listcat}}}]]}}<!--
 
-->{{#if:{{{listcat2|}}}|[[Category:{{{listcat2}}}]]}}<!--
 
-->{{#if:{{{listcat3|}}}|[[Category:{{{listcat3}}}]]}}<!--
 
-->{{#if:{{{listcat4|}}}|[[Category:{{{listcat4}}}]]}}<!--
 
-->{{#if:{{{listcat5|}}}|[[Category:{{{listcat5}}}]]}}<!--
 
-->{{#if:{{{consumable|}}}|[[Category:Itens consumíveis]]}}<!--
 
-->{{#ifeq:{{{hardmode|}}}|yes|[[Category:Itens do modo difícil]]}}<!--
 
-->{{#ifeq:{{{allversions|}}}|yes|{{all versions}}}}<!--
 
   
  +
---- determine validity of categorization ----
//CARGO
 
-->{{#ifeq:{{FULLPAGENAME}}|{{ROOTPAGENAME}}|<!--
+
-->{{#vardefine:cate|}}<!--
-->{{#cargo_store:_table=Items<!--
+
-->{{#switch:{{{cate|}}}<!--
-->|name={{#dplvar:_item_infobox:name}}<!--
+
-->|1|y|yes|true|force={{#vardefine:cate|y}}<!--
  +
-->|0|n|no|false={{#vardefine:cate|}}<!--
-->|image={{{image|[[File:{{#dplvar:_item_infobox:name}}.png|link=]]}}}<!--
 
-->|damage={{{damage|}}}<!--
+
-->|#default={{#ifeq:{{NAMESPACE}}|{{ns:0}}|<!-- only in main ns
-->|damagetype={{{damagetype|}}}<!--
+
-->{{#switch:{{#var:viewname}}<!--
  +
-->|infobox|table={{#vardefine:cate|y}}<!-- only cate for infobox/table view, no cate for void/item view
-->|autoswing={{{auto|}}}<!--
 
-->|pickaxepower={{{pick|}}}<!--
+
-->}}<!--
-->|axepower={{{axe|}}}<!--
+
-->}}<!--
-->|hammerpower={{{hammer|}}}<!--
+
-->}}<!--
  +
--------
-->|baitpower={{{bait|}}}<!--
 
  +
-->|knockback={{{knockback|}}}<!--
 
  +
---- categorize ----
-->|placeable={{{placeable|}}}<!--
 
  +
-->{{#vardefine:ii:types|{{#lstuniq:{{#var:ii:types}}|/|/}}}}<!--
-->|placedwidth={{{width|}}}<!--
 
-->|placedheight={{{height|}}}<!--
+
-->{{#if:{{#var:cate}}|<!--
  +
-->{{#lstmap:{{#var:ii:types}}|/|@@@@|<esc>[[Category:{{#or:{{l10n|item_infobox|typecate:{{lc:@@@@}}}}|{{tr|{{ucfirst:@@@@}} items|link=y}}}}]]</esc>|}}<!--
-->|stack={{{stack|}}}<!--
 
  +
-->{{#lstmap:{{#var:ii:listcats}}|/|@@@@|<esc>[[Category:{{#or:{{l10n|item_infobox|listcat:{{lc:@@@@}}}}|{{tr|{{ucfirst:@@@@}}|link=y}}}}]]</esc>|}}<!--
-->|mana={{{mana|}}}<!--
 
-->|tooltip={{{tooltip|}}}<!--
+
-->{{#if:{{#var:ii:isArmorSet}}|<!--
  +
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|[[Category:{{l10n|item_infobox|cate:vanitysets}}]]}}<!--
-->|consumable={{{consumable|}}}<!--
 
-->|criticalchance={{{critical|}}}<!--
+
-->{{#if:{{#lstind:armor|{{#var:ii:types}}|/}}|<!--
-->|rare={{{rare|}}}<!--
+
-->[[Category:{{l10n|item_infobox|cate:armorsets}}]]<!--
  +
-->{{#if:{{#var:ii:setbonus}}||[[Category:{{l10n|item_infobox|cate:nosetbonus}}]]}}<!--
-->|usetime={{{use|}}}<!--
 
-->|toolspeed={{{toolspeed|}}}<!--
 
-->|buff={{{buff|}}}<!--
 
-->|buffduration={{{duration|}}}<!--
 
-->|buyvalue={{{buy|}}}<!--
 
-->|sellvalue={{{sell|}}}<!--
 
-->|itemid={{{id|}}}<!--
 
-->|tileid={{{idtile|}}}<!--
 
-->|wallid={{{idwall|}}}<!--
 
-->|hardmode={{{hardmode|}}}<!--
 
-->|type={{{type|}}}<!--
 
 
-->}}<!--
 
-->}}<!--
-->{{#if:{{{buff|}}}{{{debuff|}}}|<!--
+
-->}}<!--
  +
-->{{#if:{{#var:ii:consumable}}|[[Category:{{l10n|item_infobox|cate:consumableitem}}]]}}<!--
-->{{#cargo_store:_table=Buffs<!--
 
  +
-->{{#if:{{#var:ii:buy}}|[[Category:{{l10n|item_infobox|cate:vendoritem}}]]}}<!--
-->|name={{{buff|}}}{{{debuff|}}}<!--
 
  +
-->{{#if:{{#var:ii:hardmodeonly}}|[[Category:{{l10n|item_infobox|cate:hardmodeonlyitem}}]]}}<!--
-->|image=[[File:{{{buff|}}}{{{debuff|}}}.png|link=]]<!--
 
-->|type={{#if:{{{buff|}}}|Buff|Debuff}}<!--
+
-->{{#if:{{#var:ii:autoswing}}|<!--
  +
-->{{#if:{{#lstind:furniture|{{#var:ii:types}}|/}}||<!-- don't categorize placeable weapons as autoswing
-->|bufftip={{{bufftip|}}}{{{debufftip|}}}<!--
 
  +
-->{{#if:{{#lstfltr:weapon/tool|/|{{#var:ii:types}}|/}}|[[Category:{{l10n|item_infobox|cate:autoswingitem}}]]}}<!--
-->|buffid={{{idbuff|}}}<!--
 
-->}}<!--
 
 
-->}}<!--
 
-->}}<!--
  +
-->}}<!--
  +
-->{{#if:{{#var:ii:allversions}}|{{all versions}}}}<!--
  +
-->}}<!--
  +
--------
  +
  +
---- determine validity of cargo storage ----
  +
-->{{#vardefine:cargo|}}<!--
  +
-->{{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{#ifeq:{{PAGENAME}}|{{ROOTPAGENAME}}|{{#vardefine:cargo|y}}}}}}<!-- default: only main ns, only root pages (e.g. no translation subpages)
  +
-->{{#if:{{{cargo|}}}|<!--
  +
-->{{#switch:{{{cargo|}}}<!--
  +
-->|1|y|yes|true|force|on={{#vardefine:cargo|y}}<!-- on
  +
-->|0|n|no|false|off={{#vardefine:cargo|}}<!-- off
  +
-->|#default=<!-- keep it unchanged.
 
-->}}<!--
 
-->}}<!--
//CARGO END
 
 
-->}}<!--
 
-->}}<!--
  +
-->{{#if:{{langList|isOnWiki|{{lang}}}}|{{#vardefine:cargo|}}}}<!-- never store for non-english languages on mainwiki
  +
--------
  +
  +
---- store to cargo ----
  +
-->{{#if:{{#var:cargo}}|<!--
  +
-->{{#cargo_store:_table=Items<!--
  +
-->|itemid={{#var:ii:id}}<!--
  +
-->|name={{#var:ii:name}}<!--
  +
-->|internalname={{#var:ii:internalName}}<!--
  +
-->|image={{#var:ii:imagealt|{{#var:ii:image|{{#var:ii:imageplaced|{{#var:ii:imageequipped}}}}}}}}<!--
  +
-->|imagefile={{#var:ii:imagefile|{{{image|{{#var:ii:name}}.{{{ext|png}}}}}}}}<!--
  +
-->|imageplaced={{#var:ii:imageplaced}}<!--
  +
-->|imageequipped={{#var:ii:imageequipped}}<!--
  +
-->|autoswing={{#var:ii:autoswing}}<!--
  +
-->|stack={{#var:ii:stack}}<!--
  +
-->|type={{#lstsep:{{#var:ii:types}}|/|^}}<!--
  +
-->|listcat={{#lstsep:{{#var:ii:listcats}}|/|^}}<!--
  +
-->|tag={{#lstsep:{{#var:ii:tags}}|/|^}}<!--
  +
-->|buy={{#var:ii:buy}}<!--
  +
-->|consumable={{#var:ii:consumable}}<!--
  +
-->|hardmode={{#var:ii:hardmodeonly}}<!--
  +
-->|damage={{#var:ii:damage}}<!--
  +
-->|damagetype={{#var:ii:damagetype}}<!--
  +
-->|defense={{#var:ii:defense}}<!--
  +
-->|velocity={{#var:ii:velocity}}<!--
  +
-->|knockback={{#var:ii:knockback}}<!--
  +
-->|research={{#var:ii:sacrifices}}<!--
  +
-->|rare={{#var:ii:rawrare}}<!--
  +
-->|sell={{#var:ii:sell}}<!--
  +
-->|axe={{#var:ii:axe}}<!--
  +
-->|pick={{#var:ii:pick}}<!--
  +
-->|hammer={{#var:ii:hammer}}<!--
  +
-->|bait={{#ifexpr:{{#var:ii:bait}}|{{#var:ii:bait}}}}<!--
  +
-->|fishing={{#iferror:{{#ifexpr:{{#var:ii:fishing}}|{{#var:ii:fishing}}}}|{{#var:ii:fishing}}}}<!--
  +
-->|bonus={{#var:ii:tileboost}}<!--
  +
-->|toolspeed={{#var:ii:toolspeed}}<!--
  +
-->|usetime={{#var:ii:use}}<!--
  +
-->|unobtainable={{#if:{{#lstind:unobtainable items|{{#var:ii:listcats}}|/}}|y}}<!--
  +
-->|autoswing={{#var:ii:autoswing}}<!--
  +
-->|critical={{#var:ii:critical}}<!--
  +
-->|tooltip={{#var:ii:tooltip}}<!--
  +
-->|placeable={{#var:ii:placeable}}<!--
  +
-->|placedwidth={{#var:ii:width}}<!--
  +
-->|placedheight={{#var:ii:height}}<!--
  +
-->|mana={{#var:ii:mana}}<!--
  +
-->|hheal={{#var:ii:hheal}}<!--
  +
-->|mheal={{#var:ii:mheal}}<!--
  +
-->|bodyslot={{#var:ii:bodyslot}}<!--
  +
-->|toolspeed={{#var:ii:toolspeed}}<!--
  +
-->|buffs={{#lstmap:{{#var:ii:buffs}}|₪|@|{\{#var:ii:buff@:name}\}|^}}<!--
  +
-->|debuffs={{#lstmap:{{#var:ii:debuffs}}|₪|@|{\{#var:ii:debuff@:name}\}|^}}<!--
  +
-->}}<!--
  +
-->}}<!--
  +
  +
  +
  +
==========================================================================================================================
  +
============================================= DATA VIEW ==============================================
  +
==========================================================================================================================
  +
  +
  +
// select view based on viewname, e.g. "|mode=table" means {{item infobox/tableView}}, default is {{item infobox/infoboxView}}
  +
-->{{item infobox/{{#var:viewname}}View}}<!--
  +
 
--></includeonly><!--
 
--></includeonly><!--
   
Linha 380: Linha 926:
   
 
-->{{#cargo_declare:_table=Items
 
-->{{#cargo_declare:_table=Items
  +
| itemid = Integer
|name=Page
 
  +
| name = String
|image=Wikitext (size=1500)
 
  +
| internalname = String
|damage=Wikitext (size=1000)
 
  +
| image = Wikitext
|damagetype=String
 
  +
| imagefile = String
|autoswing=Boolean
 
  +
| imageplaced = Wikitext
|pickaxepower=Integer
 
  +
| imageequipped = Wikitext
|axepower=Integer
 
  +
| autoswing = Boolean
|hammerpower=Integer
 
  +
| stack = Wikitext (size=500)
|baitpower=Integer
 
  +
| consumable = Boolean
|knockback=Float
 
|placeable=Boolean
+
| hardmode = Boolean
  +
| type = List (^) of String
|placedwidth=Integer
 
  +
| listcat = List (^) of String
|placedheight=Integer
 
  +
| tag = List (^) of String
|stack=Integer
 
  +
| damage = Wikitext
|mana=Integer
 
  +
| damagetype = String
|tooltip=Wikitext (size=1000)
 
  +
| defense = Wikitext (size=1000)
|consumable=Boolean
 
  +
| velocity = Wikitext
|criticalchance=Wikitext (size=1000)
 
  +
| knockback = Wikitext
|rare=String (size=7)
 
  +
| research = Wikitext (size=1000)
|usetime=Integer
 
  +
| rare = Wikitext
|toolspeed=Integer
 
|buff=Wikitext
+
| buy = Wikitext
  +
| sell = Wikitext
|buffduration=Wikitext (size=1000)
 
|buyvalue=Wikitext (size=1000)
+
| axe = Wikitext (size=1000)
|sellvalue=Wikitext (size=1000)
+
| pick = Wikitext (size=1000)
  +
| hammer = Wikitext (size=1000)
|itemid=Integer
 
  +
| fishing = Wikitext (size=1000)
|tileid=Integer
 
|wallid=Integer
+
| bait = Integer
  +
| bonus = Wikitext
|hardmode=Boolean
 
  +
| toolspeed = Wikitext
|type=String
 
  +
| usetime = Wikitext
  +
| unobtainable = Boolean
  +
| autoswing = Boolean
  +
| critical = Wikitext (size=1000)
  +
| tooltip = Wikitext
  +
| placeable = Boolean
  +
| placedwidth = Integer
  +
| placedheight = Integer
  +
| mana = Wikitext
  +
| hheal = Wikitext
  +
| mheal = Wikitext
  +
| bodyslot = String
  +
| buffs = List (^) of String
  +
| debuffs = List (^) of String
 
}}<!--
 
}}<!--
   
  +
-->{{i18n-ready}}{{lua|Iteminfo}}{{doc}}
-->{{#cargo_attach:_table=Buffs}}<!--
 
  +
[[Category:Item infobox| ]]
 
  +
{{language info|en=Template:Item infobox}}
-->{{doc}}<!--
 
  +
</noinclude>
 
--></noinclude>
 

Edição atual desde as 23h21min de 13 de março de 2022

Esta predefinição define a tabela "Items". Ver tabela.

Essa predefinição é pronta para i18n, o que significa que ela é simples de localizar para línguas diferentes. Veja I18n & l10n para Predefinições para entender melhor.
Veja Predefinição:Item infobox/l10n para a localização dessa predefinição.
Esta predefinição utiliza Lua.
Esta predefinição utiliza Módulo:Iteminfo, um script escrito na linguagem de programação Lua. Para aprender mais sobre Lua, veja Terraria Wiki:Lua (en).
Template-info Documentação A documentação que segue é transcluída de Predefinição:Item infobox/doc. (editar | histórico)

Essa predefinição é usada para exibir uma infobox para um item. É uma das mais importantes e mais poderosas predefinições de infobox.

Uso

Apesar de que a predefinição seja extremamente versátil, sua funcionalidade primária é exibir a infobox padrão.

Os dados que serão exibidos podem ser manualmente colocados quando chamando a predefinição, mas graças à {{iteminfo}}, a grande maioria dos dados é gerado automáticamente. Para ativar dados automáticos, use o parâmetro auto e defina-o para o ID do item (alternativamente:auto=yes e ou id=<item ID>, name=<item name>, ou nada, os dois últimos métodos farão que a predefinição automáticamente gere o ID usando {{itemNameFromId}}, sendo que o último método usa o título da página como referência para o nome). Dessa maneira, todos os parâmetros relevantes de um item serão definidos automáticamente. Veja a tabela abaixo para os parâmetros afetados. Contudo, eles ainda podem ser substituídos e parâmetros colocados manualmente sempre terão precedência sobre os automáticos.

Parâmetros básicos

Notes:
  • O cifrão ($) é usado para significar que a palavra depois dele é o nome de um parâmetro de predefinição.
  • Todos os parâmetros os quais têm um valor padrão listados podem normalmente serem omitidos. Mantenha em mente que isso não significa que os parâmetros que não tenham um valor padrão listado devem sempre serem preenchidos.
Parâmetro Descrição Auto Exemplo Valor padrão
(se omitido)
Nota
{{item infobox
Parâmetros relacionados à Caixa
| boxwidth Largura da infobox 27em 21em Número com unidade. Código padrão é 21em ou esticar para a largura da imagem
| float Posição da infobox left right
| css
 or
| style
Estilo CSS afetando a infobox inteira Qualquer propriedade width ou float definida aqui substituirá os parâmetros $boxwidth e $float da predefinição, respectivamente
| auto Ativa data automática 465 Também pode ser yes (veja o texto acima).
| id ID do item ✔️ 465 A coleção de dados automática para $tooltip é baseada nisso.
| name Nome do item ✔️ Wood Nome da página Será exibido como o cabeçalho da infobox.
| lname Nome localizado do item ✔️ Legno
(Italiano para "Madeira")
{{tr|$name}} Será exibido como o cabeçalho da infobox; só para ser usado se $name não existir no banco de dados {{tr}} da língua específica.
| showenglishname Exibição do nome Inglês desse item yes
no
O padrão é no para línguas que possuem uma tradução dentro do jogo (en, de (German), es (Spanish), fr (French), it (Italian), pl (Polish), pt (Portuguese), ru (Russian), zh (Chinese)), e para yes para todas as outras línguas.
| namesub Sub-cabeçalho para o nome Informação adicional diretamente abaixo do título da infobox; raramente útil para infoboxes de item.
Image-related parameters
| imagealt Complete custom control over the entire image display [[File:Wood.png]] Overrides all image parameters in this parameter category.
| ext File extension of $image gif png
| image Main image of the inventory icon or equipped item/set Wood.png $name.$ext
| imageold Variant image of the older versions Compass (old).png $name (old) Default value: First checks for the .gif and then for the .png. Due to the way the automatic image detection is handled internally, it will likely fail on items whose name contains a dot (e.g. S.D.M.G.). It is necessary to explicitly specify the image in that case. (This applies to all image-related parameters.)
| imageplaced Image of the placed item Wood (placed).png $name (placed)
| imageequipped Image of the equipped item/set Shackle (equipped).png $name (equipped)
| imagefemale Image of the female equipped item/set Robe (equipped) female.png $name female.$ext
| imageoldalt Complete custom control over the "old" image display [[File:Compass (old).png]]
| imageplacedalt Complete custom control over the "placed" image display [[File:Wood (placed).png]]
| imageequippedalt Complete custom control over the "equipped" image display [[File:Shackle (equipped).png]]
| imagebreak Arranges multiple images in rows rather than in columns yes Causes the main/"old", "placed", "equipped", and "female" images to all take up a separate row, with small horizontal bars in between (example: Book). Note that the main and "old" images will always be displayed in the same row. Also note that this effect is enabled regardless of what $imagebreak is set to (i.e, setting it to no will also enable it – so refrain from doing that).
| imagemode Controls image selection placed/equipped full If set to full (which will only be the default for the infobox $view), the template will attempt to display all different types of images mentioned above. If not set to full, it will only attempt to display the main image (which will be the case for other $views by default, e.g. table), for performance reasons. It is possible, however, to enable (attempted) display of certain image types even if the mode is not full: Set the parameter to old, placed, equipped, or any combination of these three to cause the template to fetch these images as well.
| imageinfo Prevents the internal usage of {{image}} no Setting it to no will cause the template to use the standard [[File:]] syntax instead of {{image}}. {{image}} will increase the expensive function count, so if there are many item infoboxes on one page, the expensive function count limit may be exceeded. Using imageinfo=no can reduce the count to avoid exceeding it. In the vast majority of cases, this is not necessary.
Statistics-related parameters
| autoswing Auto-use capability ✔️ yes Displays Autoswing, Autofire, or Auto-use in the top-right corner of the infobox. Hover text is determined by $damagetype ("Autoswing" for melee, "Autofire" for ranged and magic, and "Auto-use" for anything else).
| stack Maximum possible stack size ✔️[1] 99 1 Maximum quantity of this item that can be stacked in a single inventory slot.
| pick Pickaxe power ✔️[1] 100 Without percentage sign (%), unless more complex wikitext is used. If any of the three parameters is used, all three symbols will always be displayed: Pickaxe icon Hammer icon Axe icon
| hammer Hammer power ✔️[1] 75
| axe Axe power ✔️[1] 50
| pickreq Required pickaxe power for destroying 150 Without percentage sign (%)!
| hammerreq Required hammer power for destroying 80 Without percentage sign (%)! Prints the following behind it: "(apenas no Modo Difícil)"
| type
 (deprecated:
| type2)
Classification and categorization ✔️ Weapon/Tool Broad classifications like "Weapon", "Tool", "Furniture", etc. Separate multiple values with a slash (/). Many types, such as "Crafting material", will be added automatically.
| bait Bait power ✔️ Without percentage sign (%)!
| damage Damage ✔️[1]
| damagetype Damage type ✔️[1] Possible values: melee, ranged, magic, summon, and throwing. The infobox will automatically categorize the page in the appropriate weapon type category, but only for the automatically generated damage type. For any additional, manually added damage type, a |listcat=<damage type> weapons will be necessary.
| knockback Knockback ✔️[1] @@@@ / {{kb|5}} If more than one value is needed, wrap the individual values with {{kb}} in order to ensure correct styling. The @@@@ string does not need {{}}.
| defense Defense ✔️[1]
| tileboost Tile range boost ✔️
| bonus Miscellaneous bonuses
| setbonus Set bonus ✔️[1] For armor sets, where $type contains Set. Note that because this parameter is only sensible for set item infoboxes – which don't use $auto since it doesn't work with sets – its data will always be generated automatically (instead of only when $auto is set). Set this parameter to an empty value to hide the automatically generated set bonus.
| placeable Placeable ✔️ yes no
| width Width when placed In tiles. Defaults to 1 for blocks.
| height Height when placed
| consumable Consumable ✔️ True if the item leaves the player's inventory with Usar / Atacar; includes placeable items. It is found in the game's source code.
| mana Mana cost ✔️[1]
| mheal Mana restoration ✔️[1]
| hheal Health restoration ✔️[1]
| critical Critical strike chance ✔️[1] 11 Without percentage sign (%), unless more complex wikitext is used. If no value is entered and the main $type is Weapon, a default value of 4 will be used.
| body slot Body slot ✔️
| use Use time ✔️[1] @@@@ / {{ut|30}} If more than one value is needed, wrap the individual values with {{ut}} in order to ensure correct styling. The @@@@ string does not need {{}}.
| velocity
 (deprecated:
| sspeed)
Velocity ✔️[1]
| toolspeed Tool speed ✔️[1]
| tooltip Tooltip ✔️[1]
| rare Rarity ✔️[1] @@@@ / {{rare|0}} Use the {{rare}} template.
| buy Buy value ✔️[1] Enter the value using the coin template ({{coin}}). If using $auto, use buy=y/yes/true/show to enable display of automatic buy price (disabled by default, since many items that can be sold cannot be bought). Alternatively, add buy, buyable, or vendor to $tags.
| sell Sell value ✔️[1] Also enter the value using the coin template.
| value Value ✔️ Mostly used internally. Will not be displayed directly, but serves as the base for $buy and $sell.
Buff- & Debuff-related parameters
| bufftype Type of the status effect ✔️ Mostly used internally. Can be buff or debuff.
| idbuff Buff ID ✔️
| buff Buff provided ✔️
| bufflink Buff link target ✔️
| bufftip Buff tooltip ✔️
| duration Buff duration ✔️[1]
| debuff Debuff inflicted As a shortcut for $debuffduration and $debuffchance, append them to this value, separated with a slash: | debuff = <name> / <duration> / <chance> (optional).
| debufflink Debuff link target
| debufftip Debuff tooltip
| debuffchance Debuff chance
| debuffduration Debuff duration
Sound-related parameters
| sounduse Use sound effect ✔️ Item_1.wav Can be a comma-separated list for multiple sounds. Caption is "Uso".
| sound1 Custom additional sound effect Can be a comma-separated list for multiple sounds.
| soundcaption1 Caption for the sound effect
| sound2 Custom additional sound effect Can be a comma-separated list for multiple sounds.
| soundcaption2 Caption for the sound effect
| sound<n> Custom additional sound effect Can be continued nearly infinitely. Sounds will only be displayed if there is a sound<n> parameter with a corresponding soundcaption<n> parameter.
| soundcaption<n> Caption for the sound effect
Mount-related parameter
| idmount Mount ID ✔️
Projectile-related parameters
| idprojectile
 (deprecated:
| shoot)
Projectile ID ✔️ Can be a comma-separated list for multiple IDs.
| projectilename Projectile name ✔️
| projectileimage Projectile image ✔️
| projectileblock Projectile images arrangement Operates similarly to $imagebreak.
ID-related parameters
| showids Display of ID section no ID section is not hidden by default.
| idshow Vanity item ID
| idtile Tile ID ✔️
| idtileshow Vanity tile ID
| idtilesub Tile sub-ID ✔️ Internally known as placeStyle in Terraria.
| idwall Wall ID ✔️
| idarmor Armor ID ✔️
| idbuffshow Vanity buff ID
Back-end-related parameters
| cate Toggles categorization no Set to yes to force categorization when it is disabled by default (on non-mainspace pages). Set to no to disable categorization.
| listexclude Toggles categorization yes no Set to yes to disable categorization. Overrides cate=yes, but not cate=no.
| cargo Toggles cargo data storage no Set to force to force cargo data storage when it is disabled by default (on non-mainspace pages). Set to no to disable cargo data storage. Note that setting it to anything else (e.g. yes) also disables cargo data storage, so please stick to the unambiguous no.
| listcat Categorization ✔️ Supplemental category names to include the current item in a DPL list, e.g. arrows causes the item to display at the Arrows page. Separate multiple categories with a slash character (/). The following categories will be added automatically:
  • Vendor items, if buy=true or $tags contains buy/buyable/vendor.
  • Craftable items, if this item is the result of any recipe.
  • Swords, if $listcat contains broadswords or shortswords.
  • Minecart track items, if this item is cart track item.
  • Arrows, Coins, Bullets, Sands, Darts, Rockets, or Flares, if this item is that kind of ammo.
  • Hamaxes, Hammers, Chainsaws, Axes, Drills, or Pickaxes, if this item is that type of tool.
  • Weapon items, if this item is a weapon or tool and deals damage.
  • <Damage type> weapons, if this item is a weapon.
| tag
 or
| tags
Categorization ✔️ Supplemental category names to appropriately categorize the item. Can contain any of the following (separate multiple with a slash character (/):
  • buy/buyable/vendor (equal to buy=yes)
  • hardmodeonly/hardmode (equal to hardmode=yes)
  • allversions (equal to allversions=yes)
  • dd2 (means that this item is to be purchased with Medalha do Defensor.)
  • drop (equal to listcat=drop items)
  • loot (equal to listcat=loot items)
  • plunder (equal to listcat=plunder items)
  • fished (equal to listcat=fished items)
  • unobtainable (equal to listcat=unobtainable items)
  • developer (equal to listcat=developer items).
  • storage (equal to listcat=storage items).
  • informational (equal to listcat=informational items).
  • quest rewards (equal to listcat=quest rewards).
  • light source (equal to listcat=light source items).
  • novelty (equal to listcat=novelty items).
  • mechanism (equal to listcat=mechanism items).
  • potion ingredients (equal to listcat=potion ingredients).
  • bag loot/bagloot (equal to listcat=bag loot items).
  • treasure bag loot (equal to listcat=Treasure Bag loot items).
  • minion (equal to type=weapon and listcat=minion summon items).
  • sentry (equal to type=weapon and listcat=sentry summon items).

All other values will have no effect. All tags will be stored to cargo for querying.

| allversions Platform version availability ✔️ Set to yes to assert that the item is available on all platforms of Terraria. This is only to be used if no {{exclusive}} banner is on the page. If omitted and if $tags does not contain allversions, it will be detected automatically based on the result of {{eversions|<item name>}} (even though $auto might not be set!). Categorizes the page in all five version content categories (with the exception of Category:Japanese console content), if yes is determined.
| hardmode Hardmode-exclusivity ✔️ yes Set to yes to assert that the item is not available in pre-Hardmode, but only becomes available in Hardmode. Categorizes the page in Category:Hardmode-only items.

View-related parameters

By default, an item infobox is displayed in the standard infobox style, a boxed, table-like listing of stats on the right of the article text. It is possible to change the display format (called "view"), however – there are four other views available: custom, item, table, and void (additionally test). They can be selected via the $view (aliases: $mode, $output) parameter. Each view has an own subpage which contains the code for the respective output.

View Description Subpage
custom Completely custom output. Requires a $template parameter with the name of the template that contains the custom code for the output. (For instance, |view=custom|template=item infobox/infoboxView could also be used for a standard infobox style, because {{item infobox/infoboxView}} contains the code for the infobox output.) /customView
infobox
(default)
Standard infobox-style output. /infoboxView
item Displays the item as formatted by {{item}}. /itemView
table Displays an entire table row (including the row separator, |-). Requires a $cols parameter that defines which columns are to be displayed. /tableView
void Does not display anything. This is useful when it is necessary to store item information to the Cargo database, but an own infobox for the item is unwanted (e.g. on group pages, where there is a main infobox for all items of the group). /voidView

Subpages

There are numerous supplemental subpages which are mainly used for formatting certain data:

See also

Footnotes

  1. 1,00 1,01 1,02 1,03 1,04 1,05 1,06 1,07 1,08 1,09 1,10 1,11 1,12 1,13 1,14 1,15 1,16 1,17 1,18 1,19 1,20 Any occurrence of the string @@@@ in the parameter value will be replaced by the automatically generated data. This can be used to mix automatic and manual data.