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.
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.
"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.
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).
Modifier pool config dialog for trigger-scoped and swing-scoped modifier outcomes (
applyTriggerModifiersandapplySwingModifiers). 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):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 viatoObject()before persisting.