Skip to content

Common Tasks

A quick map from "how do I…" to the Ace3 library that does it. Each entry links to the full reference; start with Getting Started if you are setting up your first addon.

How do I structure an addon and split it into modules?

Use AceAddon-3.0. It gives your addon an object with a clean lifecycle (OnInitialize, OnEnable, OnDisable) and lets you split features into modules.

How do I save settings between sessions?

Use AceDB-3.0. It wraps your SavedVariables with scopes (per-character, per-realm, account-wide, and more), plus smart defaults that are never written to disk.

How do I let users switch, copy and reset profiles?

Drop in AceDBOptions-3.0: :GetOptionsTable returns a ready-made profile-management group you slot into your options table.

How do I build an options screen and slash commands?

Describe your options once as an options table, then register it with AceConfig-3.0. AceConfig builds both a settings GUI ( via AceConfigDialog-3.0) and slash commands (via AceConfigCmd-3.0) from the same table.

How do I react to a game event?

Use AceEvent-3.0: :RegisterEvent calls your handler when the event fires, and registrations are cleaned up automatically when your addon is disabled.

How do I handle events that fire in rapid bursts?

Use AceBucket-3.0 to collect a burst of events and fire your callback once per interval instead of once per event.

How do I run code after a delay or on a repeat?

Use AceTimer-3.0: :ScheduleTimer for one-shot and :ScheduleRepeatingTimer for recurring work, both cancellable.

How do I safely hook a Blizzard function?

Use AceHook-3.0. It tracks your hooks so they can be cleanly removed, keeping the hook chain intact when you unhook.

How do I print to chat or add a simple slash command?

Use AceConsole-3.0: :Print/:Printf for output and :RegisterChatCommand for a quick command. For a full options-driven command, prefer AceConfig above.

How do I send data to other players running my addon?

Use AceComm-3.0 to send messages of any length over the addon channels, and AceSerializer-3.0 to turn Lua tables into strings to send (and back again on receipt).

How do I translate or localize my addon?

Use AceLocale-3.0: register a base locale and per-language tables, then look up translated strings by key.

How do I build a custom window or UI?

Use AceGUI-3.0, a pooled widget toolkit. Create a container such as a Frame, add widgets (buttons, editboxes, sliders, dropdowns, trees, tabs), and release it when done so the frames return to the pool.

How do I add tab-completion to a slash command?

Use AceTab-3.0 to register completions that fire when the user presses Tab in a chat command.

Ace3, a World of Warcraft addon framework.