Difference between revisions of "Template:Enemy Infobox"

From Dungeon Defenders 2 Wiki
Jump to: navigation, search
m
(Massive overhaul of this template. Cleaning up the wikitext, documenting the parameters, and adding native support for tabbers for enemies with 3 tiers.)
Line 1: Line 1:
{| class="infobox" style="float: right; font-size:89%; width:{{{width|23em}}}; border: 1px solid #800080; border-radius: 5px; -moz-border-radius: 5px; padding: 1.5px;"
+
{| class="infobox" style="float: right; width:{{{width|23em}}}; border: 1px solid #800080; border-radius: 5px; padding: 3px;"
 
|-
 
|-
! colspan="3" style="background-color: #800080; color: #ffffff; font-size:120%; padding:0.5em; border-collapse:collapse; border:#000000 1px solid;" | <div style="line-height:17px;">{{#if:{{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}{{#if:{{{namesub|}}}|<br><span style="color: #f2f2f2; font-size:80%;">(''{{{namesub|}}}'')</span>}}</div>
+
! colspan="2" style="background-color: #800080; color: white; font-size:120%; padding:0.3em;" |<!---
 +
---><div><!---
 +
    --->{{{name|{{PAGENAME}}}}}
 +
        {{#if: {{{subname|}}}
 +
            | <br><span style="color: #f2f2f2; font-size:80%;">(''{{{subname}}}'')</span>
 +
        }}
 +
    </div>
 
|-
 
|-
{{#if:{{{image<includeonly>|</includeonly>}}} |
+
{{#if: {{{tier1_image|}}}
{{!}} colspan="4" style="text-align:center;background-color:alpha;" {{!}}{{{image}}}{{#if:{{{caption|}}}|<br />{{{caption}}}}}
+
    | {{!}}<tabber>
{{!}}-
+
              {{!}}-{{!}}Tier 1={{{tier1_image|[[File:DefaultEnemy.png|300px]]}}}
 +
              {{!}}-{{!}}Tier 2={{{tier2_image|[[File:DefaultEnemy.png|300px]]}}}
 +
              {{!}}-{{!}}Tier 3={{{tier3_image|[[File:DefaultEnemy.png|300px]]}}}
 +
          </tabber>
 +
    | {{#if: {{{image|}}}
 +
        | {{!}} colspan="2" style="text-align:center;" {{!}} {{{image}}}
 +
        | {{!}} colspan="2" style="text-align:center;" {{!}} [[File:DefaultEnemy.png|300px]]
 +
    }}
 
}}
 
}}
 
|-
 
|-
! colspan="3" style="background-color: #800080; color: #ffffff; padding:0em; font-size:120%; border-collapse:collapse; border:#000000 1px solid;" | Information
+
|{{#if: {{{caption|}}}
 +
    | colspan="2" style="text-align:center;" {{!}} {{{caption}}}
 +
}}
 +
|-
 +
! colspan="2" style="background-color: #800080; color: white; font-size:120%;" | Information
 +
|-
 +
| style="width:35%" | <!--Sets the width for the 1st column-->
 +
| style="width:65%" | <!--Sets the width for the 2nd column-->
 +
|-
 +
| '''Enemy Types'''
 +
| style="font-size:120%" |{{{enemy_types|?}}}
 +
|-
 +
| '''Lane Type'''
 +
| style="font-size:120%" |<!--
 +
-->{{#switch: {{{primary_lane|}}}
 +
    | Ground = [[File:Ground_Spawn_Symbol.png|30px]] Ground
 +
    | Air = [[File:Air_Spawn_Symbol.png|30px]] Air
 +
    | {{{primary_lane|?}}}
 +
}}
 +
|-
 +
| '''Appearances'''
 +
| style="font-size:120%" |{{{appearances|?}}}
 +
|-
 +
| '''Schedule Icon'''
 +
| style="font-size:120%" |{{{schedule_icon|?}}}
 +
|-
 +
|}
 +
 
 +
<noinclude>
 +
===Parameters===
 +
{| border="1" style="border-collapse:collapse;"
 +
|-
 +
! Parameter !! Description
 +
|-
 +
| name || The name of the enemy.
 +
|-
 +
| subname || The subname of the enemy, if needed. Shows up underneath the name in smaller text inside parenthesis.
 +
|-
 +
| image || The image for the enemy. Do not use this parameter if you use the tier_image parameters.
 
|-
 
|-
| style="width:35%" |
+
| tier1_image || The image for the tier 1 version of the enemy.
| style="width:40%" |
 
| style="width:25%" |
 
 
|-
 
|-
{{#if: {{{damage_type|}}}|
+
| tier2_image || The image for the tier 2 version of the enemy.
{{!}} '''[[Damage Type]]'''
 
{{!}} colspan="2" style="font-size:120%" {{!}} {{{damage_type|}}} }}
 
 
|-
 
|-
{{#if: {{{damage|}}}|
+
| tier3_image || The image for the tier 3 version of the enemy.
{{!}} '''[[Damage]]'''
 
{{!}} colspan="2" <br> style="font-size:120%" {{!}} {{{damage|}}} }}
 
 
|-
 
|-
{{#if: {{{health|}}}|
+
| caption || A caption for the image, if needed. Shows up underneath the image.
{{!}} '''[[Health]]'''
 
{{!}} colspan="2" style="font-size:120% {{!}} {{{health|}}} }}
 
 
|-
 
|-
{{#if: {{{enemy type|}}}|
+
| enemy_types || The enemy's typing (such as Melee, Chaos, etc).
{{!}} '''[[Enemy Type]]'''
 
{{!}} colspan="2" style="font-size:120% {{!}} {{{enemy type|}}} }}
 
 
|-
 
|-
{{#if: {{{primary lane|}}}|
+
| lane_type || The type of lane the enemy appears in (Ground or Air).
{{!}} '''[[Primary Lane]]'''
 
{{!}} colspan="2" style="font-size:120% {{!}} {{{primary lane|}}} }}
 
 
|-
 
|-
{{#if: {{{appearances|}}}|
+
| appearances || The game modes the enemy appears in.
{{!}} '''[[Appearances]]'''
 
{{!}} colspan="2" style="font-size:120% {{!}} {{{appearances|}}} }}
 
 
|-
 
|-
{{#if: {{{schedule icon|}}}|
+
| schedule_icon || The enemy's icon on the Schedule Board.
{{!}} '''[[Schedule Icon]]'''
 
{{!}} colspan="2" style="font-size:120% {{!}} {{{schedule icon|}}} }}
 
 
|-
 
|-
 +
| width || A custom width for the info box. Default value is <code>23em</code>.
 
|}
 
|}
 +
</noinclude>

Revision as of 00:42, 9 February 2023

Enemy Infobox
DefaultEnemy.png
Information
Enemy Types ?
Lane Type ?
Appearances ?
Schedule Icon ?


Parameters

Parameter Description
name The name of the enemy.
subname The subname of the enemy, if needed. Shows up underneath the name in smaller text inside parenthesis.
image The image for the enemy. Do not use this parameter if you use the tier_image parameters.
tier1_image The image for the tier 1 version of the enemy.
tier2_image The image for the tier 2 version of the enemy.
tier3_image The image for the tier 3 version of the enemy.
caption A caption for the image, if needed. Shows up underneath the image.
enemy_types The enemy's typing (such as Melee, Chaos, etc).
lane_type The type of lane the enemy appears in (Ground or Air).
appearances The game modes the enemy appears in.
schedule_icon The enemy's icon on the Schedule Board.
width A custom width for the info box. Default value is 23em.