← home

instance loadouts

dateread3 mintags lua wow links curseforge github

intro

if you play more than one kind of content, your setup changes with it. a raid boss wants different talents than a dungeon, a delve wants a different spec, and some addons only matter in some places. forgetting to switch is easy, and you usually notice after the pull.

instance loadouts lets you save a loadout for each place you play: a spec, a talent build, an equipment set, and an addon set. when you enter, it shows what doesn't match and switches it in one click.

it was created by bisse in 2025. i started contributing that september and now maintain the project as he has since stopped playing the video game.

how it works

finding where you are

on every loading screen, the addon reads the instance type and id from the game and sorts it into a category: dungeon, raid, delve, arena, battleground, or open world:

local _, instanceType, _, difficultyName, _, _, _, instanceID = GetInstanceInfo()
if instanceType == "none" or tContains(isGarrison, instanceID) then
    instance = "Open World"
    -- ...
elseif instanceType == "party" then
    instance = "Dungeon"
    if self.ConvertIDToName[instanceID] and dbLoadouts[instance][instanceID] then
        encounter = instanceID
    end
elseif instanceType == "raid" then
    instance = instanceID .. " Encounter"
    -- ...
elseif difficultyName == "Delves" then
    instance = "Delve"
    -- ...

delves report themselves as scenarios, not by an instance type of their own, so they're matched on the difficulty name instead.

each category has a default loadout, and individual instances can override it. a raid can override the new "all raids" default, a dungeon can override the dungeon default, and talents can be overridden without changing the spec.

a raid overriding the default spec and addons, but not talents
a raid overriding the default spec and addons, but not talents

the reminder

the reminder only shows the parts that are wrong. if your gear set matches but your talents don't, you see one row for talents. if everything already matches, nothing appears.

the reminder on entering the nighthold
the reminder on entering the nighthold

applying a change waits for the game to confirm it. the button disables while the change goes through, the row updates when the game reports success, and if the game reports a failure, like trying to swap spec mid-cast, the button comes back so you can try again:

section:SetAction("Change Specialization to " .. name, function()
    section.button:SetEnabled(false)
    C_SpecializationInfo.SetSpecialization(specializationSet)
    addon:RegisterEvent("ACTIVE_PLAYER_SPECIALIZATION_CHANGED", function()
        if specializationSet == GetSpecialization() then
            addon:UnregisterEvent("ACTIVE_PLAYER_SPECIALIZATION_CHANGED")
            addon:UnregisterEvent("SPECIALIZATION_CHANGE_CAST_FAILED")
            C_Timer.After(0, function()
                addon:checkIfIsTrackedInstance()
            end)
        end
    end)
    addon:RegisterEvent("SPECIALIZATION_CHANGE_CAST_FAILED", function()
        section.button:SetEnabled(true)
        addon:UnregisterEvent("ACTIVE_PLAYER_SPECIALIZATION_CHANGED")
        addon:UnregisterEvent("SPECIALIZATION_CHANGE_CAST_FAILED")
    end)
end)

after a spec change, the whole check runs again, since a new spec can change which talents and gear are expected.

other addons

blizzard has no built-in addon sets, so that part relies on addon managers. it supports addon control panel, better addon list, and simple addon manager. for talents it works with blizzard's own loadouts or talent loadout manager.

loadouts can be shared as text. the data is serialized, compressed, and encoded into a string you can paste anywhere:

local serialized = LibSerialize:Serialize(data)
local compressed = LibDeflate:CompressDeflate(serialized)
local encoded = LibDeflate:EncodeForPrint(compressed)

the same steps also decide when to show the changelog. the addon hashes its encoded changelog on login, and only shows it when the hash differs from the one it saved last time.

what i've worked on

  • midnight support: patch updates, the new delves, and handling the addon restrictions that came with the expansion
  • boss detection: midnight hides most information about raid bosses from addons, so the addon can't tell which boss you're targeting anymore. it now asks you which encounter to load when you target a boss, with a timeout so it doesn't ask again on every target change
  • custom instances: adding any instance from the encounter journal, and per-zone loadouts for the open world
  • raid defaults: an "all raids" default, with a migration so raids that already had a loadout keep it
  • new ui: moved the whole interface to swirl framework, replacing a framework that users had to install separately
  • fixes: addon managers that loaded after instance loadouts and were missed, and talent builds not changing along with the spec

numbers

commits: 53 of 74
downloads: 6,713 on curseforge
active: sep 2025 to now

table of contents