This package contains art, text, or software code produced using generative AI.
AI was used in the programming phase, but the whole functionality was human designed. Every decision was made supervising and editing each line of code written by the AI.
PF2e Threat Tracker is a Foundry VTT module that tracks threat generated by player characters and ally NPCs in the Pathfinder 2e system. It maintains a threat table for each enemy, showing which characters have generated the most attention. The module displays a floating panel listing each enemy and its top threat-holders, helping Game Masters monitor aggro during combat.
🧩 Features
Core Threat System
- Automatic Threat Tracking — Tracks threat from attacks, damage, spells, healing, skill actions, feats, and effects. Any PF2e action slug is supported dynamically.
- IWR-Aware Calculations — Immunities, Weaknesses, and Resistances modify threat amounts (immune → 0, weak → bonus, resistant → reduction), with full exception handling.
- Distance-Based Modifiers — Threat scales based on attacker distance relative to the enemy's movement speed.
- Threat Decay — Configurable per-round decay that normalises threat values toward the average over time.
- Unconscious Reduction — Configurable percentage reduction when an ally falls unconscious.
GM Control Panel
- Floating Threat Panel — Real-time display of top 5 threat-holders per enemy during combat. Draggable, minimizable, themeable.
- Inline Editing — Click any threat value to edit it directly in the panel.
- Undo System — Undo button + Ctrl+Z shortcut. 50-operation in-memory stack with automatic snapshots.
- Threat Lock — Lock individual entries to prevent automatic changes. Only manual edits can modify locked values.
- Global Pause — Freeze all automatic threat calculation with a single click. Visual indicator when paused.
- Reset Controls — Per-entry reset (✕) or full enemy reset (trash icon).
- Aggro Shift Alerts — Animated banner when the #1 threat source changes: "Dragon: Valeros → Kyra".
- Position Indicators — Color-coded entries (#1 red, #2 orange, #3 yellow) with matching bar gradients.
- Multi-Combat Support — Combat selector when multiple encounters are active simultaneously.
Configuration
- Auto-Generate Defaults — One-click heuristic analysis of all compendiums (effects, spells, feats, actions, equipment). Assigns threat values based on 159 PF2e traits, spell rank, action cost, damage type, area of effect, and duration. Effect-to-source correlation via `@UUID` parsing, "Granted by X" text matching, and name matching.
- Custom Threat per Item — Configure threat values directly on weapons, spells, shields, feats, and consumables via a button in the item sheet header.
- Custom Threat per Skill Action — Global and per-actor overrides for any skill action.
- Custom Threat from Effects — Configure how compendium effects generate threat (self, target, or both).
- Compendium Item Overrides — Stores custom threat values for read-only compendium items in a dedicated setting.
- Export/Import — Download your entire threat configuration as JSON and share it or restore it later.
- Threat Presets — Pre-built configurations (MMO (WIP) preset included, more planned).
Threat History
- Per-Round Log — Visual history of all threat events per round, aggregated by source → enemy with totals.
Visual Themes
12 built-in themes: Dark, White, Blue Neon, Red Neon, Dark Geo Black, Dark Geo White, Fargo, Pro Fantasy, RPG Game, Invisible, Sci-Fi Blue, Sci-Fi Red. All assets from these themes are from a bought product from GameDev Market made by humans.
Sequencer Integration (Optional)
If Sequencer is installed, shows visual effects (marker or ray) on the token with the highest threat when an enemy is selected.
Persistent Storage
Each enemy's threat table is stored using Foundry's flags system, persisting across scenes and sessions.
⚔️ Usage
-
Opening the Threat Panel — The panel opens automatically at the start of combat. It can be minimized, dragged, and configured via the gear button.
-
Monitoring Threat — During combat, any time a PC or allied token deals damage, heals, casts a spell, or uses a skill action, their threat value updates against the relevant enemies. The panel displays the **top 5 threat-holders** per enemy.
-
Editing Values — Click any number in the panel to edit it inline. Use the lock icon to prevent automatic changes to specific entries. Use the pause button to freeze all calculations while you adjust things manually.
-
Undoing Mistakes — Click the undo button or press Ctrl+Z to revert the last threat change. Works for up to 50 operations per session.
-
Auto-Generating Defaults — Go to Configure Threat → Custom Threat → Auto-Generate Defaults. This analyses all your compendiums and assigns heuristic values so the system works out of the box. You can fine-tune individual values afterwards.
-
Sequencer Effects — If Sequencer is available, select an enemy token to see a visual indicator pointing at their top threat target.
⚙️ Configuration
Go to Settings → Module Settings → PF2e Threat Tracker to adjust:
- General — Panel position, threat decay toggle and factor.
- Threat — Base values for attacks, spells, healing, skills. IWR toggle, target-only mode, unconscious reduction.
- Sequencer — Top threat effect path, type (marker/ray), enable/disable.
- Custom Threat — Global skill action overrides, per-actor action overrides, effect threat configuration, excluded compendiums, auto-generate defaults.
- Templates — Threat presets. Export/Import configuration.
- Appearance — Theme, opacity, max visible cards.
🔧 In Progress
- More themes
- More threat presets
- Threat prediction — "If this enemy moves, who would it attack?"
💡 Future Ideas
- Extra VFX Options — Use Sequencer to flash icons or mark the top-threat character more clearly.
- Post-combat summary — Who generated the most threat, graphs by round.
- Passive proximity threat — Standing next to an enemy generates constant low threat.
- Role-based multipliers — Automatic modifiers for "tank" or "healer" tagged actors.
Credits
- Wasp for creating Sequencer
- Chasarooni for being a wondeful person (he made the sequencer macro! and here is one of his [wonderful modules ♥])
- TheJoester for almost making me cry
- The whole pathfinder community ♥
- Foundry Team for making me use its program since v9 (2021 lmao)
- Assets from GameDevMarket (Fargo theme from Ispolin, Sci-Fi theme from Ultra-Knight, Dark Geo theme from layerlabgames)
Disclaimer
I am not a JS developer, neither an knowledged person about it, AI was used in the creation of this module just because I lack of the knowledge of how coding works and I learned a lot with the creation of this module. I hope you understand and appreciate every module developer for their ability to do such incredible things day after day.