Core Concepts

SYNQ Objects

Understanding SYNQ objects and how to work with units, players, and game objects

SYNQ Objects are intelligent tables containing attributes and functions used to easily get information about and interact with units, players, and other objects in game.

All SYNQ objects with an existing underlying unit will have all of the expected attributes and functions available for you to access.

Key Features

  • Static SYNQ objects always available for common units (target, focus, etc.)
    • You can make an amazing routine using mostly these
  • Object lists are filtered arrays of SYNQ objects by type (e.g., enemies, friends, objects) generated and returned each frame they are referenced

Accessing Object Data

We access attributes by referencing them, and functions by calling them.

Attribute Example

target.hp

Function Example

target.isUnit(focus)

Common Attributes

SYNQ objects provide a wide range of attributes for querying unit information:

Status & Existence

  • object.exists - Returns true if the object exists
  • object.dead - Returns true if the unit is dead
  • object.combat - Returns true if the unit is in combat
  • object.casting - Returns true if the unit is casting
  • object.channeling - Returns true if the unit is channeling
  • object.moving - Returns true if the unit is moving

Classification

  • object.enemy - Returns true if the unit is an enemy
  • object.friend - Returns true if the unit is friendly
  • object.player - Returns true if the unit is a player
  • object.npc - Returns true if the unit is an NPC

Health & Resources

  • object.hp - Returns current health percentage (0-100)
  • object.health - Returns current health value
  • object.healthMax - Returns maximum health value
  • object.power - Returns current primary resource (mana, focus, energy, etc.)
  • object.powerMax - Returns maximum primary resource

Positioning

  • object.distance - Returns distance from player to object
  • object.meleeRange - Returns true if object is in melee range
  • object.facing - Returns true if player is facing the object
  • object.los - Returns true if player has line of sight to object

Combat Info

  • object.threat - Returns threat percentage on the object
  • object.aggro - Returns true if player has aggro on the object
  • object.ttd - Returns estimated time to die in seconds

Common Functions

SYNQ objects provide powerful functions for advanced queries:

Unit Comparison

  • object.isUnit(otherObject) - Returns true if both objects are the same unit

Buff & Debuff Tracking

  • object.buffRemains(spellID, source) - Returns remaining duration of a buff in seconds
  • object.buffStacks(spellID, source) - Returns stack count of a buff
  • object.debuffRemains(spellID, source) - Returns remaining duration of a debuff in seconds
  • object.debuffStacks(spellID, source) - Returns stack count of a debuff

Movement & Direction

  • object.movingToward(target, options) - Returns true if object is moving toward target
    • options.angle - Cone angle for direction check
    • options.duration - How long the movement must persist

Cast Information

  • object.castTarget - Returns the destination target of a spell cast as a SYNQ object
  • object.castID - Returns spell ID being cast
  • object.castRemains - Returns time remaining on current cast
  • object.castPct - Returns cast completion percentage

Empty Objects

Empty objects are a shell, containing only isUnit. They are only generated by functions which generate an object when there is no relevant underlying object:

  • object.castTarget - Returns the destination target of a spell cast as a SYNQ object
  • object.target - Returns the object's target as a SYNQ object

Tip: This is so you can always rule out things like object.castTarget.isUnit(healer) without the need to redundantly check for existence of the castTarget.

Existence Checking

Always check if an object exists before querying its data. Most boolean attributes like object.enemy or object.friend also prove existence when they return true.

Good existence checks:

  • object.exists - Explicit existence check
  • object.enemy - Checks existence AND confirms enemy status
  • object.combat - Checks existence AND confirms in combat

Avoid these patterns:

  • Negated booleans like not object.combat don't prove existence
  • Number comparisons like object.hp < 30 may fail gracefully but won't work as intended without existence check first

Next: Learn how to create and use Spell Objects for your rotations.