dnd5e-item-activate
Activate an item with full Foundry automation (Midi-QOL hooks, targets, AoE templates): attacks, spells, abilities. targetTokenIds for attacks — Midi-QOL rolls attack and damage and applies HP. Module 8.14+: dialogs are skipped (fastForward) and answered by attackMode, ammunition, consume; cover, invisibility, prone and other one-off circumstances go in advantage/disadvantage, attackBonus, damageBonus, targetAcBonus — NOT as effects on the actor (an effect hits every copy of an unlinked token); several tokens of one actor: attackerTokenId. Status awaiting_user_dialog is not an error: a dialog opened on the GM's client and the use finishes when they click; do not repeat the call. appliedDamage/appliedHealing give HP per token; applied false = not applied (dnd5e-apply-damage does). AoE: templatePosition in pixels (gridCoord * gridSize + gridSize / 2). dnd5e-item-use is the quick use without targets.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | Yes | Item ID (from item-list) | |
| actorId | Yes | Actor ID | |
| consume | No | What may be spent; omitted = the system decides | |
| advantage | No | ||
| activityId | No | Activity ID if several | |
| ammunition | No | Ammo item ID, or false = spend none | |
| attackMode | No | oneHanded, twoHanded, offhand, thrown, thrown-offhand | |
| spellLevel | No | Spell slot level (upcasting); omitted = base level | |
| attackBonus | No | One-off attack bonus: 2, "1d4" | |
| damageBonus | No | One-off damage bonus: "1d6" (Sneak Attack) | |
| fastForward | No | Skip dialogs and auto-roll (default true) | |
| activityType | No | Activity type: "attack", "damage", "save", "heal", "check", "utility" | |
| disadvantage | No | ||
| targetAcBonus | No | Added to each target AC (cover); Midi-QOL only | |
| targetTokenIds | No | Token IDs of the targets; required for attacks | |
| attackerTokenId | No | Act as this token of the actor (several copies) | |
| templatePosition | No | AoE template: circle = effect center; cone/line = caster position + direction |