Thread Tools Display Modes
06/12/21, 05:12 PM   #1
Wulfrun
Join Date: Feb 2015
Posts: 9
Has anyone found the collectibleId's for companions

I want to make a slash command to toggel my companions. The following was mostly a guess on my part.

I found:
COLLECTIBLE_CATEGORY_TYPE_ASSISTANT = 8
COLLECTIBLE_CATEGORY_TYPE_COMPANION = 27
from https://esoapi.uesp.net/100035/globals.txt (2021-06-02 15:04:20). Line 83625.

Then I used GetCollectibleCategoryType(n) with n from 1 to 6000 and displayed in chat any n value with a return of 8 OR 27. All 5 of the type 8 (assistants) were returned but no type 27's were found. The assistant value was just a check to be sure it was working.

Has anyone found the correct Id or know what I might try to find the code?

Happy Trails

FYI my code:
for n = 1,6000,1 do
rdN = GetCollectibleCategoryType(n)
if rdN == (8 or 27) then
df("|c008FCCn= %d N= %d", n, rdN)
end
end
  Reply With Quote
06/12/21, 05:28 PM   #2
Calamath
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 36
The number 6,000 is too small, so if you set it to 30,000, you will probably find it.
  Reply With Quote
06/12/21, 05:28 PM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Dunno anymore how I found them but it was somehow via merTorchbug ingame I guess and using the API given for the companion collectibles.

Code:
local companionInfo = {
    [1] = 9245,     -- Bastian Helix, companionDefId 1,
    [2] = 9353,     -- Mirri Elendis, companionDefId 2,
}
  Reply With Quote
06/12/21, 05:31 PM   #4
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 87
"Mirri Elandis" id = 9353
"Bastian Hallix" id = 9245

I use those ID's in combination with the function "UseCollectible( *id* ) to summon and unsommon the companions.


for future references: this is the function I wrote to find collectible Ids:

Lua Code:
  1. function Development.FindCollectibles( str, limit) 
  2.   local output = false
  3.   for id=1,type(limit)=="number" and limit or 10000 do
  4.     local collectible = string.lower( GetCollectibleName(id) )
  5.     if string.find(collectible, string.lower(str)) then
  6.       d( zo_strformat("<<1>> <<2>>", id, collectible) )
  7.       output = true
  8.     end
  9.   end
  10.   if not output then d("no collectible found") end
  11. end

Last edited by ExoY : 06/12/21 at 05:37 PM.
  Reply With Quote
06/12/21, 05:40 PM   #5
Calamath
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 36
Post

I will share with you the special code I use in Calamath's Shortcut Pie Menu add-on.

Lua Code:
  1. for index = 1, GetTotalCollectiblesByCategoryType(COLLECTIBLE_CATEGORY_TYPE_COMPANION) do
  2.     local collectibleId = GetCollectibleIdFromType(COLLECTIBLE_CATEGORY_TYPE_COMPANION, index)
  3.     d(collectibleId)
  4. end

good luck.

- Calamath
  Reply With Quote
06/12/21, 11:38 PM   #6
Wulfrun
Join Date: Feb 2015
Posts: 9
Thanks all, very much appreciated
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Has anyone found the collectibleId's for companions

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