Releases: Smantella/combat-stats-pf2e
Releases · Smantella/combat-stats-pf2e
Release list
2.3.0
- New: track allied non-party NPCs in combat stats. Off by default — enable "Track allied NPCs" in the module settings. Once on, an NPC counts as an ally if either: (a) you mark it explicitly via right-click in the Actors sidebar → "Combat Stats: Track as ally" (this always wins), or (b) it has no explicit mark and its token in the scene has Friendly disposition. A tracked ally gets its own full entry — damage dealt, damage taken, healing done, kills, max single hit, times downed — shown with a small 🐾 next to its name in the recap and charts (a "NPC: " text prefix was tried first but truncated in narrow columns), plus a "Tipo" column in the Excel export, so it's never confused with a player character. An NPC being defeated by the party still counts as a normal kill; a tracked ally being downed by an enemy does not (it's not a party kill).
- This directly builds on the misattribution fix below: previously an NPC's damage had nowhere to go and could leak into a player's stats. Now it either has its own tracked entry, or — if tracking is off — it's cleanly ignored without touching anyone else's numbers.
- Fixed: damage dealt through custom macros (e.g. a Force Barrage macro that rolls and applies damage manually, bypassing PF2e's normal roll flow) wasn't tracked at all. These messages carry no
context.actor/context.targetand sometimes noorigin.actoreither — the tracker had no way to identify the caster. It now also falls back to the chat message'sspeaker(a plain Foundry field, always set byChatMessage.getSpeaker()) when PF2e's own flags are empty, so this kind of manually-applied damage is attributed correctly instead of silently disappearing. Confirmed live against a real multi-dart Force Barrage cast hitting two separate creatures. - Fixed: undoing damage on a token could roll back the wrong creature's stats when two unlinked tokens share the same base Actor (e.g. two identical monsters placed by copy-pasting a token, or duplicated from the same Actor sheet). The "what to undo" record was keyed by Actor ID, which both tokens share, so damaging both and then undoing one could silently revert the other token's hit instead. Now keyed by token, matching how HP snapshots were already tracked, so each token's undo only ever touches its own numbers.
- Fixed: a spell/attack whose damage gets applied to multiple targets one at a time (clicking "Apply Damage" on each target's card separately) could lose track of later targets if there was more than a few seconds between clicks. The broadcast slot used to attribute damage with no explicit single target had a 5-second window — fine for rapid clicking, not for realistic pacing (discussing the scene, rolling dice, chatting between applying each hit). Widened to 60 seconds, and it still refreshes on every use so a longer sequence of applies stays covered throughout, not just for the first minute. This also explains an apparent "kills aren't attributed" symptom seen while diagnosing Force Barrage: a lethal hit landing after the window had already expired had no attacker to credit.
2.2.1
Fixed: using the "undo" button on a damage/healing card threw off the stats. If you ever clicked that little revert arrow on a chat card, the health change was undone but the stats kept the wrong numbers. Small note: your single biggest hit/heal record and kill count won't be adjusted if you undo the exact thing that set them, that edge case is still on the to-do list.
Reported by a user, thejoester on reddit, confirmed fixed live. Thanks for the catch!
2.2.0
2.1.0
Changelog
v2.1.0
- Round in Big Hit message: added
{{round}}placeholder, with ordinal formatting (e.g. "1°") in Italian. - AoE fix: area damage is now correctly summed (previously only the first target's hit was recorded) for both the defeated-enemies count and the max single hit tracker.
- Defeated count fix for unlinked tokens: each token is now tracked individually instead of being incorrectly deduplicated.
- New "Abilities" tab: WoW Logs–style damage meter per character, with bars per weapon/spell (total damage, hits, average, max).
- New "Trend" chart type: shows a metric's progression fight by fight, one line per character.
- Customizable chat message sender: the end-of-combat recap card can now be sent as a chosen actor (name + portrait) instead of a fixed alias.
- Fix crash on LAN/HTTP setups: replaced
crypto.randomUUID()(requires HTTPS) withfoundry.utils.randomID(), which also works in non-secure contexts (Docker, reverse proxies, etc.) — resolves aTypeErrorthat blocked fight saving. - Updated IT/EN localization for all new strings.