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
(use type images, set default value for image parameter)
Line 19: Line 19:
 
{{#if: {{{image|}}} |
 
{{#if: {{{image|}}} |
 
  <div class="image">[[File:{{{image}}}]]{{#set:Has game appearance={{{image}}}}}</div>
 
  <div class="image">[[File:{{{image}}}]]{{#set:Has game appearance={{{image}}}}}</div>
 +
|<!-- check if there is an image uploaded called PAGENAME.png -->
 +
{{#ifexist:Media:{{PAGENAME}}.png |
 +
<div class="image">[[File:{{PAGENAME}}.png]]{{#set:Has game appearance={{{image}}}}}</div>
 +
}}
 
}}{{#if: {{{type|}}} |
 
}}{{#if: {{{type|}}} |
 
; Type
 
; Type
Line 24: Line 28:
 
| Human | Beast | Plant | Insect
 
| Human | Beast | Plant | Insect
 
| Mechanic | Hybrid | Undead | Demon
 
| Mechanic | Hybrid | Undead | Demon
| Spirit | Dragon | Angel = [[Has monster type::@@@]]
+
| Spirit | Dragon | Angel = [[Image:Type@@@.png]]{{#set:Has monster type=@@@}}
 
| #default = Unknown
 
| #default = Unknown
}}|<br>}}
+
}}|&#32;}}
 
}}{{#if: {{{armor type|}}} |
 
}}{{#if: {{{armor type|}}} |
 
; Armor type  
 
; Armor type  
 
: {{#arraymap:{{{armor type}}}|,|@@@|{{#switch: @@@
 
: {{#arraymap:{{{armor type}}}|,|@@@|{{#switch: @@@
| Human | Building | Holy | Divine = [[Has monster armor type::@@@]]
+
| Human | Building | Holy | Divine = [[Image:ArmorType@@@.png]]{{#set:Has monster armor type=@@@}}
 
| #default = Unknown
 
| #default = Unknown
}}|<br>}}
+
}}|&#32;}}
 
}}{{#if: {{{family|}}} |
 
}}{{#if: {{{family|}}} |
 
; Family
 
; Family
Line 81: Line 85:
  
 
; name : Required. Name of the monster. Defaults to the name of the base article (<code><nowiki>{{PAGENAME}}</nowiki></code>).
 
; name : Required. Name of the monster. Defaults to the name of the base article (<code><nowiki>{{PAGENAME}}</nowiki></code>).
; icon : Icon. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
+
; icon : Icon. Defaults to <code><nowiki>Icon-{{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. Defaults to <code><nowiki>{{PAGENAME}}.png</nowiki></code>.
 
; 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.

Revision as of 11:48, 22 March 2016

Description

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

Usage

{{Monster infobox
| name = 
| icon = 
| image = 
| 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 Icon-{{PAGENAME}}.
image 
Sprite of the monster. Unlike icon, the file extension (e.g. .gif) is required. Defaults to {{PAGENAME}}.png.
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. Separate multiple with a comma.
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