foundry vttautomationdndttrpgmacros

The GM's Guide to Advanced Foundry VTT Automation

By Mark Coulter April 2, 2026
Historical Record
The GM's Guide to Advanced Foundry VTT Automation
M
The Lore Keeper

Mark Coulter

"Architect of the Tavern and Guardian of the Distributed Beacon. Mark spends his days at the intersection of cryptography and tabletop gaming, ensuring that every natural twenty is as pure as the math that forged it."

Recorded on April 2, 2026

The GM’s Guide to Advanced Foundry VTT Automation

Running a Dungeons & Dragons 5e game in Foundry VTT should feel like directing a film, not filing tax returns. Yet, many Game Masters spend more time cross-referencing rules, calculating damage, and tracking conditions than they do telling a compelling story.

This guide provides a direct, technical solution. We will walk through the essential modules, specific configuration settings, and ready-to-use macros required to build a highly automated D&D 5e environment. The goal is to eliminate repetitive mechanical tasks, allowing combat to flow quickly and cinematically.

To achieve this, we will configure a core stack of modules: Midi-QOL as the rules engine, Combat Utility Belt (CUB) and Dynamic Active Effects (DAE) for state management, and Automated Animations for visual feedback. By the end, you will have a setup that automatically applies damage, prompts for saves, tracks conditions, and visually represents actions on screen, transforming your game from a manual chore into a responsive, immersive experience.

Guiding Principle: The Five-Second Rule

Before we configure any modules, our approach is guided by a simple heuristic: the Five-Second Rule. If a mechanical task during play consistently takes more than five seconds of calculation, cross-referencing, or menu navigation, it is a prime candidate for automation. Calculating damage for a multi-target spell, applying conditions, and prompting for concentration saves are processes. They are bookkeeping.

Conversely, the high-stakes death save or the tense roll to persuade a city guard are moments of drama. The player’s act of rolling is part of the experience. We automate the process, not the drama.

The Core 5e Automation Stack: Modules & Configuration

An effective automation setup relies on a synergistic stack of modules that handle logic, state, and feedback. For D&D 5e, this setup is the industry standard for a reason.

Step 1: The Engine - Configuring Midi-QOL

Midi-QOL is the heart of our automation. It intercepts every roll and action, interpreting the game’s rules to connect an attack to a target’s AC, a spell DC to a save, and damage to a health bar. Incorrect configuration here will cause the entire system to fail.

Click the Workflow Settings button at the top. Here, you can choose from several levels of automation.

Profile A: Player-Driven (Tactical Focus) This setup automates the calculations but requires players to confirm actions, keeping them in control. It’s a great balance of speed and player agency. 1. Workflow: Select Rolls & Damage. This will automatically roll attacks and damage but wait for player input to apply it. 2. Auto Fast-Forward: Set to Attack and Damage. , a straight d20) unless the player holds a key for advantage/disadvantage. 3. Auto Apply Damage/Healing: Check Auto apply damage/healing to target. This is critical. 4.

Profile B: Full Automation (Cinematic Focus) This setup is for tables that want maximum speed. The system resolves most actions instantly, with the GM only intervening for edge cases. 1. Workflow: Select Full Automation. This will roll, check for hits, and apply damage in a single, seamless sequence. 2. Auto Fast-Forward: Set to All. Every roll will be instant. 3. Auto Apply Damage/Healing: Ensure this is checked. 4.

For most tables, Profile A is the recommended starting point. It provides a massive speed boost without making players feel like passengers.

Step 2: State Management - CUB, Convenient Effects & DAE

This trio manages character and monster states—conditions, spell effects, and other temporary modifiers. They ensure that being ‘Blinded’ isn’t just an icon, but a mechanically enforced penalty.

  1. Combat Utility Belt (CUB): Go to the CUB settings and enable the Concentrator feature. This is non-negotiable. It will automatically detect when a concentrating creature takes damage, prompt for the correct Constitution save (DC 10 or half damage), and remove the spell effect on a failure. This alone eliminates the most commonly forgotten rule in 5e.

  2. Convenient Effects (CE): This module works with CUB to provide a pre-packaged library of 5e conditions. When you right-click a token and apply the ‘Prone’ effect, for example, Midi-QOL will now automatically grant advantage to melee attackers and disadvantage to ranged attackers against that token.

  3. Dynamic Active Effects (DAE): DAE is the glue that allows spells and features to apply these effects automatically. When a player casts Bless, DAE reads the spell’s data and automatically applies an effect to the targets that adds 1d4 to their attack rolls and saving throws for the duration. You rarely need to configure DAE itself, but it must be active for Midi-QOL and CUB to function correctly.

Step 3: Visual Feedback - JB2A & Automated Animations

This final layer provides the payoff. It makes your automation visible and exciting.

In the Automated Animations settings, you can create detailed rules. For example, to configure Magic Missile, you would:

  1. Navigate to the Spells tab and find Magic Missile.
  2. Select an animation from the JB2A library for the missile itself (e.g., Magic Missile 01, Blue).
  3. Set the animation to play from the Caster and move towards the Target.
  4. Add a second animation for the impact (e.g., Impact 01, Blue).

Now, when a player casts the spell, the system will automatically play an animation for each missile, streaking from the caster to each target, followed by an impact flash. This provides instant, unambiguous feedback that the action was resolved.

The Macro Library: Copy-Paste Solutions for 5e

Macros execute small scripts to perform complex actions with a single click. Save these as script macros and place them on the player macro bar for easy access.

Macro 1: Automated Potion of Healing

This macro finds a Potion of Healing in the character’s inventory, rolls the healing, applies it to the character, and then removes one potion from their sheet.

// Automated Potion of Healing Macro
const actorToken = canvas.tokens.controlled[0]?.actor || game.user.character;
if (!actorToken) {
  return ui.notifications.warn("Please select a token or have a character assigned.");
}

const potionNames = ["Potion of Healing", "Potion of Greater Healing", "Potion of Superior Healing", "Potion of Supreme Healing"];
const availablePotions = actorToken.items.filter(i => potionNames.includes(i.name));

if (availablePotions.length === 0) {
  return ui.notifications.warn(`${actorToken.name} has no potions of healing!`);
}

let dialogContent = `<div style="display: flex; flex-direction: column; gap: 10px;">`;
availablePotions.forEach(p => {
  dialogContent += `
    <div style="display: flex; align-items: center; justify-content: space-between;">
      <label for="${p.id}">${p.name} (x${p.system.quantity})</label>
      <button type="button" data-item-id="${p.id}">Use</button>
    </div>`;
});
dialogContent += `</div>`;

new Dialog({
  title: "Use Potion of Healing",
  content: dialogContent,
  buttons: { close: { label: "Close" } },
  render: (html) => {
    html.find('button').click(async (event) => {
      const itemId = event.currentTarget.dataset.itemId;
      const itemToUse = actorToken.items.get(itemId);
      const roll = await new Roll(itemToUse.system.damage.parts[0][0]).roll();
      await roll.toMessage({ speaker: ChatMessage.getSpeaker({ actor: actorToken }), flavor: `Uses ${itemToUse.name}` });
      await actorToken.applyDamage(-roll.total); // Negative damage to heal
      await itemToUse.update({ 'system.quantity': itemToUse.system.quantity - 1 });
      if (itemToUse.system.quantity <= 0) await itemToUse.delete();
      Dialog.getOpenDialogs()[0].close();
    });
  }
}).render(true);

Macro 2: One-Click Condition Application

This macro presents a pop-up with common 5e conditions, allowing the GM to apply them to selected tokens instantly. This requires the ‘Convenient Effects’ module to be active.

// Quick Apply Conditions Macro (for GM)
if (!game.user.isGM) return ui.notifications.error("This macro is for GMs only.");
const targets = canvas.tokens.controlled;
if (targets.length === 0) return ui.notifications.warn("Please select at least one token.");

const conditions = ["Blinded", "Charmed", "Deafened", "Frightened", "Grappled", "Incapacitated", "Invisible", "Paralyzed", "Petrified", "Poisoned", "Prone", "Restrained", "Stunned", "Unconscious"];

let buttons = {};
conditions.forEach(c => {
  buttons[c] = {
    label: c,
    callback: () => {
      targets.forEach(t => {
        game.dfreds.effectInterface.toggleEffect(c, { uuids: [t.actor.uuid] });
      });
    }
  };
});

new Dialog({
  title: "Apply Condition",
  content: `<p>Choose a condition to apply to the selected token(s):</p>`,
  buttons: buttons
}).render(true);

Maintaining Your Automated Setup

A highly automated Foundry VTT setup is a powerful tool, but it requires maintenance. Core software updates, dnd5e system updates, and module updates can introduce conflicts.

  1. Read the Changelogs: Before any update, especially for Midi-QOL or the dnd5e system, read the module’s GitHub or Foundry page. Developers often warn about breaking changes. For example, dnd5e system v3.0 required major updates to almost all automation modules.

  2. Create a Test World: Create a separate Foundry world that is a direct copy of your main campaign. Update all modules and systems in this ‘staging’ world first. Spend 30 minutes testing key automations—a basic attack, a saving throw spell, a concentration check. If everything works, you can safely update your main game world.

  3. Use ‘Find the Culprit’: This invaluable module helps diagnose issues by systematically disabling other modules. If an update breaks something, ‘Find the Culprit’ can help you identify the specific module conflict in minutes, not hours.

Treat your Foundry setup as a core part of your campaign preparation. A small amount of technical maintenance between sessions ensures a smooth, stable, and immersive experience during play.

By moving the burden of mechanical bookkeeping from your brain to the machine, you are free to perform your true role as a Game Master: to build worlds, portray characters, and tell unforgettable stories.