The roll formula to parse
Optionaldata: objectThe data object against which to parse attributes within the formula
Optionaloptions: Partial<D20RollConstructorOptions> = {}Options
Optionalcontext: D20RollContext = {}Context
Static ReadonlyCHAT_The default handlebars template used to render the roll's chat message
Static ReadonlyDIALOG_The default handlebars template used to render the roll's dialog
Static ReadonlystandardStandard roll used by the system (1d20).
Static ReadonlySTATIC_Static roll results
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 failure against its DC?
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)
Is this roll a success against its DC?
Natural roll value. Undefined if the roll isn't evaluated.
DC offset
How many 5s over the DC is this?
Primarily meant for things like Heal check bonus healing or similar.
StaticdefaultDefault options for D20Rolls
Protected_applyProtected_getProtected_onProtectedA callback applying the user's input from the dialog to the roll and its options.
The dialog's submitted HTML
OptionalstaticRoll: null | numberA static roll result to use instead of rolling the dice
This roll
Render a Dialog for the user to enter additional bonuses, set a static roll result, or take 10/20.
Optionaloptions: D20RollDialogOptions = {}Additional options determining what options to show in the dialog
A promise that resolves when the dialog is closed
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
StaticcleanStaticgetStaticsafeSynchronous and thrown error consuming roll evaluation.
Roll formula
Data supplied to roll
If error occurs, this will be included in the error message.
Optionaloptions: { suppressError?: boolean } = {}Additional options
OptionalevalOpts: object = {}Additional options to pass to Roll.evaluate()
StaticsafeSynchronous and thrown error consuming roll evaluation.
Roll formula
OptionalrollData: object = {}Data supplied to roll
Optionalcontext: anyIf error occurs, this will be included in the error message.
Optionaloptions: { suppressError?: boolean } = {}Additional options
OptionalevalOpts: object = {}Additional options to pass to Roll.evaluate()
A class adding additional functionality to
Rollclass for d20 based Pathfinder rolls.