Difference between revisions of "Template:Weapon Display"
From Dungeon Defenders 2 Wiki
(Added "note" parameter, applied "currency-included" class to "acquisition" parameter, and changed the example to better showcase all the parameters) |
(Reverting changes) |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
{{#tag: gallery | | {{#tag: gallery | | ||
− | {{# | + | {{#if: {{{image|}}} |
+ | | {{{image}}} | ||
| File:{{{name}}}.png | | File:{{{name}}}.png | ||
− | |||
}}|heights = 200px | style = transform: rotate({{{rotation|0}}}deg) | }}|heights = 200px | style = transform: rotate({{{rotation|0}}}deg) | ||
}} | }} | ||
− | {{# | + | {{#if: {{{icon|}}} |
+ | | [[{{{icon}}}|35px]] | ||
| [[File:{{{name}}} Icon.png|35px]] | | [[File:{{{name}}} Icon.png|35px]] | ||
− | |||
}} '''{{{name|Weapon Name?}}}'''<br> | }} '''{{{name|Weapon Name?}}}'''<br> | ||
{{#if: {{{note|}}} | {{#if: {{{note|}}} | ||
Line 20: | Line 20: | ||
* '''This Template may not produce the desired output if not placed in a table with text align set to center. Refer to weapons pages such as [[Polearms]] for examples.'''<br> | * '''This Template may not produce the desired output if not placed in a table with text align set to center. Refer to weapons pages such as [[Polearms]] for examples.'''<br> | ||
* If '''image''' and '''icon''' are not provided, they will be inferred from the '''name'''. | * If '''image''' and '''icon''' are not provided, they will be inferred from the '''name'''. | ||
+ | ** '''The automatic detection for image and icon will stop working after 50 uses of this template on a single page, due to limitations with the #ifexist function that this template uses.''' | ||
===Parameters=== | ===Parameters=== | ||
− | {| border="1" class="TemplateDocumentation" | + | {| border="1" class="wikitable TemplateDocumentation" |
|- | |- | ||
! Parameter !! Required !! Description !! Default | ! Parameter !! Required !! Description !! Default |
Latest revision as of 12:31, 17 December 2023
- This Template may not produce the desired output if not placed in a table with text align set to center. Refer to weapons pages such as Polearms for examples.
- If image and icon are not provided, they will be inferred from the name.
- The automatic detection for image and icon will stop working after 50 uses of this template on a single page, due to limitations with the #ifexist function that this template uses.
Parameters
Example
Wiki Text | Result |
---|---|
{| style="text-align:center;"
|-
|
{{Weapon Display
| name = Protean Staff
| rotation = 40
| note = Comes with Shrinkinator Unique Enemy Kill Animation
| shot_types = Burst Shot
| acquisition = The Emporium for 250 gems
}}
|}
|