Thread Tools Display Modes
07/12/21, 06:34 PM   #1
ShadowMau
AddOn Author - Click to view addons
Join Date: Oct 2018
Posts: 23
[notabug] UseCollectible and GameplayActorCategory

I am attempting to do something along the lines of:

UseCollectible(5076, GAMEPLAY_ACTOR_CATEGORY_COMPANION)

In game it responds with "You can't equip a collectible on your companion outside of the companion menu."

Collectible 5076 is the Noweyr Steed which I do own. I can successfully UseCollectible(5076) and it will change the character's active mount properly. Mounts are a collectible that the companion can use. I can enter the companion menu and change it manually. I would like to be able to automatically match my companion mount to my character mount (basically an upgrade to my addons FavoriteMount and LinkPetToMount).

The available documentation in the file "ESOUIDocumentationP30_2.txt" says: UseCollectible(*integer* _collectibleId_, *[GameplayActorCategory|#GameplayActorCategory]* _actorCategory_)

Am I reading this wrong or using it incorrectly in some way? Or is this a bug?
 
07/13/21, 01:48 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
I think this is no bug but intended.
It should work if you "interact" with the companion and the companion menu is opened first.
Most of the API functions with _actorCategory_ GAMEPLAY_ACTOR_CATEGORY_COMPANION work afterwards afai realized.
Only some others like the "check if item is owned by companion" work inside the normal inventory as they only need to read some data of the item itsself.

Just "unhiding" the companion will neither work (or adding the fragments to other shwn scenes).
Had the same with some other functions, the interaction is needed so that these functions will get a flag "companion menu was properly summoned".

Not sure why collectibles also need the menu to show, maybe some internal initialization needs to be done to the companions first, by creating the menu.
 
07/13/21, 01:21 PM   #3
ShadowMau
AddOn Author - Click to view addons
Join Date: Oct 2018
Posts: 23
You were right. It does work as expected when the companion settings menu is opened. You can not just have the dialog page opened, it must be the settings menu. That would be very annoying to have to open the menu, do the switch, then close the menu every time.

I will continue to look at the file collectibledatamanager.lua. I have found how they set the entry to "active." It looks like the way they trigger it, it may use the tree entry data to store active or not active. I have a few other ideas, but most revolve around figuring out how they store the data and use it themselves. It may not show up in the files they provide.

Let the exploration begin!!!

UPDATE: I found that I can use /script d(GetActiveCollectibleByType(COLLECTIBLE_CATEGORY_TYPE_MOUNT, GAMEPLAY_ACTOR_CATEGORY_COMPANION)) and it will show the collectible id of the mount the companion has active. So . . . we can use GAMEPLAY_ACTOR_CATEGORY_COMPANION in functions that get data without having the companion settings menu open. We just can't use it to set anything.

Last edited by ShadowMau : 07/13/21 at 03:41 PM.
 
07/16/21, 02:28 PM   #4
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
Companion gear/collectibles/skills/outfits cannot be changed outside of the appropriate interaction (companion menu/outfit station). Most information can be checked at any time, but cannot be modified anytime. This is by design.
 

ESOUI » Developer Discussions » Bug Reports » [notabug] UseCollectible and GameplayActorCategory

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