Dice: {
    fulfillment: {
        defaultMethod: string;
        dice: Record<string, DiceFulfillmentDenomination>;
        methods: Record<string, DiceFulfillmentMethod>;
    };
    functions: Record<string, RollFunction>;
    parser: typeof RollParser;
    randomUniform: () => number;
    rollModes: {
        blindroll: { icon: string; label: string };
        gmroll: { icon: string; label: string };
        publicroll: { icon: string; label: string };
        selfroll: { icon: string; label: string };
    };
    rolls: typeof Roll[];
    terms: Record<string, typeof DiceTerm>;
    termTypes: Record<string, typeof RollTerm>;
    types: typeof DiceTerm[];
} = ...

Configuration for dice rolling behaviors in the Foundry Virtual Tabletop client.

Type declaration

  • fulfillment: {
        defaultMethod: string;
        dice: Record<string, DiceFulfillmentDenomination>;
        methods: Record<string, DiceFulfillmentMethod>;
    }

    Dice roll fulfillment configuration.

  • functions: Record<string, RollFunction>

    A collection of custom functions that can be included in roll expressions.

  • parser: typeof RollParser

    A parser implementation for parsing Roll expressions.

  • randomUniform: () => number

    A function used to provide random uniform values.

  • rollModes: {
        blindroll: { icon: string; label: string };
        gmroll: { icon: string; label: string };
        publicroll: { icon: string; label: string };
        selfroll: { icon: string; label: string };
    }
  • rolls: typeof Roll[]

    Configured Roll class definitions

  • terms: Record<string, typeof DiceTerm>

    Configured roll terms and the classes they map to.

  • termTypes: Record<string, typeof RollTerm>

    Configured DiceTerm class definitions

  • types: typeof DiceTerm[]

    The Dice types which are supported.