Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:InfoboxItem: Difference between revisions

Template page
No edit summary
No edit summary
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
{| class="wikitable" style="width: 300px;"
{| class="wikitable infobox-item"
{{#if:{{{name|}}}|
! colspan="2" style="text-align:center; font-size:1.5em" {{!}} {{{name}}}
{{!}}-
}}
{{#if:{{{image|}}}|
{{#if:{{{image|}}}|
|-
{{!}} colspan="2" style="text-align:center; background: var(--color-surface-2); padding: 1em;" {{!}} [[File:{{{image}}}|64px]]
! Image
{{!}}-
| [[File:{{{image}}}|64px]]
}}
}}
{{#if:{{{categories|}}}|
{{#if:{{{categories|}}}|
|-
! Categories:
! Categories
{{!}} {{{categories}}}
| {{{categories}}}
{{!}}-
}}
}}
{{#if:{{{consumable|}}}|
{{#if:{{{consumable|}}}|
|-
! Consumable:
! Consumable
{{!}} {{{consumable}}}
| {{{consumable}}}
{{!}}-
}}
}}
{{#if:{{{maxstack|}}}|
{{#if:{{{maxstack|}}}|
|-
! Max Stack:
! Max Stack
{{!}} {{{maxstack}}}
| {{{maxstack}}}
{{!}}-
}}
}}
{{#if:{{{dropondeath|}}}|
{{#if:{{{dropondeath|}}}|
|-
! Drop On Death:
! Drop On Death
{{!}} {{{dropondeath}}}
| {{{dropondeath}}}
{{!}}-
}}
}}
{{#if:{{{maxdurability|}}}|
{{#if:{{{maxdurability|}}}|
|-
! Max Durability:
! Max Durability
{{!}} {{{maxdurability}}}
| {{{maxdurability}}}
{{!}}-
}}
{{#if:{{{armor|}}}|
{{{armor}}}
}}
{{#ifeq:{{{weapon|}}}||<!-- vacío -->|
{{{weapon}}}
}}
{{#ifeq:{{{tool|}}}||<!-- vacío -->|
{{{tool}}}
}}
{{#ifeq:{{{interactions|}}}||<!-- vacío -->|
{{{interactions}}}
}}
}}
|}
|}
 
<noinclude>
 
== Usage ==
<div style="display:{{#if:{{{image|}}}|block|none}}; text-align:center" class="item-image">
<pre>
[[File:{{{image}}}|64px]]
{{InfoBoxItem
</div>
| name = Adamantite Chestplate
 
| image = Armor_Chest_Adamantite.png
<div style="display:{{#if:{{{categories|}}}|block|none}};" class="item-section">
| categories = Armor - Adamantite
<b>Categories:</b> {{{categories}}}
| consumable = False
</div>
| maxstack = 1
 
| dropondeath = False
<div style="display:{{#if:{{{consumable|}}}|block|none}};" class="item-section">
| maxdurability = 150
<b>Consumable:</b> {{{consumable}}}
| armor = {{ArmorBlock
</div>
  | stats = {{ArmorRow|Health|+24}}
 
  | resistance = {{ArmorRow|Physical|14.4%}}
<div style="display:{{#if:{{{maxstack|}}}|block|none}};" class="item-section">
{{ArmorRow|Projectile|14.4%}}
<b>Max Stack:</b> {{{maxstack}}}
  | enhancement = {{ArmorRow|Light|6.0%}}
</div>
  | slot = Chest
 
  | base = 0
<div style="display:{{#if:{{{dropondeath|}}}|block|none}};" class="item-section">
  | cosmetics = Overtop
<b>Drop On Death:</b> {{{dropondeath}}}
  }}
</div>
}}
 
</pre>
<div style="display:{{#if:{{{maxdurability|}}}|block|none}};" class="item-section">
== Parameters ==
<b>Max Durability:</b> {{{maxdurability}}}
* '''name''' - Item name (appears as header)
</div>
* '''image''' - Item icon (64px)
{{{armor|}}}
* '''categories''' - Item categories
{{{weapon|}}}
* '''consumable''' - True/False
<div style="display:{{#if:{{{tool|}}}|block|none}};" class="item-section">
* '''maxstack''' - Maximum stack size
<b>Tool Stats</b><br>
* '''dropondeath''' - True/False
{{{tool}}}
* '''maxdurability''' - Maximum durability value
</div>
* '''armor''' - Armor stats (use ArmorBlock template)
 
* '''weapon''' - Weapon stats (use WeaponBlock template)
<div style="display:{{#if:{{{recipe|}}}|block|none}};" class="item-section">
* '''tool''' - Tool stats (use ToolBlock template)
<b>Recipe</b><br>
* '''interactions''' - Interaction information
{{{recipe}}}
[[Category:Templates]]
</div>
</noinclude>
 
<div style="display:{{#if:{{{interactions|}}}|block|none}};" class="item-section">
<b>Interactions</b><br>
{{{interactions}}}
</div>

Latest revision as of 23:50, 18 January 2026

{{InfoBoxItem
| name = Adamantite Chestplate
| image = Armor_Chest_Adamantite.png
| categories = Armor - Adamantite
| consumable = False
| maxstack = 1
| dropondeath = False
| maxdurability = 150
| armor = {{ArmorBlock
  | stats = {{ArmorRow|Health|+24}}
  | resistance = {{ArmorRow|Physical|14.4%}}
{{ArmorRow|Projectile|14.4%}}
  | enhancement = {{ArmorRow|Light|6.0%}}
  | slot = Chest
  | base = 0
  | cosmetics = Overtop
  }}
}}

Parameters

edit source
  • name - Item name (appears as header)
  • image - Item icon (64px)
  • categories - Item categories
  • consumable - True/False
  • maxstack - Maximum stack size
  • dropondeath - True/False
  • maxdurability - Maximum durability value
  • armor - Armor stats (use ArmorBlock template)
  • weapon - Weapon stats (use WeaponBlock template)
  • tool - Tool stats (use ToolBlock template)
  • interactions - Interaction information