From RPTools WikiJump to navigationJump to search
Generates random numbers to emulate dice rolls. Returns the total of a dice roll where each die that rolled higher than the
maximumparameter is counted as that value instead.
rollWithUpper(times, sides, maximum)
times- The number of times to roll the dice.
sides- The number of sides the dice possess.
maximum- The maximum value that each individual die can contribute to the total.
Roll five twenty-sided dice. Any rolls above 16 are treated as 16.
Returns a number that is between 5 and 80 (and no longer up to 100 as with a regular
[t: rollWithUpper(5, 20, 16)]
The corresponding dice roll expression is
XdYuZ. For other methods of rolling dice, see Dice Expressions.