Change nameplate font color? (Plater question)

Is it possible to change the color of the font of my target’s nameplate using Plater? I’d like to change the color only for my current target, and only the color of the text/font, not the nameplate color itself.

Yes, but you’ll have to install or make a mod to do so. For existing mods, check wago

Go to Modding and click New Mod.
Give it a name, f.ex. “Target Name Font Color”.
Add Hook “Target Changed”.
Put in:

function(self, unitId, unitFrame, envTable)
    if UnitIsUnit(unitId, "target") then
        -- Change fontcolor to red for target
        unitFrame.healthBar.unitName:SetTextColor(1, 0, 0) -- Red
    else
        -- Reset the font color to white for other units
        unitFrame.healthBar.unitName:SetTextColor(1, 1, 1) -- White
    end
end

Click Save.

1 Like

That Mod worked perfectly, thanks a lot Khazie!
At first the script didn’t work but then I realized I had another mod (M+ Renamer) that was somehow overriding the font color change. When I disabled the latter mod this one started to work.

And thanks to Linarawri as well, for the source of more Plater mods. :slight_smile: Looks like there are plenty of potentially useful stuff there.