From Dark and Darker Wiki

(updated the example)
(Automated to grab data from Template:Class Data.)
Line 3: Line 3:
<div class="itemboxheader">
<div class="itemboxheader">
<div style="float:left">
<div style="float:left">
{{Iconbox|{{{name}}}|caption=no|size=96px|nolink=1}}
{{Iconbox|{{{1}}}|caption=no|size=96px|nolink=1}}
</div>
</div>
<div style="width:60%;max-width:280px;margin-left:15px;height:100px;justify-content:space-between!important;display:flex;flex-direction: column!important;float:left;margin-top:0px;">
<div style="width:60%;max-width:280px;margin-left:15px;height:100px;justify-content:space-between!important;display:flex;flex-direction: column!important;float:left;margin-top:0px;">
<div class="bold" style="margin-top:0px!important;font-size:22px;">{{{name}}}</div>
<div class="bold" style="margin-top:0px!important;font-size:22px;">{{{1}}}</div>
             <div style="width:100%;justify-content:space-between!important;display:flex;flex-direction: row!important;font-size:17px;">
             <div style="width:100%;justify-content:space-between!important;display:flex;flex-direction: row!important;font-size:17px;">
<div style="color:rgb(221,149,42);">{{{type}}}</div>
<div style="color:rgb(221,149,42);">{{{2}}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="line"></div>
<div class="line"></div>
{{#if:{{{strength|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Strength</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Strength</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{strength}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#if:true|{{Class Data|{{{1}}}|attributes|strength}}}}</div>
</div>
</div>
|}}
{{#if:{{{vigor|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Vigor</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Vigor</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{vigor}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#if:true|{{Class Data|{{{1}}}|attributes|vigor}}}}</div>
</div>
</div>
|}}
{{#if:{{{agility|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Agility</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Agility</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{agility}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#if:true|{{Class Data|{{{1}}}|attributes|agility}}}}</div>
</div>
</div>
|}}
{{#if:{{{dexterity|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Dexterity</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Dexterity</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{dexterity}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#if:true|{{Class Data|{{{1}}}|attributes|dexterity}}}}</div>
</div>
</div>
|}}
{{#if:{{{will|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Will</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Will</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{will}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#if:true|{{Class Data|{{{1}}}|attributes|will}}}}</div>
</div>
</div>
|}}
{{#if:{{{knowledge|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Knowledge</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Knowledge</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{knowledge}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#vardefineecho:knowledge|{{Class Data|{{{1}}}|attributes|knowledge}}}}</div>
</div>
</div> <div class="stats-container" style="clear: both;">
|}}
{{#if:{{{resourcefulness|}}}|
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Resourcefulness</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Resourcefulness</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{{resourcefulness}}}</div>
<div style="float: right;width: 20%;color:rgb(132,176,5);text-align-last: right;font-weight:bold;">{{#if:true|{{Class Data|{{{1}}}|attributes|resourcefulness}}}}</div>
</div>
</div>
|}}
   
<br><div class="line"></div>
   
{{#if:{{{health|}}}|
<div class="line"></div>
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Health</div>
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Health</div>
<div style="float: right;width: 20%;text-align-last: right;font-weight:bold;">{{{health}}}</div>
<div style="float: right;width: 20%;text-align-last: right;font-weight:bold;"><!--
            -->{{#vardefine:sum|{{#expr:{{Class Data|{{{1}}}|attributes|strength}}*0.25+{{Class Data|{{{1}}}|attributes|vigor}}*0.75}}}}<!--
            -->{{#ifexpr:{{#var:sum}}<=10|{{#expr:ceil(60+3*{{#var:sum}})}}|{{#expr:ceil(90+2*({{#var:sum}}-10))}}}}<!--
            --></div>
</div>
</div>
|}}
{{#ifeq:{{lc:{{{3|}}}}}|yes|
{{#if:{{{weight limit|}}}|
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 30%; font-weight:bold; color:rgb(221,149,42);">Weight Limit</div>
<div style="float: right;width: 20%;text-align-last: right;font-weight:bold;">{{{weight limit}}}</div>
</div>
|}}
{{#if:{{{spell memory|}}}|
<div class="stats-container" style="clear: both;">
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 40%; font-weight:bold; color:rgb(221,149,42);">Memory</div>
<div style="float: left; width: 40%; font-weight:bold; color:rgb(221,149,42);">Memory</div>
<div style="float: right;width: 20%;text-align-last: right;font-weight:bold;">{{{spell memory}}}</div>
<div style="float: right;width: 20%;text-align-last: right;font-weight:bold;">{{#ifexpr:{{#var:knowledge}}>6|{{#expr:{{Class Data|{{{1}}}|attributes|knowledge}}-6}}|0}}</div>
</div>
</div>|
|}}
{{#if:{{{utility effectiveness|}}}|
<div class="stats-container" style="clear: both;">
<div style="float: left; width: 40%; font-weight:bold; color:rgb(221,149,42);">Utility Effectiveness</div>
<div style="float: right;width: 20%;text-align-last: right;font-weight:bold;">{{{utility effectiveness}}}</div>
</div>
|}}
|}}
</div>
</div>
Line 86: Line 62:
== Usage ==
== Usage ==
This template can be used by entering the following onto a relevant page. Do not use this on your user page. It is reserved for content pages.
This template can be used by entering the following onto a relevant page. Do not use this on your user page. It is reserved for content pages.
<pre>{{Infobox Class
<pre>{{Infobox Class|Barbarian|'The Brawny Warrior'}}
|name                  = Barbarian
|type                  = 'The Brawny Warrior'
|strength              = 30
|vigor                = 30
|agility              = 11
|dexterity            = 30
|will                  = 18
|knowledge            = 6
|resourcefulness      = 10
|health                = 130
|weight limit          = 0 / 0
|spell memory          = 0 / 0
|utility effectiveness = 0
}}
</pre>
</pre>
Results in:
Results in:
 
{{Infobox Class|Barbarian|'The Brawny Warrior'}}
{{Infobox Class
|name                  = Barbarian
|type                  = 'The Brawny Warrior'
|strength              = 30
|vigor                = 30
|agility              = 11
|dexterity            = 30
|will                  = 18
|knowledge            = 6
|resourcefulness      = 10
|health                = 130
|weight limit          = 0 / 0
|spell memory          = 0 / 0
|utility effectiveness = 0
}}

Revision as of 18:35, 27 February 2024


Usage

This template can be used by entering the following onto a relevant page. Do not use this on your user page. It is reserved for content pages.

{{Infobox Class|Barbarian|'The Brawny Warrior'}}

Results in:

Barbarian.png
Barbarian
'The Brawny Warrior'
Strength
25
Vigor
25
Agility
13
Dexterity
12
Will
18
Knowledge
5
Resourcefulness
7


Health
120