rollstring()

Function groupExecute on clientPlatform(s)
RandomNOAll

Syntax

rollstring(string-formula)

Description

Returns the result of a die roll from a string-formula.

The format of the string-formula is:

rollstring NdF [ + - * / offset ]

where N is the number of dice, d is a delimiter, and F is the number of faces for each die. In addition, you can add, subtract, multiply, or divide by an offset.

Example

Calculate
 
lResult
 as 
rollstring
(
'2d6'
)

# returns the result of rolling two standard sixed-faced dice

 
Calculate
 
lResult
 as 
rollstring
(
'3d6+1'
)

 
Calculate
 
lResult
 as 
rollstring
(
'12d4+6'
)