API v2
Kerzo Quest Expansion Library & Public Engine

Kerzo Quest Expansion Public API

Comprehensive technical documentation for World of Warcraft addon developers. Integrate accurate quest expansion data, official crest textures, atmospheric parchment background tinting, and zero-maintenance settings synchronization into your own interface.

Global Namespace & Multi-Language Architecture

KQE exposes its entire interface through the global table _G.KerzoQuestExpansion. For code invocation, international developers use canonical English methods (e.g. API.GetQuestExpansion), while native Spanish aliases (e.g. API.ObtenerExpansionMision) are provided for internal Kerzo architecture compatibility.

10 Official Blizzard Languages (12 Locales): In full accordance with the Kerzo Development Architecture (arquitectura_desarrollo.md), all strings, UI elements, expansion names, tooltips, and data returned via API.GetLocalizedText() natively support enUS, enGB, esES, esMX, deDE, frFR, itIT, ptBR, ruRU, koKR, zhCN, and zhTW with zero CPU idle in background.

1. Dual Operation Model (Standalone vs Library)

KQE is engineered to behave either as an autonomous player-facing addon or as a silent underlying data engine for host addons (like Kerzo Classic Quest Log, quest trackers, or custom UI replacements).

Capability Standalone Mode Library Mode (Embedded)
Blizzard Settings Category Active (Registered under AddOns) Disabled / Hidden automatically
Default QuestLog Injection Active (hooks native Blizzard log) Suspended (Host addon controls rendering)
NPC Gossip & Quest Dialog Tint Active (tints default dialogs) Delegated to host addon
Public Global API Active Active
Addon List Display Title Kerzo Quest Expansion Kerzo Quest Expansion [Library]

2. API Versioning Contract & Retrocompatibility

To ensure third-party addons never break when KQE introduces internal updates or signature changes, KQE incorporates an explicit version handshake contract.

When loading KQE, host addons can query API:GetAPI(requiredMajorVersion). If KQE advances to future major versions, compatibility wrappers ensure older signatures remain 100% operational.

Lua — Canonical Handshake
local KQE_ROOT = _G.KerzoQuestExpansion
if not KQE_ROOT then return end

-- 1. Request API v2 explicitly:
local KQE = KQE_ROOT:GetAPI(2)
if not KQE then
    print("[MyAddon] Incompatible KQE version installed.")
    return
end

-- 2. Switch KQE to library mode so it subordinates cleanly:
KQE:SetLibraryMode(true)

-- 3. Consume API methods safely:
local expKey, name, logo = KQE:GetQuestExpansion(questID)

3. Mode Control Methods

GET KQE:IsLibraryMode()
▼

Returns whether KQE is currently subordinated as a passive data engine.

Returns: boolean — true if in library mode, false if in standalone mode.
SET KQE:SetLibraryMode(active)
▼

Enables or disables library mode. Disables Blizzard settings panels and default Blizzard UI hooks when true.

  • active boolean Enable library mode (true) or restore standalone mode (false).
Returns: void
GET KQE:IsStandaloneMode()
▼

Inverse of IsLibraryMode().

Returns: boolean
GET KQE:IsHostAddonActive()
▼

Checks if a recognized companion addon (e.g. Kerzo Classic Quest Log) is active in the current session.

Returns: boolean

4. Quest Identification & Cromatics

QUERY KQE:GetQuestExpansion(questID)
▼

Identifies which expansion or era a quest belongs to across 73,000+ indexed quests and 28 eras.

  • questID number The numeric identifier of the quest.
Returns: (key: string, name: string, logoPath: string, aspectRatio: number, expId: number)
• key: Canonical expansion identifier (e.g. "TWW", "MIDNIGHT", "FOREVER", "WOTLK")
• name: Localized name (e.g. "The War Within")
• logoPath: Full texture file path for the official crest
• aspectRatio: Width-to-height ratio (e.g. 2.55, 1.39) to prevent texture distortion
• expId: Internal numeric catalogue index
Example Usage
local key, name, logo, ratio = KQE:GetQuestExpansion(78522)
if logo then
    myTexture:SetTexture(logo)
    myTexture:SetSize(22 * ratio, 22)
end
COLOR KQE:GetExpansionColor(expansionKey)
▼

Retrieves the active RGB normalized floats and hex string for the requested expansion.

  • expansionKey string Expansion canonical key (e.g. "TWW", "LEGION").
Returns: (r: number, g: number, b: number, hex: string, key: string)
UI KQE:GetExpansionMarker(questID)
▼

Generates a formatted text bullet for quest listings (e.g. "|cffeb7a1f•|r " or "|cff99e6f2∞|r " for WoW Forever).

Returns: string — colored bullet with trailing space, or empty string if disabled.

5. Parchment & Dialogue Background Tinting

TINT KQE:ShouldTintQuest(questID)
▼

Evaluates whether a quest should have background atmospheric tinting according to user settings and presets.

Returns: (shouldTint: boolean, r: number, g: number, b: number, opacity: number, key: string)
Example Usage
local shouldTint, r, g, b, alpha = KQE:ShouldTintQuest(questID)
if shouldTint then
    parchmentBg:SetColorTexture(r, g, b, alpha)
    parchmentBg:Show()
else
    parchmentBg:Hide()
end
PRESET KQE:GetActivePreset()
▼

Returns the currently selected preset filter: "all", "classic", "modern", "none", or "custom".

Returns: string
PRESET KQE:ApplyPreset(presetId)
▼

Applies a predefined tinting filter matrix across all expansions and notifies observers.

  • presetId string One of: "all", "classic", "modern", "none".
Returns: void
COLOR KQE:SetCustomColor(key, r, g, b)
▼

Overrides the official theme color for an expansion with custom RGB floats (0.0 to 1.0).

Returns: void

6. Ready-to-Use UI Badges

UI KQE:CreateExpansionBadge(parentFrame, width, height)
▼

Constructs an interactive button pre-configured with the official expansion texture and dynamic mouseover tooltip.

Returns: Button — frame ready to anchor with badge:SetPoint(...).
UI KQE:UpdateExpansionBadge(badgeFrame, questID)
▼

Updates an existing badge with the given quest's expansion logo, adapting its aspect ratio automatically. Hides the badge if invalid.

Returns: boolean — true if displayed, false if hidden.

7. Dynamic Settings Schema (Zero-Maintenance UI)

KQE provides a complete schema via GetSettingsSchema(). Host addons can loop through this schema to generate check buttons, sliders, and color pickers automatically without writing a single line of boilerplate code when new features are added.

SCHEMA KQE:GetSettingsSchema()
▼

Returns an array of setting field descriptor tables:

Descriptor Structure
{
    clave = "MostrarLogosDetalle",      -- Configuration key
    tipo = "booleano",                  -- "booleano" | "rango" | "seleccion"
    defecto = true,                     -- Factory default
    categoria = "visual",               -- "visual" | "tintado" | "sistema"
    claveTexto = "opt:ShowLogosDetail", -- Localization token
    claveDesc = "opt:desc:ShowLogosDetail"
}
GET KQE:GetOption(key)
▼

Fetches the current live value for any configuration key.

Returns: any
SET KQE:SetOption(key, value)
▼

Updates a configuration key, persists the value, and triggers reactive observer callbacks.

Returns: void

8. Reactive Observer Pattern

Host addons can subscribe to configuration changes without polling or manual reloading.

Lua — Observer Subscription
local function OnKQEConfigChanged(key, newValue, oldValue)
    if key == "TintarFondoExpansion" or key == "OpacidadTinte" then
        MyQuestLog:RefreshParchmentTints()
    elseif key == "MostrarLogosLista" then
        MyQuestLog:RefreshListIcons()
    end
end

-- Subscribe:
KQE:RegisterConfigObserver(OnKQEConfigChanged)

-- Unsubscribe (on addon teardown):
KQE:UnregisterConfigObserver(OnKQEConfigChanged)

9. Localization Engine

In strict accordance with the Kerzo Development Architecture (arquitectura_desarrollo.md), KQE provides complete, native localization across all 10 official Blizzard languages (12 locale variants) using on-demand closure loading with zero CPU idle in background:

Locale Code Language Region / Coverage
enUS / enGBEnglishUnited States / United Kingdom / International
esESEspañol (Castellano)Spain
esMXEspañol (Latino)Latin America / Mexico
deDEDeutschGermany / Austria / Switzerland
frFRFrançaisFrance / Belgium / Canada
itITItalianoItaly
ptBRPortuguêsBrazil / Portugal
ruRUРусскийRussia / CIS
koKR한국어South Korea
zhCN简体中文China (Simplified)
zhTW繁體中文Taiwan / Hong Kong (Traditional)
KQE:GetLocalizedText(token, optLocale) → Returns the translated string for the requested token with automatic resolution cascade (Active Locale → enUS Fallback → GlobalStrings → Token key).

10. Canonical Expansion Keys Catalog

Key Expansion Title Theme Color Default Texture Asset
WOWClassic / Vanilla #ffd100logo_00_wow.png
TBCThe Burning Crusade #22b14clogo_01_tbc.png
WOTLKWrath of the Lich King #00a2e8logo_02_wotlk.png
CATACataclysm #c13b14logo_03_cata.png
MOPMists of Pandaria #00a86blogo_04_mop.png
WODWarlords of Draenor #8f522elogo_05_wod.png
LEGIONLegion #55ff00logo_06_legion.png
BFABattle for Azeroth #ff8000logo_07_bfa.png
SHADOWLANDSShadowlands #99b3cclogo_08_shadowlands.png
DRAGONFLIGHTDragonflight #dc3232logo_09_dragonflight.png
TWWThe War Within #eb7a1flogo_10_tww.png
MIDNIGHTMidnight #6c429clogo_11_midnight.png
FOREVERWorld of Warcraft Forever #99e6f2logo_01_60_forever.png
SOD_P1..P8Season of Discovery #e03a3alogo_01_15_sod.png

11. Technical API Changelog

API v2.0.0 — Major Architecture Overhaul October 24, 2026
  • Dual Operation Architecture: Introduced SetLibraryMode() and IsLibraryMode() for seamless embedding without Blizzard UI conflicts.
  • Version Handshake: Added GetAPI(version) and IsVersionCompatible(version) to guarantee backward compatibility with host addons.
  • Dynamic Settings Schema: Published GetSettingsSchema(), GetOption(), and SetOption() for self-generating host settings panels.
  • Reactive Observer Pattern: Added RegisterConfigObserver() to allow host addons to react to color, tint, and opacity updates in real time.
  • Atmospheric Parchment Engine: Exposed ShouldTintQuest(questID) and preset matrices for custom background tinting.
  • Bilingual API Aliases: Introduced 100% English method names (e.g. GetQuestExpansion) alongside existing canonical Spanish methods.
API v1.0.0 — Initial Baseline Release October 22, 2026
  • Internal Blizzard QuestLog title and detail hooks.
  • Over 40,000 quests mapped with official logos across Retail and Classic clients.