Quantcast
Download
(794 Kb)
Download
Updated: 11/21/20 06:49 PM
Compatibility:
Markarth (6.2.5)
Stonethorn (6.1.5)
Greymoor (6.0.5)
Updated:11/21/20 06:49 PM
Created:01/21/19 10:18 AM
Monthly downloads:62,334
Total downloads:743,772
Favorites:326
MD5:
6.2.5
LibSets  Popular! (More than 5000 hits)
Version: 0.2.4
by: Baertram [More]
Attention please - To the addon devs:
DO NOT ACCESS THE PRELOADED TABLES DIRECTLY BUT USE THE API FUNCTIONS like LibSets.GetAll* to READ THE PRELOADED DATA!


LibSets
A library to help with item sets for the following "setTypes":
Code:
LIBSETS_SETTYPE_ITERATION_BEGIN = 1

LIBSETS_SETTYPE_ARENA                           = 1 --"Arena"
LIBSETS_SETTYPE_BATTLEGROUND                    = 2 --"Battleground"
LIBSETS_SETTYPE_CRAFTED                         = 3 --"Crafted"
LIBSETS_SETTYPE_CYRODIIL                        = 4 --"Cyrodiil"
LIBSETS_SETTYPE_DAILYRANDOMDUNGEONANDICREWARD   = 5 --"DailyRandomDungeonAndICReward"
LIBSETS_SETTYPE_DUNGEON                         = 6 --"Dungeon"
LIBSETS_SETTYPE_IMPERIALCITY                    = 7 --"Imperial City"
LIBSETS_SETTYPE_MONSTER                         = 8 --"Monster"
LIBSETS_SETTYPE_OVERLAND                        = 9 --"Overland"
LIBSETS_SETTYPE_SPECIAL                         = 10 --"Special"
LIBSETS_SETTYPE_TRIAL                           = 11 --"Trial"
LIBSETS_SETTYPE_MYTHIC                        = 12 --"Mythic"                           

--Only for iterations from 1 (LIBSETS_SETTYPE_ITERATION_BEGIN ) to the maximum
LIBSETS_SETTYPE_ITERATION_END                   = maximum setType (currently: LIBSETS_SETTYPE_MYTHIC or LIBSETS_SETTYPE_TRIAL) --depending on the games APIVersion
Also provides DLC ids:
Code:
DLC_BASE_GAME 0
DLC_IMPERIAL_CITY 1
DLC_ORSINIUM 2
DLC_THIEVES_GUILD 3
DLC_DARK_BROTHERHOOD 4
DLC_SHADOWS_OF_THE_HIST 5
DLC_MORROWIND 6
DLC_HORNS_OF_THE_REACH 7
DLC_CLOCKWORK_CITY 8
DLC_DRAGON_BONES 9
DLC_SUMMERSET 10
DLC_WOLFHUNTER 11
DLC_MURKMIRE 12
DLC_WRATHSTONE 13
DLC_ELSWEYR 14
DLC_SCALEBREAKER 15
DLC_DRAGONHOLD 16
DLC_HARROWSTORM 17
DLC_GREYMOOR 18
DLC_STONETHORN 19
DLC_MARKARTH 20


--Iterators
DLC_ITERATION_BEGIN = DLC_BASE_GAME
DLC_ITERATION_END = DLC_STONETHORN or DLC_MARKARTH --depending on the game's APIVersion
And several API functions to read set's drop zone, drop boss, and other info.

Global variable of the library to access it in your code:
LibSets

Please do NOT use LibStub with this library as it will not work!
Simply include the following tag into your addon's manifest txt file:
Code:
##DependsOn: LibSets
This library uses SavedVariables and thus needs it's own LibSets.txt manifest file!
You must not include this library into subfolders of your addon and you must not include it manually into your addon's manifest txt file like
Code:
--This is wrong! Do not include this in your addon's txt file
/libs/LibSets/LibSets_Constants.Lua
/libs/LibSets/LibSets.Lua
...

Supported languages are:
German
English
French
Russian
-> If you want your language supported as well contact me via private message here on www.esoui.com please.

It contains:
-SetId of the set
-Set's itemIds for all set items (to build an itemlink use function LibSets.buildItemLink)
-Name of a set for the supported languages
-Tables which contain the setIds and setData for each setType
-Tables which contain a mapping between the wayshrines and their zoneIds
-Counters to check how many sets of a type exist
-Functions to get & check the set data, get set languages, teleport to craftable set's near wayshrines, open set drop zone on map, open and show wayshrine of set on map, etc.

@developers
Be sure to check if LibSets finished loading the sets properly before accessing it.
Lua Code:
  1. If not LibSets or not LibSets.checkIfSetsAreLoadedProperly() then
  2.      --LibSets is currentls scanning and/or not ready! Abort here
  3.      myAddon.libSetsReady = false
  4.    else
  5.      myAddon.libSetsReady = true
  6.    end
  7.  
  8.     --Wherever you use LibSets check:
  9.    if myAddon.libSetsReady then
  10.       ---do whatever you want with LibSets
  11.    end

Unique setId
The API provides an unique setId for items which belong to a set.
You need an itemLink of the item you would like to check and are able to use the following API function to get the setId and some other parameters as well.
Code:
* GetItemLinkSetInfo(*string* _itemLink_, *bool* _equipped_)
** _Returns:_ *bool* _hasSet_, *string* _setName_, *integer* _numBonuses_, *integer* _numEquipped_, *integer* _maxEquipped_, *integer* _setId_
Important: The data this API function GetItemLinkSetInfo(itemLink) provides is NOT stored redundantly inside the library LibSets!
So please be sure to get the parameters "numBonuses", "numEquipped", "maxEquipped" by help of this ESO API function.

If you need e.g. the "_numEquipped_" parameter info you need to build an itemLink of a set's itemId, like this:
You can use the function LibSets.BuildItemLink(LibSets.GetSetItemId(setId, equipType)) to build the itemLink and then use the API function GetItemLinkSetInfo(itemLink, false) to get this information.

What constants can be used?
The non-API version dependent constants are available within this library's files LibSets_ConstantsLibraryInternal.lua and LibSets_Constants_All.lua.
-> Please check these file for the possible constants for:
-LibSet tableKeys
-LibSet setTypes & names
-DLC Ids (see above)
-LibSet Undaunted Chest Data & names


Where is the data?
The setsData is stored inside the included excel document LibSets_SetData.xlsx. From this file the lua contents for the following files is created:
The setsData is stored in the file LibSets_Data_All.lua
Inside this file there is a table LibSets.setInfo which provides the set information from the included excel.
And there are many pre-loaded (scanned ingame multilingual, shrinked and stored in this lua file) tables for the set itemIds, set names /multi language)m wayshrineNodeIndices mapping to their zoneId, and others.
-The file itsself got comments to describe how to get the data needed and what format is needed.

DO NOT ACCESS THESE TABLES DIRECTLY BUT USE THE API FUNCTIONS like LibSets.GetAll* to READ THE PRELOADED DATA!
Else you will get error messages as the data is sotmetimes compressed and needs to be decompressed first!

API functions of the library:

Global variable of the library to access it:
Code:
LibSets
PLEASE CHECK THE FILE LibSets.lua for the API functions (starting at "-- Global helper functions")

Below are only some important ones:
Lua Code:
  1. ------------------------------------------------------------------------
  2. --  Global library check functions
  3. ------------------------------------------------------------------------
  4. --Returns a boolean value, true if the sets of the game were already loaded/ false if not
  5. --> Returns:    boolean areSetsLoaded
  6. function lib.AreSetsLoaded()
  7.  
  8. --Returns a boolean value, true if the sets of the game are currently scanned and added/updated/ false if not
  9. --> Returns:    boolean isCurrentlySetsScanning
  10. function lib.IsSetsScanning()
  11.  
  12. --Returns a boolean value, true if the sets database is properly loaded yet and is not currently scanning
  13. --or false if not.
  14. --This functions combines the result values of the functions LibSets.AreSetsLoaded() and LibSets.IsSetsScanning()
  15. function lib.checkIfSetsAreLoadedProperly()

Updating the library with new PTS data:
If you want to know what is to do as the library needs an update with new PTS data, check files "LibSets.lua" AND "LibSets_Debug.lua" at the top and read + understand the steps needed please!

GitHub - If you want to contribute
LibSets on GitHub
LibSets for PTS on GitHub

Most up 2 date excel document for the LibSets data, like sets, zones, maps, wayshrines, ...
Click the github link above
0.2.4
-Moved Markarth sets and constants to the normal table as Markarth is live
-Fixed excel comments
-Updated set proc data. Many thanks again to ExoYs!
-Added weapon types of set items in library table
-Added API function
Code:
LibSets.GetSetWeaponTypes(setId)
-Added new API functions for the item set collections book UI, e.g. get the current zoe or parent zone and show the item set collections book UI for this zone. Get the zoneId of a item set collection book's parent and subcategory, get the categoryData for a zoneId, etc.
Code:
--Returns the zoneIds (table) which are linked to a item set collection's categoryId
--Not all categories are connected to a zone though! The result will be nil in these cases.
--Example return table: {148}
function LibSets.GetItemSetCollectionZoneIds(categoryId)

--Returns the categoryIds (table) which are linked to a item set collection's zoneId
--Not all zoneIds are connected to a category though! The result will be nil in these cases.
--Example return table: {39}
function LibSets.GetItemSetCollectionCategoryIds(zoneId)

--Returns the parent category data (table) containing the zoneIds, and possible boolean parameters
--isDungeon, isArena, isTrial of ALL categoryIds below this parent -> See file LibSets_data_all.lua ->
--table lib.setDataPreloaded -> table key LIBSETS_TABLEKEY_SET_ITEM_COLLECTIONS_ZONE_MAPPING
--Example return table: { parentCategory=5, category=39, zoneIds={148}, isDungeon=true},--Arx Corinium
function LibSets.GetItemSetCollectionParentCategoryData(parentCategoryId)

--Returns the category data (table) containing the zoneIds, and possible boolean parameters
--isDungeon, isArena, isTrial -> See file LibSets_data_alllua -> table lib.setDataPreloaded ->
--table key LIBSETS_TABLEKEY_SET_ITEM_COLLECTIONS_ZONE_MAPPING
--Example return table: { parentCategory=5, category=39, zoneIds={148}, isDungeon=true},--Arx Corinium
function LibSets.GetItemSetCollectionCategoryData(categoryId)

--Get the current map's zoneIndex and via the index get the zoneId, the parent zoneId, and return them
--+ the current zone's index and parent zone index
--> Returns: number currentZoneId, number currentZoneParentId, number currentZoneIndex, number currentZoneParentIndex
function LibSets.GetCurrentZoneIds()

--Open the item set collections book of the current parentZoneId. If more than 1 categoryId was found for the parentZoneId,
--the 1st will be opened! Returns true if UI has shown a category node successfully
function LibSets.OpenItemSetCollectionBookOfCurrentParentZone()

--Open the item set collections book of the current zoneId. If more than 1 categoryId was found for the zoneId,
--the 1st will be opened! Returns true if UI has shown a category node successfully
function LibSets.OpenItemSetCollectionBookOfCurrentZone()

0.2.3
-Updated API for Markarth
-Added Markarth sets to excel and lua code
-Fixed some debug functions and description texts
-Added new data about Set Procs, like abilityIds, timer info, etc. (thanks to ExoY!) into the excel and the lua code
-Added new set proc API functions to check if an set got a proc and return data about it (check the file LibSets.lua and search for "Set PROC functions" ~line 1509 for more information and comments about the functions. Attention: The functions RegisterSetProcEventCallbackForAbilityIds and unregisterSetProcEvent* are NOT TESTED YET and only in there as examples. DO NOT USE THEM or if you use them please share your info if they work as intended. Thank you)

0.2.2
-Fixed non-EN missing names of sets (e.g. of "Talfyg's Treachery") causing errors within WishList e.g.
-Moved Stonethorn sets and zoneIds to current API tables
-Fixed empty old-API table checks to run without reason (if no entries are given)

0.2.1
LibSets API 100032 Stonethorn PTS
-Added setIds
-Added itemIds of new setIds
-Added wayshrineIds of new dungeons
-Added zoneIds of new dungeons
-Added set names de, en, fr, ru
-Updated API functions for debugging to show new found setIds
-Added SavedVariables key "NewSetIds" which can be filled via setItemid scanning and or function "LibSets.DebugShowNewSetIds()".
Will be filling the SV table "NewSetIds" -> "Subtable GetWorldName() -> ServerName" -> Subtable "GetAPIVersion()" -> API version with the [number index] = value setid|setNameClean

0.2.0
Fixed function LibSets.GetSetItemId -> returns first found itemId again now

0.1.9
Updated Russian translations -> Thanks to adjutantt

0.1.8
Fixed: AddOnVersion tag in txt file
Fixed: DLCid DLC_BASE_GAME did not return a string for LibSets.GetDLCName -> returns "Elder Scrolls Online" now
Changed: Split up dropMechanic long names into shorter dropMechanic names and tooltips.
Functions like LibSets.GetDropMechanicName and LibSets.GetDropMechanic will return an additional parameter dropMechanicTooltip now

0.1.7
Fixed: SetType translations
Changed: Function to get all setTypes renamed from GetSetTypes to GetAllSetTypes properly
Added: Function GetAllDLCIds() -> Returns the DLCIds

0.1.6
-Updated API for Greymoor
-Added Greymoor sets including the mythic set items
-Added craftable sets wayshrine ids of Greymoor
-Added mythic setType (LIBSETS_TYPE
-Using set's itemIds compressing method by Dolgubon (thanks!) to reduce the filesize of the preloaded data a lot.
-The functions of the LibSets API, using the itemIds, will decompress the itemIds automatically and cache them until a reloadui happens.
Everything should work the same like before.
But only if you were using the API functions to the the itemIds! If you were accessing the itemIds or any other preloaded data directly by accessing LibSets.setInfo or LibSets.setDataPreloaded this will most likely fail now and throw error messages!
So change your addons tro properly use the API functions like LibSets.getAllSetIds(), LibSets.GetAllSetItemIds() and the other LibSets.GetAll* functions!

-Fixed setIds 237 and 238: Exchanged the needed trait count to craft them (thanks to ziggr!)
-Added functions:
--Returns true if the setId provided is a mythic set
--> Parameters: setId number: The set's setId
--> Returns: boolean isMythicSet
function lib.IsMythicSet(setId)


0.1.5
-Fixed Cyordiil setIds 480, 481,482: Settype corrected, traitsNeeeded=3 added. Thanks to snow for the info!

0.1.4
-Added constants: DLC_ITERATION_START (0) and DLC_ITERATION_END (pointing to the currently maximum DLC ID)
-Added API function LibSets.IsCurrentDLC(setId): Returns Boolean if the setId was added with the most current DLCId, or nil if the set got no DLCId assigned
-Function LibSets.GetSetInfo(setId) will return a new table entry "isCurrentDLC" (Boolean) in it's returned table, containing the value true/or false if the set was added with the most current DLCid

0.1.3
-Updated API
-Fixed description texts in files
-Fixed wrong set data
-Added new Harrowstorm set data
-Added preloaded itemIds, zone and wayshrine data multilanguage de, en, fr

0.1.2
-Updated API
-Simplified code of function IsVeteranSet and fixed return value to only be booean (not nilable), thanks to Scootworks!

0.1.1
Updated for PTS APIversion 100029 Dragonhold:
-Added new zones, wayhsrines, collectibleName, sets and constants for the library
-Renamed file with base constants to LibSets_ConstantsLibraryInternal.lua
-Changed loading of old data (no LibSets_data_$(APIVersion).lua needed anymore as one can update the current PTS version in file LibSets_Constants_All.lua in variable "APIVersions["PTS"]" and all data which is only meant to be loaded for this PTS version can be stored between a check function call:
if checkIfPTSAPIVersionIsLive() then ... end
-Moved packages and total a number of loop scans for the setItemIds to file LibSets_ConstantsLibraryInternal.lua, variables:
lib.debugNumItemIdPackages = 55 -- Increase this to find new added set itemIds after and update (last updated APIVersion 100029 Dragonhold)
lib.debugNumItemIdPackageSize = 5000 -- do not increase this or the client may crash!
-Fixed "miliseconds" typo in fileLibSets_Debug.lua, function scanAllSetData(). All setItemIds should be scanned properly now.
-Added "howto" information for an update of this library to file LibSets.lua (At the top)
-Added internal function checkIfSetExists(setId) which will check if a setId given in the preloaded setData tables really exists and will automatically skip the data fopr this set if it does not exist on the current game client (e.g. PTS setData on the live server)

0.1.0
-Removed API100027 files
-Changed data and constants files to use the ALL entry first and then try to find another API dependent filename
-Fixed LibZone debug functions

0.0.9
-Added a mapping table "wayshrineNodeIndex" to "zoneId" to be able to show the wayshrine of a set on the worldmap
-Added new API functions for the wayshrines
Code:
--Open the worldmap and show the map of the zoneId
--> Parameters: zoneId number: The zone's zoneId
function lib.openMapOfZoneId(zoneId)

--Open the worldmap, get the zoneId of the wayshrine wayshrineNodeId and show the wayshrine wayshrineNodeId on the map
--> Parameters: wayshrineNodeId number: The wayshrine's nodeIndex
function lib.showWayshrineNodeIdOnMap(wayshrineNodeId)

--Returns the wayshrineNodeIds's related zoneId, where this wayshrine is located
--> Parameters: wayshrineNodeId number
--> Returns:    zoneId number
function lib.GetWayshrinesZoneId(wayshrineNodeId)
-Changed parameters of the following API function. New 2nd parameter: withRelatedZoneIds boolean
Code:
--Returns the wayshrines as table for the setId. The table contains up to 3 wayshrines for wayshrine nodes in the different factions,
--e.g. wayshrines={382,382,382}. All entries can be the same, or even a negative value which means: No weayshrine is known
--Else the order of the entries is 1=Admeri Dominion, 2=Daggerfall Covenant, 3=Ebonheart Pact
--> Parameters: setId number: The set's setId
-->             withRelatedZoneIds boolean: Also provide a mappingTable as 2nd return value which contains the wayshrine's zoneId
-->             in this format: wayshrineNodsId2ZoneId = { [wayshrineNodeId1]= zoneId1, [wayshrineNodeId2]= zoneId2,... }
--> Returns:    wayshrineNodeIds table
function lib.GetWayshrineIds(setId, withRelatedZoneIds)
0.0.8
-Fixed wrong constants for 2 crafted sets (needed traits to craft), thanks Snow for the info.
-Changed Excel document to use the LibSets DLC_ID instead of plain numbers, for the generated setsData lua tables
-Moved redundant constants to a new file LibSets_Constants.lua, which will always be loaded.
All other API dependent constants remain in the LibSets_Constants_<APIVersion>.lua files

0.0.7
Fixed wrong constants in Scalebreaker set data.

0.0.6
-With version 0.0.6 the library got reworked totally.
Included you'll find an excel file LibSets_SetData.xlsx which contains the actual set data for the library.
The lua code neede dis created from this excel file.
-The SavedVariables ar enot needed anymore for this library (only if you the included debug functions).
All setsData is included, preloaded in the file LibSets_SetData_(APIVersion).lua (where APIVersion is the current game client's APIVersion e.g. 100027 for live's patch "Elsweyr" or 100028 for PTS's patch "Scalebraker").
-The library provides several API functions to get the set data, names, types, itemIds, etc.
-All itemIds of all setIds are included now, and not only 1 itemId (like in the past)
-SetNames for the supported languages come included
-Supported languages so far are: DE, EN, FR
If you want your language to be addded you can contact me via the private message system here on www.esoui.com.
You need to havbe the game client running on this new language and you need to run some debug functions and provide me some data from your SavedVariables afterwards.
-COmpatible with sets of API 100027 Elsweyr and 100028 Scalebreaker

---------------------------------------------------------------------------------
0.0.5
-Updated API to Elsweyr
-Added ##IsLibrary: true tag in manifest txt
-Fixed GetSetInfo function code
-Updated set itemIds with a preloaded table to speed up the scanning at new languages/APIVersions
-> Thanks to silvereyes for both changes!


0.0.4
Fixed "is scanning" and "is loaded" variables to prevent double scans at teh same time.
Added parameter "addonName" to function LibSets.LoadSets(override, addonName).
If you call the function you should specify the parameter "addonName" and pass your addon's name (String) in there so the chat output is able to show which addon called the LibSets.LoadSets function

0.0.3
Fixed lua error messages after sets were loaded.

0.0.2
Fixed:
-Loading of sets will show the updated counter for existing sets, where the localized name got updated, properly now.
-Loaded sets will be automatically scanned and added + saved to the SavedvAriables for each APIVersion + client language now
-After the sets were loaded (watch the chat for update messages during the set scan process) a dialog will ask you to do a reloadui now. If you click "no" the dialog will re-appear every 10 minutes until you click "Yes" or do a manual reloadui

Added:
API functions to check if sets are currently scanning or if the sets data was scanned and is provided (for other addons:
Check if the library is given and the sets were loaded like this
Code:
if LibSets and LibSets.AreSetsLoaded and LibSets.AreSetsLoaded() then --Sets are provided end
Code:
--Returns a boolean value, true if the sets of the game were already loaded/ false if not
--> Returns:    boolean areSetsLoaded
function LibSets.AreSetsLoaded()

--Returns a boolean value, true if the sets of the game are currently scanned and added/updated/ false if not
--> Returns:    boolean isCurrentlySetsScanning
function LibSets.IsSetsScanning()
Optional Files (0)


Archived Files (22)
File Name
Version
Size
Uploader
Date
0.2.3
916kB
Baertram
11/02/20 07:00 AM
0.2.2
820kB
Baertram
09/19/20 08:43 AM
0.2.1
820kB
Baertram
08/07/20 08:32 AM
0.2.0
679kB
Baertram
05/16/20 06:25 PM
0.1.9
679kB
Baertram
05/16/20 04:59 AM
0.1.8
679kB
Baertram
05/10/20 02:58 PM
0.1.7
678kB
Baertram
05/10/20 01:42 PM
0.1.6
678kB
Baertram
05/07/20 04:42 PM
0.1.5
837kB
Baertram
03/31/20 03:18 AM
0.1.4
842kB
Baertram
03/27/20 01:40 PM
0.1.3
842kB
Baertram
02/24/20 05:20 AM
0.1.2
841kB
Baertram
11/28/19 02:41 PM
0.1.1
835kB
Baertram
10/12/19 10:49 AM
0.1.0
780kB
Baertram
08/23/19 10:24 AM
0.0.9
936kB
Baertram
07/28/19 09:03 AM
0.0.8
924kB
Baertram
07/27/19 08:30 AM
0.0.6
911kB
Baertram
07/14/19 11:02 AM
0.0.5
14kB
Baertram
05/19/19 06:24 PM
0.0.4
8kB
Baertram
02/03/19 08:21 AM
0.0.3
7kB
Baertram
02/01/19 10:40 AM
0.0.2
7kB
Baertram
01/30/19 04:11 PM
0.0.1
5kB
01/21/19 10:18 AM


Post A Reply Comment Options
Unread 04/16/19, 10:41 AM  
Dueydoodah

Forum posts: 6
File comments: 29
Uploads: 0
Initial scan

When I started my session today (after updates to today's released addons), LibSets scanned the sets as it should. But, it was processor intense and caused the game to hesitate for each set scanned. It made the game unplayable until the scan was complate, at which point it asked to reloadui, which I did. Once it was reloaded, the game seems to be working fine again. Just thought you should know just in case this is unexpected behavior.
Report comment to moderator  
Reply With Quote
Unread 04/16/19, 11:54 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3206
File comments: 3885
Uploads: 63
Re: Initial scan

Originally Posted by Dueydoodah
When I started my session today (after updates to today's released addons), LibSets scanned the sets as it should. But, it was processor intense and caused the game to hesitate for each set scanned. It made the game unplayable until the scan was complate, at which point it asked to reloadui, which I did. Once it was reloaded, the game seems to be working fine again. Just thought you should know just in case this is unexpected behavior.
t depnds on the power of your CPU. My game is still playable but you'll notice a slightly lag each time the 5000 itemids get scanner, 30 times.
The cha is telling your already that THIS MIGHT HAPPEN! So it's a needed and normal behaviour, thanks for the feedback. There currently is no possibility to get the setData without scanning all itemIds, so this will take 1 to 2 minutes and lag the game during this period. Watch the chat for the initial info as it writes exactly this information into the system chat output. You might need an addon like pChat to show the system chat "BEFORE" addons finally loaded. Or you might not see any chat output before all addons were laoded, where libSets is already "scanning" then.
Report comment to moderator  
Reply With Quote
Unread 05/04/19, 04:12 PM  
NachtkindFX

Forum posts: 1
File comments: 9
Uploads: 0
I always wanted an addon that simply shows me, in the item tool tip, where a set item comes from.

E.g. craftable, dungeon, trial and which one.

Will this be possible in the future?
Report comment to moderator  
Reply With Quote
Unread 05/04/19, 04:25 PM  
Kyoma
AddOn Author - Click to view AddOns

Forum posts: 125
File comments: 317
Uploads: 10
Originally Posted by NachtkindFX
I always wanted an addon that simply shows me, in the item tool tip, where a set item comes from.

E.g. craftable, dungeon, trial and which one.

Will this be possible in the future?
Sadly there isn't really a way to determine where a specific set comes from outside of hardcoding it (to a certain degree) in the library but I do believe there is an update coming that will allow what you are looking for without much hassle.
Report comment to moderator  
Reply With Quote
Unread 05/04/19, 04:31 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3206
File comments: 3885
Uploads: 63
Originally Posted by Kyoma
Originally Posted by NachtkindFX
I always wanted an addon that simply shows me, in the item tool tip, where a set item comes from.

E.g. craftable, dungeon, trial and which one.

Will this be possible in the future?
Sadly there isn't really a way to determine where a specific set comes from outside of hardcoding it (to a certain degree) in the library but I do believe there is an update coming that will allow what you are looking for without much hassle.
This was planned but it takes so much time and stuff to hardcode thus I have not done it and not planning to do this soon, sorry.
Please use the Addon Itemization Browser for this so long.
Report comment to moderator  
Reply With Quote
Unread 05/05/19, 02:50 AM  
NachtkindFX

Forum posts: 1
File comments: 9
Uploads: 0
I had a feeling it might me that way.

Thanks for the answers.
Report comment to moderator  
Reply With Quote
Unread 05/05/19, 08:14 AM  
raspberry

Forum posts: 0
File comments: 14
Uploads: 0
LUA Errors

Hi Baertram,

writworthy meldete eine Abhängigkeit von libset.
Daher habe ich die libset heute installiert.
Beim MouseOver über die Meisterschriebe hagelte es LUA Meldungen

BG
[edit:] Hing wohl damit zusammen, dass libset initial einen Scan mache muss, der nicht nicht fertig war?
Später kam eine Meldung, ich sollte reloadui machen. Danach trat der LUA Fehler nicht mehr auf.


user:/AddOns/LibSets/LibSets.lua:319: attempt to index a nil value
stack traceback:
user:/AddOns/LibSets/LibSets.lua:319: in function 'lib.GetSetName'
|caaaaaa<Locals> setId = 75, lang = "de" </Locals>|r
(tail call): ?
user:/AddOns/WritWorthy/WritWorthy_I18N.lua:93: in function 'WritWorthy.Str'
|caaaaaa<Locals> key = 75, how = tbl, _ = 1, lang = "de" </Locals>|r
(tail call): ?
user:/AddOns/WritWorthy/WritWorthy_Smithing.lua:1002: in function 'Parser:GetSetBonus'
|caaaaaa<Locals> self = tbl, set_id = 75, r = tbl </Locals>|r
user:/AddOns/WritWorthy/WritWorthy_Smithing.lua:1051: in function 'Parser:ParseItemLink'
|caaaaaa<Locals> self = tbl, item_link = "|H0:item:121531:6:1:0:0:0:6...", fields = tbl, item_num = 65, material_num = 192, quality_num = 5, set_num = 75, trait_num = 17, motif_num = 34 </Locals>|r
user:/AddOns/WritWorthy/WritWorthy.lua:71: in function 'WritWorthy.ToMatKnowList'
|caaaaaa<Locals> item_link = "|H0:item:121531:6:1:0:0:0:6...", parser = tbl </Locals>|r
user:/AddOns/WritWorthy/WritWorthy.lua:224: in function 'WritWorthy.TooltipInsertOurText'
|caaaaaa<Locals> control = ud, item_link = "|H0:item:121531:6:1:0:0:0:6...", unique_id = 4726757705640928529 </Locals>|r
user:/AddOns/WritWorthy/WritWorthy.lua:357: in function 'TooltipSetBagItem'
|caaaaaa<Locals> control = ud, bagId = 1, slotIndex = 141 </Locals>|r
user:/AddOns/ArkadiusTradeToolsSales/ArkadiusTradeToolsSalesTooltipExtensions.lua:223: in function 'self.tooltip.SetBagItem'
|caaaaaa<Locals> tooltip = ud, bag = 1, index = 141, itemLink = "|H0:item:121531:6:1:0:0:0:6..." </Locals>|r
EsoUI/Ingame/Inventory/InventorySlot.lua:2005: in function '(anonymous)'
|caaaaaa<Locals> inventorySlot = ud, bag = 1, index = 141 </Locals>|r
EsoUI/Ingame/Utility/ZO_SlotUtil.lua:14: in function 'RunHandlers'
|caaaaaa<Locals> handlerTable = tbl, slot = ud, handlers = tbl, i = 1 </Locals>|r
EsoUI/Ingame/Inventory/InventorySlot.lua:2366: in function 'ZO_InventorySlot_OnMouseEnter'
|caaaaaa<Locals> inventorySlot = ud, buttonPart = ud, listPart = ud </Locals>|r
(tail call): ?
ZO_StackSplitSource_MouseEnter:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud </Locals>|r
Last edited by raspberry : 05/05/19 at 08:22 AM.
Report comment to moderator  
Reply With Quote
Unread 05/05/19, 12:46 PM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3206
File comments: 3885
Uploads: 63
Re: LUA Errors

Hey,

yes this was the reason.

[edit:] Hing wohl damit zusammen, dass libset initial einen Scan mache muss, der nicht nicht fertig war?
Später kam eine Meldung, ich sollte reloadui machen. Danach trat der LUA Fehler nicht mehr auf.

Seems as if LibSets initially does a scan over all sets and writes a chat output, then forces a reloadui.
If you do use LibSets BEFORE this scan was done properly and the data is given in the LibSets SavedVariables you'll get error messages. But WritWorthy is using the library worng then and should be changed to check for the following before using LibSets:

Lua Code:
  1. If not LibSets.AreSetsLoaded() then
  2.      --LibSets is not ready! abort here
  3.      return
  4.    end

I've reported this to the WritWorthy author.

Originally Posted by raspberry
Hi Baertram,

writworthy meldete eine Abhängigkeit von libset.
Daher habe ich die libset heute installiert.
Beim MouseOver über die Meisterschriebe hagelte es LUA Meldungen

BG
[edit:] Hing wohl damit zusammen, dass libset initial einen Scan mache muss, der nicht nicht fertig war?
Später kam eine Meldung, ich sollte reloadui machen. Danach trat der LUA Fehler nicht mehr auf.


user:/AddOns/LibSets/LibSets.lua:319: attempt to index a nil value
stack traceback:
user:/AddOns/LibSets/LibSets.lua:319: in function 'lib.GetSetName'
|caaaaaa<Locals> setId = 75, lang = "de" </Locals>|r
(tail call): ?
user:/AddOns/WritWorthy/WritWorthy_I18N.lua:93: in function 'WritWorthy.Str'
|caaaaaa<Locals> key = 75, how = tbl, _ = 1, lang = "de" </Locals>|r
(tail call): ?
user:/AddOns/WritWorthy/WritWorthy_Smithing.lua:1002: in function 'Parser:GetSetBonus'
|caaaaaa<Locals> self = tbl, set_id = 75, r = tbl </Locals>|r
user:/AddOns/WritWorthy/WritWorthy_Smithing.lua:1051: in function 'Parser:ParseItemLink'
|caaaaaa<Locals> self = tbl, item_link = "|H0:item:121531:6:1:0:0:0:6...", fields = tbl, item_num = 65, material_num = 192, quality_num = 5, set_num = 75, trait_num = 17, motif_num = 34 </Locals>|r
user:/AddOns/WritWorthy/WritWorthy.lua:71: in function 'WritWorthy.ToMatKnowList'
|caaaaaa<Locals> item_link = "|H0:item:121531:6:1:0:0:0:6...", parser = tbl </Locals>|r
user:/AddOns/WritWorthy/WritWorthy.lua:224: in function 'WritWorthy.TooltipInsertOurText'
|caaaaaa<Locals> control = ud, item_link = "|H0:item:121531:6:1:0:0:0:6...", unique_id = 4726757705640928529 </Locals>|r
user:/AddOns/WritWorthy/WritWorthy.lua:357: in function 'TooltipSetBagItem'
|caaaaaa<Locals> control = ud, bagId = 1, slotIndex = 141 </Locals>|r
user:/AddOns/ArkadiusTradeToolsSales/ArkadiusTradeToolsSalesTooltipExtensions.lua:223: in function 'self.tooltip.SetBagItem'
|caaaaaa<Locals> tooltip = ud, bag = 1, index = 141, itemLink = "|H0:item:121531:6:1:0:0:0:6..." </Locals>|r
EsoUI/Ingame/Inventory/InventorySlot.lua:2005: in function '(anonymous)'
|caaaaaa<Locals> inventorySlot = ud, bag = 1, index = 141 </Locals>|r
EsoUI/Ingame/Utility/ZO_SlotUtil.lua:14: in function 'RunHandlers'
|caaaaaa<Locals> handlerTable = tbl, slot = ud, handlers = tbl, i = 1 </Locals>|r
EsoUI/Ingame/Inventory/InventorySlot.lua:2366: in function 'ZO_InventorySlot_OnMouseEnter'
|caaaaaa<Locals> inventorySlot = ud, buttonPart = ud, listPart = ud </Locals>|r
(tail call): ?
ZO_StackSplitSource_MouseEnter:3: in function '(main chunk)'
|caaaaaa<Locals> self = ud </Locals>|r
Report comment to moderator  
Reply With Quote
Unread 05/11/19, 09:45 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3206
File comments: 3885
Uploads: 63
https://github.com/Baertram/LibSets

Updated LibSets on GitHub to automatically check on each LibSets API function, where necessary, if the sets data was already scanned and loaded properly for the current api and language version.
So if you call a LibSets function like LibSets.GetSetInfo(setId) and the data is not loaded ywt it won't throw any lua error anymore but return NIL instead.
-> So if any LiBSets function will return NIL the data is not loaded or given.


You can manually check this via API function checkIfSetsAreLoadedProperly now:
Lua Code:
  1. --Returns a boolean value, true if the sets database is properly loaded yet and is not currently scanning
  2. --or false if not
  3. function lib.checkIfSetsAreLoadedProperly()

It checks the 2 functions IsSetsScanning() and AreSetsLoaded() + if the SavedVAriables needed are given too (which will be after the reloadui as new sets were scanned and added).
Report comment to moderator  
Reply With Quote
Unread 05/14/19, 12:28 PM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 148
Uploads: 24
Why are the saved variables not stored machine-wide? It's storing a separate batch of data per server (NA/EU) and per account. Should only have to scan once and store once and have it work for all accounts/servers.
Report comment to moderator  
Reply With Quote
Unread 05/15/19, 03:37 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3206
File comments: 3885
Uploads: 63
Originally Posted by code65536
Why are the saved variables not stored machine-wide? It's storing a separate batch of data per server (NA/EU) and per account. Should only have to scan once and store once and have it work for all accounts/servers.
Any problems occuring due to this? The filesize is not that big and I think the scanning doesn't take ages (1-2 Minutes) and is just done once per API change (which will happen every x months only).
-> A newer version will even speed up the scan a lot or rather preload the data without a scan.

The SVs are stored for each server and for each account as I need to differ them for tests on live and PTS and do not want to copy and duplicate my whole SavedVariables folders.

And there is no such option to store it "machine-wide" for all accounts provided by ZOs, so I'm using what is given
Last edited by Baertram : 05/15/19 at 03:37 AM.
Report comment to moderator  
Reply With Quote
Unread 05/15/19, 05:26 AM  
Kyoma
AddOn Author - Click to view AddOns

Forum posts: 125
File comments: 317
Uploads: 10
Originally Posted by Baertram
Originally Posted by code65536
Why are the saved variables not stored machine-wide? It's storing a separate batch of data per server (NA/EU) and per account. Should only have to scan once and store once and have it work for all accounts/servers.
Any problems occuring due to this? The filesize is not that big and I think the scanning doesn't take ages (1-2 Minutes) and is just done once per API change (which will happen every x months only).
-> A newer version will even speed up the scan a lot or rather preload the data without a scan.

The SVs are stored for each server and for each account as I need to differ them for tests on live and PTS and do not want to copy and duplicate my whole SavedVariables folders.

And there is no such option to store it "machine-wide" for all accounts provided by ZOs, so I'm using what is given
Actually that's not true, you can just access it directly. In LoreBooks the miner uses something like that
Code:
## SavedVariables: LBooks_SavedVariables COLLAB DATAMINED_DATA
Then in the code it just accesses COLLAB and DATAMINED_DATA directly as tables.

Code:
LBooks_SavedVariables =
{
    ["Default"] = 
    {
        ["@Kyoma"] = 
        {
            ...
        }
    }
}
COLLAB =
{
...
}
DATAMINED_DATA =
{
...
}
Last edited by Kyoma : 05/15/19 at 05:28 AM.
Report comment to moderator  
Reply With Quote
Unread 05/20/19, 07:58 AM  
code65536
AddOn Author - Click to view AddOns

Forum posts: 17
File comments: 148
Uploads: 24
Oops, didn't notice you had replied.

Yes, as Kyoma said, you can access saved variables directly.

Alternatively, if you want to use the ZOS functions, you can use the final field of ZO_SavedVars:NewAccountWide which lets you specify an account name.

For example, in my addon, I do the following, where I manually set the account name to a string of my choosing--in this case, "$InstallationWide".
Code:
CombatAlerts.vars = ZO_SavedVars:NewAccountWide("CombatAlertsSavedVariables", 1, nil, CombatAlerts.defaults, nil, "$InstallationWide")
Report comment to moderator  
Reply With Quote
Unread 05/20/19, 08:47 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3206
File comments: 3885
Uploads: 63
The global variable was known to me but the account parameter chosen not, thanks for the hint.

Originally Posted by code65536
Oops, didn't notice you had replied.

Yes, as Kyoma said, you can access saved variables directly.

Alternatively, if you want to use the ZOS functions, you can use the final field of ZO_SavedVars:NewAccountWide which lets you specify an account name.

For example, in my addon, I do the following, where I manually set the account name to a string of my choosing--in this case, "$InstallationWide".
Code:
CombatAlerts.vars = ZO_SavedVars:NewAccountWide("CombatAlertsSavedVariables", 1, nil, CombatAlerts.defaults, nil, "$InstallationWide")
Report comment to moderator  
Reply With Quote
Unread 05/30/19, 12:20 AM  
kadeer
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 60
Uploads: 5
Originally Posted by code65536
Why are the saved variables not stored machine-wide? It's storing a separate batch of data per server (NA/EU) and per account. Should only have to scan once and store once and have it work for all accounts/servers.
agreed, seems a bit redundant to have more than 1 of the same data, particularly if you have multiple accounts and play on both na and eu

nice library btw
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: