Jump to content

Template:Character: Difference between revisions

From Ulrapedia
No edit summary
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 6: Line 6:
|class=String
|class=String
|subclass=String
|subclass=String
|occupation=String
|gender=String
|gender=String
|age=String
|titles=String
|alignment=String
|aliases=String
|status=String
|birthplace=String
|residence=String
|nation=String
|religion=String
|groups=String
|affiliation=String
|player=String
|introduced=String
|last_seen=String
}}
}}


== About ==
== About ==
This template creates a character infobox that floats on the right side of the page.
This template creates a character infobox that floats on the right side of the page. All fields are optional — empty fields are automatically hidden.
All fields are optional — empty fields are automatically hidden.


Fields that auto-link to other wiki pages: campaign, species, birthplace, residence, nation, spouse.
It also supports automatic categorization and linking for certain fields.


Fields that support comma-separated lists with auto-linking: titles, aliases, affiliation, groups, parents, siblings, children.
== Field Reference ==
{| class="wikitable" style="width:100%;"
! Field !! Auto-Links? !! Auto-Categorizes?
|-
| Name || {{No}} || {{No}}
|-
| Campaign || {{Yes}} || {{Yes}}
|-
| Species || {{Yes}} || {{Yes}}
|-
| Class || {{Yes}} || {{Yes}}
|-
| Subclass || {{Yes}} || {{Yes}}
|-
| Gender || {{Yes}} || {{Yes}}
|-
| Titles || {{No}} || {{No}}
|-
| Aliases || {{No}} || {{No}}
|}


Status automatically categorizes the page into Living characters, Dead characters, or Missing characters.
Additionally, the character template adds the Character category and a dynamic campaign dependent character category. IE Allesian Archives Character if that is filled in for campaign. I may also add an important connections tag, unless I can find a better way to fast track important links. Same with Age but like better.


If the player field is filled in the page is categorized as a Player Character, otherwise as an NPC. All character pages are added to the Characters category.
</noinclude>
{{Infobox
|title={{{name|{{PAGENAME}}}}}
|1=
{{#if:{{{image|}}}|{{RowImage|{{{image}}}}}|}}
{{#if:{{{player|}}}|{{RowKV|Player|{{{player}}}}}|}}
{{#if:{{{campaign|}}}|{{RowKV|Campaign|[[{{{campaign}}}]]}}|}}
{{#if:{{{species|}}}|{{RowKV|Species|[[{{{species}}}]]}}|}}
{{#if:{{{gender|}}}|{{RowKV|Gender|{{{gender}}}}}|}}
{{#if:{{{age|}}}|{{RowKV|Age|{{{age}}}}}|}}
{{#if:{{{class|}}}|{{RowKV|Class|{{{class}}}}}|}}
{{#if:{{{subclass|}}}|{{RowKV|Subclass|{{{subclass}}}}}|}}
{{#if:{{{alignment|}}}|{{RowKV|Alignment|{{{alignment}}}}}|}}
{{#if:{{{occupation|}}}|{{RowKV|Occupation|{{{occupation}}}}}|}}
{{#if:{{{titles|}}}|{{RowKV|Titles|{{CommaLink|{{{titles}}}}}}}|}}
{{#if:{{{aliases|}}}|{{RowKV|Aliases|{{CommaLink|{{{aliases}}}}}}}|}}
{{#if:{{{affiliation|}}}|{{RowKV|Affiliation|{{CommaLink|{{{affiliation}}}}}}}|}}
{{#if:{{{groups|}}}|{{RowKV|Groups|{{CommaLink|{{{groups}}}}}}}|}}
{{#if:{{{religion|}}}|{{RowKV|Religion|{{{religion}}}}}|}}
{{#if:{{{birthplace|}}}|{{RowKV|Birthplace|[[{{{birthplace}}}]]}}|}}
{{#if:{{{residence|}}}|{{RowKV|Residence|[[{{{residence}}}]]}}|}}
{{#if:{{{nation|}}}|{{RowKV|Nation|[[{{{nation}}}]]}}|}}
{{#if:{{{born|}}}|{{RowKV|Born|{{{born}}}}}|}}
{{#if:{{{died|}}}|{{RowKV|Died|{{{died}}}}}|}}
{{#if:{{{parents|}}}|{{RowKV|Parents|{{CommaLink|{{{parents}}}}}}}|}}
{{#if:{{{spouse|}}}|{{RowKV|Spouse|[[{{{spouse}}}]]}}|}}
{{#if:{{{siblings|}}}|{{RowKV|Siblings|{{CommaLink|{{{siblings}}}}}}}|}}
{{#if:{{{children|}}}|{{RowKV|Children|{{CommaLink|{{{children}}}}}}}|}}
{{#if:{{{status|}}}|{{RowKV|Status|{{{status}}}}}|}}
{{#if:{{{introduced|}}}|{{RowKV|First Seen|''{{{introduced}}}''}}|}}
{{#if:{{{last_seen|}}}|{{RowKV|Last Seen|''{{{last_seen}}}''}}|}}
}}
== Info ==
== Lore ==
<includeonly>
{{#cargo_store:_table=Characters
|name={{{name|{{PAGENAME}}}}}
|campaign={{{campaign|}}}
|species={{{species|}}}
|class={{{class|}}}
|subclass={{{subclass|}}}
|occupation={{{occupation|}}}
|gender={{{gender|}}}
|age={{{age|}}}
|alignment={{{alignment|}}}
|status={{{status|}}}
|birthplace={{{birthplace|}}}
|residence={{{residence|}}}
|nation={{{nation|}}}
|religion={{{religion|}}}
|groups={{{groups|}}}
|affiliation={{{affiliation|}}}
|player={{{player|}}}
|introduced={{{introduced|}}}
|last_seen={{{last_seen|}}}
}}
{{#switch:{{{status|}}}
| Dead = [[Category:Dead characters]]
| Alive = [[Category:Living characters]]
| Missing = [[Category:Missing characters]]
}}
{{#if:{{{player|}}}|[[Category:Player characters]]|[[Category:NPCs]]}}
[[Category:Characters]]
</includeonly>
<noinclude>
== Usage ==
== Usage ==
<pre>
<pre>
Line 106: Line 45:
|image=
|image=
|campaign=
|campaign=
|player=
|species=
|species=
|gender=
|gender=
|age=
|class=
|class=
|subclass=
|subclass=
|alignment=
|occupation=
|titles=
|titles=
|aliases=
|aliases=
|affiliation=
|groups=
|religion=
|birthplace=
|residence=
|nation=
|born=
|died=
|parents=
|spouse=
|siblings=
|children=
|status=
|introduced=
|last_seen=
}}
}}
</pre>
</pre>
[[Category:Infobox templates]]
[[Category:Infobox templates]]
</noinclude>
</noinclude>
<includeonly>
{{#cargo_store:_table=Characters
|name={{{name|{{PAGENAME}}}}}
|campaign={{{campaign|}}}
|species={{{species|}}}
|class={{{class|}}}
|subclass={{{subclass|}}}
|gender={{{gender|}}}
|titles={{{titles|}}}
|aliases={{{aliases|}}}
}}
{{#if:{{{campaign|}}}|[[Category:{{ucfirst:{{{campaign}}}}} Characters]]}}
{{#if:{{{species|}}}|[[Category:{{ucfirst:{{{species}}}}}]]}}
{{#if:{{{class|}}}|[[Category:{{ucfirst:{{{class}}}}}]]}}
{{#if:{{{subclass|}}}|[[Category:{{ucfirst:{{{subclass}}}}}]]}}
{{#if:{{{gender|}}}|[[Category:{{ucfirst:{{{gender}}}}} Characters]]}}
{{Infobox|title={{{name|{{PAGENAME}}}}}|1=
{{#if:{{{image|}}}|{{RowImage|{{{image}}}}}}}
{{#if:{{{campaign|}}}|{{RowKV|Campaign|[[{{{campaign}}}]]}}}}
{{#if:{{{species|}}}|{{RowKV|Species|[[{{{species}}}]]}}}}
{{#if:{{{gender|}}}|{{RowKV|Gender|[[{{{gender}}}]]}}}}
{{#if:{{{class|}}}|{{RowKV|Class|[[{{{class}}}]]}}}}
{{#if:{{{subclass|}}}|{{RowKV|Subclass|[[{{{subclass}}}]]}}}}
{{#if:{{{titles|}}}|{{RowKV|Titles|{{{titles}}}}}}}
{{#if:{{{aliases|}}}|{{RowKV|Aliases|{{{aliases}}}}}}}
}}
[[Category:Characters]]
</includeonly>

Latest revision as of 03:22, 8 June 2026

This template defines the table "Characters". View table.

About

This template creates a character infobox that floats on the right side of the page. All fields are optional — empty fields are automatically hidden.

It also supports automatic categorization and linking for certain fields.

Field Reference

Field Auto-Links? Auto-Categorizes?
Name No No
Campaign Yes Yes
Species Yes Yes
Class Yes Yes
Subclass Yes Yes
Gender Yes Yes
Titles No No
Aliases No No

Additionally, the character template adds the Character category and a dynamic campaign dependent character category. IE Allesian Archives Character if that is filled in for campaign. I may also add an important connections tag, unless I can find a better way to fast track important links. Same with Age but like better.

Usage

{{Character
|name=
|image=
|campaign=
|species=
|gender=
|class=
|subclass=
|titles=
|aliases=
}}