Overview
WeakAuras uses several data structures to store aura configuration, trigger states, and runtime information.
Core Tables
WeakAurasSaved
The main SavedVariables table containing all persistent data.
All aura configurations, keyed by aura ID
Registered aura information
Minimap icon configuration
Time in seconds to squelch actions after login (default: 10)
local db = WeakAurasSaved
for id, auraData in pairs(db.displays) do
print("Aura:", id)
end
Aura Data Structure
Each aura in WeakAurasSaved.displays has the following structure:
Core Properties
Unique identifier for the aura
Universal unique identifier
Region type: “icon”, “text”, “progresstexture”, “model”, “group”, “dynamicgroup”
Parent group ID if this aura is in a group
Wago.io URL if imported from Wago
Trigger Configuration
Array of trigger configurations
data.triggers = {
[1] = {
trigger = {
type = "aura2",
subeventPrefix = "SPELL",
event = "Health",
unit = "player",
-- ... trigger-specific settings
},
untrigger = {
-- Untrigger configuration
}
}
}
Actions
Actions to perform on different events
data.actions = {
init = {
do_custom = false,
custom = "",
},
start = {
do_sound = false,
sound = "",
do_custom = false,
custom = "",
do_message = false,
message = "",
},
finish = {
do_sound = false,
sound = "",
do_custom = false,
custom = "",
}
}
Conditions
Array of condition configurations
data.conditions = {
[1] = {
check = {
trigger = 1,
variable = "show",
value = 1
},
changes = {
[1] = {
property = "alpha",
value = 0.5
}
}
}
}
Load Conditions
Load conditions determining when the aura is loaded
data.load = {
use_never = false,
use_class = true,
class = {
single = "DEATHKNIGHT",
multi = {}
},
use_spec = true,
spec = {
single = 1,
multi = {}
},
size = {
multi = {}
}
}
Trigger State Structure
Trigger states contain the current runtime state of a trigger.
Common State Properties
Whether the aura should be shown
Whether the state has changed
Progress type: “timed” or “static”
Timed Progress Properties
Total duration in seconds
GetTime() value when the timer expires
Whether to auto-hide on expiration
Whether the timer is paused
Remaining time when paused
Whether to display progress inversely
Static Progress Properties
Display Properties
Icon texture path or spell ID
Unit Tables
WeakAuras provides pre-populated unit tables for common use cases.
Raid Units
WeakAuras.raidUnits = {
[1] = "raid1",
[2] = "raid2",
-- ... up to raid40
}
Party Units
WeakAuras.partyUnits = {
[1] = "party1",
[2] = "party2",
[3] = "party3",
[4] = "party4"
}
Pet Units
WeakAuras.petUnitToUnit = {
pet = "player",
raidpet1 = "raid1",
partypet1 = "party1",
-- ...
}
WeakAuras.unitToPetUnit = {
player = "pet",
raid1 = "raidpet1",
party1 = "partypet1",
-- ...
}
Region Tables
Private.regions
Table of all active regions.
local Private = select(2, ...)
for id, regionData in pairs(Private.regions) do
local region = regionData.region
local regionType = regionData.regionType
print(id, regionType)
end
Private.regionTypes
Registered region type definitions.
Function to create a new region
Function to modify an existing region
Default configuration values
Region properties for conditions
local iconType = Private.regionTypes["icon"]
if iconType then
local defaults = iconType.default
print("Default width:", defaults.width)
end
Trigger System Tables
Private.triggerTypes
Maps trigger types to their handler systems.
local Private = select(2, ...)
local triggerSystem = Private.triggerTypes["aura2"]
if triggerSystem then
-- BuffTrigger system
end
Animation Tables
Private.anim_presets
Pre-defined animation configurations.
local presets = Private.anim_presets
local fadeAnim = presets.fade
-- {
-- type = "custom",
-- duration = 0.25,
-- use_alpha = true,
-- alpha = 0
-- }
See Also