Template:AttributeBlock: Difference between revisions

From Baldur's Gate 3 Wiki
Jump to navigation Jump to search
(Now shows stat modifiers.)
(Mental attributes are now optional.)
Line 1: Line 1:
<includeonly>{{#if: {{{level|}}} | <div>'''Level''' {{SmallIcon|Martial Weapon Prof Icon.png}}{{{level}}}</div>}}{{#if: {{{hp|}}} | <div>'''Hit Points''' {{SmallIcon|Saving Throws Icon.png}}{{{hp}}}</div>}}
<includeonly>{{#if: {{{level|}}} | <div>'''Level''' {{SmallIcon|Martial Weapon Prof Icon.png}}{{{level}}}</div>}}{{#if: {{{hp|}}} | <div>'''Hit Points''' {{SmallIcon|Saving Throws Icon.png}}{{{hp}}}</div>}}
{| class="bg3wiki-info-blob" style="text-align: center; min-width: 420px;"
<table class="bg3wiki-info-blob" style="text-align: center; min-width: {{#if: {{{6|}}} | 420px | 210px}};">
| [[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]]
<tr>
'''{{{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; }} }}
<td>
| [[File:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]]
[[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]]
'''{{{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; }} }}
'''{{{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; }} }}
| [[File:constitution icon.png|frameless|40px|center|link=Constitution]] [[Constitution|CON]]
</td>
'''{{{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; }} }}
 
| [[File:intelligence icon.png|frameless|40px|center|link=Intelligence]] [[Intelligence|INT]]
<td>
'''{{{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; }} }}
[[File:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]]
| [[File:wisdom icon.png|frameless|40px|center|link=Wisdom]] [[Wisdom|WIS]]
'''{{{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; }} }}
'''{{{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; }} }}
</td>
| [[File:charisma icon.png|frameless|40px|center|link=Charisma]] [[Charisma|CHA]]
 
'''{{{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; }} }}
<td>
|}</includeonly><noinclude>This template generates an attribute stat block for a creature.
[[File:constitution icon.png|frameless|40px|center|link=Constitution]] [[Constitution|CON]]
'''{{{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; }} }}
</td>
 
{{#if: {{{4|}}} |
<td>
[[File:intelligence icon.png|frameless|40px|center|link=Intelligence]] [[Intelligence|INT]]
'''{{{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; }} }}
</td>
}}
 
{{#if: {{{5|}}} |
<td>
[[File:wisdom icon.png|frameless|40px|center|link=Wisdom]] [[Wisdom|WIS]]
'''{{{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; }} }}
</td>
}}
 
{{#if: {{{6|}}} |
<td>
[[File:charisma icon.png|frameless|40px|center|link=Charisma]] [[Charisma|CHA]]
'''{{{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; }} }}
</td>
}}
</tr>
</table></includeonly><noinclude>This template generates an attribute stat block for a creature.
 
<hr>


Usage:
Usage:
Line 23: Line 50:
{{AttributeBlock|15|8|11|9|18|10|level=5|hp=57}}
{{AttributeBlock|15|8|11|9|18|10|level=5|hp=57}}


<hr>


One or both of the '''level''' and '''hp''' parameters are optional and can be omitted, like so:
One or both of the '''level''' and '''hp''' parameters are optional and can be omitted, like so:
Line 30: Line 58:
Result:
Result:


{{AttributeBlock|15|8|11|9|18|10}}</noinclude>
{{AttributeBlock|15|8|11|9|18|10}}
 
<hr>
 
The mental attributes can also be omitted, for use in shapeshifting stat blocks, like so:
 
{{code|<nowiki>{{AttributeBlock|15|8|11|hp=12}}</nowiki>}}
 
Result:
 
{{AttributeBlock|15|8|11|hp=12}}</noinclude>

Revision as of 06:45, 20 March 2023

This template generates an attribute stat block for a creature.


Usage:

{{AttributeBlock|15|8|11|9|18|10|level=5|hp=57}}

Result:

Level 5
Hit Points File:Saving Throws Icon.png57
Strength icon.png
STR

15
(+2)

Dexterity icon.png
DEX

8
(-1)

Constitution icon.png
CON

11
 

Intelligence icon.png
INT

9
(-1)

Wisdom icon.png
WIS

18
(+4)

Charisma icon.png
CHA

10
 


One or both of the level and hp parameters are optional and can be omitted, like so:

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

Result:


Strength icon.png
STR

15
(+2)

Dexterity icon.png
DEX

8
(-1)

Constitution icon.png
CON

11
 

Intelligence icon.png
INT

9
(-1)

Wisdom icon.png
WIS

18
(+4)

Charisma icon.png
CHA

10
 


The mental attributes can also be omitted, for use in shapeshifting stat blocks, like so:

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

Result:

Hit Points File:Saving Throws Icon.png12
Strength icon.png
STR

15
(+2)

Dexterity icon.png
DEX

8
(-1)

Constitution icon.png
CON

11