Try Inworld
Request a Demo
Try Inworld

Dynamic character mutations: Influencing player engagement with AI NPCs who transform during gameplay

Nathan Yu
Nathan Yu
November 30, 2023
Related posts
Want to try Inworld?
Get started

Character arcs actively enhance the depth and richness of storytelling by showcasing personal growth, transformation, and struggles of characters. In video games, players actively invest themselves in the development and evolution of characters, forging a stronger connection with the game world and developing a deep attachment to their journeys.

In scripted games, characters often follow a ‘flat character arc’ style of storytelling; a predefined storyline and progression, with limited room for players to influence the characters' development. But what if characters could evolve during gameplay?

Influencing player engagement with evolving NPC character arcs

Inworld's new Mutations function enables game creators to dynamically trigger changes to NPC personalities and behavior at runtime. This feature allows players to witness the transformation and growth of these characters in response to their actions. It creates an immersive and engaging gaming experience where NPCs adapt and respond to the ever-changing game environment, enhancing player engagement and creating memorable gaming experiences.

How does it work?

Mutations is a function within the Inworld Goals and Actions system. Creators can now leverage ‘Actions’ in the YAML to orchestrate any change in character attributes and descriptions when the custom activation conditions are met. The character logic can be input using the fields, which can be configured through client-side Triggers or Intents.

The following types of scenarios can be created using the Mutations function:

  • Your character's motivations can change based on the scene and player progression.
 - name: new_planet
1    activation:
2      intent: ship_docked
3    actions:
4      - character_changes:
5          set_motivation: "{character} wants to establish a base on the unexplored planet they've just landed on"
  • Your character can speak differently based on who they are speaking to or how they are feeling.
- name: player_knighted
1    activation:
2      trigger: player_knighted
3    actions:
4      - character_changes:
5          set_custom_dialogue_style:
6            set_adjectives:
7              - "respectful, loyal, admiring"
8            set_colloquialism: "phrases for addressing medieval nobility"
9          set_personality:
10            aggressive_peaceful: 6
11          set_mood:
12            disgust_trust: 8
  • Sets of common knowledge can be enabled or disabled based on where the character is located or based on the state of the game.
 - name: victim_one_identity
1    activation:
2      trigger: victim_one_unlocked
3    actions:
4      - character_changes:
5         enable_common_knowledge:
6           - "f1603f52-a2ac-4823-8d22-d0641336d1f3"
  • A new character flaw could be added after a certain event occurs in a game.
 - name: flaw_exposed
1    activation:
2      intent: espionage
3    actions:
4      - character_changes:
5         set_flaws: "{character} starts babbling incoherently if {player} confronts him about the espionage"
  • Creators can mutate player profile variables to give updated information about the player to Inworld characters. This can be done in tandem with changing dialogue style and the player-character relationship. (E.g. New player warrior status triggers 'villainous' dialogue style in character and sets new relationship status to 'enemy')
 - name: status_warrior
1    activation:
2      trigger: status_warrior
3    actions:
4      - character_changes:
5         set_profile_variables:
6           - id: "status_level"
7             value: "warrior"
8         set_dialogue_style: VILLAINOUS
9         set_relationship: ENEMY

Transforming player engagement

Dynamic character evolution transforms how players perceive and engage with NPCs. More dynamic and lifelike characters mean players will develop a deeper sense of connection and investment in your game world as their actions and choices directly impact the people, aliens, or elves they encounter.

See it in action

Interested in trying Mutations for yourself? Create a character in Inworld’s studio and or check out our docs to learn more.

Stay connected

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