Sellorio / mega-macro

A World of Warcraft AddOn that replaces the built in macro functionality allowing more and bigger macros.
18 stars 13 forks source link

[Bug] MegaMacro UI won't populate in Dragonflight #158

Closed Soromeister closed 1 year ago

Soromeister commented 1 year ago

Hi @Sellorio, are there any plans to continue development of this addon in Dragonflight? Asking to know whether it's feasible to port all my macros to your addon, while Dragonflight approaches quickly with the pre-patch.

sellorio2 commented 1 year ago

Hopefully dragonflight either doesn't modify any macro system code or has its own new macro ui. I suspect the former in which case ignoring out of date addons should work.

I don't have any plans to play dragonflight at this time.

If you or someone else can confirm that the addon works in dragonflight I'll bump the version so you don't have to tick that box just for me :P

jschick04 commented 1 year ago

I have tested it in DF and PTR and the addon itself seems to work but the issue is the MegaMacro UI doesn't get populated, and the old macro window still gets displayed. And when I say it works, any existing macro still works but unable to edit the actual macro or create any new macros since the default UI only shows the MegaMacro code. image

sellorio2 commented 1 year ago

Looks like the new tabs ui is a breaking change. Wouldn't be surprised if it's not too hard to fix. Maybe i'll make a level 1 character to test fixes without buying dragonflight or subbing.

Soromeister commented 1 year ago

I can confirm the same behavior as @jschick04 found.. Was just a bit late to test this. I will update the issue title to make it a bug instead.

durandal42 commented 1 year ago

First day of 10.0, and I see similar UI as jschick04's screenshot, but the old macro UI is not also visible.

More concerningly, all of my existing megamacros (on my actionbars) do nothing when clicked.

aurelion314 commented 1 year ago

More concerningly, all of my existing megamacros (on my actionbars) do nothing when clicked.

Same here. Its not just the UI, the macro's themselves do not currently work.

I hope this can be fixed, because I rely heavily on mega macro and would hate to lose it.

durandal42 commented 1 year ago

One specific macro works!

        {
            ["Scope"] = "gg",
            ["Code"] = "#showtooltip\n/cast [button:1] Eternal Traveler's Hearthstone\n/stopmacro [button:1]\n/cast Revive Battle Pets\n/camp\n",
            ["Id"] = 5,
            ["StaticTexture"] = 134400,
            ["ScopedIndex"] = 5,
            ["DisplayName"] = "home",
        }, -- [13]

... sort of.

It does nothing if I left click it (intended to cast hearthstone and then /stopmacro), but it does log me out if I right-click it.

AFAICT none of my other macros work at all.

aurelion314 commented 1 year ago

I've found similar issues discussed with other addons. It sounds like blizzard messed up how clicks are registered for the "SecureActionButtonTemplate" frame, which is what the macros are.

forum post: https://us.forums.blizzard.com/en/wow/t/dragonflight-click-bindings-broken/1361972/9 bug post: https://github.com/Stanzilla/WoWUIBugs/issues/283

Sellorio commented 1 year ago

I'm done with wow for the foreseeable future and my only regret is not being able to continue maintaining this addon.

@aurelion314 if you'd be willing I'm happy to support you in updating the addon for 10.0. I am even happy to be in a call the whole time but I can't motivate myself to drive the development myself.

aurelion314 commented 1 year ago

@Sellorio Can't blame you heh. I don't mind helping maintain it, but first need to figure out if this event bug is even fixable. I'm trying some hacks right now but haven't got anything to work..

durandal42 commented 1 year ago

More anecdata: all(?) of my macros behave correctly if I right-click them on my action bar. Left-click doesn't work. Pressing an assigned keybind doesn't work.

ghost commented 1 year ago

It looks like blizz has to work on it themself, because if you make a macro without the addon you can't use the "hold to cast"-feature. So they are in trouble with their left click also.

angrygeek commented 1 year ago

If it helps either of you this was posted by a user over on the curseforge page

errors since prepatch, only addons on (bugsack, buggrabber, mega macro):

1x ...e/AddOns/MegaMacro/src/windows/mega-macro.window.lua:229: attempt to index local 'buttonName' (a nil value) [string "@Interface/AddOns/MegaMacro/src/windows/mega-macro.window.lua"]:229: in function <...e/AddOns/MegaMacro/src/windows/mega-macro.window.lua:208> [string "@Interface/AddOns/MegaMacro/src/windows/mega-macro.window.lua"]:507: in function `MegaMacro_ButtonContainer_OnShow'

[string "=[C]"]: in function Show' [string "@Interface/FrameXML/UIParent.lua"]:2844: in functionSetUIPanel' [string "@Interface/FrameXML/UIParent.lua"]:2687: in function ShowUIPanel' [string "@Interface/FrameXML/UIParent.lua"]:2552: in function <Interface/FrameXML/UIParent.lua:2548> [string "=[C]"]: in functionSetAttribute' [string "@Interface/FrameXML/UIParent.lua"]:3150: in function ShowUIPanel' [string "@Interface/AddOns/MegaMacro/src/windows/mega-macro.window.lua"]:407: in functionShow' [string "@Interface/AddOns/MegaMacro/src/main.lua"]:27: in function ?' [string "@Interface/FrameXML/ChatFrame.lua"]:5219: in functionChatEdit_ParseText' [string "@Interface/FrameXML/ChatFrame.lua"]:4883: in function ChatEdit_SendText' [string "@Interface/FrameXML/ChatFrame.lua"]:4919: in functionChatEdit_OnEnterPressed'

Locals: items =

{ 1 =
{ } 2 =
{ } 3 =
{ } 4 =
{ } 5 =
{ } 6 =
{ } 7 =
{ } 8 =
{ } 9 =
{ } 10 =
{ } 11 =
{ } 12 =
{ } 13 =
{ } 14 =
{ } 15 =
{ } 16 =
{ } 17 =
{ } 18 =
{ } 19 =
{ } 20 =
{ } 21 =
{ } 22 =
{ } 23 =
{ } 24 =
{ } 25 =
{ } 26 =
{ } } newMacroButtonCreated = false (for index) = 1 (for limit) = 60 (for step) = 1 i = 1 buttonFrame = MegaMacro_MacroButton1 { Macro =
{ } 0 = IsNewButton = false } buttonName = nil buttonIcon = nil macro =
{ Scope = "gg" StaticTexture = 648208 Code = "/readycheck" Id = 25 IsStaticTextureFallback = true ScopedIndex = 29 DisplayName = "1.OBLIVION leadycheck" } (temporary) = defined =[C]:-1 (temporary) = nil (temporary) = MegaMacro_MacroButton1 { Macro =
{ } 0 = IsNewButton = false } (temporary) = "Buttons\ButtonHilight-Square" (temporary) = "ADD" (temporary) = (temporary) = nil (temporary) = "attempt to index local 'buttonName' (a nil value)" SelectedScope = "gg" MacroItems =
{ 1 =
{ } 2 =
{ } 3 =
{ } 4 =
{ } 5 =
{ } 6 =
{ } 7 =
{ } 8 =
{ } 9 =
{ } 10 =
{ } 11 =
{ } 12 =
{ } 13 =
{ } 14 =
{ } 15 =
{ } 16 =
{ } 17 =
{ } 18 =
{ } 19 =
{ } 20 =
{ } 21 =
{ } 22 =
{ } 23 =
{ } 24 =
{ } 25 =
{ } 26 =
{ } } GetMacroButtonUI = defined @Interface/AddOns/MegaMacro/src/windows/mega-macro.window.lua:42 PlusTexture = 3192688 SelectMacro = defined @Interface/AddOns/MegaMacro/src/windows/mega-macro.window.lua:175

georgi-chinov commented 1 year ago

hhah that's my post, I came here to post it but I see it's done already.

Hope you can maintain the addon, myself and a lot of players are quite dependent on it.

Dannez83 commented 1 year ago

As mentioned there does seem to be a couple of different bugs. One to do with clicks/keybinds - which I think is a Blizzard issue, and one to do with the tabs ui. In addition to the above error, there are also the two below.

90x Interface/SharedXML/SharedUIPanelTemplates.lua:503: attempt to index field 'Text' (a nil value)
[string "@Interface/SharedXML/SharedUIPanelTemplates.lua"]:503: in function `PanelTemplates_TabResize'
[string "*mega-macro.window.xml:316_OnLoad"]:1: in function <[string "*mega-macro.window.xml:316_OnLoad"]:1>

Locals:
tab = MegaMacro_FrameTab1 {
 0 = <userdata>
}
padding = -8
absoluteSize = nil
minWidth = nil
maxWidth = nil
absoluteTextSize = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'Text' (a nil value)"
TAB_SIDES_PADDING = 20
15x Interface/SharedXML/SharedUIPanelTemplates.lua:619: attempt to index field 'Left' (a nil value)
[string "@Interface/SharedXML/SharedUIPanelTemplates.lua"]:619: in function `PanelTemplates_SelectTab'
[string "@Interface/SharedXML/SharedUIPanelTemplates.lua"]:484: in function `PanelTemplates_UpdateTabs'
[string "@Interface/SharedXML/SharedUIPanelTemplates.lua"]:465: in function `PanelTemplates_SetTab'
[string "@Interface/AddOns/MegaMacro/src/windows/mega-macro.window.lua"]:452: in function `MegaMacro_Window_OnLoad'
[string "*mega-macro.window.xml:39_OnLoad"]:2: in function <[string "*mega-macro.window.xml:39_OnLoad"]:1>

Locals:
tab = MegaMacro_FrameTab1 {
 0 = <userdata>
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field 'Left' (a nil value)"

I haven't done any addon dev for years, but I will have a go at this tonight/tomorrow as I seriously cannot live without this addon

Dannez83 commented 1 year ago

@Sellorio

Fix for keybinds/leftclick. Basically Left Click has to be explicitly declared now in he template macros that get written to the default macro storage

E:\World of Warcraft_retail_\Interface\AddOns\MegaMacro\src\engine\mega-macro-engine.lua replace line 123 "/click [btn:1] "..ClickyFrameName..macroId.." \n"..

with "/click [btn:1] "..ClickyFrameName..macroId.." LeftButton\n"..

durandal42 commented 1 year ago

Confirmed that the keybind/leftclick solution from @Dannez83 works!

I still can't edit macros, but being able to use my existing ones is a huge step forward!

Dannez83 commented 1 year ago

Confirmed that the keybind/leftclick solution from @Dannez83 works!

I still can't edit macros, but being able to use my existing ones is a huge step forward!

starting on that now

Dannez83 commented 1 year ago

Looks like they've changed some of the ui identifiers that are being inherited. Making progress Screenshot 2022-10-26 182803

aurelion314 commented 1 year ago

@Dannez83 awesome find! I was worried we'd have to wait for Blizzard.

Do you have a branch or fork that you're working on? I don't mind helping since I'm probably not alone in needing this to work before I can really enjoy anything in the new patch.

Dannez83 commented 1 year ago

@Dannez83 awesome find! I was worried we'd have to wait for Blizzard.

Do you have a branch or fork that you're working on? I don't mind helping since I'm probably not alone in needing this to work before I can really enjoy anything in the new patch.

I hadn't set one up yet. Was going to do it if I fixed everything, but I'll happily set one up now and update with the changes I've made so far. Don't mind sharing the load

Dannez83 commented 1 year ago

@aurelion314 I've sent you an invite to the fork. I've got it to the point where all the tabs are appearing again. I believe what's stopping the macros showing up is related to the macro button that is used to add new macros.

fork is here for anyone else to download as well https://github.com/Dannez83/mega-macro

aurelion314 commented 1 year ago

@Dannez83 Awesome thanks, I'm at the same spot I think. My current error is also a buttonName issue, which might be related to how the xml error (after the inheritance errors) had a problem on the getName() line.

I'll try out your fork and see if its different.

aurelion314 commented 1 year ago

So where I'm at: The code assumes each macro button in the edit window has an Icon and Name frame to go along with it.

EX: _G['MegaMacro_MacroButton1'] It expects there to also be a _G['MegaMacro_MacroButton1Name'] and _G['MegaMacro_MacroButton1Icon'], which are frames that it tries to modify. Problem is they don't exists and I don't see where they are supposed to be set. My guess is that the old inherited frame "SimplePopupButtonTemplate" which has been replaced with "SelectorButtonTemplate", used to generate that automatically.

@Sellorio Do you recall where/how the Icon and Name frames get created? Or am I right that its a template thing? For context, The error is when you open the macro menu, and it tries to fill the macro icons but while the button frame exists, it can't set the name/icon.

aurelion314 commented 1 year ago

@Dannez83 I have it functional! It works (I can modify and rebind macros, and see icons), but I commented out a few things so the macro names are hidden. Will have to fix it properly but this is progress! I might have to go soon so if I don't get around to pushing to your fork, here is what I did:

  1. Change line 44 from return _G[buttonName], _G[buttonName .. "Name"], _G[buttonName .. "Icon"] to return _G[buttonName], _G[buttonName .. "Name"], _G[buttonName].Icon (The Icon is a child of the button frame now, not its own global variable.)

  2. Comment out any lines in the same file that use MegaMacro_FrameSelectedMacroButtonIcon (this is the editing macro icon. temporary fix just hides it)

That, along with the other changes you've already done, was enough to make it functional.

mgrune commented 1 year ago

Really appreciate you guys working so hard on the addon. It's much appreciated.

Dannez83 commented 1 year ago

@Dannez83 I have it functional! It works (I can modify and rebind macros, and see icons), but I commented out a few things so the macro names are hidden. Will have to fix it properly but this is progress! I might have to go soon so if I don't get around to pushing to your fork, here is what I did:

  1. Change line 44 from return _G[buttonName], _G[buttonName .. "Name"], _G[buttonName .. "Icon"] to return _G[buttonName], _G[buttonName .. "Name"], _G[buttonName].Icon (The Icon is a child of the button frame now, not its own global variable.)
  2. Comment out any lines in the same file that use MegaMacro_FrameSelectedMacroButtonIcon (this is the editing macro icon. temporary fix just hides it)

That, along with the other changes you've already done, was enough to make it functional.

Nice one @aurelion314. Well done. I'll update the fork edit: is there anything else you changed as that's not working for me

Dannez83 commented 1 year ago

@aurelion314 I think I've commented out everything needed but I'll leave it for you to update the fork just to be sure

durandal42 commented 1 year ago

is there anything else you changed as that's not working for me

After downloading the latest code from https://github.com/Dannez83/mega-macro and applying the fix from @aurelion314 above, I get tabs ([Global][Paladin][Protection][Lintilla][Lintilla Protecti...]) but only two icons appear, and it's the same two (in the same positions) in each tab.

I can't meaningfully interact with this window yet.

Dannez83 commented 1 year ago

is there anything else you changed as that's not working for me

After downloading the latest code from https://github.com/Dannez83/mega-macro and applying the fix from @aurelion314 above, I get tabs ([Global][Paladin][Protection][Lintilla][Lintilla Protecti...]) but only two icons appear, and it's the same two (in the same positions) in each tab.

I can't meaningfully interact with this window yet.

I have updated with some additional lines commented out. Try downloading it again. It's in a working state now at least . The missing functionality is around icons and display names, but apart from that it will be at least functional

sellorio2 commented 1 year ago

@Dannez83 @aurelion314 this is good stuff! Thanks for the updates. Don't forget to add credits to yourselves in the readme for updating the addon for Dragonflight when you're done. And once it's all done I'll accept the PR and upload it to curse (with credits there too).

durandal42 commented 1 year ago

Try downloading it again.

I'm confused; the last commit I can see here https://github.com/Dannez83/mega-macro/commits/master was ~3 hours ago, well before my most recent download (and then patch with @aurelion314's tweaks).

Dannez83 commented 1 year ago

Try downloading it again.

I'm confused; the last commit I can see here https://github.com/Dannez83/mega-macro/commits/master was ~3 hours ago, well before my most recent download (and then patch with @aurelion314's tweaks).

sorry, in my rush to head off to bed I forgot to actually press the commit button. Done now

durandal42 commented 1 year ago

Good news and bad news:

Good: the latest commit has the [Global] tab working, and all the macros in there are editable and can be dragged onto action bars, where they then work.

Bad: every macro in the other tabs [Class][Specialization][CharacterName][CharacterName Specialization] are gone, and the macros from these tabs on my bars which functioned (but couldn't be edited) before this update are now dead.

So, for the time being, I'm reverting to the previous ~3 hours ago version, which is playable if not editable.

durandal42 commented 1 year ago

~3 hours ago version didn't fix it.

I've reverted all the way back to latest CurseForge version, and re-applied the fix from https://github.com/Sellorio/mega-macro/issues/158#issuecomment-1292327472

I also restored the copy of SavedVariables/MegaMacro.lua I made the night before 10.0, so I'm not sure whether the disappearance of my non-global macros was destructive.

Fluke667 commented 1 year ago

Not working

aurelion314 commented 1 year ago

Bad: every macro in the other tabs [Class][Specialization][CharacterName][CharacterName Specialization] are gone, and the macros from these tabs on my bars which functioned (but couldn't be edited) before this update are now dead.

@durandal42 I pushed a version that shouldn't do that anymore. It also fixes icons, names, and hides one error I haven't fixed yet.

Get it here: https://github.com/Dannez83/mega-macro

Shift clicking on spells in the spell book does not work yet. Still trying to figure that out, but sharing what I have so far since it is at least functional and gets everyone their macros back.

kingreboot commented 1 year ago

@aurelion314 I've sent you an invite to the fork. I've got it to the point where all the tabs are appearing again. I believe what's stopping the macros showing up is related to the macro button that is used to add new macros.

fork is here for anyone else to download as well https://github.com/Dannez83/mega-macro

Thanks for putting in the work, there is no real way to start a conversation on your project and was hoping to ask about setting up a release for that project in a way I could download it via wowup

aurelion314 commented 1 year ago

Thanks for putting in the work, there is no real way to start a conversation on your project and was hoping to ask about setting up a release for that project in a way I could download it via wowup

The author of the addon is still active in this thread, so once its fully fixed I'm sure he'll approve it here. Then you can update it as normal. For now we are using that fork to work on it.

kingreboot commented 1 year ago

got it, thanks for the update

jschick04 commented 1 year ago

Looks like something changed and now this change has to be reverted

E:\World of Warcraftretail\Interface\AddOns\MegaMacro\src\engine\mega-macro-engine.lua replace line 123 "/click [btn:1] "..ClickyFrameName..macroId.." \n"..

with "/click [btn:1] "..ClickyFrameName..macroId.." LeftButton\n"..

tomleung0117 commented 1 year ago

My macros are back, but couldn't be used by hotkey/left click etc... thoughts?

thanks a lot tho guys.

aurelion314 commented 1 year ago

@jschick04 @tomleung0117

I just let my client update and it still works. Version 10.0.0.46313. It did multiple updates at once, so maybe they broke it only temporarily? Anyway if it still doesn't work, can you verify and share your client version?

tomleung0117 commented 1 year ago

@aurelion314

the verison i have is 8fdd7e (https://github.com/Dannez83/mega-macro) , which was uploaded 5hours ago. Is this the correct one ? not very familiar with git hub btw.. ty!

aurelion314 commented 1 year ago

the verison i have is 8fdd7e (https://github.com/Dannez83/mega-macro) , which was uploaded 5hours ago. Is this the correct one ? not very familiar with git hub btw.. ty!

Yes that one is currently working for me.

wing5wong commented 1 year ago

just chiming in - macro icons etc load, can be editted and so on, but do not work with keybinds or click. actionbar flashes as if bind is going through ,but no spells are cast

reverting this makes it appear to work

Looks like something changed and now this change has to be reverted

E:\World of Warcraftretail\Interface\AddOns\MegaMacro\src\engine\mega-macro-engine.lua replace line 123 "/click [btn:1] "..ClickyFrameName..macroId.." \n"..

with "/click [btn:1] "..ClickyFrameName..macroId.." LeftButton\n"..

"/click [btn:1] "..ClickyFrameName..macroId.." \n".. is the working line for me

tomleung0117 commented 1 year ago

yup it works for me too!

gijsprins93 commented 1 year ago

How do i use the Fork one? Do i have to manually change the lua files myself or can i copy/replace some files?

aurelion314 commented 1 year ago

How do i use the Fork one? Do i have to manually change the lua files myself or can i copy/replace some files?

@gijsprins93 You have to replace the files with the forked files. Easiest to just replace everything. Files are in World of Warcraft\_retail_\Interface\AddOns\MegaMacro

You may have to tweak one line as mentioned by wing5wong. Personally changing that line breaks it for me, so try the forked version first and see.

gijsprins93 commented 1 year ago

How do i use the Fork one? Do i have to manually change the lua files myself or can i copy/replace some files?

@gijsprins93 You have to replace the files with the forked files. Easiest to just replace everything. Files are in World of Warcraft\_retail_\Interface\AddOns\MegaMacro

You may have to tweak one line as mentioned by wing5wong. Personally changing that line breaks it for me, so try the forked version first and see.

But it won't let me download it anywhere tho.