Difference between revisions of "NPC info"
Stratonian (talk | contribs) m |
Stratonian (talk | contribs) m (removed repetition) |
||
(85 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: | + | | colspan="2" | <center><!-- |
− | {{#ifexist:{{#var: | + | NPC image |
− | |[[{{#var: | + | -->{{#if:{{{icon|}}}<!-- if icon exists |
− | + | -->|<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" | + | ! colspan="2" class="{{#var:disposition class}}" | <center>{{{name|{{PAGENAME}}}}}</center><!-- name --> |
|- | |- | ||
− | {{#if:{{ | + | {{#if:{{#arraysize:organizationRow}}|{{InfoboxRow|'''{{#arrayindex:organizationRow|0}}'''|{{#arrayindex:organizationRow|1}}}}}}<!-- prints the organization as a row--> |
− | {{ | ||
|- | |- | ||
− | | | + | {{#if:{{{level|}}}|{{InfoboxRow|'''[[Level]]'''|{{{level}}}}}}} |
− | |||
|- | |- | ||
− | | | + | {{#if:{{{health|}}}|{{InfoboxRow|'''[[Health]]'''|{{{health}}}}}}} |
|- | |- | ||
− | | | + | {{#if:{{{location|}}}|{{InfoboxRow|'''Location'''|[[{{{location}}}]]}}}} |
− | {{#if:{{{ | + | |- |
− | {{ | + | {{#if:{{{quests|}}}|{{InfoboxRow|'''Involved In'''|{{#arrayprint:questText|<br>|@|[[@]]}}}}}} |
− | </div> | + | |- |
− | |} | + | {{#if:{{{image|}}}|{{InfoboxRow|'''Image'''|[[File:{{{image|}}}|250x200px]]}}<!-- provided image |
− | </includeonly><noinclude>{{NPC info/Documentation}}</noinclude> | + | -->|{{#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]
- icon: 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.
- random: Displays a note stating that the NPC's appearance may change randomly.
- Optional.
- Notes: Set to any value to enable.
- name: 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.
- disposition: 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
".
- image: 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
Errors[edit]
No description was provided. Add a description parameter.