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
m
(add named and apc classification)
Line 1: Line 1:
<includeonly>{{#css:User:Gardios/Infobox.css}}{{#set:Has game context=Monster}}
+
<includeonly>{{#css:User:Gardios/Infobox.css}}{{#set:Has game context=Monster}}{{#set:Has monster classification={{#if:{{{named|}}}
 +
|Named
 +
|{{#if:{{{class|}}}|Automated Player Character|Normal}}
 +
}}
 +
}}
 
<div class="infobox">
 
<div class="infobox">
 
<div class="header monster">
 
<div class="header monster">
Line 12: Line 16:
 
  | [[Image:No_Icon.png|link=Special:Upload&wpDestFile=Icon-{{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"><div class="name">{{{name|{{BASEPAGENAME}}}}}{{#set:Has name={{{name|{{BASEPAGENAME}}}}}}}</div>{{#if:{{{named|}}}
 +
|<div class="sub">Named Monster</div>
 +
|{{#if:{{{class|}}}
 +
  |<div class="sub">Automated Player Character</div>
 +
  |}}
 +
}}</td>
 
  </tr>
 
  </tr>
 
</table>
 
</table>
Line 21: Line 30:
 
|<!-- check if there is an image uploaded called PAGENAME.png -->
 
|<!-- check if there is an image uploaded called PAGENAME.png -->
 
{{#ifexist:Media:{{PAGENAME}}.png |
 
{{#ifexist:Media:{{PAGENAME}}.png |
  <div class="image">[[File:{{PAGENAME}}.png]]{{#set:Has game appearance={{PAGENAME}}.png}}</div>
+
  <div class="image">[[File:{{PAGENAME}}.png]]{{#set:Has game appearance={{{image}}}}}</div>
 
}}
 
}}
 
}}{{#if: {{{type|}}} |
 
}}{{#if: {{{type|}}} |
Line 37: Line 46:
 
| #default = Unknown
 
| #default = Unknown
 
}}|&#32;}}
 
}}|&#32;}}
}}{{#if: {{{family|}}} |
+
}}{{#if: {{{class|}}} |
 +
; Class
 +
: [[{{{class}}}]]{{#set:Has automated player character class={{{class}}}}}
 +
}}{{#if: {{{family|}}}{{{class|}}} |
 
; Family
 
; Family
: {{#arraymap:{{{family}}}|,|@@@|[[@@@ family|@@@]]{{#set:Has monster family=@@@}}|<br>}}
+
: {{#arraymap:{{{family|}}}{{#if:{{{class|}}}|, Automated Player Character}}|,|@@@|{{#if:@@@|[[@@@ family|@@@]]{{#set:Has monster family=@@@}}}}|<br>}}
 
}}{{clear}}</div>
 
}}{{clear}}</div>
 
</div>
 
</div>
Line 61: Line 73:
 
   | Human | Building | Holy | Divine = [[Category:@@@ armor type]]
 
   | Human | Building | Holy | Divine = [[Category:@@@ armor type]]
 
   }}|}}
 
   }}|}}
 +
 +
  <!-- no type -->
 +
  {{#if:{{{type|}}}{{{armor type|}}}||[[Category:Typeless monsters]]}}
  
 
   <!-- family -->
 
   <!-- family -->
   {{#arraymap:{{{family|}}}|,|@@@|[[Category:@@@ family]]|}}
+
   {{#arraymap:{{{family|}}}{{#if:{{{class|}}}|, Automated Player Character}}|,|@@@|{{#if:@@@|[[Category:@@@ family]]}}|}}
 
}}</includeonly><noinclude>
 
}}</includeonly><noinclude>
 
== Description ==
 
== Description ==
Line 74: Line 89:
 
| icon =  
 
| icon =  
 
| image =  
 
| image =  
| resize =
 
 
| type =  
 
| type =  
 
| armor type =  
 
| armor type =  
 
| family =  
 
| family =  
 +
| named =
 +
| class =
 
| categorize =  
 
| categorize =  
 
}}</pre>
 
}}</pre>
Line 90: Line 106:
 
; 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. Separate multiple with a comma.
 
; family : Family of the monster. Separate multiple with a comma.
 +
; named : Set to anything to flag the monster as a named monster, i.e. a monster with green name tag.
 +
; class : Class of the APC. If set, ''Automated Player Character'' will automatically be added to '''family'''.
 
; categorize : Set to ''n'' to disable auto-categorization. Defaults to ''y''.
 
; categorize : Set to ''n'' to disable auto-categorization. Defaults to ''y''.
  

Revision as of 16:38, 24 March 2016

Description

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

Usage

{{Monster infobox
| name = 
| icon = 
| image = 
| type = 
| armor type = 
| family = 
| named = 
| class = 
| 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.
named 
Set to anything to flag the monster as a named monster, i.e. a monster with green name tag.
class 
Class of the APC. If set, Automated Player Character will automatically be added to family.
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