Difference between revisions of "Template:Dice"

From DDO Compendium
Line 1: Line 1:
Template for dice rolls.
<noinclude>This template is used to generate dice rolls, with a tooltip to show the actual range.[[Category:Template]]


<nowiki>{{{1}}} = multiplier
Used in this manner:
{{{2}}} = amount of dice
<br><nowiki>{{Dice|(multiplier)|(count)|(sides)|(addbeforemultiplier)|(addaftermultiplier)}}</nowiki><br>
{{{3}}} = amount of sides
<br>Such that <nowiki>{{Dice|1.25|2|8|0|6}}</nowiki> results in
{{{4}}} = number to add </nowiki>
<br>{{Dice|1.25|2|8|0|6}}
 
</noinclude>
Example:
<nowiki>{{Dice|1.25|2|8|6}}</nowiki>
results in: {{Dice|1.25|2|8|6}}


<onlyinclude>
<onlyinclude>
{{#bootstrap_tooltip: {{{1|1}}}[{{{2|1}}}d{{{3|6}}}] + {{{4|0}}} | text = {{#expr:{{{2|1}}}*{{{1|1}}}+{{{3|0}}}}} - {{#expr:({{{2|1}}}*{{{3|6}}})*{{{1|1}}}+{{{4|0}}}}} | placement = bottom }}
{{#bootstrap_tooltip: {{{1|}}}[{{{2}}}d{{{3}}}{{#if: {{{4|}}} | + {{{4}}}}}] {{#if: {{{5|}}} |+ {{{5}}}}} | text = {{#expr:{{{2}}}*({{{3}}}+{{{4|0}}})}} - {{#expr:({{{1|1}}}*{{{2|1}}})*({{{3|1}}}+{{{4|0}}}) + {{{5|0}}}}} | placement = bottom }}
</onlyinclude>
</onlyinclude>

Revision as of 16:42, 1 May 2018

This template is used to generate dice rolls, with a tooltip to show the actual range.

Used in this manner:
{{Dice|(multiplier)|(count)|(sides)|(addbeforemultiplier)|(addaftermultiplier)}}

Such that {{Dice|1.25|2|8|0|6}} results in
1.25[2d8+ 0] + 6



[{{{2}}}d{{{3}}}]