nPlates 2.0
Known Issues:
- None atm.
Nameplates for NeavUI or standalone.
Home Page: https://wow.curseforge.com/projects/nplates-2-0
License: MIT License
In core.lua 412-414:
frame.healthBar:SetPoint("BOTTOMLEFT", frame.castBar, "TOPLEFT", 0, 4.2)
frame.healthBar:SetPoint("BOTTOMRIGHT", frame.castBar, "TOPRIGHT", 0, 4.2)
frame.healthBar:SetHeight(12)
This causes corruption by trying to attach to a castbar that does not exist with the player resource bar.
This causes many things to fail: Tooltips, buff stack text, health amount text.
Here is some quick-n-dirty code that fixes this. This replaces the hook on line 406, though you may know of a more effective option.
hooksecurefunc("DefaultCompactNamePlateFrameAnchorInternal", function(frame, setupOptions)
if ( frame:IsForbidden() ) then return end
if ( not frame.isNameplate ) then return end
-- Healthbar
local pframe = C_NamePlate.GetNamePlateForUnit("player", issecure())
if pframe then
if frame.BuffFrame.unit ~= pframe.namePlateUnitToken then
frame.healthBar:SetPoint("BOTTOMLEFT", frame.castBar, "TOPLEFT", 0, 4.2)
frame.healthBar:SetPoint("BOTTOMRIGHT", frame.castBar, "TOPRIGHT", 0, 4.2)
end
else
frame.healthBar:SetPoint("BOTTOMLEFT", frame.castBar, "TOPLEFT", 0, 4.2)
frame.healthBar:SetPoint("BOTTOMRIGHT", frame.castBar, "TOPRIGHT", 0, 4.2)
end
frame.healthBar:SetHeight(12)
-- Castbar
frame.castBar.Icon:SetSize(24, 24)
frame.castBar.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
frame.castBar.Icon:ClearAllPoints()
frame.castBar.Icon:SetPoint("BOTTOMLEFT", frame.castBar, "BOTTOMRIGHT", 4.9, 0)
-- Hide Border Shield
frame.castBar.BorderShield:ClearAllPoints()
end)
Cheers.
Hello,
Do you plan to make a version for TBC Classic ? Thx
Message: Interface\AddOns\nTooltip\core.lua:87: Attempt to access forbidden object from code tainted by an AddOn
Time: 07/08/17 15:36:17
Count: 3203
Stack: Interface\AddOns\nTooltip\core.lua:87: Attempt to access forbidden object from code tainted by an AddOnInterface\SharedXML\SharedBasicControls.lua:204: in function <Interface\SharedXML\SharedBasicControls.lua:203>
[C]: ?
[C]: in function `SetBackdropColor'
Interface\AddOns\nTooltip\core.lua:87: in function <Interface\AddOns\nTooltip\core.lua:86>
[C]: ?
Locals: errorMessage = "Interface\AddOns\nTooltip\core.lua:87: Attempt to access forbidden object from code tainted by an AddOn"
DisplayMessageInternal = defined @interface\SharedXML\SharedBasicControls.lua:187
MESSAGE_TYPE_ERROR = 0
Hi,
Config Menu no longer opens and addon throwing out lua errors
Message: Interface/AddOns/nPlates/Settings.lua:41: attempt to call global 'GetAddOnMetadata' (a nil value)
Time: Mon May 8 00:13:37 2023
Count: 1
Stack: Interface/AddOns/nPlates/Settings.lua:41: attempt to call global 'GetAddOnMetadata' (a nil value)
[string "@Interface/AddOns/nPlates/Settings.lua"]:41: in function
Locals: self = nPlatesOptions {
SaveProfileBackup = defined @Interface/AddOns/nPlates/Settings.lua:58
OnLoad = defined @Interface/AddOns/nPlates/Settings.lua:34
SaveChanges = defined @Interface/AddOns/nPlates/Settings.lua:62
controls = {
}
RightSide = nPlatesOptionsRightSide {
}
OnEvent = defined @Interface/AddOns/nPlates/Settings.lua:50
CancelChanges = defined @Interface/AddOns/nPlates/Settings.lua:77
UpdatePanel = defined @Interface/AddOns/nPlates/Settings.lua:94
LeftSide = nPlatesOptionsLeftSide {
}
profileBackup =
{
}
RestoreDefaults = defined @Interface/AddOns/nPlates/Settings.lua:86
ShouldUpdate = defined @Interface/AddOns/nPlates/Settings.lua:70
0 =
Init = defined @Interface/AddOns/nPlates/Settings.lua:102
}
(*temporary) = nil
(*temporary) = "nPlates"
(*temporary) = "Title"
(*temporary) = "attempt to call global 'GetAddOnMetadata' (a nil value)"
addon = "nPlates"
When I turn on friendly nameplates I get errors?
Message: Interface\AddOns\nPlates\core.lua:395: Attempt to access forbidden object from code tainted by an AddOn
Time: 04/07/17 10:09:26
Count: 4
Stack: [C]: in functionSetHeight' Interface\AddOns\nPlates\core.lua:395: in function <Interface\AddOns\nPlates\core.lua:394> [C]: in function
DefaultCompactNamePlateFrameSetupInternal'
Interface\FrameXML\CompactUnitFrame.lua:1750: in function <Interface\FrameXML\CompactUnitFrame.lua:1732>
[C]: in functionDefaultCompactNamePlateFrameSetup' Interface\FrameXML\CompactUnitFrame.lua:1754: in function
func'
Interface\FrameXML\CompactUnitFrame.lua:201: in functionCompactUnitFrame_SetUpFrame' ...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:108: in function
ApplyFrameOptions'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:84: in function `OnNamePlateAdded'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:44: in function <...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:35>Locals: (*temporary) = {
otherHealPrediction = {
}
overAbsorbGlow = {
}
myHealAbsorbLeftShadow = {
}
border = {
}
barTexture = {
}
totalAbsorb = {
}
myHealAbsorb = {
}
myHealPrediction = {
}
myHealAbsorbRightShadow = {
}
0 =
background = {
}
overHealAbsorbGlow = {
}
totalAbsorbOverlay = {
}
}
(*temporary) = 12
This is just a personal opinion, but I think displaying level of everyone who is max level is unnecessary, but it's still an option I'd want enabled to see 1. mob levels 2. Someone under max level
This can be achieved easily on line 304 in core.lua:
if ( targetLevel == -1 ) or ( targetLevel == MAX_PLAYER_LEVEL_TABLE[GetAccountExpansionLevel()] and UnitIsPlayer(frame.displayedUnit) ) then
a suboption in the menu might be better: "Hide max-level player levels."
Cheers.
Not really an issue since it's not a feature but it would be nice since I can't set the font to my frames font.
nPlates\config.lua:132: in function <nPlates\config.lua:130>
Locals:
self = ExecuteSlider {
0 = <userdata>
text = ExecuteSliderText {
}
minValue = 0
maxValue = 35
textLow = ExecuteSliderLow {
}
High = ExecuteSliderHigh {
}
textHigh = ExecuteSliderHigh {
}
Low = ExecuteSliderLow {
}
When looking at NPCs
Message: Interface\AddOns\nPlates\core.lua:203: attempt to index field 'healthString' (a nil value)
Time: 08/02/16 07:53:56
Count: 1
Stack: Interface\AddOns\nPlates\core.lua:203: in function <Interface\AddOns\nPlates\core.lua:191>
[C]: in function CompactUnitFrame_UpdateStatusText' Interface\FrameXML\CompactUnitFrame.lua:294: in function
CompactUnitFrame_UpdateAll'
Interface\FrameXML\CompactUnitFrame.lua:171: in function CompactUnitFrame_SetUnit' ...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:270: in function
OnAdded'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:59: in function `OnNamePlateAdded'
...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:24: in function <...e\AddOns\Blizzard_NamePlates\Blizzard_NamePlates.lua:18>
Locals: frame = NamePlate1UnitFrame {
otherHealPrediction = {
}
LoseAggroAnim = {
}
selectionHighlight = {
}
myHealAbsorb = {
}
classificationIndicator = {
}
myHealAbsorbLeftShadow = {
}
maxDebuffs = 0
unit = "nameplate1"
RaidTargetFrame = {
}
maxDispelDebuffs = 0
disableMouse = true
inVehicle = false
0 =
statusText = {
}
ClassificationFrame = {
}
castBar = {
}
displayedUnit = "nameplate1"
unitExists = true
optionTable =
1x [ADDON_ACTION_BLOCKED] AddOn 'nPlates' tried to call the protected function 'SetTargetClampingInsets()'.
!BugGrabber\BugGrabber.lua:519: in function <!BugGrabber\BugGrabber.lua:519>
[C]: in function `SetTargetClampingInsets'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:273: in function `SetupClassNameplateBars'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:96: in function `OnNamePlateAdded'
...eBlizzard_NamePlates\Blizzard_NamePlates.lua:51: in function <...eBlizzard_NamePlates\Blizzard_NamePlates.lua:42>
Locals:
InCombatSkipped
I don't exactly know when this error occurs. Probably when entering/leaving combat.
Hello Grimsbain,
i have a little error at the looking of the personal resource nPlates. As you can see on the attached screen, i'm not in a raid or group. The PR is on the bottom left screen and no the nPlate design.
I can't get it away with /rl in or out of combat. If i die (f.e.) it will reset it. It will happen also on windows or mac client.
Can a do something that this is not gona happen?
Greetings,
Daneras
I've been going through the addons I use one at a time trying to work out what is the root cause of the occasional errors I find, I know something is causing taint somewhere and then other mods are getting the blame.
I enabled the taint log and I've been going through one addon at a time, current I've only got nPlates enabled and I got this in the taint.log file.
2/26 13:37:18.637 Global variable nPlates_OnEvent tainted by nPlates - Interface\AddOns\nPlates\core.lua:17
2/26 13:37:18.637 Global variable SLASH_nplates1 tainted by nPlates - Interface\AddOns\nPlates\slash.lua:35
This was just logging in and then logging out, there were no visible name plates on the screen.
When you die nameplate(healthbar) under your character ingame gets bugg and dissapear, only with reload it reworks.
What happened to your release?
Hi! Friendly namplates were not skinned running a dungeon. See below screenshot. Is it normal? Thanks.
Screenshot
After typing /nplates config into the chat I get hit with a lua error. I might be unrelated to nPlates. See attachment
As of the latest update, health text from this addon is also appearing on raid frames.
Think you're just missing this in the UpdateStatusText hook
if ( not frame.isNameplate ) then return end
EDIT: actually I guess this does cause same error sorry argh
but now that friendly not being modified the self buffs are wonky again... spaced so far away from bar
that part is changeable, i made a small addon to remove that space
it just changes baseYOffset and does not taint
perhaps you could add something similar?
edit: and maybe adjust or add option for z/layer/strata of player bar too if possible? i guess not
thanks!
-- http://www.mmo-champion.com/threads/2003404-Question-about-the-Legion-center-screen-HP-resource-bar
-- small name font
local frame = CreateFrame("FRAME", "RagePlateFrame");
frame:RegisterEvent("PLAYER_ENTERING_WORLD");
local function eventHandler(self, event, ...)
DefaultCompactNamePlateFrameSetUpOptions.useLargeNameFont = false;
end
frame:SetScript("OnEvent", eventHandler);
-- position buffs & debuffs
local function fn(...)
for _,v in pairs(C_NamePlate.GetNamePlates()) do
local bf = v.UnitFrame.BuffFrame;
bf.baseYOffset = 0;
bf:UpdateAnchor();
end
-- for _,v in pairs(C_NamePlate.GetNamePlateForUnit("target")) do
-- local df = v.TargetFrame.BuffFrame;
-- df.baseYOffset = 0;
-- df:UpdateAnchor();
-- end
end
NamePlateDriverFrame:HookScript("OnEvent", fn);
-- show debuffs
-- local gn = UnitAura;
-- local function fn(...)
-- local a = {gn(...)};
-- a[15] = a[6] ~= nil and abs(a[6] - 31) < 31;
-- return unpack(a);
-- end
-- UnitAura=fn;
--/run local b={196608,126896};local gn=UnitAura;local function fn(...)local a={gn(...)};a[15]=a[6]~=nil and not tContains(b,a[11])and abs(a[6]-31)<31;return unpack(a);end UnitAura=fn;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.