Difference between revisions of "Template:Dice"

From DDO Compendium
Line 2: Line 2:


Used in this manner:
Used in this manner:
<br><nowiki>{{Dice|(multiplier)|(count)|(sides)|(addbeforemultiplier)|(addaftermultiplier)}}</nowiki><br>
<br><nowiki>{{Dice|(multiplier (opt))|(count)|(sides)|(addbeforemultiplier(opt))|(addaftermultiplier(opt))}}</nowiki><br>
<br>Such that <nowiki>{{Dice|1.25|2|8|4|6}}</nowiki> results in
<br>Such that <nowiki>{{Dice|1.25|2|8|4|6}}</nowiki> results in
<br>{{Dice|1.25|2|8|4|6}}
<br>{{Dice|1.25|2|8|4|6}}
<br><nowiki>{{Dice||2|8}}</nowiki> results in
<br>{{Dice||2|8}}
<br><nowiki>{{Dice||2|8||3}}</nowiki> results in
<br>{{Dice||2|8||3}}
<br><nowiki>{{Dice||2|8|4|3}}</nowiki> results in
<br>{{Dice||2|8|4|3}}
</noinclude>
</noinclude>


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

Revision as of 17:26, 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 (opt))|(count)|(sides)|(addbeforemultiplier(opt))|(addaftermultiplier(opt))}}

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



{{Dice||2|8}} results in
[2d8]



{{Dice||2|8||3}} results in
[2d8]+3



{{Dice||2|8|4|3}} results in
[2d8+4]+3



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