Template:Infobox item: Difference between revisions

From Modded Wiki
Jump to navigation Jump to search
mNo edit summary
Adding support for multiple DV's. Temporarily kept backwards-compatible until ALL pages have been updated
Line 8: Line 8:
{{infobox row|label=Durability|field={{{durability|None}}}}}
{{infobox row|label=Durability|field={{{durability|None}}}}}
{{infobox row|label=Stackable|field={{{stackable|?}}}}}
{{infobox row|label=Stackable|field={{{stackable|?}}}}}
{{infobox row|label=[[Data_Values|Data value]]{{#if:{{{data2|}}}|s|}}|field={{{data|{{#if:{{{datadec|}}}|<!--
{{infobox row|label=[[Data values|Data value]]{{#if:{{{data2|}}}|s|}}|field={{{data|{{#if:{{{datadec|}}}|<!--
 
---->|{{#if:{{{data1name|}}}|'''{{{data1name|}}}'''<br />| }}<!--
---->|{{#if:{{{data1name|}}}|'''{{{data1name|}}}'''<br />| }}<!--
----><sub>dec:</sub> {{{data1|00}}} <sub>hex:</sub> {{dec-hex|{{{data1|00}}} }}<br /><!--
----><sub>dec:</sub> {{{data1|00}}} <sub>hex:</sub> {{dec-hex|{{{data1|00}}} }}<br /><!--
The optional second data value.
The optional second data value.
---->{{#if:{{{data2|}}}|<!--
---->{{#if:{{{data2|}}}|<!--
------>{{#if:{{{data2name|}}}|'''{{{data2name|}}}'''<br />| }}<!--
------>{{#if:{{{data2name|}}}|'''{{{data2name|}}}'''<br />| }}<!--
Line 20: Line 17:
---->|}}<!--
---->|}}<!--
-->}} }}} }}
-->}} }}} }}
{{#if: {{{data|}}} | {{infobox row|label=[[Data_Values|Data value]]|field={{dv|{{{data}}} }} }} }}
{{#if: {{{multipledata|}}} | {{infobox row|label=[[Data_Values|Data values]]|field={{{multipledata}}} }} }}
}}<noinclude>
}}<noinclude>
== Documentation ==
== Documentation ==
Line 31: Line 30:
|durability=
|durability=
|stackable=
|stackable=
|data1name=
|data=
|data1=
|multipledata=
|data2name=
|data2=
}}</pre>
}}</pre>


Line 40: Line 37:
! Parameter
! Parameter
! Function
! Function
! Default value
! Default/Example value
|-
|-
| <code>name</code> || Optional value to use a different name instead of the page name || <code><nowiki>{{BASEPAGENAME}}</nowiki></code>
| <code>name</code> || Optional value to use a different name instead of the page name || <code><nowiki>{{BASEPAGENAME}}</nowiki></code>
Line 54: Line 51:
| <code>stackable</code> || Stackable || ?
| <code>stackable</code> || Stackable || ?
|-
|-
| <code>data1name</code> || If using multiple data values, specify a name || ''None''
| <code>data</code> || Single decimal data value || 00
|-
| <code>data1</code> || Decimal Data Value 1 || 00
|-
| <code>data2name</code> || Data 2's name || ''None''
|-
|-
| <code>data2</code> || Decimal Data Value 2 || ''None''
| <code>multipledata</code> || Multiple decimal data values || <pre>{{dv|00|Item1}}
{{dv|00|Item2}}</pre>
|}
|}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 15:21, 28 January 2011

Template:Infobox common

Documentation

This template provides a uniform design for useable item pages. When an item restores health, it is recommended to use Template:Food instead.

{{Item
|name=
|image=
|invimage=
|type=
|durability=
|stackable=
|data=
|multipledata=
}}
Parameter Function Default/Example value
name Optional value to use a different name instead of the page name {{BASEPAGENAME}}
image Image of the item (Should be 150x150px) No image.png
invimage Image for object in inventory (Should be 36x36px) None
type Type (Weapon, Ranged Weapon, Craftable Item, Tool, etc. ) ?
durability How durable the item is None
stackable Stackable ?
data Single decimal data value 00
multipledata Multiple decimal data values
{{dv|00|Item1}}
{{dv|00|Item2}}