Thread Tools Display Modes
Prev Previous Post   Next Post Next
01/15/20, 11:48 AM   #1
ThoraldGM
 
ThoraldGM's Avatar
Join Date: Oct 2018
Posts: 3
Are collectibleIDs absolute or relative? (Turn drunk personality on/off)

Hello all. New to Lua, Papyrus (Fallout 4) background. Completed the notebook tutorial.

I'm creating a practice addon & would like to turn drunk personality on / off with buttons and slash commands. How do I find the collectibleID? Is the collectibleID global, or relative to position in table?

What if Player 1 has:
  • Assassin
  • Drunk
  • Jester
  • Zombie

But Player 2 has:
  • Assassin
  • Commander
  • Drunk
  • Jester
  • Zombie

Would the collectibleID change based on position in the table? (I'm familiar with array elements from elsewhere, but Lua's "everything is a table" is a WIP.)

Here's what I've dug up so far:

Lua Code:
  1. if not IsCollectibleActive(collectibleID) then
  2.      UseCollectible(collectibleID)

Source:
https://www.esoui.com/forums/showpos...41&postcount=7

Code:
COLLECTIBLE_CATEGORY_TYPE_PERSONALITY == 9
SI_COLLECTIBLECATEGORYTYPE9 == 1212
Sources:
https://wiki.esoui.com/Constant_Values
https://wiki.esoui.com/Constant_Values_SI*
https://www.esoui.com/downloads/info...elyEmotes.html

The LovelyEmotes addon queries all player personalities & lists them in a clickable table / window. Click on, click off. But it handles the data in a list format only, not individually targeted.

I just need the drunk personality collectibleID, and want to make sure that number doesn't change if player buys another personality.

Am I close to a solution?
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Are collectibleIDs absolute or relative? (Turn drunk personality on/off)


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