Skip to main content

TMDM Encounter Client

A guide to the TMDM Encounter Client by Zarillion.

What is it?

The TMDM Encounter Client is an addon developed specifically for use in our raids. It is a display addon that allows text, sounds, chat messages, emotes, frame glows and more to be triggered via addon messages sent by the raid leader.

Motivation

Before discussing how the client works, you should think about the current state of complex assignment auras and their downsides. Think about the following:

  • How many times have you wiped to assignment auras not working or producing wrong results?
    Example: Two players assigned to jump into the same hole on Jailer.

  • How many times have you wiped to players not having the same updated version of an assignment aura?
    Example: One player still has assignment aura v1.2.2 and the rest of the raid has updated to v1.2.3.

  • How many times have you wiped to players not having the correct utility auras to make the assignment aura work?
    Example: A player's assignments are not working in the Liquid pack because they do not have the LiquidWeakAuras utility aura or it is out of date.

  • How many times have you wiped to an assignment aura not updating automatically as people die on progression?
    Example: An assigned player dies and instead of automatically assigning another player, the raid has to coordinate a backup at the last second in voice (if they even notice).

  • How much time has your raid wasted setting up the complex assignments that make these auras work?
    Example: A player joins in the middle of the raid and all of the assignments need to be updated to ensure the auras keep working as expected.

  • How much time has your raid wasted waiting for a new player to get all of these auras installed correctly?
    Example: Someone has to leave and you now spend 20 minutes setting up a bench player's auras.

  • How much time has your raid wasted figuring out who was assigned what after a wipe is called?
    Example: An egg is not popped on Ovi'nax. Which two players were assigned to that egg by the assigment aura?

These auras are brittle. The auras are inflexible. They auras are buggy. These auras are inconsistent. These auras can be hard to work with and they often provide little information about what they did during each pull. Think about the total amount of time and wipes caused by some of the assignment auras. We should be progging the boss, not the weakaura.

I think about 20% of our wipes on the last three bosses of the last few tiers can be attributed to the Liquid or Nothern Sky assignment auras.

Rolanor - Raid Traffic Controller

Design

The client does not do anything by itself. It is simply a listener that allows addon messages triggered by the raid leader to display information on your screen. Any complex assignment logic is handled by code running on the raid leader's computer (typically done through custom auras written by me).


This eliminates entire classes of problems from the list in the previous section:

  • Assignments cannot conflict. The assignments are run one time on the raid leader's computer.
  • Assignments do not rely on auras. Simply keep the client addon updated in the CurseForge app.
  • Time is not wasted installing auras for each boss. New & bench players install the client one time.

It is not currently possible for the client to replace all auras we may want to use on a fight. Sometimes complex figures or lists of players must be displayed and the client cannot (yet) display these types of things. However, the most important "go here now" or "do this now" type of assignments are what this client targets and are the most critical pieces of any complex fight.

Assignments

The client eliminates some of the headaches of common assignment auras. The way in which our assignment code is written helps alleviate some more. When writing our custom assignment code I strive for the following:

  • Dynamically assign as much as I can without relying on static lists of player names in notes.
  • Automatically reassign mechanics to new players as existing assigned players die.
  • Report what the assignments are in raid chat to help diagnose wipes.

We have freedom to customize how we assign things. We can prioritize players, classes and specs in ways that suit us, which is not something that could easily be baked into the standard assignment auras. Approaching assignments this way saves potential wipes and reduces the setup time needed when the roster changes week-to-week.

Example

Here is a portion of the assignment code written as an aura for the Broodtwister Ovi'nax encounter:

function (event, ...)
    local aura_env = aura_env

    local function Emit (message, target)
        C_ChatInfo.SendAddonMessage('TMDM_ECWAv1', message, 'WHISPER', target)
    end

    local function AssignDosages ()
        if #aura_env.dosages == 0 then return end

        local unassigned = {}

        local function AssignLocked (player)
            for marker, locks in pairs(aura_env.locked) do
                for i, lock in ipairs(locks) do
                    if lock == player then
                        table.insert(aura_env.assignments[marker], player)
                        return
                    end
                end
            end
            table.insert(unassigned, player)
        end

        local function AssignUnlocked (player)
            for marker, assignments in pairs(aura_env.assignments) do
                if #assignments < 2 then
                    table.insert(assignments, player)
                    return
                end
            end
        end

        -- Assign locked players
        for i, player in ipairs(aura_env.dosages) do
            AssignLocked(player)
        end

        -- Assign left-over players
        for i, player in ipairs(unassigned) do
            AssignUnlocked(player)
        end

        -- Send out assignment messages
        for marker, assigns in pairs(aura_env.assignments) do
            local rt = "{rt"..marker.."}"
            SendChatMessage(rt..": "..(assigns[1] or "(none)").." "..(assigns[2] or "(none)"), "RAID")
            for i, player in ipairs(assigns) do
                Emit("c=SAY "..rt..";m="..rt.." DOSAGE "..rt..";d=8", player)
                C_Timer.After(4, function () Emit("c=SAY {rt"..marker.."}", player) end)
            end
        end

        -- Reset for next set
        aura_env.dosages = {}
        aura_env.assignments = { [6] = {}, [4] = {}, [3] = {}, [7] = {} }
    end

    if event == "ENCOUNTER_START" then
        aura_env.MRT()
        aura_env.dosages = {}
        aura_env.assignments = { [6] = {}, [4] = {}, [3] = {}, [7] = {} }
    elseif event == "COMBAT_LOG_EVENT_UNFILTERED" then
        local _, message, _, _, _, _, _, _, destName, _, _, spellID = ...
        if message == "SPELL_AURA_APPLIED" and spellID == 440421 then -- Experimental Dosage
            table.insert(aura_env.dosages, destName)
            if #aura_env.dosages == 1 then
                C_Timer.After(0.5, AssignDosages)
            elseif #aura_env.dosages == 8 then
                AssignDosages()
            end
        end
    end
end

This aura allowed 8 players to be "fixed" to an egg in the MRT note, and dynamically assigned any other players to eggs as they received the Experimental Dosage debuff. Most importantly, it sent out a message to the RAID channel for each egg marker indicating who the assigned players where.

Summary

With all of the above in mind, remember that there is a cost to using the client. Namely, I am writing the custom assignments as we get to each boss during progression. It is unlikely that I will get them working exactly right on pull #1, so sometimes we have to spend a few pulls debugging any initial issues. However, keep in mind that once they are sorted out and it is working, we don't have to think about it for the rest of the tier even as players come and go.

Ultimately, I am personally taking on all of the aura headaches mentioned in the motivations at the top so that the raider's experience is simply "install the client". This saves time and reduces wipes considerably in the long run, so be patient when we are working through issues.