Thread Tools Display Modes
03/08/21, 05:14 PM   #1
iFedix
 
iFedix's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 11
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!
  Reply With Quote
03/09/21, 01:20 AM   #2
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
[6576] = "Burning Secrets",
[6578] = "Into the Deep",
  Reply With Quote
03/09/21, 02:01 AM   #3
iFedix
 
iFedix's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 11
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!

Last edited by iFedix : 03/09/21 at 10:33 AM.
  Reply With Quote
03/09/21, 10:03 AM   #4
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
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.
  Reply With Quote
03/09/21, 10:33 AM   #5
iFedix
 
iFedix's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 11
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!
  Reply With Quote
03/09/21, 11:23 AM   #6
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 626
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.
  Reply With Quote
03/09/21, 11:25 AM   #7
iFedix
 
iFedix's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 11
Ok, thanks a lot for the help!
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » How can I get a quest internalId value?

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