ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   DLC IDs (https://www.esoui.com/forums/showthread.php?t=9792)

Niwasaka 06/13/21 08:13 AM

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

Thanks for your help :)

Baertram 06/13/21 08:16 AM

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


Niwasaka 06/13/21 08:35 AM

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

Baertram 06/13/21 08:48 AM

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.

Quote:

--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...

Niwasaka 06/13/21 12:31 PM

Thanks, but that helped me anyway and I was able to solve the problem with it :)


All times are GMT -6. The time now is 02:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI