Page 1 of 1

Branching Dialogue - Remembering Previously Displayed Branches

Posted: Wed Nov 08, 2023 7:47 pm
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 448 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 448 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!

Re: Branching Dialogue - Remembering Previously Displayed Branches

Posted: Thu Nov 09, 2023 6:55 am
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.

Re: Branching Dialogue - Remembering Previously Displayed Branches

Posted: Sun Nov 19, 2023 2:28 pm
by cassius
Thank you!

Re: Branching Dialogue - Remembering Previously Displayed Branches

Posted: Sun Nov 19, 2023 3:44 pm
by Tony Li
Glad to help!