Jump to content

Template:Infobox item: Difference between revisions

From Megabonk Wiki
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
{| class="infobox" style="width:240px; float:right; margin:0 0 12px 12px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:12px; overflow:hidden; box-shadow:0 4px 14px rgba(0,0,0,.14); font-size:90%; text-align:left; line-height:1.45;"
{| class="infobox" style="width:240px; float:right; margin:0 0 12px 12px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:12px; overflow:hidden; box-shadow:0 4px 14px rgba(0,0,0,.14); font-size:90%; text-align:left; line-height:1.45;"
|-
|-
! colspan="2" style="text-align:center; font-size:1.15em; padding:.45em; color:#FFD47F; background:rgba(255,255,255,.03);" | {{{name|{{PAGENAME}}}}}
! colspan="2" style="text-align:center; font-size:1.15em; padding:.45em; color:{{#switch: {{{rarity|}}} | Default = white | Common = green | Uncommon = blue | Rare = magenta | Epic = purple | Legendary = #FFD700 | #default = #FFD47F }}; background:rgba(255,255,255,.03);" | {{{name|{{PAGENAME}}}}}
|-
|-
| colspan="2" style="text-align:center; padding:.3em;" | [[File:{{{image|{{PAGENAME}}.png}}}|96px|center|{{{name|}}}]]
| colspan="2" style="text-align:center; padding:.3em;" | [[File:{{{image|{{PAGENAME}}.png}}}|96px|center|{{{name|}}}]]
|-
|-
! style="width:40%; white-space:nowrap; padding:.4em; background:rgba(255,212,127,.08); border-radius:6px;" | Rarity
! style="width:40%; white-space:nowrap; padding:.4em; background:rgba(255,212,127,.08); border-radius:6px;" | Rarity
| style="padding:.4em;" | {{{rarity|Unspecified}}}
| style="padding:.4em;" | {{#switch: {{{rarity|}}}
  | Default = <span style="color: white; font-weight:bold;">Default</span>
  | Common = <span style="color: green; font-weight:bold;">Common</span>
  | Uncommon = <span style="color: blue; font-weight:bold;">Uncommon</span>
  | Rare = <span style="color: magenta; font-weight:bold;">Rare</span>
  | Epic = <span style="color: purple; font-weight:bold;">Epic</span>
  | Legendary = <span style="color: &#35;FFD700; font-weight:bold;">Legendary</span>
  | #default = {{{rarity|}}}
}}
|-
|-
! style="width:40%; white-space:nowrap; padding:.4em; background:rgba(255,212,127,.08); border-radius:6px;" | Type
! style="width:40%; white-space:nowrap; padding:.4em; background:rgba(255,212,127,.08); border-radius:6px;" | Type
Line 17: Line 25:
</includeonly><noinclude>
</includeonly><noinclude>
== Usage ==
== Usage ==
This template creates a lean infobox for items in Megabonk, focusing only on core identification details.
This template creates a lean infobox for items in Megabonk. It automatically colors both the item's name and its rarity text based on the rarity value.
 
Unlock conditions and strategic notes should be placed in the main body of the article under their own headings.


=== Parameters ===
=== Parameters ===
* '''name''': The name of the item.
* '''name''': The name of the item.
* '''rarity''': The item's rarity (e.g., Default, Common, Rare, Epic, Legendary).
* '''rarity''': The item's rarity (Default, Common, Uncommon, Rare, Epic, Legendary).
* '''effect''': The in-game description of the item's effect.
* '''effect''': The in-game description of the item's effect.
* '''image''': (Optional) The file name for the item's image.
* '''image''': (Optional) The file name for the item's image.
Line 31: Line 37:
<pre>
<pre>
{{Infobox item
{{Infobox item
| name    = Boss Buster
| name    = Chonkplate
| image    = Boss Buster.png
| image    = Item_Chonkplate.png
| rarity  = Common
| rarity  = Legendary
| type    = Item
| type    = Item
| effect  = +15% more damage to Elites and Bosses.
| effect  = Grants +20% Lifesteal and allows healing above max HP to create an Overheal shield.
}}
}}
</pre>
</pre>
</noinclude>

Latest revision as of 16:01, 4 October 2025

Usage

This template creates a lean infobox for items in Megabonk. It automatically colors both the item's name and its rarity text based on the rarity value.

Parameters

  • name: The name of the item.
  • rarity: The item's rarity (Default, Common, Uncommon, Rare, Epic, Legendary).
  • effect: The in-game description of the item's effect.
  • image: (Optional) The file name for the item's image.
  • type: (Optional) The type of item. Defaults to "Item".

Example Usage

{{Infobox item
| name     = Chonkplate
| image    = Item_Chonkplate.png
| rarity   = Legendary
| type     = Item
| effect   = Grants +20% Lifesteal and allows healing above max HP to create an Overheal shield.
}}