Difference between revisions of "Template:NPC infobox"

From Project: Gorgon Wiki
Jump to: navigation, search
(the dynamic/automatic added rows don't work and i do not know how to make them work, they are commented out so that the template is fine to be applied to NPC pages, if someone can fix the spaghetti code of WikiMedia and make it work, feel free to do so)
(only forced or optional categories now)
Line 4: Line 4:
 
| style="width:250px;" colspan="2" align="center" | {{{image|[[Image:{{PAGENAME}}.jpg{{pipe}}200px{{pipe}}]]}}}  
 
| style="width:250px;" colspan="2" align="center" | {{{image|[[Image:{{PAGENAME}}.jpg{{pipe}}200px{{pipe}}]]}}}  
 
|- valign="top"
 
|- valign="top"
! style="background:#eee; width:75px;font-weight:normal;" | Caption
+
 
| {{{caption|-}}}
+
! style="width:250px; colspan="2" align="center" font-weight:normal;" |
 +
| {{{caption|}}}
 +
 
 
|-
 
|-
! style="background:#eee; width:75px;font-weight:normal;" | Zone
+
! style="background:#eee; width:75px;font-weight:normal;" | Zone:
 
| {{{zone|-}}}
 
| {{{zone|-}}}
 
|-
 
|-
! style="background:#eee; width:75px;font-weight:normal;" | Location
+
! style="background:#eee; width:75px;font-weight:normal;" | Location:
 
| {{{location|-}}}
 
| {{{location|-}}}
 
|-
 
|-
! style="background:#eee; width:75px;font-weight:normal;" | Beast Speak
+
{{ #if:{{{beastspeak|}}} |
| {{{friendly_animals|-}}}                                               <!-- start Dynamic NPC Race, Vendor, and SKill Trainer row Notifications, broken for now
+
{{pipe}}-
 
+
! style="background:#f4e6d4; width:75px;" {{pipe}} Beast Speak:
|- valign="top"
+
{{pipe}} {{{beastspeak|-}}}
! style="background:#eee;width:100px;" | [[:Category:Creatures by Type|Anatomy]]
+
}}           
| [[{{{type|-}}}]]
+
{{ #if:{{{skilltrainer|}}} |
|- valign="top"
+
{{pipe}}-
! style="background:#eee; width:75px;"  | [[:Category:Creatures by Type|Anatomy]]
+
! style="background:#f5e0c7; width:250px;" {{pipe}} Skill Trainer:
| [[{{{type|-}}}]]
+
{{pipe}} {{{skilltrainer}}}
|-valign="top"
+
}}
{{ #if:{{{Category:Vendor|}}} | {{pipe}}- ! style="background:#f5e0c7; width:250px;" colspan="2" align="center" [[:Category:Vendor| Vendor]] {{pipe}} }}
+
{{ #if:{{{vendor|}}} |
|-valign="top"
+
{{pipe}}-
{{ #if:{{{Category:Skill Trainer|}}} | {{pipe}}- ! style="background:#f5e0c7; width:250px;" colspan="2" align="center" [[:Category:Skill Trainer| Skill Trainer]] {{pipe}} }}  
+
! style="background:#f2cda0; width:250px;" colspan="2" align="center" {{pipe}}  
 
+
{{pipe}} {{{Vendor}}}
 
+
}}
 
 
end of dynamic rows-->
 
 
|}
 
|}
<!-- automatic categories -->
 
{{ #if: {{{type|}}} | [[Category:{{{type}}}]] }}
 
  
 
<noinclude>
 
<noinclude>
Line 47: Line 45:
 
|location        =
 
|location        =
 
|friendly_animals =  
 
|friendly_animals =  
 +
|skilltrainer    =
 +
|vendor          =
 
}}
 
}}
 
</pre>
 
</pre>
 
==Parameters==
 
==Parameters==
 
+
Long parameters will extend the width of the infobox. To keep it the correct size keep text short or use the  "< br>" function
 
; name
 
; name
 
: Optional. Defaults to article name.
 
: Optional. Defaults to article name.
 
; image
 
; image
: Optional. Defaults to a .jpg image of the article's name. If specified, use <code><nowiki>[[Image:Creature name.jpg|300px|]]</nowiki></code>
+
: Optional. Defaults to a .jpg image of the article's name. If specified, use <code><nowiki>[[Image:Creature name.jpg|200px|]]</nowiki></code>
; type
 
: MUST match an existing [[:Category:Creatures by Type]]
 
 
;caption
 
;caption
:Optional.Usually the description above the NPCs head.
+
:Optional. Usually the description above the NPCs head.
 
;zone
 
;zone
 
:Optional. The zone where the NPC can be found.
 
:Optional. The zone where the NPC can be found.
 
;location  
 
;location  
:Optional. Specifically where the NPC is located in a Zone. (i.e. [[Hogan's Keep]] in [[Eltibule]])
+
:Optional. Specifically where the NPC is located in a Zone. See below for example use.
 
;friendly_animals
 
;friendly_animals
 
:Optional. Animals that the NPC will talk to, if any.
 
:Optional. Animals that the NPC will talk to, if any.
 
+
;skilltrainer
 +
:Optional. Use to show if NPC can train a player in a skill. See below for example use.
 +
;vendor
 +
:Optional. Use to show that a NPC is Vendor.
 
==Description==
 
==Description==
 
Create an attractive "info card" for NPCs. This is another way to liven up the pages. It also provides a consistent "at a glance" information box with vital information that is consistent across all creatures.
 
Create an attractive "info card" for NPCs. This is another way to liven up the pages. It also provides a consistent "at a glance" information box with vital information that is consistent across all creatures.
Line 75: Line 76:
  
  
 
+
==Examples==
 +
<pre>
 +
{{NPC infobox
 +
|title            = Velkort
 +
|image            = [[File:Velkort.jpg|200px]]
 +
|caption          = Velkort and the Sentient Flame
 +
|zone            = [[Serbule]]
 +
|location        = near [[Serbule Keep]]'s well
 +
|friendly_animals =
 +
|skilltrainer    = Fire
 +
|vendor          = Vendor
 +
}}
 +
</pre>
 +
{{NPC infobox
 +
|title            = Velkort
 +
|image            = [[File:Velkort.jpg|200px]]
 +
|caption          = Velkort and the Sentient Flame
 +
|zone            = [[Serbule]]
 +
|location        = near [[Serbule Keep]]'s well
 +
|friendly_animals =
 +
|skilltrainer    = Fire
 +
|vendor          = Vendor
 +
}}
  
  
 
[[Category:Formatting templates|NPC infobox]]
 
[[Category:Formatting templates|NPC infobox]]
 
</noinclude>
 
</noinclude>

Revision as of 17:01, 22 October 2015

NPC infobox
File:NPC infobox.jpg
Zone: -
Location: -




Syntax

{{NPC infobox
|title            =
|image            =
|caption          =
|zone             =
|location         =
|friendly_animals = 
|skilltrainer     =
|vendor           =
}}

Parameters

Long parameters will extend the width of the infobox. To keep it the correct size keep text short or use the "< br>" function

name
Optional. Defaults to article name.
image
Optional. Defaults to a .jpg image of the article's name. If specified, use [[Image:Creature name.jpg|200px|]]
caption
Optional. Usually the description above the NPCs head.
zone
Optional. The zone where the NPC can be found.
location
Optional. Specifically where the NPC is located in a Zone. See below for example use.
friendly_animals
Optional. Animals that the NPC will talk to, if any.
skilltrainer
Optional. Use to show if NPC can train a player in a skill. See below for example use.
vendor
Optional. Use to show that a NPC is Vendor.

Description

Create an attractive "info card" for NPCs. This is another way to liven up the pages. It also provides a consistent "at a glance" information box with vital information that is consistent across all creatures. Note that the goal is not to cover everything that can fit into the card, as that is in the body of the article. If you have any suggestions for what should/could go in the infobox, please comment on the Talk page or the author's talk page. This template will have more parameters, but is awaiting Wiki Extensions.

Automatic categories
type - shows the race of the NPC
vendor - will display if players can buy/sell from NPC
skill trainer - will display if NPC is a skill trainer


Examples

{{NPC infobox
|title            = Velkort
|image            = [[File:Velkort.jpg|200px]]
|caption          = Velkort and the Sentient Flame
|zone             = [[Serbule]]
|location         = near [[Serbule Keep]]'s well
|friendly_animals = 
|skilltrainer     = Fire
|vendor           = Vendor
}}
Button Blue.png
Velkort
Velkort.jpg
Velkort and the Sentient Flame
Region:
Location:
near Serbule Keep's well
Skill Trainer:
Fire
Vendor