A Foundry VTT module for the D&D 5e game system that allows status effects and custom AC5e flags to dynamically influence any roll, including attacks, saves, ability checks, and damage. It highlights the correct roll button based on active effects and the 5e ruleset, ensuring rolls are made with the proper advantage, disadvantage, bonuses, or critical damage.
The module supports auras and granting modes that can affect nearby allies or enemies, automatically applying condition-based bonuses, penalties. etc. AC5e flags allow evaluation of data from the rolling actor, opposing actor, and aura source actors — enabling automation of more complex, context-sensitive scenarios.
If you like what I do, consider supporting this lonely bugbear 🐾
Every shiny gold coin helps keep the ideas flowing and the goblins at bay.
You can also join the Bugbear’s Den to hang out, get help, or check what I might be working on!
Important
The module will adjust it's behavior based on the 5e system's setting, for Modern vs Legacy rules. For example if Modern rules are selected, AC5E will not handle Exhaustion, but respect the system's handling. Small adjustments for differences in the rest of the conditions too, as needed.
Legacy Rules
Blinded: Disadvantage on attacks and grants advantage to attack from othersExhaustion 1: Disadvantage on ability checks (and skill checks as a result)Exhaustion 2: no changesExhaustion 3: Disadvantage on attacks and saving throwsExhaustion 4: no changesExhaustion 5: no changesFrightened: Disadvantage on ability checks and attack rolls;Invisible: Advantage on attacks and grants Disadvantage to attacks by othersParalyzed: Auto fail (-99) strength/dexterity saves and attacker within 5ft of the creature deals critical damagePetrified: Grants Advantage on attacks by others, auto fail strength/dexterity savesPoisoned: Disadvantage on attacks and ability checksProne: Disadvantage on attacks, grants advantage on attacks by others if within 5ft, otherwise grants disdvantageRestrained: Disadvantage on attacks and dexterity saves, grants advantage on attacks by othersStunned: Auto fail strength/dexterity saves, grants advantage on attacks by othersUnconscious: Auto fails strength/dexterity saves, grants advantage on attacks by others, crit if hit within 5ft ++ Prone
Modern Rules
- No
exhaustionautomation, as this is handled by the system, Grappledwill give disadvantage on all attacks, except for ones against your Grappler,Hidingwill give advantage on initiative rolls,Incapacitatedwill give disadvantage on initiative rolls, in addition to the legacy rules,Invisibilitywill give advantage on initiative rolls, in addition to the legacy rules.
Using the offered module flags in Active effects, you can affect rolls of actors, against actors or actors within the range of auras!!
More info in: https://github.com/thatlonelybugbear/automated-conditions-5e/wiki/Flags-functionality
💡 If you have DAE module enabled, the flags can be auto completed in the DAE effect sheets.
If you are integrating another module and want to customize AC5E status behavior, wait for the AC5E ready hook and then register overrides.
Hooks.on("ac5e.statusEffectsReady", ({ tables, overrides }) => {
const overrideId = overrides.register({
name: "Example: ignore prone attack disadvantage for a specific actor",
status: "prone",
hook: "attack",
type: "subject",
priority: 10,
when: ({ context }) => context.subject?.name === "Minotaur",
apply: ({ result }) => (result === "disadvantage" ? "" : result)
});
// Store overrideId if you want to remove it later:
// overrides.remove(overrideId);
});overrides API:
register({ ... })returns an override id.remove(id)removes one override.clear()removes all overrides.list()returns current registered overrides.
You can suppress a status by setting an actor flag like noProne.
Example Active Effect change keys:
flags.automated-conditions-5e.noProne->true
AC5E tooltips will show the suppressing entry under Suppressed Statuses.
AC5E exposes a cadence reset helper:
// Reset cadence usage buckets for the current combat.
await ac5e.cadence.reset();
// Reset cadence usage buckets for a specific combat.
await ac5e.cadence.reset({ combatUuid: game.combat?.uuid });AC5E exposes dynamic usage-rule registration:
ac5e.usageRules.register({
key: "isSneak",
hook: "damage",
target: "subject",
mode: "bonus",
value: "@scale.rogue.sneak-attack",
cadence: "oncePerTurn",
condition: "(rwak || (mwak && fin)) && hasAdvantage",
optin: true,
name: "Sneak Attack",
scope: "universal"
});Quick helpers:
ac5e.usageRules.list();
ac5e.usageRules.showKeys();Persistence notes:
- Runtime registration is client-local.
persistent: truestores world-level rules through a GM-authorized setting update.evaluatefunctions are runtime-only and are not persisted; useconditionstrings for persistent rules.scope: "effect"(default) is keyword-only (for effect-driven flags).scope: "universal"also injects a global pseudo-rule entry.- Standalone booleans such as
optin,criticalStatic, andpartialConsumeare supported in object-formregister({...})definitions as well as rawvalue: "..."strings. - Compatibility note: AC5E opt-ins depend on roll configuration dialogs. If another module forces
dialog.configure = false, opt-in selection UI will not appear.
See full developer API details in wiki/Usage-Rules-API.md.
AC5E exposes snapshot/export/import helpers for troubleshooting environment drift.
// Build a snapshot object in memory.
const snapshot = ac5e.troubleshooter.snapshot();
// Export snapshot as JSON download.
ac5e.troubleshooter.exportSnapshot();
// exportSnapshot() includes lint data by default at snapshot.ac5e.lint.
// If you need a snapshot without lint:
const noLintSnapshot = ac5e.troubleshooter.snapshot({ includeLint: false });
// Import by opening a file chooser dialog and log parsed content in console.
const imported = await ac5e.troubleshooter.importSnapshot();
// Optional: still accepts a File object directly.
const importedFromFile = await ac5e.troubleshooter.importSnapshot(file);Snapshot includes:
- AC5E settings.
- AC5E lint report under
ac5e.lint(enabled by default). - Foundry/system/module versions (AC5E, Midi-QOL, DAE, Times Up, Chris's Premades).
- Grid/canvas fields (
gridDiagonals, grid type/distance/units/size). - DnD5e rules version (
modernvslegacy). - Scene vision/environment info (
tokenVision,environment,globalLight.enabled).
Quick walkthrough
Expanded Conditions(default off)Dodging: Attacker disadvantage if target not incapacitated, restrained and can see attacker (attacker doesn't have the Hiding condition). Also advantage on dex saves.Hiding: Advantage on attacks.
Armor automation(default off)- Ability Checks, Saves and Attack Rolls for (STR || DEX) based rolls, if the Actor is not proficient in the equipped suit of Armor.
- Imposes disadvantage on Stealth checks when the relevant property of the Armor is selected.
- From dnd5e v3.1.2 onwards, any Equipment type Item can impose stealth disadvantage too, not only Armor.
Casting spells checks automation(default Do nothing)- When rolling a spell item, checks for:
- Not being proficient in the equipped armor,
- Raging (or Rage) active effect,
- Silenced status and neither an active effect named Subtle Spell (localized), nor a
flags.automated-conditions-5e.subtleSpell | Override | 1.
- If set to
Enforce, if any of the above are true, spell's use will be disallowed. - If set to
Warn, there will be just a warning toast instead. - If set to
Do nothing, well why should it do something?! :D
- When rolling a spell item, checks for:
Range automation(default off)- Attacking with a ranged weapon at long range imposes disadvantage on the roll (
Long Range). - Attacking with a ranged weapon, when an enemy is adjacent, imposes disadvantage on the roll (
Nearby Foe);- Added a separate setting for Nearby Foe (default off).
- Attacking with a ranged weapon at a distance longer than the long range, imposes a fail on the roll (
Out of Range). - These checks can be overridden per-effect (including
grantsandaura) usingrangeflags:nearbyFoeDisadvantage/noNearbyFoeDisadvantagelongDisadvantage/noLongDisadvantagefail/outOfRangeFail/noFail/noOutOfRangeFail
- Crossbow Expert: Ignores Nearby Foes with
- A flag on the Actor
flags.automated-conditions-5e.crossbowExpert | Override | 1or - An Item named
Crossbow Expert.
- A flag on the Actor
- Sharpshooter: No disadvantage when shooting at long range with
- A flag on the Actor
flags.automated-conditions-5e.sharpShooter | Override | 1or - An Item named
Sharpshooter.
- A flag on the Actor
- Attacking with a ranged weapon at long range imposes disadvantage on the roll (
Show AC5e tooltipsfor both Roll Dialog and Chat messages or any combination of these (default both)Exhaustion automation(default on)- If you want to not automatically process Exhaustion conditions uncheck this. Doing so will allow for other exhaustion modules to alter exhaustion automation or your own rules (eg Alternative Exhaustion 5e).
Encumbrance automation(default off)- Dnd5e v3.x system offers a setting for Encumbrance rules. If that is set to
Variant, and you turn this AC5e setting on, ability checks, attack rolls, and saving throws that use Strength, Dexterity, or Constitution will have disadvantage.
- Dnd5e v3.x system offers a setting for Encumbrance rules. If that is set to
Targeting options(default From source only)- When 0 or more than 1 targets are selected, AC5e will not be able by default to calculate correctly advantageMode/damageMode as this is done based on the first of the game.user.targets only. There is now a setting for the GM to decide how AC5e will deal with targeting and rolling an Attack or Damage, or try to Use an Item that has an attack and Target any of the Individual target options in its details tab. The options are as follows:
From Source Only: The advantageMode/damageMode will be calculated based on effects/conditions etc on the Source actor only (default option),Do nothing: No calculations whatsoever will take place,Enforce targeting: Will cancel the incoming Roll or Item use, and display a warning for the user to target 1 Target (Use with caution).
- When 0 or more than 1 targets are selected, AC5e will not be able by default to calculate correctly advantageMode/damageMode as this is done based on the first of the game.user.targets only. There is now a setting for the GM to decide how AC5e will deal with targeting and rolling an Attack or Damage, or try to Use an Item that has an attack and Target any of the Individual target options in its details tab. The options are as follows:
- For D&D5e v3.1
- Added
dnd5e.preRollConcentrationhook to deal with conditions affecting concentration saving throws.- Exhaustion 3-5 applies disadvantage.
- Heavy Encumbrance applies disadvantage.
- War Caster named Item applies advantage.
- Added
- Core highlights the correct buttons to press depending on the conditions on attacker and target, and Fast Forwards correctly
- MidiQOL
- Ready Set Roll unknown compatibility currently. If the module is updated at some point, I will take another look.
- Special thanks to Illandril for using some of his code from Illandril's Token Tooltips for distance calculations.
- Special thanks to Tim for parts of code used, from his MidiQOL module!!
https://github.com/thatlonelybugbear/automated-conditions-5e/releases/latest/download/module.json
https://raw.githubusercontent.com/thatlonelybugbear/automated-conditions-5e/dndv2/module.json