WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Search/Requests (https://www.wowinterface.com/forums/forumdisplay.php?f=6)
-   -   LF Nameplates Modifier update (https://www.wowinterface.com/forums/showthread.php?t=39909)

dafft 04-29-11 08:45 PM

LF Nameplates Modifier update
 
Shadowed's Nameplate addon - http://www.wowinterface.com/download...eModifier.html - was for me one of the cleanest nameplate addons.

I would really appreciate if an author could look at the coding and point me in the direction to get it working.

acapela 04-30-11 12:07 AM

Quote:

Originally Posted by dafft (Post 236070)
Shadowed's Nameplate addon - http://www.wowinterface.com/download...eModifier.html - was for me one of the cleanest nameplate addons.

I would really appreciate if an author could look at the coding and point me in the direction to get it working.

a quick tutorial on the main issue(s).

not familiar with the specific features of this addon, but the main thing between WoW 4.0 and 4.1 was that the nameplate "assembly" changed. if you go back to WoW 3.X versus WoW 4.1, you also have to include the way Blizzard controls nameplate "overlap" (i don't know if NameplateModifier does anything with that; my guess is that it does not).

that means that all the liitle UI widgets that comprise a nameplate changed in organization. nameplates contain a variety of elements, including a bunch of texture/text regions, and two "children": health bar and cast bar.

the change that occurred relates specifically to the cast bar: several texture elements that were logically associated with the cast bar but (historically) associated with the nameplate proper moved, physically, from the nameplate proper to the cast bar itself.

this changed the manifest of return values from the Frame:GetRegions() API call that every nameplate addon has to do to identify various nameplate elements for reskinning. if this manifest changes, it generally results in major addon breakage.

for WoW 4.1, Aloft's code looks roughly like this:

Code:

local nativeGlowRegion, overlayRegion, highlightRegion, nameTextRegion, levelTextRegion, bossIconRegion, raidIconRegion, stateIconRegion = nameplateFrame:GetRegions()
local healthBar, castBar = nameplateFrame:GetChildren()
local castBarRegion, castBarOverlayRegion, castBarShieldRegion, spellIconRegion = castBar:GetRegions()

(the healthBar is nothing "special", just a standard StatusBar... a Blizzard API widget, documented here, along with everything else; in WoW 4.1, the castBar has become more complicated.)

ultimately, there will be some code like this somewhere in NameplateModifier. it may be as simple as just updating the code in place to reflect the new organization.

hope that helps.

Lostasd 04-30-11 12:53 AM

Bump

I cant play whitout this mod agh :( how can i display health percent in The default Blizzard nameplates? nothing more...

dafft 04-30-11 03:01 AM

Acepela,

Thank you for your response, I tried having a bash at it to find the changes you mentioned but, honestly, I got lost.

I found several "cast" mentioned & I understand probably 10% of it

Sylen 04-30-11 04:10 AM

Open Nameplate.lua the code your're looking for is in line 74.

dafft 04-30-11 04:34 AM

since everything says Nameplates & has cast in it, would I have to create a castbar function?

acapela 04-30-11 09:13 PM

Quote:

Originally Posted by dafft (Post 236104)
since everything says Nameplates & has cast in it, would I have to create a castbar function?

no, all you (should) really need to do is modify where GetRegions() is called. NameplateModifier needs know how WoW 4.1 nameplates are organized and extract all the "widgets" that comprise them. you need to update NameplateModifier to handle this new WoW 4.1 "widget" organization.

my original code snippet "documents" this organization.

once the addon has access to the new nameplate "widget" organization, pretty much all of its existing code should (hopefully) still work as expected.

hope that helps.

dafft 05-01-11 03:04 AM

Thanks Snow for your replies & assistance however I'm still not getting this change right - spent these 2 days going over it & looking over the various other nameplate mod's updated for 4.1 & I'm missing something.

I tried changing frame:GetRegions() with no results. I'm not going to fiddle around with this any more, I'll wait until someone released a simple nameplate mod.

That's what was so nice about this, it was simple w/out all the config options offered by most nameplate mods.

Bugger to Blizzard for changing things

Seerah 05-01-11 12:46 PM

They were changes for the better, you know... ;)

dafft 05-01-11 05:23 PM

Everything is for better - 90% of the time it doesnt work out like that

hankthetank 05-01-11 07:34 PM

Besides, these kind of changes don't improve anything at all.

Seerah 05-01-11 07:35 PM

Maybe not from your point of view. :p

dafft 05-02-11 01:48 AM

on a separate note - some kind soul on curse posted this:-

Code:

Fix for 4.1:

Change line 157 of Nameplates.lua from

if( not frames[frame] and not frame:GetName() and region and region:GetObjectType() == "Texture" and region:GetTexture() == "Interface\\TargetingFrame\\UI-TargetingFrame-Flash" ) then

to

if( not frames[frame] and region and region:GetObjectType() == "Texture" and region:GetTexture() == "Interface\\TargetingFrame\\UI-TargetingFrame-Flash" ) then

It semi solved it - now to figure out the rest.

dafft 05-02-11 02:27 AM

Have tried the change & it works to a degree. It sets the nameplates to what they were originally however several errors crop up.

FYI - I set mine to hide elite border & casting & I get the following errors
Code:

Interface\AddOns\Nameplates\Nameplates.lua:63: in function `SetupHiding'
Interface\AddOns\Nameplates\Nameplates.lua:87: in function `OnShow'
Interface\AddOns\Nameplates\Nameplates.lua:166: in function <Interface\AddOns\Nameplates\Nameplates.lua:152>
Interface\AddOns\Nameplates\Nameplates.lua:182: in function <Interface\AddOns\Nameplates\Nameplates.lua:179>

I know I'm asking a lot but.....
line 63
Code:

function Nameplates:SetupHiding(texture, type)
        if( self.db.profile[type] ) then
                texture:Hide()

Line 87
Code:

self:SetupHiding(mobIcon, "hideElite")
Line 152 > 166
Code:

local function hookFrames(...)
        local self = Nameplates
        for i=1, select("#", ...) do
                local frame = select(i, ...)
                local region = frame:GetRegions()
                if( not frames[frame] and region and region:GetObjectType() == "Texture" and region:GetTexture() == "Interface\\TargetingFrame\\UI-TargetingFrame-Flash" ) then
                        frames[frame] = true

                        local health, cast = frame:GetChildren()
                       
                        self:CreateText(health)
                        self:HookScript(health, "OnValueChanged", "HealthOnValueChanged")
                        self:HookScript(health, "OnShow", "OnShow")
                        self:HealthOnValueChanged(health, health:GetValue())
                        self:OnShow(health)

Line 179 > 182
Code:

frame:SetScript("OnUpdate", function(self, elapsed)
        if( WorldFrame:GetNumChildren() ~= numChildren ) then
                numChildren = WorldFrame:GetNumChildren()
                hookFrames(WorldFrame:GetChildren())

On a side note - I'll give a small Thank You donation to the person who gets Nameplate Modifier working.

dafft 05-04-11 12:53 AM

Lock please -

update found here http://www.wowinterface.com/download...FanUpdate.html

Thank You


All times are GMT -6. The time now is 11:15 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI