Page 2 of 4
Re: Quest Tracker
Posted: Tue Nov 26, 2019 2:07 pm
by Tony Li
Hi,
I want to make sure I understand how the quests should appear. Is this correct?
- Quest="unassigned" -- Don't show.
- Quest="ready" -- Don't show. But enable overhead indicator. Treat as unassigned?
- Quest="preempted" -- Show. Treat as active?
- Quest="active" -- Show.
- Quest="complete" -- Show. Enable overhead indicator. Treat as active?
- Quest="success" -- Don't show.
Can quest entries be in a custom state, or only the regular "unassigned", "active", "success", and "failure"?
Re: Quest Tracker
Posted: Tue Nov 26, 2019 2:11 pm
by Tony Li
Also, there's no need to register UpdateTracker(). The Dialogue System already registers that as a Lua function.
Re: Quest Tracker
Posted: Tue Nov 26, 2019 2:43 pm
by nivlekius
Tony Li wrote: ↑Tue Nov 26, 2019 2:07 pm
Hi,
I want to make sure I understand how the quests should appear. Is this correct?
- Quest="unassigned" -- Don't show.
- Quest="ready" -- Don't show. But enable overhead indicator. Treat as unassigned?
- Quest="preempted" -- Show. Treat as active?
- Quest="active" -- Show.
- Quest="complete" -- Show. Enable overhead indicator. Treat as active?
- Quest="success" -- Don't show.
Can quest entries be in a custom state, or only the regular "unassigned", "active", "success", and "failure"?
Yes, Quest ready is used to show an indicator overhead of npc if completing a quest from another npc should activate the quest.
Active is just the normal active state
preempted is unassigned but means that the quest objective was finished and you should go back to the npc to turn it in.
Complete - I was wrong about it being for indicator I had forgotten, but it is used as a state for... well, now I have forgotten. I believe I made it so that it would show a different entry. I'll have to look around my code and see if I can remember why I had it, but as I think about it, it might not be necessary any longer. (I've just looked in my convos and don't see it anywhere so I might have scrapped it)
Success - yes, quest is completely finished.
As far as the UpdateTracker() I thought you told me to add it. I think was before you updated it or something. I'm not sure if I have a version with UpdateTracker in it.
Re: Quest Tracker
Posted: Tue Nov 26, 2019 3:57 pm
by Tony Li
Hi,
Thanks for the clarifications. I misunderstood before about quest states vs. quest entry states. If I understand correctly now, you don't need to override the GetQuestEntryText() method, but you do need to override RefreshAtEndOfFrame() and AddQuestTrack().
Here's an example scene that does just that:
CustomQuestStateExample_2019-11-27.unitypackage
[EDIT: Updated package]
p.s. - The UpdateTracker() Lua function was added in version 2.1.3.
Re: Quest Tracker
Posted: Tue Nov 26, 2019 4:23 pm
by nivlekius
I can't tell if it's working because the tracker closes on "preempted"
Re: Quest Tracker
Posted: Tue Nov 26, 2019 4:32 pm
by nivlekius
nevermind, for some reason it wasn't saving my debug adding of the custom tracker. I might be done, just have one more thing to check
Re: Quest Tracker
Posted: Tue Nov 26, 2019 4:36 pm
by nivlekius
OK yeah, so it's working as far as, the tracker is staying up, the quest name is staying, but entry 2 is not being shown. My entries are Entry1: Active Entry2:Unassigned ("preempted" in the UpdateTracker function)
Re: Quest Tracker
Posted: Tue Nov 26, 2019 4:45 pm
by nivlekius
This is mu Lua code when the quest item is picked up if it makes any difference.
UpdateTracker()
if (CurrentQuestState("Something for Rose") == "active") then
SetQuestState("Something for Rose", "preempted")
SetQuestEntryState("Something for Rose", 2, "preempted")
ShowAlert("Rose might like these flowers")
end
Re: Quest Tracker
Posted: Tue Nov 26, 2019 7:30 pm
by Tony Li
Got it. In that case you do also need to override GetQuestEntryText(). Here's an updated example:
CustomQuestStateExample_2019-11-27.unitypackage
[EDIT: Updated package]
I added a bunch of entries to the preempted quest. Entry 1 is successful, entry 2 is preempted, entry 3 is unassigned.
Re: Quest Tracker
Posted: Wed Nov 27, 2019 1:59 am
by nivlekius
I really have no idea what's going on. First, it doesn't look like QuestLog.GetQuestEntry(quest, 1) actually only gets entry number 1 because no matter what I do it always shows both an active and preempted entry in the tracker. But that's only in the example you sent me.
In my app. I can't even get the preempted entry to show at all. I copied all the code exactly, I change the preempted entry state to none and typed "preempted" in the entry state textbox. I've tried all kinds of different ways to change the UpdateTracker lua and still the preempted entry doesn't show at all.
I don't know. I made a video so you can see what's happening. I if you have time maybe you can watch it see what I'm talking about. I have no idea why I can't even get entry 2 to play at all in my app.
What I'm trying to do step by step is. Get quest --> tracker pops up with title (active state) --> Get the quest item that has the lua code on it that triggers quest state "preempted" tracker stays open preferably with only the new entry showing. But I'd settle for both the active and preempted state if I could manage to get it working. Also, the option to stop tracking is gone when the quest is in preempted.
anyway, here's the video. I dunno.
https://www.youtube.com/watch?v=aYvBHhm ... e=youtu.be
Also, the quest entry states and numbers are confusing me. Are they connected to the quest state or are they separate? Will all entries of each state show if it is in that state? Why does GetQuestEntryState have the parameter entryNumber if it doesn't do anything or does it?
I don't know I might just use only the active entry if I can't get it working. I'm getting frustrated. I can't think of anything that I have different than you do. I thought maybe it was the UpdateTracker code but like the video shows, entry 2 won't show even if I start the game with the quest active. *Pulling hair* j/k I don't have any hair.