Difference between revisions of "NPC info"

m
m (removed repetition)
 
(92 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><div class="infobox-right"><!--
<div class="infobox-right">
+
DEFINITIONS
 +
 
 +
disposition
 +
used for CSS classes
 +
-->{{#vardefine:disposition class|{{#switch:{{lc:{{{disposition|}}}}}
 +
|ally=NPC-ally
 +
|enemy=NPC-enemy
 +
|neutral=NPC-neutral
 +
|#default=NPC-neutral<!-- NPCs with no disposition are assumed to be neutral -->
 +
}}}}<!--
 +
 
 +
organization
 +
used for categorization
 +
if a name parameter is given, it is assumed that the template isn't on the NPC's main article, therefore it isn't categorized
 +
-->{{#arraydefine:organizationRow|{{#switch:{{lc:{{{organization|}}}}}<!--
 +
cultures
 +
-->|elaniens=Culture,[[Elaniens]]
 +
|faidens=Culture,[[Faidens]]
 +
|quaddari=Culture,[[Quaddari]]
 +
|yorners=Culture,[[Yorners]]<!--
 +
camp creatures
 +
-->|archosaurs=Enemy Type,[[:Category:Archosaurs]]
 +
|boars=Enemy Type,[[:Category:Boars]]
 +
|fingi=Enemy Type,[[:Category:Fingi]]
 +
|gnats=Enemy Type,[[:Category:Gnats]]
 +
|imps=Enemy Type,[[:Category:Imps]]
 +
|insects=Enemy Type,[[:Category:Insects]]<!-- no official name; contains bomboslug, gravedigger fly, termite queen etc -->
 +
|leafies=Enemy Type,[[:Category:Leafies]]
 +
|lost fronts=Enemy Type,[[:Category:Lost Fronts]]
 +
|mutant rats=Enemy Type,[[:Category:Mutant rats]]
 +
|occultists=Enemy Type,[[:Category:Occultists]]
 +
|spiders=Enemy Type,[[:Category:Spiders]]
 +
|wolves=Enemy Type,[[:Category:Wolves]]<!--
 +
unique
 +
-->|critters=Type,[[:Category:Critters{{!}}Critter]]<!-- no official name; contains NPCs with 1 health -->
 +
|wandering bosses=Type,[[:Category:Wandering bosses{{!}}Wandering Boss]]
 +
|world bosses=Type,[[:Category:World bosses{{!}}World Boss]]
 +
}}}}<!--
 +
-->{{#if:{{{name|}}}<!-- if name parameter is not given
 +
-->||{{#if:{{#arrayprint:organizationRow}}<!-- if the organization is correct (i.e. organizationRow exists)
 +
-->|[[Category:{{ucfirst:{{{organization}}}}}]]<!-- add to specific category
 +
-->|[[Category:NPCs]]}}}}<!-- else add to NPC category
 +
 
 +
quests
 +
-->{{#arraydefine:questText|{{{quests}}}|;}}<!--
 +
 
 +
TABLE -->
 
{| class="wikitable" style="width: 100%;"
 
{| class="wikitable" style="width: 100%;"
 
|-
 
|-
| colspan="2" | <center>{{#vardefine:icon|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.png}}
+
| colspan="2" | <center><!--
{{#ifexist:{{#var:icon}}
+
NPC image
|[[{{#var:icon}}|85px]]{{#set:Has icon={{#var:icon}}}}
+
-->{{#if:{{{icon|}}}<!-- if icon exists
|[[{{#var:icon}}|Upload an NPC icon]]}}
+
-->|<span class="{{#var:disposition class}}">[[{{{icon}}}|85px]]</span><!-- use provided icon
</center>
+
-->|{{#vardefine:defaultIcon|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}} Icon.png}}<!-- else use default icon
 +
-->{{#ifexist:{{#var:defaultIcon}}<!-- if default icon exists
 +
-->|<span class="{{#var:disposition class}}">[[{{#var:defaultIcon}}|85px]]</span><!-- use default icon
 +
-->|[[{{#var:defaultIcon}}|Upload NPC icon.]]}}}}<!-- else prompt for icon upload
 +
-->{{#if:{{{random|}}}|<br><small>(This NPC's appearance may change randomly.)</small>}}</center>
 
|-
 
|-
! colspan="2" style="background-color: #4DBF00!important" | <center>{{{name|{{PAGENAME}}}}}</center>
+
! colspan="2" class="{{#var:disposition class}}" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name -->
 
|-
 
|-
{{#if:{{{culture|}}}{{!}} class="skill-infobox-row-heading" {{!}} '''[[:Category:Cultures|Culture]]'''
+
{{#if:{{#arraysize:organizationRow}}|{{InfoboxRow|'''{{#arrayindex:organizationRow|0}}'''|{{#arrayindex:organizationRow|1}}}}}}<!-- prints the organization as a row-->
{{!}} class="skill-infobox-row-data" {{!}} [[{{ucfirst:{{{culture}}}}}]]}}
 
 
|-
 
|-
| class="skill-infobox-row-heading" | '''[[Level]]'''
+
{{#if:{{{level|}}}|{{InfoboxRow|'''[[Level]]'''|{{{level}}}}}}}
| class="skill-infobox-row-data" | {{{level}}}
 
 
|-
 
|-
| class="skill-infobox-row-heading" | '''[[Location]]'''
+
{{#if:{{{health|}}}|{{InfoboxRow|'''[[Health]]'''|{{{health}}}}}}}
| class="skill-infobox-row-data" | [[{{{location|Kwalat}}}]]
+
|-
{{#if:{{{quest|}}}{{!}} class="skill-infobox-row-heading" {{!}} '''[[Quest]]'''
+
{{#if:{{{location|}}}|{{InfoboxRow|'''Location'''|[[{{{location}}}]]}}}}
{{!}} class="skill-infobox-row-data" {{!}} :{{#arraymap:{{{quest|}}}|\n|x|[[x]]}}}}
+
|-
</div>
+
{{#if:{{{quests|}}}|{{InfoboxRow|'''Involved In'''|{{#arrayprint:questText|<br>|@|[[@]]}}}}}}
|}
+
|-
</includeonly><noinclude>{{NPC info/Documentation}}</noinclude>
+
{{#if:{{{image|}}}|{{InfoboxRow|'''Image'''|[[File:{{{image|}}}|250x200px]]}}<!-- provided image
 +
-->|{{#vardefine:defaultImage|File:{{#replace:{{#titleparts:{{PAGENAME}}}}|:|-}}.jpg}}<!-- get default image
 +
-->{{#ifexist:{{#var:defaultImage}}<!-- if default image exists
 +
-->|{{InfoboxRow|'''Image'''|[[{{#var:defaultImage}}|250x200px]]}}}}<!-- use default image
 +
-->}}
 +
|}</div><!--
 +
DESCRIPTION
 +
-->{{{description|{{error|No description provided. Add a description parameter.}}}}}<!--
 +
PROPERTIES
 +
-->{{#if:{{{name|}}}|<!-- if there is a name parameter don't set any properties
 +
-->|{{#if:{{{location|}}}|{{#set:Has location={{{location}}}}}}}<!-- set 'Has location' property
 +
-->}}</includeonly><noinclude>{{NPC info/Documentation}}</noinclude>

Latest revision as of 20:29, 16 May 2024

Description[edit]

Displays an information page about a non-player character (NPC).

Usage[edit]

{{NPC info|<icon=icon>|<name=name>|<description=description>|<disposition=disposition>|<organization=organization>|<level=level>|<quest=Quest 1, Quest 2>}}

Parameters[edit]

Arrow.pngicon: An icon of the NPC.
Optional. Defaults to '{{PAGENAME}} Icon.png'.
Notes: Only use if the icon name differs from the name of the page.
Arrow.pngrandom: Displays a note stating that the NPC's appearance may change randomly.
Optional.
Notes: Set to any value to enable.
Arrow.pngname: The name of the NPC.
Optional. Defaults to '{{PAGENAME}}'.
Notes: Only use if the template is on a different page to the NPC's main article.
Arrow.pngdisposition: The NPC's disposition toward the player.
Optional. Defaults to 'neutral'.
Notes: Used to determine the background color of the table heading. Choose from "ally", "neutral", or "enemy".
Arrow.pngdescription: A description of the NPC.
Optional.
Arrow.pnglevel: The NPC's level. Can be a range of levels.
Optional.
Arrow.pnghealth: The NPC's health. Can be a range of values.
Optional.
Arrow.pnglocation: The NPC's location.
Optional.
Arrow.pngorganization: The NPC's organization.
Optional.
Arrow.pngimage: An image of the NPC.
Optional. Defaults to '{{PAGENAME}}.jpg'.
Notes: Only use if the image name differs from the name of the page.

Possible organizations:

Cultures
Elaniens
Faidens
Quaddari
Yorners
Camp Creatures
Archosaurs
Boars
Gnats
Fingi
Imps
Insects (no official name; contains bomboslug, gravedigger fly, termite queen, etc)
Leafies
Lost Fronts
Mutant Rats
Occultists
Spiders
Wolves
Unique
Critters
Wandering Bosses
World Bosses
Arrow.pngquests: The semicolon-separated names of quests the NPC is a part of.
Optional.

Errors[edit]

No description was provided. Add a description parameter.