Table of Contents
Fetching ...

What if Red Can Talk? Dynamic Dialogue Generation Using Large Language Models

Navapat Nananukul, Wichayaporn Wongkamjan

TL;DR

The paper tackles dynamic dialogue generation in RPGs by integrating game-specific knowledge graphs with large language models to produce contextually rich and personality-consistent NPC interactions. It builds knowledge graphs from FFVIIR and Pokémon data, using KG triples and tailored prompts to guide GPT-4 in both in-battle and NPC dialogue scenarios. The study reports qualitative evidence that GPT-4 can imitate defined character traits and leverage knowledge graphs, while noting limitations such as over-positivity and uneven use of knowledge. This approach offers a path toward more immersive, knowledge-grounded dialogue in RPGs and provides a framework for evaluating character-consistent AI dialogue in game contexts.

Abstract

Role-playing games (RPGs) provide players with a rich, interactive world to explore. Dialogue serves as the primary means of communication between developers and players, manifesting in various forms such as guides, NPC interactions, and storytelling. While most games rely on written scripts to define the main story and character personalities, player immersion can be significantly enhanced through casual interactions between characters. With the advent of large language models (LLMs), we introduce a dialogue filler framework that utilizes LLMs enhanced by knowledge graphs to generate dynamic and contextually appropriate character interactions. We test this framework within the environments of Final Fantasy VII Remake and Pokemon, providing qualitative and quantitative evidence that demonstrates GPT-4's capability to act with defined personalities and generate dialogue. However, some flaws remain, such as GPT-4 being overly positive or more subtle personalities, such as maturity, tend to be of lower quality compared to more overt traits like timidity. This study aims to assist developers in crafting more nuanced filler dialogues, thereby enriching player immersion and enhancing the overall RPG experience.

What if Red Can Talk? Dynamic Dialogue Generation Using Large Language Models

TL;DR

The paper tackles dynamic dialogue generation in RPGs by integrating game-specific knowledge graphs with large language models to produce contextually rich and personality-consistent NPC interactions. It builds knowledge graphs from FFVIIR and Pokémon data, using KG triples and tailored prompts to guide GPT-4 in both in-battle and NPC dialogue scenarios. The study reports qualitative evidence that GPT-4 can imitate defined character traits and leverage knowledge graphs, while noting limitations such as over-positivity and uneven use of knowledge. This approach offers a path toward more immersive, knowledge-grounded dialogue in RPGs and provides a framework for evaluating character-consistent AI dialogue in game contexts.

Abstract

Role-playing games (RPGs) provide players with a rich, interactive world to explore. Dialogue serves as the primary means of communication between developers and players, manifesting in various forms such as guides, NPC interactions, and storytelling. While most games rely on written scripts to define the main story and character personalities, player immersion can be significantly enhanced through casual interactions between characters. With the advent of large language models (LLMs), we introduce a dialogue filler framework that utilizes LLMs enhanced by knowledge graphs to generate dynamic and contextually appropriate character interactions. We test this framework within the environments of Final Fantasy VII Remake and Pokemon, providing qualitative and quantitative evidence that demonstrates GPT-4's capability to act with defined personalities and generate dialogue. However, some flaws remain, such as GPT-4 being overly positive or more subtle personalities, such as maturity, tend to be of lower quality compared to more overt traits like timidity. This study aims to assist developers in crafting more nuanced filler dialogues, thereby enriching player immersion and enhancing the overall RPG experience.
Paper Structure (11 sections, 9 figures, 2 tables)

This paper contains 11 sections, 9 figures, 2 tables.

Figures (9)

  • Figure 1: An illustration example of LLMs-generated dialogue in Pokémon (Left) and Final Fantasy VII Remake (FFVIIR). Left panel: An unseen dialogue interaction in Pokémon, where Red selected his first Pokémon Bulbusuar. Right panel: A scenario from Final Fantasy VII where Cloud responds during combat.
  • Figure 2: An illustrative examples of our method using Final Fantasy VII Remake (FFVIIR) as a games example. The process begins with data collection, where character information is extracted from FFVII wiki pages. Subsequently, knowledge graph (KG) instances are generated using GPT-4 alongside predefined ontology concepts and relations, creating a game-specific KG. Finally, GPT-4 is prompted with actual game dialogue integrated with knowledge from the KG, enabling contextually enriched dialogue generation.
  • Figure 3: This figure demonstrates the conversion of a descriptive text about Sabrina, a character from the game, into RDF triples. Key attributes such as gender, outfit, height, and associated Pokémon are extracted and formatted as triples, showcasing the methodology for semantic representation of character information.
  • Figure 4: An illustrative example of the complete prompt for dialogue generation in FFVIIR battle. Cloud personalities and Scorpion Sentinel (boss) battle information in knowledge graph (KG) triples are provided and used to generate context-aware dialogue. The process involves considering a battle situation when Cloud is facing Scorpion Sentinel.
  • Figure 5: An illustrative example of the complete prompt used for dialogue generation. The character-specific information from a knowledge graph (KG) is converted into KG triples and used to generate context-aware dialogue. The process involves concatenating actual dialogue from Sabrina, the character with whom Red interacts in the game.
  • ...and 4 more figures