RPTools

From MapToolDoc

roll

Contents

roll() Function

Generates random numbers to emulate dice rolls. You may also think of this function as a method of generating a random number between times and times*sides.

Usage

  1. roll(times, sides)
  1. dice(times, sides)
  1. d(times, sides)

Parameters

  • times - The number of times to roll the dice.
  • sides - The number of sides the dice possess.

Examples

Roll a twenty-sided dice.

  1. [t: roll(1, 20)]

Returns a number that is between 1 and 20.

Roll five ten-sided dice, using variables.

  1. [h: DiceTimes = 5]
  2. [h: DiceSides = 10]
  3. [t: roll(DiceTimes, DiceSides)]

Returns a number than is between 5 and 50.

See Also

For another method of rolling dice, see Dice Expressions.