Conditionned NPC reactions

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Dymalle
Posts: 2
Joined: Thu Jun 28, 2018 1:33 pm

Conditionned NPC reactions

Post by Dymalle »

Hello,

I am considering buying Dialogue System for Unity, because I wish to create a complex dialogue system in which the NPC will have attributes (qualities, defaults...) randomly determined by the system.
I wish to know if I can do that with Dialogue System for Unity. For that I have two questions:
1. Is it possible to add attributes to sentences? (for example: colloquial, formal, standard...)
2. Is it possible to define several possible answers from the NPC, that will depend on the combination of the sentence's attributes and the NPC's attributes? I wish to write a script that will determine which answer the NPC will do depending on his attributes and the attributes of the question.

Best,
User avatar
Tony Li
Posts: 22058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditionned NPC reactions

Post by Tony Li »

Hello,

Yes to both.

In the Dialogue System, sentences are called dialogue entries. You can specify Conditions on dialogue entries that can check Dialogue System variables, quest states, and more, including actor attributes (called fields). You can also register your own C# functions with the Dialogue System and check them in Conditions.

The Dialogue Editor's Template tab lets you add new custom fields to dialogue entries and actors (NPCs), too.

If that's not enough, you can also assign a C# function to the DialogueManager.IsDialogueEntryValid delegate.

However, Conditions alone should handle your needs. For example, let's say you define three dialogue entries:
  • "Hey."
  • "Hello."
  • "Good day, sir."
You can set Conditions on them like this:
  • "Hey." (Condition: NPC is colloqiual)
  • "Hello." (Condition: NPC is standard)
  • "Good day, sir." (Condition: NPC is formal)
If you get stuck setting this up, let me know. I can put together a brief example scene.
Dymalle
Posts: 2
Joined: Thu Jun 28, 2018 1:33 pm

Re: Conditionned NPC reactions

Post by Dymalle »

Thanks a lot!
Then I'll buy it!
User avatar
Tony Li
Posts: 22058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Conditionned NPC reactions

Post by Tony Li »

Glad to help! If you have any questions or need an example scene, just let me know.
Post Reply