Branching Dialogue - Remembering Previously Displayed Branches

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
cassius
Posts: 14
Joined: Thu Oct 26, 2023 10:30 pm

Branching Dialogue - Remembering Previously Displayed Branches

Post by cassius »

I've seen a few threads on here that are similar to what I need, but I haven't found a way to implement it that's scalable for my needs.

An example of my dialogue looks like the below image, which is pretty typical of my NPC conversations. The player approaches the NPC, gets sent on a quest, comes back and then converses. The larger middle segment is that conversation and is mostly where I'm getting stuck. In my game, the player has 3 choices early in the conversation. Once that choice is used it should not be presented again in the future. So while there are effectively 9 available branches of conversation total initially, only 3 conversations can take place over time - as defined by the first 3 branches.
conversation-branching.png
conversation-branching.png (115.91 KiB) Viewed 463 times

Up until now I have just been using variables to determine which dialogue branches have or have not been "used" already. Obviously this doesn't scale at all.
conversation-variables.png
conversation-variables.png (97.3 KiB) Viewed 463 times

I'm wondering what a good, manageable, and scalable implementation for this would look like. How would I go about it? I did see something about "sim" which I thought might be relevant, but I couldn't make heads-or-tails with that, so I could be completely wrong.

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

Re: Branching Dialogue - Remembering Previously Displayed Branches

Post by Tony Li »

Hi,

You're referring to SimStatus.

When you tick the Dialogue Manager GameObject's Other Settings > Include SimStatus, every dialogue entry will have a SimStatus value that can be:
  • "Untouched": (Initial value.) Dialogue entry hasn't been shown as a subtitle or offered in a response menu.
  • "WasOffered": Dialogue entry was offered in a response menu.
  • "WasDisplayed": Dialogue Entry was shown as a subtitle and/or clicked by the player in a response menu.
To block an entry from begin used again (e.g., offered in a response menu), set its Conditions field to:

Code: Select all

Dialog[thisID].SimStatus ~= "WasDisplayed"[/list]

You don't have to type this manually. You can select it from the Conditions field's "..." menu.
cassius
Posts: 14
Joined: Thu Oct 26, 2023 10:30 pm

Re: Branching Dialogue - Remembering Previously Displayed Branches

Post by cassius »

Thank you!
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Branching Dialogue - Remembering Previously Displayed Branches

Post by Tony Li »

Glad to help!
Post Reply