fudge: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Corrected example.)
m (Added shorthand usage.)
Line 7: Line 7:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
fudge(times)
fudge(times)
</source>
<source lang="mtmacro" line>
f(times)
</source>
</source>
'''Parameters'''
'''Parameters'''

Revision as of 16:54, 14 April 2009

fudge() Function

Generates random numbers to emulate dice rolls; returns the total of a special Fudge dice roll. When these dice are rolled, the result is -1, 0, or 1, this function then sums up all of the dice rolled and returns that sum.

Usage

fudge(times)
f(times)

Parameters

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

Examples

Roll ten special Fudge dice.
[t: fudge(10)]

Returns a number that is between -10 and 10.

Roll five special Fudge dice, using variables.

[h: DiceTimes = 5]
[t: fudge(DiceTimes)]
Returns a number than is between -5 and 5.

See Also

For another method of rolling dice, see Dice Expressions.