The roll formula to parse
Optional
data: objectThe data object against which to parse attributes within the formula
Optional
options: Partial<D20RollConstructorOptions> = {}Options
Optional
context: D20RollContext = {}Context
Static
Readonly
CHAT_The default handlebars template used to render the roll's chat message
Static
Readonly
DIALOG_The default handlebars template used to render the roll's dialog
Static
Readonly
standardStandard roll used by the system (1d20).
Static
Readonly
STATIC_Static roll results
The action associated with this roll if any.
Modifier on the roll besides natural roll. Undefined if the roll isn't evaluated.
The D20 die this roll is based on.
Difficulty Class
The flavor this roll was created with.
Is this a proper check?
Is this roll a critical success? Returns undefined if roll isn't evaluated.
Is this roll a misfire.
Is this roll a natural 1? Returns undefined if roll isn't evaluated.
Is this roll a natural 20? Returns undefined if roll isn't evaluated.
Is not an actual roll.
Is a normal d20
Is static roll (e.g. Take 20)
Natural roll value. Undefined if the roll isn't evaluated.
Static
defaultDefault options for D20Rolls
Protected
_Protected
Apply static roll, such as Take 10/20
Optional
force: boolean = falseIgnore evaluated state of the roll and apply static roll config anyway.
Protected
_Protected
Converts form element to object
Protected
_Protected
A callback applying the user's input from the dialog to the roll and its options.
Button
Optional
staticRoll: null | numberA static roll result to use instead of rolling the dice
This roll
Internal
Render the tooltip HTML for a RollPF instance
The rendered HTML tooltip as a string
Render a Dialog for the user to enter additional bonuses, set a static roll result, or take 10/20.
Optional
options: D20RollDialogOptions = {}Additional options determining what options to show in the dialog
A promise that resolves when the dialog is closed
Render a Roll instance to HTML
Optional
options: { flavor?: string; isPrivate?: boolean; template?: string } = {}Options which affect how the Roll is rendered
Optional
flavor?: stringFlavor text to include
Optional
isPrivate?: booleanIs the Roll displayed privately?
Optional
template?: stringA custom HTML template path
Transform this roll into a ChatMessage displaying the result. This function can either create a ChatMessage (by default) or return the data object that would be used to create one.
The data object to use when creating the message
Additional options which configure how the message is created
The created ChatMessage document, or the object of data that would be used to create one
Static
cleanStatic
getStatic
safeSynchronous and thrown error consuming roll evaluation.
Roll formula
Data supplied to roll
If error occurs, this will be included in the error message.
Optional
options: { suppressError?: boolean } = {}Additional options
Optional
suppressError?: booleanIf true, no error will be printed even if one occurs.
Optional
evalOpts: object = {}Additional options to pass to Roll.evaluate()
Static
safeSynchronous and thrown error consuming roll evaluation.
Roll formula
Optional
rollData: object = {}Data supplied to roll
Optional
context: anyIf error occurs, this will be included in the error message.
Optional
options: { suppressError?: boolean } = {}Additional options
Optional
suppressError?: booleanIf true, no error will be printed
Optional
evalOpts: object = {}Additional options to pass to Roll.evaluate()
A class adding additional functionality to
Roll
class for d20 based Pathfinder rolls.