Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Variable DiceConst

    Dice: {
        fulfillment: {
            defaultMethod: string;
            dice: Record<string, DiceFulfillmentDenomination>;
            methods: Record<string, DiceFulfillmentMethod>;
        };
        functions: Record<string, RollFunction>;
        parser: typeof RollParser;
        randomUniform: () => number;
        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.

    • 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.