Template:Infobox item: Difference between revisionsGive feedback
Infobox rework to match in game item tooltips more |
added support for 0 main stats |
||
| Line 163: | Line 163: | ||
-->{{#ifexpr:{{#var:p1_has_alt}} = 1 |<!-- | -->{{#ifexpr:{{#var:p1_has_alt}} = 1 |<!-- | ||
** Multiple mains + alt below separately ** | ** Multiple mains + alt below separately ** | ||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:p1_bg}};" class="passive-alt-stats" | --><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:p1_bg}};" class="passive-alt-stats"><!-- | ||
-->{{#if:{{{passive1_alt1|}}}|<div class="passive-stat">{{{passive1_alt1}}}</div>}}<!-- | -->{{#if:{{{passive1_alt1|}}}|<div class="passive-stat">{{{passive1_alt1}}}</div>}}<!-- | ||
-->{{#if:{{{passive1_alt2|}}}|<div class="passive-stat">{{{passive1_alt2}}}</div>}}<!-- | -->{{#if:{{{passive1_alt2|}}}|<div class="passive-stat">{{{passive1_alt2}}}</div>}}<!-- | ||
| Line 172: | Line 172: | ||
-->{{#if:{{{passive1_alt7|}}}|<div class="passive-stat">{{{passive1_alt7}}}</div>}}<!-- | -->{{#if:{{{passive1_alt7|}}}|<div class="passive-stat">{{{passive1_alt7}}}</div>}}<!-- | ||
--></div>}}<!-- | --></div>}}<!-- | ||
-->}}}} | -->}}|<!-- alt-only case (no mains, only alt stats) --><!-- | ||
-->{{#ifexpr:{{#var:p1_has_alt}} = 1 |<!-- | |||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:p1_bg}};" class="passive-alt-stats"><!-- | |||
-->{{#if:{{{passive1_alt1|}}}|<div class="passive-stat">{{{passive1_alt1}}}</div>}}<!-- | |||
-->{{#if:{{{passive1_alt2|}}}|<div class="passive-stat">{{{passive1_alt2}}}</div>}}<!-- | |||
-->{{#if:{{{passive1_alt3|}}}|<div class="passive-stat">{{{passive1_alt3}}}</div>}}<!-- | |||
-->{{#if:{{{passive1_alt4|}}}|<div class="passive-stat">{{{passive1_alt4}}}</div>}}<!-- | |||
-->{{#if:{{{passive1_alt5|}}}|<div class="passive-stat">{{{passive1_alt5}}}</div>}}<!-- | |||
-->{{#if:{{{passive1_alt6|}}}|<div class="passive-stat">{{{passive1_alt6}}}</div>}}<!-- | |||
-->{{#if:{{{passive1_alt7|}}}|<div class="passive-stat">{{{passive1_alt7}}}</div>}}<!-- | |||
--></div>}}<!-- | |||
-->}} | |||
|-<!--start of passive2 section--> | |-<!--start of passive2 section--> | ||
{{#if:{{{passive2_description|}}}| | {{#if:{{{passive2_description|}}}| | ||
| Line 218: | Line 229: | ||
--></div><!-- | --></div><!-- | ||
-->{{#ifexpr:{{#var:p2_has_alt}} = 1 |<!-- | -->{{#ifexpr:{{#var:p2_has_alt}} = 1 |<!-- | ||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:p2_bg}};" class="passive-alt-stats"><!-- | --><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:p2_bg}};" class="passive-alt-stats"><!-- | ||
-->{{#if:{{{passive2_alt1|}}}|<div class="passive-stat">{{{passive2_alt1}}}</div>}}<!-- | |||
-->{{#if:{{{passive2_alt2|}}}|<div class="passive-stat">{{{passive2_alt2}}}</div>}}<!-- | |||
-->{{#if:{{{passive2_alt3|}}}|<div class="passive-stat">{{{passive2_alt3}}}</div>}}<!-- | |||
-->{{#if:{{{passive2_alt4|}}}|<div class="passive-stat">{{{passive2_alt4}}}</div>}}<!-- | |||
-->{{#if:{{{passive2_alt5|}}}|<div class="passive-stat">{{{passive2_alt5}}}</div>}}<!-- | |||
--></div>}}<!-- | |||
-->}}|<!-- alt-only case (no mains, only alt stats) --><!-- | |||
-->{{#ifexpr:{{#var:p2_has_alt}} = 1 |<!-- | |||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:p2_bg}};" class="passive-alt-stats"><!-- | |||
-->{{#if:{{{passive2_alt1|}}}|<div class="passive-stat">{{{passive2_alt1}}}</div>}}<!-- | -->{{#if:{{{passive2_alt1|}}}|<div class="passive-stat">{{{passive2_alt1}}}</div>}}<!-- | ||
-->{{#if:{{{passive2_alt2|}}}|<div class="passive-stat">{{{passive2_alt2}}}</div>}}<!-- | -->{{#if:{{{passive2_alt2|}}}|<div class="passive-stat">{{{passive2_alt2}}}</div>}}<!-- | ||
| Line 225: | Line 245: | ||
-->{{#if:{{{passive2_alt5|}}}|<div class="passive-stat">{{{passive2_alt5}}}</div>}}<!-- | -->{{#if:{{{passive2_alt5|}}}|<div class="passive-stat">{{{passive2_alt5}}}</div>}}<!-- | ||
--></div>}}<!-- | --></div>}}<!-- | ||
--> | -->}} | ||
|-<!--start of active 1 section--> | |-<!--start of active 1 section--> | ||
{{#if:{{{active1_description|}}}| | {{#if:{{{active1_description|}}}| | ||
| Line 279: | Line 299: | ||
--></div><!-- | --></div><!-- | ||
-->{{#ifexpr:{{#var:a1_has_alt}} = 1 |<!-- | -->{{#ifexpr:{{#var:a1_has_alt}} = 1 |<!-- | ||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:a1_bg}};" class="active-alt-stats"><!-- | --><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:a1_bg}};" class="active-alt-stats"><!-- | ||
-->{{#if:{{{active1_alt1|}}}|<div class="active-stat">{{{active1_alt1}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt2|}}}|<div class="active-stat">{{{active1_alt2}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt3|}}}|<div class="active-stat">{{{active1_alt3}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt4|}}}|<div class="active-stat">{{{active1_alt4}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt5|}}}|<div class="active-stat">{{{active1_alt5}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt6|}}}|<div class="active-stat">{{{active1_alt6}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt7|}}}|<div class="active-stat">{{{active1_alt7}}}</div>}}<!-- | |||
-->{{#if:{{{active1_alt8|}}}|<div class="active-stat">{{{active1_alt8}}}</div>}}<!-- | |||
--></div>}}<!-- | |||
-->}}|<!-- alt-only case (no mains, only alt stats) --><!-- | |||
-->{{#ifexpr:{{#var:a1_has_alt}} = 1 |<!-- | |||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:a1_bg}};" class="active-alt-stats"><!-- | |||
-->{{#if:{{{active1_alt1|}}}|<div class="active-stat">{{{active1_alt1}}}</div>}}<!-- | -->{{#if:{{{active1_alt1|}}}|<div class="active-stat">{{{active1_alt1}}}</div>}}<!-- | ||
-->{{#if:{{{active1_alt2|}}}|<div class="active-stat">{{{active1_alt2}}}</div>}}<!-- | -->{{#if:{{{active1_alt2|}}}|<div class="active-stat">{{{active1_alt2}}}</div>}}<!-- | ||
| Line 289: | Line 321: | ||
-->{{#if:{{{active1_alt8|}}}|<div class="active-stat">{{{active1_alt8}}}</div>}}<!-- | -->{{#if:{{{active1_alt8|}}}|<div class="active-stat">{{{active1_alt8}}}</div>}}<!-- | ||
--></div>}}<!-- | --></div>}}<!-- | ||
--> | -->}} | ||
|- | |- | ||
{{#if:{{{active2_description|}}}| | {{#if:{{{active2_description|}}}| | ||
| Line 326: | Line 358: | ||
--></div><!-- | --></div><!-- | ||
-->{{#ifexpr:{{#var:a2_has_alt}} = 1 |<!-- | -->{{#ifexpr:{{#var:a2_has_alt}} = 1 |<!-- | ||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:a2_bg}};" class="active-alt-stats"><!-- | --><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:a2_bg}};" class="active-alt-stats"><!-- | ||
-->{{#if:{{{active2_alt1|}}}|<div class="active-stat">{{{active2_alt1}}}</div>}}<!-- | |||
-->{{#if:{{{active2_alt2|}}}|<div class="active-stat">{{{active2_alt2}}}</div>}}<!-- | |||
-->{{#if:{{{active2_alt3|}}}|<div class="active-stat">{{{active2_alt3}}}</div>}}<!-- | |||
-->{{#if:{{{active2_alt4|}}}|<div class="active-stat">{{{active2_alt4}}}</div>}}<!-- | |||
-->{{#if:{{{active2_alt5|}}}|<div class="active-stat">{{{active2_alt5}}}</div>}}<!-- | |||
--></div>}}<!-- | |||
-->}}|<!-- alt-only case (no mains, only alt stats) --><!-- | |||
-->{{#ifexpr:{{#var:a2_has_alt}} = 1 |<!-- | |||
--><div style="box-sizing:border-box; border-radius:8px; margin:6px auto; width:300px; max-width:280px; padding:4px 8px; background-color:{{#var:a2_bg}};" class="active-alt-stats"><!-- | |||
-->{{#if:{{{active2_alt1|}}}|<div class="active-stat">{{{active2_alt1}}}</div>}}<!-- | -->{{#if:{{{active2_alt1|}}}|<div class="active-stat">{{{active2_alt1}}}</div>}}<!-- | ||
-->{{#if:{{{active2_alt2|}}}|<div class="active-stat">{{{active2_alt2}}}</div>}}<!-- | -->{{#if:{{{active2_alt2|}}}|<div class="active-stat">{{{active2_alt2}}}</div>}}<!-- | ||
| Line 333: | Line 374: | ||
-->{{#if:{{{active2_alt5|}}}|<div class="active-stat">{{{active2_alt5}}}</div>}}<!-- | -->{{#if:{{{active2_alt5|}}}|<div class="active-stat">{{{active2_alt5}}}</div>}}<!-- | ||
--></div>}}<!-- | --></div>}}<!-- | ||
--> | -->}} | ||
|- | |- | ||
{{#if:{{{component1_name|}}}| | {{#if:{{{component1_name|}}}| | ||
Revision as of 04:19, 3 March 2026
Usage
Note: This template is not intended for direct use. Use {{Infobox item/auto}}.
This template creates an infobox for items. It automatically categorizes the pages it is transcluded onto in Category:Items.
Examples
Infobox for Deadlock items. Meant to be used with Infobox item/auto
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| item_name | item_name | Item name in english, used to autofill table | String | required |
| item_name_loc | item_name_loc | Localized item name | String | optional |
| item_icon | item_icon | Custom file. | File | optional |
| street_brawl | street_brawl | If it's a street brawl item, hide cost and tier
| Boolean | optional |
| item_type | item_type | Item type.
| String | optional |
| item_tier | item_tier | Item tier.
| Number | optional |
| souls | souls | Souls cost.
| Number | optional |
| component1_name | component1_name | Name of the component item it builds from.
| String | optional |
| component2_name | component2_name | Name of the other component item it builds from.
| String | optional |
| item_description | item_description | Item description. | String | suggested |
| item_stat1 | item_stat1 | no description | String | optional |
| item_stat2 | item_stat2 | no description | String | optional |
| item_stat3 | item_stat3 | no description | String | optional |
| item_stat4 | item_stat4 | no description | String | optional |
| item_stat5 | item_stat5 | no description | String | optional |
| item_stat6 | item_stat6 | no description | String | optional |
| item_stat7 | item_stat7 | no description | String | optional |
| passive1_cooldown | passive1_cooldown | no description | Number | optional |
| passive1_chargeup | passive1_chargeup | If the passive has a charge-up stat. | Number | optional |
| passive1_description | passive1_description | no description | String | optional |
| passive1_stat1 | passive1_stat1 | no description | String | optional |
| passive1_stat2 | passive1_stat2 | no description | String | optional |
| passive1_stat3 | passive1_stat3 | no description | String | optional |
| passive1_stat4 | passive1_stat4 | no description | String | optional |
| passive1_stat5 | passive1_stat5 | no description | String | optional |
| passive1_stat6 | passive1_stat6 | no description | String | optional |
| passive2_cooldown | passive2_cooldown | no description | Number | optional |
| passive2_description | passive2_description | no description | String | optional |
| passive2_stat1 | passive2_stat1 | no description | String | optional |
| passive2_stat2 | passive2_stat2 | no description | String | optional |
| passive2_stat3 | passive2_stat3 | no description | String | optional |
| passive2_stat4 | passive2_stat4 | no description | String | optional |
| passive2_stat5 | passive2_stat5 | no description | String | optional |
| active1_cooldown | active1_cooldown | no description | Number | optional |
| active1_description | active1_description | no description | String | optional |
| active1_stat1 | active1_stat1 | no description | String | optional |
| active1_stat2 | active1_stat2 | no description | String | optional |
| active1_stat3 | active1_stat3 | no description | String | optional |
| active1_stat4 | active1_stat4 | no description | String | optional |
| active1_stat5 | active1_stat5 | no description | String | optional |
| active1_stat6 | active1_stat6 | no description | String | optional |
| active1_stat7 | active1_stat7 | no description | String | optional |
| active1_stat8 | active1_stat8 | no description | String | optional |
| active2_description | active2_description | no description | String | optional |
| active2_stat1 | active2_stat1 | no description | String | optional |
| active2_stat2 | active2_stat2 | no description | String | optional |
| active2_stat3 | active2_stat3 | no description | String | optional |
| active2_stat4 | active2_stat4 | no description | String | optional |
| active2_stat5 | active2_stat5 | no description | String | optional |
| iscomponentof1_name | iscomponentof1_name | Name of the item it builds to. | String | optional |
| iscomponentof2_name | iscomponentof2_name | Name of the 2nd item it builds to. | String | optional |
| iscomponentof3_name | iscomponentof3_name | Name of the 3rd item it builds to. | String | optional |
| sound1 | sound1 | Sound file name. | File | optional |
| sound2 | sound2 | Sound file name. | File | optional |
| sound3 | sound3 | Sound file name. | File | optional |
| nocat | nocat | Sets whether this should categorize [[:Category:Items]] onto the transcluded page.
| Boolean | optional |