Template:Item: Difference between revisions

From StrawberryMC
CmdBlock00 (talk | contribs)
mNo edit summary
CmdBlock00 (talk | contribs)
mNo edit summary
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
== Parameters ==
== Parameters ==
 
{| class="wikitable"
* '''name'''
|+ Caption text
* '''image'''
|-
* '''lore'''
! Parameter !! Extra Information !! Required<br>(Y/N)
* '''[[Item Type|type]]'''
|-
* '''[[Rarity|rarity]]'''
| ''name'' ||The item's name (e.g. Iron Sword)|| Yes
* '''[[Magic Find|magicFind]]''', '''[[Fortune|fortune]]''', '''[[Blast|blast]]''' – Numerical stats 
|-
* '''moneyMulti''', '''xpMulti''' – Multiplier stats (e.g. `50%`) 
| ''image'' ||An image of the item|| Yes
* '''[[Speed|speed]]''', '''[[Digging Power|diggingPower]]''' – Numeric only 
|-
| ''lore'' ||Do <nowiki>"<br>"</nowiki> for new line|| No
|-
| ''[[Rarity|rarity]]'' ||The item's rarity|| Yes
|-
| ''type'' ||The item's type (e.g. food, weapon)|| Yes
|-
| ''[[stats]]'' ||Use the stat as the parameter || No
|-
|}
[[Magic Find|magicFind]] [[Fortune|fortune]] [[Blast|blast]] income exp [[Speed|speed]] [[Digging Power|diggingPower]]


== Example ==
== Example ==
<pre>
{{Item
{{Item
  | name          = Item Name
  | name          = Item Name
Line 27: Line 36:
  | diggingPower  = 300
  | diggingPower  = 300
}}
}}
</pre>
<div class="mw-code"><nowiki>{{Item
!!WARNING!! Make sure to set stats to 0 instead of deleting them!
== Preview ==
{{Item
  | name          = Item Name
  | name          = Item Name
  | image        = File:Placeholder.png
  | image        = File:Placeholder.png
Line 43: Line 49:
  | speed        = 120
  | speed        = 120
  | diggingPower  = 300
  | diggingPower  = 300
}}
}}</nowiki></div>
{{Item
[[Category:Templates]]
| name          = Item Name
| image        = File:Placeholder.png
| lore          = Nothing.
| type          = tool
| rarity        = epic
| magicFind    = 0
| fortune      = 0
| blast        = 0
| moneyMulti    = 0
| xpMulti      = 0
| speed        = 0
| diggingPower  = 0
}}
</noinclude>
</noinclude>
<includeonly>
<includeonly>
<!-- Template:Item Display Code -->
<!-- Template:Item Display Code -->
 
<div class="infobox">
<div class="itembox">
<div class="infobox-title item-rarity-{{{rarity|common}}}">'''{{{name|Unnamed Item}}}'''
<div class="item-name item-rarity-{{{rarity|common}}}">'''{{{name|Unnamed Item}}}'''
</div>
</div>
<div class="imagebox">
<div class="image">
[[{{{image|File:Placeholder.png}}}|200px|center]]
[[{{{image|File:Placeholder.png}}}|200px|center]]
</div>
</div>
Line 71: Line 64:
{{{lore|}}}
{{{lore|}}}
</div>
</div>
<div class="item-rarity item-rarity-{{{rarity|common}}}">
<!-- Info -->
'''<span class="item-rarity-label">Rarity:</span> {{ucfirst:{{{rarity|common}}}}}'''
<div class="infobox-header"><div class="infobox-htxt">Information</div></div>
</div>
<div class="item-rarity item-rarity-{{{rarity|common}}}"><span class="infobox-label">Rarity:</span> {{ucfirst:{{{rarity|common}}}}}'''</div>
  <!-- Stats -->
<div class="item-info"><span class="infobox-label">Type:</span> {{ucfirst:{{{type}}}}}</div>
{{#ifexpr:({{{magicFind|}}} + {{{fortune|}}} + {{{blast|}}} + {{{moneyMulti|}}} + {{{xpMulti|}}} + {{{speed|}}} + {{{diggingPower|}}}) > 0|<h2>Statistics</h2>|<div style= display: none;></div>}}
<!-- Stats -->
  {{#ifexpr:{{{magicFind|}}} > 0|<div class="item-stat"><span class="item-stat-label">Magic Find<span class="tooltip">Increases chance for rare drops</span>:</span> {{{magicFind}}}</div>|<div style= display: none;></div>}}
{{#iferror: {{#expr:{{{magicFind}}}{{{fortune}}}{{{blast}}}{{{moneyMulti}}}{{{xpMulti}}}{{{speed}}}{{{diggingPower}}}}}||{{#ifexpr:({{{magicFind|}}} + {{{fortune|}}} + {{{blast|}}} +  
  {{#ifexpr:{{{fortune|}}} > 0|<div class="item-stat"><span class="item-stat-label">Fortune<span class="tooltip">Increases item yield</span>:</span> {{{fortune}}}</div>|<div style= display: none;></div>}}
{{{moneyMulti|}}} + {{{xpMulti|}}} + {{{speed|}}} + {{{diggingPower|}}}) > 0|<div class="infobox-header"><div class="infobox-htxt">Statistics</div></div>}}}}
  {{#ifexpr:{{{blast|}}} > 0|<div class="item-stat"><span class="item-stat-label">Blast<span class="tooltip">Blast radius or power</span>:</span> {{{blast}}}</div>|<div style= display: none;></div>}}
{{#iferror:{{#expr:{{{magicFind|}}} > 0}}|<div style= display:none></div>|<div class="item-stat"><span class="infobox-label">Magic Find:</span> {{{magicFind}}}</div>}}
  {{#ifexpr:{{{moneyMulti|}}} > 0|<div class="item-stat"><span class="item-stat-label">Money Multiplier<span class="tooltip">Increases coin gain</span>:</span> +{{{moneyMulti}}}</div>|<div style= display: none;>}}
{{#iferror: {{#expr:{{{fortune|}}} > 0}}|<div style= display:none></div>|<div class="item-stat"><span class="infobox-label">Fortune:</span> {{{fortune}}}</div>}}
  {{#ifexpr:{{{xpMulti|}}} > 0|<div class="item-stat"><span class="item-stat-label">XP Multiplier<span class="tooltip">Increases XP earned</span>:</span> +{{{xpMulti}}}</div>|<div style= display: none;></div>}}
{{#iferror:{{#expr:{{{blast|}}} > 0}}|<div style= display:none></div>| <div class="item-stat"><span class="infobox-label">Blast:</span> {{{blast}}}</div>}}
  {{#ifexpr:{{{speed|}}} > 0|<div class="item-stat"><span class="item-stat-label">Speed<span class="tooltip">Affects movement speed</span>:</span> {{{speed}}}</div>|<div style= display: none;></div>}}
{{#iferror:{{#expr:{{{moneyMulti|}}} > 0}}|<div style= display:none></div>|<div class="item-stat"><span class="infobox-label">Money Multiplier:</span> +{{{moneyMulti}}}</div>}}
  {{#ifexpr:{{{diggingPower|}}} > 0|<div class="item-stat"><span class="item-stat-label">Digging Power<span class="tooltip">Damage you deal to enemies</span>:</span> {{{diggingPower}}}</div>|<div style= display: none;></div>}}
{{#iferror:{{#expr:{{{xpMulti|}}} > 0}}|<div style= display:none></div>|<div class="item-stat"><span class="infobox-label">XP Multiplier:</span> +{{{xpMulti}}}</div>}}
{{#iferror:{{#expr:{{{speed|}}} > 0}}|<div style= display:none></div>|<div class="item-stat"><span class="infobox-label">Speed:</span> {{{speed}}}</div>}}
{{#iferror:{{#expr:{{{diggingPower|}}} > 0}}|<div style= display:none></div>|<div class="item-stat"><span class="infobox-label">Digging Power:</span> {{{diggingPower}}}</div>}}
</div>
</div>

Latest revision as of 20:01, 6 November 2025

Parameters

Caption text
Parameter Extra Information Required
(Y/N)
name The item's name (e.g. Iron Sword) Yes
image An image of the item Yes
lore Do "<br>" for new line No
rarity The item's rarity Yes
type The item's type (e.g. food, weapon) Yes
stats Use the stat as the parameter No

magicFind fortune blast income exp speed diggingPower

Example

Item Name

Nothing.

Information
Rarity: Epic
Type: Tool
Statistics
Magic Find: 10
Fortune: 25
Blast: 100
Money Multiplier: +50
XP Multiplier: +100
Speed: 120
Digging Power: 300
{{Item | name = Item Name | image = File:Placeholder.png | lore = Nothing. | type = tool | rarity = epic | magicFind = 10 | fortune = 25 | blast = 100 | moneyMulti = 50 | xpMulti = 100 | speed = 120 | diggingPower = 300 }}