Template:Character/DetailedAttribute: Difference between revisions

Jump to navigation Jump to search
update to support stat multipliers
m (correct syntaxhighlight error)
(update to support stat multipliers)
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|}}} | template = Dice_range_only}}</div><div class="qud-stat-avg">{{#invoke:dice/Format | diceStats | roll = {{{2|}}} | template = Dice_mean_only}}</div><div class="qud-stat-roll">{{{2}}}</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}}} | 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>
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]].


parameter 3 is optional - it will default link to the [[Attributes]] page.
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.


<syntaxhighlight lang="html">{{Character/DetailedAttribute
<syntaxhighlight lang="html">{{Character/DetailedAttribute
Line 8: Line 10:
| 2 = 17+2d3+1d6
| 2 = 17+2d3+1d6
| 3 = Attributes
| 3 = Attributes
| 4 = 1.25
}}</syntaxhighlight>
}}</syntaxhighlight>


Line 16: Line 19:
| 2 = 17+2d3+1d6
| 2 = 17+2d3+1d6
| 3 = Attributes
| 3 = Attributes
| 4 = 1.25
}}
}}
</div>
</div>


</noinclude>
</noinclude>

Navigation menu