Personalized Quest and Dialogue Generation in Role-Playing Games: A Knowledge Graph- and Language Model-based Approach
Authors
Title of the Paper
Personalized Quest and Dialogue Generation in Role-Playing Games: A Knowledge Graph- and Language Model-based Approach
Bibliographic Information
- Subject Area: Procedural content generation in video games, specifically dynamic quest and dialogue generation in role-playing games (RPGs)
- Keywords: Procedural content generation, mixed-initiative co-creativity, natural language processing, knowledge graph, GPT-2, large language models, NPC dialogue, role-playing games, dynamic quest generation
Research Background and Problem Statement
-
Identified Problems or Challenges:
- Traditional methods for generating video game content fail to dynamically adapt to changes in game state, narrative, and player input.
- Existing approaches often rely on rule-driven deterministic processes, lacking direct responsiveness to player input, while neural network-driven content generation risks producing inconsistent or logically incoherent text.
- Standardized quest generation methods struggle to provide personalized player experiences, which can diminish immersion and player engagement.
-
Significance of the Research:
- Quests are a key component of narrative and world-building in role-playing games. Generating dynamic content that responds to player needs can enhance the gaming experience.
- Optimizing quest and NPC dialogue generation can improve replayability, player immersion, and engagement.
-
Motivation and Related Work:
- The study draws inspiration from the Mixed-Initiative Co-Creativity (MI-CC) framework, focusing on combining player input with the current game world state to generate content that is both personalized and consistent with the game world.
- Unlike previous research that has attempted to generate quests or dialogues separately, this study proposes a framework that tightly integrates quest generation with NPC dialogue generation, aiming to broaden the applicability of the approach in game development and enhance player interaction.
Solution
-
Proposed Method or Solution:
- A combined approach based on knowledge graphs and large language models (e.g., GPT-2):
- Knowledge graphs encode entities in the game world and their relationships.
- Player input serves as the initial trigger condition, and a semantic similarity algorithm on graph nodes determines the quest seed.
- The GPT-2 language model generates NPC dialogues related to the quest.
- Context-Free Grammar (CFG) templates are used to generate quest descriptions, which are then populated with specific content using information from the graph.
- A combined approach based on knowledge graphs and large language models (e.g., GPT-2):
-
Innovations:
- Integration of quest generation and NPC dialogue generation to provide players with personalized quests and unique dialogue content.
- Introduction of an automated dialogue evaluation metric based on lexical co-occurrence, quantifying the relevance of dialogue to the quest to assess content quality.
- Combining language models with knowledge graphs to enhance narrative consistency while enabling players to act as co-creators in the quest generation process.
-
Implementation Steps and Key Techniques:
- Players interact with NPCs via free text, and the system analyzes the semantics of player input using cosine similarity to select the most relevant knowledge graph path.
- Based on the graph path, templates generate quest descriptions, and the GPT-2 language model generates quest titles and related dialogues.
- The proposed quests are evaluated through human assessments and automated normalization metrics to validate the overall effectiveness of the framework.
Research Outcomes
-
Specific Achievements:
- Human evaluations indicate that the generated quests and NPC dialogues are comparable to handcrafted content in terms of fluency, coherence, novelty, and creativity.
- The generated content responds to player input and aligns with the game world state, significantly enhancing the game's dynamism and personalized experience.
-
Advantages over Existing Solutions:
- Substantial improvement in the system's ability to dynamically respond to player input while maintaining consistency with the game world.
- Dynamic quests significantly improve immersive gameplay experiences and overall player satisfaction compared to static quests.
-
Experimental or Evaluation Results:
- To measure the relevance of generated dialogues to quests, a normalized lexical co-occurrence score was introduced. Experiments showed that the relevance distribution of generated dialogues was close to that of handcrafted content.
- User satisfaction surveys revealed that, compared to randomly generated and traditional quest designs, the system-generated quests excelled in responsiveness and creativity.
-
Limitations and Future Directions:
- Additional information generated by the language model sometimes lacks corresponding entries in the knowledge graph, potentially disrupting player experience.
- The framework heavily depends on the scale and quality of the knowledge graph, with current tests using a manually constructed small-scale graph.
- The platform currently does not support sustained conversations; future work should extend the system to support multi-turn dialogues and personalized NPC dialogue generation.
- Further research is needed to address social biases and potentially harmful outputs from language models, improving the system's safety and fairness.
Conclusion
This study proposes a novel framework for quest and dialogue generation driven by knowledge graphs and supplemented by GPT-2 to enhance detail and interactivity. Experiments and human evaluations demonstrate that the framework significantly improves user engagement and immersion, providing a valuable reference for future fully dynamic, mixed-initiative game narrative generation.
Research Questions / Practical Problems
Question signals indexed for this paper.
Research Questions
3- How can knowledge graphs and LLMs be combined to generate dynamic, personalized game quests and NPC dialogue?Category: NPC Dialogue and Character Interaction in XRSimilar questionsarrow_forward
- Can knowledge graphs improve consistency of generated content and better align it with game world state and player input?Category: NPC Dialogue and Character Interaction in XRSimilar questionsarrow_forward
- How can the quality of generated quests and dialogue be evaluated and ensured comparable to hand-crafted content?Category: NPC Dialogue and Character Interaction in XRSimilar questionsarrow_forward
Practical Problems
1- Players in role-playing games often feel quests and dialogue lack personalization, reducing immersion.Category: NPC Dialogue and Character Interaction in XRSimilar questionsarrow_forward
- 60%
Choosing to Help Monsters: A Mixed-Method Examination of Meaningful Choices in Narrative-Rich Games and Interactive Narratives
CHI '18· Role-Playing & Narrative Games +1
- 60%
Analyzing the Effect of Avatar Self-Similarity on Men and Women in a Search and Rescue Game
CHI '18· Identity & Avatars in XR +1
- 60%
Archaeological Gameworld Affordances: A Grounded Theory of How Players Interpret Environmental Storytelling
CHI '25· Role-Playing & Narrative Games +1
- 60%
Development of an LLM-Based Chatbot to Support Learnability in Stardew Valley: A Diary Study Approach
CHI '25· Human-LLM Collaboration +1
Based on Jaccard similarity of research subtopics & professions (≥60%)