Modular conversations and optional quest (Quest Machine)
Posted: Mon Dec 05, 2022 12:00 pm
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!").
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!
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!").
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!