Lucky's Utils

Development Tools

A utility library providing common functionality to Lucky Phil's Addons

WoW 12.1.0 Actively Maintained

Trend Explorer

Recent download momentum

Estimated downloads/hour over observed intervals in the last 48 hours.

Latest interval +2 /h 1h observed interval · ending Sep 11, 6 AM
Peak estimate +15 /h 1h observed interval · ending Sep 9, 5 PM
Average estimate +2.9 /h Time-weighted · 47.3h covered of 48h

Lines connect interval estimates, not hourly measurements. Unobserved time is not counted as zero or extrapolated to now.

About this addon

What it does

Join the Discord

Lucky's Utils

Shared library for Lucky Phil's WoW addons. Provides a consistent UI theme, reusable frame components, settings panel builder, minimap button factory, and general utilities.


This addon is a dependency — it does nothing on its own. If another addon asked you to install it, you're in the right place. No configuration is needed.


What's Included

  • LuckyUI — dark/gold colour palette and frame builders: styled panels, headers, buttons, checkboxes, dividers, and drag-to-move with position persistence.
  • LuckySettings — fluent builder for Interface Options panels: toggles, selectors, sliders, and section headings.
  • LuckyMinimap — draggable minimap buttons with saved position and visibility state, no extra library required.
  • LuckyLog — gated debug loggers that stay silent until an addon's debug flag is on.
  • LuckyDeps — optional dependency checks with version validation.
  • LuckySound — helpers for addon sound files and built-in WoW sound kit entries.
  • LuckyUtils — general utilities: recursive SavedVariables initialisation and canonical Name-Realm character keys.

For Addon Developers

Installation as a dependency

Add to your .toc:

## OptionalDeps: Luckys_Utils

And to your .pkgmeta to embed it in packaged releases:

externals:
  YourAddon/Luckys_Utils: https://github.com/LuckyPhilDev/LuckyUtils

The library loads before your addon code. All globals (LuckyUI, LuckySettings, LuckyMinimap, LuckyLog, LuckyDeps, LuckySound, LuckyUtils) are available after ADDON_LOADED fires for your addon.


LuckyUtils

-- Apply defaults to a SavedVariables table (recursive for nested tables)
LuckyUtils.ApplyDefaults(MyAddonDB, {
    devMode    = false,
    showPanel  = true,
    threshold  = { min = 1, max = 10 },
})

-- Canonical "Name-Realm" key for the current character
local key = LuckyUtils.CharacterKey()  -- e.g. "Tharindel-Silvermoon"

LuckyUI

Colour paletteLuckyUI.C (RGBA 0–1 tables) and LuckyUI.WC (WoW colour escape strings):

-- Print with gold accent
print(LuckyUI.WC.goldPrimary .. "MyAddon" .. LuckyUI.WC.reset .. ": hello")

Key palette tokens: bgDark, bgPanel, bgInput, goldPrimary, goldAccent, goldMuted, textLight, textMuted, danger, info, success, purple.

Frame helpers:

-- Styled panel (dark bg, gold border, draggable)
local panel = LuckyUI.CreatePanel("MyPanel", UIParent, 400, 300)

-- Header bar with title and close button
LuckyUI.CreateHeader(panel, "My Addon")

-- Buttons: "primary" | "secondary" (default) | "danger"
local btn = LuckyUI.CreateButton(parent, "Save", 90, 28, "primary")

-- Checkbox (gold fill when checked)
local cb = LuckyUI.CreateCheckbox(parent, 16)

-- Horizontal divider with optional label
local div = LuckyUI.CreateDivider(parent, "Section Title")

-- Drag-to-move with SavedVariables persistence
LuckyUI.EnableDrag(myFrame, {
    db      = MyAddonDB,
    key     = "windowPos",
    default = { "TOP", "TOP", 0, -200 },
})
-- Restores saved position immediately; adds myFrame:RestorePosition()

LuckySettings

local panel = LuckySettings:NewPanel("My Addon")

panel:Section("General")
panel:Toggle({
    label    = "Enable feature",
    desc     = "Turns the feature on or off.",
    checked  = MyAddonDB.featureEnabled,
    onToggle = function(v) MyAddonDB.featureEnabled = v end,
})
panel:Selector({
    label   = "Mode",
    value   = MyAddonDB.mode,
    choices = { { value="auto", label="Auto" }, { value="manual", label="Manual" } },
    onChange = function(v) MyAddonDB.mode = v end,
})
panel:Slider({
    label     = "Threshold",
    key       = "threshold",
    min       = 1, max = 100, value = MyAddonDB.threshold,
    suffix    = "%",
    onChanged = function(v) MyAddonDB.threshold = v end,
})

-- Open programmatically
panel:Open()
-- or: LuckySettings:Open(panel.category)

LuckyMinimap

LuckyMinimap:Create({
    name    = "MyAddonMinimapButton",
    icon    = "Interface\\Icons\\INV_Misc_Bag_36",
    dbKey   = "minimap",   -- key in db for { minimapPos, hide }
    db      = MyAddonDB,
    onClick = function(_, mouseBtn)
        if mouseBtn == "LeftButton" then MyAddon:Toggle() end
    end,
    tooltip = function(tt)
        tt:AddLine(LuckyUI.WC.goldPrimary .. "My Addon" .. LuckyUI.WC.reset)
        tt:AddLine("Left-click: Toggle", 0.91, 0.86, 0.78)
        tt:AddLine("Shift-drag: Move button", 0.54, 0.49, 0.42)
    end,
})

LuckyLog

local DevLog = LuckyLog:New("|cffc9a84cMyAddon|r:", function()
    return MyAddonDB and MyAddonDB.devMode
end)

-- Prints only when devMode is true
DevLog("Player entered zone:", GetZoneText())

LuckyDeps

-- Check if an optional dependency is installed and enabled
if LuckyDeps:IsEnabled("WeakAuras") then ... end

-- Check if loaded and optionally at minimum version
local ok, err = LuckyDeps:Check("Details", "9.0.0")
if not ok then print(err) end

LuckySound

-- Play an addon sound file
LuckySound:Play(LuckySound:Path("MyAddon", "sounds\\alert.ogg"))

-- Play a built-in WoW sound
LuckySound:PlayKit(SOUNDKIT.IG_QUEST_LOG_OPEN)

-- Stop a playing sound
local _, handle = LuckySound:Play(path)
LuckySound:Stop(handle)

Author

Lucky Phil

At-a-glance numbers

Performance highlights

  • Peaked at Hot #294 on Sep 7, 2026.
  • Peaked at Rising #212 on Aug 27, 2026.
  • Featured on the Hot list across 5 distinct weeks.
  • Shipped 17 releases in the last 30 days.
  • Averaging 197 new downloads per day over the past week.

Discover more

Keep exploring

Similar addons you might also want to check out.

More by Lucky_Phil

Same creator, different utilities.

Similar in Development Tools

Comparable addons in the same lane.

ThisWeeksAuras #13 #493
48.4K downloads

ThisWeeksAuras is a Midnight-ready fork of M33kAuras by m33shoq, which is itself a fork of WeakAuras 2.

GSE: Sequences, Variables, Macros #23
10.1M downloads

GSE is an advanced macro compiler that is an alternative to the limits provided by the default macro editor.

Leatrix Sounds #60
7.0M downloads

Complete sound file browser for World of Warcraft. Supports all WoW games including Midnight and Burning Crusade Classic Anniversary (as well as all the others).

Simulationcraft #123
51.1M downloads

An addon that generates a Simulationcraft profile for your character

Hated Crate Tracker 2.0 #144
323.2K downloads

War Supply Crate tracker with drop prediction, live timers, and raid-wide sync. Crate farm coordination for solo hunters and full raids.

BugGrabber #173
18.3M downloads

Grabs bugs for the bug sack.

GRIP - EMS (Enhanced Macro Sequencer) #180 #407
34.3K downloads

Free macro sequencer for WoW: turn a multi-step rotation into one keybind, with a visual editor, smart context switching, import/export, and player-to-player sharing.

Talent Tree Tweaks #207
5.0M downloads

Various improvements and addition to the Retail talent tree and profession tree UI

BugSack #210
16.0M downloads

Toss those bugs inna sack.

Hyperframe (FPS Optimizer) #318
293.3K downloads

Hyperframe dynamically adjusts graphics settings based on content type to optimize FPS, frame rate, performance, and visual quality. It includes presets for dungeons, raids, arenas, and more, with customizable view distances, LOD, and particle effects.

Transcriptor #360
1.1M downloads

Logging utility for boss encounters.

idTip #374
3.6M downloads

Adds IDs to the ingame tooltips