Welcome to the DFO World Wiki. With many major updates since the release of DFO, many items are missing. Visit Item Database Project to learn more.
Please remember to click "show preview" before saving the page.
Thanks for the updated logo snafuPop!

Difference between revisions of "Template:Monster infobox"

From DFO World Wiki
Jump to: navigation, search
Line 6: Line 6:
 
   <td class="icon">{{#if:{{{icon|}}}
 
   <td class="icon">{{#if:{{{icon|}}}
 
  |[[Has game icon::File:{{{icon}}}.png|24px]]
 
  |[[Has game icon::File:{{{icon}}}.png|24px]]
  | {{#ifexist:Media:{{PAGENAME}}.png
+
  | {{#ifexist:Media:Icon-{{PAGENAME}}.png
     |[[Has game icon::File:{{#replace:{{#replace:{{PAGENAME}}|/|-}}|:|-}}.png|24px]]
+
     |[[Has game icon::File:Icon-{{#replace:{{#replace:{{PAGENAME}}|/|-}}|:|-}}.png|24px]]
     |[[Image:No_Icon.png|link={{canonicalurl:Special:Upload|wpDestFile={{urlencode:{{PAGENAME}}.png}}&wpUploadDescription={{urlencode:[[Category:Monster Icons]]}}}}|24px|No icon available]]
+
     |[[Image:No_Icon.png|link={{canonicalurl:Special:Upload|wpDestFile={{urlencode:Icon-{{PAGENAME}}.png}}&wpUploadDescription={{urlencode:[[Category:Monster Icons]]}}}}|24px|No icon available]]
 
   }}
 
   }}
  | [[Image:No_Icon.png|link=Special:Upload&wpDestFile={{PAGENAME}}.png|24px|No icon available]]
+
  | [[Image:No_Icon.png|link=Special:Upload&wpDestFile=Icon-{{PAGENAME}}.png|24px|No icon available]]
 
}}</td>
 
}}</td>
 
   <td class="caption"> {{{name|{{BASEPAGENAME}}}}}{{#set:Has name={{{name|{{BASEPAGENAME}}}}}}}</td>
 
   <td class="caption"> {{{name|{{BASEPAGENAME}}}}}{{#set:Has name={{{name|{{BASEPAGENAME}}}}}}}</td>
Line 18: Line 18:
 
<div class="body">
 
<div class="body">
 
{{#if: {{{image|}}} |
 
{{#if: {{{image|}}} |
  <div class="image">[[File:{{{image}}}{{#if:{{{resize|}}}|{{!}}200px}}]]{{#set:Has game appearance={{{image}}}}}</div>
+
  <div class="image">[[File:{{{image}}}]]{{#set:Has game appearance={{{image}}}}}</div>
}}
+
}}{{#if: {{{type|}}} |
<!--{{#if: {{{image|}}} |
 
{{!}} colspan="2" style="text-align: center;" {{!}} [[File:{{{image}}}]]{{#set:Has game appearance={{{image}}}}}
 
{{!-}}
 
}}-->
 
{{#if: {{{type|}}} |
 
 
; Type
 
; Type
 
: {{#arraymap:{{{type}}}|,|@@@|{{#switch: @@@
 
: {{#arraymap:{{{type}}}|,|@@@|{{#switch: @@@
Line 32: Line 27:
 
| #default = Unknown
 
| #default = Unknown
 
}}|<br>}}
 
}}|<br>}}
}}
+
}}{{#if: {{{armor type|}}} |
{{#if: {{{armor type|}}} |
 
 
; Armor type  
 
; Armor type  
 
: {{#arraymap:{{{armor type}}}|,|@@@|{{#switch: @@@
 
: {{#arraymap:{{{armor type}}}|,|@@@|{{#switch: @@@
Line 39: Line 33:
 
| #default = Unknown
 
| #default = Unknown
 
}}|<br>}}
 
}}|<br>}}
 +
}}{{#if: {{{family|}}} |
 +
; Family
 +
: [[{{{family}}} family|{{{family}}}]]{{#set:Has monster family={{{family}}}}}
 +
}}{{#if: {{{portrait1|}}} |
 +
<div class="image">[[File:{{{portrait1}}}.png]]</div>
 +
}}{{#if: {{{portrait2|}}} |
 +
<div class="image">[[File:{{{portrait2}}}.png]]</div>
 
}}
 
}}
 
{{clear}}</div>
 
{{clear}}</div>
Line 61: Line 62:
 
   | Human | Building | Holy | Divine = [[Category:@@@ armor type]]
 
   | Human | Building | Holy | Divine = [[Category:@@@ armor type]]
 
   }}|}}
 
   }}|}}
 +
 +
  <!-- family -->
 +
  {{#if:{{{family|}}}|[[Category:{{{family}}} family]]}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
== Description ==
 
== Description ==
Line 71: Line 75:
 
| icon =  
 
| icon =  
 
| image =  
 
| image =  
 +
| portrait1 =
 +
| portrait2 =
 +
| resize =
 
| type =  
 
| type =  
 
| armor type =  
 
| armor type =  
 +
| family =
 
| categorize =  
 
| categorize =  
 
}}</pre>
 
}}</pre>
Line 82: Line 90:
 
; icon : Icon. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
 
; icon : Icon. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
 
; image : Sprite of the monster. Unlike '''icon''', the file extension (e.g. .gif) is required.
 
; image : Sprite of the monster. Unlike '''icon''', the file extension (e.g. .gif) is required.
 +
; portrait1 : Dialogue portrait of the monster.
 +
; portrait2 : Dialogue portrait of the monster if there is a second one.
 
; type : Type of the monster, displayed in orange ingame. Separate multiple with a comma.
 
; type : Type of the monster, displayed in orange ingame. Separate multiple with a comma.
 
; armor type : Armor type of the monster, displayed in silver with a shield ingame. Separate multiple with a comma.
 
; armor type : Armor type of the monster, displayed in silver with a shield ingame. Separate multiple with a comma.
 +
; family : Family of the monster.
 
; categorize : Set to ''n'' to disable auto-categorization. Defaults to ''y''.
 
; categorize : Set to ''n'' to disable auto-categorization. Defaults to ''y''.
  
Line 90: Line 101:
 
<pre>{{Monster infobox
 
<pre>{{Monster infobox
 
| name = Really Long Monster Name For Line Break
 
| name = Really Long Monster Name For Line Break
| icon =  
+
| icon = Nilvas Gracia
 
| image = Nilvasboss.gif
 
| image = Nilvasboss.gif
 
| type = Angel, Human
 
| type = Angel, Human
Line 98: Line 109:
 
{{Monster infobox
 
{{Monster infobox
 
| name = Really Long Monster Name For Line Break
 
| name = Really Long Monster Name For Line Break
| icon =  
+
| icon = Nilvas Gracia
 
| image = Nilvasboss.gif
 
| image = Nilvasboss.gif
 
| type = Angel, Human
 
| type = Angel, Human

Revision as of 13:13, 19 March 2016

Description

This templates creates an infobox for use on the monster's page.

Usage

{{Monster infobox
| name = 
| icon = 
| image = 
| portrait1 = 
| portrait2 = 
| resize = 
| type = 
| armor type = 
| family = 
| categorize = 
}}

Parameters

All parameters are optional unless stated otherwise.

name 
Required. Name of the monster. Defaults to the name of the base article ({{PAGENAME}}).
icon 
Icon. Defaults to {{PAGENAME}}.
image 
Sprite of the monster. Unlike icon, the file extension (e.g. .gif) is required.
portrait1 
Dialogue portrait of the monster.
portrait2 
Dialogue portrait of the monster if there is a second one.
type 
Type of the monster, displayed in orange ingame. Separate multiple with a comma.
armor type 
Armor type of the monster, displayed in silver with a shield ingame. Separate multiple with a comma.
family 
Family of the monster.
categorize 
Set to n to disable auto-categorization. Defaults to y.

Examples

{{Monster infobox
| name = Really Long Monster Name For Line Break
| icon = Nilvas Gracia
| image = Nilvasboss.gif
| type = Angel, Human
| armor type = Divine
}}
Nilvas Gracia.png
Really Long Monster Name For Line Break
Nilvasboss.gif
Type
TypeAngel.png TypeHuman.png
Armor type
ArmorTypeDivine.png