Difference between revisions of "Template:Weapon Display"

(Added "note" parameter, applied "currency-included" class to "acquisition" parameter, and changed the example to better showcase all the parameters)
m
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><div style="text-align: center; flex: 0 0 25%"><!---
{{#tag: gallery |
+
---><span style="transform: rotate({{{rotation|0}}}deg); display: flex; justify-content: center; align-items: center; height:300px;"><!---
{{#ifexist: File:{{{name}}}.png
+
    --->[[ {{ #if: {{{image|}}} | {{{image}}} | File:{{{name}}}.png }} | {{{image_size|250x300px}}} ]]<!---
  | File:{{{name}}}.png
+
---></span><!---
  | {{{image|File:Unknown Weapon.png}}}
+
--->{{#if: {{{icon|}}} | [[{{{icon}}}|35px]] | [[File:{{{name}}} Icon.png|35px]]}} '''{{{name|Weapon Name?}}}'''<br><!---
}}|heights = 200px | style = transform: rotate({{{rotation|0}}}deg)
+
--->{{#if: {{{note|}}} | <sub>''{{{note}}}''</sub><br>}}<!---
}}
+
--->{{#if: {{{shot_types|}}} | <sub>'''''Shot types:''' {{{shot_types}}}''</sub><br>}}<!---
{{#ifexist: File:{{{name}}} Icon.png
+
---><sub class="currency-included">'''''Acquired From:'''<br>{{{acquisition|Standard Loot Drops}}}''</sub>
  | [[File:{{{name}}} Icon.png|35px]]
+
</div></includeonly><noinclude>
  | [[{{{icon|File:Miscellaneous Enemy Icon.png}}}|35px]]
+
===Technical Details===
}} '''{{{name|Weapon Name?}}}'''<br>
 
{{#if: {{{note|}}}
 
  | <sub>''{{{note}}}''</sub><br>
 
}}
 
{{#if: {{{shot_types|}}}
 
  | <sub>'''''Shot types:''' {{{shot_types}}}''</sub><br>
 
}}
 
<sub class="currency-included">'''''Acquired From:'''<br>{{{acquisition|Standard Loot Drops}}}''</sub><!--
 
--></includeonly><noinclude>
 
* '''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'''.
  
 
===Parameters===
 
===Parameters===
{| border="1" class="TemplateDocumentation"
+
{| border="1" class="wikitable TemplateDocumentation"
 
|-
 
|-
 
! Parameter !! Required !! Description !! Default
 
! Parameter !! Required !! Description !! Default
Line 29: Line 19:
 
|-
 
|-
 
| image || {{no}} || The image for the weapon. || File:{{{name}}}.png
 
| image || {{no}} || The image for the weapon. || File:{{{name}}}.png
 +
|-
 +
| image_size || {{no}} || The dimensions for the image. || 250x300px
 
|-
 
|-
 
| rotation || {{no}} || How many degrees to rotate the weapon image display by. || 0
 
| rotation || {{no}} || How many degrees to rotate the weapon image display by. || 0
Line 41: Line 33:
 
|}
 
|}
  
===Example===
+
===Examples===
{| style="width:80%;"
+
{| style="width:95%;" cellpadding="20"
 
! style="font-size:150%; width: 50%;" | Wiki Text
 
! style="font-size:150%; width: 50%;" | Wiki Text
 
! style="font-size:150%; width: 50%;" | Result
 
! style="font-size:150%; width: 50%;" | Result
 
|-
 
|-
|<div style="display: flex; justify-content: center;"><!---
+
|<code class="tempdoc-code-block"><nowiki>
---><code style="display: table; white-space: pre-wrap;"><!---
+
    {{Weapon Display
     ---><nowiki>
+
    | name = Protean Staff
 
+
    | rotation = 40
      {| style="text-align:center;"
+
    | note = Comes with Shrinkinator Unique Enemy Kill Animation
      |-
+
    | shot_types = Burst Shot
      |
+
    | acquisition = The Emporium for 250 gems
      {{Weapon Display
+
     }}
      | name = Protean Staff
+
</nowiki></code>
      | rotation = 40
+
|
      | note = Comes with Shrinkinator Unique Enemy Kill Animation
+
<div style="display:flex; justify-content: center;">
      | shot_types = Burst Shot
+
    {{Weapon Display
      | acquisition = The Emporium for 250 gems
+
    | name = Protean Staff
      }}
+
    | rotation = 40
      |}
+
    | note = Comes with Shrinkinator Unique Enemy Kill Animation
 
+
    | shot_types = Burst Shot
        </nowiki><!---
+
    | acquisition = The Emporium for 250 gems
---></code>
+
    }}
 
</div>
 
</div>
|<div style="display: flex; justify-content: center;">
 
<div>
 
{| style="text-align:center;"
 
 
|-
 
|-
 +
|<code class="tempdoc-code-block"><nowiki>
 +
    {{Weapon Display
 +
    | name = Angelic Pavise
 +
    }}
 +
</nowiki></code>
 
|
 
|
{{Weapon Display
+
<div style="display:flex; justify-content: center;">
| name = Protean Staff
+
    {{Weapon Display
| rotation = 40
+
    | name = Angelic Pavise
| note = Comes with Shrinkinator Unique Enemy Kill Animation
+
    }}
| shot_types = Burst Shot
 
| acquisition = The Emporium for 250 gems
 
}}
 
|}
 
</div>
 
 
</div>
 
</div>
 
|}
 
|}
  
 +
__NOEDITSECTION__
 
</noinclude>
 
</noinclude>
__NOEDITSECTION__
 

Latest revision as of 14:28, 5 April 2025

Technical Details

  • If image and icon are not provided, they will be inferred from the name.

Parameters

Parameter Required Description Default
name TickGreen.png The name of the weapon. Weapon Name?
image CrossWhite.png The image for the weapon. File:{{{name}}}.png
image_size CrossWhite.png The dimensions for the image. 250x300px
rotation CrossWhite.png How many degrees to rotate the weapon image display by. 0
icon CrossWhite.png The icon for the weapon. File:{{{name}}} Icon.png
note CrossWhite.png Additional notes about the weapon. Nothing
shot_types CrossWhite.png Valid shot types for the weapon. Nothing
acquisition CrossWhite.png Acquisition for the weapon. "Standard Loot Drops"

Examples

Wiki Text Result
{{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 }}
Protean Staff.pngProtean Staff Icon.png Protean Staff
Comes with Shrinkinator Unique Enemy Kill Animation
Shot types: Burst Shot
Acquired From:
The Emporium for 250 gems
{{Weapon Display | name = Angelic Pavise }}
Angelic Pavise.pngAngelic Pavise Icon.png Angelic Pavise
Acquired From:
Standard Loot Drops