Quest giver dialogue questions

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Orochimaru
Posts: 7
Joined: Sun Oct 20, 2024 12:40 am

Quest giver dialogue questions

Post by Orochimaru »

Basically I want the player to have to always click the button of an inactive, active or finished quest in the quest giver dialogue in order to get further info and options for that quest regardless of whether it is the only quest.

As of now, if there is only one quest, the dialogue will always open to the quest info and action options (accept/decline or abandon...), and if the quest objectives have been done, the dialogue will open and automatically finish the quest...

I don't want that.

Is there a way to always have the quest selection buttons show when the dialogue opens, no matter how many quests are available?

Is it possible to have the quest selection button show when turning in the only available quest, so the player has to select the quest by pressing it's button in order to actually complete the quest?

(Other questions)

And is there a way to show normal dialogue from the NPC (as in a conversation) even if there are quests available or active? ... Or is there a way to set up a "talk" or "conversation" button that would be listed along with active/available quest buttons, allowing the player to talk with NPC instead of interacting with quests...

I have Ork Framework... Is it possible to run the quest giver dialogue through the ork dialogue system?
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest giver dialogue questions

Post by Tony Li »

Orochimaru wrote: Sun Oct 20, 2024 1:00 amIs there a way to always have the quest selection buttons show when the dialogue opens, no matter how many quests are available?
...
Is it possible to have the quest selection button show when turning in the only available quest, so the player has to select the quest by pressing it's button in order to actually complete the quest?
Yes. Make a subclass of the QuestGiver class. Its methods are virtual precisely so you can change behavior like this without having to touch the original scripts. Override the StartMostRelevantDialogue() method. Something like:

Code: Select all

public class CustomQuestGiver : QuestGiver
{
    protected virtual void StartMostRelevantDialogue()
    {
        RemoveCompletedQuestsWithNoDialogue();
        var hasMultipleQuests = activeQuests.Count + offerableQuests.Count + nonOfferableQuests.Count + completedQuests.Count > 1;
        var mustShowSpecificQuest = !string.IsNullOrEmpty(overrideQuestIDToShowInDialogue)
        if (hasMultipleQuests || mustShowSpecificQuest)
        {
            base.StartMostRelevantDialogue();
        }
        else if (activeQuests.Count == 1)
        {
            ShowActiveQuest(activeQuests[0]);
        }
        else if (offerableQuests.Count == 1)
        {
            ShowOfferQuest(offerableQuests[0]);
        }
        else if (nonOfferableQuests.Count == 1)
        {
            ShowOfferConditionsUnmet();                
        }
        else if (completedQuests.Count == 1)
        {
            ShowCompletedQuest();
        }
        else
        {
            ShowNoQuestsToDiscuss();
        }
    }
}
Orochimaru wrote: Sun Oct 20, 2024 1:00 amAnd is there a way to show normal dialogue from the NPC (as in a conversation) even if there are quests available or active? ... Or is there a way to set up a "talk" or "conversation" button that would be listed along with active/available quest buttons, allowing the player to talk with NPC instead of interacting with quests...
Yes. Very often when people are using Quest Machine with the Dialogue System for Unity integration, they always start a Dialogue System conversation. In the conversation, they check and set Quest Machine quests. So they don't use Quest Machine's UnityUIQuestDialogueUI at all in this case.
Orochimaru wrote: Sun Oct 20, 2024 1:00 amI have Ork Framework... Is it possible to run the quest giver dialogue through the ork dialogue system?
I'm not familiar with the ORK dialogue system. But I'm pretty sure you can do it. Quest Machine has Makinom actions, and you can probably call Makinom actions from the ORK dialogue system.
Orochimaru
Posts: 7
Joined: Sun Oct 20, 2024 12:40 am

Re: Quest giver dialogue questions

Post by Orochimaru »

Ok first thanks for the info. I'll see about adjusting the quest giver dialogue....

The ork framework dialogue system is actually quite good. I don't own your "Dialogue System asset and can't buy it rn. But the ork framework dialogue system can do nearly anything needed and has its built in global and local variables that work well with branching and conditional dialogue... I'm hoping you would consider looking deeper into that and possibly adding more integration options there... Lol but I would understand why you wouldn't since "Dialogue System" is one of your assets lol.

Anyway thanks for the info. I'll get to it.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest giver dialogue questions

Post by Tony Li »

I think Quest Machine's Makinom integration should suffice. Surely ORK's dialogue system integrates with it.
Orochimaru
Posts: 7
Joined: Sun Oct 20, 2024 12:40 am

Re: Quest giver dialogue questions

Post by Orochimaru »

It does integrate, but I'm not sure how to work with it. For example. Ork has a schematic node that says "start dialogue". I'm guessing that could open the preset quest giver dialogue from an ork dialogue, but it doesn't seem to go any deeper than that.

That's useful as is, but barely integrated at the level that other quest machine systems are with ork schematics.

Just saying it would have been nice to be able to have an ork schematic node that opened up individual quest dialogues, so I can have them directly as options in an ork dialogue allowing me to have more freedom on how to set up the player experience in this area.

But it's all good. I'm bout to look into what you said about augmenting the quest giver dialogue directly... And I'll just have a single option on the ork dialogue called "quests" that uses the quest machine's "start dialogue" node to open the official quest giver dialogue just for quests while using ork for all other dialogues
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest giver dialogue questions

Post by Tony Li »

Hi,

From Makinom, you can use Call Function or Send Message to call the quest giver's StartSpecifiedQuestDialogueWithPlayer(questID) method.
Orochimaru
Posts: 7
Joined: Sun Oct 20, 2024 12:40 am

Re: Quest giver dialogue questions

Post by Orochimaru »

I was able to get it to work with this-

public class CustomQuestGiver : QuestGiver
{
protected override void StartMostRelevantDialogue()
{
RemoveCompletedQuestsWithNoDialogue();
var hasMultipleQuests = activeQuests.Count + offerableQuests.Count + nonOfferableQuests.Count + completedQuests.Count > 1;
var mustShowSpecificQuest = !string.IsNullOrEmpty(overrideQuestIDToShowInDialogue);
if (hasMultipleQuests || mustShowSpecificQuest)
{
base.StartMostRelevantDialogue();
}
else if (activeQuests.Count == 1)
{
ShowQuestList();
//ShowActiveQuest(activeQuests[0]);
}
else if (offerableQuests.Count == 1)
{
ShowQuestList();
//ShowOfferQuest(offerableQuests[0]);
}
else if (nonOfferableQuests.Count == 1)
{

ShowOfferConditionsUnmet();
}
else if (completedQuests.Count == 1)
{
ShowCompletedQuest();
}
else
{
ShowNoQuestsToDiscuss();
}
}
}

Now I just really wish there was an ork node that checked if the (machine object) quest giver has active quests or not. There are nodes for checking specific info on specific questIDs which could be useful in the future, but nothing to check the quest giver's info. I'm not sure how to use ork's check function node that well, nor exactly what function it could check in the quest giver code to check if no quests are available...
Orochimaru
Posts: 7
Joined: Sun Oct 20, 2024 12:40 am

Re: Quest giver dialogue questions

Post by Orochimaru »

and yeah. I also saw a "give quest" node in the list as well, but I was under the impression that it was going to just give the player the quest without showing the premade quest givers dialogue. I actually wanted to use the preset quest box because it has all the quest info from the quest machine systems automatically on it. But i decided to just use the "start dialogue" node since you helped me get the quest list to show when I wanted.

lol and i also thought of a way to work without ork knowing if the quest giver has available quests or not... it's all good... lol
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Quest giver dialogue questions

Post by Tony Li »

Alright, sounds good!
Post Reply