Try Inworld
Request a Demo
Try Inworld

Introducing Goals and Actions 2.0

Nathan Yu
Nathan Yu
July 19, 2023
Related posts
Want to try Inworld?
Get started

In video games, the game narrative moves forward through players’ in-game decisions and interactions with NPCs. Usually, these actions are timed or triggered by a player’s gameplay or their dialogue tree response. 

But as games transition to generative Inworld NPCs, having more dynamic ways to trigger actions becomes critical. That’s why we introduced a more advanced Goals and Actions YAML Editor feature with both client-defined and player-centric triggers. 

In non-gaming use cases, goals and actions can be useful for creating directed brand activations, onboarding characters, corporate training experiences, and more. 

Goals and Actions 2.0

Our Goals and Actions 2.0 update includes several new powerful features, including the ability to leverage contextual intents as activation conditions, passing real-time information from a client to a character via parameters, and controlling when a character should deliver a pre-scripted line verbatim. All of these features can be defined in a flexible code editor in YAML syntax. Enabling the 2.0 version of Goals and Actions requires a toggle of the ‘Use advance goals and actions switch’.

goals:
1- name: "pitch_weapon"
2  activation:
3    intent: "ask_for_weapon"
4    trigger: "pitch_weapon"
5  actions:
6    - instruction: "tell {player} to visit {{p.place}} to get a javelin made with honeybee's stinger"
7      emotion_change: "JOY"
8      send_trigger: "ask_for_weapon_detected"
9

There are 3 key elements of our Goals and Actions 2.0:

Goal

The goal serves as a 'consequence mechanism' that is triggered by an activation event, leading to a specific action. This feature grants developers enhanced runtime control over characters.

For example, if you have a goal to have a character suggest a quest to the player, your activation condition might be the player asking about available quests. When this intent is recognized, the goal is activated, and the character begins executing the associated actions - perhaps describing the quest and instructing the player on how to start it. Once the character finishes these actions, the goal is marked as completed, and a trigger is sent to the client.

Activation

This is the event that triggers the goal. It is made up of two components: intent and trigger. The activation must include at least one intent or trigger.

  • Intent Recognition: Developers can now use Inworld’s YAML Editor to easily enter an intent name and the corresponding training phrases. When a player brings up a topic that corresponds to those training phrases, the intent recognition trigger is activated and the character can then execute the associated actions.
  • Trigger: The trigger is a user-specified event sent to our server to initiate the goal. 

Action

This consists of a set of responses that will happen after an activation condition has been met. Actions can include spoken actions and character state changes. Actions can be randomized and also leverage parameters to take in dynamic information from the client at runtime.

Spoken Actions

  • Instruction: This field is used to provide specific guidance on how your character should respond after a goal has been activated. Your character will follow the instruction while still maintaining their own unique personality.
  • Say_Verbatim: Program verbatim dialogue into the character to create scripted interactions that push the narrative or gameplay forward. 

Character State Changes

  • Emotion change: Assigns the specified emotion to the character's current emotional state.
  • In the near future, developers will be able to modify all aspects of the character at runtime

Randomized Actions

  • Random: This functionality allocates a probability value (ranging from 0 to 1) to an action item (e.g., instruction, say_verbatim, or emotion_change). When a goal is triggered, the action item is executed with the given probability.

Parameters

Now, you can write ‘say_verbatim’ and instructions with parameters that can be used to inject real-time information from the client (delivered through the trigger) into an action at runtime. This gives developers a lot more control and flexibility to not have to define all goal variants ahead of time.

Pro tip: You can even pass in the entire instruction by only including a single parameter in the instruction field like “{{p.instruction}}”.

Non-gaming use cases for Goals and Actions

Our Goals and Actions feature can drive character interactions in a variety of experiences. For example:  

  • Brand mascots making product recommendations
  • Onboarding agents sharing tips with users
  • Corporate training characters triggering information
  • Brand ambassadors giving out promo codes
  • University tour guides sharing information
  • And more! 

How this fits into our Character Brain

Goals and Actions are part of the Inworld Character Brain. Our Character Brain is one of the three main layers of our product. Its focus is on the character's personality with the goal of heightening immersion and establishing deeper connections with a character. 

Inworld’s AI characters use 30+ multimodal AI models to replicate comprehensive human interaction, encompassing both spoken and unspoken forms of communication. This includes vocalizations, body movements, facial expressions, and gestures.

Our Character Brain includes these key features: 

  • Personality
  • Emotions
  • Real-Time Voices
  • Goals and Actions
  • Long-Term Memory

See it in action

Curious? Try setting up Goals and Actions triggers in Inworld’s studio. Or learn more about how best to use Goals and Actions in our documentation

Stay connected

Get the latest updates, events, and offers from Inworld.