Modular conversations and optional quest (Quest Machine)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
nratcliff
Posts: 23
Joined: Tue Sep 27, 2022 10:47 am

Modular conversations and optional quest (Quest Machine)

Post by nratcliff »

Our game has fully procedural generated NPCs with unique names, character types (e.g. farmer, shopkeeper, etc), and other traits. Our game has both prewritten and generated quests. We're using DS + QM with the DialogueSystemQuestGiver and QuestGiverInteractableTarget components on the NPCs.

The NPC gets a default conversation assigned to the "No Quests Conversation" field on the DSQuestGiver component based on their type (e.g. "NPCs/Farmer/Default 1" conversation). If the NPC has a quest to give, they will start the quest offer conversation on interact, and if there is an active quest, they will start the active quest conversation (i.e. defined on the quest node).

This all works mostly fine but yields some workflow headaches and a couple of issues. What we'd like to be able to do is have the NPC always give an introduction/greeting when the conversation with the player starts, then present the player with a choice of dialogue branches including a quest offer (if any), open shopping menu (if shopkeeper), etc.. We'd also like the quest offer to return to this menu if the player does or does not accept the offer, so they can continue discussion (i.e. open the shop after accepting a quest), or end the conversation by selecting "goodbye" from the responses.

Ideally we would be able to detect a offerable quest from the NPCs main conversation, jump to the quest offer conversation if this quest has not yet been offered to the player by the NPC, then jump back to the main conversation after the player has chosen to accept or defer the quest. If they did not accept the quest, then an option to "tell me about" the quest appears in the responses. If they have an ongoing quest, they should have a response menu option to check in with the NPC (i.e. "I got the berries!").

Image

We aren't sure how to detect the offerable quest, jump to that conversation, then return to the main conversation. We're also not sure if/how we can have response menu items that are specific to the quest (i.e. "Tell me more about your hunger" or "I got the berries"). After poking at the docs for a while I figured it would be best to ask here for best practices.

We'd also love to be able to jump to shared conversations (like greetings by character type or a shared "what's up?" menu) if possible. That would just make it easier to implement/maintain dialogue overall. Again, not sure what's the best way to go about that.

Thanks for all your help!
Lead Dev @ aesthetic.games
Creator of Easy Feedback Form
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Modular conversations and optional quest (Quest Machine)

Post by Tony Li »

Hi,

Some of that you can already do, and Dialogue System features such as the conversation position stack will help a lot. However, you and fellow DS+QM user DeidreReay have both recently brought up the question of being able to go from an intro conversation to a proceduraly-generated conversation. I'll need to update the integration to support that. Currently you can check the QM Lua function HasOfferableOrActiveQuest() to know if the NPC has any quests to offer or discuss with the player, including procedurally-generated quests. But there's currently no way to jump to a specific procedurally-generated quest's conversation from the intro conversation. I'll work on adding that to the integration this week.
User avatar
Tony Li
Posts: 21962
Joined: Thu Jul 18, 2013 1:27 pm

Re: Modular conversations and optional quest (Quest Machine)

Post by Tony Li »

I totally forgot to mention that if the NPC has only one procedurally generated quest (which is actually the case most of the time), then to jump to a procedurally-generated quest’s conversation from another conversation, use the
ShowGeneratedQuestDialogue() Lua function in the other conversation’s Script field. To check if
there is a procedurally-generated conversation to jump to, you can use the HasGeneratedQuest() Lua
function in the Conditions field.
Post Reply