Master Foundry VTT's event-driven architecture to build responsive modules and systems using optimized hook patterns.
This skill provides comprehensive guidance for working with Foundry Virtual Tabletop's Hook system, covering everything from basic event registration to advanced API creation. It helps developers navigate the complex execution order of lifecycle hooks (init, setup, ready), implement document-level triggers, and avoid common pitfalls like async-related cancellation failures and memory leaks. By providing standardized patterns for Hooks.on, call, and callAll, this skill ensures your Foundry VTT code is efficient, maintainable, and follows the latest V12+ best practices for ApplicationV2 and Document handling.
主な機能
01Comprehensive guide for Document and Application render hooks (V1 and V2)
02Advanced troubleshooting for async limitations and memory leak prevention
03Deep dive into Foundry VTT lifecycle execution order from init to ready
040 GitHub stars
05Standardized Hook registration (on, once, off) and execution patterns
06Custom Hook API design patterns for inter-module communication
ユースケース
01Creating automated responses to Actor or Item document updates
02Injecting custom UI elements into standard Foundry sheets using render hooks
03Building module-to-module APIs using custom event triggers