Jump to content

Template:Infobox character: Difference between revisions

Olivinism (talk | contribs)
Created page with "<includeonly>{{Infobox | class = infobox-character | title = {{{name|{{PAGENAME}}}}} | image = {{{image|}}} | caption = {{{image_caption|}}} | subtitle = {{{title|}}} | label1 = Race | data1 = {{{race|}}} | label2 = Class | data2 = {{{class|}}} | label3 = Subclass | data3 = {{{subclass|}}} | label4 = Level | data4 = {{{level|}}} | label5 = Alignment | data5 = {{{alignment|}}} | label6 = Background | data6 = {{{backgroun..."
Tag: Recreated
 
Olivinism (talk | contribs)
Undid revision 542 by Olivinism (talk)
Tag: Undo
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{Infobox
<includeonly><templatestyles src="Template:Infobox/styles.css" />
| class     = infobox-character
{| class="wikitable infobox" style="width:20%;"
| title    = {{{name|{{PAGENAME}}}}}
! colspan="4" | {{{name|{{PAGENAME}}}}}
| image    = {{{image|}}}
{{#if:{{{image|}}}|
| caption  = {{{image_caption|}}}
{{!}}-
| subtitle  = {{{title|}}}
{{!}} colspan="4" style="text-align:center" {{!}} [[File:{{{image}}}{{!}}frameless]]<br/><span style="font-size:87%">{{{image_caption|}}}</span>
| label1  = Race       | data1  = {{{race|}}}
}}
| label2  = Class       | data2  = {{{class|}}}
{{#if:{{{race|}}}|
| label3  = Subclass   | data3  = {{{subclass|}}}
{{!}}-
| label4  = Level       | data4  = {{{level|}}}
! colspan="2" {{!}} Race
| label5  = Alignment   | data5  = {{{alignment|}}}
{{!}} colspan="2" {{!}} {{{race}}}
| label6  = Background | data6  = {{{background|}}}
}}
| label7  = Deity      | data7  = {{{deity|}}}
{{#if:{{{class|}}}|
| header8 = {{#if:{{{hp|}}}{{{ac|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|Combat}}
{{!}}-
| label9  = Hit Points | data9  = {{{hp|}}}
! colspan="2" {{!}} Class
| label10 = Armor Class | data10 = {{{ac|}}}
{{!}} colspan="2" {{!}} {{{class}}}
| data11 = {{#if:{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|<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>}}
}}
| header12 = {{#if:{{{player|}}}{{{campaign|}}}{{{status|}}}|Meta}}
{{#if:{{{subclass|}}}|
| label13 = Player     | data13 = {{{player|}}}
{{!}}-
| label14 = Campaign   | data14 = {{{campaign|}}}
! colspan="2" {{!}} Subclass
| label15 = Status     | data15 = {{{status|}}}
{{!}} colspan="2" {{!}} {{{subclass}}}
}}</includeonly><noinclude>
}}
Character infobox. Built on [[Template:Infobox]].
{{#if:{{{level|}}}|
{{!}}-
! colspan="2" {{!}} Level
{{!}} colspan="2" {{!}} {{{level}}}
}}
{{#if:{{{alignment|}}}|
{{!}}-
! colspan="2" {{!}} Alignment
{{!}} colspan="2" {{!}} {{{alignment}}}
}}
{{#if:{{{background|}}}|
{{!}}-
! colspan="2" {{!}} Background
{{!}} colspan="2" {{!}} {{{background}}}
}}
{{#if:{{{faction|}}}|
{{!}}-
! colspan="2" {{!}} Faction
{{!}} colspan="2" {{!}} {{{faction}}}
}}
{{#if:{{{hp|}}}{{{ac|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|
{{!}}-
! colspan="4" {{!}} Combat
}}
{{#if:{{{hp|}}}|
{{!}}-
! 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: ''name'', ''image'', ''image_caption'', ''race'', ''class'', ''subclass'', ''level'', ''alignment'', ''background'', ''faction''.
 
Combat stats: ''hp'' (hit points), ''ac'' (armor class), ''str'', ''dex'', ''con'', ''int'', ''wis'', ''cha''.
 
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>