Template:AttributeBlock: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Big update to template, now supports many more fields)
m (Closing <p> tags)
 
(16 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<includeonly><table class="bg3wiki-info-blob" style="text-align: center; min-width: {{#if: {{{6|}}} | 420px | 210px}};"><!--
<includeonly><table style="text-align: center; min-width: 210px; background-color: transparent;"><!--


------------
------------
LEVEL
LEVEL
------------
------------
-->{{#if: {{{level|}}} | <tr><td colspan="100%"><p style="text-align:center;line-height:0.7">Level {{{level}}}</p></td></tr>}}<!--
-->{{#if: {{{level|}}} | <tr><td colspan="100%"><p style="text-align:center; line-height:0.7">Level {{{level}}}</p></td></tr>}}<!--


------------
------------
ABILITY SCORES
ABILITY SCORES
------------
------------
--><tr>
-->{{#if: {{{1|}}} |
<td style="width:65px">
<tr>
[[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]]
<td style="width: 52px; vertical-align: top">
'''{{{1}}}''' {{#ifexpr: {{{1|}}} > 11 | <br><span style="font-size:0.8em">(+{{#expr:floor(({{{1|}}}-10)/2)}})</span> | {{#ifexpr: {{{1|}}} < 10 | <br><span style="font-size:0.8em">({{#expr:floor(({{{1|}}}-10)/2)}})</span> | <br>&nbsp; }} }}
{{#ifeq: {{{mode|}}} | t | | <p style="margin:0px">[[Strength|STR]]</p>}}
</td>
<div {{#if: {{IfEmpty | {{{str save|}}} }} | class="bg3wiki-d20-bg" title="Proficient in Strength saves" }} style="height:40px">'''<span style="display:block;padding-top:8px">{{{1}}}</span>'''</div> {{#ifexpr: {{{1|}}} > 11 | <span style="font-size:0.8em">(+{{#expr:floor(({{{1|}}}-10)/2)}})</span> | {{#ifexpr: {{{1|}}} < 10 | <span style="font-size:0.8em">({{#expr:floor(({{{1|}}}-10)/2)}})</span> |}} }}
</td>


<td style="width:65px">
<td style="width: 52px; vertical-align: top">
[[File:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]]
{{#ifeq: {{{mode|}}} | t | | <p style="margin:0px">[[Dexterity|DEX]]</p>}}
'''{{{2}}}''' {{#ifexpr: {{{2|}}} > 11 | <br><span style="font-size:0.8em">(+{{#expr:floor(({{{2|}}}-10)/2)}})</span> | {{#ifexpr: {{{2|}}} < 10 | <br><span style="font-size:0.8em">({{#expr:floor(({{{2|}}}-10)/2)}})</span> | <br>&nbsp; }} }}
<div {{#if: {{IfEmpty | {{{dex save|}}} }} | class="bg3wiki-d20-bg" title="Proficient in Dexterity saves" }} style="height:40px">'''<span style="display:block;padding-top:8px">{{{2}}}</span>'''</div> {{#ifexpr: {{{2|}}} > 11 | <span style="font-size:0.8em">(+{{#expr:floor(({{{2|}}}-10)/2)}})</span> | {{#ifexpr: {{{2|}}} < 10 | <span style="font-size:0.8em">({{#expr:floor(({{{2|}}}-10)/2)}})</span> |}} }}
</td>
</td>


<td style="width:65px">
<td style="width: 52px; vertical-align: top">
[[File:constitution icon.png|frameless|40px|center|link=Constitution]] [[Constitution|CON]]
{{#ifeq: {{{mode|}}} | t | | <p style="margin:0px">[[Constitution|CON]]</p>}}
'''{{{3}}}''' {{#ifexpr: {{{3|}}} > 11 | <br><span style="font-size:0.8em">(+{{#expr:floor(({{{3|}}}-10)/2)}})</span> | {{#ifexpr: {{{3|}}} < 10 | <br><span style="font-size:0.8em">({{#expr:floor(({{{3|}}}-10)/2)}})</span> | <br>&nbsp; }} }}
<div {{#if: {{IfEmpty | {{{con save|}}} }} | class="bg3wiki-d20-bg" title="Proficient in Constitution saves" }} style="height:40px">'''<span style="display:block;padding-top:8px">{{{3}}}</span>'''</div> {{#ifexpr: {{{3|}}} > 11 | <span style="font-size:0.8em">(+{{#expr:floor(({{{3|}}}-10)/2)}})</span> | {{#ifexpr: {{{3|}}} < 10 | <span style="font-size:0.8em">({{#expr:floor(({{{3|}}}-10)/2)}})</span> |}} }}
</td>
</td>


{{#if: {{{4|}}} |
{{#if: {{{4|}}} |
<td style="width:65px">
<td style="width: 52px; vertical-align: top">
[[File:intelligence icon.png|frameless|40px|center|link=Intelligence]] [[Intelligence|INT]]
{{#ifeq: {{{mode|}}} | t | | <p style="margin:0px">[[Intelligence|INT]]</p>}}
'''{{{4}}}''' {{#ifexpr: {{{4|}}} > 11 | <br><span style="font-size:0.8em">(+{{#expr:floor(({{{4|}}}-10)/2)}})</span> | {{#ifexpr: {{{4|}}} < 10 | <br><span style="font-size:0.8em">({{#expr:floor(({{{4|}}}-10)/2)}})</span> | <br>&nbsp; }} }}
<div {{#if: {{IfEmpty | {{{int save|}}} }} | class="bg3wiki-d20-bg" title="Proficient in Intelligence saves" }} style="height:40px">'''<span style="display:block;padding-top:8px">{{{4}}}</span>'''</div> {{#ifexpr: {{{4|}}} > 11 | <span style="font-size:0.8em">(+{{#expr:floor(({{{4|}}}-10)/2)}})</span> | {{#ifexpr: {{{4|}}} < 10 | <span style="font-size:0.8em">({{#expr:floor(({{{4|}}}-10)/2)}})</span> |}} }}
</td>
</td>
}}
}}


{{#if: {{{5|}}} |
{{#if: {{{5|}}} |
<td style="width:65px">
<td style="width: 52px; vertical-align: top">
[[File:wisdom icon.png|frameless|40px|center|link=Wisdom]] [[Wisdom|WIS]]
{{#ifeq: {{{mode|}}} | t | | <p style="margin:0px">[[Wisdom|WIS]]</p>}}
'''{{{5}}}''' {{#ifexpr: {{{5|}}} > 11 | <br><span style="font-size:0.8em">(+{{#expr:floor(({{{5|}}}-10)/2)}})</span> | {{#ifexpr: {{{5|}}} < 10 | <br><span style="font-size:0.8em">({{#expr:floor(({{{5|}}}-10)/2)}})</span> | <br>&nbsp; }} }}
<div {{#if: {{IfEmpty | {{{wis save|}}} }} | class="bg3wiki-d20-bg" title="Proficient in Wisdom saves" }} style="height:40px">'''<span style="display:block;padding-top:8px">{{{5}}}</span>'''</div> {{#ifexpr: {{{5|}}} > 11 | <span style="font-size:0.8em">(+{{#expr:floor(({{{5|}}}-10)/2)}})</span> | {{#ifexpr: {{{5|}}} < 10 | <span style="font-size:0.8em">({{#expr:floor(({{{5|}}}-10)/2)}})</span> |}} }}
</td>
</td>
}}
}}


{{#if: {{{6|}}} |
{{#if: {{{6|}}} |
<td style="width:65px">
<td style="width: 52px; vertical-align: top">
[[File:charisma icon.png|frameless|40px|center|link=Charisma]] [[Charisma|CHA]]
{{#ifeq: {{{mode|}}} | t | | <p style="margin:0px">[[Charisma|CHA]]</p>}}
'''{{{6}}}''' {{#ifexpr: {{{6|}}} > 11 | <br><span style="font-size:0.8em">(+{{#expr:floor(({{{6|}}}-10)/2)}})</span> | {{#ifexpr: {{{6|}}} < 10 | <br><span style="font-size:0.8em">({{#expr:floor(({{{6|}}}-10)/2)}})</span> | <br>&nbsp; }} }}
<div {{#if: {{IfEmpty | {{{cha save|}}} }} | class="bg3wiki-d20-bg" title="Proficient in Charisma saves" }} style="height:40px">'''<span style="display:block;padding-top:8px">{{{6}}}</span>'''</div> {{#ifexpr: {{{6|}}} > 11 | <span style="font-size:0.8em">(+{{#expr:floor(({{{6|}}}-10)/2)}})</span> | {{#ifexpr: {{{6|}}} < 10 | <span style="font-size:0.8em">({{#expr:floor(({{{6|}}}-10)/2)}})</span> |}} }}
</td>
</td>
}}
}}
</tr><!--
</tr>
}}<!--
------------
------------
DIVIDING LINE
DIVIDING LINE
------------
------------
-->{{#if: {{{race|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> | {{#if: {{{type|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> | {{#if: {{{hp|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> }} | {{#if: {{{ac|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> | {{#if: {{{ms|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> | {{#if: {{{size|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> | {{#if: {{{weight|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> }} | {{#if: {{{prof|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> }} | {{#if: {{{init|}}} | <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr> }} }} }} }} }} }}<!--
-->{{#if: {{{1|}}}
| {{#if: {{{race|}}}{{{type|}}}{{{hp|}}}{{{ac|}}}{{{ms|}}}{{{size|}}}{{{weight|}}}{{{prof|}}}{{{init|}}}
| <tr><td colspan="100%" style="padding-left:10px;padding-right:10px;"><hr/></td></tr>
}} }}<!--
 
 
------------
DURATION - This is relevant for summons
------------
-->{{#if: {{{duration|}}} |
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Duration Icon.png|frameless|x24px|link=]] Duration</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{duration}}}</p></td>
</tr>}}<!--


------------
------------
Line 58: Line 73:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Race Icon.png|frameless|x24px|link=]] Race</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Race Icon.png|frameless|x24px|link=]] Race</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{race}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{race}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 67: Line 82:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Type Icon.png|frameless|x24px|link=]] Type</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Type Icon.png|frameless|x24px|link=]] Type</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{type}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{type}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 76: Line 91:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:HP Icon.png|frameless|x24px|link=]] Hit Points</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:HP Icon.png|frameless|x24px|link=]] Hit Points</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{hp}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{hp}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 85: Line 100:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature AC Icon.png|frameless|x24px|link=]] Armour Class</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature AC Icon.png|frameless|x24px|link=]] Armour Class</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{ac}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{ac}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 94: Line 109:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Speed Icon.png|frameless|x24px|link=]] Movement Speed</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Speed Icon.png|frameless|x24px|link=]] Movement Speed</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{ms}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{ms}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 103: Line 118:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Size Icon.png|frameless|x24px|link=]] Size</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Creature Size Icon.png|frameless|x24px|link=]] Size</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{size}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{size}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 112: Line 127:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Weight Icon.png|frameless|x24px|link=]] Weight</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Weight Icon.png|frameless|x24px|link=]] Weight</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{weight}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{weight}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 121: Line 136:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Proficiency Icon.png|frameless|x24px|link=]] Proficiency Bonus</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Proficiency Icon.png|frameless|x24px|link=]] Proficiency Bonus</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">+{{{prof}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">+{{{prof}}}</p></td>
</tr>}}<!--
</tr>}}<!--


Line 130: Line 145:
<tr style="line-height:0.5;text-align:left;">
<tr style="line-height:0.5;text-align:left;">
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Initiative Icon.png|frameless|x24px|link=]] Initiative</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 2}}"><p style="margin:0px;">[[File:Initiative Icon.png|frameless|x24px|link=]] Initiative</p></td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{init}}}</td>
<td colspan="{{#if: {{{6|}}} | 3 | 1}}"><p style="margin:0px;">{{{init}}}</p></td>
</tr>}}</table></includeonly><!--
</tr>}}</table></includeonly><!--
------------
------------
EXAMPLE 1
EXAMPLE 1
------------
------------
--><noinclude>This template generates a stat block for a creature.
--><noinclude>This template generates a stat block for a creature or transformation form.
<hr>
Usage:


The first 6 parameters indicate the creature's ability scores (Str/Dex/Con/Int/Wis/Cha).
<pre>
{{AttributeBlock|10|10|10|10|10|10
|str save =
|dex save =
|con save =
|int save =
|wis save =
|cha save =
|level=
|race=
|type=
|hp=
|ac=
|ms=
|size=
|weight=
|prof=
|init=
}}
</pre>


Of these, the last 3 (Int/Wis/Cha) are optional and can omitted.
<hr>
<h4>Examples:</h4>


The following are optional parameters:
Full stat block:
* level - A creature's level.
* race - A creature's race, e.g. Human.
* type - A creature's type, e.g. Undead.
* hp - Hit points.
* ac - Armour Class.
* ms - Movement Speed. Try to include both meters and feet if possible, in that order.
* size - Size class of the creature, e.g. Large.
* weight - Creature weight. Try to include both kg and lbs if possible, in that order.
* prof - Proficiency bonus.
* init - Initiative bonus (or penalty).


Here is an example full stat block:
<pre>
 
{{AttributeBlock|15|8|11|9|18|10
{{C|<nowiki>{{AttributeBlock|15|8|11|9|18|10</nowiki>
|str save = proficient
<br><nowiki>|level=3</nowiki>
|wis save = proficient
<br><nowiki>|race=Skeleton</nowiki>
|duration = 10 turns
<br><nowiki>|type=Undead</nowiki>
|level=3
<br><nowiki>|hp=28</nowiki>
|race=Skeleton
<br><nowiki>|ac=15</nowiki>
|type=Undead
<br><nowiki>|ms=10m / 30ft</nowiki>
|hp=28
<br><nowiki>|size=Medium</nowiki>
|ac=15
<br><nowiki>|weight=20kg / 40lbs</nowiki>
|ms=10m / 30ft
<br><nowiki>|prof=2</nowiki>
|size=Medium
<br><nowiki>|init=-1</nowiki>
|weight=20kg / 40lbs
<br><nowiki>}}</nowiki>}}
|prof=2
 
|init=-1
Result:
}}
</pre>


{{AttributeBlock|15|8|11|9|18|10
{{AttributeBlock|15|8|11|9|18|10
|str save = proficient
|wis save = proficient
|duration = 10 turns
|level=3
|level=3
|race=Skeleton
|race=Skeleton
Line 184: Line 211:
|init=-1
|init=-1
}}
}}


<!-----------
<!-----------
EXAMPLE 2
EXAMPLE 2
-------------->
-------------->
<hr>
Stat block with only ability scores and saves:
This is an example of using this template to show only attribute scores:


{{C|<nowiki>{{AttributeBlock|15|8|11|9|18|10}}</nowiki>}}
<pre>{{AttributeBlock|15|8|11|9|18|10
|str save = proficient
|wis same = proficient}}</pre>


Result:
{{AttributeBlock|15|8|11|9|18|10|str save=y|wis save=y}}


{{AttributeBlock|15|8|11|9|18|10}}


<!-----------
<!-----------
EXAMPLE 3
EXAMPLE 3
-------------->
-------------->
<hr>
Stat block with only physical attributes - useful for Wild Shape stat blocks or other transformations:
This is an example of using this template to show only physical attributes - useful for Wild Shape stat blocks.
 
<pre>{{AttributeBlock|15|8|11|hp=12}}</pre>
 
{{AttributeBlock|15|8|11|hp=12}}
 
 
<!-----------
EXAMPLE 4
-------------->
Stat block without ability scores:


{{C|<nowiki>{{AttributeBlock|15|8|11|hp=12}}</nowiki>}}
<pre>{{AttributeBlock|hp=12|race=Human|size=Medium}}</pre>


Result:
{{AttributeBlock|hp=12|race=Human|size=Medium}}


{{AttributeBlock|15|8|11|hp=12}}</noinclude>
[[Category: Templates]]</noinclude>

Latest revision as of 08:35, 12 February 2025

This template generates a stat block for a creature or transformation form.

{{AttributeBlock|10|10|10|10|10|10
|str save =
|dex save =
|con save =
|int save =
|wis save =
|cha save =
|level=
|race=
|type=
|hp=
|ac=
|ms=
|size=
|weight=
|prof=
|init=
}}

Examples:

Full stat block:

{{AttributeBlock|15|8|11|9|18|10
|str save = proficient
|wis save = proficient
|duration = 10 turns
|level=3
|race=Skeleton
|type=Undead
|hp=28
|ac=15
|ms=10m / 30ft
|size=Medium
|weight=20kg / 40lbs
|prof=2
|init=-1
}}

Level 3

STR

15
(+2)

DEX

8
(-1)

CON

11

INT

9
(-1)

WIS

18
(+4)

CHA

10

Duration Icon.png Duration

10 turns

Creature Race Icon.png Race

Skeleton

Creature Type Icon.png Type

Undead

HP Icon.png Hit Points

28

Creature AC Icon.png Armour Class

15

Creature Speed Icon.png Movement Speed

10m / 30ft

Creature Size Icon.png Size

Medium

Weight Icon.png Weight

20kg / 40lbs

Proficiency Icon.png Proficiency Bonus

+2

Initiative Icon.png Initiative

-1


Stat block with only ability scores and saves:

{{AttributeBlock|15|8|11|9|18|10
|str save = proficient
|wis same = proficient}}

STR

15
(+2)

DEX

8
(-1)

CON

11

INT

9
(-1)

WIS

18
(+4)

CHA

10


Stat block with only physical attributes - useful for Wild Shape stat blocks or other transformations:

{{AttributeBlock|15|8|11|hp=12}}

STR

15
(+2)

DEX

8
(-1)

CON

11

HP Icon.png Hit Points

12


Stat block without ability scores:

{{AttributeBlock|hp=12|race=Human|size=Medium}}

Creature Race Icon.png Race

Human

HP Icon.png Hit Points

12

Creature Size Icon.png Size

Medium