getRolled

From RPTools Wiki
Revision as of 19:09, 14 March 2023 by Taustin (talk | contribs) (Text replacement - "source>" to "syntaxhighlight>")
Jump to navigation Jump to search

getRolled() Function

Introduced in version 1.5.2
Returns a JSON Array of all the raw, i.e. unmodified, dice rolls that have occurred within the current macro context.

Usage

<source lang="mtmacro" line> getRolled() </syntaxhighlight> Parameters

  • none - Takes no parameters.

Example

Roll some dice and observe the unmodified rolls.

<source lang="mtmacro" line> Roll 1d10: [e: 1D10+2]
Get Rolled: [r: getRolled()]
Roll 3d6 minimum 2: [e: 3D6L2]
Get Rolled: [r: getRolled()] </syntaxhighlight>

Output: <source lang="mtmacro" line> Roll 1d10: « 1D10+2 = 9 + 2 = 11 » Get Rolled: [9] Roll 3d6 minimum 2: « 3D6L2 = 13 » Get Rolled: [9,6,5,1]

</syntaxhighlight>

See Also