Remembering Dialogue (Branching Narrative)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
rloft123
Posts: 22
Joined: Wed May 25, 2022 8:11 pm

Remembering Dialogue (Branching Narrative)

Post by rloft123 »

I'm looking to create a 2D story driven game using Dialogue System as the base of the social aspects of the game. I have down the basic conversations and barks from the asset, however I haven't gotten too deeply into the lua stuff, which seems to be where a lot of the power is.

My question is, how would you go about having the game and individual characters remembering what you've said, or having certain states of the game change based on decisions made and triggering certain events or other dialogues based on those decisions made (I'm thinking about the Telltale games, or Disco Elysium). I can imagine a solution with a lot of boolean flags based on chosen dialogue and actions done in the game, but I'm uncertain how to even approach this and want to avoid some messy and poorly scaling solution.

Any advice would be greatly appreciated.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Remembering Dialogue (Branching Narrative)

Post by Tony Li »

Generally speaking, Boolean flags (variables) are the way to go. To keep them organized, group them by using "." in the variable names. (See examples below.)

This tutorial covers variables and conditions: Conversation Conditions Tutorial

You'll note in the tutorial that you don't have to type any Lua. Just use the "..." dropdown menus.

Another example of using variables is in: How to: Run a Conversation Only Once

Here's an example of grouping variables in "Villagers" and "Castle" groups:

vars1.png
vars1.png (24.41 KiB) Viewed 800 times

When variables are grouped, you can use the Menu to show groups in separate foldouts:

vars2.png
vars2.png (22.78 KiB) Viewed 800 times

And/or you can use the filter bar:

vars3.png
vars3.png (17.78 KiB) Viewed 800 times

You can also use quests to keep track of the player's progress.
rloft123
Posts: 22
Joined: Wed May 25, 2022 8:11 pm

Re: Remembering Dialogue (Branching Narrative)

Post by rloft123 »

Thanks, I've been looking into those and it's been helpful. My one other question is, what's the standard for controlling which conversation is being used? Is it best practice to make a whole different conversation for each different conversation you can have with an NPC, or should you branch out based on logic/flags/triggers in a single "Conversation"? Like lets say, the first time you are introduced to the NPC, so NPC.introduced is now true, then you can do that check in the conversation flow. Would you just expand on that kind of logic within that same Conversation? Because triggering different Conversations looks like you need a new Dialogue System Trigger for each, which would explode in the amount of components the NPC object would have.
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Remembering Dialogue (Branching Narrative)

Post by Tony Li »

Hi,

The second part of How To: Run a Conversation Only Once covers two ways to do that:

1. Use multiple Dialogue System Triggers, or

2. (My preference:) Always start the same starting conversation, and branch from there to other conversations using cross-conversation links.
Post Reply