Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New expansion combability (TWW) #19

Open
Pandaabear0 opened this issue Jul 24, 2024 · 20 comments
Open

New expansion combability (TWW) #19

Pandaabear0 opened this issue Jul 24, 2024 · 20 comments

Comments

@Pandaabear0
Copy link

Hey! Any chance you will update this for The War Within? It's completely broken.

Or maybe let me know how I could possible do it myself.

@supersonic42
Copy link

+1 Need a fix for TWW.

@gotex007
Copy link

Oh no. I need this to properly differentiate between rogues and hunters.

@gotex007
Copy link

gotex007 commented Jul 26, 2024

I managed to fix the "!ClassColors/ClassColors.lua:378: attempt to call global 'InterfaceOptions_AddCategory' (a nil value)
[string "@!ClassColors/ClassColors.lua"]:378: in function <!ClassColors/ClassColors.lua:119>" error myself.

This post references what changes have to be made with the prepatch update.

Basically you need to

  1. open ClassColors.lua
  2. ctrl-F for InterfaceOptions_AddCategory(self);
  3. replace that line with category, layout = Settings.RegisterCanvasLayoutCategory(self, panel.name, self.name); category.ID = self.name Settings.RegisterAddOnCategory(category);
  4. ctrl-F for InterfaceOptionsFrame_OpenToCategory(self)
  5. replace the two lines of that (no idea why there are two) with Settings.OpenToCategory(category.ID)

Edit: Updated with proper variable name.

@Pandaabear0
Copy link
Author

Pandaabear0 commented Jul 26, 2024

I managed to fix the "!ClassColors/ClassColors.lua:378: attempt to call global 'InterfaceOptions_AddCategory' (a nil value) [string "@!ClassColors/ClassColors.lua"]:378: in function <!ClassColors/ClassColors.lua:119>" error myself.

This post references what changes have to be made with the prepatch update.

Basically you need to

  1. open ClassColors.lua
  2. ctrl-F for InterfaceOptions_AddCategory(panel);
  3. replace that line with category, layout = Settings.RegisterCanvasLayoutCategory(panel, panel.name, panel.name); category.ID = panel.name Settings.RegisterAddOnCategory(category);
  4. ctrl-F for InterfaceOptionsFrame_OpenToCategory(self)
  5. replace the two lines of that (no idea why there are two) with Settings.OpenToCategory(category.ID)

Hey Gotex! Thanks for helping with a potential fix! However, I don't seem to be able to find "InterfaceOptions_AddCategory(panel);", only "InterfaceOptions_AddCategory(self)"

Changing that didn't do anything.
I also tried reading thru the forum post a bit and see if I could somehow understand the problem. My coding knowledge is limited.
I tried adding "local category, layout" at the top of the lua file, as someone suggested. That didn't do anything either.
I tried replacing the "InterfaceOptions_AddCategory(self)" instead of the suggested "InterfaceOptions_AddCategory(panel);", but as expected that didn't rly do anything either.
image_2024-07-26_121427167

@Pandaabear0
Copy link
Author

So a friend who codes helped me fix the addon.

First off:
At the top, add: local category, layout, I added it on line 10.

Then scroll down to InterfaceOptions_AddCategory(self) and replace it with:
category, layout = Settings.RegisterCanvasLayoutCategory(f, f.name, f.name);
category.ID = f.name
Settings.RegisterAddOnCategory(category);
On lines: 379, 380, 381 respectively.

Then change InterfaceOptionsFrame_OpenToCategory(self) with:
Settings.OpenToCategory(category.ID) (yes, both lines).
(Should be lines 387 and 388 if you followed the previous steps)

This enabled the addon for me, color changing works etc. I hope it works for you!

@Pandaabear0
Copy link
Author

image_2024-07-26_132824767

image_2024-07-26_132840824

@Pandaabear0
Copy link
Author

image_2024-07-26_132923844

@supersonic42
Copy link

image_2024-07-26_132923844

I did you fix, but when i choose color in colorpicker, it does not change it on Player Unitframe (I use ElvUI)

@gotex007
Copy link

gotex007 commented Jul 26, 2024

Hey Gotex! Thanks for helping with a potential fix! However, I don't seem to be able to find "InterfaceOptions_AddCategory(panel);", only "InterfaceOptions_AddCategory(self)"

Oops! The addon creator named the variable self, not panel like the example from the forum post. I forgot to change that when copying it over from the article to my comment but I'm glad you and your friend figured it out. I edited my comment with that change. Declaring the variables at the top didn't seem to be required so I didn't bother since it's working, but I probably should if I care about coding ethics.

@gotex007
Copy link

image_2024-07-26_132923844

I did you fix, but when i choose color in colorpicker, it does not change it on Player Unitframe (I use ElvUI)

I didn't even check if I could change the settings, but you're right. The change just removes the error it throws and puts the settings back in the menu but doesn't save any changes you actually try to make. That is unfortunate.

@Pandaabear0
Copy link
Author

Ye, my fix doesn't seem to actually save any changes either. It does work as intended, just no changes can be made in-game.

But, I guess as a temporary fix you can color in the ClassColor.lua inside your WTF > Account > -AccountName#X- > SavedVariables.

@Pandaabear0
Copy link
Author

image

@supersonic42
Copy link

I guess colorpicker in this addon is broken.

I wanted to share this script to run ingame to change colors:
/run ClassColorsDB.DRUID.r = 1 ClassColorsDB.DRUID.g = 0.42 ClassColorsDB.DRUID.b = 0.18

Then /reload

@supersonic42
Copy link

Seems the addon is broken again. Any chance for a fix?

@dyce
Copy link

dyce commented Aug 14, 2024

@supersonic42 Patch 11.0.2 changed GetAddOnMetadata to C_AddOns.GetAddOnMetadata.
So all you have to do is search for GetAddOnMetadata in Localization.lua (line 14 and 15) and in ClassColors.lua (line 21) and change it to C_AddOns.GetAddOnMetadata

@Pandaabear0
Copy link
Author

Pandaabear0 commented Aug 15, 2024

@supersonic42 Patch 11.0.2 changed GetAddOnMetadata to C_AddOns.GetAddOnMetadata. So all you have to do is search for GetAddOnMetadata in Localization.lua (line 14 and 15) and in ClassColors.lua (line 21) and change it to C_AddOns.GetAddOnMetadata

Seems like that still left another error
" Interface/AddOns/!ClassColors/Localization.lua:17: attempt to call global 'FillLocalizedClassList' (a nil value)"

Any fix for this?

EDIT: I just removed that line kekw

@supersonic42
Copy link

@supersonic42 Patch 11.0.2 changed GetAddOnMetadata to C_AddOns.GetAddOnMetadata. So all you have to do is search for GetAddOnMetadata in Localization.lua (line 14 and 15) and in ClassColors.lua (line 21) and change it to C_AddOns.GetAddOnMetadata

Seems like that still left another error " Interface/AddOns/!ClassColors/Localization.lua:17: attempt to call global 'FillLocalizedClassList' (a nil value)"

Any fix for this?

EDIT: I just removed that line kekw

Yes, i also got this error and commented out this line. Seems the addon works fine without it.

@gotex007
Copy link

Seems like that still left another error " Interface/AddOns/!ClassColors/Localization.lua:17: attempt to call global 'FillLocalizedClassList' (a nil value)"

Any fix for this?

The patch changed FillLocalizedClassList to LocalizedClassList.

@jaychez
Copy link

jaychez commented Sep 28, 2024

Anone know a fix for colorpicker in game? Doesnt seem to save.

@muhmiauwau
Copy link

Hey, since this addon hasn't been updated in a while, I made my own version.
Check it out here: https://www.curseforge.com/wow/addons/colortools-class-colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants