Skip to content

Developer & Technical Documentation

Joe edited this page Jun 8, 2026 · 4 revisions

Architecture

The addon is structured into several key directories:

  • Epithet.toc: The addon manifest.
  • core/: Contains the main logic, including enumeration, scanning, data join logic, filtering logic, and saved variable management.
  • UI/: Contains the interface components for the browser frame, detail view, sidebar, and title list.
  • data/: Contains the generated static title database (Titles.lua) because the in-game API is limited.
  • icons/: Contains custom icons for categories, factions, and rarity tiers.
  • Locales/: Contains localization strings (e.g., enGB.lua).

WoW API Limitations

The World of Warcraft API for titles is quite limited:

  • GetNumTitles() returns the highest title ID, but the IDs are sparse with gaps.
  • GetTitleName(titleId) returns the name, with trailing spaces indicating whether it's a prefix or suffix.
  • IsTitleKnown(titleId) returns a boolean if the character has earned it.
  • SetCurrentTitle(titleId) is Protected and must originate from a hardware event (like a button click).

The API does not provide rarity, source, or expansion information. This is why Epithet relies on a static data table.

Build Scripts

The scripts/ directory contains PowerShell scripts to help with development:

  • link-addon.ps1: Symlinks the repository to your WoW Interface/AddOns directory for easy testing.
  • unlink-addon.ps1: Removes the symlink.
  • fetch-libs.ps1: Downloads the necessary Ace3 libraries into the libs/ directory.
  • build.ps1: Packages the addon for distribution.

Title Data Generation

Because the in-game API lacks details on title sources and rarity, Epithet uses a static database. The tools/ directory (once populated) contains a Node.js script (generate-titles.js) to generate data/Titles.lua. Rarity overrides can be specified in the generator to adjust the default heuristic.

Saved Variables

User settings and filters are saved using AceDB-3.0. The default profile structure (defined in core/Epithet.lua) includes:

  • filters: Contains current selections for search, status, rarity, category, expansion, etc.
  • sort: The active sorting method (e.g., collectedFirst, alphabetical, expansion).
  • obtainableOnly: Boolean state for the obtainable-only filter.

Clone this wiki locally