Developers

Build on SuuUI

Every built-in module is written against the same public API a plugin uses, so a plugin can do anything SuuUI's own modules do.

Plugins

A module in a few lines

A plugin is an addon with ## Dependencies: SuuUI that calls SuuUI.RegisterModule.

  • Settings with defaults, saved per profile, with migrations
  • Frames built from SuuUI's components, movable in edit mode
  • Hooks on every unit frame, nameplate, bar and window SuuUI makes
  • Entries in SuuUI's menus, micro menu and game menu
  • Themes: colours, fonts, textures, icons, spacing, and art hung on the frames
  • Standing in for a whole module, such as the bags
  • Switched off like any other module; an error stays inside it
SuuUI.RegisterModule({
    id = "hello",
    name = "Hello",
    description = "An example plugin that says hello.",
    api = "0.4",
    defaults = {
        greeting = "Hello from a SuuUI plugin",
    },

    OnEnable = function(self)
        -- /suu hello says the greeting
        self:RegisterCommand("hello", "Say the Hello plugin's greeting.", function()
            self:Print(self:Get("greeting"))
        end)
    end,
})
Trimmed from Examples/SuuUI_HelloPlugin, which adds a setting, a movable frame and a settings section.
Resources

Everything you need to start

Plugin guide

From an empty folder to a module with settings and a movable frame, then hooks on SuuUI's own frames, menu entries, standing in for a module, a theme and aura filter lists.

Read Docs/PluginGuide.md

Plugin API

Every public name: modules, settings and migrations, edit mode, events, components from unit frames to windows and map pins, extension points, services, themes and the design tokens. Versioned, now 0.40, so a plugin says which API it needs.

Read Docs/API.md

Typed in wowlua

A plugin written in wowlua sees SuuUI with all its types: settings keep their defaults' types, hooks get each frame's class, and a wrong call is an error when you build. Plain Lua plugins work as well.

Get wowlua

ForeverLFG

SuuUI.LFG: the game's group finder and public chat as one list, with events. Its own package on the wowlua registry; SuuUI's Group Finder is built on it the way a plugin would be.

Open ForeverLFG

Diagnostics

/suu probe checks which client APIs SuuUI relies on. /suu probe <topic> records what the live client allows, from spells and talents to the group finder and the guild.

See the probes
From source

Build it yourself

The repository is the source, not the addon itself. SuuUI is written in wowlua and builds with wowlua 0.13 or later.

git clone git@github.com:DomenikIrrgang/suuui.git
cd suuui
# check the sources without building
wowlua check
# run the tests in wowlua's emulated client
wowlua test
# build and install into your game's AddOns folder
wowlua install --release
# rebuild on every change, then /reload in game
wowlua dev

Project layout

src/Core
Tokens, themes, fonts, events, settings and profiles, modules, roles, the public API
src/UI
Components: unit frame, cast bar, action button, windows, roster, group finder
src/SettingsUI
The settings window and its sections
src/EditMode
Moving frames on a snap grid
src/Units
The built-in modules: frames, bars, chat, bags, windows, guild, group finder
src/Data
Generated data: Cooldown Manager presets, talents, the aura catalog, quests and map places, recipe sources
src/Diagnostics
Probes that read the live client
tests
A test file for every source file, smoke tests and old saved settings, run with wowlua test
tools
Generators for the presets, game data, textures and theme art
Examples
The example plugins, built in the same workspace
wowlua.json
The build: TOC fields, dependencies, release profiles and publish targets

Questions about the API?

Ask on Discord, or open an issue on GitHub for a bug or something the API is missing. SuuUI is MIT licensed.