Template:Character/DetailedAttribute: Difference between revisions
Jump to navigation
Jump to search
(update to support stat multipliers) |
mNo edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="qud-stat-details-entry"><div class="qud-stat-name">[[{{{3|Attributes}}}|{{{1}}}]]</div><div class="qud-stat-range">{{#invoke:dice/Format | diceStats | roll = {{{2|}}} | multiplier={{{4|1}}} | template = Dice_ceil_based_range_only}}</div><div class="qud-stat-avg">{{#invoke:dice/Format | diceStats | roll = {{{2|}}} | multiplier = {{{4|1}}} | template = Dice_ceil_based_average_only}}</div><div class="qud-stat-roll">{{#ifeq: {{{4|1}}}|1|{{{2}}}|<span>({{{2}}})</span><span style="color:var(--qud-color-y)">×{{{4}}}</span>}}</div></div></includeonly><noinclude> | <includeonly><div class="qud-stat-details-entry"><div class="qud-stat-name">[[{{{3|Attributes}}}|{{{1}}}]]</div><div class="qud-stat-range">{{#invoke:dice/Format | diceStats | roll = {{{2|}}} | multiplier={{{4|1}}} | extraafterroll = {{{5|0}}} | template = Dice_ceil_based_range_only}}</div><div class="qud-stat-avg">{{#invoke:dice/Format | diceStats | roll = {{{2|}}} | multiplier = {{{4|1}}} | extraafterroll = {{{5|0}}} | template = Dice_ceil_based_average_only}}</div><div class="qud-stat-roll">{{#ifeq: {{{4|1}}}|1|{{#ifeq: {{{5|0}}}|0|{{{2}}}|<span>({{{2}}})</span><span style="color:var(--qud-color-y)">+{{{5}}}</span>}}|<span>({{{2}}})</span><span style="color:var(--qud-color-y)">×{{{4}}}{{#ifeq: {{{5|0}}}|0||+{{{5}}}}}</span>}}</div></div></includeonly><noinclude> | ||
Outputs a detail row for a single character attribute. Intended for use in [[Template:Character]]. | Outputs a detail row for a single character attribute. Intended for use in [[Template:Character]]. | ||
Line 5: | Line 5: | ||
parameter 4 is an optional multiplier for the stat (this is derived from the stat's "Bonus" attribute using a particular formula). If not specified, it defaults to 1. | parameter 4 is an optional multiplier for the stat (this is derived from the stat's "Bonus" attribute using a particular formula). If not specified, it defaults to 1. | ||
parameter 5 is an additive value that represents extrinsic bonuses, such as the bonuses from mutations or armor. | |||
<syntaxhighlight lang="html">{{Character/DetailedAttribute | <syntaxhighlight lang="html">{{Character/DetailedAttribute | ||
Line 11: | Line 13: | ||
| 3 = Attributes | | 3 = Attributes | ||
| 4 = 1.25 | | 4 = 1.25 | ||
| 5 = 0 | |||
}}</syntaxhighlight> | }}</syntaxhighlight> | ||
Line 20: | Line 23: | ||
| 3 = Attributes | | 3 = Attributes | ||
| 4 = 1.25 | | 4 = 1.25 | ||
| 5 = 0 | |||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Latest revision as of 02:32, 14 February 2021
Outputs a detail row for a single character attribute. Intended for use in Template:Character.
parameter 3 is optional - it will default link to the Attributes page.
parameter 4 is an optional multiplier for the stat (this is derived from the stat's "Bonus" attribute using a particular formula). If not specified, it defaults to 1.
parameter 5 is an additive value that represents extrinsic bonuses, such as the bonuses from mutations or armor.
{{Character/DetailedAttribute
| 1 = Strength
| 2 = 17+2d3+1d6
| 3 = Attributes
| 4 = 1.25
| 5 = 0
}}