Jump to content

Template:Infobox character: Difference between revisions

rework template
Tags: Mobile edit Mobile web edit
Olivinism (talk | contribs)
Undid revision 542 by Olivinism (talk)
Tag: Undo
 
(39 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly><templatestyles src="Template:Infobox/styles.css" />{| class="wikitable infobox" style="width:20%;"
<includeonly><templatestyles src="Template:Infobox/styles.css" />
! colspan=4 | {{{name|{{PAGENAME}}}}}
{| class="wikitable infobox" style="width:20%;"
{{#if:{{{image|}}}|{{!}}- style="text-align:center"
! colspan="4" | {{{name|{{PAGENAME}}}}}
{{!}}colspan=4 style="text-align:center"{{!}}[[File:{{{image|}}}{{!}}frameless]]<br/><span style="font-size:87%">{{{image_caption|}}}</span>}}
{{#if:{{{image|}}}|
|-{{#if:{{{race|}}}
{{!}}-
!colspan=2{{!}}Race
{{!}} colspan="4" style="text-align:center" {{!}} [[File:{{{image}}}{{!}}frameless]]<br/><span style="font-size:87%">{{{image_caption|}}}</span>
{{!}}{{{race}}}
}}
{{!}}-|}}{{#if:{{{class|}}}|
{{#if:{{{race|}}}|
!colspan=2{{!}}Class
{{!}}-
{{!}}{{{class}}}
! colspan="2" {{!}} Race
{{!}}-|}}{{#if:{{{subclass|}}}|
{{!}} colspan="2" {{!}} {{{race}}}
!colspan=2{{!}}Sublass
}}
{{!}}{{{subclass}}}
{{#if:{{{class|}}}|
{{!}}-|}}{{#if:{{{level|}}}|
{{!}}-
!colspan=2{{!}}Level
! colspan="2" {{!}} Class
{{!}}{{{level}}}
{{!}} colspan="2" {{!}} {{{class}}}
{{!}}-|}}{{#if:{{{alignment|}}}|
}}
!colspan=2{{!}}Alignment
{{#if:{{{subclass|}}}|
{{!}}{{{alignment}}}
{{!}}-
{{!}}-|}}{{#if:{{{background|}}}|
! colspan="2" {{!}} Subclass
!colspan=2{{!}}Background
{{!}} colspan="2" {{!}} {{{subclass}}}
{{!}}{{{background}}}{{#if:{{{faction|}}}|
}}
!colspan=2{{!}}Faction
{{#if:{{{level|}}}|
{{!}}{{{faction}}}
{{!}}-
{{!}}-|}}
! colspan="2" {{!}} Level
{{!}}-|}}{{#if:{{{hp|}}}{{{ac|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|
{{!}} colspan="2" {{!}} {{{level}}}
!colspan=4{{!}}Combat
}}
{{!}}-|}}{{#if:{{{hp|}}}|
{{#if:{{{alignment|}}}|
!colspan=2{{!}}Hit Points
{{!}}-
{{!}}{{{hp}}}
! colspan="2" {{!}} Alignment
{{!}}-|}}{{#if:{{{ac|}}}|
{{!}} colspan="2" {{!}} {{{alignment}}}
!colspan=2{{!}}Armor Class
}}
{{!}}{{{ac}}}
{{#if:{{{background|}}}|
{{!}}-|}}{{#if:{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|
{{!}}-
!colspan=4 class="infobox-stats"{{!}}<div><span class="infobox-stat-label">STR</span><span class="infobox-stat-value">{{{str{{!}}—}}}</span></div><div><span class="infobox-stat-label">DEX</span><span class="infobox-stat-value">{{{dex{{!}}—}}}</span></div><div><span class="infobox-stat-label">CON</span><span class="infobox-stat-value">{{{con{{!}}—}}}</span></div><div><span class="infobox-stat-label">INT</span><span class="infobox-stat-value">{{{int{{!}}—}}}</span></div><div><span class="infobox-stat-label">WIS</span><span class="infobox-stat-value">{{{wis{{!}}—}}}</span></div><div><span class="infobox-stat-label">CHA</span><span class="infobox-stat-value">{{{cha{{!}}—}}}</span></div>
! colspan="2" {{!}} Background
{{!}}-|}}{{#if:{{{player|}}}{{{campaign|}}}{{{status|}}}|
{{!}} colspan="2" {{!}} {{{background}}}
!colspan=4{{!}}Meta
}}
{{!}}-|}}{{#if:{{{player|}}}|{{#if:{{{nocat|}}}||[[Category:Player Characters]]}}
{{#if:{{{faction|}}}|
!colspan=2{{!}}Player
{{!}}-
{{!}}{{{player}}}
! colspan="2" {{!}} Faction
{{!}}-|{{#if:{{{nocat|}}}||[[Category:NPCs]]}}}}{{#if:{{{campaign|}}}|
{{!}} colspan="2" {{!}} {{{faction}}}
!colspan=2{{!}}Campaign
}}
{{!}}{{{hp}}}
{{#if:{{{hp|}}}{{{ac|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|
{{!}}-|}}{{#if:{{{status|}}}|
{{!}}-
!colspan=2{{!}}Status
! colspan="4" {{!}} Combat
{{!}}{{{status}}}
}}
{{!}}-|}}
{{#if:{{{hp|}}}|
|}</includeonly><noinclude>
{{!}}-
Character infobox.  
! colspan="2" {{!}} Hit Points
{{!}} colspan="2" {{!}} {{{hp}}}
}}
{{#if:{{{ac|}}}|
{{!}}-
! colspan="2" {{!}} Armor Class
{{!}} colspan="2" {{!}} {{{ac}}}
}}
{{#if:{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|
{{!}}-
{{!}} colspan="4" {{!}}
<div class="infobox-stats">
<div><span class="infobox-stat-label">STR</span><span class="infobox-stat-value">{{{str|—}}}</span></div>
<div><span class="infobox-stat-label">DEX</span><span class="infobox-stat-value">{{{dex|—}}}</span></div>
<div><span class="infobox-stat-label">CON</span><span class="infobox-stat-value">{{{con|—}}}</span></div>
<div><span class="infobox-stat-label">INT</span><span class="infobox-stat-value">{{{int|—}}}</span></div>
<div><span class="infobox-stat-label">WIS</span><span class="infobox-stat-value">{{{wis|—}}}</span></div>
<div><span class="infobox-stat-label">CHA</span><span class="infobox-stat-value">{{{cha|—}}}</span></div>
</div>
}}
{{#if:{{{player|}}}{{{campaign|}}}{{{status|}}}|
{{!}}-
! colspan="4" {{!}} Meta
}}
{{#if:{{{player|}}}|
{{!}}-
! colspan="2" {{!}} Player
{{!}} colspan="2" {{!}} {{{player}}}
}}
{{#if:{{{campaign|}}}|
{{!}}-
! colspan="2" {{!}} Campaign
{{!}} colspan="2" {{!}} {{{campaign}}}
}}
{{#if:{{{status|}}}|
{{!}}-
! colspan="2" {{!}} Status
{{!}} colspan="2" {{!}} {{{status}}}
}}
|}
{{#if:{{{nocat|}}}||{{#if:{{{player|}}}|[[Category:Player Characters]]|[[Category:NPCs]]}}}}</includeonly><noinclude>
Character infobox.


Base variables are ''name'', ''image'', ''image_caption'', ''race'', ''class'', ''subclass'', ''level'', ''alignment'', ''background'', ''faction''.<br>
Base variables: ''name'', ''image'', ''image_caption'', ''race'', ''class'', ''subclass'', ''level'', ''alignment'', ''background'', ''faction''.
Combat stats are ''hp'' (health points), ''ac'' (armor class), ''str'', ''dex'', ''con'', ''int'', ''wis'', ''cha''.<br>
 
Meta variables are ''player'', ''campaign'', ''status''.<br>
Combat stats: ''hp'' (hit points), ''ac'' (armor class), ''str'', ''dex'', ''con'', ''int'', ''wis'', ''cha''.
Function variables are ''nocat''.<br>
 
If ''player'' is set to anything, the Player Characters category is added, otherwise the NPCs category is added. If ''nocat'' is set to anything (e.g. |nocat=1), no category is added by the template.
Meta variables: ''player'', ''campaign'', ''status''.
 
Function variables: ''nocat''.
 
If ''player'' is set to anything, the Player Characters category is added, otherwise NPCs. If ''nocat'' is set (e.g. <nowiki>|nocat=1</nowiki>), no category is added.
 
==Example==
{{Infobox_character
| name = Nomad
| image = Nomad.png
| image_caption = Token
| race = Warforged
| class = Monk
| subclass = Warrior of Mercy
| alignment = Lawful Neutral
| background = Soldier
| faction = [[This can be whatever you want baybeee|The One Thousand Strong]]
| level = 6
| hp = 45
| ac = 18
| str = 12
| dex = 18
| con = 14
| int = 10
| wis = 16
| cha = 8
| player = [[User:Olivinism|Ronan]]
| campaign = [[Nightmare]], [[Prime]]
| status = Alive
| nocat = 1
}}
<pre>
{{Infobox_character
| name = Nomad
| image = Nomad.png
| image_caption = Token
| race = Warforged
| class = Monk
| subclass = Warrior of Mercy
| alignment = Lawful Neutral
| background = Soldier
| faction = [[factionname|The One Thousand Strong]]
| level = 6
| hp = 45
| ac = 18
| str = 12
| dex = 18
| con = 14
| int = 10
| wis = 16
| cha = 8
| player = [[User:Olivinism|Ronan]]
| campaign = [[Nightmare]], [[Prime]]
| status = Alive
| nocat = 1
}}
</pre>
[[Category:Infobox Templates]]
</noinclude>
</noinclude>