Difference between revisions of "Template:NPC infobox"
From Project: Gorgon Wiki
(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=" | + | |
− | | {{{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|-}}} | ||
|- | |- | ||
− | + | {{ #if:{{{beastspeak|}}} | | |
− | + | {{pipe}}- | |
− | + | ! style="background:#f4e6d4; width:75px;" {{pipe}} Beast Speak: | |
− | + | {{pipe}} {{{beastspeak|-}}} | |
− | + | }} | |
− | + | {{ #if:{{{skilltrainer|}}} | | |
− | + | {{pipe}}- | |
− | ! style="background:# | + | ! style="background:#f5e0c7; width:250px;" {{pipe}} Skill Trainer: |
− | + | {{pipe}} {{{skilltrainer}}} | |
− | + | }} | |
− | {{ #if:{{{ | + | {{ #if:{{{vendor|}}} | |
− | + | {{pipe}}- | |
− | {{ #if:{{{ | + | ! style="background:#f2cda0; width:250px;" colspan="2" align="center" {{pipe}} |
− | + | {{pipe}} {{{Vendor}}} | |
− | + | }} | |
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
<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| | + | : Optional. Defaults to a .jpg image of the article's name. If specified, use <code><nowiki>[[Image:Creature name.jpg|200px|]]</nowiki></code> |
− | |||
− | |||
;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. | + | :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 16: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 }}
Velkort
| |
---|---|
Velkort and the Sentient Flame
| |
Region: | [[Serbule]]
|
Location: | near Serbule Keep's well
|
Skill Trainer: | Fire
|
Vendor |