Difference between revisions of "Template:Playable"

From Stoneshard wiki
Jump to navigation Jump to search
old>Phoe nixx
m (color unique trait orange)
m (hoverable stats)
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
|style="text-align:center;"|<span style="font-size: 20px;">{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}</span><br><span style="color:#95796a;">'''{{:{{ROOTPAGENAME}}|Class}}'''</span>[[File:{{#if:{{:{{ROOTPAGENAME}}|Image}}|{{:{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|center|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]
|style="text-align:center;"|<span style="font-size: 20px;">{{#if:{{:{{ROOTPAGENAME}}|Name}}|{{:{{ROOTPAGENAME}}|Name}}|{{ROOTPAGENAME}}}}</span><br><span style="color:#95796a;">'''{{:{{ROOTPAGENAME}}|Class}}'''</span>[[File:{{#if:{{:{{ROOTPAGENAME}}|Image}}|{{:{{ROOTPAGENAME}}|Image}}|{{ROOTPAGENAME}}.png}}|center|link={{#ifeq:{{SUBPAGENAME}}|Tooltip|{{BASEPAGENAME}}|{{PAGENAME}}/Tooltip}}|alt={{ROOTPAGENAME}}|{{ROOTPAGENAME}}]]
|-
|-
|<div style="width:100%;color:white;">
|<div style="width:100%;">
<div style="float:left;">{{Translate|Race|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Race}}</div> {{Clear}}
<div style="float:left;">{{Translate|Race|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Race}}</div> {{Clear}}
<div style="float:left;">{{Translate|Gender|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Gender}}</div> {{Clear}}
<div style="float:left;">{{Translate|Gender|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|Gender}}</div> {{Clear}}
<div style="float:left;">{{Translate|Unique Trait|Properties}}:</div> <div style="float: right;">{{cl|UniqueTrait|{{:{{ROOTPAGENAME}}|UniqueTrait}}}}</div> {{Clear}}
<div style="float:left;">{{Translate|Unique Trait|Properties}}:</div> <div style="float: right;">{{cl|UniqueTrait|{{:{{ROOTPAGENAME}}|UniqueTrait}}}}</div> {{Clear}}
<div>&nbsp;</div> {{Clear}}
<div>&nbsp;</div> {{Clear}}
<div style="float:left;">{{Translate|Strength|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|STR}}</div> {{Clear}}
<div style="float:left;">{{#tip-text:{{Translate|Strength|Properties}} | {{:Strength}}}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|STR}}</div> {{Clear}}
<div style="float:left;">{{Translate|Agility|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|AGL}}</div> {{Clear}}
<div style="float:left;">{{#tip-text:{{Translate|Agility|Properties}} | {{:Agility}}}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|AGL}}</div> {{Clear}}
<div style="float:left;">{{Translate|Perception|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|PRC}}</div> {{Clear}}
<div style="float:left;">{{#tip-text:{{Translate|Perception|Properties}} | {{:Perception}}}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|PRC}}</div> {{Clear}}
<div style="float:left;">{{Translate|Vitality|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|VIT}}</div> {{Clear}}
<div style="float:left;">{{#tip-text:{{Translate|Vitality|Properties}} | {{:Vitality}}}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|VIT}}</div> {{Clear}}
<div style="float:left;">{{Translate|Willpower|Properties}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|WIL}}</div> {{Clear}}
<div style="float:left;">{{#tip-text:{{Translate|Willpower|Properties}} | {{:Willpower}}}}:</div> <div style="float: right;">{{:{{ROOTPAGENAME}}|WIL}}</div> {{Clear}}
</div>
</div>
|}
|}

Latest revision as of 22:24, 1 April 2023

Template-info.png Documentation

This is playable character template created for use together with the Template:Tooltip hover box template on a specific playable character's page or playable character's tooltip page.

Usage: The page itself must contain the playable character's data before this Template works. For example, if I wanted to create the Jorgrim page, I'll add this code to the start of the page and modify the values:

<includeonly>{{#switch: {{{1}}}
|Class = Reaver
|Race = Dwarf
|Gender = Male
|UniqueTrait = Berserker Frenzy
|STR = 12
|AGL = 12
|PRC = 10
|VIT = 12
|WIL = 10
|#default = 
}}</includeonly>

This data is invisible on the page itself, thanks to the includeonly tags.


Next, copy this code to Jorgrim or Jorgrim/Tooltip or Jorgrim/anything page:

{{ {{{1|Tooltip hover box}}}
|title= {{Playable}}
}}

It will automatically load the playable character's data and fill them into this format. Go to Jorgrim to see the result.