- Log full metadata object (JSON stringified) to see all available fields
- Log first 1000 chars of message.content (HTML) to analyze damage type information
- This will help identify where damage types (Fire, Slashing, etc.) are stored
Update version to 0.1.21
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Add extractDamageDetails() function to parse damage type from message
- Extract critical hit flags and nonlethal damage flags from options
- Attempt to extract roll formula/breakdown from message.rolls
- Store damage details in recentMessages queue for later matching
- Add comprehensive console logging to inspect available message data
This enables extraction of:
- Damage types (Fire, Slashing, etc.)
- Critical hit information
- Nonlethal damage flags
- Damage roll breakdown formulas
Detailed logging will show what data is available in PF1 message objects
for further refinement of extraction logic.
Update version to 0.1.20
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- 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>
- Fix critical bug where damage was classified as 'Healing' instead of 'Damage'
- Changed queue storage to preserve sign of value (negative=damage, positive=healing)
- This allows buildSourceLabel() to correctly classify HP changes as damage vs healing
- Update version to 0.1.18
The issue was storing Math.abs(value) which stripped the sign. Now storing raw value
so that damage classification logic can use: value < 0 ? "Damage" : "Healing"
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Source column now shows attacker name and item: "Damage (Chyvvom, Binding Contracts)"
- Add damage breakdown detection from pf1DamageData
- Add hover tooltips to delta (Δ) column showing damage/healing breakdown
- Extract damage types and values: "5 physical, 5 fire" etc.
- Store damageBreakdown field in history entries
- Support tooltips for HP and XP changes
- Update version to 0.1.13
Now you can see detailed damage types and amounts by hovering over the delta column,
and source column shows exactly who dealt the damage and with what ability.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Replace 'User' column with 'Source' column in HP, XP, and Currency tabs
- Add automatic source detection: Attack, Spell, Healing, Damage, XP Award, Manual
- Pass options and change data to recordHistoryEntry for source detection
- Detects source based on pf1DamageData, healing flag, spell action type, and value changes
- Defaults to 'Manual' for direct edits
- Update version to 0.1.12
Now you can see what caused each stat change (attack, spell, healing, etc)
in the tracking ledger instead of just the user who made the change.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Split 'Date' column into 'Date Started' (dateCreated) and 'Date Finished' (dateUpdated)
- 'Date Finished' shows when encounter status changed to 'finished'
- Provides better visibility into encounter duration
- Update version to 0.1.11
Encounters tab now clearly shows when each encounter started and when it ended.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Change combatStart hook to createCombat (correct hook for Foundry v11)
- Change combatEnd hook to deleteCombat (correct hook when combat is deleted)
- Add debug logging to confirm combat hooks are registered
- Update version to 0.1.10
Fixes issue where combat end was never being detected, preventing encounter
status from being updated to 'finished' and XP from being linked to encounters.
The console logs showed onCombatEnd was never firing because the hooks had
incorrect names for Foundry v11.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Increase XP linking time window from 5 to 30 seconds after combat ends
- Add detailed console logging to debug encounter status updates
- Log XP entry creation with encounter ID information
- Log encounter summary updates to verify status changes are persisted
- Track active combat state during XP recording
This helps debug why encounters show as 'ongoing' and XP not linked to encounters.
Update version to 0.1.9
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Add lastCombatId and lastCombatEndTime tracking to preserve encounter data
- Update recordHistoryEntry to link XP within 5 seconds of combat end to last encounter
- Change encounter status from 'ended' to 'finished' for clarity
- Store encounter ID when combat ends to catch post-combat XP awards
Fixes issue where XP gained after combat ends was not linked to the encounter,
and encounters were not being marked as finished in the history.
Update version to 0.1.8
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Remove jQuery event listeners for tab switching now handled by onclick attributes
- Simplify render hook to focus solely on config button creation
- Add debug logging to confirm render hook execution
- Reduce potential conflicts between onclick and jQuery handlers
- Update version to 0.1.7
Optimizes dialog rendering and improves code clarity.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
- Add window.switchHistoryTab() global function to handle tab switching via onclick
- Function manages active tab state by toggling CSS classes and display properties
- Includes detailed console logging for debugging tab switches
- Update version to 0.1.6
Fixes tab switching functionality in the history dialog where buttons were not responding to clicks.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>