Thread Tools Display Modes
08-13-14, 01:48 PM   #1
zmga
A Murloc Raider
Join Date: Aug 2014
Posts: 5
Honorable Kill Combat Text

I was wondering if anybody knew where this function is located in blizzard's default UI, or if anybody has any idea about what frame(s) may be involved.

Honorable Kills combat text doesn't seem to be included in the Blizzard_CombatText.xml/lua or anywhere else that would make sense. I also ran a general search using the potential events that may trigger it and didn't come up with anything.

Just to clarify, I'm talking about the text appearing on gaining honor that reads "HK Prviate" or "HK Scout" and not the honor gained (on me) that is toggleable via the in game menu.

I was hoping to either edit this frame directly or at least have a good enough sense of what's going on to be able to disable it and remake it myself.
  Reply With Quote
08-13-14, 03:53 PM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
Originally Posted by zmga View Post
Just to clarify, I'm talking about the text appearing on gaining honor that reads "HK Prviate" or "HK Scout" and not the honor gained (on me) that is toggleable via the in game menu.

I was hoping to either edit this frame directly [...]
That is part of the game world, like the damage text you can not modify these texts. The only thing that I think is possible, is overwriting the font with a transparent font. However, that will also disable all other texts on the 3d world, like snared, rooted, +xp, +rep, let alone combat damage/healing.
  Reply With Quote
08-14-14, 07:01 PM   #3
zmga
A Murloc Raider
Join Date: Aug 2014
Posts: 5
Thanks for the quick response,

I've tested it and it is possible to use a transparent font to remove the HK text, but like you say it will remove all text that uses the font. (damage, miss, parry, xp, etc).

However I'm running into trouble actually changing the font on my own. Currently I've only managed to change the font using addons gdfont or xdamagefont. They both use the following code:

gdFont = CreateFrame("Frame", "gdFont");

local GD_FONT_NUMBER = "Interface\\AddOns\\gdFont\\Fonts\\SKURRI.ttf";

function gdFont:ApplySystemFonts()

DAMAGE_TEXT_FONT = GD_FONT_NUMBER;

end

gdFont:SetScript("OnEvent",
function()
if (event == "ADDON_LOADED") then
gdFont:ApplySystemFonts()
end
end);
gdFont:RegisterEvent("ADDON_LOADED");

gdFont:ApplySystemFonts()

It seems to me that the only thing going on here is that the global variable DAMAGE_TEXT_FONT is being changed to a custom file path. But there is definitely something else happening because simply changing the global doesn't do anything.

I tried to rewrite a function that would change the global variable and executed it OnLoad or using the event ADDON_LOADED without any success (outside of changing the string associated with the global)

Moreover the when I removed that last line of code "gdFont:ApplySystemFonts()" (which looked redundant) the addon ceased to work.

Anybody know why this is the case?

Last edited by zmga : 08-14-14 at 07:05 PM.
  Reply With Quote
08-14-14, 08:27 PM   #4
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Reloading the UI only reloads the UI. Since the overhead text that shows HKs is not rendered as part of the UI, it's not affected by reloading the UI, and it won't pick up on changes to the DAMAGE_TEXT_FONT global during play. You'll need to log out and back in to apply any changes.

Removing the last line in that code makes it stop working, because you have to set DAMAGE_TEXT_FONT in the main chunk. If you wait for ADDON_LOADED, you're probably too late. If that's the entirety of the addon, then it can be stripped down to a single line of code without losing any functionality:

Code:
DAMAGE_TEXT_FONT = "Interface\\AddOns\\gdFont\\Fonts\\SKURRI.ttf"
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 08-14-14 at 08:29 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Honorable Kill Combat Text


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off