Same quest node, multiple Npcs dialogues

Announcements, support questions, and discussion for Quest Machine.
Post Reply
unityDev
Posts: 9
Joined: Mon Jul 04, 2022 8:30 pm

Same quest node, multiple Npcs dialogues

Post by unityDev »

Hello! MMO project guy here again :)
I have been scratching my head about something. So I have QuestMachine and DialogueSystem integrated perfectly, and I preferably wanted to use as much of Lua as possible, so that it can be done by game designers and writers, instead of scripts.

Game project is similar to Animal Crossing behavior, where there is no quest offering or accept/decline quests. And I add the main quest from code.

I have hit an obstacle though, where I want multiple NPCs to have different conversations depending on 1 quest (and 1 quest node status active/inactive), I believe this kinda goes against how QM operates? Would a custom script be needed, to check Npc ID and start a specific dialogue conversation from code instead?
Like each NPC would have only 1 dialogue asset, and in Lua I would check the quest nodes status.

Thanks!
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Same quest node, multiple Npcs dialogues

Post by Tony Li »

Hi,

There are two ways you can do it. What you suggest is how I prefer to do it, too. Here are the two typical ways to handle multiple NPC dialogues:

1. Assign different speakers to different Quest Machine quest nodes. Use Dialogue System Conversation quest content on those nodes to start different conversations based on which node is active.

2. Or always start a Dialogue System conversation instead of starting Quest Dialogue dialogue. I prefer this option. Give each NPC its own main conversation. The NPC's main conversation can check quest states in Lua and branch to quest-specific conversations if you don't want to put all of the NPC's dialogue content in a single conversation.
unityDev
Posts: 9
Joined: Mon Jul 04, 2022 8:30 pm

Re: Same quest node, multiple Npcs dialogues

Post by unityDev »

Awesome! Yes I think duplicating each condition for each npc would be inefficient as well. I don't mind code in this area at all, as it'll be done by me. I went with your preferred option. Triggering convo in code, convo ID will be same as NPC id, so it's totally generic.

But I didn't know there's an option in the conversation editor to branch to another conversation? That would really be awesome, I watched most video tutorials but didn't notice that. Can you please point me to where I can do that?
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Same quest node, multiple Npcs dialogues

Post by Tony Li »

Inspect a dialogue entry node. In the Inspector's "Links To:" dropdown, select "(Another Conversation)".
unityDev
Posts: 9
Joined: Mon Jul 04, 2022 8:30 pm

Re: Same quest node, multiple Npcs dialogues

Post by unityDev »

How did I miss it.. This is perfect! I think everything's covered really, thanks a lot for the help!
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: Same quest node, multiple Npcs dialogues

Post by Tony Li »

Happy to help!
Post Reply