Difference between revisions of "User:Paxed/Template:dice"

From NetHackWiki
Jump to navigation Jump to search
m
m
Line 3: Line 3:
 
This template shows dicerolls in the standard [[d notation|d-notation]] and their minimum and maximum values.
 
This template shows dicerolls in the standard [[d notation|d-notation]] and their minimum and maximum values.
  
Usage: <tt><nowiki>{{dice|AdB|+|C}}</nowiki></tt>
+
Usage: <tt><nowiki>{{dice|AdB|+C}}</nowiki></tt>
  
 
Where:
 
Where:
 
*A is the number of dice to be rolled.
 
*A is the number of dice to be rolled.
 
*B is the number of sides the dices have.
 
*B is the number of sides the dices have.
*C is an (optional) modifier added after the diceroll.
+
*C is an (optional) modifier added after the diceroll. (could be another diceroll in the AdB-format)
  
 
Output:
 
Output:
Line 18: Line 18:
 
*<tt><nowiki>{{dice|2d8|+2d4|+5}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dice|2d8|+2d4|+5}}</tt>
 
*<tt><nowiki>{{dice|2d8|+2d4|+5}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dice|2d8|+2d4|+5}}</tt>
 
*<tt><nowiki>{{dice|10d10|+5d4|-10}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dice|10d10|+5d4|-10}}</tt>
 
*<tt><nowiki>{{dice|10d10|+5d4|-10}}</nowiki></tt> shows <tt>{{:User:Paxed/Template:dice|10d10|+5d4|-10}}</tt>
 
 
<nowiki>
 
{{{1}}}d{{{2}}}{{#if: {{{3|}}} |{{#ifexpr: {{{3|0}}} > 0 |+{{{3}}} |{{#ifexpr: {{{3|0}}} < 0 |{{{3}}} | }} }} }} ({{#expr:{{{1}}}+{{{3|0}}}}}-{{#expr:{{{1}}}*{{{2}}}+{{{3|0}}}}})
 
</nowiki>
 

Revision as of 18:50, 4 March 2008


This template shows dicerolls in the standard d-notation and their minimum and maximum values.

Usage: {{dice|AdB|+C}}

Where:

  • A is the number of dice to be rolled.
  • B is the number of sides the dices have.
  • C is an (optional) modifier added after the diceroll. (could be another diceroll in the AdB-format)

Output:

  • {{dice|1d6}} shows 1d6 (1 - 6)
  • {{dice|2d10|+5}} shows 2d10+5 (7 - 25)
  • {{dice|3d8|-2}} shows 3d8-2 (1 - 22)
  • {{dice|1d10|+1d8}} shows 1d10+1d8 (2 - 18)
  • {{dice|2d8|+2d4|+5}} shows 2d8+2d4+5 (9 - 29)
  • {{dice|10d10|+5d4|-10}} shows 10d10+5d4-10 (5 - 110)