Body, Mind & Soul — API Reference
    Preparing search index...

    Function rollAttributeCheck

    • Roll an attribute, vector, or formula-driven check and post it to chat.

      Formula resolution: when no formula is given but a vector, or an attribute plus archetype, is, the formula comes from actor.getRollFormula({ vector, attribute, archetype }). When the formula is still missing, nothing rolls and the function returns undefined.

      Attribute and archetype are parsed from @attributes.<archetype>.<attribute> in the formula when not given explicitly. Advantage mods from _collectCheckMods are applied via _buildCheckFormula. The roll is posted to chat and bms.checkRolled fires with the outcome.

      Quirk: getRollFormula({ vector }) ignores the vector key and always returns the luck formula. This is pinned by the characterization suite. Do not fix it here.

      Config:

      • actor: the rolling actor. Supplies roll data, the speaker, and the check mods.
      • formula: roll formula. Derived from the vector or attribute when empty.
      • archetype: archetype key (body, mind, soul). Parsed from the formula when empty.
      • attribute: attribute key. Parsed from the formula when empty.
      • vector: vector key. Makes the roll a vector check when truthy or when CONFIG.BODY_MIND_SOUL.vectors has the attribute.
      • label: optional label. Chat flavor becomes [attribute] <label>. Also sent raw in the hook payload.

      Parameters

      • options: {
            actor: any;
            archetype?: string | null;
            attribute?: string | null;
            formula?: string | null;
            label?: string | null;
            vector?: string | null;
        }

        Check inputs.

        • actor: any

          The rolling actor.

        • Optionalarchetype?: string | null

          Archetype key, or null.

        • Optionalattribute?: string | null

          Attribute key, or null.

        • Optionalformula?: string | null

          Roll formula, or empty to derive it.

        • Optionallabel?: string | null

          Optional display label.

        • Optionalvector?: string | null

          Vector key, or null.

      Returns Promise<any>

      The evaluated Roll, or undefined when no formula could be resolved.