How deadpyxel/tabulanil-sanity-dnd5e works
Main Components Identification
a. Core Module Integration
• FoundryVTT Core System (v11+)
• DnD5e Game System (v3.0+)
• Tabulanil Sanity Module
b. Feature Components
• Sanity Calculator
• Actor Sheet Integration
• Token HUD Integration
• Chat Message System
• Attribute Change Observer
Component Relationships
Use the following connection types:
• Double lines: API integration points
Implementation Details
Specific connections for:
• Mental attribute observers to sanity calculator
• Token HUD modifications
• Actor sheet extensions
• Chat message template rendering
• Localization system integration
Key Workflows
Main workflows:
• Sanity calculation from mental attributes
• Sanity value updates
• Insanity state changes and notifications
• Token HUD interaction flow
Technical Elements
Technical aspects:
• Module initialization process
• Hook registration points
• Template rendering system
• Style injection (styles/tabulanil-sanity.css)
Remember to show the module's boundaries clearly to distinguish between existing FoundryVTT functionality and the new features added by this module.