Difference between revisions of "Template:Pet Info"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
m
(Improving documentation and wikitext)
Line 1: Line 1:
{| style="flex: 0 0 33%;"
+
<includeonly><div style="flex: 0 0 33%;"><!---
|[[{{{ 1 | {{{icon|File:Miscellaneous Enemy Icon.png}}} }}}|66px]] '''[[{{{ 2 | {{{name|Pet Name}}} }}}]]''' - <!---
+
--->[[{{{ 1 | {{{icon|File:Miscellaneous Enemy Icon.png}}} }}}|66px]] '''[[{{{ 2 | {{{name|Pet Name?}}} }}}]]''' - <!---
 
--->{{#switch: {{{ 3 | {{{rarity|}}} }}}
 
--->{{#switch: {{{ 3 | {{{rarity|}}} }}}
 
     | Powerful  = <span style="color:#008000"> [[File:Powerful Icon.png|18px]] Powerful </span>
 
     | Powerful  = <span style="color:#008000"> [[File:Powerful Icon.png|18px]] Powerful </span>
Line 8: Line 8:
 
     | #default  = <span style="color:#808080"> [[File:Worn Icon.png|18px]] Rarity? </span>
 
     | #default  = <span style="color:#808080"> [[File:Worn Icon.png|18px]] Rarity? </span>
 
     }}
 
     }}
|}<!--
+
</div></includeonly><noinclude>
--><noinclude>
 
 
 
 
===Parameters===
 
===Parameters===
{| border="1" style="border-collapse:collapse;"
+
{| border="1" class="wikitable TemplateDocumentation"
! Parameter !! Description
+
! Parameter !! Required !! Description !! Default
 
|-
 
|-
| icon || The icon for the pet. <code>File:Miscellaneous Enemy Icon.png</code> will be used if this parameter is not set.
+
| icon || {{yes}} || The icon for the pet. || <code>File:Miscellaneous Enemy Icon.png</code>
 
|-
 
|-
| name || Name of the pet.
+
| name || {{yes}} || Name of the pet. || Pet Name?
 
|-
 
|-
| rarity || Rarity of the pet.
+
| rarity || {{yes}} || Rarity of the pet. || Rarity?
 
|}
 
|}
  
 
===Example===
 
===Example===
{| 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;"><!---
+
     {{Pet Info | File:Purrlin icon.png | Purrlin | Powerful}}
     ---><nowiki>{{Pet Info | File:Purrlin icon.png | Purrlin | Powerful}}</nowiki><!---
+
</nowiki></code>
---></code>
+
|
</div>
+
<div style="display: flex; justify-content: center;">
|<div style="display: flex; justify-content: center;">
 
 
     {{Pet Info | File:Purrlin icon.png | Purrlin | Powerful}}
 
     {{Pet Info | File:Purrlin icon.png | Purrlin | Powerful}}
 
</div>
 
</div>
 
|-
 
|-
|<div style="display: flex; justify-content: center;"><!---
+
|<code class="tempdoc-code-block"><nowiki>
---><code style="display: table; white-space: pre-wrap;"><!---
+
    {{Pet Info  
    ---><nowiki>
+
    | icon = File:Purrlin icon.png           
 
+
    | name = Purrlin
            {{Pet Info  
+
    | rarity = Powerful
            | icon = File:Purrlin icon.png           
+
    }}
            | name = Purrlin
+
</nowiki></code>
            | rarity = Powerful
+
|
            }}
+
<div style="display: flex; justify-content: center;">
 
 
        </nowiki><!---
 
---></code>
 
</div>
 
|<div style="display: flex; justify-content: center;">
 
 
     {{Pet Info  
 
     {{Pet Info  
 
     | icon = File:Purrlin icon.png
 
     | icon = File:Purrlin icon.png

Revision as of 15:04, 7 April 2025

Parameters

Parameter Required Description Default
icon TickGreen.png The icon for the pet. File:Miscellaneous Enemy Icon.png
name TickGreen.png Name of the pet. Pet Name?
rarity TickGreen.png Rarity of the pet. Rarity?

Example

Wiki Text Result
{{Pet Info | File:Purrlin icon.png | Purrlin | Powerful}}
Purrlin icon.png Purrlin - Powerful Icon.png Powerful
{{Pet Info | icon = File:Purrlin icon.png | name = Purrlin | rarity = Powerful }}
Purrlin icon.png Purrlin - Powerful Icon.png Powerful