Nameplate modifications (wow original)
Hello all.
Im using a code i found on the web that alows me to adjust nameplate fontsize and also change server Visuals. Now i want to find a way to 1. change text colour to Always be White 2. move the text offset closer to the nameplate bar (anchor Point) what is the best way to do this? Lua Code:
|
Looks fine to me, though you don't need to wait for an event to change the font properties. They already exist by the time the addon runs.
As for your additional requests, here's how I'd reset the nametag anchors. Lua Code:
I think the nametag is always white. The nameplates just change their alpha when "selected". |
hey SDPhantom!
Thanks for the help. im new at this, just grew tired of things not doing what i wanted and searched arround. Care to explain deeper "you don't need to wait for an event to change the font properties" If youd clean up the code i use and add your new extras how would it look. now what code will be used to move down the Nameplate font slightly where you added -- Set new anchor(s) here i tested this -- Disable target highlight DefaultCompactNamePlateFriendlyFrameOptions.displaySelectionHighlight=false; DefaultCompactNamePlateEnemyFrameOptions.displaySelectionHighlight=false; DefaultCompactNamePlatePlayerFrameOptions.displaySelectionHighlight=false; but the font does not change to white on all nameplates what i want is for enemy (npc and player) text to be white with black outline! at the moment the text folows namplate colour. so agrro mobs are red. neutral yellow both text and nameplates. i want nameplates to be the colour but the names white. |
Looks like nameplates on classic behave differently than on modern.
Here's a more complete example with the changes. Lua Code:
Note: A recreation of the existing anchor is given to illustrate how to set an anchor from Lua. If you need more detail on the function, see fontstring:SetPoint(). |
Hey.
Thanks for the help. the text color is working nicely but something with the anchor is messing up. i get this error but if i remove -- Move nametag hooksecurefunc(NamePlateDriverFrame,"OnNamePlateCreated",function(base)-- Hook nameplate creation function local unitframe=base.UnitFrame;-- UnitFrame attached to nameplate base unitframe.name:ClearAllPoints();-- Clear nametag anchors -- Set new anchor(s) here unitframe.name:SetPoint("BOTTOM",unitframe.healthBar,"TOP",0,0); end); i only get inteface caused an error in chat. ERROR MESSAGE Message: Interface\AddOns\EmyaraMod\EmyaraMod.lua:47: attempt to index local 'unitframe' (a nil value) Time: Sun Nov 17 22:07:15 2019 Count: 4 Stack: Interface\AddOns\EmyaraMod\EmyaraMod.lua:47: attempt to index local 'unitframe' (a nil value) [string "@Interface\AddOns\EmyaraMod\EmyaraMod.lua"]:47: in function <Interface\AddOns\EmyaraMod\EmyaraMod.lua:45> [string "=[C]"]: in function `OnNamePlateCreated' [string "@Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua"]:45: in function <...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:42> Locals: base = NamePlateDriverFrame { 0 = <userdata> OnNamePlateAdded = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:91 GetBaseNamePlateWidth = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:305 UpdateInsetsForType = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:130 namePlateAnchorFunctions = <table> { } OnUnitAuraUpdate = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:154 namePlateSetupFunctions = <table> { } OnNamePlateResized = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:204 ApplyFrameOptions = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:112 IsUsingLargerNamePlateStyle = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:313 namePlateSetInsetFunctions = <table> { } UpdateNamePlateOptions = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:318 classNamePlatePowerBar = ClassNameplateManaBarFrame { } GetClassNameplateBar = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:283 OnForbiddenNamePlateCreated = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:83 SetClassNameplateBar = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:278 SetupClassNameplateBars = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:213 OnNamePlateCreated = <function> defined =[C]:-1 SetClassNameplateManaBar = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:291 SetBaseNamePlateSize = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:296 GetOnSizeChangedFunction = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:125 OnNamePlateRemoved = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:143 GetClassNameplateManaBar = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:287 OnLoad = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:3 baseNamePlateWidth = 110 OnUnitFactionChanged = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:196 OnEvent = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:42 preferredInsets = <table> { } GetBaseNamePlateHeight = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:309 OnTargetChanged = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:149 baseNamePlateHeight = 45 OnRaidTargetUpdate = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:182 GetNamePlateTypeFromUnit = <function> defined @Interface\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:102 } unitframe = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = "attempt to index local 'unitframe' (a nil value)" |
Oh, right. I forgot the function is called as NamePlateDriverFrame:OnNamePlateCreated(...). I adjusted the argument list in my previous post to fix that.
|
Quote:
I tested it now and No errors but the hookpoint does not seam to work Code:
-- Move nametag /M |
Looks like more modern version trickery. Try replacing that block with this instead.
Lua Code:
|
Quote:
That did it. Awsome, Thanks alot. The only issue i need to work out now is the debuff location and size. why did blizz set them so far of? if you have any code for that id be most happy. This is how it looks now |
To isolate the adjustment to only when the name is showing, we'll just semi-recreate the original function managing the buff container.
Lua Code:
|
Quote:
dude thats awsome. You are a true star. i used to use flyplate debuffs and it had a toggle to show names on untracked nameplates (se image ) I need to be able to scale the debuffs to match the style better ;) Thanks for all the work man.. making my UI be how i want it to be. as you can se, only the targeted nameplate has text. i can fix it with the tracking function in wow.. but then i get names shwoing where i dont. in FlyPlates i had a function to --fix nameplates without names like the dummys in the image. anyhow. Thanx for the aid. |
Quote:
I dont know how to do it can i have your code please |
All times are GMT -6. The time now is 08:19 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI