Docs
How Matching Works

How Matching Works

Charisma uses Natural Language Processing (NLP), a branch of AI, to interpret player responses in order to send players down the most appropriate story path. No matter what your player says, Charisma will use AI to decipher meaning from it and match that as closely as possible to the paths available in the story.

Charisma takes all of the information it needs to do this from the player nodes.

Player nodes

Player nodes are the “interactive” bit of our interactive story. Player nodes are there for the writer to specify as many potential player responses as possible and then follow up with the appropriate character response or story path. Charisma will then “read” the player nodes and choose the best match to the actual player response and send them down the most appropriate story path. They work a bit like a fuzzy match across a group of answers the writer puts in.

A graph showing player nodes using specific intents

To give Charisma the best chance of matching to the right path, it is advised to:

  • Think of as many ways a player might respond to the actual question posed
  • Group these possible responses into the multiple ways a player might respond e.g I’m comfortable thanks, really comfortable, getting comfy, super comfy thanks, couldn’t be more comfortable.
  • Use separate player nodes for different player intentions, even if they will lead to the same path.

Wildcards

Wildcards are for when Charisma cannot match the player response to any of your player nodes. For example, looking at the interaction below, if your player says “bananas”, Charisma would send the player through the wildcard and along that path.

A graph showing player nodes using general intents

Conditions

Charisma can only send a player down a path where all the memory and category conditions are met. For example if a character node uses a <player_name> memory, but that corresponding memory is not saved, then Charisma will not be able to send the player through that path.

The same goes for gates. If the conditions are not met, then Charisma will look for another path.

If there is no alternative route, the story will stop.

Matching order

Charisma uses a priority and probability matching structure to decide which path to send the player down.

The priority order is:

  1. Gates: Charisma will naturally give any connector with a gate attached the highest priority. This means Charisma will send the player to a gate node that has its conditions met as a priority over a route without a gate.
  2. Exact match: Charisma will then look to see if there is an exact match path - remember that for “Exact Match” to work, the player has to use the word exactly as it is spelt in the player node. This also includes words or phrases that include the exact match word - e.g “Gold” would also match to “Goldie” because Goldie includes the word Gold.
  3. Player nodes using intents, keywords or sentences: These are all treated with equal priority unless a priority order has been set on the connector. To change the priority of a connector, you can select the connector (by clicking on it) and press + or - to increment or decrement it.
  4. Wildcards: if no path matches are found through a gate or player node then Charisma will match to a wildcard path if it is present in the interaction.
  5. Subplots: if no wildcard path is found then Charisma will look for a possible match in a subplot that begins with a player node. If you don’t have a subplot that matches then Charisma will have exhausted its options and the story will stop.

Punctuation

Charisma does not need punctuation to make a match, although it doesn’t hurt to include it

Categories

You can also use categories within a player node by putting the name of the category in between angle brackets < > in the player node.