Template:NPC: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
m (bug fix)
(altered race handling)
Line 10: Line 10:
{{#switch:{{lc:{{{guild}}}}}|n|-=|{{!}}'''Guild:'''{{!}}{{!}}{{#if:{{{guild|}}}|[[guild is::{{lc:{{{guild}}}}}|{{{guild}}}]]|''Unknown''<includeonly>[[missing::Infobox entry for guild| ]]</includeonly>}}}}
{{#switch:{{lc:{{{guild}}}}}|n|-=|{{!}}'''Guild:'''{{!}}{{!}}{{#if:{{{guild|}}}|[[guild is::{{lc:{{{guild}}}}}|{{{guild}}}]]|''Unknown''<includeonly>[[missing::Infobox entry for guild| ]]</includeonly>}}}}
|-
|-
{{#switch:{{lc:{{{race}}}}}|n|-=|{{!}}{{!}}'''Race:'''{{!}}{{!}}{{#If:{{{race|}}}|[[race is::{{{race}}}]]|''Unknown''<includeonly>[[missing::Infobox entry for race| ]]</includeonly>}}}}
{{#switch:{{lc:{{{race}}}}}|n|-=|{{!}}{{!}}'''Race:'''{{!}}{{!}}{{#If:{{{race|}}}|[[race is::{{{race}}}]]{{cat|{{{race}}}}}|}}|''Unknown''includeonly>{{cat|Unknown Race}}<[[missing::Infobox entry for race| ]]</includeonly>}}}}
|-
|-
{{#switch:{{lc:{{{gender}}}}}|n|-=|{{!}}{{!}}'''Gender:'''{{!}}{{!}}{{#switch:{{lc:{{{gender}}}}}|m|male=Male|f|female=Female|''Unknown''<includeonly>[[missing::Infobox entry for gender| ]]</includeonly>}}}}
{{#switch:{{lc:{{{gender}}}}}|n|-=|{{!}}{{!}}'''Gender:'''{{!}}{{!}}{{#switch:{{lc:{{{gender}}}}}|m|male=Male|f|female=Female|''Unknown''<includeonly>[[missing::Infobox entry for gender| ]]</includeonly>}}}}
Line 23: Line 23:
|-
|-
{{#if:{{{task|}}}|{{!}}'''Tasks:'''{{!}}{{!}}{{#arraymap:{{{task}}}|,|x|[[gives task type::x]]}}}}
{{#if:{{{task|}}}|{{!}}'''Tasks:'''{{!}}{{!}}{{#arraymap:{{{task}}}|,|x|[[gives task type::x]]}}}}
|}<includeonly>[[page type is::npc| ]]{{cat|NPCs}}{{#if:{{{race|}}}|{{cat|{{{race}}}}}|{{cat|Unknown Race}}}}{{#switch:{{lc:{{{guild}}}}}|n|-=|{{#if:{{{guild|}}}|{{cat|{{{guild}}}}}}}}}{{#switch:{{lc:{{{alive}}}}}|y|yes={{Cat|Alive}}|n|no={{Cat|Dead}}}}{{#switch:{{lc:{{{status}}}}}|y|yes={{cat|Alive}}|n|no={{cat|Dead}}|h={{cat|Historical Figures}}}}{{IfMatch|author|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{Cat|Author}}}}{{IfMatch|child of kalestraum|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Children of Kalestraum}}}}{{IfMatch|emperor|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Emperor}}}}{{IfMatch|ferdahl|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Ferdahl}}}}{{IfMatch|guard|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Guards}}}}{{IfMatch|guild leader|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Guild Leaders}}}}{{IfMatch|merchant|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Merchant}}}}{{IfMatch|pirate|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Pirates}}}}{{IfMatch|ship captain|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Ship Captain}}}}{{IfMatch|shopowner|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Shopowner}}}}{{IfMatch|undead|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Undead}}}}{{IfMatch|y'shai|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Y'Shai}}}}{{IfMatch|outcast|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Outcasts}}}}{{IfMatch|dragon priest|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Dragon Priests}}}}{{IfMatch|monk of the crystal hand|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Monks of the Crystal Hand}}}}{{IfMatch|nomad of the arid steppe|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Nomads of the Arid Steppe}}}}{{IfMatch|alterer|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Alterers}}}}</includeonly><noinclude>
|}<includeonly>[[page type is::npc| ]]{{cat|NPCs}}{{#switch:{{lc:{{{guild}}}}}|n|-=|{{#if:{{{guild|}}}|{{cat|{{{guild}}}}}}}}}{{#switch:{{lc:{{{alive}}}}}|y|yes={{Cat|Alive}}|n|no={{Cat|Dead}}}}{{#switch:{{lc:{{{status}}}}}|y|yes={{cat|Alive}}|n|no={{cat|Dead}}|h={{cat|Historical Figures}}}}{{IfMatch|author|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{Cat|Author}}}}{{IfMatch|child of kalestraum|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Children of Kalestraum}}}}{{IfMatch|emperor|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Emperor}}}}{{IfMatch|ferdahl|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Ferdahl}}}}{{IfMatch|guard|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Guards}}}}{{IfMatch|guild leader|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Guild Leaders}}}}{{IfMatch|merchant|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Merchant}}}}{{IfMatch|pirate|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Pirates}}}}{{IfMatch|ship captain|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Ship Captain}}}}{{IfMatch|shopowner|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Shopowner}}}}{{IfMatch|undead|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Undead}}}}{{IfMatch|y'shai|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Y'Shai}}}}{{IfMatch|outcast|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Outcasts}}}}{{IfMatch|dragon priest|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Dragon Priests}}}}{{IfMatch|monk of the crystal hand|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Monks of the Crystal Hand}}}}{{IfMatch|nomad of the arid steppe|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Nomads of the Arid Steppe}}}}{{IfMatch|alterer|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true={{cat|Alterers}}}}</includeonly><noinclude>
==Usage Documentation==
==Usage Documentation==
The template is for use with both GMNPCs and standard atmospheric NPCs.<Br />
The template is for use with both GMNPCs and standard atmospheric NPCs.<Br />

Revision as of 01:38, 3 October 2011

Unknownincludeonly><</includeonly>}}
NPC
Status: Unknown
Guild: Unknown
Gender: Unknown
Location:

Usage Documentation

The template is for use with both GMNPCs and standard atmospheric NPCs.

Variable Supported Values Usage
name Name if different from pagename
alias# Any names besides the current one in use.
guild -/(guild) Use "-" if they have no guild.
race
gender m/f/- Use "-" if there's no discernable gender.
status y/n/u To be compatable with previous versions, "y" means alive, "n" means dead, "u" means unknown, and "h" means a historical figure.
location location name
OR
-
Where the NPC is found, or "-" if not applicable.
map number Which map the NPC can be found on.
type# Any special status they have.
assoc <name>,<page name2>|<name2>,... Any NPC associates of note.
relat <name>,<page name2>|<name2>,... Any NPC relatives.
task delivery,kill,kill boss,kill recovery,forage,
recover,recover area,search,skinning
What tasks the NPC gives. See Property:Gives task type for details.
{{NPC
|name=
|alias=
|guild=
|race=
|gender=
|status=
|location=
|map=
|type=
|type2=
|type3=
|type4=
|type5=
|assoc=
|relat=
|task=
}}