Conversation related variables

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Deadcow
Posts: 28
Joined: Tue Apr 30, 2019 8:21 am

Conversation related variables

Post by Deadcow »

We got dialogues with a lot of conditional branching and lots of NPC to talk to. I thought it might be useful to have variables related to specific conversation along with global variables.

Some conversations might be played several times but will have slight differs based on things we talked previously in this conversation. For instance, variable to check that NPC01 talked about A, talked about B, C, D.... And all this variables related to this conversation specifically. This way we'll quickly grow a bunch of variables hard to orient through .

Not too much of a problem, just a thought :)
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conversation related variables

Post by Tony Li »

Hi,

You can do this by adding custom fields to your conversations. To do this, edit a conversation and click on blank canvas area to inspect the conversation's properties. Expand All Fields, and click the "+" button to add a new field. However, the Lua dropdowns for the Conditions and Script fields do not provide a dropdown for custom conversation fields. They do, however, provide dropdowns for custom actor fields. You may prefer to define the custom fields in the actor instead:
  • Actor["NPC01"].TalkedAboutA
  • Actor["NPC01"].TalkedAboutB
  • Actor["NPC01"].TalkedAboutC, etc.
Or you can add them all to the global variables. Devs will often include group names in variable names, such as "NPC01.TalkedAboutA":
  • Variable["NPC01.TalkedAboutA"]
  • Variable["NPC01.TalkedAboutB"], etc.
Then you can sort by group name and/or filter for a specific set of variables (e.g., "NPC01.").
Deadcow
Posts: 28
Joined: Tue Apr 30, 2019 8:21 am

Re: Conversation related variables

Post by Deadcow »

I knew there is should be the way to do this in such a nice tool :D Thanks!
Post Reply