synq.boss is the read-only encounter API for rotations. It normalizes boss-mod events into encounter state and classifies curated spell timers as semantic mechanics such as raid damage, tank busters, movement, adds, interrupts, and dispels.
The current adapter is validated against BigWigs v424.7. Rotation code is provider-independent and does not access BigWigs, the encounter engine, or the mechanic analyzer directly.
No separate SYNQ setting is required. With the current adapter, BigWigs must be installed and enabled for timer data to be available.
Call syntax: Use dot syntax, such as synq.boss.TimeTo(...). These are namespace functions, not colon methods.
local boss = synq.boss
local mechanics = boss.mechanics
if boss.IsIncoming(mechanics.RAID_DAMAGE, 5) then
-- Prepare a defensive or healing cooldown.
end
if boss.IsIncoming(mechanics.MOVEMENT, 2) then
-- Avoid starting a long cast.
end
local tankBuster = boss.GetNext(mechanics.TANK_BUSTER)
if tankBuster then
local remaining = boss.TimeTo(mechanics.TANK_BUSTER)
end
Always use the constants instead of spelling mechanic strings manually.
| Constant | Value | Meaning |
|---|---|---|
synq.boss.mechanics.TANK_BUSTER | "tank_buster" | Heavy tank-targeted damage |
synq.boss.mechanics.RAID_DAMAGE | "raid_damage" | Group-wide damage |
synq.boss.mechanics.ADDS | "adds" | Additional enemies spawning or becoming active |
synq.boss.mechanics.MOVEMENT | "movement" | Mechanic likely to require movement |
synq.boss.mechanics.INTERRUPT | "interrupt" | Important interrupt opportunity |
synq.boss.mechanics.DISPEL | "dispel" | Important dispel requirement |
synq.boss.mechanics.INTERMISSION | "intermission" | Encounter phase transition or downtime |
Returns a snapshot of the current encounter, or nil outside an encounter.
local encounter = synq.boss.GetEncounter()
if encounter then
print(encounter.id, encounter.name, encounter.stage)
end
Returned fields:
| Field | Type | Description |
|---|---|---|
id | number | Encounter ID |
name | string | nil | Encounter name |
difficultyID | number | nil | Instance difficulty ID |
groupSize | number | nil | Encounter group size |
stage | number | nil | Current stage reported by the provider |
provider | string | Active provider ID, such as "bigwigs" |
startedAt | number | GetTime() value when the encounter started |
Returns the current encounter stage, or nil when no stage is known.
local stage = synq.boss.GetStage()
Returns the next timer for a spell ID, including timers without a registered semantic mechanic. Returns nil when no matching timer exists.
local timer = synq.boss.GetTimer(1242515)
if timer then
local remaining = timer.paused
and timer.remaining
or math.max(0, timer.expiresAt - synq.time)
if remaining <= 5 then
-- Spell is expected within 5 seconds.
end
end
Returns the next active timer matching a semantic mechanic, or nil.
local timer = synq.boss.GetNext(synq.boss.mechanics.ADDS)
Returns seconds until the next matching mechanic. Returns math.huge when no matching timer exists, so direct comparisons are safe.
if synq.boss.TimeTo(synq.boss.mechanics.TANK_BUSTER) <= 3 then
-- Prepare mitigation.
end
Returns whether the next matching mechanic occurs within the supplied number of seconds. Invalid or negative windows return false.
local incoming = synq.boss.IsIncoming(
synq.boss.mechanics.INTERRUPT,
2
)
Returns analyzed timers occurring within the supplied number of seconds, sorted from soonest to latest. Unknown raw timers are excluded; query those with GetTimer(spellID).
local upcoming = synq.boss.GetUpcoming(10)
for index = 1, #upcoming do
local timer = upcoming[index]
local remaining = math.max(0, timer.expiresAt - synq.time)
print(timer.primaryMechanic, remaining)
end
All timer query functions return a snapshot. Changing it does not change encounter state.
| Field | Type | Description |
|---|---|---|
id | string | Provider-normalized timer identity |
generation | number | Timer occurrence generation |
encounterID | number | nil | Encounter ID |
moduleID | string | nil | Provider module identity |
spellID | number | nil | Spell ID when available |
key | number | string | nil | Provider timer key |
label | string | nil | Provider timer label |
icon | number | string | nil | Provider icon value |
count | number | nil | Occurrence count when available |
duration | number | Original timer duration in seconds |
expiresAt | number | nil | Absolute GetTime() expiry while active; nil while paused |
remaining | number | nil | Frozen seconds remaining while paused; nil while active |
paused | boolean | Whether the timer is paused |
approximate | boolean | Whether the provider marked timing approximate |
timerType | string | Normalized timer type, such as "cooldown", "target", or "cast" |
eventID | number | string | nil | Provider event identity when available |
stage | number | nil | Stage when the timer was created |
provider | string | Provider ID |
mechanics | table | nil | All semantic mechanic classifications |
primaryMechanic | string | nil | Primary semantic classification |
synq.boss.internal is reserved for framework modules. Rotations must not register providers, mechanics, or subscribers.
Registers curated spell-to-mechanic rules for an encounter. The primary mechanic must also appear in mechanics. Optional stage and count fields can narrow a rule to one occurrence.
synq.boss.internal.RegisterMechanics(3182, {
{
spellID = 1242515,
mechanics = {
synq.boss.mechanics.RAID_DAMAGE,
},
primaryMechanic = synq.boss.mechanics.RAID_DAMAGE,
},
})
Registers a normalized encounter provider. id and Start are required. priority, IsAvailable, and Stop are optional.
local provider = {
id = "native",
priority = 50,
}
function provider:IsAvailable()
return true
end
function provider:Start(emit)
self.emit = emit
return true
end
function provider:Stop()
self.emit = nil
end
synq.boss.internal.RegisterProvider(provider)
Providers send normalized events through the emit callback passed to Start:
| Event type | Purpose |
|---|---|
encounter_start | Begin encounter state |
encounter_end | End encounter state and clear timers |
stage | Update encounter stage |
timer_start | Add or replace a normalized timer |
timer_stop | Stop matching timers |
timer_pause | Pause matching timers |
timer_resume | Resume matching timers |
reset | Clear timers for a module or provider lifecycle reset |
self.emit({
type = "timer_start",
timerID = "native|example|1242515",
encounterID = 3182,
moduleID = "example",
spellID = 1242515,
label = "Voidlight Convergence",
duration = 12,
timerType = "cooldown",
})
Re-evaluates provider availability and priority.
synq.boss.internal.RefreshProviders()
Subscribes a framework callback to normalized encounter changes. Returns an unsubscribe function.
local unsubscribe = synq.boss.internal.Subscribe(function(change)
print(change.type, change.timer, change.encounter)
end)
unsubscribe()
Possible change types include provider changes, encounter lifecycle changes, stage changes, timer changes, and resets.
Next: Browse Debug Commands for inspecting framework state.