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

    Variable REGISTRYConst

    REGISTRY: {
        applyDamage: {
            label: string;
            template: string;
            width: number;
            initDialog(html: any): void;
            prepareContext(
                cfg: any,
                extra?: null,
            ): {
                allowedTypesJson: string;
                amount: any;
                gearEnabled: boolean;
                layer: any;
                type: any;
                variableTableHtml: string;
            };
            processResult(
                raw: any,
            ): { allowedTypes: any; amount: any; layer: any; type: any };
        };
        modifierPool: {
            label: string;
            template: string;
            width: number;
            initDialog(html: any): void;
            prepareContext(cfg: any): { modifiersJson: string };
            processResult(raw: any): { modifiers: any[] };
        };
        playAnimation: {
            label: string;
            template: string;
            width: number;
            initDialog(html: any): void;
            prepareContext(
                cfg: any,
            ): {
                animationLabel: any;
                animationName: any;
                needsClientRelay: any;
                playOnMiss: any;
                targetScope: any;
            };
            processResult(
                raw: any,
            ): {
                animationName: any;
                needsClientRelay: boolean;
                playOnMiss: boolean;
                targetScope: any;
            };
        };
        pushDrawOverride: {
            label: string;
            template: string;
            width: number;
            initDialog(html: any): void;
            prepareContext(
                cfg: any,
            ): {
                charges: any;
                deckLabel: any;
                expiryType: any;
                expiryValue: any;
                label: any;
                mode: any;
                sourceDeckId: any;
                sourceStackId: any;
                sourceType: any;
            };
            processResult(
                raw: any,
            ): {
                charges: number | null;
                expiryType: any;
                expiryValue: number | null;
                label: any;
                mode: any;
                sourceDeckId: any;
                sourceStackId: any;
                sourceType: any;
            };
        };
        userChoice: {
            label: string;
            template: string;
            width: number;
            initDialog(html: any, extra?: null): void;
            prepareContext(
                cfg: any,
            ): { optionsJson: string; promptTitle: any; sampleCount: any };
            processResult(
                raw: any,
            ): { options: any; promptTitle: any; sampleCount: number };
        };
    } = ...

    Type Declaration

    • applyDamage: {
          label: string;
          template: string;
          width: number;
          initDialog(html: any): void;
          prepareContext(
              cfg: any,
              extra?: null,
          ): {
              allowedTypesJson: string;
              amount: any;
              gearEnabled: boolean;
              layer: any;
              type: any;
              variableTableHtml: string;
          };
          processResult(
              raw: any,
          ): { allowedTypes: any; amount: any; layer: any; type: any };
      }
    • modifierPool: {
          label: string;
          template: string;
          width: number;
          initDialog(html: any): void;
          prepareContext(cfg: any): { modifiersJson: string };
          processResult(raw: any): { modifiers: any[] };
      }

      Modifier pool config dialog for trigger-scoped and swing-scoped modifier outcomes (applyTriggerModifiers and applySwingModifiers). Edits a flat list of modifier entries, each {id, field, operation, value, label}, stored as plain JSON in the outcome's config.modifiers array. Uses the JSON-hidden-input pattern from userChoice: in-dialog edits work against an in-memory array synced to a hidden input on every mutation, nothing written to a document until processResult() is called.

      Config shape (outcome.config):

      {
      modifiers: [
      { id, field, operation, value, label },
      ...
      ],
      }

      Save-time validation: each row is wrapped in new ModificationModel(row) to validate against the schema (required fields, operation choices, etc.). Malformed rows are rejected with a user-facing error. Successful rows are normalized via toObject() before persisting.

    • playAnimation: {
          label: string;
          template: string;
          width: number;
          initDialog(html: any): void;
          prepareContext(
              cfg: any,
          ): {
              animationLabel: any;
              animationName: any;
              needsClientRelay: any;
              playOnMiss: any;
              targetScope: any;
          };
          processResult(
              raw: any,
          ): {
              animationName: any;
              needsClientRelay: boolean;
              playOnMiss: boolean;
              targetScope: any;
          };
      }
    • pushDrawOverride: {
          label: string;
          template: string;
          width: number;
          initDialog(html: any): void;
          prepareContext(
              cfg: any,
          ): {
              charges: any;
              deckLabel: any;
              expiryType: any;
              expiryValue: any;
              label: any;
              mode: any;
              sourceDeckId: any;
              sourceStackId: any;
              sourceType: any;
          };
          processResult(
              raw: any,
          ): {
              charges: number | null;
              expiryType: any;
              expiryValue: number | null;
              label: any;
              mode: any;
              sourceDeckId: any;
              sourceStackId: any;
              sourceType: any;
          };
      }
    • userChoice: {
          label: string;
          template: string;
          width: number;
          initDialog(html: any, extra?: null): void;
          prepareContext(
              cfg: any,
          ): { optionsJson: string; promptTitle: any; sampleCount: any };
          processResult(
              raw: any,
          ): { options: any; promptTitle: any; sampleCount: number };
      }

      "User Choice" meta-outcome: presents the acting player (or iterator target's controller, per allowedTargetScopes: ["target", "self"]) with N author-defined options at runtime, then runs the chosen option's own outcome list. This registry entry is the authoring side only — it edits outcome.config.options in memory and never writes to a document itself; _initUserChoiceEditor (above) owns all the add/remove/reorder/configure wiring for the nested option/outcome editor.

      Config shape (outcome.config):

      {
      promptTitle: string | null,
      sampleCount: number,
      options: [
      { id, name, description, outcomes: [{ id, order, type, target, config }, ...] },
      ...
      ],
      }

      outcomes entries are plain objects shaped like TriggerOutcomeModel fields, not live embedded documents — see .claude/contexts/config-dialog-registry.md's "userChoice Entry — Special Patterns" section for the full nested-editor writeup.

      sampleCount (number input, min="0") authors a design-time setting: 0 (default) prompts with the full option pool. Any value > 0 does NOT skip the prompt — the outcome's executor draws that many distinct options via Math.random() at fire time and prompts a real player/GM with only that narrowed subset; the human still makes the actual choice, from a smaller randomly-drawn pool — see OUTCOME_REGISTRY.userChoice's doc block (module/helpers/trigger-outcomes.mjs).