Download
(116 Kb)
Download
Updated: 02/14/24 10:37 AM
Compatibility:
Scions of Ithelia (9.3.0)
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Firesong (8.2.5)
Lost Depths (8.1.5)
High Isle (8.0.0)
Updated:02/14/24 10:37 AM
Created:05/04/19 08:28 AM
Monthly downloads:26,001
Total downloads:1,592,719
Favorites:566
MD5:
9.3.0
LibFilters-3.0  Popular! (More than 5000 hits)
Version: 3.0r4.2
by: Baertram, Randactyl
LibFilters-3.0
This version of LibFilters does NOT need any dependency to other libraries anymore (e.g. no LibStub needed).
You simply reference it by using the global Variable
Code:
LibFilters3
Other libraries
This libray optionally supports the use of LibDebugLogger to log messages to the addon log instead of the normal chat.


Welcome to LibFilters-3.0

The goal of LibFilters is to provide an easy interface for applying custom sorting rules to different lists of items found in the game. At the moment, you can filter the inventory, bank withdrawal, bank deposits, guild bank withdrawal, guild bank deposits, vendor buying, vendor selling, buyback, repair, guild store selling, mail sending, trading, smithing (refinement, deconstruction, improvement, research), alchemy creation, enchanting creation, enchanting extraction, fence selling, fence laundering, the craftbag, and the quickslot inventory.

Please check the LibFilters WIKI for examples, API functions and usage instructions:
LibFilters WIKI


LibFilters 3 r3 was totally recoded and now supports Gamepad mode too!
A very special thanks to IsJustaGhost for a lot of the Gamepad code, ideas and testing UI + help!


To use LibFilters in your addon, you simply assign a reference to it's global variable LibFilters3.
Yo do NOT need any call to LibStub for it anymore. In your manifest you need to add LibFilters-3.0 to the ##DependsOn tag:
Code:
##DependsOn: LibFilters-3.0>=339
In your addon, you need to invoke LibFilters with the global LibFilters3 variable and then initialize LibFilters:

Lua Code:
  1. local libFilters = LibFilters3
  2. --!!! Add LibFilters-3.0 to your ## DependsOn: or ## OptionalDependsOn: to assure the lib is loaded before your addon's EVENT_ADD_ON_LOADED fires!!!
  3. libFilters:InitializeLibFilters() -- Must be called ONCE at/After EVENT_ADD_ON_LOADED of your addon to make sure the LibFilters functions exists and everything is ready! Without calling this you won't see any filters applied/working!

This is the list of available filterType constants:
Code:
LF_INVENTORY                = 1
LF_BANK_WITHDRAW            = 2
LF_BANK_DEPOSIT             = 3
LF_GUILDBANK_WITHDRAW       = 4
LF_GUILDBANK_DEPOSIT        = 5
LF_VENDOR_BUY               = 6
LF_VENDOR_SELL              = 7
LF_VENDOR_BUYBACK           = 8
LF_VENDOR_REPAIR            = 9
LF_GUILDSTORE_BROWSE        = 10
LF_GUILDSTORE_SELL          = 11
LF_MAIL_SEND                = 12
LF_TRADE                    = 13
LF_SMITHING_REFINE          = 14
LF_SMITHING_CREATION        = 15
LF_SMITHING_DECONSTRUCT     = 16
LF_SMITHING_IMPROVEMENT     = 17
LF_SMITHING_RESEARCH        = 18
LF_ALCHEMY_CREATION         = 19
LF_ENCHANTING_CREATION      = 20
LF_ENCHANTING_EXTRACTION    = 21
LF_PROVISIONING_COOK        = 22
LF_PROVISIONING_BREW        = 23
LF_FENCE_SELL               = 24
LF_FENCE_LAUNDER            = 25
LF_CRAFTBAG                 = 26
LF_QUICKSLOT                = 27
LF_RETRAIT                  = 28
LF_HOUSE_BANK_WITHDRAW      = 29
LF_HOUSE_BANK_DEPOSIT       = 30
LF_JEWELRY_REFINE           = 31
LF_JEWELRY_CREATION         = 32
LF_JEWELRY_DECONSTRUCT      = 33
LF_JEWELRY_IMPROVEMENT      = 34
LF_JEWELRY_RESEARCH         = 35
LF_SMITHING_RESEARCH_DIALOG = 36
LF_JEWELRY_RESEARCH_DIALOG  = 37
LF_INVENTORY_QUEST = 38
LF_INVENTORY_COMPANION = 39

LF_FILTER_MIN                = LF_INVENTORY
LF_FILTER_MAX               = LF_INVENTORY_COMPANION
Universal Deconstruction is a special case as it does not provide any dedicated LF_UNIVERSAL_DECONSTRUCT filterType but reuses LF_SMIHING_DECONSTRUCT, LF_JEWELRY_DECONSTRUCT and LF_ENCHANTING_EXTRACTION at the UniversalDecon UI, depending on the selected UI Tab!
You need to register/unregister the according filterTypes for it.
UniversalDeconstruction callbacks will provide you the actual selected tab at universal decon (e.g. "all", "armor", "weapons", "jewelry" or "enchantments") as an additional parameter so you are able to differe them from normal smithing deconstruction/jewelry deconstruction/enchanting extraction! Non universal-decon panels will leave this param nil.



The filterTypes will pass information from the bag & slotIndex, or the inventorySlot, to a filterCallback function registered to that filterType.
For the slots, these are the keys available in the passed table:

Code:
inventory slot: age, bagId, condition, dataEntry, equipType, filterData,
  iconFile, inventory, isJunk, isPlayerLocked, itemInstanceId, itemType,
  launderPrice, locked, meetsUsageRequirement, name, quality, rawName,
  requiredLevel, searchData, sellPrice, slotControl, slotIndex,
  specializedItemType, stackCount, stackLaunderPrice, statValue, stolen,
  uniqueId

store slot: currencyQuantity1, currencyQuantity2, currencyType1,
  currencyType2, dataEntry, entryType, filterData, icon, isUnique,
  meetsRequirementsToBuy, meetsRequirementsToEquip, name, price, quality,
  questNameColor, sellPrice, slotIndex, stack, stackBuyPrice,
  stackBuyPriceCurrency1, stackBuyPriceCurrency2, statValue

buyback slot: icon, meetsRequirements, name, price, quality, slotIndex,
  stack, stackBuyPrice

repair slot: bagId, condition, dataEntry, icon, name, quality, repairCost,
  slotIndex, stackCount

quickslot slot: age, bagId, filterData, iconFile, locked,
  meetsUsageRequirement, name, quality, sellPrice, slotIndex, slotType,
  stackCount, stackSellPrice, stolen

Here is the mapping which filterId constant LF* uses which type of filter function: inventorySlot or bagdId & slotIndex
Example filter functions:
Lua Code:
  1. local function FilterSavedItemsForSlot(inventorySlot)
  2.   return true -- show the item in the list / false = hide item
  3. end
  4.  
  5. local function FilterSavedItemsForBagIdAndSlotIndex(bagId, slotIndex)
  6.   return true -- show the item in the list / false = hide item
  7. end

Code:
--Filter function with inventorySlot
All LF_ except the ones named below, e.g. LF_INVENTORY, LF_CRAFTBAG, LF_VENDOR_SELL

--Filter function with bagId and slotIndex (most of them are crafting related ones)
[LF_SMITHING_REFINE]                        = FilterSavedItemsForBagIdAndSlotIndex,
[LF_SMITHING_DECONSTRUCT]                   = FilterSavedItemsForBagIdAndSlotIndex,
[LF_SMITHING_IMPROVEMENT]                   = FilterSavedItemsForBagIdAndSlotIndex,
[LF_SMITHING_RESEARCH]                      = FilterSavedItemsForBagIdAndSlotIndex,
[LF_SMITHING_RESEARCH_DIALOG]               = FilterSavedItemsForBagIdAndSlotIndex,
[LF_JEWELRY_REFINE]                         = FilterSavedItemsForBagIdAndSlotIndex,
[LF_JEWELRY_DECONSTRUCT]                    = FilterSavedItemsForBagIdAndSlotIndex,
[LF_JEWELRY_IMPROVEMENT]                    = FilterSavedItemsForBagIdAndSlotIndex,
[LF_JEWELRY_RESEARCH]                       = FilterSavedItemsForBagIdAndSlotIndex,
[LF_JEWELRY_RESEARCH_DIALOG]                = FilterSavedItemsForBagIdAndSlotIndex,
[LF_ENCHANTING_CREATION]                    = FilterSavedItemsForBagIdAndSlotIndex,
[LF_ENCHANTING_EXTRACTION]                  = FilterSavedItemsForBagIdAndSlotIndex,
[LF_RETRAIT]                                = FilterSavedItemsForBagIdAndSlotIndex,
[LF_ALCHEMY_CREATION]                       = FilterSavedItemsForBagIdAndSlotIndex,
This library uses the inventory/fragment/dialog's attribute "additionalFilters" to register the filter callbackFunction, so it will run in addition to the original filter functions of the ZOs code (if any given, else it will add an additionalFilter attribute to the table).
It will store the filteres registered via LibFilters3:RegisterFilter internally and add the filter callback functions to the inventory.additionalFilters function, which then is called as the normal filters of the game are applied (e.g. at a refresh of the crafting table contents).
For this to work properly the UI needs to show the dependend filter panel, e.g. you cannot open the crafting table and stay at the refinement tab, but use filter functions of the desconstruction tab! At the refinement tab there are no updates to the filter tables done to include the LF_SMITHING_DECONSTRUCTION or LF_JEWELRY_DECONSTRUCTION entries of these inventorie's .additionalFilters!
You'd only have the refinement .additionalFilters (e.g. SMITHING.refinementPanel.inventory.additionalFilters).
So make sure to show the approrpiate UI in order to call the updaters like SMITHING:OnChangeFilter and apply the filter functions of LibFilters to the inventory.additionalFilters properly.


LibFilters API functions:
More API functions not listed below can be found at the Wiki (see link below).
-> Read the WIKI for examples!
The importants API functions of this library are:

Code:
function LibFilters3:InitializeLibFilters()
Must be called after you've assigned LibFilters-3.0 to your local variable, to start the initialization of the library, and to make it work.

function LibFilters3:GetMinFilterType()
Returns the minimum filterType available

function LibFilters3:GetMaxFilterType()
Returns the maximum filterType available

function LibFilters3:GetFilterTypes()
Returns the LibFilters LF* filterType connstants table: value = "name"

function LibFilters3:GetFilterTypeName(libFiltersFilterType)
Returns the LibFilters LF* filterType connstant's name

function LibFilters3:GetCurrentFilterTypeForInventory(inventoryType)
Returns the filterType currently affecting the provided inventoryType.

function LibFilters3:GetFilterCallback(filterTag, filterType)
filterTag is the unique string that identifies your filter. filterType is
  the provided "LF_" prefixed constants your filter was registered for.
  Returns the filterCallback registered for the provided filterTag and
  filterType; returns nil otherwise.

function LibFilters3:IsFilterRegistered(filterTag, filterType)
filterTag is the unique string that identifies your filter. filterType is
  the provided "LF_" prefixed constants your filter was registered for.
  Returns true if there is a filter registered with the provided filterTag.
  Returns false if there is not a filter registered with the provided
  filterTag. filterType is optional. If a filterType is provided, will only
  return true if a filter is registered to that filterType under the
  provided filterTag.

function LibFilters3:RegisterFilter(filterTag, filterType, filterCallback, noInUseError)
filterTag is a unique string to identify your filter. filterType is one of
  the provided "LF_" prefixed constants. filterCallback is a function which
  accepts either one or two arguments; this is determined by the filterType.
  filterCallback should return true if an item is to be shown.
  filterCallback should return false if an item should not be shown.
  noInUseError boolean: Do not show an error message if the filterTag was already registered

function LibFilters3:RegisterFilterIfUnregistered(filterTag, filterType, filterCallback, noInUseError)
 Same as RegisterFilter function but only registers the filter if it currently was unregistered

function LibFilters3:UnregisterFilter(filterTag, filterType)
filterTag is the unique string that identifies your filter. filterType the
  provided "LF_" prefixed constants your filter was registered for.
  filterType is optional. If a filterType is not provided, all filters
  registered with the provided filterTag will be unregistered.

function LibFilters3:RequestUpdate(filterType, delay)
filterType is one of the provided "LF_" prefixed constants. Runs the updater
  appropriate for the provided filter type to pick up any filtering changes.

function LibFilters3:RequestUpdateForResearchFilters(delay)
 Request an update for the carfting table research panel, including normal LF_*_RESEARCH filters and the horizontal scrollBar filters registered 
 with the functions RegisterResearchHorizontalScrollbarFilter

function LibFilters3:RegisterResearchHorizontalScrollbarFilter(filterTag, craftingType, skipTable, fromResearchLineIndex, toResearchLineIndex, noInUseError)
Register a filter by help of a researchLineIndex "skipTable" for a craftingType
Parameter tyble skipTable contains key = researchLineIndex and value = boolean where "true" means: filter/skip (hide) this researchLineIndex at the horizontal scroll list.
Parameter number fromResearchLineIndex sets the researchLineIndex to start the output of the horizontal scrollbar: It filters (hides) the possibe entries "in total".
Parameter number toResearchLineIndex sets the researchLineIndex to stop the output of the horizontal scrollbar: It filters (hides) the possible entries "in total".
Parameter boolean noInUseError: if set to true there will be no error message if the filterTag+filterType was registered already -> Silent fail. Return value will be false then!
Returns true if filter table skipTable was registered, else nil in case of parameter errors, or false if same tag+type was already registered
If different addons register skipTables for the same crafting type, these skipTables will be combined!
->The combined entries of the skipTable are added, directly upon registering such filter, to they researchPanel table, with entry LibFilters3_HorizontalScrollbarFilters
->You need to manually call libFilters:RequestUpdateForResearchFilters(delay) to update the horizontal scrollbar (and the normal research filters) via researchPanel:Refresh()


function LibFilters3:UnregisterResearchHorizontalScrollbarFilter(filterTag, craftingType)
Unregister a filter by help of a researchLineIndex "skipTable" for a craftingType, which will show the entries at the horizontal scroll list again.
If different addons have registered skipTables for the same crafting type, these skipTables will be combined, and thus unregistering 1 filterTag might
still have any other registered which hides the entry at the horizontal scrollbar
->The combined entries of the skipTable are added, directly upon unregistering such filter, to they researchPanel table, with entry LibFilters3_HorizontalScrollbarFilters
->You need to manually call libFilters:RequestUpdateForResearchFilters(delay) to update the horizontal scrollbar (and the normal research filters) via researchPanel:Refresh()


function LibFilters3:ApplyCraftingResearchHorizontalScrollbarFilters(craftingType, noRefresh)
Use API function libFilters.ApplyCraftingResearchHorizontalScrollbarFilters(craftingType, noRefresh) to apply the combined
skiptables to the researchPanel table LibFilters3_HorizontalScrollbarFilters

LibFilters panel open/close "callback" API functions:
You create a callback identifier (name) for your addon and a LibFilters LF* filterType constant (related to a "panel"). if this panel shows/hides the callback will be raised.
You register your own callback function to that callback name via CALLBACK_MANAGER:RegisterCallback(callbackNameCreatedByLibFiltersAPIFunction_libFilters RegisterCallbackName, yourCallbackFunction).
yourCallbackFunction got the following parameters then:
Code:
callbackName String The callbackName of the callback just raised,
			filterType LF* constant,
			stateStr SCENE_SHOWN or SCENE_HIDDEN,
			isInGamepadMode true (gamepad or false (keyboard),
			fragmentOrSceneOrControl fragmentOrSceneOrControlOrUserdata reference variable,
			lReferencesToFilterType table with all references to that filterType,
			universalDeconSelectedTabNow nilable:String currently selected universal deconstruction tab "all", "armor", "weapons," "jewelry", "enchantments"

-> Read the WIKI for callbacks and examples!
Code:
--Create the callbackname for a libFilters filterPanel shown/hidden callback
----It will add an entry in table LibFilters3.mapping.callbacks.registeredCallbacks[inputType][yourAddonName][universalDeconActiveTab][filterType][isShown]
----number filterType needs to be a valid LF_* filterType constant
----boolean isShown true means SCENE_SHOWN will be used, and false means SCENE_HIDDEN will be used for the callbackname
----boolean inputType true = Gamepad, false= keyboard callback, leave empty for both!
----nilable:String universalDeconActiveTab The active tab at the universal deconstruction panel that this callback should be raised for, e.g. "all", "armor", "weapons", "jewelry" or "enchanting"
----nilable:String raiseBeforeOtherAddonsCallbackName If this callbackName (of another addon) is given the callback should be raised after this callback was raised. The callbackName provided here must match the
----> other parameters like filterType, isShown, inputType, universalDeconActiveTab!
----Returns String callbackNameGenerated
---->e.g. "LibFilters3-<yourAddonName>-shown-1" for SCENE_SHOWN and filterType LF_INVENTORY of addon <yourAddonName>
function libFilters:RegisterCallbackName(yourAddonName, filterType, isShown, inputType, universalDeconActiveTab, raiseBeforeOtherAddonsCallbackName)

function libFilters:UnregisterCallbackName(yourAddonName, filterType, isShown, inputType, universalDeconActiveTab)

Test UI for the filters
If you need the test UI please uncomment (remove the ##) the entries of the test.lua and .xml files in the LibFilters-3.0.txt manifest file!
Use the slash command
Code:
/lftestfilters
to open the Test UI of LibFilters.

A description how the test UI works and how you are able to regisetr your custom filterFunction and run the filters can be found here:
LibFilters WIKI



GitHub
LibFilters 3.0 at GitHub
LibFilters 3.0 for the PTS, or "Beta version"!
[v3.0 r4.2] 2024-02-14
-Updated APIversion and dependencies
-Fixed Quickslot search not working properly at "Usable items" tab (Keyboard mode)


[v3.0 r4.1] 2023-09-01
-Updated APIversion and dependencies
-Updated all helper codes (compared to ZOs vanilla code functions, 2023-08-31)
-Removed some redundant code at helpers
-Cleaned helper comments, versions, local variables and speed-up references
-Moved helper local variables and functions to the top

[v3.0 r4.0] 2023-03-14
Fixed ResizeToFitDescendents error at research crafting panel (should only have appeared if FCOCraftFilter is used and currently researched items were filtered to "Show")

[v3.0 r3.9] 2023-01-02
-Added API functions for smithing research horizontal scrollbar filters
-->See API documentation at the WIKI:
function libFilters:RegisterResearchHorizontalScrollbarFilter(filterTag, craftingType, skipTable, fromResearchLineIndex, toResearchLineIndex, noInUseError)
function libFilters:UnregisterResearchHorizontalScrollbarFilter(filterTag, craftingType)
function libFilters:ApplyCraftingResearchHorizontalScrollbarFilters(craftingType, noRefresh)
function libFilters:RequestUpdateForResearchFilters(delay)

-Added more Is*Shown API functions (refinement, creation, deconstruction, improvement, research)
-->See API documentation -> IsShown* at the WIKI:
-Fixed research refresh function to update currently researched items properly, even if filtered (to prevent a start of a 4th research where not possible)
-Updated API Documentation/LibFilters-3.0_WIKI_API.md

-IMPORTANT - API functions removed:
function LibFilters3:SetResearchLineLoopValues(fromResearchLineIndex, toResearchLineIndex, skipTable)
-> Please use he new API functions libFilters:RegisterResearchHorizontalScrollbarFilter and libFilters:UnregisterResearchHorizontalScrollbarFilter instead so that many addons can work combined togeher!

[v3.0 r3.8] 2022-11-06
-Fixed callback 1st param = callbackName
-Working on API function CreateCallbackName. Added parameters and fixing CallbackRaise API function to raise internally LibFilters callback for each panel once AND then raise custom registered addon callbacks for the panels afterwards too
-Renamed API libFilters:CreateCallbackName to RegisterCallbackName
-Changed API function libFilters:RegisterCallbackName(yourAddonName, filterType, isShown, inputType, universalDeconActiveTab, raiseBeforeOtherAddonsCallbackName)
-Added API function libFilters:UnregisterCallbackName(yourAddonName, filterType, isShown, inputType, universalDeconActiveTab)

[v3.0 r3.7] 2022-11-01
-Fixed API function LibFilters3:GetFilterTypeReferences(filterType, isInGamepadMode) to always return a reference variable as first parameter so you can get the controls/scenes/fragments for a LF* filterType constants properly.
Only unimplemented LF* costants won't return a value now.
If gamepad re-uses keyboard controls it will return the relevant controls now.
-Added new API function LibFilters:IsUniversalDeconstructionSupportedFilterType(LF_filterType). Returns boolean true if the filter type passed in e.g. LF_SMITHING_DECONSTRUCT is supported at UniversalDeconstruction, or false if not (e.g. LF_SMITHING_REFINE)
-Added API functions
LibFilters3.CheckIfRefVarIsShown(refVarSceneFragmentOrControl) returns the boolean true if the refVar is currently shown
LibFilters3.GetCtrl(refVar) returns the control of the refVar (if available)
-Added prefix "|UD> " to debug messages that got to do with UniversalDeconstruction
-Fixed table filterTypeToCallbackRef for control callbacks (keyboard mode)
-Fixed LF_SMITHING_RESEARCH callbacks not firing due to a typo

[v3.0 r3.6] 2022-11-01
-Updated the WIKI
-Fixed global leaking test variable refreshNeeded
-Removed isUniversalDeconstructionGiven checks as it always is provided by the game meanwhile
-Added UniversalDecon detection and callbacks for keyboard and gamepad mode
Attention: The callback functions for the SCENE_SHOWN/SCENE_HIDDEN callbacks will provide an additional nilable parameter
at the end: String universalDeconstructionTab: If this is not nil the callback raised was raised at teh universal deconstruction panel and the the currently active tab there is the one provided at this parameter. Possible values are "all", "armor", "weapons","jewelry" or "enchantments"!
-> See function LibFilters3:CallbackRaise at the end -> CM:FireCallback
See global accessible table LibFilters3.mapping.universalDeconTabKeyToLibFiltersFilterType for the possible Strings -> LF_* filterType constants
-Fixed API function libfilters:CreateCallbackName to use the 1st new parameter yourAddonName
-Updated API functions so you can pass in the "currently used UNIVERSAL DECONSTRUCTION" tab as parameter "universalDeconTab"
API Functions changed are:
LibFilters3:RaiseFilterTypeCallback
-Updated API functions to return the "currently used UNIVERSAL DECONSTRUCTION" tab as return parameter "universalDeconSelectedTabKey"
See global accessible table's keys LibFilters3.mapping.universalDeconTabKeyToLibFiltersFilterType for the possible Strings returned.
API Functions changed are:
LibFilters3:GetCurrentFilterType()
LibFilters3:GetCurrentFilterTypeReference(filterType, isInGamepadMode)
-Updated API functions to return the "UNIVERSAL DECONSTRUCTION" reference variable as a new return parameter "universalDeconRef" for the passed in supported LF* filterTypes which universal decon re-uses (see global accessible table LibFilters3.mapping.universalDeconLibFiltersFilterTypeSupported for the possible filterType constants of Universal Deconstruction)
API Functions changed are:
LibFilters:GetFilterTypeReferences(filterType, isInGamepadMode)

[v3.0 r3.5] 2022-06-19
-removed old pre-HighIsle compatibility code
-Fixed keyboard quickslots text search at "all" and "consumables" tabs

[v3.0 r3.4] 2022-05-22
Fixed research keyboard dialog refresh & deselect nil error of items via ZO_ScrollList_SelectData (with nil data) -> ZOs function does no nil check and just tries to call the selectedCallback

[v3.0 r3.3] 2022-05-09
-Updated API
-Added PTS High Isle support
-Fixed gamepad universal deconstruction -> Missing ZOs function. Should be compatible too if ZOs adds it in the future

[v3.0 r3.2] 2022-03-16
-Fixed proper hooks into classes of ZO* instead of the objects (e.g. ZO_Enchanting instead of ENCHANTING). This should fix other addons which used similar hooks

[v3.0 r3.1] 2022-03-13
-Removed optional dependency to CraftBagExtended due to a circular dependency with AwesomeGuildStore and CBE
-Moved CBE code to event_player_activated, called once
-Commented the test.lua and xml file in the manifest txt again. If you need the test UI please uncomment the ## entries!

[v3.0 r3.0] 2022-03-12
Total recode of all code lines, helpers and updater functions
Supports Gamepad mode now! Special thanks to IsJustaGhost!!!
Provides callbacks that fire as the LF* filterTypes change.
Use the slash command /lftestfilters to show the test UI and test the default or your custom filterFunction
-Updated the WIKI with examples and API functions-


Supports Universal Deconstruction at PTS (this is a special case as it does not provide any dedicated LF_UNIVERSAL_DECONSTRUCT filterType but reuses LF_SMIHING_DECONSTRUCT, LF_JEWELRY_DECONSTRUCT and LF_ENCHANTING_EXTRACTION at the UniversalDecon UI, depending on the selected UI Tab).
-> Gamepad mode filters is not yet supported here and will be patched later! Callabcks for UniversalDecon will be added later tpo. For now please simply use ZOs callbacks fired by CALLBACK_MANAGER for e.g. UNIVERSAL_DECONSTRUCTION.deconstructionPanel.inventory "OnFilterChanged" or according gamepad variables.

[v3.0 r2.2]
-Updated API for Waking flame
-Fixed alchemy quest markers

[v3.0 r2.1]
-Updated API for Blackwood
-Fixed CraftBag filters as Blackwood will always apply the layoutData.additionalFilters to the craftbag
-Added support for the Companion inventory: LF_INVENTORY_COMPANION

[v3.0 r2.0]
-Compatible with live and PTS
-Fixed buyback window
-Added buyback window text search
-Added repair window text search
-Fixed quickslots search
-Fixed enchanting quest items checkbox
-Fixed enchanting panel detection

[v3.0 r1.9]
-Reverted back to 3.0 r1.7 as 1.8 somehow got broken in the inventory filters (not always, sometimes after opening a bank)

[v3.0 r1.8]
-Updated APIversion
-Fixed quickslots search (thanks to Scootworks)
-Fixed enchanting filterType detection, and thus also fixed the quest checkbox at enchanting creation

[v3.0 r1.7]
-Updated APIversion
-Fixed inventory filters to be compatible with ZOs vanilla inventory UI changes
-Added new filter panel LF_INVENTORY_QUEST
-Fixed constant LF_FILTER_MAX

[v3.0 r1.6]
-Updated APIversion
-Fixed new ZOs checkbox "Include banked items" at crafting panels (deconstruction, research) filtering correctly
-Added optional LibDebugLogger support
-Added API function LibFilters3:GetMinFilter()
-Added global LF_FILTER_MIN

[v3.0 r1.5]
Fixed jewelry research & jewelry research dialog filter updater names

[v3.0 r1.4]
Added: Function to filter (skip) researchLine indices at the research panel
LibFilters:SetResearchLineLoopValues(fromResearchLineIndex, toResearchLineIndex, skipTable)
number fromResearchLineIndex: Start the loop here
number toResearchLineIndex: End the loop here
table skipTable: A table containing the researchLine indices to skip in the loop (theyx won't be added to the horizontal scroll list)

[v3.0 r1.3]
Fixed/Updated: helper functions for the smithing & jewelry research panels

[v3.0 r1.2]
Fixed: Removed LibFilters2_filterType and exchanged them with LibFilters3_filterType in the inventory/layout data

[v3.0 r1.1]
-Removed optional dependency and chat message to inform about LibFilters-2.0 removal
-Fixed helper
Optional Files (0)


Archived Files (25)
File Name
Version
Size
Uploader
Date
3.0r4.1
116kB
Baertram
09/01/23 08:21 AM
3.0r4.0
116kB
Baertram
03/14/23 06:29 AM
3.0r3.9
116kB
Baertram
01/02/23 11:48 AM
3.0r3.8
111kB
Baertram
11/11/22 06:42 AM
3.0r3.7
102kB
Baertram
11/01/22 01:03 PM
3.0r3.6
101kB
Baertram
11/01/22 07:26 AM
3.0r3.5
96kB
Baertram
06/18/22 04:36 PM
3.0r3.4
96kB
Baertram
05/22/22 09:52 AM
3.0r3.3
96kB
Baertram
05/09/22 01:44 AM
3.0r3.2
96kB
Baertram
03/16/22 11:06 AM
3.0r3.1
95kB
Baertram
03/12/22 07:34 PM
3.0r3.0
95kB
Baertram
03/12/22 11:27 AM
3.0r2.2
13kB
Baertram
08/13/21 06:29 AM
3.0r2.1
13kB
Baertram
06/01/21 05:58 AM
3.0r2.0
13kB
Baertram
02/18/21 06:55 PM
3.0r1.9
11kB
Baertram
01/25/21 04:05 PM
3.0r1.8
11kB
Baertram
01/25/21 02:05 PM
3.0r1.7
11kB
Baertram
11/02/20 06:39 AM
3.0r1.6
10kB
Baertram
08/24/20 07:09 PM
3.0r1.5
9kB
Baertram
08/31/19 12:50 PM
3.0r1.4
9kB
Baertram
08/30/19 11:08 PM
3.0r1.3
8kB
Baertram
08/30/19 03:12 PM
3.0r1.2
8kB
Baertram
05/26/19 01:50 PM
3.0r1.1
8kB
Baertram
05/11/19 04:51 PM
3.0r1.0
8kB
05/04/19 08:28 AM


Post A Reply Comment Options
Unread 08/02/19, 05:31 PM  
Eldorhaan
 
Eldorhaan's Avatar

Forum posts: 2
File comments: 142
Uploads: 0
Lua Error

Hello there,

I have install FCO item saver and as requested, it advise to install this lib, but after that I get this error message

Code:
user:/AddOns/LibFilterIt-1.0/LibFilterIt-1.0.lua:8: attempt to index a nil value
stack traceback:
user:/AddOns/LibFilterIt-1.0/LibFilterIt-1.0.lua:8: in function '(main chunk)'
Do you know if this is related to the lib or with FCO ?

EDIT:

I find what was happening, I had an old folder LibFilterIt 1.0, I just delete it and now it's fine. Sorry for the inconvenience.
Last edited by Eldorhaan : 08/03/19 at 02:53 AM.
Report comment to moderator  
Reply With Quote
Unread 08/03/19, 04:20 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Re: Lua Error

LibFilters and LibFilterIt are not the same

Originally Posted by Eldorhaan
Hello there,

I have install FCO item saver and as requested, it advise to install this lib, but after that I get this error message

Code:
user:/AddOns/LibFilterIt-1.0/LibFilterIt-1.0.lua:8: attempt to index a nil value
stack traceback:
user:/AddOns/LibFilterIt-1.0/LibFilterIt-1.0.lua:8: in function '(main chunk)'
Do you know if this is related to the lib or with FCO ?

EDIT:

I find what was happening, I had an old folder LibFilterIt 1.0, I just delete it and now it's fine. Sorry for the inconvenience.
Report comment to moderator  
Reply With Quote
Unread 08/03/19, 09:22 AM  
Eldorhaan
 
Eldorhaan's Avatar

Forum posts: 2
File comments: 142
Uploads: 0
Re: Re: Lua Error

Originally Posted by Baertram
LibFilters and LibFilterIt are not the same

Originally Posted by Eldorhaan
Hello there,

I have install FCO item saver and as requested, it advise to install this lib, but after that I get this error message

Code:
user:/AddOns/LibFilterIt-1.0/LibFilterIt-1.0.lua:8: attempt to index a nil value
stack traceback:
user:/AddOns/LibFilterIt-1.0/LibFilterIt-1.0.lua:8: in function '(main chunk)'
Do you know if this is related to the lib or with FCO ?

EDIT:

I find what was happening, I had an old folder LibFilterIt 1.0, I just delete it and now it's fine. Sorry for the inconvenience.
Yes yes sorry, this is why I edited my orginal post
Report comment to moderator  
Reply With Quote
Unread 08/31/19, 11:44 AM  
cag_dk
 
cag_dk's Avatar

Forum posts: 25
File comments: 122
Uploads: 0
error on research

when selecting "research" -tab, I'm getting this error
Code:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: function expected instead of nil
stack traceback:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: in function 'Update'
This is *only* on jewelry research
Report comment to moderator  
Reply With Quote
Unread 08/31/19, 12:49 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Re: error on research

Originally Posted by cag_dk
when selecting "research" -tab, I'm getting this error
Code:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: function expected instead of nil
stack traceback:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: in function 'Update'
This is *only* on jewelry research
Thanks for the info, found the problem, will fix it.
Report comment to moderator  
Reply With Quote
Unread 10/22/19, 12:01 PM  
rumple9

Forum posts: 2
File comments: 86
Uploads: 0
since yesterdays patch can no longer deposit anything in bank - if libfilters3.0 is disabled I can deposit things
Last edited by rumple9 : 10/22/19 at 12:08 PM.
Report comment to moderator  
Reply With Quote
Unread 10/22/19, 05:40 PM  
dan55304

Forum posts: 0
File comments: 8
Uploads: 0
Originally Posted by rumple9
since yesterdays patch can no longer deposit anything in bank - if libfilters3.0 is disabled I can deposit things
Same here
Last edited by dan55304 : 10/22/19 at 05:40 PM.
Report comment to moderator  
Reply With Quote
Unread 10/23/19, 02:56 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Got an info from ZOs about the "insecure code" error messages:
Code:
It's because the security of the handlers comes from the security of the function plus the security level when they are set (this second part is new). So when an addon tells the inventory to build a bunch of inventory slots, all those handlers are insecure and cannot call private functions. The next patch will change that so those handlers will be secure which will make these errors go away.
The explanation more in detail was finished with this information:
Code:
Things that change the bag that is shown by calling UpdateList on the inventory for example.

If you open the inventory first then the stock UI will make all the slots securely. Then when the addon does it they'll already be there to use.
So this is why opening the inv first made the errors stop for some time.

As the addons, and especially filter addons using LibFilters, use an update function to show/update the inventory rows this shoudl relate to all of the addons like AdvancedFilters, FCOItemSaver, Inventory Grid List and others which add marker icons to the inventory rows (maybe even Craftstore or Alphagear).

I hope this will fix all the cannot pickup/deposit stuff as well or we need to see further after that patch then.
Report comment to moderator  
Reply With Quote
Unread 04/14/20, 05:53 AM  
heaven13

Forum posts: 1
File comments: 56
Uploads: 0
Re: Re: error on research

Was this ever fixed? I get the same error, only on jewelry, and should have the latest version.

Originally Posted by Baertram
Originally Posted by cag_dk
when selecting "research" -tab, I'm getting this error
Code:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: function expected instead of nil
stack traceback:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: in function 'Update'
This is *only* on jewelry research
Thanks for the info, found the problem, will fix it.
Report comment to moderator  
Reply With Quote
Unread 04/14/20, 10:55 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Re: Re: Re: error on research

The cause was fixed in the last version, right.
So with only these 2 lines I cannot help you here, I need the total error message with all lines of the error, expanded so I can see the variables.
And please provide me the steps after a login/reloadui how to reproduce this with which addons enabled please!

At best install LibDebugLogger and DebugLogViewer addon, go to the settings of DebugLogViewer -> LibDebugLogger -> Enable "watch stack" setting and do a reloadui.
Then ONLY enable the addon/s needed to get the error message and ONLY do the steps after reloadui to raise the error message!
After you got it please logout and upload (https://sir.insidi.at/or/logviewer/ -> At the top choose "Share" after the uplaod and provide me the link) the LibDebugLogger.lua file from your SavedVariables here so I can have a look what is causing it.


Originally Posted by heaven13
Was this ever fixed? I get the same error, only on jewelry, and should have the latest version.

Originally Posted by Baertram
Originally Posted by cag_dk
when selecting "research" -tab, I'm getting this error
Code:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: function expected instead of nil
stack traceback:
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: in function 'Update'
This is *only* on jewelry research
Thanks for the info, found the problem, will fix it.
Last edited by Baertram : 04/15/20 at 03:48 PM.
Report comment to moderator  
Reply With Quote
Unread 06/19/20, 12:36 PM  
rumple9

Forum posts: 2
File comments: 86
Uploads: 0
for last couple of days im getting errors when accessing my bank and whole interface gets screwed up. It's also showing everything in my inventory as being the Mastic temper
Report comment to moderator  
Reply With Quote
Unread 06/19/20, 03:31 PM  
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 rumple9
for last couple of days im getting errors when accessing my bank and whole interface gets screwed up. It's also showing
everything in my inventory as being the Mastic temper
Show me the complete and expanded, showing the variables, error message here.
Without I cannot see why it should be related to LibFilters-3.0? It was not updated since months neither any addons using it so it might be other addons you have updated recently!
Which addons using LibFilters-3.0 are you using?
Do you happen to use "Ntak Loot and Steal" or "Harvens Stolen Filter"?
Disable the used on, if you use it, and check if it works then. I only know of NTak Loot and Steal being updated recently using LibFilters-3.0.

ELSE: Check which addons are active as you get the error message!
Disable them one after another, starting witht he ones you have updated recently.

AND: ALWAYS LOGOUT BEFORE UPDATING ADDONS AND LIBRARIES!


As additional info you might check first:
Minion got some problems in the past.
If you use it check your addons and libraries, they could be missing files!
So reinstall them, maybe manually to be sure:
https://www.esoui.com/forums/faq.php..._howto_install
https://www.esoui.com/forums/showthread.php?t=8858
https://www.esoui.com/forums/showthread.php?t=9149
Last edited by Baertram : 06/19/20 at 03:32 PM.
Report comment to moderator  
Reply With Quote
Unread 08/24/20, 04:00 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Working on a fix for the new checkbox at deconstruction / research "Include banked items" if LibFilters-3.0 is enabled (checkbox will not work then).

If you get any error message at the research panel of crafting tables please logout, delete LibFilters-3.0 AND re-install the newest library version:

Current: v3.0 r1.6
Last edited by Baertram : 10/19/20 at 01:01 PM.
Report comment to moderator  
Reply With Quote
Unread 01/25/21, 02:49 PM  
Thrasher

Forum posts: 7
File comments: 206
Uploads: 0
Thanks for this Addon!

With the latest update, all filters in my inventory have stopped working.
Report comment to moderator  
Reply With Quote
Unread 01/25/21, 02:51 PM  
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 Thrasher
Thanks for this Addon!

With the latest update, all filters in my inventory have stopped working.
Which addons do not work anymore that you are using with LibFilters?
I've tested it with FCOItemSaver, AdvancedFilters, FCOCraftFilter and all work fine for me.

Do you mean the vanilla UI inventory subfilters? -> LibFilters does not change them.

Did you logout BEFORE updating the addons?
Always LOGOUT first please.

Please logout, delete the whole folder live/Addons/LibFilters-3.0
Redownload it via Minion then or manually.

If your inventory filters still do not work anymore tell em the addon you are using LibFilters-3.0 with please, so I can test with that addon.
And disable ALL other addons to make sure not other addon is interfering!
Last edited by Baertram : 01/25/21 at 02:55 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: