RPTools

Personal tools
From MapToolDoc
(Redirected from success)

countsuccess

Contents

countsuccess() Function

Generates random numbers to emulate dice rolls; returns the count of dice rolls that are above a certain target number.

Usage

  1. countsuccess(times, sides, target)
  1. success(times, sides, target)

Parameters

  • times - The number of times to roll the dice.
  • sides - The number of sides the dice possess.
  • target - The number that a dice needs to be equal to or higher to be considered a success.

Examples

Roll twenty ten-sided dice, and return the number that are above five.

  1. [t: countsuccess(20, 10, 5)]

Returns a number that is between 0 and 20, which is the number of dice that rolled higher than 5.

Roll twelve six-sided dice, and return the number that are above three, using variables.

  1. [h: DiceTimes = 12]
  2. [h: DiceSides = 6]
  3. [h: DiceSuccess = 3]
  4. [t: countsuccess(DiceTimes, DiceSides, DiceSuccess)]

Returns a number than is between 0 and 12, which is the number of dice that rolled higher than 3.

See Also

For another method of rolling dice, see Dice Expressions.