Jump to content

Template:Infobox character: Difference between revisions

From Elysium D&D
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
 
rework template
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
<includeonly>{{Infobox
<includeonly><templatestyles src="Template:Infobox/styles.css" />{| class="wikitable infobox" style="width:20%;"
| class     = infobox-character
! colspan=4 | {{{name|{{PAGENAME}}}}}
| title    = {{{name|{{PAGENAME}}}}}
{{#if:{{{image|}}}|{{!}}- style="text-align:center"
| image    = {{{image|}}}
{{!}}colspan=4 style="text-align:center"{{!}}[[File:{{{image|}}}{{!}}frameless]]<br/><span style="font-size:87%">{{{image_caption|}}}</span>}}
| caption  = {{{image_caption|}}}
|-{{#if:{{{race|}}}
| subtitle  = {{{title|}}}
!colspan=2{{!}}Race
| label1  = Race       | data1  = {{{race|}}}
{{!}}{{{race}}}
| label2  = Class       | data2  = {{{class|}}}
{{!}}-|}}{{#if:{{{class|}}}|
| label3  = Subclass    | data3  = {{{subclass|}}}
!colspan=2{{!}}Class
| label4  = Level       | data4  = {{{level|}}}
{{!}}{{{class}}}
| label5  = Alignment   | data5  = {{{alignment|}}}
{{!}}-|}}{{#if:{{{subclass|}}}|
| label6  = Background | data6  = {{{background|}}}
!colspan=2{{!}}Sublass
| label7  = Deity      | data7  = {{{deity|}}}
{{!}}{{{subclass}}}
| header8 = {{#if:{{{hp|}}}{{{ac|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|Combat}}
{{!}}-|}}{{#if:{{{level|}}}|
| label9  = Hit Points | data9  = {{{hp|}}}
!colspan=2{{!}}Level
| label10 = Armor Class | data10 = {{{ac|}}}
{{!}}{{{level}}}
| 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>}}
{{!}}-|}}{{#if:{{{alignment|}}}|
| header12 = {{#if:{{{player|}}}{{{campaign|}}}{{{status|}}}|Meta}}
!colspan=2{{!}}Alignment
| label13 = Player     | data13 = {{{player|}}}
{{!}}{{{alignment}}}
| label14 = Campaign   | data14 = {{{campaign|}}}
{{!}}-|}}{{#if:{{{background|}}}|
| label15 = Status     | data15 = {{{status|}}}
!colspan=2{{!}}Background
}}</includeonly><noinclude>
{{!}}{{{background}}}{{#if:{{{faction|}}}|
Character infobox. Built on [[Template:Infobox]].
!colspan=2{{!}}Faction
{{!}}{{{faction}}}
{{!}}-|}}
{{!}}-|}}{{#if:{{{hp|}}}{{{ac|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|
!colspan=4{{!}}Combat
{{!}}-|}}{{#if:{{{hp|}}}|
!colspan=2{{!}}Hit Points
{{!}}{{{hp}}}
{{!}}-|}}{{#if:{{{ac|}}}|
!colspan=2{{!}}Armor Class
{{!}}{{{ac}}}
{{!}}-|}}{{#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>
{{!}}-|}}{{#if:{{{player|}}}{{{campaign|}}}{{{status|}}}|
!colspan=4{{!}}Meta
{{!}}-|}}{{#if:{{{player|}}}|{{#if:{{{nocat|}}}||[[Category:Player Characters]]}}
!colspan=2{{!}}Player
{{!}}{{{player}}}
{{!}}-|{{#if:{{{nocat|}}}||[[Category:NPCs]]}}}}{{#if:{{{campaign|}}}|
!colspan=2{{!}}Campaign
{{!}}{{{hp}}}
{{!}}-|}}{{#if:{{{status|}}}|
!colspan=2{{!}}Status
{{!}}{{{status}}}
{{!}}-|}}
|}</includeonly><noinclude>
Character infobox.  
 
Base variables are ''name'', ''image'', ''image_caption'', ''race'', ''class'', ''subclass'', ''level'', ''alignment'', ''background'', ''faction''.<br>
Combat stats are ''hp'' (health points), ''ac'' (armor class), ''str'', ''dex'', ''con'', ''int'', ''wis'', ''cha''.<br>
Meta variables are ''player'', ''campaign'', ''status''.<br>
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.
</noinclude>
</noinclude>

Revision as of 21:13, 10 August 2026

Character infobox.

Base variables are 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.
Meta variables are player, campaign, status.
Function variables are nocat.
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.