User:Tealeaf/Sandbox/Dice/Template:Dice

From DDO Compendium

Testing to see if I could somehow understand this.

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

Such that {{User:Tealeaf/Sandbox/Dice/Template:Dice|1.25|2|8|4|6}} results in
1.25[2d8+4]+6
{{User:Tealeaf/Sandbox/Dice/Template:Dice||2|8}} results in
2d8
{{User:Tealeaf/Sandbox/Dice/Template:Dice||2|8||3}} results in
2d8+3
{{User:Tealeaf/Sandbox/Dice/Template:Dice||2|8|4|3}} results in
[2d8+4]+3


{{#if: {{{1|}}}|include1|{{#if: {{{5|}}}|{{#if: {{{4|}}}|include4|exclude4}}|exclude5}}}} {{{2}}}d{{{3}}}