Thread Tools Display Modes
06/13/21, 08:13 AM   #1
Niwasaka
AddOn Author - Click to view addons
Join Date: Apr 2021
Posts: 3
DLC IDs

Is there, or is it possible, to somehow output all the CollectibleIDs of the chapters or DLCs?

Thanks for your help
  Reply With Quote
06/13/21, 08:16 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
LibSets got examples DLC collectibleIds. But there exist like 10 or even more per DLC al named the same like the DLC.
I've just extarcted all collectible names and searched for the DLC names then.
I'm not sure if there are any "official" DLC collectibleIds.

Code:
  --Base game
    [DLC_BASE_GAME] = -1,
    --Imperial city
    [DLC_IMPERIAL_CITY] = 154,
    --Orsinium
    [DLC_ORSINIUM] = 215,
    --Thieves Guild
    [DLC_THIEVES_GUILD] = 254,
    --Dark Brotherhood
    [DLC_DARK_BROTHERHOOD] = 306,
    --Shadows of the Hist
    [DLC_SHADOWS_OF_THE_HIST] = 1520,
    --Morrowind
    [DLC_MORROWIND] = 593,
    --Horns of the Reach
    [DLC_HORNS_OF_THE_REACH] = 1940,
    --Clockwork City
    [DLC_CLOCKWORK_CITY] = 1240,
    --Dragon Bones
    [DLC_DRAGON_BONES] = 2104,
    --Summerset
    [DLC_SUMMERSET] = 5107,
    --Wolfhunter
    [DLC_WOLFHUNTER] = 2157,
    --Murkmire
    [DLC_MURKMIRE] = 5755,
    --Wrathstone
    [DLC_WRATHSTONE] = 2265,
    --Elsweyr
    [DLC_ELSWEYR] = 5843,
    --Scalebreaker
    [DLC_SCALEBREAKER] = 2413,
    --Dragonhold
    [DLC_DRAGONHOLD] = 6920,
    --Harrowstorm
    [DLC_HARROWSTORM] = 2537,
    --Greymoor
    [DLC_GREYMOOR] = 7466,
    --Stonethorn
    [DLC_STONETHORN] = 2692,
    --Markarth
    [DLC_MARKARTH] = 8388,
    --Flames of Ambition
    [DLC_FLAMES_OF_AMBITION] = 2829
}
if checkIfPTSAPIVersionIsLive() then
    lib.dlcAndChapterAchievementIds[DLC_BLACKWOOD] = 8659
end

Last edited by Baertram : 06/13/21 at 09:38 AM.
  Reply With Quote
06/13/21, 08:35 AM   #3
Niwasaka
AddOn Author - Click to view addons
Join Date: Apr 2021
Posts: 3
Thanks for your quick answer ^^ I had already seen that, but then it also depends on the respective achivement. I had seen something else here https://www.esoui.com/forums/showthread.php?t=6194 but I'm not sure how I can use it.

I had already created a function and included it, but there is no output in the chat ^^

The code used was:
Lua Code:
  1. local name, _, numCollectibles, unlockedCollectibles, _, _, collectibleCategoryType = GetCollectibleCategoryInfo(COLLECTIBLE_CATEGORY_TYPE_DLC)
  2.      
  3.     for i=1, numCollectibles do
  4.         local collectibleId = GetCollectibleId(COLLECTIBLE_CATEGORY_TYPE_DLC, nil, i)
  5.         local collectibleName, _, _, _, unlocked = GetCollectibleInfo(collectibleId) -- Will return true or false. If the user unlocked throught ESO+ without buying DLC it will return true.
  6.         d("DLC ".. collectibleName .. "( ".. collectibleId .. ") unlocked : " .. tostring(unlocked))
  7.     end
  Reply With Quote
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,912
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
06/13/21, 12:31 PM   #5
Niwasaka
AddOn Author - Click to view addons
Join Date: Apr 2021
Posts: 3
Thanks, but that helped me anyway and I was able to solve the problem with it
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » DLC IDs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off