phanx-wow / OPieMasque

WoW AddOn — Adds Masque skinning support to OPie.
Other
2 stars 1 forks source link

Not working with patch. #4

Open griddark opened 1 year ago

griddark commented 1 year ago

1x OPieSliceButton1:CreateTexture(): Couldn't find inherited node "1"

string "=[C]": in function CreateTexture' [string "@Interface/AddOns/OPieMasque/Addon.lua"]:192: in functionCreateIndicator' [string "@Interface/AddOns/OPie/OPieUI.lua"]:152: in function <Interface/AddOns/OPie/OPieUI.lua:148> [string "@Interface/AddOns/OPie/OPieUI.lua"]:502: in function <Interface/AddOns/OPie/OPieUI.lua:491>

[string "@Interface/AddOns/OPieMasque/Addon.lua"]:228: in main chunk

Locals: (*temporary) = "OPieSliceButton1:CreateTexture(): Couldn't find inherited node "1""

DavidRosseljong commented 1 year ago

I am no longer developing or maintaining World of Warcraft addons. I haven't played in years, and don't have the time or interest to continue working on addons for a game I don't play anymore. If you are an addon author interested in continuing one of my addons, please see https://phanx.net/addons/. If you are an addon user, sorry, but there won't be any more fixes or updates from me.

I guess we need to fix it ourselfs.

ETSeki commented 1 year ago

You just have to swap line 192 of the addon.lua in the OpieMasque folder with button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", nil, 1)

griddark commented 1 year ago

You just have to swap line 192 of the addon.lua in the OpieMasque folder with button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", nil, 1) With the updated version of Opie I'm seeing this error

2x Interface/AddOns/OPieMasque/Addon.lua:13: OPie not found [string "=[C]"]: in function `assert' [string "@Interface/AddOns/OPieMasque/Addon.lua"]:13: in main chunk

Locals: (temporary) = nil (temporary) = "OPie not found"

tucomel commented 1 year ago

You just have to swap line 192 of the addon.lua in the OpieMasque folder with button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", nil, 1) With the updated version of Opie I'm seeing this error

2x Interface/AddOns/OPieMasque/Addon.lua:13: OPie not found [string "=[C]"]: in function `assert' [string "@Interface/AddOns/OPieMasque/Addon.lua"]:13: in main chunk

Locals: (temporary) = nil (temporary) = "OPie not found"

same problem here image

Corazu commented 1 year ago

I've got a fix for this, unfortunately I'm unable to push a pull request. But I've emailed the author about it so maybe we can get this updated.

Patch file listed below.

Replace line 13 Old: assert(OneRingLib and OneRingLib.ext and OneRingLib.ext.OPieUI, "OPie not found") New: assert(OPie and OPie.UI and OPie.UI.RegisterIndicatorConstructor, "OPie not found")

Replace line 192 (Thanks to @ETSeki above): Old: button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", 1) New: button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", nil, 1)

Replace Line 228: Old: OneRingLib.ext.OPieUI:SetIndicatorConstructor(CreateIndicator) New: OPie.UI:RegisterIndicatorConstructor("OpieMasque", {CreateIndicator=CreateIndicator, name="OpieMasque", apiLevel=1})

At Line 77, add this new function: After the function function prototype:SetOverlayIcon(texture, w, h, ...) -- not entirely sure what this is for Make sure you add this new function after the end line of that function that starts with the function line above, and not after the function line itself

Add

function prototype:SetOverlayIconVertexColor(...) -- not sure what this is for, copied code from Mirage.lua in OPie
    self.overIcon:SetVertexColor(...)
end

With those 4 changes it should all work again :)

TLDR: OPie made some changes for Dragonflight, and in doing so renamed OneRingLib to OPie for the library table, and also pulled the ext table out and merged it just into the OPie table as UI. That's the change on Line 13.

The other change is that in the older version of OPie, calling SetIndicatorConstructor was deprecated and it looks like with the DF update they removed it, so it needed to be changed to use RegisterIndicatorConstructor instead. I'm not 100% sure this is perfect, but it doesn't pop up any errors anymore and it shows up in Masque, and, for all I can tell, works :)

I'll tag all the users so you get an email about this and can fix it yourself locally if you so desire.

@tucomel @griddark @DavidRosseljong

Aur0r4 commented 1 year ago

Awesome! Thank you for fixing it. It's working for me.

image

thehumandistraction commented 1 year ago

Unfortunately, even after making the above changes to the Addon.lua file, it still remains unskinned. I'm wondering if perhaps the latest patch caused any issues?

Aur0r4 commented 1 year ago

Still working for me. image

Try to re-download the addon and apply the fix from Corazu again.

thehumandistraction commented 1 year ago

You're right it does work!

The issue was that OPieMasque was not selected under the Appearance settings, probably due to changes in OPie itself.

WoWScrnShot_111622_194718

azuraji commented 1 year ago

I've got a fix for this, unfortunately I'm unable to push a pull request. But I've emailed the author about it so maybe we can get this updated.

Patch file listed below.

Replace line 13 Old: assert(OneRingLib and OneRingLib.ext and OneRingLib.ext.OPieUI, "OPie not found") New: assert(OPie and OPie.UI and OPie.UI.RegisterIndicatorConstructor, "OPie not found")

Replace line 192 (Thanks to @ETSeki above): Old: button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", 1) New: button.OverlayIcon = button:CreateTexture(nil, "ARTWORK", nil, 1)

Replace Line 228: Old: OneRingLib.ext.OPieUI:SetIndicatorConstructor(CreateIndicator) New: OPie.UI:RegisterIndicatorConstructor("OpieMasque", {CreateIndicator=CreateIndicator, name="OpieMasque", apiLevel=1})

At Line 77, add this new function: After the function function prototype:SetOverlayIcon(texture, w, h, ...) -- not entirely sure what this is for

Add

function prototype:SetOverlayIconVertexColor(...) -- not sure what this is for, copied code from Mirage.lua in OPie
  self.overIcon:SetVertexColor(...)
end

With those 3 changes it should all work again :)

TLDR: OPie made some changes for Dragonflight, and in doing so renamed OneRingLib to OPie for the library table, and also pulled the ext table out and merged it just into the OPie table as UI. That's the change on Line 13.

The other change is that in the older version of OPie, calling SetIndicatorConstructor was deprecated and it looks like with the DF update they removed it, so it needed to be changed to use RegisterIndicatorConstructor instead. I'm not 100% sure this is perfect, but it doesn't pop up any errors anymore and it shows up in Masque, and, for all I can tell, works :)

I'll tag all the users so you get an email about this and can fix it yourself locally if you so desire.

@tucomel @griddark @DavidRosseljong

Thanks for the excellent compilation of fixes to makes this addon work again!

Just two things: on line 77, the function needs to end with an end keyword I believe. And you mean the five changes, not three, right?

Corazu commented 1 year ago

Thanks for the excellent compilation of fixes to makes this addon work again!

Just two things: on line 77, the function needs to end with an end keyword I believe. And you mean the five changes, not three, right?

Well it was 4, but originally it was 3 because I forgot I had already applied the Line 192 change and edited it in afterwards since I thought it should be a comprehensive list. But then didn't update the number. I'll do that now for sanity sake.

As for line 77, the function I added does end with an end, the function I referenced I only put the signature line in. As a software dev myself (although not a LUA expert) I realize I might take for granted those instructions "should be obvious" when to a non-coder that might be unclear. Let me update those instructions.

azuraji commented 1 year ago

Thanks for the excellent compilation of fixes to makes this addon work again! Just two things: on line 77, the function needs to end with an end keyword I believe. And you mean the five changes, not three, right?

Well it was 4, but originally it was 3 because I forgot I had already applied the Line 192 change and edited it in afterwards since I thought it should be a comprehensive list. But then didn't update the number. I'll do that now for sanity sake.

As for line 77, the function I added does end with an end, the function I referenced I only put the signature line in. As a software dev myself (although not a LUA expert) I realize I might take for granted those instructions "should be obvious" when to a non-coder that might be unclear. Let me update those instructions.

It's much clearer now, thank you so much 🎉

raptormama commented 1 year ago

Until the addon.lua file on GitHub is finally updated, here's a pre-modified version. It is a shame that Github won't allow fixes to be submitted directly.

You'll need to remove the .txt extension and then drop it in the OpieMasque folder, overwriting the existing file. (Backing it up is highly recommended).

Addon.lua.txt

chasaya commented 1 year ago

First of all, huge thanks to everyone fixing this, now that i have my pretty rounded Opie buttons back, my OCD has been soothed 😄

I've found one minor issue which occurs only for my Mage so far, who has a nested ring within a nested ring for Portals and Teleports displaying as a Jump Slice (it's nested in my general porting and hearthstone ring). As soon as i mouse over the nested ring which contains the Mage Port ring, this happens:

Error Message ``` OPieMasque/Addon.lua:83: attempt to index field 'overIcon' (a nil value) [string "@OPieMasque/Addon.lua"]:83: in function `SetOverlayIconVertexColor' [string "@OPie/OPieUI.lua"]:312: in function [string "@OPie/OPieUI.lua"]:379: in function Locals: self = OPieSliceButton17 { 0 = SetNormalAtlas = defined =[C]:-1 FlyoutArrowContainer = Frame { } NewActionTexture = Texture { } RightDivider = Frame { } __MSQ_bType = "Action" __MSQ_NewNormal = Texture { } UpdateButtonArt = defined =[C]:-1 icon = OPieSliceButton17Icon { } SlotArt = Texture { } AutoCastable = Texture { } __MSQ_Scale = 1 SetHighlighted = defined @OPieMasque/Addon.lua:138 icon_r = 1 OverlayIcon = Texture { } HotKey = OPieSliceButton17HotKey { } HighlightTexture = Texture { } SetIconVertexColor = defined @OPieMasque/Addon.lua:33 __MSQ_NormalHook = true SetDominantColor = defined @OPieMasque/Addon.lua:56 __MSQ_Enabled = true SetIcon = defined @OPieMasque/Addon.lua:24 IconMask = MaskTexture { } SetCooldownTextShown = defined @OPieMasque/Addon.lua:134 __Regions = { } Icon = OPieSliceButton17Icon { } SpellHighlightAnim = AnimationGroup { } __MSQ_IsAction = true __MSQ_EmptyType = true PushedTexture = Texture { } Count = OPieSliceButton17Count { } SetOverlayIconVertexColor = defined @OPieMasque/Addon.lua:82 __MSQ_Icon = OPieSliceButton17Icon { } SetNormalTexture = defined =[C]:-1 NormalTexture = OPieSliceButton17NormalTexture { } GetShowGrid = defined @FrameXML/ActionButton.lua:1201 icon_g = 1 CheckedTexture = Texture { } Flash = OPieSliceButton17Flash { } __MSQ_UpdateButtonArt = true SetOuterGlow = defined @OPieMasque/Addon.lua:146 __MSQ_Addon = "OPie" SetActive = defined @OPieMasque/Addon.lua:142 SetIconTexCoord = defined @OPieMasque/Addon.lua:28 Cooldown = OPieSliceButton17Cooldown { } ustate = 0 __MSQ_Shape = "Circle" icon_b = 1 __MSQ_ChargeSkin =
{ } GlowTextures =
{ } Name = OPieSliceButton17Name { } BottomDivider = Frame { } LevelLinkLockIcon = Texture { } __MSQ_Skin =
{ } BaseActionButtonMixin_OnLoad = defined @FrameXML/ActionButton.lua:1194 __MSQ_Normal = Texture { } SetCount = defined @OPieMasque/Addon.lua:78 FlyoutBorderShadow = OPieSliceButton17FlyoutBorderShadow { } Border = OPieSliceButton17Border { } SetUsable = defined @OPieMasque/Addon.lua:41 __MSQ_NormalSkin =
{ } SetBinding = defined @OPieMasque/Addon.lua:99 SetCooldown = defined @OPieMasque/Addon.lua:109 SetShowGrid = defined @FrameXML/ActionButton.lua:1206 SpellHighlightTexture = Texture { } SetCooldownFormattedText = defined @OPieMasque/Addon.lua:130 SetOverlayIcon = defined @OPieMasque/Addon.lua:65 __MSQ_oType = "CheckButton" SetEquipState = defined @OPieMasque/Addon.lua:155 SlotBackground = Texture { } AutoCastShine = OPieSliceButton17Shine { } cooldown = OPieSliceButton17Cooldown { } } (*temporary) = nil (*temporary) = nil (*temporary) = nil (*temporary) = "attempt to index field 'overIcon' (a nil value)" ```

Commenting out line 79 self.overIcon:SetVertexColor(...)

function prototype:SetOverlayIconVertexColor(...) -- not sure what this is for, copied code from Mirage.lua in OPie
--  self.overIcon:SetVertexColor(...)
end

solves the issue for me, but i'm a complete programming noob and this might not be the best way to go. Maybe the whole function could be removed, but I've not tested that. So far with this little change my Opie has been running smoothly, Hope this helps!

Corazu commented 1 year ago

Commenting out line 79 self.overIcon:SetVertexColor(...)

Surprised by this, I specifically added that function because of other errors.

Although, I have no idea what it does or is supposed to do. It probably needs to do something different for sub-slices.

Would have to reach out to the OPie dev to ask about it probably, or look at some other reference if available.

chasaya commented 1 year ago

I should also add that so far, commenting out line 79 has not caused errors for me on any of my characters, regardless if they have "double-nested" rings like my mage or not. Maybe it's also depending on which Masque skin is used (i'm using a skin called Adorn: Dark Round, think it comes in the Trinity pack)? In the meantime I'll keep my fingers crossed that everything will not break again once the actual expansion hits the servers 😄. Thanks again!

cr4ckp0t commented 1 year ago

For those not comfortable making the changes attached is the fixed file. Rename the file to Addon.lua and replace the version in Addons\OPieMasque. Addon.lua.txt

Dreadful-Sanity commented 1 year ago

Changes stopped working. Main ring is invisible (while tooltip of default slice is shown), jump slices appear when I manage to show them, but don't have the masque skin.

Images (Imgur) Error message (Pastebin)

kstange commented 1 year ago

Just wanted to comment that I've forked and updated OPie Masque, kstange/OPieMasque. It's now available on CurseForge under the name OPie Masque Revived.

MadsR commented 1 year ago

Just wanted to comment that I've forked and updated OPie Masque, kstange/OPieMasque. It's now available on CurseForge under the name OPie Masque Revived.

Make sure to add Classic to its usable versions.

kstange commented 1 year ago

Just wanted to comment that I've forked and updated OPie Masque, kstange/OPieMasque. It's now available on CurseForge under the name OPie Masque Revived.

Make sure to add Classic to its usable versions.

I'm reluctant to support Classic given I don't play it and will never notice if things break, but if you can create a request over on my repo indicating which classic variant you're using along with any issues, errors, or modifications relative to my 10.0.2.1 release needed to get it working, I'll see what I can make happen.

MadsR commented 1 year ago

Just wanted to comment that I've forked and updated OPie Masque, kstange/OPieMasque. It's now available on CurseForge under the name OPie Masque Revived.

Make sure to add Classic to its usable versions.

I'm reluctant to support Classic given I don't play it and will never notice if things break, but if you can create a request over on my repo indicating which classic variant you're using along with any issues, errors, or modifications relative to my 10.0.2.1 release needed to get it working, I'll see what I can make happen.

I have been using the fixes discussed here, and now using your forked update and it doesn't appear to need any alterations.

kstange commented 1 year ago

Just wanted to comment that I've forked and updated OPie Masque, kstange/OPieMasque. It's now available on CurseForge under the name OPie Masque Revived.

Make sure to add Classic to its usable versions.

I'm reluctant to support Classic given I don't play it and will never notice if things break, but if you can create a request over on my repo indicating which classic variant you're using along with any issues, errors, or modifications relative to my 10.0.2.1 release needed to get it working, I'll see what I can make happen.

I have been using the fixes discussed here, and now using your forked update and it doesn't appear to need any alterations.

Are you on Classic Era or Wrath Classic?

kstange commented 1 year ago

Just wanted to comment that I've forked and updated OPie Masque, kstange/OPieMasque. It's now available on CurseForge under the name OPie Masque Revived.

Make sure to add Classic to its usable versions.

I'm reluctant to support Classic given I don't play it and will never notice if things break, but if you can create a request over on my repo indicating which classic variant you're using along with any issues, errors, or modifications relative to my 10.0.2.1 release needed to get it working, I'll see what I can make happen.

I have been using the fixes discussed here, and now using your forked update and it doesn't appear to need any alterations.

I went ahead and did a quick test on both Classic clients and released an update with 1.14.3 and 3.4.0 as compatible versions. If there are any issues, please report them on my repo here. Thanks!