Thread: DLC IDs
View Single Post
06/13/21, 08:48 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
It does not output anything as numCollectibles at GetCollectibleCategoryInfo(COLLECTIBLE_CATEGORY_TYPE_DLC) returns 0
subCategories is 3 and unlockedCollectibles is 31 if you got eso+
Maybe this is intended, or a bug.
--- @return name string, numSubCatgories integer, numCollectibles integer, unlockedCollectibles integer, totalCollectibles integer, hidesLocked bool

Edit
It's intended!
You need to use the subcategories as well!
subCategory 3 is the DLC, subCategory 2 is the dungeon name as it seems.

--collectibleId|collectibleSubCategoryIndex|collectibleName
[154] = "154|3|Imperial City",
[215] = "215|3|Orsinium",
[254] = "254|3|Thieves Guild",
[306] = "306|3|Dark Brotherhood",
[593] = "593|3|Morrowind",
[1240] = "1240|3|Clockwork City",
[5107] = "5107|3|Summerset",
[5755] = "5755|3|Murkmire",
[5843] = "5843|3|Elsweyr",
[6920] = "6920|3|Dragonhold",
[7466] = "7466|3|Greymoor",
[8388] = "8388|3|Markarth",
Lua Code:
  1. --- @return name string, numSubCatgories integer, numCollectibles integer, unlockedCollectibles integer, totalCollectibles integer, hidesLocked bool
  2.     local name, numSubCategories, numCollectibles, unlockedCollectibles, totalCollectibles, hidesLocked = GetCollectibleCategoryInfo(COLLECTIBLE_CATEGORY_TYPE_DLC)
  3. d(string.format("[COLLECTIBLE_CATEGORY_TYPE_DLC]numSubCategories: %s, numCollectibles: %s, unlockedCollectibles: %s, totalCollectibles: %s", tostring(numSubCategories), tostring(numCollectibles), tostring(unlockedCollectibles), tostring(totalCollectibles)))
  4.     for collectibleSubCategoryIndex=1, numSubCategories do
  5.         --- @return name string, numCollectibles integer, unlockedCollectibles integer, totalCollectibles integer
  6.         local name, numCollectibles, unlockedCollectibles, totalCollectibles = GetCollectibleSubCategoryInfo(COLLECTIBLE_CATEGORY_TYPE_DLC, collectibleSubCategoryIndex)
  7.         for i=1, numCollectibles do
  8.             local collectibleId = GetCollectibleId(COLLECTIBLE_CATEGORY_TYPE_DLC, collectibleSubCategoryIndex, i)
  9.             --- @return name string, description string, icon textureName, deprecatedLockedIcon textureName, unlocked bool, purchasable bool, isActive bool, categoryType [CollectibleCategoryType|#CollectibleCategoryType], hint string
  10.             local collectibleName, _, _, _, unlocked = GetCollectibleInfo(collectibleId) -- Will return true or false. If the user unlocked throught ESO+ without buying DLC it will return true.
  11.                         d("DLC ".. zo_strformat("<<C:1>>", collectibleName) .. "(".. collectibleId .. ") unlocked : " .. tostring(unlocked))
  12.         end
  13.     end
  14. end

Returns e.g.
DLC Elsweyr^N( 5843) unlocked : true

You need to use zo_strformat("<<C:1>>", collectibleName) to remove the gender suffix stuff like ^N etc.


But somehow some DLC/Chapter are missing then, like Wolfhunter.
And COLLECTIBLE_CATEGORY_TYPE_CHAPTER is not returning anything if I try to use it...

Last edited by Baertram : 06/13/21 at 09:44 AM.
  Reply With Quote