The roll formula to parse
Optionaldata: objectThe data object against which to parse attributes within the formula
Optionaloptions: Partial<D20RollConstructorOptions> = {}Options
Optionalcontext: D20RollContext = {}Context
OptionalerrStatic 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
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.
StaticdefaultDefault options for D20Rolls
Protected_ProtectedApply static roll, such as Take 10/20
Optionalforce: boolean = falseIgnore evaluated state of the roll and apply static roll config anyway.
Protected_ProtectedConverts form element to object
Optionald20: stringd20 override
Protected_ProtectedProcess user's input from the dialog and apply it to the roll and its options.
Form data
Protected_ProtectedReset base check
InternalRender 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.
Optionaloptions: D20RollDialogOptions = {}Additional options determining what options to show in the dialog
Render a Roll instance to HTML
Optionaloptions: { flavor?: string; isPrivate?: boolean; template?: string } = {}Options which affect how the Roll is rendered
Optionalflavor?: stringFlavor text to include
OptionalisPrivate?: booleanIs the Roll displayed privately?
Optionaltemplate?: 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
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
OptionalsuppressError?: booleanIf true, no error will be printed even if one occurs.
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
OptionalsuppressError?: booleanIf true, no error will be printed
OptionalevalOpts: object = {}Additional options to pass to Roll.evaluate()
A class adding additional functionality to
Rollclass for d20 based Pathfinder rolls.