2,680
editsAd placeholder
Template:AttributeBlock: Difference between revisions
Jump to navigation
Jump to search
Big update to template, now supports many more fields
mNo edit summary |
(Big update to template, now supports many more fields) |
||
Line 1: | Line 1: | ||
<includeonly>{{#if: {{{ | <includeonly><table class="bg3wiki-info-blob" style="text-align: center; min-width: {{#if: {{{6|}}} | 420px | 210px}};"><!-- | ||
< | |||
------------ | |||
<td> | LEVEL | ||
------------ | |||
-->{{#if: {{{level|}}} | <tr><td colspan="100%"><p style="text-align:center;line-height:0.7">Level {{{level}}}</p></td></tr>}}<!-- | |||
------------ | |||
ABILITY SCORES | |||
------------ | |||
--><tr> | |||
<td style="width:65px"> | |||
[[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]] | [[File:strength icon.png|frameless|40px|center|link=Strength]] [[Strength|STR]] | ||
'''{{{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> }} }} | '''{{{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> }} }} | ||
</td> | </td> | ||
<td> | <td style="width:65px"> | ||
[[File:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]] | [[File:dexterity icon.png|frameless|40px|center|link=Dexterity]] [[Dexterity|DEX]] | ||
'''{{{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> }} }} | '''{{{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> }} }} | ||
</td> | </td> | ||
<td> | <td style="width:65px"> | ||
[[File:constitution icon.png|frameless|40px|center|link=Constitution]] [[Constitution|CON]] | [[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> }} }} | '''{{{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> }} }} | ||
Line 18: | Line 26: | ||
{{#if: {{{4|}}} | | {{#if: {{{4|}}} | | ||
<td> | <td style="width:65px"> | ||
[[File:intelligence icon.png|frameless|40px|center|link=Intelligence]] [[Intelligence|INT]] | [[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> }} }} | '''{{{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> }} }} | ||
Line 25: | Line 33: | ||
{{#if: {{{5|}}} | | {{#if: {{{5|}}} | | ||
<td> | <td style="width:65px"> | ||
[[File:wisdom icon.png|frameless|40px|center|link=Wisdom]] [[Wisdom|WIS]] | [[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> }} }} | '''{{{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> }} }} | ||
Line 32: | Line 40: | ||
{{#if: {{{6|}}} | | {{#if: {{{6|}}} | | ||
<td> | <td style="width:65px"> | ||
[[File:charisma icon.png|frameless|40px|center|link=Charisma]] [[Charisma|CHA]] | [[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> }} }} | '''{{{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> }} }} | ||
</td> | </td> | ||
}} | }} | ||
</tr> | </tr><!-- | ||
</ | |||
------------ | |||
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> }} }} }} }} }} }}<!-- | |||
------------ | |||
RACE | |||
------------ | |||
-->{{#if: {{{race|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{race}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
TYPE | |||
------------ | |||
-->{{#if: {{{type|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{type}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
HP | |||
------------ | |||
-->{{#if: {{{hp|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{hp}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
ARMOUR CLASS | |||
------------ | |||
-->{{#if: {{{ac|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{ac}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
MOVEMENT SPEED | |||
------------ | |||
-->{{#if: {{{ms|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{ms}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
SIZE | |||
------------ | |||
-->{{#if: {{{size|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{size}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
WEIGHT | |||
------------ | |||
-->{{#if: {{{weight|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{weight}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
PROFICIENCY | |||
------------ | |||
-->{{#if: {{{prof|}}} | | |||
<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 | 1}}"><p style="margin:0px;">+{{{prof}}}</td> | |||
</tr>}}<!-- | |||
------------ | |||
INITIATIVE | |||
------------ | |||
-->{{#if: {{{init|}}} | | |||
<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 | 1}}"><p style="margin:0px;">{{{init}}}</td> | |||
</tr>}}</table></includeonly><!-- | |||
------------ | |||
EXAMPLE 1 | |||
------------ | |||
--><noinclude>This template generates a stat block for a creature. | |||
<hr> | <hr> | ||
Usage: | |||
The first 6 parameters indicate the creature's ability scores (Str/Dex/Con/Int/Wis/Cha). | |||
Of these, the last 3 (Int/Wis/Cha) are optional and can omitted. | |||
The following are optional parameters: | |||
* 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: | |||
{{C|<nowiki>{{AttributeBlock|15|8|11|9|18|10|level= | {{C|<nowiki>{{AttributeBlock|15|8|11|9|18|10</nowiki> | ||
<br><nowiki>|level=3</nowiki> | |||
<br><nowiki>|race=Skeleton</nowiki> | |||
<br><nowiki>|type=Undead</nowiki> | |||
<br><nowiki>|hp=28</nowiki> | |||
<br><nowiki>|ac=15</nowiki> | |||
<br><nowiki>|ms=10m / 30ft</nowiki> | |||
<br><nowiki>|size=Medium</nowiki> | |||
<br><nowiki>|weight=20kg / 40lbs</nowiki> | |||
<br><nowiki>|prof=2</nowiki> | |||
<br><nowiki>|init=-1</nowiki> | |||
<br><nowiki>}}</nowiki>}} | |||
Result: | Result: | ||
{{AttributeBlock|15|8|11|9|18|10|level= | {{AttributeBlock|15|8|11|9|18|10 | ||
|level=3 | |||
|race=Skeleton | |||
|type=Undead | |||
|hp=28 | |||
|ac=15 | |||
|ms=10m / 30ft | |||
|size=Medium | |||
|weight=20kg / 40lbs | |||
|prof=2 | |||
|init=-1 | |||
}} | |||
<!----------- | |||
EXAMPLE 2 | |||
--------------> | |||
<hr> | <hr> | ||
This is an example of using this template to show only attribute scores: | |||
{{C|<nowiki>{{AttributeBlock|15|8|11|9|18|10}}</nowiki>}} | {{C|<nowiki>{{AttributeBlock|15|8|11|9|18|10}}</nowiki>}} | ||
Line 60: | Line 197: | ||
{{AttributeBlock|15|8|11|9|18|10}} | {{AttributeBlock|15|8|11|9|18|10}} | ||
<!----------- | |||
EXAMPLE 3 | |||
--------------> | |||
<hr> | <hr> | ||
This is an example of using this template to show only physical attributes - useful for Wild Shape stat blocks. | |||
{{C|<nowiki>{{AttributeBlock|15|8|11|hp=12}}</nowiki>}} | {{C|<nowiki>{{AttributeBlock|15|8|11|hp=12}}</nowiki>}} |