# Azeroth Survivors Reborn
> A free survivors-style action roguelite in the world of Azeroth. Solo or co-op in groups of up to five. Download for Windows or play in the browser.
Canonical Origin: https://azreborn.com/
## LLM Resources
- [Full Content](https://azreborn.com/llms-full.txt): Complete page content in markdown format.
---
- **Page:** Guides · Azeroth Survivors Reborn
- **Source:** https://azreborn.com/guides
- **Description:** Guides for Azeroth Survivors Reborn, for players and addon authors, each also as plain Markdown for AI tools.
```yaml
meta:
og:image: https://azreborn.com/site-art/hero.webp
og:image:alt: A hero of Azeroth Survivors Reborn in a storm of frost and blood
og:image:height: "690"
og:image:width: "950"
```
# Guides
For players and for addon authors. Every guide also comes as plain Markdown and as a prompt for your AI assistant.
Addon API
Write addons and whole interfaces for Azeroth Survivors Reborn: the run's tables and functions, the HUD switches, the meter, world anchors and combat text, and the server's addon lines.
[Addon API](https://azreborn.com/guides/addon-api)
For AI tools: [llms.txt](https://azreborn.com/llms.txt) (the index) and [llms-full.txt](https://azreborn.com/llms-full.txt) (every guide's whole text).
```json
{"@context":"https://schema.org","@graph":[{"@id":"https://azreborn.com/#website","@type":"WebSite","description":"A free survivors-style action roguelite in the world of Azeroth. Solo or co-op in groups of up to five. Download for Windows or play in the browser.","name":"Azeroth Survivors Reborn","url":"https://azreborn.com/","publisher":{"@id":"https://azreborn.com/#identity"}},{"@id":"https://azreborn.com/guides#webpage","@type":"WebPage","description":"Guides for Azeroth Survivors Reborn, for players and addon authors, each also as plain Markdown for AI tools.","name":"Guides","url":"https://azreborn.com/guides","isPartOf":{"@id":"https://azreborn.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://azreborn.com/guides"]}],"primaryImageOfPage":{"@id":"https://azreborn.com/#logo"}},{"@id":"https://azreborn.com/#identity","@type":"Organization","name":"Azeroth Survivors Reborn","url":"https://azreborn.com","logo":{"@id":"https://azreborn.com/#logo"},"sameAs":["https://discord.gg/PAkjPpryPP"]},{"@id":"https://azreborn.com/#logo","@type":"ImageObject","caption":"Azeroth Survivors Reborn","contentUrl":"https://azreborn.com/logo.webp","inLanguage":"en","url":"https://azreborn.com/logo.webp"}]}
```
---
- **Page:** Addon API · Azeroth Survivors Reborn
- **Source:** https://azreborn.com/guides/addon-api
- **Description:** Write addons and whole interfaces for Azeroth Survivors Reborn: the run's tables and functions, the HUD switches, the meter, world anchors and combat text, and the server's addon lines.
```yaml
meta:
og:image: https://azreborn.com/site-art/hero.webp
og:image:alt: A hero of Azeroth Survivors Reborn in a storm of frost and blood
og:image:height: "690"
og:image:width: "950"
```
# Addon API
[Markdown](https://azreborn.com/guides/addon-api.md)
Write addons and whole interfaces for Azeroth Survivors Reborn: the run's tables and functions, the HUD switches, the meter, world anchors and combat text, and the server's addon lines.
Addons written for the original Azeroth Survivors (its 1.12.1 client) run on this 3.3.5a rebuild: the run's interface ships an addon, `AzerothSurvivorsAPI`, that speaks the original game's addon API on top of our server's lines, and the client loads `## Interface: 11200` addons as current. The first target is Survivor UI (`SurvivorUI` and `SurvivorPlates`, GPL-3.0, by morderous); we do not ship it, players put it into `Interface\AddOns` themselves.
The original's sources this ports, in the repository: `re/lua/747dd40.lua` (the run API), `re/lua/70e7120.lua` (the version 1 meter API) and `re/lua/77fbc78.lua` (the character pane's `AZS` line).
---
## 1. How a 1.12 addon loads
- **The gate.** A manifest that says `## Interface: 11200` loads as current, with "Load out of date AddOns" ticked or not ( `engine/benilla/crates/benilla-ui/src/script/addon_gate.rs`, `ORIGINAL_GAME_INTERFACE`). Every other interface keeps the 3.3.5a verdict: below 20000 is `INCOMPATIBLE`, anything but 30300 is `INTERFACE_VERSION` while the version check is on.
- **The 1.12 shapes, per addon** ( `AzerothSurvivorsAPI/Shims.lua`). A 1.12 addon is one whose `## Interface` is below 20000. Only code in such an addon's files gets the 1.12 shapes; ours, `AzerothSurvivorsUI`, Ace3 and the stock interface see the 3.3.5a API unchanged. Which file called is read off the Lua stack ( `debugstack`), and each folder's `## Interface` is asked by name ( `GetAddOnMetadata(folder, "Interface")`) the first time it comes up. What a 1.12 addon gets:
- script handlers in the 1.12 convention: `this`, `event` and `arg1..arg9` set around every handler it sets with `SetScript` or `HookScript`; a script it reads back with `GetScript` may be called with no arguments;
- `ChatFrame_OnEvent`, `FCF_FlashTab` and `ActionButton_Update` callable the 1.12 way (no `self`), and a 1.12 replacement of one of them reached by the stock callers with `this` set;
- `UnitBuff(unit, i)` -> `texture, count` and `UnitDebuff(unit, i)` -> `texture, count, debuffType`;
- the 1.12 combat chat events, written from `COMBAT_LOG_EVENT_UNFILTERED` in 1.12's English sentences, to the frames that register them: `CHAT_MSG_COMBAT_SELF_HITS`, `_SELF_MISSES`, `_PET_HITS`, `_PET_MISSES`, `_CREATURE_VS_SELF_HITS`, `_CREATURE_VS_SELF_MISSES`, `_HOSTILE_DEATH`, `CHAT_MSG_SPELL_SELF_DAMAGE`, `_PET_DAMAGE`, `_CREATURE_VS_SELF_DAMAGE`, `_PERIODIC_CREATURE_DAMAGE`, `_PERIODIC_SELF_DAMAGE`, `_DAMAGESHIELDS_ON_SELF`.
- For everyone: `ShowNameplates`, `HideNameplates`, `ShowFriendNameplates` and `HideFriendNameplates` over the `nameplateShowEnemies` / `nameplateShowFriends` CVars.
- **Our interface stands aside.** With `SurvivorUI` enabled and loadable for the character, `AzerothSurvivorsUI` (our replacement of the stock frames) turns itself off as it does for ElvUI, KkthnxUI and TukUI, and answers `IsAddOnLoaded("AzerothSurvivorsUI")` with nil so the run's addon draws its own panels again ( `ui/AddOns/AzerothSurvivorsUI/Core/Conflicts.lua`). The run's HUD ( `AzerothSurvivors`) stays; Survivor UI puts parts of it away with `AZS_SetHudShown`.
## 2. The addon
`ui/AddOns/AzerothSurvivorsAPI` (`## Interface: 30300`, depends on `AzerothSurvivors`, saved variables `AZS_API_HUD`). Its files, in load order:
| File | What it gives |
| --- | --- |
| `CombatText.lua` | The combat text feed: the hero's hits with a world anchor each (first, so its combat log frame sees a hit before `Shims.lua` fires its 1.12 chat line). |
| `Shims.lua` | The 1.12 shapes above. |
| `Api.lua` | The run API: the tables, the `*_UPDATED` stamps and the functions of `re/lua/747dd40.lua`. |
| `Hud.lua` | `AZS_SetHudShown` / `AZS_IsHudShown` over our HUD, `AZS_SetOnTopOfScreens`. |
| `Meter.lua` | The version 1 meter API (`re/lua/70e7120.lua`). |
| `Anchors.lua` | The world anchors: `AZS_GetWorldAnchors`, `AZS_ProjectWorldAnchors`, the downed friends. |
The server's lines reach every addon through our router (`AZS.On(prefix, fn)` in `AzerothSurvivors/Core.lua`, one `CHAT_MSG_ADDON` frame); `Api.lua`'s handlers are registered after our own, so each runs once ours has put its table in place. Our addon replaces a table on every line: read the global each time, never keep a reference.
## 3. The tables
Every value a line carries is a number where it parses as one. Each table has a stamp `
_UPDATED` (`GetTime()` of its last line).
| Table | From | Shape |
| --- | --- | --- |
| `AZS_ZONE` | `AZSZONE` | `run` (see 6.), `map`, `zone` (the zone's key), `len` (run seconds to the final boss), `class`, `race` (keys), `mw`, `mh` (the zone map's size in yards), `dt`, `diff` (difficulty tier from 0 and name), `aff`, `zname`, `zsub`, `heroic` (the Heroic level, 0 normal), `affixes`, `hub` (1 in a social hub, which is no run), `cname`, `rname` (class and race names in the player's language), `hero` (the hero's name), `gender` (0 male, 1 female). |
| `AZS_RUN` | `AZSRUN` | The run bar: `t` (run seconds), `ph` (`ready`, `playing`, `choosing`, `paused`, `dead`, `victory`), `sl` (level-ups stored), `lvl`, `kills`, `gold`, `cache`, `hp`, `hpm`, `xp`, `xpn`, `rr`, `endless`, `sh`, `rrc`, `chest`, `nbn`, `lives`, `endl`, `won`; the original's tally `ek`, `gk`, `bk`, `ck` (elites, guardians, bosses slain, caches opened), `ge` (gold earned), `dealt`, `taken`; the field `en` (enemies alive), `el` (elites alive), `ga`, `gu` (guardians awake, lairs held), `lairs`; the schedule `bs`, `bt` (bosses slain of all), `fin` (the final boss's run second), `left` (seconds to it, -1 once up or in endless play), `nb` (seconds to the next boss, -1 for none or on the rift bar); `px`, `py`, `pf` (the hero's place and facing); `proc`, `pv`, `pm` (the class proc meter's spell, value and full, while one is known); `quit`, `rift`. |
| `AZS_STATS` | `AZS` | The original character pane's numbers, see 5. (Our own `AZSSTATS` is `AZS_RUNSTATS`.) |
| `AZS_SCHEDULE` | `AZSBOSSES` | `{ index, at, name, final, state }` a boss; `at` its run second, `state` `due`, `up` or `dead`. |
| `AZS_UNITS` | `AZSUNITS` | `{ kind, id, name, hp, hpm, state }` a boss alive; `kind` `boss`, `final` or `rift`, `id` the low 24 bits of its guid, `state` 1 enraged (see 7.). |
| `AZS_SPELLS` | `AZSSPELLS` | `{ key, spell, rank, cd, cdmax }` a spell known. |
| `AZS_BUFFS` | `AZSBUFFS` | `{ spell, left }`; `left` counts from `AZS_BUFFS_UPDATED`. |
| `AZS_CHESTS` | `AZSCHESTS` | `{ id, x, y, z, mx, my, boss }` a cache standing, plus `runId`, `mapId`, `spaceId`. |
| `AZS_LAIRS` | `AZSLAIRS` | `{ index, state, name, id, left, x, y, z, mx, my, flag, hp, hpm }`; `state` `empty`, `asleep`, `awake`; `left` the seconds until an empty lair fills; `flag` 1 on the one the minimap points at; `hp`, `hpm` its guardian's (0 empty); plus `active`, `runId`, `mapId`, `spaceId`. |
| `AZS_REVIVE` | `AZSREVIVE` | `{ down, share, by, reviving, rshare, friends }`. |
| `AZS_END` | `AZSEND` | The end screen: `result`, `t`, `lvl`, `kills`, `elites`, `guardians`, `bosses`, `dealt`, `taken`, `gold`, `caches`, `dt`, `diff`, `dupgold`, `loot`, `txp`, the original's `dmg`, `chests`, `endl`, and `rift`, `quit` when they apply. |
| `AZS_PETS` | `AZSPETS` | `{ id, entry, key, kind, ends, dur, icon, name }`, see `AZS_GetSummons`. |
| `AZS_TOTEMS` | `AZSTOTEMS` | `{ key, spell, count, cap, ends, dur, icon, name }` a kind of totem. |
| `AZS_TIMERS` | `AZSTIMERS` | `{ name, icon, kind, ready, wait }` a talent clock. |
| `AZS_METER`, `AZS_HEALING`, `AZS_BOSSMETER` | `AZSMETER`, `AZSHEAL`, `AZSBOSSDMG` | `{ name, dmg, dps, share, proc, spell }`, the most first; `spell` (ours) the spell id. |
| `AZS_PARTY` | `AZSPARTY` | `{ name, class, dmg, dps, share, top, topdps }` a hero, co-op only. |
| `AZS_TAKEN` | `AZSTAKEN` | `{ source, dmg }`, the most first. |
| `AZS_TARGET` | the client | `{ kind, name, id, hp, hpm }`; `kind` `none`, `final`, `boss`, `guardian`, `elite`, `normal`. |
| `AZS_BANNER`, `AZS_BANNERS` | `AZSBANNER` | The last banner and the last `AZS_BANNERS_KEPT` (20): `{ id, kind, boss, name, text, time }`. |
| `AZS_DEBUFFS` | `AZSDEBUFFS` | Ours: `{ id, spell, stacks, secs, name }`, `secs` left as of `AZS_DEBUFFS_UPDATED`. Use `AZS_GetDebuffs` for the original's shape. |
Helpers our addon gives under the original's names: `AZS_GetRunTime()` (the run clock, carried on between lines while the run plays; nil out of a run), `AZS_Fields(msg)` (`k=v;k=v` into a table), `AZS_List(msg, names)` (`a,b;a,b` into rows), `AZS_SendCommand(command)`.
## 4. The functions
### The run (`Api.lua`)
| Function | Returns |
| --- | --- |
| `AZS_GetPhase()` | `AZS_RUN.ph`, nil out of a run and in a hub. |
| `AZS_GetRunLength()` | Run seconds to the final boss. |
| `AZS_GetRunSummary()` | `AZS_END` once the run ended, else nil. |
| `AZS_GetRevive()` | `AZS_REVIVE`. |
| `AZS_GetDebuffs(id)` | `{ spell, name, icon, stacks, duration, remaining, permanent, dispelType }` on a boss or guardian; `remaining` off the run clock. |
| `AZS_GetBosses()` | `{ id, name, hp, hpm, final, enraged, debuffs }` a boss alive. |
| `AZS_GetGuardians()` | `{ id, name, hp, hpm, awake, debuffs }` a guardian holding a lair. |
| `AZS_GetUpcomingBosses()` | `{ index, name, at, left, final }` a boss still due. |
| `AZS_GetSummons(which)` | `{ id, entry, key, kind, name, icon, permanent, duration, remaining }` a summon, in the order they came; `which` a key or a kind. `key` is the pet's word in our packs (`imp`, `spirit_wolf`, `treant`, `gargoyle`); `kind` is the key for a demon and `pet` for the rest. |
| `AZS_GetSummonCount(which)` | How many. |
| `AZS_GetSummonGroups()` | `{ key, kind, name, icon, count, permanent, temporary, remaining }` a kind, and the count of all. |
| `AZS_GetTotems(which)` | `{ key, spell, name, icon, count, cap, duration, remaining }` a kind standing. |
| `AZS_GetTotemCount(which)` | How many totems stand. |
| `AZS_GetTimers(name)` | `{ name, icon, kind, duration, remaining, ready }` a talent clock; `kind` `summon` or `cooldown`. |
| `AZS_GetMeter()` | `AZS_METER`, its total, the total per run second. |
| `AZS_GetHealing()`, `AZS_GetBossMeter()`, `AZS_GetPartyMeter()` | The lines, their total and their summed rate (`AZS_MeterTotals(lines)`). |
| `AZS_GetLairs()` | `AZS_LAIRS` with `active`. |
| `AZS_GetFlaggedLair()` | The lair the minimap points at, or nil. |
| `AZS_SpaceOf(map, run)`, `AZS_TagSpace(list)` | The original's coordinate space ids (`m