Narrative Design Trigger

Hi,

I am using narrative design for my convai characters. I have attached my character’s narrative design below. What I want to do is, when I trigger “Thank you” or “Checkout” triggers, characters talk instantly. I want characters to listen to me first then talk.

My start section is “conversation” but at some point in game character could go in item checkout queue and when I talk with them they should respond accordingly to


objective in “checkout” section but If I just trigger the “Checkout” trigger they will not respond accordingly to what I said.

How can I fix that issue?

Thank you,

Welcome to Convai Developer Forum!

I am Kamal from the LLM team, I would like to help you more but I am not able to fully understand the question.

Can you elaborate exactly on what kind of behaviour is that you are trying to achieve, what is the objective in checkout, what is the trigger exactly.

maybe an example flow would help me a little.

I have customers in my game, and I use narrative design to adjust their behavior. When they enter the store, I talk to them, which starts the conversation section. After our conversation, they can either leave the store or follow me so I can show them where the clothing they are looking for is.

After they pick up clothing, I can approach them, and at that point, I want the ‘Thank You’ section to start. However, to trigger it, I need to activate the ‘Thank You’ trigger. If I do this, they speak first, but what I want is to speak first and have them respond accordingly based on the ‘Thank You’ section.

Another case is when they pick up clothing and go straight to the cash register to purchase it. In this situation, I want to trigger the ‘Checkout’ section, but just like before, I want to speak first.

In general, I need a solution where I can use triggers to activate a section without making the character speak immediately.

So you are basically saying, you need triggers not based on what you are saying, but based on some event/action that is happening in your virtual world. Correct me If am wrong?

I didn’t fully understand what you said, but the example above explains what I want. Essentially, I want to dynamically change the sections based on the situation of the character.

Hello @Ferhat,
For triggering specific sections based on in-game events, you typically need to use Narrative Design Triggers. However, in your case, you want the user to speak first before the section is activated.

Here’s a possible solution:

Your customer should have an Idle State (default state) when they are not interacting.

  • When the customer picks up clothing, instead of triggering the ‘Thank You’ or ‘Checkout’ section, you can add possible user inputs as Decisions in Narrative Design.
  • These Decisions should be linked to the appropriate sections (e.g., ‘Thank You’ or ‘Checkout’).
  • This way, when the user speaks first, the correct section will automatically activate, and the customer will respond accordingly.

Let me know if you need further clarification!

This approach doesn’t work for certain use cases. To make it clearer, I’ll share some examples:

Use Case 1:

  • A customer picks up an item and starts walking around the store looking for the changing room.
  • In this case, I can approach her and ask, “Are you looking for the changing room?” She should respond accordingly.
  • If she agrees, I will subscribe to an event for that section to activate the my follow code, allowing her to follow me.

Use Case 2:

  • A customer is browsing the store. I can start a conversation by asking, “How can I help you?” She should respond accordingly.
  • After the conversation, I can offer to guide her, and she may choose to follow me.
    Alternatively:
  • After handing her a dress, I might ask, “What do you think?” She could reply, “I like it, I want to try it in the changing room.” From there, the scenario follows Use Case 1.
    If I don’t interact with her again, she may decide to go changing room by herself, after that she may go to cash register line to purchase the dress.

Use Case 3: (At the cash register)
The customer at the front of the line could be:
a) The customer, We haven’t interact before.
a) The customer, we guided to the changing room.
b) The customer, we helped find a dress, then directed to the changing room.
c) The customer, who found a dress, went to the changing room by herself, and then lined up to pay.

Additionally, there are scenarios where a customer may decide to leave the store.

I’m currently working on a project where these use cases will be used in a demo. In the future, I will need to handle much more complex scenarios, with the current narrative design structure, I cannot dynamically change sections without creating decisions. Currently, I am limited to using triggers, which have the downside that the customer always speaks first.

The scenarios you’ve shared actually align with Narrative Design use cases. Could you clarify which part isn’t working for your needs?

Currently, directly switching sections is not supported. The only way to transition between sections is by using Triggers.

I will also share this use case as feedback with our team. Thank you for your insights!

I guess I couldn’t fully explain what I am trying to achieve. Let me explain it using my narrative design. In the image below, there is a three-section tree.

During the game, my customer could be in the ‘Go To Changing Room’ section, but at some point, when I try chatting with the customer, I would want her to respond according to what is written in the ‘Checkout’ section.

Similarly, my customer could be in the ‘Follow the User’ section (under the ‘Conversation’ category), but at some point, when I try chatting with the customer, I would want her to respond according to what is written in the ‘Thank You’ section.

The same applies to these cases:

‘Follow the User’ (under ‘Thank You’) → ‘Checkout’
‘Follow the User’ (under ‘Conversation’) → ‘Checkout’

If you suggest simply connecting the sections and adding decisions, I would run into a problem where the narrative design does not know the character’s state.

For example, if I connect ‘Follow the User’ (under ‘Conversation’) to both ‘Checkout’ and ‘Thank You’ with a decision like ‘If you have clothing in your hand, then go to Checkout,’ this would not work. The reason is that the narrative design does not know whether my customer has an item in their hand or not.

In my game, customers can pick up clothing by themselves or go to the changing room on their own. Because of this, the narrative design would not know if the customer currently has an item in their hands or if they have just come out of the changing room.

If I can somehow make the customer’s narrative design aware of the customer’s real-time state throughout the game (like holding a clothing, just came out of the changing room, etc.), this could be a solution. Otherwise, I don’t have any solution to the this problem.

IIUC you need a way to change the narrative section without invoking the section execution. The particular section should execute only after you speak? This way your input will be considered with section objective to frame the final response. Is that correct?

Yes, that is correct

This is a feature request and would take sometime for us to implement. For now can you try this:

One way to achieve this today is via, Trigger, a dummy section and * transition.

Tigger → [Dummy Section] — * —> [Main Section]

Invoke Trigger and ignore any generated response. This will set the current section to [Dummy Section].

Then due to * transition, any follow-up speech will invoke the [Main Section]