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

    Function getEffectiveModifierValue

    • Get the effective modifier value for a single field, combining passive mods (from features and active effects) with scoped temp mods (trigger/swing-scoped pools).

      Uses the same accumulator logic as prepareDerivedData's _applyModifications, so results are consistent with passive derived data. Supports all field families that _applyModifications supports: resistance., attribute., damage.outgoing., restore., vital., resource., vector.*, etc.

      Parameters

      • actor: BodyMindSoulActorBase

        The actor to query

      • field: string

        The field path (e.g. "attribute.str", "damage.outgoing.piercing")

      • Optionalcontext: object = {}

        Execution context containing optional scoped modifier pools. Spec fields:

        • triggerModifierPool {ModificationModel[]} - Mods from "Apply Trigger Modifiers" outcome
        • swingModifierPool {ModificationModel[]} - Mods from "Apply Swing Modifiers" outcome

      Returns number

      The effective value for the field, post-stacking, or 0 if field is not found

      // Get effective outgoing damage bonus (passive + scoped)
      const bonus = getEffectiveModifierValue(actor, 'damage.outgoing', { triggerModifierPool: tempMods });
      // Get effective resistance for a damage type
      const mult = getEffectiveModifierValue(actor, 'resistance.slash');