LibFilter-1.0 is a generic filter library that I've been working on recently. My main goal is to allow the creation of plugin filters for bag addons that don't depend on the parent addon. One of the goals I had in mind with the design of LibFilter was that it wasn't required include in any way the LibFilter-1.0 library itself to actually provide filters or even use them for that matter. More details later when I get the library and some sample filters up.
Bag addons would be the primary ones. For example instead of having a bunch of Baggins_XYZ plugins that just work with Baggins, the same filters might also be used by other bag addons. I can also see it being useful for some bar addons like autobar.
Future filter plans:
Filter_Editor / LibFilter_Named => Allows the creation of named filters. Might require a few tweaks to the contract, but I don't think anything that should break backward compatibility. (Will probably require NewSettings be able to take an additional parameter for filter type for filters that support more than one type.)
LibFilter_Logic => Meta filter allows other filters to be and / or together etc.
I've also been thinking of adding support for "Categories" filter:GetCategory(settings,linkorstring) and "Ordering" filter:Compare(settings,linkorstringa,linkorstringb)
i currently use this library with baggins and closetgnome attempting to sort out my many sets of armour.
I currently have 5 sets for my paladin 2 for pvp, and 3 for pve, unfortunately, when i go to the Closetgnome side when editing the categories, i am unable to chose a set, all i get is Any, None, Fuzzy match to select. I currently spend a lot of time adding each piece individually to sort the sets by item name strings, but do not wish to keep this up as gear will change. I've tried with outfitter as well, but the same issue seems to be apparent. Not sure if its the library, or baggins, or just me. Any ideas on how this can be fixed? I've scoured the 98 page topic of baggins the last couple days to see if anyone else is experiencing this....
when patch 3.0.2 was released, i deleted all my addons and cleared the variables. THen i searched for the addons compatible with the new version, I do have ace3, the newest baggins, and i replaced Baggins_ClosetGnome with LibFilter-1.0. When closet gnome did not work, i installed outfitter and found Baggins_outfitter that was said to be compatible, neither worked and both had the same choices for Set
I think I've found the problem. And am also testing an outfitter filter that I just created. Uploaded. 2008-10-25 should have the fixes. Baggins_LibFilter 2008.10.25 should also have a Outfitter filter. The filter won't be visible though if either of the older Baggins_Outfitter plugins are loaded.
Perhaps I'm being a bit dense here, but how do you enable the adapters? I've got the latest versions of ClosetGnome, Combuctor, and LibFilter installed and I don't see any new tabs in combuctor.
Assuming you have Combuctor_Config installed, go to game menu => interface => AddOns tab. Select "Combuctor" and turn on the check mark next to ClosetGnome with frame set to Inventory and then do the same for frame set to Bank and click okay.
Will LibFilter be updated for the new Equipment Manager coming in 3.1?
I have Baggins set up to categorize items that belong in any of my Outfitter sets separately from items that do not. This is very helpful to me to distinguish stuff I'm keeping from stuff I'm going to disenchant or vendor. Since Outfitter is being abandoned, will LibFilter be adapted to perform the same function with equipment sets that are defined in the new Equipment Manager currently on PTR?
That is my plan. I haven't hopped over to the PTR yet to find out exactly what I need to do, but hopefully shouldn't be that hard to implement.
Notes for myself:
EVENT is: EQUIPMENT_SETS_CHANGED (after VARIABLES_LOADED)
Also might need to track: BAG_UPDATE / UNIT_INVENTORY_CHANGED / BANK_OPENED
num = GetNumEquipmentSets()
name,texture = GetEquipmentSetInfo(i) 1 <= i <= num
set = GetEquipmentSetLocations(name)
slot = INVSLOT_FIRST_EQUIPPED ... INVSLOT_LAST_EQUIPPED
not set[slot] == ignored
== EQUIPMENT_SET_EMPTY_SLOT = ignored (as far as my stuff is concerned)
== EQUIPMENT_SET_ITEM_MISSING = ignored (as far as my stuff is concerned, might imply need to check bank events.)
player, bank, bags, slot, bag = EquipmentManager_UnpackLocation(set[slot])
itemID = GetContainerItemID(bag,slot) if bags
itemID = GetInventoryItemID("player",slot)
Nice, I already have a filter by equipment slot as part of LibFilter, and a different one that takes equippablilty into account. While they can be combined, I might look at that function, but I'm hoping to allow my filters to work even for items that the player does not have. For example when used with Combuctor and looking at the equipment held by an alt. The biggest thing that worries me about the equipment manager API is I haven't found functions that return item strings for missing items yet. For example think of an account bound item as part of an set that is currently being used by an alt.
I've got some thoughts for a redesign (aka LibFilter-2.0) taking into account some of the limitations I've hit with my design when porting it to other Bag addons such as Combuctor.