ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   How can I get a quest internalId value? (https://www.esoui.com/forums/showthread.php?t=9613)

iFedix 03/08/21 05:14 PM

How can I get a quest internalId value?
 
Hey,
so, to update my addon, UndauntedPledgesUtilities, I need to add some info about the new two dungeons included in the new Flames of Ambition DLC. I know that the two new dungeons quests are called Burning Secrets and Into the Deep. What I need is the internalId of the quests to check ingame the result of the GetCompletedQuestInfo(internalId) function (I need to know if the character has completed or not the dungeon quest). What I usually do to find this value is to go here https://esoitem.uesp.net/viewlog.php?record=quest and type the name of the quests and copy the related internalId value.
My question is: how these values are dumped? Is there a way to retrieve these internald values directly in game with an addon/function that I dont know? Thanks for the help! :banana:

Sharlikran 03/09/21 01:20 AM

[6576] = "Burning Secrets",
[6578] = "Into the Deep",

iFedix 03/09/21 02:01 AM

Yeah I found that. My question is, how can I find those values using add-ons or internal functions I can launch directly from game? I'd like to skip checking uesp site and find them on my own if possible.. thanks!

Sharlikran 03/09/21 10:03 AM

There isn't a way to do a for loop and grab it all. You would have to scour the wiki, and look at the api. Which the file ESOUIDocumentationP29_2.txt is good for that.

You have to use "EVENT_QUEST_ADDED" and that gives you the journalIndex and questName. Although I do use GetJournalQuestLocationInfo() and keep track of that information as well.

Then when you turn in the quest you would use "EVENT_QUEST_REMOVED" which gets you the journalIndex, questName, zoneIndex, poiIndex, and questID

The problem I had though was that there are quests that have the same name sometimes. Probably not with the quests you are looking for. So you might be able to make a table with the quest name and that might work.

If you run into an issue where you have duplicate quest names then you need to keep track of the questName, zoneIndex, poiIndex so you can compare that to ensure the questID from the API does in fact belong to the quest you turned in.

iFedix 03/09/21 10:33 AM

So, I got the point that we don't currently have a list of available quest sand that can be retrieved using simple functions but you need to build a table from the ground up that stores them... So, yes, I'll just use esouesp (easier) and find that internalID that I need time to time when I update the addon (when new dungeons are added to the game). Thanks!

Sharlikran 03/09/21 11:23 AM

While I do update it, I have not yet because I have been busy. LibQuestData can return the ID of the quest if you give it the name with get_questids_table(name, lang) but it will return a table because some names are duplicated. About the only way to use that for what you need is to call the function and then check if the table has only one value. If it does then you can just use the ID number for the quest.

if #theTable == 1 then yourVar = theTable[1] end

Again probably better using UESP, but up to you.

iFedix 03/09/21 11:25 AM

Ok, thanks a lot for the help!


All times are GMT -6. The time now is 05:50 AM.

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