Ultroman wrote: ↑Thu Oct 08, 2020 3:17 pmI have a bunch of delivery quests, so I'll have to change the state of the quest entries between being "active" and "success" depending on whether the player currently has the required items in their inventory. I can set up my own triggers to update those, BUT then I also need to update the Quest Indicators by calling QuestLog.UpdateQuestIndicators("questName") every time I change the state of an entry, right? Since the hand-in condition checks the states of its entries. This is the way?
Yes. Add a script to the Dialogue Manager with an OnQuestStateChange method. Example:
void OnQuestStateChange(string questName) // Also called if an entry in quest changes.
{
QuestLog.UpdateQuestIndicators(questName);
}
Ultroman wrote: ↑Thu Oct 08, 2020 3:17 pmSecond problem. This is all fine until you have more than one quest "active" or "grantable" with the NPC. Which one takes priority for the Quest Indicator when there are several QuestStateListener components on the same NPC? Optimally, the Question Mark would have priority, but it looks to me like it's just whichever quest last had its state updated. I think one would have to iterate over all available quests and do checks, in order to really determine which indicator should be shown.
Each QuestStateListener registers its desired indicator with the QuestStateIndicator component.
The QuestStateIndicator component shows the desired indicator that's highest in its list of indicators.
Prettying up the QuestStateListener inspector interface has been on my list since forever. It's hardly the most user-friendly thing right now. I'm afraid it won't make it into the upcoming version 2.2.12, but I'll get to it one of these days.
Sounds good. The inspector for QuestStateListener is pretty bulky
I've run into a problem which I also made a thread about earlier. Now that I want my quests to start out "grantable", I went to set them as such, but as soon as I click here:
2020-10-10 23_36_41-Window.png (24.21 KiB) Viewed 325 times
it sets it to None():
2020-10-10 23_37_58-Window.png (13.08 KiB) Viewed 325 times
It's because the Field doesn't allow that state:
2020-10-10 23_39_03-Window.png (30.57 KiB) Viewed 325 times
I added the ability to set the grantable state at design time in version 2.2.12 (coming out on Monday). In its original use case, it was only set at runtime, so I hadn't set up a test case to test it at first.