claude-memory/graph/solutions/class-feature-automation-for-foundry-vtt-9889ed.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

13 lines
723 B
Markdown

---
id: 9889ed75-f338-447d-bf43-833790318808
type: solution
title: "Class feature automation for Foundry VTT"
tags: [vagabond-rpg, foundryvtt, javascript, pattern]
importance: 0.7
confidence: 0.8
created: "2025-12-14T03:19:39.590537+00:00"
updated: "2025-12-14T03:19:39.590537+00:00"
---
Implemented automatic class feature application using _onCreate/_preDelete lifecycle methods and updateActor hook. Key learnings: Foundry lifecycle methods run async (don't block createEmbeddedDocuments), so tests need either explicit calls or small delays. Made applyClassFeatures() idempotent to handle race conditions. Data model methods may not be available on embedded items - calculate values directly from system data instead.