Difference between revisions of "Template:Character Infobox"
m |
WikimanBot (talk | contribs) (support for portrait backgrounds, automatic categories fix) |
||
Line 7: | Line 7: | ||
{{{!}} width="100%" <!-- images table start --> | {{{!}} width="100%" <!-- images table start --> | ||
{{!}} width="50%" style="text-align:center;" title="Portrait" {{!}} | {{!}} width="50%" style="text-align:center;" title="Portrait" {{!}} | ||
− | <div style="margin:auto; height:100px; width:100px; border:#AE5700 3px solid; border-radius:3px;">{{#if:{{{portrait|}}} | + | <div style="margin:auto; padding:3px; height:100px; width:100px; border:#AE5700 3px solid; border-radius:3px; position:relative;"><!-- |
− | |[[File:{{{portrait|}}}{{!}} | + | |
+ | |||
+ | portrait background. defaults to empty. | ||
+ | -->{{#switch:{{{background}}} | ||
+ | | test = [[File:filename.png|100x100px|link=]] | ||
+ | | #default = | ||
+ | }}<!-- | ||
+ | |||
+ | |||
+ | portrait image. tries {{PAGENAME}}_portrait.png if portrait is not specified. | ||
+ | --><span style="position:absolute; bottom:3px; right:3px;">{{ | ||
+ | #if:{{{portrait|}}} | ||
+ | |[[File:{{{portrait|}}}{{!}}100x100px]] | ||
|{{#ifexist:File:{{PAGENAME}} portrait.png | |{{#ifexist:File:{{PAGENAME}} portrait.png | ||
− | |[[File:{{PAGENAME}} portrait.png{{!}} | + | |[[File:{{PAGENAME}} portrait.png{{!}}100x100px]] |
|[[File:defaultportrait.png{{!}}100x100px|]] | |[[File:defaultportrait.png{{!}}100x100px|]] | ||
}} | }} | ||
− | }}<!-- | + | }}</span><!-- |
− | |||
level number on top of portrait | level number on top of portrait | ||
− | -- | + | --><span style="position:absolute; bottom:3px; right:6px; text-align:right; font-size:12px; font-weight:bold; color:white; font-family:monospace;" title="Level">{{#if:{{{level|}}}|{{{level}}}|18}}</span></div><!-- |
Line 36: | Line 47: | ||
− | in-game model | + | in-game model. tries {{PAGENAME}}_model.png if portrait is not specified. |
--> | --> | ||
{{!}} width="50%" style="text-align:center;" title="In-game model" {{!}} | {{!}} width="50%" style="text-align:center;" title="In-game model" {{!}} | ||
Line 49: | Line 60: | ||
|- | |- | ||
− | | colspan="2" style="background-color:#2E2D42; border:#AE5700 2px solid; border-radius:4px; text-align:center; font- | + | | colspan="2" style="background-color:#2E2D42; border:#AE5700 2px solid; border-radius:4px; text-align:center; font-family:monospace; font-size:12px;" | <span class="infobox-h2">{{#switch: {{{type|}}} |
| generic | creature | critter | robot = Description | | generic | creature | critter | robot = Description | ||
− | | important | #default = Biography}}<nowiki> | + | | important | #default = Biography}}</span><nowiki> |
Line 120: | Line 131: | ||
{{!}} colspan="2" {{!}}<!-- start collapsible table for combat stats --> | {{!}} colspan="2" {{!}}<!-- start collapsible table for combat stats --> | ||
{{(}}{{!}} class="mw-collapsible mw-collapsed" cellspacing="0px" style="width:100%;" data-expandtext="Show" data-collapsetext="Hide" | {{(}}{{!}} class="mw-collapsible mw-collapsed" cellspacing="0px" style="width:100%;" data-expandtext="Show" data-collapsetext="Hide" | ||
− | {{!}} colspan="2" style="background-color:#2E2D42; border:#AE5700 2px solid; border-radius:4px; text-align:center | + | {{!}} colspan="2" style="background-color:#2E2D42; border:#AE5700 2px solid; border-radius:4px; text-align:center; font-family:monospace;" {{!}} <span class="infobox-h2">Combat stats</span><nowiki> |
Line 213: | Line 224: | ||
{{!}} colspan="2" {{!}}<!-- start collapsible table for technical details --> | {{!}} colspan="2" {{!}}<!-- start collapsible table for technical details --> | ||
{{(}}{{!}} class="mw-collapsible mw-collapsed" cellspacing="0px" style="width:100%;" data-expandtext="Show" data-collapsetext="Hide" | {{(}}{{!}} class="mw-collapsible mw-collapsed" cellspacing="0px" style="width:100%;" data-expandtext="Show" data-collapsetext="Hide" | ||
− | {{!}} colspan="2" style="background-color:#2E2D42; border:#AE5700 2px solid; border-radius:4px; text-align:center | + | {{!}} colspan="2" style="background-color:#2E2D42; border:#AE5700 2px solid; border-radius:4px; text-align:center; font-family:monospace;" {{!}} <span class="infobox-h2">Technical</span><nowiki> |
Line 261: | Line 272: | ||
AUTOMATIC CATEGORIES: | AUTOMATIC CATEGORIES: | ||
+ | only if namespace is empty string, aka main namespace | ||
+ | -->{{#if:{{NAMESPACE}}||<!-- | ||
Line 270: | Line 283: | ||
− | --><noinclude> | + | -->}}<!-- close namespace #IF --><noinclude><br style="clear:both;"/>{{documentation}}</noinclude> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | <br style="clear:both;"/>{{documentation}}</noinclude> |
Revision as of 18:44, 28 October 2014
Character or creature name | |||||||||||
| |||||||||||
Biography | |||||||||||
Faction |
faction, examples: | ||||||||||
Role |
roles, examples: | ||||||||||
Location |
location, examples: | ||||||||||
Quests |
quest1 | ||||||||||
Loot |
Ammunition | ||||||||||
Abilities |
misc. combat stuff, examples: | ||||||||||
| |||||||||||
|
Visit Template:Character_Infobox/doc to view this documentation. (edit) (How does this work?)
Usage
Paste the following code into the top of an article, filling all known fields:
{{Character Infobox | name = | type = automaton, critter, generic, important (for bots, animals and generic/named NPCs) | portrait = portrait image (see [[Category:Portraits]]) | background = portrait background image (see [[Category:Portrait backgrounds]]) | health = shown as a bar below portrait | shield = | psipool = | image = in-game model image. tries '{{PAGENAME}} model.png' if not specified (see [[Category:In-game models]] or [[Category:Sprites]]) | faction = | roles = | location = | loot = | abilities = | |Combat stats section: | level = | damage = | range = | actionpoints = 50 | movepoints = | detection = | resolve = | fortitude = | |Base abilities section: | strength = | dexterity = | agility = | constitution = | perception = | will = | intelligence = | |Skills section: | guns = | heavyguns = | throwing = | crossbows = | melee = | | dodge = | evasion = | stealth = | hacking = | lockpicking = | pickpocketing = | traps = | | mechanics = | electronics = | chemistry = | biology = | tailoring = | | thoughtctrl = | psychokinesis = | metathermics = | temporal = | | persuasion = | intimidation = | mercantile = | |Resistances section: | mechanical = | heat = | cold = | electricity = | acid = | energy = | bio = | |Technical section: | charfile = | dialogfile = | shopfile = | animfiles = }}
Examples
Large infobox example | |||||||||
| |||||||||
Biography | |||||||||
Role |
Example with bunch of stats | ||||||||
Location |
template documentation page | ||||||||
Quests |
quest1 | ||||||||
Abilities |
True-sight | ||||||||
| |||||||||
|
Minimal infobox example | |||
| |||
Description | |||
Role |
Styg's old forum avatar | ||
Location |
some upcoming release |
See the source.