Sem resumo de edição |
(sync :: en revid:1178423::) |
||
(Há 13 revisões intermédias de outro utilizador que não estão a ser apresentadas) | |||
Linha 16: | Linha 16: | ||
+++++++++++++ 2. View-related options +++++++++++++ |
+++++++++++++ 2. View-related options +++++++++++++ |
||
− | -->{{#vardefine:viewname|{{lc:{{{mode|{{{output|{{{view|{{ |
+ | -->{{#vardefine:viewname|{{lc:{{{mode|{{{output|{{{view|{{options/get|item infobox|view}}}}}}}}}}}}}}}<!-- |
-->{{#switch:{{#var:viewname}}<!-- |
-->{{#switch:{{#var:viewname}}<!-- |
||
-->|infobox=<!-- |
-->|infobox=<!-- |
||
− | -->{{#arraydefine:extargs|float/css/style/boxwidth/imagebreak/showids/idshow |
+ | -->{{#arraydefine:extargs|float/css/style/boxwidth/imagebreak/showids/idshow/idtileshow/projectileblock/projectilename/projectileimage/showenglishname/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!-- |
-->|table=<!-- |
-->|table=<!-- |
||
− | -->{{#arraydefine:extargs|cols/{{{extargs|{{item infobox |
+ | -->{{#arraydefine:extargs|cols/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!-- |
− | -->{{#arraydefine:ii:table:cols|{{{cols|{{item infobox |
+ | -->{{#arraydefine:ii:table:cols|{{{cols|{{options/get|item infobox|cols}}}}}|{{{colsep|{{#or:{{options/get|item infobox|colsep}}|/}}}}}}}<!-- default cols value from options |
// and pass all custom col values. |
// and pass all custom col values. |
||
-->{{#arrayprint:ii:table:cols||@@@@|{{#if:{{#rmatch:@@@@|/^col:/|y}}|{{#vardefine:ii:@@@@|{{{@@@@|}}} }}}}}}<!-- |
-->{{#arrayprint:ii:table:cols||@@@@|{{#if:{{#rmatch:@@@@|/^col:/|y}}|{{#vardefine:ii:@@@@|{{{@@@@|}}} }}}}}}<!-- |
||
-->|custom=<!-- |
-->|custom=<!-- |
||
− | -->{{#arraydefine:extargs|template/{{{extargs|{{item infobox |
+ | -->{{#arraydefine:extargs|template/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!-- |
-->|item=<!-- |
-->|item=<!-- |
||
− | -->{{#arraydefine:extargs|mode/nolink/link/wrap/icons/note/note2/showid/class/css/t/{{{extargs|{{item infobox |
+ | -->{{#arraydefine:extargs|mode/nolink/link/wrap/icons/note/note2/anchor/showid/class/css/t/{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!-- |
-->|#default=<!-- |
-->|#default=<!-- |
||
− | -->{{#arraydefine:extargs|{{{extargs|{{item infobox |
+ | -->{{#arraydefine:extargs|{{{extargs|{{options/get|item infobox|extargs}}}}}|/}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->{{#arrayprint:extargs||@@@@|{{#if:@@@@|{{#vardefine:ii:ext:@@@@|{{{@@@@|}}}}}}}}}<!-- ext parameters for view |
-->{{#arrayprint:extargs||@@@@|{{#if:@@@@|{{#vardefine:ii:ext:@@@@|{{{@@@@|}}}}}}}}}<!-- ext parameters for view |
||
− | -->{{#vardefine:imagemode|{{{imagemode|{{#ifeq:{{#var:viewname}}|infobox|full|{{item infobox |
+ | -->{{#vardefine:imagemode|{{{imagemode|{{#ifeq:{{#var:viewname}}|infobox|full|{{options/get|item infobox|imagemode}}}}}}}}}<!-- image mode |
Linha 84: | Linha 84: | ||
+++++++++++++ 2. Fetch automatic data +++++++++++++ |
+++++++++++++ 2. Fetch automatic data +++++++++++++ |
||
− | -->{{# |
+ | -->{{#vardefine:ii:auto_id|{{#if:{{{auto|}}}|<!-- |
− | -->{{# |
+ | -->{{#if:{{isNumber|{{{auto|}}}}}|<!-- |
⚫ | |||
⚫ | |||
-->{{{auto|}}}<!-- $auto is number, use it as-is |
-->{{{auto|}}}<!-- $auto is number, use it as-is |
||
⚫ | |||
⚫ | |||
-->}}<!-- |
-->}}<!-- |
||
− | --> |
+ | -->}}}}<!-- |
+ | -->{{#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 |
||
− | -->0<!-- not auto: 0 |
||
− | --> |
+ | -->{{#invoke:Iteminfo|getInfo|prefix=ii:info:|id={{#var:ii:auto_id}}}}<!-- fetch data or reset the data-filled vars |
Linha 108: | Linha 108: | ||
-->{{#vardefine:ii:autoswing|{{{autoswing|{{#dplvar:ii:info:autoReuse}}}}}}}<!-- |
-->{{#vardefine:ii:autoswing|{{{autoswing|{{#dplvar:ii:info:autoReuse}}}}}}}<!-- |
||
-->{{#vardefine:ii:stack|<!-- |
-->{{#vardefine:ii:stack|<!-- |
||
− | -->{{# |
+ | -->{{#ifeq:{{{stack|-unset}}}|{{{stack|unset-}}}|<!-- allow "|stack=" to suppress stack display |
− | --> |
+ | -->{{#rreplace:{{{stack|}}}|@@@@|{{#dplvar:ii:info:maxStack}}}}<!-- |
− | + | -->|<!-- |
|
+ | -->{{#dplvar:ii:info:maxStack}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 133: | Linha 134: | ||
// hammers and hamaxes |
// hammers and hamaxes |
||
-->{{#ifexpr:{{#dplvar:ii:info:hammer}}|<!-- |
-->{{#ifexpr:{{#dplvar:ii:info:hammer}}|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:axe}}<!-- |
+ | -->{{#ifexpr:{{#dplvar:ii:info:axe}}|<!-- |
− | --> |
+ | -->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|hamaxes}}}}<!-- |
+ | -->|<!-- |
||
− | --> |
+ | -->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|hammers}}}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 141: | Linha 143: | ||
-->{{#ifexpr:{{#dplvar:ii:info:axe}}|<!-- |
-->{{#ifexpr:{{#dplvar:ii:info:axe}}|<!-- |
||
-->{{#ifexpr:{{#dplvar:ii:info:hammer}}||<!-- exclude hamaxes |
-->{{#ifexpr:{{#dplvar:ii:info:hammer}}||<!-- exclude hamaxes |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:shoot}}<!-- |
+ | -->{{#ifexpr:{{#dplvar:ii:info:shoot}}|<!-- |
− | --> |
+ | -->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|chainsaws}}}}<!-- |
+ | -->|<!-- |
||
− | --> |
+ | -->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|axes}}}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 149: | Linha 152: | ||
// pickaxes and drills |
// pickaxes and drills |
||
-->{{#ifexpr:{{#dplvar:ii:info:pick}}|<!-- |
-->{{#ifexpr:{{#dplvar:ii:info:pick}}|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:shoot}}<!-- |
+ | -->{{#ifexpr:{{#dplvar:ii:info:shoot}}|<!-- |
− | --> |
+ | -->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|drills}}}}<!-- |
+ | -->|<!-- |
||
− | --> |
+ | -->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|pickaxes}}}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 165: | Linha 169: | ||
-->{{#vardefine:ii:ammo|{{#dplvar:ii:info:ammo}}}}<!-- |
-->{{#vardefine:ii:ammo|{{#dplvar:ii:info:ammo}}}}<!-- |
||
-->{{#ifexpr:{{#var:ii:ammo}}|<!-- Ammo type/cate |
-->{{#ifexpr:{{#var:ii:ammo}}|<!-- Ammo type/cate |
||
− | // add "Ammunition |
+ | // add "Ammunition" to type. |
− | -->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|ammunition |
+ | -->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|ammunition}}}}<!-- |
// add ammo type to listcat: (by AmmoID) |
// add ammo type to listcat: (by AmmoID) |
||
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|{{#switch:{{#var:ii:ammo}}<!-- |
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|{{#switch:{{#var:ii:ammo}}<!-- |
||
Linha 211: | Linha 215: | ||
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|dye}}}}<!-- |
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|dye}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:hairDye}}>-1|<!-- is hair dye? |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:hairDye}}|-1}}>-1|<!-- is hair dye? |
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|hair dye}}}}<!-- |
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|hair dye}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 228: | Linha 232: | ||
---- fishing power and bait ---- |
---- fishing power and bait ---- |
||
− | -->{{#vardefine:ii: |
+ | -->{{#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}}}}}}}<!-- |
-->{{#vardefine:ii:bait|{{{bait|{{#dplvar:ii:info:bait}}}}}}}<!-- |
||
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:bait}}|0}}|<!-- bait? |
-->{{#ifexpr:{{#or:{{#dplvar:ii:info:bait}}|0}}|<!-- bait? |
||
Linha 236: | Linha 243: | ||
---- damage and damagetype ---- |
---- damage and damagetype ---- |
||
// use damage if damage>0 or "weapon" in types |
// use damage if damage>0 or "weapon" in types |
||
− | -->{{#vardefine:ii:damage|{{#ifexpr:({{#dplvar:ii:info:damage}}>0) or {{#or:{{#lstind:weapon|{{#var:ii:types}}|/}}|0}}|{{#dplvar:ii:info:damage}}}}}}<!-- |
+ | -->{{#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 |
-->{{#ifeq:{{{damage|-unset}}}|{{{damage|unset-}}}|<!-- allow "|damage=" to suppress damage display |
||
-->{{#vardefine:ii:damage|{{#rreplace:{{{damage|}}}|@@@@|{{#var:ii:damage}}}}}}<!-- |
-->{{#vardefine:ii:damage|{{#rreplace:{{{damage|}}}|@@@@|{{#var:ii:damage}}}}}}<!-- |
||
Linha 248: | Linha 255: | ||
-->}}}}}}<!-- |
-->}}}}}}<!-- |
||
// other, non-weapon items with autodamage |
// other, non-weapon items with autodamage |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:damage}}>0|<!-- |
+ | -->{{#ifexpr:0{{#dplvar:ii:info:damage}}>0|<!-- |
-->{{#if:{{#lstind:tool|{{#var:ii:types}}|/}}|<!-- |
-->{{#if:{{#lstind:tool|{{#var:ii:types}}|/}}|<!-- |
||
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|weapon items}}}}<!-- tools with damage need "weapon items" in listcat |
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|weapon items}}}}<!-- tools with damage need "weapon items" in listcat |
||
Linha 268: | Linha 275: | ||
// manually override: |
// manually override: |
||
-->{{#vardefine:ii:damagetype|<!-- |
-->{{#vardefine:ii:damagetype|<!-- |
||
− | -->{{#if:{{{damagetype|}}}<!-- |
+ | -->{{#if:{{{damagetype|}}}|<!-- |
− | --> |
+ | -->{{#rreplace:{{{damagetype|}}}|@@@@|{{l10n|item_infobox|damagetype:{{lc:{{#var:ii:damagetype}}}}}}}}<!-- |
− | + | -->|<!-- |
|
+ | -->{{#var:ii:damagetype}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 276: | Linha 284: | ||
---- research ---- |
---- research ---- |
||
− | -->{{#vardefine:ii:sacrifices |
+ | -->{{#vardefine:ii:sacrifices|{{#ifexpr:0{{#dplvar:ii:info:sacrifices}}>0|{{#dplvar:ii:info:sacrifices}}}}}}<!-- |
+ | -->{{#if:{{{research|}}}|<!-- |
||
+ | -->{{#vardefine:ii:sacrifices|{{#rreplace:{{{research|}}}|@@@@|{{#var:ii:sacrifices}}}}}}<!-- |
||
+ | -->}}<!-- |
||
+ | |||
-------- |
-------- |
||
Linha 282: | Linha 294: | ||
// use kb if autokb>0, always use kb for all axe/hammer/pick tools, always use kb for all weapons |
// use kb if autokb>0, always use kb for all axe/hammer/pick tools, always use kb for all weapons |
||
-->{{#vardefine:ii:knockback|<!-- |
-->{{#vardefine:ii:knockback|<!-- |
||
− | -->{{#ifexpr:({{#dplvar:ii:info:knockBack}}>0) or {{#dplvar:ii:info:axe}} or {{#dplvar:ii:info:hammer}} or {{#dplvar:ii:info:pick}} or |
+ | -->{{#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 |
-->{{#ifeq:{{{knockback|-unset}}}|{{{knockback|unset-}}}|<!-- allow "|knockback=" to suppress knockback display |
||
Linha 290: | Linha 302: | ||
---- defense ---- |
---- defense ---- |
||
− | -->{{#vardefine:ii:defense|{{#ifexpr:{{#dplvar:ii:info:defense}}>0<!-- |
+ | -->{{#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 |
||
− | + | -->{{#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}}}}<!-- |
||
-->}}}}<!-- |
-->}}}}<!-- |
||
-->}}}}<!-- |
-->}}}}<!-- |
||
Linha 306: | Linha 319: | ||
---- mana cost and mana and health heal ---- |
---- mana cost and mana and health heal ---- |
||
− | -->{{#vardefine:ii:mana|{{#ifexpr:{{#dplvar:ii:info:mana}}>0|{{#dplvar:ii:info:mana}}}}}}<!-- |
+ | -->{{#vardefine:ii:mana|{{#ifexpr:0{{#dplvar:ii:info:mana}}>0|{{#dplvar:ii:info:mana}}}}}}<!-- |
-->{{#if:{{{mana|}}}|<!-- |
-->{{#if:{{{mana|}}}|<!-- |
||
-->{{#vardefine:ii:mana|{{#rreplace:{{{mana|}}}|@@@@|{{#var:ii:mana}}}}}}<!-- |
-->{{#vardefine:ii:mana|{{#rreplace:{{{mana|}}}|@@@@|{{#var:ii:mana}}}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
− | -->{{#vardefine:ii:mheal|{{#ifexpr:{{#dplvar:ii:info:healMana}}>0|{{#dplvar:ii:info:healMana}}}}}}<!-- |
+ | -->{{#vardefine:ii:mheal|{{#ifexpr:0{{#dplvar:ii:info:healMana}}>0|{{#dplvar:ii:info:healMana}}}}}}<!-- |
-->{{#if:{{{mheal|}}}|<!-- |
-->{{#if:{{{mheal|}}}|<!-- |
||
-->{{#vardefine:ii:mheal|{{#rreplace:{{{mheal|}}}|@@@@|{{#var:ii:healMana}}}}}}<!-- |
-->{{#vardefine:ii:mheal|{{#rreplace:{{{mheal|}}}|@@@@|{{#var:ii:healMana}}}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
− | -->{{#vardefine:ii:hheal|{{#ifexpr:{{#dplvar:ii:info:healLife}}>0|{{#dplvar:ii:info:healLife}}}}}}<!-- |
+ | -->{{#vardefine:ii:hheal|{{#ifexpr:0{{#dplvar:ii:info:healLife}}>0|{{#dplvar:ii:info:healLife}}}}}}<!-- |
-->{{#if:{{{hheal|}}}|<!-- |
-->{{#if:{{{hheal|}}}|<!-- |
||
-->{{#vardefine:ii:hheal|{{#rreplace:{{{hheal|}}}|@@@@|{{#var:ii:healLife}}}}}}<!-- |
-->{{#vardefine:ii:hheal|{{#rreplace:{{{hheal|}}}|@@@@|{{#var:ii:healLife}}}}}}<!-- |
||
Linha 323: | Linha 336: | ||
-->{{#vardefine:ii:critical|<!-- |
-->{{#vardefine:ii:critical|<!-- |
||
-->{{#if:{{#var:ii:damage}}|<!-- if $damage |
-->{{#if:{{#var:ii:damage}}|<!-- if $damage |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:crit}}>0|<!-- if auto critical |
+ | -->{{#ifexpr:0{{#dplvar:ii:info:crit}}>0|<!-- if auto critical |
-->{{#expr:{{#dplvar:ii:info:crit}}+4}}<!-- use autocrit+4 |
-->{{#expr:{{#dplvar:ii:info:crit}}+4}}<!-- use autocrit+4 |
||
-->|<!-- |
-->|<!-- |
||
− | -->{{#if:{{#lstfltr:weapon/tool|/|{{#var:ii:types}}|/}}|<!-- $type=(weapon or |
+ | -->{{#if:{{#lstfltr:weapon/tool/accessory|/|{{#var:ii:types}}|/}}|<!-- $type=(weapon, tool or accessory) |
if $damagetype and ("summon" not in $damagetype) then 4 |
if $damagetype and ("summon" not in $damagetype) then 4 |
||
-->{{#if:{{#var:ii:damagetype}}|{{#if:{{#rmatch:{{#var:ii:damagetype}}|/summon/i|y}}||4}}}}<!-- |
-->{{#if:{{#var:ii:damagetype}}|{{#if:{{#rmatch:{{#var:ii:damagetype}}|/summon/i|y}}||4}}}}<!-- |
||
Linha 339: | Linha 352: | ||
---- use time and tool speed ---- |
---- use time and tool speed ---- |
||
− | -->{{#vardefine:ii:use|{{#ifexpr:{{#dplvar:ii:info:useAnimation}}<100|{{#dplvar:ii:info:useAnimation}}}}}}<!-- |
+ | -->{{#vardefine:ii:use|{{#ifexpr:0{{#dplvar:ii:info:useAnimation}}<100|{{#dplvar:ii:info:useAnimation}}}}}}<!-- |
− | -->{{# |
+ | -->{{#ifeq:{{{use|-unset}}}|{{{use|unset-}}}|<!-- allow "|use=" to suppress use time display |
-->{{#vardefine:ii:use|{{#rreplace:{{{use|}}}|@@@@|{{use time|{{#var:ii:use}}|full=y}}}}}}<!-- |
-->{{#vardefine:ii:use|{{#rreplace:{{{use|}}}|@@@@|{{use time|{{#var:ii:use}}|full=y}}}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->{{#vardefine:ii:toolspeed|<!-- |
-->{{#vardefine:ii:toolspeed|<!-- |
||
− | -->{{#ifexpr:({{#dplvar:ii:info:useAnimation}}<100) and ({{#dplvar:ii:info:useTime}}<100) and {{#dplvar:ii:info:axe}}{{#dplvar:ii:info:hammer}}{{#dplvar:ii:info:pick}}|<!-- |
+ | -->{{#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}}|<!-- |
-->{{#dplvar:ii:info:useTime}}<!-- |
-->{{#dplvar:ii:info:useTime}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 361: | Linha 374: | ||
-->{{#vardefine:ii:debuff-1:duration|}}<!-- |
-->{{#vardefine:ii:debuff-1:duration|}}<!-- |
||
// auto buff info: |
// auto buff info: |
||
− | -->{{#vardefine:ii:autobuff:id|{{#ifexpr:{{#dplvar:ii:info:buffType}}>0|<!-- |
+ | -->{{#vardefine:ii:autobuff:id|{{#ifexpr:0{{#dplvar:ii:info:buffType}}>0|<!-- |
-->{{#dplvar:ii:info:buffType}}<!-- |
-->{{#dplvar:ii:info:buffType}}<!-- |
||
-->|<!-- |
-->|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:mountType}}>-1|{{buffIdFromName|{{getMountInfo|{{#dplvar:ii:info:mountType}}|name}}}}}}<!-- |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:mountType}}|-1}}>-1|{{buffIdFromName|{{getMountInfo|{{#dplvar:ii:info:mountType}}|name}}}}}}<!-- |
-->}}}}<!-- |
-->}}}}<!-- |
||
-->{{#if:{{#var:ii:autobuff:id}}|<!-- |
-->{{#if:{{#var:ii:autobuff:id}}|<!-- |
||
-->{{#vardefine:ii:autobuff:type|{{lc:{{getBuffInfo|{{#var:ii:autobuff:id}}|type}}}}}}<!-- |
-->{{#vardefine:ii:autobuff:type|{{lc:{{getBuffInfo|{{#var:ii:autobuff:id}}|type}}}}}}<!-- |
||
− | -->{{#vardefine:ii:autobuff:duration|{{#ifexpr:{{#dplvar:ii:info:buffTime}}>0|{{duration|{{#expr:{{#dplvar:ii:info:buffTime}}/60}}}}}}}}<!-- in seconds (autoduration is in millis) |
+ | -->{{#vardefine:ii:autobuff:duration|{{#ifexpr:0{{#dplvar:ii:info:buffTime}}>0|{{duration|{{#expr:{{#dplvar:ii:info:buffTime}}/60}}}}}}}}<!-- in seconds (autoduration is in millis) |
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}-1:id|{{#var:ii:autobuff:id}}}}<!-- |
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}-1:id|{{#var:ii:autobuff:id}}}}<!-- |
||
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}-1:duration|{{#var:ii:autobuff:duration}}}}<!-- |
-->{{#vardefine:ii:{{#var:ii:autobuff:type}}-1:duration|{{#var:ii:autobuff:duration}}}}<!-- |
||
Linha 387: | Linha 400: | ||
-->{{#loop:i|1|{{#lstcnt:{{#var:ii:{{#var:bufftype}}s}}|₪}}|<!-- iterate over parameter indices |
-->{{#loop:i|1|{{#lstcnt:{{#var:ii:{{#var:bufftype}}s}}|₪}}|<!-- iterate over parameter indices |
||
-->{{#vardefine:j|{{#lstelem:{{#var:ii:{{#var:bufftype}}s}}|₪|{{#var:i}}}}}}<!-- j is the parameter index |
-->{{#vardefine:j|{{#lstelem:{{#var:ii:{{#var:bufftype}}s}}|₪|{{#var:i}}}}}}<!-- j is the parameter index |
||
− | -->{{#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" |
+ | -->{{#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" |
-->{{#arraydefine:buffinfo|{{{ {{#var:bufftype}}{{#var:k}}|}}}|/}}<!-- |
-->{{#arraydefine:buffinfo|{{{ {{#var:bufftype}}{{#var:k}}|}}}|/}}<!-- |
||
// we store the information that the view needs in variables with a "ii:<bufftype><parameter index>:<stat>" format |
// we store the information that the view needs in variables with a "ii:<bufftype><parameter index>:<stat>" format |
||
Linha 395: | Linha 408: | ||
-->{{buffIdFromName|{{#arrayindex:buffinfo|0}}}}<!-- buffinfo[0] will always contain the de-/buff name, regardless of whether compact mode was used or not |
-->{{buffIdFromName|{{#arrayindex:buffinfo|0}}}}<!-- buffinfo[0] will always contain the de-/buff name, regardless of whether compact mode was used or not |
||
-->|<!-- |
-->|<!-- |
||
− | -->{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}<!-- |
+ | -->{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}<!-- falback for autobuff (this var is only already set to something if j==-1) |
-->}}}}}}}<!-- |
-->}}}}}}}<!-- |
||
-->{{#if:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|{{#ifeq:{{#sub:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|0|1}}|m|<!-- if is mobile id |
-->{{#if:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|{{#ifeq:{{#sub:{{#var:ii:{{#var:bufftype}}{{#var:j}}:id}}|0|1}}|m|<!-- if is mobile id |
||
Linha 433: | Linha 446: | ||
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|{{#var:bufftype}}s}}}}<!-- |
-->{{#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}}|}}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 439: | Linha 454: | ||
---- rarity ---- |
---- rarity ---- |
||
-->{{#vardefine:ii:rawrare|{{#dplvar:ii:info:rare}}}}<!-- |
-->{{#vardefine:ii:rawrare|{{#dplvar:ii:info:rare}}}}<!-- |
||
− | -->{{#if:{{#dplvar:ii:info:questItem}}<!-- quest |
+ | -->{{#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 |
+ | // auto rarity for armor/vanity sets |
-->{{#if:{{#var:ii:isArmorSet}}|<!-- |
-->{{#if:{{#var:ii:isArmorSet}}|<!-- |
||
-->{{#vardefine:ii:rawrare|{{getSetInfo|{{#var:ii:name}}|rare|raw=y}}}}<!-- |
-->{{#vardefine:ii:rawrare|{{getSetInfo|{{#var:ii:name}}|rare|raw=y}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->{{#vardefine:ii:rare|<!-- |
-->{{#vardefine:ii:rare|<!-- |
||
− | -->{{#ifeq:{{{rare|-unset}}}|{{{rare|unset-}}}<!-- allow "|rare=" to suppress rarity display |
+ | -->{{#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}}}}}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 457: | Linha 474: | ||
---- buy price and sell value ---- |
---- buy price and sell value ---- |
||
-->{{#vardefine:ii:shopCustomPrice|{{#dplvar:ii:info:shopCustomPrice}}}}<!-- defender medals (dm) |
-->{{#vardefine:ii:shopCustomPrice|{{#dplvar:ii:info:shopCustomPrice}}}}<!-- defender medals (dm) |
||
− | -->{{#vardefine:ii:value|{{{value|{{#ifexpr:{{#dplvar:ii:info:value}}>0|{{#dplvar:ii:info:value}}}}}}}}}<!-- |
+ | -->{{#vardefine:ii:value|{{{value|{{#ifexpr:0{{#dplvar:ii:info:value}}>0|{{#dplvar:ii:info:value}}}}}}}}}<!-- |
// sell/buy VALUES |
// sell/buy VALUES |
||
-->{{#vardefine:ii:sell|}}<!-- |
-->{{#vardefine:ii:sell|}}<!-- |
||
-->{{#if:{{#var:ii:isArmorSet}}|<!-- auto sell for armor/vanity set |
-->{{#if:{{#var:ii:isArmorSet}}|<!-- auto sell for armor/vanity set |
||
− | -->{{#vardefine:ii:sell|{{#ifexpr:{{#explode:{{getSetInfo|{{#var:ii:name}}|sell|raw=y}}| |
+ | -->{{#vardefine:ii:sell|{{#ifexpr:{{#explode:{{#explode:{{getSetInfo|{{#var:ii:name}}|sell|raw=y}}|₪}}|¤|1}}|{{getSetInfo|{{#var:ii:name}}|sell}}}}}}<!-- |
-->|<!-- regular, single item |
-->|<!-- regular, single item |
||
-->{{#if:{{#var:ii:value}}|<!-- |
-->{{#if:{{#var:ii:value}}|<!-- |
||
-->{{#vardefine:ii:sell|{{#expr:floor({{#expr:{{#var:ii:value}}/5}})}}}}<!-- divide by 5, round down, in cc |
-->{{#vardefine:ii:sell|{{#expr:floor({{#expr:{{#var:ii:value}}/5}})}}}}<!-- divide by 5, round down, in cc |
||
− | -->{{#ifexpr:{{#var:ii:sell}}<1|{{#vardefine:ii:sell|1}}}}<!-- never less than 1cc |
+ | -->{{#ifexpr:0{{#var:ii:sell}}<1|{{#vardefine:ii:sell|1}}}}<!-- never less than 1cc |
-->{{#vardefine:ii:sell|{{coin|{{#var:ii:sell}}}}}}<!-- convert to coins |
-->{{#vardefine:ii:sell|{{coin|{{#var:ii:sell}}}}}}<!-- convert to coins |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 481: | Linha 498: | ||
-->{{coin|{{#var:ii:value}}}}<!-- |
-->{{coin|{{#var:ii:value}}}}<!-- |
||
-->|<!-- auto buy for armor/vanity set |
-->|<!-- auto buy for armor/vanity set |
||
− | -->{{#if:{{#var:ii:isArmorSet}}| |
+ | -->{{#if:{{#var:ii:isArmorSet}}|<!-- |
+ | -->{{#ifexpr:{{#replace:{{#explode:{{#explode:{{getSetInfo|{{#var:ii:name}}|buy|raw=y}}|₪}}|¤|1}}|_dm_|}}|<!-- |
||
+ | -->{{getSetInfo|{{#var:ii:name}}|buy}}<!-- |
||
+ | -->}}<!-- |
||
+ | -->}}<!-- |
||
+ | -->}}<!-- |
||
-->}}}}<!-- |
-->}}}}<!-- |
||
-->{{#if:{{#if:{{{buy|}}}|{{#switch:{{lc:{{{buy|}}}}}|y|yes|true|show=|#default=y}}}}|<!-- if $buy != ("y" or "yes" or "true" or "show") |
-->{{#if:{{#if:{{{buy|}}}|{{#switch:{{lc:{{{buy|}}}}}|y|yes|true|show=|#default=y}}}}|<!-- if $buy != ("y" or "yes" or "true" or "show") |
||
Linha 494: | Linha 516: | ||
---- ids ---- |
---- ids ---- |
||
-->{{#vardefine:ii:idtile|{{{idtile|<!-- |
-->{{#vardefine:ii:idtile|{{{idtile|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:createTile}}>-1|{{#dplvar:ii:info:createTile}}}}<!-- |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:createTile}}|-1}}>-1|{{#dplvar:ii:info:createTile}}}}<!-- |
-->}}}}}<!-- |
-->}}}}}<!-- |
||
-->{{#vardefine:ii:idtilesub|{{#if:{{{idtile|}}}||{{{idtilesub|<!-- |
-->{{#vardefine:ii:idtilesub|{{#if:{{{idtile|}}}||{{{idtilesub|<!-- |
||
− | -->{{#ifexpr:({{#dplvar:ii:info:createTile}}>-1) and ({{#dplvar:ii:info:placeStyle}}>0)|{{#expr:{{#dplvar:ii:info:placeStyle}}+1}}}}<!-- |
+ | -->{{#ifexpr:({{#or:{{#dplvar:ii:info:createTile}}|-1}}>-1) and (0{{#dplvar:ii:info:placeStyle}}>0)|{{#expr:{{#dplvar:ii:info:placeStyle}}+1}}}}<!-- |
-->}}}}}}}<!-- |
-->}}}}}}}<!-- |
||
-->{{#vardefine:ii:idwall|{{{idwall|<!-- |
-->{{#vardefine:ii:idwall|{{{idwall|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:createWall}}>-1|<!-- item is a wall as defined by auto info |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:createWall}}|-1}}>-1|<!-- item is a wall as defined by auto info |
-->{{#dplvar:ii:info:createWall}}<!-- |
-->{{#dplvar:ii:info:createWall}}<!-- |
||
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|wall}}}}<!-- add "wall" to types |
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|wall}}}}<!-- add "wall" to types |
||
Linha 507: | Linha 529: | ||
-->{{#vardefine:ii:idarmor|}}<!-- |
-->{{#vardefine:ii:idarmor|}}<!-- |
||
-->{{#vardefine:ii:bodyslot|}}<!-- |
-->{{#vardefine:ii:bodyslot|}}<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:headSlot}}>-1|<!-- head armor? |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:headSlot}}|-1}}>-1|<!-- head armor? |
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:headSlot}}}}<!-- |
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:headSlot}}}}<!-- |
||
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!-- |
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!-- |
||
Linha 516: | Linha 538: | ||
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:bodySlot}}>-1|<!-- body armor? |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:bodySlot}}|-1}}>-1|<!-- body armor? |
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:bodySlot}}}}<!-- |
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:bodySlot}}}}<!-- |
||
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!-- |
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!-- |
||
Linha 525: | Linha 547: | ||
-->}}<!-- |
-->}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:legSlot}}>-1|<!-- legs armor? |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:legSlot}}|-1}}>-1|<!-- legs armor? |
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:legSlot}}}}<!-- |
-->{{#vardefine:ii:idarmor|{{#dplvar:ii:info:legSlot}}}}<!-- |
||
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!-- |
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|<!-- |
||
Linha 537: | Linha 559: | ||
-->{{#vardefine:ii:bodyslot|{{{body slot|{{#var:ii:bodyslot}}}}}}}<!-- |
-->{{#vardefine:ii:bodyslot|{{{body slot|{{#var:ii:bodyslot}}}}}}}<!-- |
||
-->{{#vardefine:ii:idmount|{{{idmount|<!-- |
-->{{#vardefine:ii:idmount|{{{idmount|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:mountType}}>-1|<!-- item is a mount summon as defined by auto info |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:mountType}}|-1}}>-1|<!-- item is a mount summon as defined by auto info |
-->{{#dplvar:ii:info:mountType}}<!-- |
-->{{#dplvar:ii:info:mountType}}<!-- |
||
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|mount summon}}}}<!-- add "mount summon" to type |
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|mount summon}}}}<!-- add "mount summon" to type |
||
Linha 544: | Linha 566: | ||
-->{{#vardefine:ii:idbuff|<!-- |
-->{{#vardefine:ii:idbuff|<!-- |
||
-->{{#lstmap:{{#var:ii:buffs}}|₪|@@@@|<esc><!-- |
-->{{#lstmap:{{#var:ii:buffs}}|₪|@@@@|<esc><!-- |
||
− | -->{{#var:ii:buff@@@@:mobile}}₰{{#var:ii:buff@@@@:id}}₰{{#var:ii: |
+ | -->{{#var:ii:buff@@@@:mobile}}₰{{#var:ii:buff@@@@:id}}₰{{#var:ii:buff@@@@:idshow}}<!-- |
--></esc>|₪}}<!-- |
--></esc>|₪}}<!-- |
||
-->{{#listmap:intro=₪|list={{#var:ii:debuffs}}|insep=₪|token=@@@@|pattern=<esc><!-- |
-->{{#listmap:intro=₪|list={{#var:ii:debuffs}}|insep=₪|token=@@@@|pattern=<esc><!-- |
||
− | -->{{#var:ii:debuff@@@@:mobile}}₰{{#var:ii:debuff@@@@:id}}₰{{#var:ii: |
+ | -->{{#var:ii:debuff@@@@:mobile}}₰{{#var:ii:debuff@@@@:id}}₰{{#var:ii:debuff@@@@:idshow}}<!-- |
--></esc>|outsep=₪}}<!-- |
--></esc>|outsep=₪}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->{{#vardefine:ii:idprojectile|{{{idprojectile|{{{shoot|{{#if:{{#var:ii:useammo}}||<!-- don't show default projectile id for items which use ammo. |
-->{{#vardefine:ii:idprojectile|{{{idprojectile|{{{shoot|{{#if:{{#var:ii:useammo}}||<!-- don't show default projectile id for items which use ammo. |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:shoot}}>0|{{#dplvar:ii:info:shoot}}}}<!-- |
+ | -->{{#ifexpr:0{{#dplvar:ii:info:shoot}}>0|{{#dplvar:ii:info:shoot}}}}<!-- |
-->}}}}}}}}}}<!-- |
-->}}}}}}}}}}<!-- |
||
-------- |
-------- |
||
---- velocity ---- |
---- velocity ---- |
||
− | //velocity & extraUpdate fix |
+ | // velocity & extraUpdate fix |
-->{{#vardefine:ii:velocity|<!-- |
-->{{#vardefine:ii:velocity|<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:shootSpeed}}>0|{{#dplvar:ii:info:shootSpeed}}}}<!-- |
+ | -->{{#ifexpr:0{{#dplvar:ii:info:shootSpeed}}>0|{{#dplvar:ii:info:shootSpeed}}}}<!-- |
-->}}<!-- |
-->}}<!-- |
||
-->{{#vardefine:ii:rawVelocity|{{#var:ii:velocity}}}}<!-- |
-->{{#vardefine:ii:rawVelocity|{{#var:ii:velocity}}}}<!-- |
||
Linha 564: | Linha 586: | ||
-->{{#if:{{#var:ii:idprojectile}}|{{#if:{{#var:ii:rawVelocity}}|<!-- |
-->{{#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 |
-->{{#vardefine:ii:extraUpdates|0{{getProjectileInfo|{{#explode:{{#var:ii:idprojectile}}|,|0}}|extraUpdates}}}}<!-- extra updates of first projectile in list |
||
− | -->{{#ifexpr:{{#var:ii:extraUpdates}}>0|<!-- |
+ | -->{{#ifexpr:0{{#var:ii:extraUpdates}}>0|<!-- |
-->{{#if:{{#lstind:ammunition|{{#var:ii:types}}|/}}|<!-- ammo items |
-->{{#if:{{#lstind:ammunition|{{#var:ii:types}}|/}}|<!-- ammo items |
||
-->{{#vardefine:ii:velocityMultiplier|{{#expr:{{#var:ii:extraUpdates}}+1}}}}<!-- |
-->{{#vardefine:ii:velocityMultiplier|{{#expr:{{#var:ii:extraUpdates}}+1}}}}<!-- |
||
Linha 578: | Linha 600: | ||
---- tooltip ---- |
---- tooltip ---- |
||
− | -->{{#vardefine:ii: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 |
-->{{#ifeq:{{{tooltip|-unset}}}|{{{tooltip|unset-}}}|<!-- allow "|tooltip=" to suppress tooltip display |
||
-->{{#vardefine:ii:tooltip|{{#rreplace:{{{tooltip|}}}|@@@@|{{#var:ii:tooltip}}}}}}<!-- |
-->{{#vardefine:ii:tooltip|{{#rreplace:{{{tooltip|}}}|@@@@|{{#var:ii:tooltip}}}}}}<!-- |
||
Linha 587: | Linha 609: | ||
-->{{#vardefine:ii:consumable|{{{consumable|{{#dplvar:ii:info:consumable}}}}}}}<!-- |
-->{{#vardefine:ii:consumable|{{{consumable|{{#dplvar:ii:info:consumable}}}}}}}<!-- |
||
-->{{#vardefine:ii:placeable|{{{placeable|{{#if:{{#var:ii:idtile}}{{#var:ii:idwall}}|y}}}}}}}<!-- |
-->{{#vardefine:ii:placeable|{{{placeable|{{#if:{{#var:ii:idtile}}{{#var:ii:idwall}}|y}}}}}}}<!-- |
||
− | -->{{#if:{{#lstfltr:block/brick|/|{{#var:ii:types}}|/}}<!-- |
+ | -->{{#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 ---- |
||
Linha 596: | Linha 620: | ||
-->{{#vardefine:ii:sounds|<!-- |
-->{{#vardefine:ii:sounds|<!-- |
||
-->{{#vardefine:_tile_sound_mode|}}<!-- |
-->{{#vardefine:_tile_sound_mode|}}<!-- |
||
− | -->{{#ifexpr:{{#dplvar:ii:info:createWall}}>-1|<!-- |
+ | -->{{#ifexpr:{{#or:{{#dplvar:ii:info:createWall}}|-1}}>-1|<!-- |
-->{{#vardefine:_tile_sound_mode|wall}}<!-- |
-->{{#vardefine:_tile_sound_mode|wall}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 624: | Linha 648: | ||
-->{{#vardefine:ii:material|{{#dplvar:ii:info:material}}}}<!-- |
-->{{#vardefine:ii:material|{{#dplvar:ii:info:material}}}}<!-- |
||
-->{{#vardefine:ii:craftable|{{#dplvar:ii:info:craftable}}}}<!-- |
-->{{#vardefine:ii:craftable|{{#dplvar:ii:info:craftable}}}}<!-- |
||
− | //crafting cate/type |
+ | // crafting cate/type |
-->{{#if:{{#var:ii:name}}|<!-- |
-->{{#if:{{#var:ii:name}}|<!-- |
||
− | //is crafting material? |
+ | // is crafting material? |
-->{{#if:{{#var:ii:material}}|<!-- |
-->{{#if:{{#var:ii:material}}|<!-- |
||
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|crafting material}}}}<!-- add "crafting material" to types |
-->{{#vardefine:ii:types|{{#lstapp:{{#var:ii:types}}|/|crafting material}}}}<!-- add "crafting material" to types |
||
-->}}<!-- |
-->}}<!-- |
||
− | //is craftable? |
+ | // is craftable? |
-->{{#if:{{#var:ii:craftable}}|<!-- |
-->{{#if:{{#var:ii:craftable}}|<!-- |
||
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|craftable items}}}}<!-- add "craftable items" to listcat |
-->{{#vardefine:ii:listcats|{{#lstapp:{{#var:ii:listcats}}|/|craftable items}}}}<!-- add "craftable items" to listcat |
||
Linha 651: | Linha 675: | ||
-->{{getSetInfo|{{#var:ii:name}}|setbonuslist|sep=<br/>}}<!-- auto setbonus |
-->{{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}}}}}}<!-- |
-->{{#vardefine:ii:setbonus|{{#rreplace:{{{setbonus|}}}|@@@@|{{#var:ii:setbonus}}}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
Linha 744: | Linha 768: | ||
-->[[File:{{{imageold|}}}|{{l10n|item_infobox|imagealt:old|$name$={{#var:ii:lname}}}}|link=]]<!-- |
-->[[File:{{{imageold|}}}|{{l10n|item_infobox|imagealt:old|$name$={{#var:ii:lname}}}}|link=]]<!-- |
||
-->|<!-- |
-->|<!-- |
||
− | -->{{ |
+ | -->{{#if:{{bool|{{{autoimageold|{{options/get|item infobox|autoimageold}}}}}|y}}|<!-- |
⚫ | |||
+ | -->|{{#if:{{#vardefineecho:ii:temp:extold|{{{extold|{{options/get|item infobox|extold}}}}}}}|<!-- |
||
⚫ | |||
+ | -->}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->}}}}}<!-- |
-->}}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
− | // placed image |
+ | // placed image (full mode or (voidView and placeable)) |
− | -->{{#if:{{#ifeq:{{#var:imagemode}}|full|y}}{{#pos:{{#var:imagemode}}|placed}}|<!-- |
+ | -->{{#if:{{#ifeq:{{#var:imagemode}}|full|y}}{{#ifeq:{{#var:viewname}}|void|{{#if:{{#var:ii:placeable}}|y}}}}{{#pos:{{#var:imagemode}}|placed}}|<!-- |
-->{{#vardefine:ii:imageplaced|{{{imageplacedalt|<!-- |
-->{{#vardefine:ii:imageplaced|{{{imageplacedalt|<!-- |
||
-->{{#if:{{{imageplaced|}}}|<!-- |
-->{{#if:{{{imageplaced|}}}|<!-- |
||
-->[[File:{{{imageplaced|}}}|{{l10n|item_infobox|imagealt:placed|$name$={{#var:ii:lname}}}}|link=]]<!-- |
-->[[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=]]<!-- |
||
+ | -->}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->}}}}}<!-- |
-->}}}}}<!-- |
||
Linha 764: | Linha 796: | ||
-->[[File:{{{imageequipped|}}}|{{l10n|item_infobox|imagealt:equipped|$name$={{#var:ii:lname}}}}|link=]]<!-- |
-->[[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=]]<!-- |
||
+ | -->}}}}<!-- |
||
-->}}<!-- |
-->}}<!-- |
||
-->}}}}}<!-- |
-->}}}}}<!-- |
||
Linha 790: | Linha 826: | ||
-->{{#vardefine:ii:types|{{#lstuniq:{{#var:ii:types}}|/|/}}}}<!-- |
-->{{#vardefine:ii:types|{{#lstuniq:{{#var:ii:types}}|/|/}}}}<!-- |
||
-->{{#if:{{#var:cate}}|<!-- |
-->{{#if:{{#var:cate}}|<!-- |
||
− | -->{{#lstmap:{{#var:ii:types}}|/|@@@@|<esc>[[Category:{{#or:{{l10n|item_infobox|typecate:@@@@}}|{{tr|{{ucfirst:@@@@}} items|link=y}}}}]]</esc>|}}<!-- |
+ | -->{{#lstmap:{{#var:ii:types}}|/|@@@@|<esc>[[Category:{{#or:{{l10n|item_infobox|typecate:{{lc:@@@@}}}}|{{tr|{{ucfirst:@@@@}} items|link=y}}}}]]</esc>|}}<!-- |
− | -->{{#lstmap:{{#var:ii:listcats}}|/|@@@@|<esc>[[Category:{{#or:{{l10n|item_infobox|listcat:@@@@}}|{{tr|{{ucfirst:@@@@}}|link=y}}}}]]</esc>|}}<!-- |
+ | -->{{#lstmap:{{#var:ii:listcats}}|/|@@@@|<esc>[[Category:{{#or:{{l10n|item_infobox|listcat:{{lc:@@@@}}}}|{{tr|{{ucfirst:@@@@}}|link=y}}}}]]</esc>|}}<!-- |
-->{{#if:{{#var:ii:isArmorSet}}|<!-- |
-->{{#if:{{#var:ii:isArmorSet}}|<!-- |
||
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|[[Category:{{l10n|item_infobox|cate:vanitysets}}]]}}<!-- |
-->{{#if:{{#lstind:vanity|{{#var:ii:types}}|/}}|[[Category:{{l10n|item_infobox|cate:vanitysets}}]]}}<!-- |
||
Linha 832: | Linha 868: | ||
-->|image={{#var:ii:imagealt|{{#var:ii:image|{{#var:ii:imageplaced|{{#var:ii:imageequipped}}}}}}}}<!-- |
-->|image={{#var:ii:imagealt|{{#var:ii:image|{{#var:ii:imageplaced|{{#var:ii:imageequipped}}}}}}}}<!-- |
||
-->|imagefile={{#var:ii:imagefile|{{{image|{{#var:ii:name}}.{{{ext|png}}}}}}}}<!-- |
-->|imagefile={{#var:ii:imagefile|{{{image|{{#var:ii:name}}.{{{ext|png}}}}}}}}<!-- |
||
+ | -->|imageplaced={{#var:ii:imageplaced}}<!-- |
||
+ | -->|imageequipped={{#var:ii:imageequipped}}<!-- |
||
-->|autoswing={{#var:ii:autoswing}}<!-- |
-->|autoswing={{#var:ii:autoswing}}<!-- |
||
-->|stack={{#var:ii:stack}}<!-- |
-->|stack={{#var:ii:stack}}<!-- |
||
Linha 845: | Linha 883: | ||
-->|velocity={{#var:ii:velocity}}<!-- |
-->|velocity={{#var:ii:velocity}}<!-- |
||
-->|knockback={{#var:ii:knockback}}<!-- |
-->|knockback={{#var:ii:knockback}}<!-- |
||
+ | -->|research={{#var:ii:sacrifices}}<!-- |
||
-->|rare={{#var:ii:rawrare}}<!-- |
-->|rare={{#var:ii:rawrare}}<!-- |
||
-->|sell={{#var:ii:sell}}<!-- |
-->|sell={{#var:ii:sell}}<!-- |
||
Linha 851: | Linha 890: | ||
-->|hammer={{#var:ii:hammer}}<!-- |
-->|hammer={{#var:ii:hammer}}<!-- |
||
-->|bait={{#ifexpr:{{#var:ii:bait}}|{{#var:ii:bait}}}}<!-- |
-->|bait={{#ifexpr:{{#var:ii:bait}}|{{#var:ii:bait}}}}<!-- |
||
− | -->|fishing={{#ifexpr:{{#var:ii:fishing}}|{{#var:ii:fishing}}}}<!-- |
+ | -->|fishing={{#iferror:{{#ifexpr:{{#var:ii:fishing}}|{{#var:ii:fishing}}}}|{{#var:ii:fishing}}}}<!-- |
-->|bonus={{#var:ii:tileboost}}<!-- |
-->|bonus={{#var:ii:tileboost}}<!-- |
||
-->|toolspeed={{#var:ii:toolspeed}}<!-- |
-->|toolspeed={{#var:ii:toolspeed}}<!-- |
||
Linha 892: | Linha 931: | ||
| image = Wikitext |
| image = Wikitext |
||
| imagefile = String |
| imagefile = String |
||
+ | | imageplaced = Wikitext |
||
+ | | imageequipped = Wikitext |
||
| autoswing = Boolean |
| autoswing = Boolean |
||
− | | stack = |
+ | | stack = Wikitext (size=500) |
| consumable = Boolean |
| consumable = Boolean |
||
| hardmode = Boolean |
| hardmode = Boolean |
||
Linha 904: | Linha 945: | ||
| velocity = Wikitext |
| velocity = Wikitext |
||
| knockback = Wikitext |
| knockback = Wikitext |
||
+ | | research = Wikitext (size=1000) |
||
| rare = Wikitext |
| rare = Wikitext |
||
| buy = Wikitext |
| buy = Wikitext |
||
Linha 910: | Linha 952: | ||
| pick = Wikitext (size=1000) |
| pick = Wikitext (size=1000) |
||
| hammer = Wikitext (size=1000) |
| hammer = Wikitext (size=1000) |
||
− | | fishing = |
+ | | fishing = Wikitext (size=1000) |
| bait = Integer |
| bait = Integer |
||
| bonus = Wikitext |
| bonus = Wikitext |
||
Linha 930: | Linha 972: | ||
}}<!-- |
}}<!-- |
||
− | -->{{i18n-ready}}{{lua|Iteminfo}}{{doc}} |
+ | -->{{i18n-ready}}{{lua|Iteminfo}}{{doc}} |
+ | [[Category:Item infobox| ]] |
||
+ | {{language info|en=Template:Item infobox}} |
||
+ | </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 é 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
e defina-o para o ID do item (alternativamente:auto
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 é 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 ou definida aqui substituirá os parâmetros e da predefinição, respectivamente
| |||
| auto |
Ativa data automática | 465 |
Também pode ser (veja o texto acima).
| ||
| id |
ID do item | ✔️ | 465 |
A coleção de dados automática para é 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 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 é para línguas que possuem uma tradução dentro do jogo ( , (German), (Spanish), (French), (Italian), (Polish), (Portuguese), (Russian), (Chinese)), e para 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
|
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 and then for the . 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 is set to (i.e, setting it to will also enable it – so refrain from doing that).
| ||
| imagemode |
Controls image selection | placed/equipped |
full |
If set to (which will only be the default for the ), the template will attempt to display all different types of images mentioned above. If not set to , it will only attempt to display the main image (which will be the case for other s by default, e.g. ), for performance reasons. It is possible, however, to enable (attempted) display of certain image types even if the mode is not : Set the parameter to , , , 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 will cause the template to use the standard 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 in the top-right corner of the infobox. Hover text is determined by ("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:
| |
| 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: , , , , and . 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 contains . Note that because this parameter is only sensible for set item infoboxes – which don't use since it doesn't work with sets – its data will always be generated automatically (instead of only when 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 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 is , a default value of 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 , 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 , , or to .
| ||
| 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 and .
| ||
Buff- & Debuff-related parameters | |||||
| bufftype |
Type of the status effect | ✔️ | Mostly used internally. Can be or .
| ||
| idbuff |
Buff ID | ✔️ | |||
| buff |
Buff provided | ✔️ | |||
| bufflink |
Buff link target | ✔️ | |||
| bufftip |
Buff tooltip | ✔️ | |||
| duration |
Buff duration | ✔️[1] | |||
| debuff |
Debuff inflicted | ❌ | As a shortcut for and , 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 .
| ||
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 in Terraria.
| ||
| idwall |
Wall ID | ✔️ | |||
| idarmor |
Armor ID | ✔️ | |||
| idbuffshow |
Vanity buff ID | ❌ | |||
Back-end-related parameters | |||||
| cate |
Toggles categorization | ❌ | no |
Set to to force categorization when it is disabled by default (on non-mainspace pages). Set to to disable categorization.
| |
| listexclude |
Toggles categorization | ❌ | yes |
no |
Set to to disable categorization. Overrides cate=yes , but not cate=no .
|
| cargo |
Toggles cargo data storage | ❌ | no |
Set to to force cargo data storage when it is disabled by default (on non-mainspace pages). Set to to disable cargo data storage. Note that setting it to anything else (e.g. ) also disables cargo data storage, so please stick to the unambiguous .
| |
| listcat |
Categorization | ✔️ | Supplemental category names to include the current item in a DPL list, e.g. causes the item to display at the Arrows page. Separate multiple categories with a slash character ( ). The following categories will be added automatically:
| ||
| tag or | tags |
Categorization | ✔️ | Supplemental category names to appropriately categorize the item. Can contain any of the following (separate multiple with a slash character ( ):
All other values will have no effect. All tags will be stored to cargo for querying. | ||
| allversions |
Platform version availability | ✔️ | Set to 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 does not contain , it will be detected automatically based on the result of {{eversions|<item name>}} (even though might not be set!). Categorizes the page in all five version content categories (with the exception of Category:Japanese console content), if is determined.
| ||
| hardmode |
Hardmode-exclusivity | ✔️ | yes |
Set to 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.
|
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
, and table
(additionally void
). They can be selected via the test
(aliases: $view
, $mode
) parameter. Each view has an own subpage which contains the code for the respective output.
$output
View | Description | Subpage |
---|---|---|
|
Completely custom output. Requires a 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 output.)
|
/customView |
(default) |
Standard infobox-style output. | /infoboxView |
|
Displays the item as formatted by {{item}} .
|
/itemView |
|
Displays an entire table row (including the row separator, |- ). Requires a parameter that defines which columns are to be displayed.
|
/tableView |
|
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:
- Predefinição:Item infobox/damagetype
- Predefinição:Item infobox/infoboxView
- Predefinição:Item infobox/initOptions
- Predefinição:Item infobox/itemView
- Predefinição:Item infobox/l10n
- Predefinição:Item infobox/options
- Predefinição:Item infobox/rangebonus
- Predefinição:Item infobox/tableView
- Predefinição:Item infobox/tableView/baitpower
- Predefinição:Item infobox/tableView/buff
- Predefinição:Item infobox/tableView/buffduration
- Predefinição:Item infobox/tableView/bufftip
- Predefinição:Item infobox/tableView/buy
- Predefinição:Item infobox/tableView/damage
- Predefinição:Item infobox/tableView/dimensions
- Predefinição:Item infobox/tableView/dimensions-compact
- Predefinição:Item infobox/tableView/fishing
- Predefinição:Item infobox/tableView/idtile
- Predefinição:Item infobox/tableView/idtile-sortbysubid
- Predefinição:Item infobox/tableView/idwall
- Predefinição:Item infobox/tableView/imagebuff
- Predefinição:Item infobox/tableView/imageequipped
- Predefinição:Item infobox/tableView/imageplaced
- Predefinição:Item infobox/tableView/item
- Predefinição:Item infobox/tableView/item2cells
- Predefinição:Item infobox/tableView/item2cells-anchor
- Predefinição:Item infobox/tableView/item2cells-anchor-nolink
- Predefinição:Item infobox/tableView/item2cells-nolink
- Predefinição:Item infobox/tableView/makenpcid
- Predefinição:Item infobox/tableView/mount
- Predefinição:Item infobox/tableView/projectile
- Predefinição:Item infobox/tableView/projectile2cells
- Predefinição:Item infobox/tableView/rarity
- Predefinição:Item infobox/tableView/sacrifices
- Predefinição:Item infobox/tableView/sell
- Predefinição:Item infobox/tableView/sell-alignright
- Predefinição:Item infobox/tableView/size-compact
- Predefinição:Item infobox/tableView/source
- Predefinição:Item infobox/tableView/tooltip
- Predefinição:Item infobox/tableView/usetime
- Predefinição:Item infobox/tableView/velocity
- Predefinição:Item infobox/voidView
See also
- {{npc infobox}}