Template:AttributeBlock: Difference between revisions

Jump to navigation Jump to search
(Added Template:AttributeBlock)
 
(Now shows stat modifiers.)
Line 2: Line 2:
{| class="bg3wiki-info-blob" style="text-align: center; min-width: 420px;"
{| class="bg3wiki-info-blob" style="text-align: center; min-width: 420px;"
| [[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]]
| [[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]]
'''{{{1}}}'''
'''{{{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:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]]
| [[File:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]]
'''{{{2}}}'''
'''{{{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; }} }}
| [[File:constitution icon.png|frameless|40px|center|link=Constitution]] [[Constitution|CON]]
| [[File:constitution icon.png|frameless|40px|center|link=Constitution]] [[Constitution|CON]]
'''{{{3}}}'''
'''{{{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]]
| [[File:intelligence icon.png|frameless|40px|center|link=Intelligence]] [[Intelligence|INT]]
'''{{{4}}}'''
'''{{{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:wisdom icon.png|frameless|40px|center|link=Wisdom]] [[Wisdom|WIS]]
| [[File:wisdom icon.png|frameless|40px|center|link=Wisdom]] [[Wisdom|WIS]]
'''{{{5}}}'''
'''{{{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; }} }}
| [[File:charisma icon.png|frameless|40px|center|link=Charisma]] [[Charisma|CHA]]
| [[File:charisma icon.png|frameless|40px|center|link=Charisma]] [[Charisma|CHA]]
'''{{{6}}}'''
'''{{{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; }} }}
|}</includeonly><noinclude>This template generates an attribute stat block for a creature.
|}</includeonly><noinclude>This template generates an attribute stat block for a creature.


Usage:
Usage:


{{code|<nowiki>{{AttributeBlock|15|12|15|12|18|16|level=5|hp=57}}</nowiki>}}
{{code|<nowiki>{{AttributeBlock|15|8|11|9|18|10|level=5|hp=57}}</nowiki>}}


Result:
Result:


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




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:


{{code|<nowiki>{{AttributeBlock|15|12|15|12|18|16}}</nowiki>}}
{{code|<nowiki>{{AttributeBlock|15|8|11|9|18|10}}</nowiki>}}


Result:
Result:


{{AttributeBlock|15|12|15|12|18|16}}</noinclude>
{{AttributeBlock|15|8|11|9|18|10}}</noinclude>