What problem does it solve?
This skill provides structured patterns for building and extending Foundry VTT's Combat system, including Combat, Combatant documents, initiative handling, and combat hooks such as combatStart, combatTurn, and combatRound.
Core Features & Use Cases
- Combat lifecycle automation: tailor turn order, rounds, and initiative through custom formulas and sorting.
- Hook-driven behavior: attach logic to combatStart, combatTurn, and combatRound to automate per-turn effects and UI updates.
- Extensibility for systems/modules: provide a clean extension path by subclassing Foundry's Combat and Combatant, enabling consistent behavior across scenes and encounters.
Quick Start
- Extend Foundry's Combat and Combatant classes to customize initiative and order.
- Register hooks for combatStart, combatTurn, and combatRound to observe and influence the flow.
- Enable the changes by configuring CONFIG.Combat.documentClass to your custom class (e.g., class MyCombat extends Combat { ... }).