Thread Tools Display Modes
03/15/22, 07:25 PM   #1
OneSkyGod
AddOn Author - Click to view addons
Join Date: Oct 2019
Posts: 11
Question Feasibility of a Future AddOn for Quests.

Hi AddOn Creators, I do love all the work everyone does here.


I have an Addon Idea for ESO that I have been planning to make happen.


Its the same idea as the Skyrim Mod Even Better Quest Objectives


It simply Adds enhanced Information for each Task in a Quest, so people can quest without the need of a Compass and Map pins, Just like in TES3.


I know its a tall order to add Description for each quest, but we are building a team on people who are really interested in helping with all the quests and adding the enhanced descriptions for each quest to be able to function in this matter.


I have a Few Questions


1. Is it possible to have the enhanced quest descriptions show in the Quest Journal like this?




The Vanilla Task only shows: Talk to Azbr-ra

This addon would add: , She is tending to her father in the only house in sight that is still standing and has not been touched by the fire.


2. If its possible, Since we will have multiple people doing each quest, will they have to do a function command to find the correct ID of each Task for each quest or have other coding skills ?


3. Is this a type of an AddOn that can be created by someone who is new to Coding and LUA or would we have to find someone way more experienced ?


4. Any other obstacles that would make this impossible to make happened or any other input you may have ?


Thanks
  Reply With Quote
03/16/22, 05:53 AM   #2
Alianym
AddOn Author - Click to view addons
Join Date: Jan 2018
Posts: 10
Originally Posted by OneSkyGod View Post
Warning: Spoiler
Hey there! I'm between things at the moment but figured I'd drop on by to give my thoughts. I only vaguely watch these forums though so might be handy to chat somewhere else if you needed more information. (Others can of course chime in as they feel qualified to do so). (My answer to 2. is a bit convoluted but I'm leaving it anyway.)

1. Yes, it is possible (see screenshot).



2. The tasks are indexed, rather than use an id. So for example the in-game quest journal uses;
Code:
local conditionText, currentCount, maxCount, isFailCondition, isComplete, _, isVisible = GetJournalQuestConditionInfo(questIndex, stepIndex, conditionStep)
So basically you pass in the quest index (which is not the same as the quest id and is something you'd have to consider when "matching" your updates to the appropriate quests – but still doable), and a step index, then pick the condition.

So in the example you gave, if that is index 1 in the quest journal (which could be based off which quest has been sitting the longest in your journal), then your questIndex is 1. Your stepIndex is 1 and your conditionStep is also 1. GetJournalQuestConditionInfo(1, 1, 1) will give you conditionText to which you can append your additional text. Something like;
Code:
conditionText = zo_strformat("<<1>>, <<2>>", conditionText, textToAppend)
Reading this back again I realize that may not answer your question. But in reference to my answer below (4), if you go with a string-indexed array then you can just have your group of people add to it as shown in the example. You'd just need to get the questId to grab the localized quest name then the rest should handle it dynamically. And there are multiple ways to do that.

3. I think someone new to Lua could do it. I imagine they'd have questions. Depends if they're also new to coding as well. You wouldn't need to be "way" experienced in my opinion, but basic groundwork would definitely help. Nothing a visit to the wiki and maybe some light pestering of other authors wouldn't solve.

4. Other Thoughts: questIndex vs questId you can get around by matching the quest name to the currently selected journal quest name. The indices of step and condition though aren't easy to use for a few reasons, but you can string match I guess. You could create an array indexed by language-dependent quest name and then by the condition text. The harder part though is dealing with quests that have multiple repeat condition strings, such as "Talk to Azbi-ra" at the beginning of a quest, and then later in the quest "Talk to Azbi-ra".
Code:
local questDataMap = {
    [GetQuestName(4693)] = { --"The Family Business"
        ["Talk to Azbi-ra"] = "she is tending to her father in the only house in sight that is still standing and has not been touched by the fire",
        ["Salvage Alchemical Tools"] = "they are by the ...",
    }
}
It's not really easily multi-language friendly, though. If you did create that array though, all you'd have to do would be to hook into the function that generates the conditions and add a few lines that do something like;
Code:
local journalQuestName = GetJournalQuestName(questIndex)
if questDataMap[journalQuestName] and questDataMap[journalQuestName][conditionText] then
    local textToAppend = questDataMap[journalQuestName][conditionText]
    conditionText = zo_strformat("<<1>>, <<2>>", conditionText, textToAppend)
end
Then all you have to do is maintain questDataMap.

Last edited by Alianym : 03/16/22 at 06:48 AM.
  Reply With Quote
03/16/22, 06:52 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
I think the questIds or indices are stored within LibQuestData already. Not sure about this though.
You'd have to check that. Would at least strip the need to use questNames as they could change and break your data!

https://www.esoui.com/downloads/info...QuestData.html
  Reply With Quote
03/16/22, 07:04 AM   #4
Alianym
AddOn Author - Click to view addons
Join Date: Jan 2018
Posts: 10
I like the idea Baetram, and I'll throw in that LibUespQuestData is what I've used in the past for my quest-related IDs (and background text) so I know that has questIDs for the vast majority of quests in the game, but if the other lib has the ids (or indices?) in the data as well then that would work too.

The reason I didn't suggest quest ids is that I don't think there's any way to grab them to compare real-time. Even if you knew the id of a desired quest, you couldn't use code to check that it matches the id of the journal quest. There's no GetJournalQuestId(questIndex). The only way to get a quest's id is when it's shared or removed. Not even when it's accepted.

There's still use for the two mentioned libs to just search the .lua file for a quest name and get its associated id for whatever, but it couldn't be compared to a journal quest directly.

Last edited by Alianym : 03/16/22 at 07:10 AM.
  Reply With Quote
03/16/22, 07:13 AM   #5
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Thanks for that info, that's indeed bad then if we only got a string comparison possibility or as quests get added/removed at the journal... Why the heck is there no questId or index at the entry data in the journal?
If it's known as it gets added it could be added to the data, right? Maybe via another addon/lib.

Edit:
I just re-read your info and saw it will be only known if "shared" (not if added) or removed :-( Damn
But maybe one at least can sue the libs given to get the questId or index via their data of names then.
And verify via "removing" the quest from the journal and comparing the IDs.

Last edited by Baertram : 03/16/22 at 07:15 AM.
  Reply With Quote
03/16/22, 07:24 AM   #6
Alianym
AddOn Author - Click to view addons
Join Date: Jan 2018
Posts: 10
I'm just glad we eventually got the ability to at least get some data via questId without it being in the journal or completed. (Re: GetQuestName(questId). ) I would still love any and all quest data ZOS is willing to expose through the API though if ZOSDanBatson is watching. Including a way to map a journalQuestIndex to a questId.

I know there are things they won't expose though. Like you can't see the data for any quest stage other than the one through which you're currently progressing. Which is probably by design.

But yeah. There might be other ways to use the libs creatively. So I guess the short answer to the original question is; "possible? More or less. ideal? Not exactly."
  Reply With Quote
03/16/22, 09:58 AM   #7
Kelinmiriel
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 7
I would love to see an addon like that.

If you make it, make sure you set it up from the beginning to use localization support. When I created my addon a few years ago, I knew nothing about writing addons when I started it, and I wish I had started it with localization support. It's the biggest regret I have about it. I'm going to have to completely re-write the thing at this point to do that. Which I will, when I get a chance, because it's important.
  Reply With Quote
03/16/22, 10:08 AM   #8
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Originally Posted by Kelinmiriel View Post
I would love to see an addon like that.

If you make it, make sure you set it up from the beginning to use localization support. When I created my addon a few years ago, I knew nothing about writing addons when I started it, and I wish I had started it with localization support. It's the biggest regret I have about it. I'm going to have to completely re-write the thing at this point to do that. Which I will, when I get a chance, because it's important.
I totally agree here!
Here is an example how to easily add localization via extra language files in your txt file of your addon:
Code:
path/lang/en.lua
path/lang/$(language).lua
https://wiki.esoui.com/How_to_add_localization_support

I would though not use the ZO_CreateStringId approach (like described at the Wiki link above) here as you need to create SO MANY new texts!

Just build yourself a table like
Code:
myAddon = {}
And add a localization subTable:
Code:
myAddon.localization = {}
In the language file en.lua, which get's loaded by default (as fallback e.g.) add the texts in there:
Code:
myAddon.localization = {
  [questId1] = {
    ["text1"] = "Hello world",
    ["text2"] = "Hello world2",
   ...
   },
  [questId1] = {
    ["text1"] = "Hello world",
    ["text2"] = "Hello world2",
   ...
   },
 ...
}
And in the other language files de.lua, fr.lua, ru.lua etc. do the same so they will just overwrite the table myAddon.localization with the appropriate client language texts.
  Reply With Quote
03/16/22, 11:39 AM   #9
Calamath
AddOn Author - Click to view addons
Join Date: Aug 2019
Posts: 36
Originally Posted by OneSkyGod View Post
4. Any other obstacles that would make this impossible to make happened or any other input you may have ?
Hi OneSkyGod,
I think you were lucky to inquire about feasibility before you began planning.
I am the author of the Quest Tracker add-on, so I am a bit familiar with this area.

I'm reluctant to discourage people from trying new things.
But I don't want you to be optimistic, so I will give you my personal view of the challenges you will face.


I think it would be challenging to implement your idea as an add-on.


As other authors have noted, it is possible to display some text there.
But if you want to add the correct guidance text for a specific objective there, you need to write down an algorithm to estimate what stage of what quest it is.

Details:
The Quest Journal is just like a display device.
Unlike stand-alone games, ESOUI does not have free access to the Quest database via API.

The Quest Journal does not know which quest is displayed.
Of course, there is no API to get the quest id.
But there is a library for the quest id issue, and it may not be difficult for you.

The Quest Journal also does not know what stage of progress each quest has reached.
There is no API to get the quest stage.
And you can only access quest data regarding the current quest stage in progress.
No add-ons are allowed to peek at objects about past quest stages or the current next stages.
Thus, you would have to write code to track a player's quest progress.
And you would have to accurately estimate the quest stage.
This would be a rather daunting task in my opinion.

- Calamath

Last edited by Calamath : 03/16/22 at 11:45 AM.
  Reply With Quote
03/18/22, 06:49 PM   #10
OneSkyGod
AddOn Author - Click to view addons
Join Date: Oct 2019
Posts: 11
Thumbs up

Thanks so much you all for the support and advice !

@Kelinmiriel
@Calamath
@Baertram
@Alianym

I am currently in the process of stepping into the Addon Creator world and will be looking to learn as much as I can.

I really apricate the effort to respond to my question and guiding me in this endeavor.

I will need to learn a way ahead before I can truly understand the depth of knowledge you have bestowed on me

Thanks so much keep up the good work!

Last edited by OneSkyGod : 03/18/22 at 07:40 PM.
  Reply With Quote
03/19/22, 06:30 AM   #11
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
For the start you can have a look over here:
https://www.esoui.com/forums/showthread.php?t=9867

It should cover a lot of topics about lua, ESOUI, contact to other devs and so on.
  Reply With Quote
03/24/22, 12:58 PM   #12
Kelinmiriel
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 7
Originally Posted by Baertram View Post
I would though not use the ZO_CreateStringId approach (like described at the Wiki link above) here as you need to create SO MANY new texts!...
Thank you so much for posting this, Baetram! This is exactly the advice I needed to convert my Event Tracker to use localization, because it's also very text-heavy. (Its original purpose was to help people not lose tickets to the cap, and now it does more warnings and notifications, provides information about events - so a LOT of text.)

Even the code is filled with language-dependent text, because there are some ESO functions that are a lot easier to get text than a numerical ID.

Would be good to add this alternative method to the Wiki, for text-heavy addons like mine, and the one proposed here?
  Reply With Quote
03/24/22, 03:47 PM   #13
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Sure, go ahead Everyone is able to change and add to the Wiki. Just build a proper sub-menu entry there at the translations file so one is able to find it within the navigation at the top.

Just for clarification: You can AND SHOULD also use GetString(SI_constant) within your own created translation file so you do not need to re-invent the wheel and translate already provided ZOs translations. So you are always good in mixing your own localization approach via my described tables, a library, the ZO_CreateStringId(MYADDON_TRANSLATION_NAME1), or any other approach.

But keep in mind that if your addon does not need to show translated texts of different languages at the same time, but only the current client language, you should not load ALL language tables each time, so use the txt file of your addon and specify the different languages in seperated de.lua, fr.lua, ru.ua, en.lua -> only ALWAYS load one of the files as fallback (e.g. en.lua) first and then use $(language) constant to load the client language translation file afterwards.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Feasibility of a Future AddOn for Quests.

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