Template:ItemBox: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Saag (talk | contribs)
Added margin to keep ItemBox away from its table group
QuinnBinn (talk | contribs)
Added an active and component parameter
Line 20: Line 20:
  | Spirit = color: #3C254E;
  | Spirit = color: #3C254E;
  | color: #3A2B08;}}">[[File:{{{item_name}}}.png|50px|link={{{item_name}}}]]</span>
  | color: #3A2B08;}}">[[File:{{{item_name}}}.png|50px|link={{{item_name}}}]]</span>
 
{{#ifeq:{{{active|}}}|true
|- style="text-align: center; height:50px; font-size: 14px; {{
|<tr style="text-align:center; width:100px; max-width:200px; height:6px; font-size:12px;><th><span style="color:#FFF0D7"> Active </span></th></tr>}}
|-
{{#if:{{{componentOf|}}}
|<tr style="text-align:center; width:100px; max-width:200px; height:6px; font-size:12px;><th>[[{{{componentOf}}}|<span style="color:#FFF0D7"> Component </span>]]</th></tr>}}
|- style="text-align: center; height:30px; font-size: 14px; {{
#switch: {{{item_type}}}
#switch: {{{item_type}}}
  | Weapon = background-color: #FFF0D7; color: #151912;
  | Weapon = background-color: #FFF0D7; color: #151912;
Line 33: Line 37:
A port of the initial box in [[Template:Infobox item]] with links, for use on pages that could use it without the whole infobox.
A port of the initial box in [[Template:Infobox item]] with links, for use on pages that could use it without the whole infobox.


{{ItemBox|item_name = Bullet Lifesteal (item)|item_type = Vitality|item_price = 1250|display_name = Bullet Lifesteal}} {{ItemBox|item_name = Basic Magazine|item_type = Weapon|item_imagefilepath = Basic Magazine|item_price = 500}} {{ItemBox|item_name = Improved Cooldown|item_type = Spirit|item_price = 1250}}
{{ItemBox|item_name = Bullet Lifesteal (item)|item_type = Vitality|item_price = 1250|display_name = Bullet Lifesteal}} {{ItemBox|item_name = Alchemical Fire|active = true|item_type = Weapon|item_imagefilepath = Basic Magazine|item_price = 500}} {{ItemBox|item_name = Duration Extender|componentOf = Superior Duration|item_type = Spirit|item_price = 1250}}
<noinclude>
<noinclude>
<templatedata>
<templatedata>
Line 64: Line 68:
"description": "The display name of the item (for special cases such as Bullet Lifesteal (item) or Spirit Lifesteal (item))",
"description": "The display name of the item (for special cases such as Bullet Lifesteal (item) or Spirit Lifesteal (item))",
"example": "Bullet Lifesteal",
"example": "Bullet Lifesteal",
"type": "string"
},
"active": {
"description": "Whether or not this is an active item",
"example": "true",
"type": "boolean",
"default": "false"
},
"componentOf": {
"description": "The name of the item this is a component of, for linking",
"example": "Headhunter",
"type": "string"
"type": "string"
}
}
Line 71: Line 86:
"item_type",
"item_type",
"item_price",
"item_price",
"display_name"
"display_name",
"active",
"componentOf"
]
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Revision as of 02:25, 6 September 2024

Souls {{{item_price}}}
[[File:{{{item_name}}}.png|50px|link={{{item_name}}}]]
[[{{{item_name}}}]]


A port of the initial box in Template:Infobox item with links, for use on pages that could use it without the whole infobox.


Souls 1250
Bullet Lifesteal
Souls 500
Active
Alchemical Fire
Souls 1250
Component
Duration Extender

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
item_nameitem_name

Name of the item

Example
Basic Magazine
Stringrequired
item_typeitem_type

What category of Item is this?

Suggested values
Weapon Vitality Spirit
Example
Spirit
Stringrequired
item_priceitem_price

How much does this item cost in souls?

Example
500
Numberrequired
display_namedisplay_name

The display name of the item (for special cases such as Bullet Lifesteal (item) or Spirit Lifesteal (item))

Example
Bullet Lifesteal
Stringoptional
activeactive

Whether or not this is an active item

Default
false
Example
true
Booleanoptional
componentOfcomponentOf

The name of the item this is a component of, for linking

Example
Headhunter
Stringoptional