Go to Page... |
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: | 52 |
Total downloads: | 1,460 |
Favorites: | 0 |
MD5: |
Comment Options |
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
10/15/22, 06:33 AM | ||
|
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. |
|
|
uberswe |
View Public Profile |
Send a private message to uberswe |
Find More Posts by uberswe |
Add uberswe to Your Buddy List |
10/15/22, 06:15 AM | |||
|
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
|
||
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
10/15/22, 05:55 AM | ||
|
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 Code:
GetItemSetCollectionPieceItemLink(pieceId, LINK_STYLE_DEFAULT, ITEM_TRAIT_TYPE_NONE) 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 ...
Last edited by uberswe : 10/15/22 at 06:16 AM.
|
|
|
uberswe |
View Public Profile |
Send a private message to uberswe |
Find More Posts by uberswe |
Add uberswe to Your Buddy List |
10/15/22, 05:19 AM | |
|
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 |
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |