Character dynamic behavior switching

Hi, hope you are doing well.

I’m working on a persuasion/teaching scenario, and I would like to know the way to dynamically switch characters’ behavior.

Here is a simple use case: Character initially believes ‘throwing away cans is okay’ → Player provides environmental arguments → Character state changes to ‘Convinced=true’ → Character adopts new attitude about recycling.

  1. Character State Variables: Can a character maintain internal state variables (e.g., ‘Convinced=false/true’) that affect their conversation behavior?

  2. Dynamic Behavior Switching: If 1 is yes, can a character switch between two different conversation personalities/attitudes based on state changes?

Is this technically feasible with current Convai capabilities? For example, Dynamic Information Context / use Backstory API to update backstory or something else? If possible, may you show me the explore directions?

By the way, I am also kind of confused about the character’s long-term memory. Let’s say I have developed a character using Unity. Player opens the exe and interacts with the character, then shuts down the game. Will the character still recognize the player and recall the content when the player reopens the game? Or the long-term memory is just within one single game experience.

Thank you for your time!

Hello @user16,

You can dynamically switch character behavior using the Dynamic Information feature in Unity:
https://docs.convai.com/api-docs/plugins-and-integrations/unity-plugin/utilities/dynamic-information-context

Alternatively, you can update a character’s backstory in real time using the Character API, but this requires an appropriate subscription plan. Another option is to create two separate characters and switch their character IDs at runtime in Unity depending on the scenario.

As for long-term memory, if it is enabled, the character will remember past conversations even after the game is closed and reopened.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.