Difference between revisions of "Template:Infobox character"

From Dwaia Wiki
Jump to navigation Jump to search
m (Removed the extra Alias row)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
{| class="wikitable infobox" style="float:right; margin-left: 10px; width:300px"
+
<table class="infobox">
!colspan="2" style="font-size:20px"|{{{name|{{PAGENAME}}}}}
+
{{ Infobox default title      | {{{name|{{PAGENAME}}}}} }}
|-
+
 
|colspan="2"|[[File:{{{image}}}|frameless]]
+
{{ Infobox conditional image  | {{{image|}}}       }}
|-
+
{{ Infobox conditional caption | {{{imagecaption|}}}    }}
|colspan="2" class="caption"|{{{imagecaption|}}}
+
 
|-
+
 
| Aliases
+
{{ Infobox conditional data    | Aliases   | {{{aliases|}}}        }}
| {{{aliases|}}}
+
{{ Infobox conditional data    | Relatives | {{{relatives|}}}        }}
|-
+
{{ Infobox conditional data    | Affiliation| {{{affiliation|}}}        }}
| Relatives
+
 
| {{{relatives|}}}
+
{{ Infobox conditional section
|-
+
| cond = {{{element|}}}{{{level|}}}{{{skills|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}} <!-- This checks if any of the stats are defined by concatenating them and seeing if the string is empty -->
| Affiliation
+
| title = Stats
| {{{affiliation|}}}
+
|
|-
+
{{ Infobox conditional data    | Elements  | {{{element|}}}        }}
!colspan="2" style="text-align:center; font-size:16px"|Stats
+
{{ Infobox conditional data    | Level     | {{{level|}}}        }}
|-
+
{{ Infobox conditional data    | Skills     | {{{skills|}}}        }}
| Element
+
{{ Infobox conditional data    | STR       | {{{str|}}}        }}
| {{{element|}}}
+
{{ Infobox conditional data    | DEX       | {{{dex|}}}        }}
|-
+
{{ Infobox conditional data    | CON       | {{{con|}}}        }}
| Level
+
{{ Infobox conditional data    | INT       | {{{int|}}}        }}
| {{{level|}}}
+
{{ Infobox conditional data    | WIS       | {{{wis|}}}        }}
|-
+
{{ Infobox conditional data    | CHA       | {{{cha|}}}        }}
| Skills
+
{{ Infobox conditional caption | [[Stats Explained|What are these stats?]]       }}
| {{{skills|}}}
+
}}
|-
+
 
| STR
+
{{ Infobox conditional section
| {{{str|-}}}
+
| cond = {{{country|}}}{{{marital|}}}{{{birthDate|}}}{{{birthPlace|}}}{{{deathDate|}}}{{{deathPlace|}}}
|-
+
| title = Biographical information
| DEX
+
|
| {{{dex|-}}}
+
{{ Infobox conditional data    | Country       | {{{country|}}}        }}
|-
+
{{ Infobox conditional data    | Marital status | {{{marital|}}}        }}
| CON
+
{{ Infobox conditional data    | Date of birth | {{{birthDate|}}}        }}
| {{{con|-}}}
+
{{ Infobox conditional data    | Place of birth | {{{birthPlace|}}}        }}
|-
+
{{ Infobox conditional data    | Date of death | {{{deathDate|}}}        }}
| INT
+
{{ Infobox conditional data    | Place of death | {{{deathPlace|}}}        }}
| {{{int|-}}}
+
}}
|-
+
 
| WIS
+
{{ Infobox conditional section
| {{{wis|-}}}
+
| cond = {{{species|}}}{{{gender|}}}{{{height|}}}{{{weight|}}}
|-
+
| title = Biographical information
| CHA
+
|
| {{{cha|-}}}
+
{{ Infobox conditional data    | Species   | {{{species|}}}        }}
|-
+
{{ Infobox conditional data    | Gender     | {{{gender|}}}        }}
|colspan="2" class="caption"|[[Stats Explained|What are these stats?]]
+
{{ Infobox conditional data    | Height     | {{{height|}}}        }}
|-
+
{{ Infobox conditional data    | Weight     | {{{weight|}}}        }}
!colspan="2" style="font-size:16px"|Biographical information
+
{{ Infobox conditional data    | Eye color  | {{{eyes|}}}        }}
|-
+
}}
| Country
+
 
| {{{country|}}}
+
</table>
|-
 
| Marital status
 
| {{{marital|}}}
 
|-
 
|Date of birth
 
|{{{birthDate|}}}
 
|-
 
|Place of birth
 
|{{{birthPlace|}}}
 
|-
 
|Date of death
 
|{{{birthDate|}}}
 
|-
 
|Place of death
 
|{{{birthPlace|}}}
 
|-
 
!colspan="2" style="font-size:16px"|Physical description
 
|-
 
| Species
 
| {{{species|}}}
 
|-
 
| Gender
 
| {{{gender|}}}
 
|-
 
| Height
 
| {{{height|}}}
 
|-
 
| Weight
 
| {{{weight|}}}
 
|}
 
 
<noinclude>
 
<noinclude>
  
 
==How to use==
 
==How to use==
Fill in the fields in this empty template with the appropriate values for the character:
+
Fill in the fields in this empty template with the appropriate values for the character. Fields that are not filled are automatically hidden.
 
<pre>
 
<pre>
 
{{infobox character
 
{{infobox character
Line 114: Line 84:
  
 
==Example==
 
==Example==
 +
<table><tr style="vertical-align:top;"><td>
 
This source code...
 
This source code...
 
<pre>
 
<pre>
Line 140: Line 111:
 
}}
 
}}
 
</pre>
 
</pre>
 +
</td><td>
 
...becomes this infobox:
 
...becomes this infobox:
 
{{infobox character
 
{{infobox character
Line 163: Line 135:
 
  | height = 1.80m (body),<br/>1.20m (hands)
 
  | height = 1.80m (body),<br/>1.20m (hands)
 
  | weight = 105kg (body),<br/>400kg (hands)
 
  | weight = 105kg (body),<br/>400kg (hands)
}}</noinclude>
+
}}
 +
</td></tr></table>
 +
 
 +
[[Category:Templates]]
 +
</noinclude>

Latest revision as of 19:53, 11 May 2019

Infobox character


How to use

Fill in the fields in this empty template with the appropriate values for the character. Fields that are not filled are automatically hidden.

{{infobox character
 | name         =
 | image        =
 | imagecaption =
 | aliases      =
 | affiliation  =
 | element      =
 | level        =
 | skills       =
 | str          =
 | con          =
 | dex          =
 | int          =
 | cha          =
 | wis          =
 | marital      =
 | birthDate    =
 | birthPlace   =
 | deathDate    =
 | deathPlace   =
 | species      =
 | gender       =
 | height       =
 | weight       =
 | eyes         =
}}

Example

This source code...

{{infobox character
 | name = gremscro big hands
 | image = 3d61387525a4b6817f6e4f80395f16bf.png
 | imagecaption = he
 | aliases = gremscro,<br/>big hands
 | relatives = [[Biggie Hands]] (father),<br/>[[Handa Biggs]] (mother),<br/>[[gremscro big hands]] (himself)
 | affiliation = idunno
 | element      = [[Meat (element)|Meat]]
 | level        = ∞
 | skills       = all
 | str          = big hands
 | con          = big hands
 | dex          = big hands
 | int          = big hands
 | cha          = big hands
 | wis          = big hands
 | country = [[Edgeon // The Dark Rift]]
 | marital = big
 | species = gremscro big hands
 | gender = big hands
 | height = 1.80m (body),<br/>1.20m (hands)
 | weight = 105kg (body),<br/>400kg (hands)
}}

...becomes this infobox:

gremscro big hands
3d61387525a4b6817f6e4f80395f16bf.png
he
Aliases gremscro,
big hands
Relatives Biggie Hands (father),
Handa Biggs (mother),
gremscro big hands (himself)
Affiliation idunno
Stats
Elements Meat
Level
Skills all
STR big hands
DEX big hands
CON big hands
INT big hands
WIS big hands
CHA big hands
What are these stats?
Biographical information
Country Edgeon // The Dark Rift
Marital status big
Biographical information
Species gremscro big hands
Gender big hands
Height 1.80m (body),
1.20m (hands)
Weight 105kg (body),
400kg (hands)