Template:NPC: Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
(added support for nomads of the arid steppe, monks of the crystal hand, and dragon priests)
No edit summary
 
(90 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#if:{{#show:{{FULLPAGENAME}}|?missing}}|{{incomplete}}|}}
{|class="wikitable" style="width:700px"
{|class="wikitable" style="float:right; margin-left:1em;width:350px;"
|-style="height:40px"
|- style="height:40px"
! colspan="2" style="font-size:150%"|{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}
! colspan="2" style="font-size:150%"|{{#if:{{{image|}}}|[[{{{image}}}]]<br />}}{{#if:{{{name|}}}|[[pretty name is::{{{name}}}]]|[[pretty name is::{{PAGENAME}}]]}}<includeonly>{{#if:{{{rev|}}}|[[review::{{{rev}}}| ]]|[[review::0| ]]}}</includeonly>
|-
|-
|width="15%"|'''Status:'''||{{#switch:{{lc:{{{alive}}}}}|y|yes=Alive|n|no=Dead|u=Unknown}}{{#switch:{{lc:{{{status}}}}}|y|yes=Alive|n|no=Dead|u=Unknown}}{{#if:{{{alive|}}}{{{status|}}}||''Unknown''}}
|width="15%"|'''{{#if:{{{pstatus|}}}|Prime|}} Status:'''||{{#switch:{{lc:{{{alive}}}}}|y|yes=[[status is::alive|Alive]]|n|no=[[status is::dead|Dead]]|u=[[status is::unknown|Unknown]]|h=[[status is::historical figure|Historical Figure]]}}{{#switch:{{lc:{{{status}}}}}|a|alive|y|yes=[[status is::alive|Alive]]|d|dead|n|no=[[status is::dead|Dead]]|u=[[status is::unknown|Unknown]]|h=[[status is::historical figure|Historical Figure]]}}{{#if:{{{alive|}}}{{{status|}}}||''Unknown''<includeonly>[[missing::Infobox entry for status| ]]</includeonly>}}
|-{{#if:{{{pstatus|}}}|
{{!}}width="15%"{{!}}'''Platinum Status:'''{{!}}{{!}}{{#switch:{{lc:{{{alive}}}}}|y|yes=[[status is::alive|Alive]]|n|no=[[status is::dead|Dead]]|u=[[status is::unknown|Unknown]]|h=[[status is::historical figure|Historical Figure]]}}{{#switch:{{lc:{{{status}}}}}|a|alive|y|yes=[[status is::alive|Alive]]|d|dead|n|no=[[status is::dead|Dead]]|u=[[status is::unknown|Unknown]]|h=[[status is::historical figure|Historical Figure]]}}|}}
|-
|-
{{#if:{{{alias|}}}|{{#ifeq:{{lc:{{{alias}}}}}|n||{{!}}'''Aliases:'''{{!}}{{!}}{{{alias|''Unknown''}}}{{#if:{{{alias2|}}}|, {{{alias2}}}}}{{#if:{{{alias3|}}}|, {{{alias3}}}}}{{#if:{{{alias4|}}}|, {{{alias4}}}}}{{#if:{{{alias5|}}}|, {{{alias5}}}}}}}}}
{{#if:{{{alias|}}}|{{!}}'''Aliases:'''{{!}}{{!}}{{{alias}}}{{#if:{{{alias2|}}}|, {{{alias2}}}}}{{#if:{{{alias3|}}}|, {{{alias3}}}}}{{#if:{{{alias4|}}}|, {{{alias4}}}}}{{#if:{{{alias5|}}}|, {{{alias5}}}}}}}
|-
|-
{{#ifeq:{{lc:{{{guild}}}}}|n| |{{!}}'''Guild:'''{{!}}{{!}}{{#if:{{{guild|}}}|[[guild is::{{lc:{{{guild}}}}}|{{{guild}}}]]|''Unknown''}}}}
{{#switch:{{lc:{{{guild}}}}}|n|-=|{{!}}'''Guild:'''{{!}}{{!}}{{#if:{{{guild|}}}|[[guild is::{{{guild}}}]]|''Unknown''<includeonly>[[missing::Infobox entry for guild| ]]</includeonly>}}}}
|-
|-
|'''Race:'''||{{#If:{{{race|}}}|[[race is::{{{race}}}]]|''Unknown''}}
{{#switch:{{lc:{{{race}}}}}|n|-=|{{!}}{{!}}'''Race:'''{{!}}{{!}}{{#If:{{{race|}}}|{{#switch:{{{race}}}|u=[[race is::Unknown]]|[[race is::{{{race}}}]]}}|''Unknown''<includeonly>[[missing::Infobox entry for race| ]]</includeonly>}}}}
|-
|-
|'''Gender:'''||{{#switch:{{lc:{{{gender}}}}}|m|male=Male|f|female=Female|''Unknown''}}
{{#switch:{{lc:{{{gender}}}}}|n|-=|{{!}}{{!}}'''Gender:'''{{!}}{{!}}{{#switch:{{lc:{{{gender}}}}}|m|male=Male|f|female=Female|''Unknown''<includeonly>[[missing::Infobox entry for gender| ]]</includeonly>}}}}
|-
|-
{{#ifeq:{{lc:{{{location}}}}}|n||{{#ifeq:{{lc:{{{status}}}}}|n||{{#ifeq:{{lc:{{{alive}}}}}|n||{{!}}'''Location:'''{{!}}{{!}}{{#If:{{{location|}}}|[[{{{location}}}]]|''Unknown''}}}}}}}}
{{#switch:{{lc:{{{location}}}}}|n|-=|{{#if:{{#switch:{{lc:{{{status}}}}}|h|n|no=1}}{{#switch:{{lc:{{{alive}}}}}|n|no=1}}| |{{!}}'''Location:'''{{!}}{{!}}{{#If:{{{location|}}}|[[{{{location}}}]]{{#if:{{#show: [[{{{location}}}]] | ?Found in}} | {{#arraymap:{{#ask: [[{{{location}}}]]|mainlabel=-|link=none|?Found in=}}|,|@@@@@|[[found in::@@@@@| ]]|}}|}} {{#if:{{{map|}}}|{{#switch:{{{map}}}|-=|([[found on map::RanikMap{{{map}}}|Ranik Map {{{map}}}]]{{#if:{{#show: [[RanikMap{{{map}}}]] | ?Found in}} | {{#arraymap:{{#ask: [[RanikMap{{{map}}}]]|mainlabel=-|link=none|?Found in=}}|,|@@@@|[[found in::@@@@| ]]|}}|}})}}|<includeonly>[[missing::Infobox entry for map location| ]]</includeonly>}}|<includeonly>[[missing::Infobox entry for location|''Unknown'']]</includeonly>}}}}}}
|-
|-
{{#if:{{{type|}}}|{{!}}'''Type:'''{{!}}{{!}}{{{type}}}{{#If:{{{type2|}}}|, [[{{{type2}}}]]}}{{#If:{{{type3|}}}|, [[{{{type3}}}]]}}{{#If:{{{type4|}}}|, [[{{{type4}}}]]}}{{#If:{{{type5|}}}|, [[{{{type5}}}]]}}}}
{{#if:{{{type|}}}|{{#ifeq:{{{type}}}|-||{{!}}'''Type:'''{{!}}{{!}}{{#arraymap:{{{type}}},{{{type2|}}},{{{type3|}}},{{{type4|}}},{{{type5|}}}|,|@@@@|@@@@}}}}
}}
|-
|-
{{#if:{{{assoc|}}}|{{!}}'''Associates:'''{{!}}{{!}}[[{{{assoc}}}]]{{#If:{{{assoc2|}}}|,&nbsp;[[{{{assoc2}}}]]}}{{#If:{{{assoc3|}}}|,&nbsp;[[{{{assoc3}}}]]}}{{#If:{{{assoc4|}}}|,&nbsp;[[{{{assoc4}}}]]}}{{#If:{{{assoc5|}}}|,&nbsp;[[{{{assoc5}}}]]}}}}
{{#if:{{{assoc|}}}|{{!}}'''Associates:'''{{!}}{{!}}{{#arraymap:{{{assoc}}},{{{assoc2|}}},{{{assoc3|}}},{{{assoc4|}}},{{{assoc5|}}}|,|@@@@|[[associates with::@@@@]]}}}}
|-
|-
{{#if:{{{relat|}}}|{{!}}'''Relatives:'''{{!}}{{!}}[[{{{relat}}}]]{{#If:{{{relat2|}}}|, [[{{{relat2}}}]]}}{{#If:{{{relat3|}}}|, [[{{{relat3}}}]]}}{{#If:{{{relat4|}}}|, [[{{{relat4}}}]]}}{{#If:{{{relat5|}}}|, [[{{{relat5}}}]]}}}}
{{#if:{{{relat|}}}|{{!}}'''Relatives:'''{{!}}{{!}}{{#arraymap:{{{relat}}},{{{relat2|}}},{{{relat3|}}},{{{relat4|}}},{{{relat5|}}}|,|@@@@|[[related to::@@@@]]}}}}
|-
|}<includeonly>[[page type is::npc| ]][[Category:NPCs]]{{#if:{{{race|}}}|[[Category:{{{race}}}]]|}}{{#ifeq:{{lc:{{{guild}}}}}|n||{{#if:{{{guild|}}}|[[Category:{{{guild}}}]]}}}}{{#switch:{{lc:{{{alive}}}}}|y|yes=[[Category:Alive]]|n|no=[[Category:Dead]]}}{{#switch:{{lc:{{{status}}}}}|y|yes=[[Category:Alive]]|n|no=[[Category:Dead]]}}{{IfMatch|author|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Author]]}}{{IfMatch|child of kalestraum|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Child of Kalestraum]]}}{{IfMatch|emperor|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Emperor]]}}{{IfMatch|ferdahl|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Ferdahl]]}}{{IfMatch|guard|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Guard]]}}{{IfMatch|guild leader|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Guild Leaders]]}}{{IfMatch|merchant|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Merchant]]}}{{IfMatch|pirate|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Pirates]]}}{{IfMatch|ship captain|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Ship Captain]]}}{{IfMatch|shopowner|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Shopowner]]}}{{IfMatch|undead|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Undead]]}}{{IfMatch|y'shai|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Y'Shai]]}}{{IfMatch|outcast|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Outcasts]]}}{{IfMatch|dragon priest|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Dragon Priests]]}}{{IfMatch|monk of the crystal hand|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Monks of the Crystal Hand]]}}{{IfMatch|nomad of the arid steppe|{{{type}}}|{{{type2}}}|{{{type3}}}|{{{type4}}}|{{{type5}}}|true=[[Category:Nomads of the Arid Steppe]]}}</includeonly><noinclude>
{{#if:{{{task|}}}|{{!}}'''Tasks:'''{{!}}{{!}}{{#arraymap:{{{task}}}|,|@@@@|[[gives task type::@@@@]]}}}}
|-
{{#if: {{{toc|}}} | {{#switch:{{{toc}}}|y|yes|t|true|1={{!}} colspan="2" {{!}} __TOC__ | __NOTOC__ }} | }}
|}<includeonly>[[page type is::npc| ]][[rare source::true| ]]{{cat|NPCs}}{{#switch:{{lc:{{{guild}}}}}|n|-=|thief={{cat|Thieves}}|{{#if:{{{guild|}}}|{{cat|{{{guild}}}s}}}}}}{{IfMatch
|author
|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{Cat|Author}}}}{{IfMatch
|child of kalestraum
|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{cat|Children of Kalestraum}}[[member of::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
|political
|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{Cat|Political}}}}{{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}}}}{{IfMatch2
|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|y'shai|yshai|true={{cat|Y'Shai}}[[member of::y'shai| ]]}}{{IfMatch
|outcast
|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{cat|Outcasts}}[[member of::outcasts| ]]}}{{
IfMatch|dragon priest
|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{cat|Dragon Priests}}[[member of::dragon priests| ]]}}{{IfMatch
|monk of the crystal hand|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{cat|Monks of the Crystal Hand}}[[member of::monks of the crystal hand| ]]}}{{IfMatch
|nomad of the arid steppe|{{{type}}}{{{type2}}}{{{type3}}}{{{type4}}}{{{type5}}}|true={{cat|Nomads of the Arid Steppe}}[[member of::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 />
'''Note:''' This page is not currently set up to automatically generate <nowiki>{{incomplete}}</nowiki> tags, but will be soon.


{| border="1" cellpadding="1"
{| border="1" cellpadding="1" style="clear:right;"
!Variable!!Supported Values!!Usage
!Variable!!Supported Values!!Usage
|-
|-
Line 32: Line 69:
|alias#|| ||Any names besides the current one in use.
|alias#|| ||Any names besides the current one in use.
|-
|-
|guild||-/(guild)||Use "-" if they have no guild.
|guild
|-
|-
|race||''<race>''/u||Use "u" if the race information is not given, but other information is.
|race
|-
|-
|gender||m/f
|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, and "u" means unknown.
|status||y/n/u/h||To be compatable with previous versions, "y" means alive, "n" means dead, "u" means unknown, and "h" means a historical figure.
|-
|-
|pstatus||y/n/u/h||See above, but for the [[DragonRealms Platinum|Platinum instance]].
|location|| ranik map link{{!}}location name<br/>OR<br/>n|| Where the NPC is found, or "n" if not applicable.
|-
|location|| ranik map link{{!}}location name<br/>OR<br/>-|| 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.
|type#|| ||Any special status they have.
|-
|-
|assoc#|| page name{{!}}name ||Any associates of note.
|assoc|| <page name>{{!}}<name>,<page name2>{{!}}<name2>,... ||Any NPC associates of note.
|-
|relat|| <page name>{{!}}<name>,<page name2>{{!}}<name2>,... ||Any NPC relatives.
|-
|-
|task||craft,delivery,kill,kill boss,kill recovery,<br/>forage,recover,recover area,search,skinning|| What tasks the NPC gives. See [[Property:Gives task type]] for details.
|relat#|| page name{{!}}name ||Any relatives.
|}
|}


Line 53: Line 96:
|name=
|name=
|alias=
|alias=
|alias2=
|alias3=
|alias4=
|alias5=
|guild=
|guild=
|race=
|race=
Line 62: Line 101:
|status=
|status=
|location=
|location=
|map=
|type=
|type=
|type2=
|type2=
Line 68: Line 108:
|type5=
|type5=
|assoc=
|assoc=
|assoc2=
|assoc3=
|assoc4=
|assoc5=
|relat=
|relat=
|relat2=
|task=
|relat3=
|relat4=
|relat5=
}}
}}
</pre>
</pre>


{{cat|Templates}}
[[Category:Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Latest revision as of 19:02, 20 November 2022

NPC
Status: Unknown
Guild: Unknown
Race: 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 <race>/u Use "u" if the race information is not given, but other information is.
gender m/f/- Use "-" if there's no discernable gender.
status y/n/u/h To be compatable with previous versions, "y" means alive, "n" means dead, "u" means unknown, and "h" means a historical figure.
pstatus y/n/u/h See above, but for the Platinum instance.
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 craft,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=
}}