ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Bug Reports (https://www.esoui.com/forums/forumdisplay.php?f=187)
-   -   [notabug] UseCollectible and GameplayActorCategory (https://www.esoui.com/forums/showthread.php?t=9833)

ShadowMau 07/12/21 06:34 PM

[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?

Baertram 07/13/21 01:48 AM

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.

ShadowMau 07/13/21 01:21 PM

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.

ZOS_DanBatson 07/16/21 02:28 PM

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.


All times are GMT -6. The time now is 03:41 AM.

vBulletin © 2021, Jelsoft Enterprises Ltd
© 2014 - 2020 MMOUI