Page 1 of 1

Why add actors and conversants?

Posted: Sun Jan 14, 2018 8:24 am
by namelesswc
This is just a design question.

When creating conversations inside the node editor we have to specify the actor and conversant for ever entry which makes sense to me.

When creating a conversation trigger, I select the conversation it should trigger. Why do I also need to add a game object references to an actor and conversant object. The actors were already specified when writing the dialogue. If I don't create and reference a conversant object, it doesn't display the name correctly.

Re: Why add actors and conversants?

Posted: Sun Jan 14, 2018 9:54 am
by Tony Li
That's a good question. This was a design choice that I'm going to change in Dialogue System 2.0.

The purpose of this design choice is to support conversation re-use. It's described in detail in How GameObjects Are Associated With Conversations.

In brief, by way of example: It lets you write a single shopkeeper conversation and use it for every shopkeeper NPC across your RPG world. The conversation will use the assigned GameObject's name or override name. You can imagine getting the same kind of re-use out of generic villager conversations, enemy barks, etc.

If you start a conversation (e.g., using DialogueManager.StartConversation())without specifying an actor or conversant, the Dialogue System will use the GameObject whose name or override name matches the conversation's assigned actor or conversant.

Except Conversation Trigger has some convenience features that aren't all that convenient in every situation. If the Conversant field is unassigned, Conversation Trigger uses its own GameObject as the conversant. If the Actor field is unassigned and Conversation Trigger is triggered by interaction from another GameObject, such as OnTriggerEnter or OnUse, it will use the other GameObject as the actor. This is important because the player GameObject may be instantiated into the scene; it might not be present at design time to assign to Conversation Trigger. What this means is that you can add a Conversation Trigger to an NPC, entirely skip assign the Actor and Conversant fields, and it will still work. But it's probably the topmost confusing design issue with the Dialogue System, so this convenience feature will go away in version 2.0.