Download
(8 Kb)
Download
Updated: 12/11/22 10:24 AM
Pictures
File Info
Compatibility:
Firesong (8.2.5)
Lost Depths (8.1.5)
High Isle (8.0.0)
Updated:12/11/22 10:24 AM
Created:07/22/22 09:40 AM
Monthly downloads:59
Total downloads:5,309
Favorites:11
MD5:
AddonCategory  Popular! (More than 5000 hits)
Version: 1.5.3
by: Floliroy [More]
Quick Description

This addon allows you to associate your addons to custom categories.
Each categories can be reordered like you would like.


Categories

There is already some categories created :
User Interface, Trackers, Combat, PvE, PvP, Util, Craft, Housing, Map, Class

You can create how many new categories that you want.

AddonCategory also have some addons already put into categories.


For Authors

You can assign your own addon to a category if the addon doesn't already have a category linked to it.
Exemple if you want to set your addon's category "Combat" :
Lua Code:
  1. --Add this to your OnAddOnLoaded function
  2. if AddonCategory then
  3.     AddonCategory.AssignAddonToCategory(addonName, AddonCategory.baseCategories.Combat)
  4. end
AddonCategory.baseCategories is :
Lua Code:
  1. AddonCategory.baseCategories = {
  2.     UserInterface = "User Interface",
  3.     Trackers = "Trackers",
  4.     Combat = "Combat",
  5.     PvE = "PvE",
  6.     PvP = "PvP",
  7.     Util = "Util",
  8.     Craft = "Craft",
  9.     Housing = "Housing",
  10.     Map = "Map",
  11.     Class = "Class",
  12. }



Let me know if there is any bugs !



Big thanks to MrPikPik and andy.s for helping me when i started developing this addon.
Version 1.5.3 :
Add libraries index into AddonCategory.indexCategories
You can access it with AddonCategory.getIndexOfCategory(GetString(SI_ADDON_MANAGER_SECTION_LIBRARIES))

Version 1.5.2 :
removed bulton-fr merge
=> Once again fully compatible with PerfectPixel
=> Tried to made it a minimum compatible with Votan's Addon List

Version 1.5.1 :
Add function AddonCategory.getIndexOfCategory(categoryName)

Version 1.5 :
Add compatibility to Votan's Addon List (thx to bulton-fr)

Version 1.4.1 :
API Bump

Version 1.4 :
Allow authors to asign themself to a category

Version 1.3 :
Added a button to select non assigned addons so you can assign them easily to categories

Version 1.2 :
Added option to enable / disable and to hide / show libraries
Added some addons into known sorted addons to categories

Version 1.1 :
Fixed some bad code thx to Baertram

Version 1.0 :
Initial version of the Add-On
Optional Files (0)


Archived Files (8)
File Name
Version
Size
Uploader
Date
1.5.2
8kB
Floliroy
12/10/22 11:39 AM
1.5.1
8kB
Floliroy
12/09/22 06:22 AM
1.5
8kB
Floliroy
12/07/22 10:53 PM
1.4.1
8kB
Floliroy
11/02/22 04:26 AM
1.4
68kB
Floliroy
10/25/22 03:34 AM
1.2
8kB
Floliroy
10/24/22 03:04 AM
1.1
8kB
Floliroy
07/22/22 12:57 PM
1
82kB
07/22/22 09:40 AM


Post A Reply Comment Options
Unread 09/24/23, 02:15 PM  
BioNik

Forum posts: 0
File comments: 10
Uploads: 0
Sometimes addon broke and only option to fix it - delete savedVars...
So I dig in and found, that sometimes self.addonTypes[sV[name]] is nil for some reason.

So quick fix will be, replace in \AddonCategory\AddonCategory.lua line 83
Code:
        if sV[name] ~= nil then
            entryData.isCustomCategory = true
        elseif isLibrary ~= IS_LIBRARY then
            table.insert(AddonCategory.listNonAssigned, name)
        end
with this
Code:
        if sV[name] ~= nil and self.addonTypes[sV[name]] ~= nil then
            entryData.isCustomCategory = true
        elseif isLibrary ~= IS_LIBRARY then
            table.insert(AddonCategory.listNonAssigned, name)
        end
Report comment to moderator  
Reply With Quote
Unread 06/11/23, 08:58 AM  
iamdeadfrosty

Forum posts: 0
File comments: 23
Uploads: 0
dead addon

rip. incompat w everything fr
Report comment to moderator  
Reply With Quote
Unread 01/26/23, 08:56 AM  
L4R5

Forum posts: 0
File comments: 6
Uploads: 0
Hi, I am trying to rework the addon categories to my own liking.

When I try to delete existing categories, nothing happens. Does it only work, when categories are empty ?

Edit:
I have just seen the message in the chat. Base categories cannot be deleted. Would be nice, if I could anyway.

Edit2:
renaming is also a bad idea, this breaks the whole addon system.

Edit3:
I just checked the saved variables. all the preloaded addon categories are not changed when renaming a base category. Only currently installed addons are updated. Once I install one of the preloaded addons the addon will not load anymore and addon configuration will be broken. Maybe also disable renaming base categories to avoid that. Or change to code to also handle not installed addons.
Last edited by L4R5 : 01/26/23 at 09:37 AM.
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 10:06 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by Baertram
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)



Edit: After reviewing votan's code
Votan stores the index of the libraries in a variable
addon.libSectionDataIndex
Code:
do
	local orgAddAddonTypeSection = ZO_AddOnManager.AddAddonTypeSection
	function ZO_AddOnManager.AddAddonTypeSection(...)
		local self, isLibrary = ...
		if isLibrary then
			local addonEntries = self.addonTypes[isLibrary]
			local scrollData = ZO_ScrollList_GetDataList(self.list)
			addon.libSectionDataIndex = #addonEntries ~= 0 and #scrollData + 1 or 0
		end
		return orgAddAddonTypeSection(...)
	end
end
The optional dependency might not be enough! As the code will be run if the addon manager was opened later
So I guess your new added categories might be the problem here and you need to add some compatibility with Votan, if your addon is enabled.
Your addon returns the index of the libraries section and votan reads it from your global variable AddonCategory.librariesIndex e.g., if AddonCategory ~= nil
yeah i dont think i can directly modify addon.libSectionDataIndex from votan's addon so i will just add index of libraries into AddonCategory.indexCategories with GetString(SI_ADDON_MANAGER_SECTION_LIBRARIES) as key and index as value
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 09:38 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
See my edited post below, with a workaround idea. You need to talk to Votan I guess

I've meanwhile added your categories, and scroll to them, via right click on the search edit box of AddonSelector:


Unfortunately the scroll list always scrolls the selecte dindex to the center of the list, not to the top. So if you select "Util2 it will have Util shown in the center rows.. But well, betetr than nothing

Originally Posted by Floliroy
Originally Posted by Baertram
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)
Yeah i said minimum compatibility i know that this button isnt working for now
Last edited by Baertram : 12/11/22 at 09:41 AM.
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 09:35 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by Baertram
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)
Yeah i said minimum compatibility i know that this button isnt working for now
Report comment to moderator  
Reply With Quote
Unread 12/11/22, 09:34 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
One of your updates has broken compatibility (if this particular button was working before?) with Votans Addon List.
-> The button added by Votans addon, to scroll down to the "libraries" is not working anymore:


It does not scroll down to the libraries anymore, it does nothing except changing the texture.

I guess you maybe need to add the
Code:
## OptionalDependsOn: LibVotansAddonList
to make it load before your addon, so all changes and indices which Votan's addon needs will be stored properly BEFORE your categories are inserted and invalidate the old indices (only a wild guess!).

Tested with only Votans addon list (works), AddonSelector + Votans addon list (works), AddonCategory + Votans addon list (does not work),
AddonCategory + Addon Selector + Votans addon list (does not work)



Edit: After reviewing votan's code
Votan stores the index of the libraries in a variable
addon.libSectionDataIndex
Code:
do
	local orgAddAddonTypeSection = ZO_AddOnManager.AddAddonTypeSection
	function ZO_AddOnManager.AddAddonTypeSection(...)
		local self, isLibrary = ...
		if isLibrary then
			local addonEntries = self.addonTypes[isLibrary]
			local scrollData = ZO_ScrollList_GetDataList(self.list)
			addon.libSectionDataIndex = #addonEntries ~= 0 and #scrollData + 1 or 0
		end
		return orgAddAddonTypeSection(...)
	end
end
The optional dependency might not be enough! As the code will be run if the addon manager was opened later
So I guess your new added categories might be the problem here and you need to add some compatibility with Votan, if your addon is enabled.
Your addon returns the index of the libraries section and votan reads it from your global variable AddonCategory.librariesIndex e.g., if AddonCategory ~= nil
Last edited by Baertram : 12/11/22 at 09:38 AM.
Report comment to moderator  
Reply With Quote
Unread 12/10/22, 05:13 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by L4R5
Originally Posted by valthierX
This latest version doesn't seem to be compatible with PerfectPixel. You can't access your addons if you have PerfectPixel and this addon. But if you go out of the game and then disable one of them then everything is fine when you are back at the game. If you enable both, if you try to access your addons while in game, you can't.
I did not do any further tests, but I am also running Perfect Pixel and the addon breaks the addon overview.
So you have last version on both addons ?
Gonna try to reproduce the error to try to fix it...

Which client language do you have also ?

EDIT : Just tried with Addon Selector + Votan's Addon List + PerfectPixel + AddonCategory and i have no issue :x

EDIT 2 : I finally found the issue, its when you have an uncategorized addon
Last edited by Floliroy : 12/10/22 at 06:27 AM.
Report comment to moderator  
Reply With Quote
Unread 12/10/22, 05:03 AM  
L4R5

Forum posts: 0
File comments: 6
Uploads: 0
Originally Posted by valthierX
This latest version doesn't seem to be compatible with PerfectPixel. You can't access your addons if you have PerfectPixel and this addon. But if you go out of the game and then disable one of them then everything is fine when you are back at the game. If you enable both, if you try to access your addons while in game, you can't.
I did not do any further tests, but I am also running Perfect Pixel and the addon breaks the addon overview.
Report comment to moderator  
Reply With Quote
Unread 12/09/22, 04:10 PM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by valthierX
This latest version doesn't seem to be compatible with PerfectPixel. You can't access your addons if you have PerfectPixel and this addon. But if you go out of the game and then disable one of them then everything is fine when you are back at the game. If you enable both, if you try to access your addons while in game, you can't.
idk for me i dont have issue and i use perfect pixel
Report comment to moderator  
Reply With Quote
Unread 12/09/22, 04:09 PM  
valthierX

Forum posts: 0
File comments: 5
Uploads: 0
This latest version doesn't seem to be compatible with PerfectPixel. You can't access your addons if you have PerfectPixel and this addon. But if you go out of the game and then disable one of them then everything is fine when you are back at the game. If you enable both, if you try to access your addons while in game, you can't.
Report comment to moderator  
Reply With Quote
Unread 12/09/22, 12:57 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Thanks Floliroy
Report comment to moderator  
Reply With Quote
Unread 12/09/22, 07:48 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by Baertram
Originally Posted by Floliroy
Originally Posted by Baertram
Thanks. Totally understood @sub categories. As I said this is nice to have


Addon Selector already provides a "scroll to code".
Basically it just reuses existing ZO_ScrollList functions which need the index or the dataTable entry (complete data table row for comparison).

All one would need is the index in the ZO_ScrollList where you have added/inserted the category headlines, returned as a table e.g. { "Category Name 1" = index1, "Category name 2" = index2, ... } by your API then and one can use that with ZO's scroll list functions for whatever usage afterwards.
-> I think the ZOs function that adds the categories to the scroll list actually returns the index where it was added/inserted somehow, so you could grab it from there. Not sure though
I added the function AddonCategory.getIndexOfCategory(categoryName) where you can pass either a baseCategories or a new custom category created by the user, you can also directly get AddonCategory.indexCategories[] which has categoryName as key, and index as value!

PS: You need to have open your addon list so the table is populate tho

Thanks!
Is AddonCategory.baseCategories containing all categories defined, custom ones too?
Or is there another table or any API to get "all category names" existing (base and custom)?
Else I'll use AddonCategory.indexCategories and build my own lookup table for all available names, by the table key.
Nah it only includes the base ones.
To get all the categories you can check AddonCategory.savedVariables.listCategory which has all the categories name as values (index is just a number).
Or directly AddonCategory.indexCategories for your purpose i guess, so if an user dont have any addon into a category you dont try to scroll to an inexistant category !
Report comment to moderator  
Reply With Quote
Unread 12/09/22, 07:36 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Originally Posted by Floliroy
Originally Posted by Baertram
Thanks. Totally understood @sub categories. As I said this is nice to have


Addon Selector already provides a "scroll to code".
Basically it just reuses existing ZO_ScrollList functions which need the index or the dataTable entry (complete data table row for comparison).

All one would need is the index in the ZO_ScrollList where you have added/inserted the category headlines, returned as a table e.g. { "Category Name 1" = index1, "Category name 2" = index2, ... } by your API then and one can use that with ZO's scroll list functions for whatever usage afterwards.
-> I think the ZOs function that adds the categories to the scroll list actually returns the index where it was added/inserted somehow, so you could grab it from there. Not sure though
I added the function AddonCategory.getIndexOfCategory(categoryName) where you can pass either a baseCategories or a new custom category created by the user, you can also directly get AddonCategory.indexCategories[] which has categoryName as key, and index as value!

PS: You need to have open your addon list so the table is populate tho

Thanks!
Is AddonCategory.baseCategories containing all categories defined, custom ones too?
Or is there another table or any API to get "all category names" existing (base and custom)?
Else I'll use AddonCategory.indexCategories and build my own lookup table for all available names, by the table key.
Last edited by Baertram : 12/09/22 at 07:36 AM.
Report comment to moderator  
Reply With Quote
Unread 12/09/22, 06:23 AM  
Floliroy
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 36
Uploads: 10
Originally Posted by Baertram
Thanks. Totally understood @sub categories. As I said this is nice to have


Addon Selector already provides a "scroll to code".
Basically it just reuses existing ZO_ScrollList functions which need the index or the dataTable entry (complete data table row for comparison).

All one would need is the index in the ZO_ScrollList where you have added/inserted the category headlines, returned as a table e.g. { "Category Name 1" = index1, "Category name 2" = index2, ... } by your API then and one can use that with ZO's scroll list functions for whatever usage afterwards.
-> I think the ZOs function that adds the categories to the scroll list actually returns the index where it was added/inserted somehow, so you could grab it from there. Not sure though
I added the function AddonCategory.getIndexOfCategory(categoryName) where you can pass either a baseCategories or a new custom category created by the user, you can also directly get AddonCategory.indexCategories[] which has categoryName as key, and index as value!

PS: You need to have open your addon list so the table is populate tho
Last edited by Floliroy : 12/09/22 at 06:24 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.