Thread Tools Display Modes
04-29-11, 08:45 PM   #1
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
Post 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.
  Reply With Quote
04-30-11, 12:07 AM   #2
acapela
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 241
Originally Posted by dafft View Post
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.
__________________
Retired author/maintainer of Aloft (the nameplate addon)
http://www.wowinterface.com/download...AloftBeta.html
-----
Zippy said it best: "All life is a BLUR of Republicans and Meat!"
  Reply With Quote
04-30-11, 12:53 AM   #3
Lostasd
A Kobold Labourer
Join Date: Apr 2011
Posts: 1
Bump

I cant play whitout this mod agh how can i display health percent in The default Blizzard nameplates? nothing more...
  Reply With Quote
04-30-11, 03:01 AM   #4
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
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
  Reply With Quote
04-30-11, 04:10 AM   #5
Sylen
A Wyrmkin Dreamwalker
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 50
Open Nameplate.lua the code your're looking for is in line 74.
  Reply With Quote
04-30-11, 04:34 AM   #6
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
since everything says Nameplates & has cast in it, would I have to create a castbar function?
  Reply With Quote
04-30-11, 09:13 PM   #7
acapela
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 241
Originally Posted by dafft View Post
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.
__________________
Retired author/maintainer of Aloft (the nameplate addon)
http://www.wowinterface.com/download...AloftBeta.html
-----
Zippy said it best: "All life is a BLUR of Republicans and Meat!"
  Reply With Quote
05-01-11, 03:04 AM   #8
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
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

Last edited by dafft : 05-01-11 at 04:49 AM.
  Reply With Quote
05-01-11, 12:46 PM   #9
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
They were changes for the better, you know...
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-01-11, 05:23 PM   #10
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
Everything is for better - 90% of the time it doesnt work out like that
  Reply With Quote
05-01-11, 07:34 PM   #11
hankthetank
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 64
Besides, these kind of changes don't improve anything at all.
  Reply With Quote
05-01-11, 07:35 PM   #12
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Maybe not from your point of view.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-02-11, 01:48 AM   #13
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
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.
  Reply With Quote
05-02-11, 02:27 AM   #14
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
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.

Last edited by dafft : 05-02-11 at 03:53 AM.
  Reply With Quote
05-04-11, 12:53 AM   #15
dafft
A Murloc Raider
Join Date: Apr 2011
Posts: 8
Lock please -

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

Thank You
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » LF Nameplates Modifier update

Thread Tools
Display Modes

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