View Single Post
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