Download
(4 Kb)
Download
Updated: 04/21/17 12:19 AM
Pictures
File Info
Compatibility:
Homestead (2.7)
Updated:04/21/17 12:19 AM
Created:03/31/17 10:18 PM
Monthly downloads:91
Total downloads:12,944
Favorites:11
MD5:
Categories:Bags, Bank, Inventory, Plug-Ins & Patches
Advanced Filters - Crafted Set plugin  Popular! (More than 5000 hits)
Version: 2.0.1
by: Marsouin [More]
Crafted set filter plugin for Advanced Filters

This is a filter plugin for the dynamic filters of the "Advanced Filters" addon.
You are able to filter the crafted weapons and armor by their name from the dropdown box.

v2.0.1 : submenu "all crafted sets" + sort by name, by Baertram
v2.0.0 : Many thanks to Baertram, for the idea and his help in rewriting the code

TODO :
russian translation
sub sub menus
- Sort the set names by name
- All Crafted Set entry
- translation fixed
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Uploader
Date
2.0.0
3kB
Marsouin
04/13/17 10:29 PM
1.0.1
6kB
Marsouin
04/02/17 12:49 AM
1.0
5kB
03/31/17 10:18 PM


Post A Reply Comment Options
Unread 04/02/17, 05:13 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4912
File comments: 5990
Uploads: 78
Thanks for the plugin.

Maybe this helps you to get the set names dynamically by help of their itemId.
You won't need to build localized EN.lua, FR.lua, DE.lua files anymore then:

Lua Code:
  1. --The itemIds of the craftable sets
  2. local SetIds = {
  3. [49575] = true,  -- Aschengriff
  4. [43805] = true,  -- Todeswind
  5. [47279] = true,  -- Stille der Nacht
  6.  
  7. [43808] = true,  -- Zwielicht
  8. [48042] = true,  -- Verführung
  9. [43979] = true,  -- Torugs Pakt
  10. [69942] = true,  -- Prüfungen
  11.  
  12. [51105] = true,  -- Histrinde
  13. [47663] = true,  -- Weißplanke
  14. [43849] = true,  -- Magnus
  15.  
  16. [48425] = true,  -- Kuss des Vampirs
  17. [52243] = true,  -- Lied der Lamien
  18. [52624] = true,  -- Alessias Bollwerk
  19. [60280] = true,  -- Adelssieg
  20. [71806] = true,  -- Tavas Gunst
  21. [75406] = true,  -- DB:Kwatch Gladiator
  22.  
  23. [51486] = true,  -- Weidenpfad
  24. [51864] = true,  -- Hundings Zorn
  25. [49195] = true,  -- Mutter der Nacht
  26. [69592] = true,  -- Julianos
  27.  
  28. [60630] = true,  -- Umverteilung
  29. [72156] = true,  -- Schlauer Alchemist
  30. [75756] = true,  -- DB:Varen's Legacy
  31.  
  32. [43968] = true,  -- Erinnerung
  33. [43972] = true,  -- Schemenauge
  34. [44053] = true,  -- Augen von Mara
  35. [54149] = true,  -- Shalidor's Fluch
  36. [53772] = true,  -- Karegnas Hoffnung
  37. [53006] = true,  -- Ogrumms Schuppen
  38. [54963] = true,  -- Arena
  39.  
  40. [58174] = true,  -- Doppelstern
  41. [60980] = true,  -- Rüstungsmeister
  42. [70642] = true,  -- Morkuldin
  43. [72506] = true,  -- Ewige Jagd
  44. [76106] = true,  -- DB:Pelinal's Aptitude
  45. }
  46.  
  47. local fullLevelDropdownSetsCallbacks = {}
  48. local setNames = {}
  49. --Get the name of the sets
  50. for setItemId, _ in pairs(SetIds) do
  51.     local link = '|H1:item:'..setItemId..':370:50:0:370:50:0:0:0:0:0:0:0:0:0:28:0:0:0:10000:0|h|h'
  52.     local _,setName = GetItemLinkSetInfo(link, false)
  53.  
  54.     --Put the id and name in a table
  55.     setNames[setId] = setName
  56.     table.insert(fullLevelDropdownSetsCallbacks, { name = setName, filterCallback = GetFilterCallbackForSets(setId) })
  57. end

You need to adjust your function GetfilterCallbackForSets(setNames) so it uses the setId as parameter instead.
Maybe you can also strip the itemId from the itemlink and compare just the itemId instead of the name?

Lua Code:
  1. local function GetFilterCallbackForSets( setId )
  2.     -- equalsBonus = equalsBonus or false
  3.  
  4.     return function( slot )
  5.         --get the item link
  6.         local itemLink = GetItemLink(slot.bagId, slot.slotIndex)
  7.         --Get the set item information
  8.         local _, setName, _, _, _ = GetItemLinkSetInfo(itemLink)
  9.  
  10. --      local lFlavor = GetItemId(slot.bagId, slot.slotIndex)
  11. --      df("%s %s %s",setName, lFlavor, setNames)
  12.  
  13.         return false or (string.find(setName, setNames[setId]))
  14.     end
  15. end


And then put this table into the localized tables like this:

Lua Code:
  1. --Loop over the standard set names and add them to the returnTable
  2. local function getSetNames(returnTable)
  3.  if returnTable == nil then return end
  4.  for setKey, setName in pairs(setNames) do
  5.    returnTable[setKey] = setName
  6.  end
  7. end
  8.  
  9. local stringsEN = {
  10.     ["SNUSetFiltersSubmenuCraftedSet"] = "Sets - crafted",
  11. }
  12. getSetNames(stringsEN)
  13.  
  14. local stringsDE = {
  15.     ["SNUSetFiltersSubmenuCraftedSet"] = "Sets - hergestellt",
  16. }
  17. getSetNames(stringsDE )
  18. ...

I hope it works!

Baertram
Last edited by Baertram : 04/02/17 at 05:42 AM.
Report comment to moderator  
Reply With Quote
Unread 04/03/17, 11:49 AM  
Marsouin
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 2
Thx a lot Baertram, I'll have a big look at your code.

As you can see, the skelet of my plugin come from your work
Report comment to moderator  
Reply With Quote
Unread 04/08/17, 03:12 AM  
Marsouin
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 3
Uploads: 2
I started working on your code.

The problem with working with Ids is that we can not access with itemId; There is one by piece and by line.

For example, you give me the itemId 76106 :

the itemId 76106 is for the Pelinal's chest,
but the Infused Pelinal's chest have the itemId 76141, and so on...
Report comment to moderator  
Reply With Quote
Unread 06/07/18, 05:16 PM  
LordRhys

Forum posts: 0
File comments: 16
Uploads: 0
Gives InventoryUI error after latest patch

After latest pacth 4.0.8 having this plugin enabled causes an InventoryUI error every time you loot something, I'm guessing this has to due with Summerset crafted sets being added into game and since I have some items with them this addon causes errors
Report comment to moderator  
Reply With Quote
Unread 12/15/19, 01:36 AM  
MadDragon

Forum posts: 3
File comments: 40
Uploads: 0
Error when filtering by crafted set

So, first time I used the feature, and... got the following. Is this an issue with this addon, or another? It also required a UI reload to fix.

Code:
user:/AddOns/AF_SNUSetsFiltersCraftedSet/AF_SNUSetsFiltersCraftedSet.lua:73: attempt to index a number value
stack traceback:
user:/AddOns/AF_SNUSetsFiltersCraftedSet/AF_SNUSetsFiltersCraftedSet.lua:73: in function 'filter'
|caaaaaa<Locals> slot = 1, setFound = F </Locals>|r
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:234: in function 'runFilters'
|caaaaaa<Locals> filterType = 17, tag = "AF_DropdownFilter", filter = user:/AddOns/AF_SNUSetsFiltersCraftedSet/AF_SNUSetsFiltersCraftedSet.lua:70 </Locals>|r
(tail call): ?
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:250: in function 'additionalFilter'
user:/AddOns/LibFilters-3.0/LibFilters-3.0/helper.lua:195: in function 'optFilterFunction'
|caaaaaa<Locals> itemData = [table:1]{uid = "4815065171003250813", slotIndex = 1, stackSellPrice = 320, isJunk = F, stackCount = 64, requiredChampionPoints = 0, isPlaceableFurniture = F, bagId = 1, meetsUsageRequirement = T, stackLaunderPrice = 0, isFromCrownStore = F, sellInformationSortOrder = 1, traitInformation = 0, stolen = F, requiredLevel = 50, bestGamepadItemCategoryName = "Soul Gem", statValue = 0, lnk = "|H0:item:33265:30:50:0:0:0:0:0...", specializedItemType = 900, rawName = "Soul Gem (Empty)", equipType = 0, age = 0, name = "Soul Gem (Empty)", customSortOrder = 1, storeGroup = 6, uniqueId = 81574515180642, launderPrice = 0, meetsRequirementsToBuy = T, isEquipped = F, itemType = 19, statusSortOrder = 0, isPlayerLocked = F, isGemmable = F, sellInformation = 0, traitInformationSortOrder = 1, isBoPTradeable = F, condition = 100, quality = 1, sellPrice = 5, iconFile = "/esoui/art/icons/soulgem_006_e...", itemInstanceId = 2200604764, locked = F}, result = T </Locals>|r
EsoUI/Ingame/Inventory/SharedInventory.lua:281: in function 'ZO_SharedInventoryManager:GenerateFullSlotData'
|caaaaaa<Locals> self = [table:2]{fireCallbackDepth = 0}, optFilterFunction = user:/AddOns/LibFilters-3.0/LibFilters-3.0/helper.lua:191, filteredItems = [table:3]{}, i = 1, bagId = 1, bagCache = [table:4]{}, slotIndex = 1, itemData = [table:1] </Locals>|r
user:/AddOns/LibFilters-3.0/LibFilters-3.0/helper.lua:204: in function 'GetIndividualInventorySlotsAndAddToScrollData'
|caaaaaa<Locals> self = [table:5]{sortKey = "name", dirty = F, filterType = 4, currentFilter = 38, performingFullRefresh = T, sortOrder = T, LibFilters3_filterType = 34}, predicate = user:/AddOns/LibFilters-3.0/LibFilters-3.0/helper.lua:191, filterFunction = EsoUI/Ingame/Crafting/SmithingImprovement_Shared.lua:384, filterType = 4, data = [table:6]{}, useWornBag = T, oldPredicate = EsoUI/Ingame/Crafting/SmithingImprovement_Shared.lua:380, bagsToUse = [table:7]{1 = 1} </Locals>|r
EsoUI/Ingame/Crafting/Keyboard/SmithingImprovement_Keyboard.lua:200: in function 'ZO_SmithingImprovementInventory:Refresh'
|caaaaaa<Locals> self = [table:5], data = [table:6], USE_WORN_BAG = T </Locals>|r
EsoUI/Ingame/Crafting/Keyboard/CraftingInventory.lua:132: in function 'ZO_CraftingInventory:PerformFullRefresh'
|caaaaaa<Locals> self = [table:5] </Locals>|r
EsoUI/Ingame/Crafting/SharedCraftingInventory.lua:67: in function 'ZO_SharedCraftingInventory:HandleDirtyEvent'
|caaaaaa<Locals> self = [table:5] </Locals>|r
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:196: in function '(anonymous)'
user:/AddOns/LibFilters-3.0/LibFilters-3.0/LibFilters-3.0.lua:396: in function 'Update'
Last edited by MadDragon : 12/15/19 at 01:39 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: