explodingSuccess

From RPTools Wiki
Revision as of 22:27, 9 February 2023 by Conversion script (talk | contribs) (Conversion script moved page explodingSuccess to ExplodingSuccess without leaving a redirect: Converting page title to first-letter uppercase)
Jump to navigation Jump to search

explodingSuccess() Function

Generates random numbers to emulate dice rolls; returns the count of dice rolls that are above a certain number, while each individual dice rolled at maximum value will be rerolled with the new roll added to the old. There is no limit to the number of time that that an individual dice rolled can be rerolled by this function, but the odds of each individual number decreases as the total increases past the number of sides.

Usage

explodingSuccess(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(added to the count returned).

Examples

Roll a twenty-sided dice, and returns 1 if rolled higher than 30.
[t: explodingSuccess(1, 20, 30)]

Returns 0 or 1; 1 is only returned if the twenty-sided dice rolls 20 and then is rerolled(exploded) with a result equal to or higher than 10.

Roll five ten-sided dice, and returns the number of dice that rolled higher than twenty, using variables.

[h: DiceTimes = 5]
[h: DiceSides = 10]
[h: DiceTarget = 20]
[t: explodingSuccess(DiceTimes, DiceSides, DiceTarget)]
Returns a number than is between 0 and 5.

See Also

For another method of rolling dice, see Dice Expressions.