manage-activity
Add, edit, remove, or list D&D 5e item activities (attacks, damage, saves, heals, checks, utility, cast) on actor or world items in Foundry VTT.
Instructions
[D&D 5e only] Add / edit / remove / list Activities on an item — the rollable things (attack, damage, save, heal, check, utility, cast). Target an item on an actor (set actorIdentifier) or a world item (omit it). This authors actions like a Multiattack (action="add", type="utility", name="Multiattack"), a heal, an ability-check, a saving-throw activity, OR a spell-casting item (action="add", type="cast", spellUuid=…, charges=…, saveDC/attackBonus=… to pin a fixed challenge) — the cast LINKS a real compendium spell so its measured template + save/attack fire for free. appliesEffects puts real ActiveEffects on the targets (dnd5e 6.0) — e.g. [{ref:"Poisoned", onSave:false}] on a save activity; they inherit the activity duration/expiry. Use action="list" (or get-actor-entity) to find activityIds, then edit/remove by id. EDIT changes only name, duration, template, affects, behaviors and appliesEffects — every other field goes through patch (dot-paths relative to the activity, e.g. {"attack.bonus":"3"}) or a remove + add. Authoring only — it does not run combat.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Activity name (e.g. "Multiattack"). Used by add and edit (rename). | |
| type | No | Activity type. Required for add. "utility" = descriptive action (e.g. Multiattack). "cast" = link & cast a real compendium spell (e.g. a wand/staff) — see spellUuid. dnd5e 6.0: "teleport" moves the target up to teleportDistance (Misty Step); "transform" changes the actor into another creature or one of its own forms (Wild Shape, Polymorph, a lycanthrope's Shape-Shift) — see transformMode / profiles / forms. | |
| forms | No | Transform activity (form mode): the names of effects ON THIS ITEM, one per form — author them first with manage-effect (actorIdentifier + itemIdentifier), e.g. ["Humanoid Form", "Hybrid Form", "Tiger Form"]. Each form's changes ARE the transformation. | |
| patch | No | Edit: dot-paths RELATIVE to the activity root, e.g. {"attack.bonus":"3"}, {"save.dc.formula":"16"}, {"damage.onSave":"half"}. | |
| action | Yes | add a new activity, edit/remove an existing one (by activityId), or list activities. | |
| onSave | No | Save activity: damage on a successful save. | |
| saveDC | No | Save activity: the DC. Cast activity: pins a FIXED save DC for the linked spell (else the cast defers the DC to the casting actor). | |
| skills | No | Check activity: associated skill keys (e.g. ["acr","ath"]). | |
| ability | No | Attack ability override (attack activity). | |
| affects | No | Target affects (with or without a template). | |
| charges | No | Cast activity: uses per cast. On an item with its own uses pool (a wand) this many charges are consumed FROM that pool per cast; on an item WITHOUT one (e.g. a feature) a pool of this size is created ON the activity (recovering per recoveryPeriod), one use per cast. Omit for an at-will cast. | |
| checkDC | No | Check activity: the DC. | |
| duration | No | Duration OVERRIDE for the activity (sets duration.override so it beats the item's). dnd5e 6.0: the effects this activity applies (see `appliesEffects`) INHERIT this duration, including `expiry` — they carry no duration of their own. E.g. {value: 1, units: "minute"} for a 1-minute effect, or {expiry: "targetEnd"} for "until the end of the target's next turn". | |
| formless | No | Transform activity (form mode): may the actor revert to "no form" from the prompt. | |
| profiles | No | Transform activity (cr / direct modes): the profiles offered. Wild Shape 2024 = cr profiles [{cr: 0.25, creatureTypes: ["beast"], restrictMovement: ["fly", "swim"], level: {max: 3}}, {cr: 0.5, creatureTypes: ["beast"], restrictMovement: ["fly"], level: {min: 4, max: 7}}, …]. | |
| template | No | Area template the activity places (sets target.override). Required for any `behaviors` — e.g. Web = {type: "cube", size: 20}, Spike Growth = {type: "sphere", size: 20}. | |
| behaviors | No | dnd5e 6.0 area behaviors carried by the template (needs `template`). On edit this REPLACES the list. E.g. an authored Web: type "save", template {type:"cube", size:20}, behaviors [{type:"applyActiveEffect", effects:["Restrained"]}, {type:"difficultTerrain", terrainTypes:["web"]}]. | |
| castLevel | No | Cast activity: level to cast at (0 = cantrip). Defaults to the spell's base level. | |
| spellUuid | No | Cast activity (REQUIRED): the Compendium uuid of the spell to LINK, e.g. "Compendium.dnd-players-handbook.spells.Item.phbsplFireball00". The activity CASTS this spell — its measured template (fireball sphere, lightning line…), save/attack, and effects come for free. The spell must be a real premium-book spell (off-book/SRD is refused — if it is not in the books, STOP and ASK; do not hand-roll a fake save/damage activity). | |
| activityId | No | Activity id — required for edit/remove. Get it from action "list" or get-actor-entity. | |
| attackType | No | Attack activity: melee or ranged. | |
| healAmount | No | Heal activity: healing dice (type "healing" or "temphp"). | |
| attackBonus | No | Attack activity: flat to-hit bonus. Cast activity: pins a FIXED spell-attack bonus (else the cast defers the attack to the casting actor). | |
| damageParts | No | Damage dice — for attack (extra parts), damage, and save activities. | |
| includeBase | No | Attack: also roll the item base damage (default true). | |
| saveAbility | No | Save activity: the saving-throw ability. | |
| checkAbility | No | Check activity: the ability rolled. | |
| transformMode | No | Transform activity: "cr" (default) = pick any creature up to a CR (Wild Shape, Polymorph — profiles carry the max CR + size / type / movement filters); "direct" = a fixed list of creatures (profiles carry an `actor`); "form" = Select Form — the forms are EFFECTS on the item (a lycanthrope's Humanoid / Hybrid / Beast forms, Disguise Self) named in `forms`. | |
| activationType | No | Action economy. Default "action". | |
| appliesEffects | No | dnd5e 6.0: the ActiveEffects this activity APPLIES to its targets (activity.effects[]). The effects inherit the activity `duration` (including its `expiry`) — do not give them one of their own. E.g. a save activity that poisons on a failed save: appliesEffects [{ref: "Poisoned", onSave: false}] + duration {value: 1, units: "minute"}. On edit this REPLACES the list. Not for a transform activity — its effects[] ARE its `forms`. | |
| itemIdentifier | Yes | Item to operate on (id or name). On an actor when actorIdentifier is set, else a world item. | |
| recoveryPeriod | No | Cast activity with charges on a poolless item: when the activity-side pool recovers. Default "lr" (long rest). | |
| actorIdentifier | No | If set, the item is embedded on this actor; omit to target a world (sidebar) item. Also accepts a placed TOKEN id (from list-tokens) — the activity edit then lands on that token INSTANCE's own delta, not the base actor. | |
| transformPreset | No | Transform activity (cr / direct): the transformation settings preset — wildshape (keep mental stats, merge features), polymorph (full replacement), polymorphSelf (appearance only). | |
| teleportDistance | No | Teleport activity: how far the target may be moved, in feet (a number or a deterministic formula like "@prof * 10"). Omit for ANY distance. Targets default to self — pass `affects` ({type: "willing", count: 1}) for "you and one willing creature". | |
| transformSettings | No | Transform activity (cr / direct): CUSTOM transformation settings instead of the bare preset (sets customize). Start from a preset and override — e.g. Wild Shape that also keeps resistances: transformPreset "wildshape" + {keep: ["bio","class","feats","hp","languages","mental","tempHP","type","resistances"]}. Not available in form mode. |