$ show Hekili/hekili
Hekili is a World of Warcraft addon that provides real-time ability recommendations for all DPS and tank specializations. It uses a custom engine that parses SimulationCraft Action Priority Lists (APLs) to evaluate game stateβauras, cooldowns, resources, talentsβand suggest the next best spell. The addon is modular, with per-expansion data folders (The War Within, Dragonflight, Shadowlands, etc.) and per-spec Lua files that register abilities, talents, auras, gear, and state expressions. It includes a custom condition compiler, a resource prediction system, and sophisticated combat log tracking to simulate upcoming events. The project has been discontinued due to Blizzard API changes, making future updates impossible. The architecture follows an event-driven singleton pattern: a core engine (Events.lua, State.lua, Utils.lua) manages game state, while each specialization module hooks into it via a factory pattern (Hekili:NewSpecialization). High craftsmanship is evident in the condition compiler that transforms SimC conditions into sandboxed Lua functions, the resource prediction framework using interval-based regeneration models, and the skeleton generator that auto-creates spec files from live game data. The codebase is large and includes legacy support for multiple expansions, but the core patterns are reusable and well-isolated. Key external dependencies are the WoW API, Ace3 libraries (AceAddon, AceGUI, AceConsole), LibStub, and SimulationCraft APL files. The UI features custom widgets like a syntax-highlighted APL editor and a popup slider. While the addon works for the current expansion (The War Within Patch 11.2), its maintenance is effectively frozen, and some logic contains TODO comments or hardcoded spell IDs that require regular updates.
The LLM identified 4 files worth highlighting for reuse:
Implements a domain-specific condition parser that converts SimulationCraft condition strings (with operators like `!`, `abs`, arithmetic) into Lua expressions. The compiler uses `gsub` patterns for rewriting and sandboxes execution via `setfenv` and `loadstring`. This pattern is easily reusable for any game simulation engine that needs to evaluate user-provided conditions in a constrained environment.
Demonstrates a resource prediction pattern using `RegisterResource` with `last()`, `interval()`, and `value()` methods. It models resource regeneration (energy, rage, focus) by tracking recent income events and predicting future availability. This pattern is reusable for any game or simulation that needs to forecast resource pools based on historical ticks or gains.
The skeleton generator (`Hekili:HandleSkeletonCommand`) automatically creates a full specialization file (talents, auras, abilities, cooldowns) by querying the player's current game state. It handles talent choice nodes with ambiguous spell IDs via custom suffix configurations. This tool reduces manual data entry and ensures consistency across spec files; the pattern of generating boilerplate from live data is reusable in any data-driven addon or tool.
A custom AceGUI-3.0 widget that provides a multiline edit box with Lua syntax highlighting (keywords, strings, comments) and auto-indentation. It is self-contained, uses no internal Hekili modules, and can be extracted and deployed in any Ace3-based addon that needs a code editor. The highlighting logic uses string patterns to colorize tokens, demonstrating non-obvious Lua UI craftsmanship.