Download
(2 Kb)
Download
Updated: 10/14/22 04:53 PM
Pictures
File Info
Compatibility:
Firesong (8.2.5)
Lost Depths (8.1.5)
Updated:10/14/22 04:53 PM
Created:10/14/22 04:53 PM
Monthly downloads:23
Total downloads:1,326
Favorites:0
MD5:
Item Set Dumper
Version: 1.0
by: uberswe [More]
This addon waits about 5 seconds after loading into the game and then proceeds to retrieve all the item sets in the game. The game may freeze for a short duration when this is happening. After doing a /reloadui all the sets will be saved in the ItemSetDumper saved variables file.
Optional Files (0)


Post A Reply Comment Options
Unread 10/15/22, 07:36 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4991
File comments: 6042
Uploads: 78
That may work too yeah,but the setIds have changed in the past too so it may not be reliable (allthough the older ones do not change, only if they get removed, it's more of the new added ones appear at a PTS 1 PTS before they will be released and then their ids might have changed again).
I decided for myself that it's less of a hussle to scan all once then each PTS instead of having to recode things again and again

Originally Posted by uberswe
Originally Posted by Baertram
Yeah IF the cratfted sets would be in API I would not need LibSets and update it each time
But scanning the itemIds for crafted ones and doing the set collections for non craftable is somehow duplicate so I decided to just do the itemId scanning for both as it's more reliable than an API where the half would be missing -> extra payload
True, I have never been kicked from the server for too many API calls with this addon however but I also know I am not doing as detailed of a scan as you are doing with LibSets. I might spend some time later optimizing for performance to see what can be done It may be better to just scan all the ids as you do

I wish I could query by ItemSetID but I could not make it work. Scanning all the collections items will get you ItemSetIDs that start at 19 and keep going to about 680. There you will see gaps for crafted sets, like 207 which is Law of Julianos will be missing. So to optimize I wanted to just get the gaps and then add like a buffer of 30 ItemSetIDs at the end. This should be much more efficent but I couldn't figure out how to get an ItemID or ItemLink from just a ItemSetID.
Last edited by Baertram : 10/15/22 at 07:36 AM.
Report comment to moderator  
Reply With Quote
Unread 10/15/22, 06:33 AM  
uberswe
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 4
Uploads: 6
Originally Posted by Baertram
Yeah IF the cratfted sets would be in API I would not need LibSets and update it each time
But scanning the itemIds for crafted ones and doing the set collections for non craftable is somehow duplicate so I decided to just do the itemId scanning for both as it's more reliable than an API where the half would be missing -> extra payload
True, I have never been kicked from the server for too many API calls with this addon however but I also know I am not doing as detailed of a scan as you are doing with LibSets. I might spend some time later optimizing for performance to see what can be done It may be better to just scan all the ids as you do

I wish I could query by ItemSetID but I could not make it work. Scanning all the collections items will get you ItemSetIDs that start at 19 and keep going to about 680. There you will see gaps for crafted sets, like 207 which is Law of Julianos will be missing. So to optimize I wanted to just get the gaps and then add like a buffer of 30 ItemSetIDs at the end. This should be much more efficent but I couldn't figure out how to get an ItemID or ItemLink from just a ItemSetID.
Report comment to moderator  
Reply With Quote
Unread 10/15/22, 06:15 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4991
File comments: 6042
Uploads: 78
Yeah IF the cratfted sets would be in API I would not need LibSets and update it each time
But scanning the itemIds for crafted ones and doing the set collections for non craftable is somehow duplicate so I decided to just do the itemId scanning for both as it's more reliable than an API where the half would be missing -> extra payload

Originally Posted by uberswe
Originally Posted by Baertram
I have not checked your code but that "the UI might freeze for some seconds" I know a lot
LibSets provides all the set data and in order to update it on PTS and new patches it needs to scan all itemIds of the game once to check for new setIds and so on.

I've managed to get kicked from the server a lot due to the loop I was using in the past! It was just checking each itemId after another.
After a while I fixed that + the UI lag was removed by making the scan build packages of e.g. 5000 itemIds, and lezt it scan like n * 5000 item packages afteranother using zo_callLater (each packae loop increases the zo_callLater by e.g. 500 milliseconds) so the scanning in total needs more time but does not lag the UI and does not get you kicked for server message spam any longer.

If you are up to use that check LibSets_Debug.lua file, function loadSetsByIds(packageNr, from, to, noReloadInfo)
which is called from function scanAllSetData(keepUncompressedetItemIds, noReloadInfo) in a loop
I reviewed the LibSets code for some inspiration when developing this addon. I think it's very well made and contains a lot of extra information that I have been unable to just fetch from the game. Thanks for maintaining such a library

As for the dumping, on my PC with a 1080 Ti and a i7-7700K CPU it freezes for less than a second and since the addon is really only used for dumping sets I think it's good enough at this time although your suggestion of maybe splitting the scanning in chunks would be good to have.

I personally didn't like the idea of building ItemLinks as Libsets does so I scan all the set items in two ways.

First I iterate through all the collections, this will give us all the set items that can be transmuted

Code:
local function GetNextItemSetCollectionIdIter(_, lastItemSetId)
    return GetNextItemSetCollectionId(lastItemSetId)
end
Then I can get the itemlink with this function

Code:
GetItemSetCollectionPieceItemLink(pieceId, LINK_STYLE_DEFAULT, ITEM_TRAIT_TYPE_NONE)
From there I think LibSets basically does the same thing with the item link.

Now unfortunately I could not find an iterator for crafted sets so there I basically have to loop item ids in a similar way.

Code:
local itemLink = string.format("|H1:item:%d:%d:50:0:0:0:0:0:0:0:0:0:0:0:0:%d:%d:0:0:%d:0|h|h", itemSetId, 370, ITEMSTYLE_NONE, 1, 10000)
        local hasSet, setName, numBonuses, numNormalEquipped, maxEquipped, setId, numPerfectedEquipped = GetItemLinkSetInfo(itemLink)

        if not isempty(setName) and not ItemSetDumper.savedData[setId] then
           ...
I don't know if the collection iterator helps much but I wish there was a crafted set iterator, that would be really nice.
Report comment to moderator  
Reply With Quote
Unread 10/15/22, 05:55 AM  
uberswe
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 4
Uploads: 6
Originally Posted by Baertram
I have not checked your code but that "the UI might freeze for some seconds" I know a lot
LibSets provides all the set data and in order to update it on PTS and new patches it needs to scan all itemIds of the game once to check for new setIds and so on.

I've managed to get kicked from the server a lot due to the loop I was using in the past! It was just checking each itemId after another.
After a while I fixed that + the UI lag was removed by making the scan build packages of e.g. 5000 itemIds, and lezt it scan like n * 5000 item packages afteranother using zo_callLater (each packae loop increases the zo_callLater by e.g. 500 milliseconds) so the scanning in total needs more time but does not lag the UI and does not get you kicked for server message spam any longer.

If you are up to use that check LibSets_Debug.lua file, function loadSetsByIds(packageNr, from, to, noReloadInfo)
which is called from function scanAllSetData(keepUncompressedetItemIds, noReloadInfo) in a loop
I reviewed the LibSets code for some inspiration when developing this addon. I think it's very well made and contains a lot of extra information that I have been unable to just fetch from the game. Thanks for maintaining such a library

As for the dumping, on my PC with a 1080 Ti and a i7-7700K CPU it freezes for less than a second and since the addon is really only used for dumping sets I think it's good enough at this time although your suggestion of maybe splitting the scanning in chunks would be good to have.

I personally didn't like the idea of building ItemLinks as Libsets does so I scan all the set items in two ways.

First I iterate through all the collections, this will give us all the set items that can be transmuted

Code:
local function GetNextItemSetCollectionIdIter(_, lastItemSetId)
    return GetNextItemSetCollectionId(lastItemSetId)
end
Then I can get the itemlink with this function

Code:
GetItemSetCollectionPieceItemLink(pieceId, LINK_STYLE_DEFAULT, ITEM_TRAIT_TYPE_NONE)
From there I think LibSets basically does the same thing with the item link.

Now unfortunately I could not find an iterator for crafted sets so there I basically have to loop item ids in a similar way as LibSets.

Code:
local itemLink = string.format("|H1:item:%d:%d:50:0:0:0:0:0:0:0:0:0:0:0:0:%d:%d:0:0:%d:0|h|h", itemSetId, 370, ITEMSTYLE_NONE, 1, 10000)
local hasSet, setName, numBonuses, numNormalEquipped, maxEquipped, setId, numPerfectedEquipped = GetItemLinkSetInfo(itemLink)

    if not isempty(setName) and not ItemSetDumper.savedData[setId] then
       ...
I don't know if the collection iterator helps much but I wish there was a crafted set iterator, that would be really nice.
Last edited by uberswe : 10/15/22 at 06:16 AM.
Report comment to moderator  
Reply With Quote
Unread 10/15/22, 05:19 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4991
File comments: 6042
Uploads: 78
I have not checked your code but that "the UI might freeze for some seconds" I know a lot
LibSets provides all the set data and in order to update it on PTS and new patches it needs to scan all itemIds of the game once to check for new setIds and so on.

I've managed to get kicked from the server a lot due to the loop I was using in the past! It was just checking each itemId after another.
After a while I fixed that + the UI lag was removed by making the scan build packages of e.g. 5000 itemIds, and lezt it scan like n * 5000 item packages afteranother using zo_callLater (each packae loop increases the zo_callLater by e.g. 500 milliseconds) so the scanning in total needs more time but does not lag the UI and does not get you kicked for server message spam any longer.

If you are up to use that check LibSets_Debug.lua file, function loadSetsByIds(packageNr, from, to, noReloadInfo)
which is called from function scanAllSetData(keepUncompressedetItemIds, noReloadInfo) in a loop
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: