Overview
WeakAuras is built as a modular framework for World of Warcraft that provides a powerful system for creating custom interface displays. Understanding its architecture will help you create more effective and efficient auras.Core Components
The WeakAuras framework consists of several key components that work together:Displays
Visual elements that appear on screen (icons, bars, text, etc.)
Triggers
Conditions that determine when displays should show or update
Conditions
Dynamic property changes based on game state
Animations
Visual effects and transitions for displays
How WeakAuras Works
Event Registration
WeakAuras registers for game events based on your aura configurations. This efficient system only listens for events that your auras actually need.
Trigger Evaluation
When events fire, WeakAuras evaluates your trigger conditions to determine if auras should show, hide, or update.
WeakAuras uses an optimized scanning system to minimize CPU usage even with many active auras.
Display Updates
If trigger conditions are met, WeakAuras updates the corresponding displays with new data (texture, text, progress, etc.).
Condition Application
Dynamic conditions are applied to modify display properties in real-time based on additional criteria.
Data Flow
Module Structure
WeakAuras is organized into several key modules:Core Module
The main WeakAuras module handles:- Initialization and addon loading
- Event registration and dispatching
- Display lifecycle management
- Data persistence (SavedVariables)
Region Types
Each display type has its own region implementation:Available Region Types
Available Region Types
- Icon - Single texture with cooldown overlays
- AuraBar - Progress bar with text labels
- Text - Dynamic text displays
- Texture - Custom textures and progress textures
- Group - Container for multiple displays
- DynamicGroup - Auto-arranging display groups
- Model - 3D model displays
- StopMotion - Animated texture sequences
Trigger Systems
Multiple trigger types provide flexibility:- BuffTrigger2 - Optimized aura/buff/debuff detection
- GenericTrigger - Handles combat events, status checks, and custom logic
- BossMods - Integration with DBM and BigWigs
Supporting Systems
Profiling
Performance monitoring and CPU usage tracking
Modernize
Automatic updates for old aura formats
Transmission
Import/export and sharing functionality
Performance Optimization
WeakAuras includes several performance optimizations:Conditional Loading
Auras can be configured to load only when needed:Event Filtering
The framework only registers for events that are actually used by active auras.Pooling System
Display frames are recycled rather than constantly created and destroyed:Extension Points
WeakAuras provides several extension points for advanced users:Custom Triggers
Write Lua code for complex trigger logic:Custom Code
Add init, trigger, and animation code:- Init - Runs once when aura loads
- Trigger - Custom trigger evaluation
- Actions - Custom behavior on show/hide/update
Region Type Registration
Developers can create custom region types:Data Storage
WeakAuras stores configuration in SavedVariables:Next Steps
Learn About Displays
Deep dive into display types and configuration
Understanding Triggers
Master the trigger system for precise control
Groups & Organization
Organize multiple displays efficiently
Customization Options
Add animations, conditions, and custom code