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 link"

From DFO World Wiki
Jump to: navigation, search
m
(Due to semantic reporting valid pages, we need to check if variables are empty)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<includeonly>{{#if:
 
<includeonly>{{#if:
{{#vardefine:icon|{{#show:{{{1|Monster}}}|?Has game icon|link=none|default=File:No_Icon.png}}}}
+
{{#vardefine:icon|{{#show:{{{1|Monster}}}|?Has icon|link=none|default=File:No_Icon.png}}}}
 
{{#vardefine:name|{{#show:{{{1|Monster}}}|?Has name|default={{{1|Monster}}}}}}}
 
{{#vardefine:name|{{#show:{{{1|Monster}}}|?Has name|default={{{1|Monster}}}}}}}
}}<!--  
+
}}{{#if:{{#var:icon}}|<!--skip-->|{{#vardefine:icon|File:No_Icon.png}}}}{{#if:{{#var:name}}|<!--skip-->|{{#vardefine:name|{{{1|Item}}}}}}}<!-- dfoplayer. Due to semantic reporting valid pages, we need to check if variables are empty --><span style="display:inline-block; {{#if:{{{full size|}}}|width:24px;height:24px;|width:20px;height:20px}}"><!--  
--><span style="display:inline-block; {{#if:{{{full size|}}}|width:24px;height:24px;|width:20px;height:20px}}"><!--  
 
 
-->[[{{#if:{{{icon|}}}
 
-->[[{{#if:{{{icon|}}}
 
  | File:{{{icon}}}
 
  | File:{{{icon}}}
 
  | {{#var:icon}} }}|{{#if:{{{full size|}}}|24x24px|20x20px}}|link={{{1|}}}]]</span>&nbsp;<!--  
 
  | {{#var:icon}} }}|{{#if:{{{full size|}}}|24x24px|20x20px}}|link={{{1|}}}]]</span>&nbsp;<!--  
 
-->[[{{{1}}}|{{#switch:{{lc:{{{class|}}}}}
 
-->[[{{{1}}}|{{#switch:{{lc:{{{class|}}}}}
| champion = <span style="color:#b36bff; font-weight:bold;">
+
| champion = <span style="color:#7d01ff;">
| named = <span style="color:#66cc00; font-weight:bold;">
+
| named = <span style="color:#308014;">
| boss = <span style="color:#ff00ff; font-weight:bold;">
+
| automated player character | apc = <span style="color:#888888;">
 +
| boss = <span style="color:#ff00ff;">
 +
| ally = <span style="color:#00d1ff;">
 
}}{{#if:{{{2|}}}
 
}}{{#if:{{{2|}}}
 
| {{{2|}}}
 
| {{{2|}}}
 
| {{#var:name}}
 
| {{#var:name}}
 
}}{{#switch:{{lc:{{{class|}}}}}
 
}}{{#switch:{{lc:{{{class|}}}}}
| champion | named | boss = </span>
+
| champion | automated player character | apc | named | boss | ally = </span>
 
}}]]</includeonly><noinclude>
 
}}]]</includeonly><noinclude>
 
== Description ==
 
== Description ==
Line 37: Line 38:
 
; icon : Icon file. Defaults to the icon of the monster.
 
; icon : Icon file. Defaults to the icon of the monster.
 
; full size : Set to anything to display the icon in its original size.
 
; full size : Set to anything to display the icon in its original size.
; class : Colors the link depending on the monster classification. Set to either ''champion'', ''named'', or ''boss''.
+
; class : Colors the link depending on the monster classification. Set to either ''champion'', ''named'', ''apc'', ''ally'', or ''boss''.
  
 
=== Examples ===
 
=== Examples ===

Latest revision as of 19:18, 30 June 2019

Description

This template displays a link to an item with its respective icon.

Usage

{{Monster
|<item page>
|<text>
| icon = 
| full size = 
| class = 
}}

Parameters

All parameters are optional unless stated otherwise.

monster page 
Required. Monster page. The wiki page of the monster.
text 
Displayed text. Defaults to the name of the monster.
icon 
Icon file. Defaults to the icon of the monster.
full size 
Set to anything to display the icon in its original size.
class 
Colors the link depending on the monster classification. Set to either champion, named, apc, ally, or boss.

Examples

{{Monster link|Nilvas Gracia}}

No Icon.png Nilvas Gracia

{{Monster link|Nilvas Gracia|Edgy Demon|full size = y}}

No Icon.png Edgy Demon