-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExperimental.lua
More file actions
65 lines (59 loc) · 2.83 KB
/
Experimental.lua
File metadata and controls
65 lines (59 loc) · 2.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
-- LibSFUtils is already defined in prior loaded file
sfutil = LibSFUtils
-- -----------------------------------------------------------------------
-- experimental functions - not ready for prime-time
-- -----------------------------------------------------------------------
function sfutil.getDLCs()
d("COLLECTIBLE_CATEGORY_TYPE_DLC = "..COLLECTIBLE_CATEGORY_TYPE_DLC)
for categoryIndex = 1, GetNumCollectibleCategories() do
local categoryName, numSubCategories, numCollectibles, unlockedCollectibles =
GetCollectibleCategoryInfo(categoryIndex)
--d("categoryIndex="..categoryIndex.." category Name="..categoryName)
if(categoryName == "Stories") then
d("Name: "..categoryName.." Index: "..categoryIndex)
d("Num subcategories: "..numSubCategories)
for subcategoryIndex = 1, numSubCategories do
local subCategoryName, subNumCollectibles, subNumUnlockedCollectibles =
GetCollectibleSubCategoryInfo(categoryIndex, subcategoryIndex)
if( subCategoryName ~= nil ) then
d("->SubName: "..subCategoryName.." index: "..subcategoryIndex)
else
d("->Sub category Index: "..subcategoryIndex)
end
d("->Num subcollectibles: "..subNumCollectibles)
--
local formattedSubcategoryName =
zo_strformat(SI_COLLECTIBLE_NAME_FORMATTER, subCategoryName)
d("formattedSubcategoryName->"..formattedSubcategoryName)
for coll=1, subNumCollectibles do
local id = GetCollectibleId(categoryIndex,
subcategoryIndex, coll)
local name, description, iconFile, deprecatedLockedIconFile,
unlocked, purchasable, active, categoryType, hint,
isPlaceholder = GetCollectibleInfo(id)
local unlockState = GetCollectibleUnlockStateById(id)
d("index: "..coll.." id: "..id.." Name: "..name.." unlocked: "..sfutil.bool2str(unlocked).." active: "..sfutil.bool2str(active))
end
--]]
end
end
end
end
function sfutil.getChapters()
local name, _, numCollectibles, unlockedCollectibles, _, _, collectibleCategoryType = GetCollectibleCategoryInfo(COLLECTIBLE_CATEGORY_TYPE_CHAPTER)
d("Number of Chapters: ".. numCollectibles)
for i=1, numCollectibles do
local collectibleId = GetCollectibleId(COLLECTIBLE_CATEGORY_TYPE_CHAPTER, nil, i)
local collectibleName, _, _, _, unlocked = GetCollectibleInfo(collectibleId)
-- Will return true or false. If the user unlocked through ESO+ without buying DLC it will return true.
d(sfutil.str("DLC ", collectibleName, "( ", collectibleId, ") unlocked : ",
tostring(unlocked)))
end
end
function sfutil.gettags(bagId,slotId)
local itemLink = GetItemLink(bagId, slotId)
for i=1, GetItemLinkNumItemTags(itemLink) do
local itemTagDescription, itemTagCategory = GetItemLinkItemTagInfo(itemLink, i)
d(sfutil.str("slot: ",slotId," category: ",itemTagCategory," desc: ",itemTagDescription))
end
end