feat(gowlers-tracking-ledger): improve damage source extraction with proper metadata resolution

- Implement resolveActorFromMetadata() to extract attacker from message metadata UUID
- Implement resolveItemFromMetadata() to extract weapon/ability from attacker's inventory
- Change label format from "Damage (Actor, Weapon)" to "Actor -> Weapon" (e.g., "Goblin -> Scimitar Slash")
- Add support for identifiedInfo, metadata, flavor text, and speaker.alias in priority order
- Add support for Critical and Nonlethal damage modifiers
- Update version to 0.1.19

This properly resolves WHO did the damage (attacker name) and WHAT was used (weapon/ability name),
addressing the missing damage details. Format matches reference macros (macro_activate-hp-tracking.js).

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
centron\schwoerer
2025-11-20 14:36:40 +01:00
parent cc58627342
commit 91a5176374
2 changed files with 61 additions and 50 deletions

View File

@@ -3,7 +3,7 @@
"type": "module",
"title": "Gowler's Tracking Ledger",
"description": "Adds HP/XP/Currency log buttons to PF1 sheets and opens the tracking dialog preloaded with the actor's logs.",
"version": "0.1.18",
"version": "0.1.19",
"authors": [
{ "name": "Gowler", "url": "https://foundryvtt.com" }
],