A Modular Framework for LLM-Driven NPCs in Skyrim
This master's thesis examines the design and evaluation of a modular generative architecture for LLM-driven non-player characters (NPCs) in video games.
Irfan Pasha, Sofiia, 2026
Type of Thesis Master Thesis
Client
Supervisor Vonschallen, Stephan
Views: 1 - Downloads: 0
Traditional NPCs rely on scripted dialogue trees and rule-based behaviour systems, which constrain player interactions to designer-defined response sets and limit the adaptive potential of in-game characters. While large language models (LLMs) have demonstrated the capacity to generate contextually appropriate and believable agent behaviour, existing implementations lack a standardized architectural foundation, with each solution employing distinct memory mechanisms, prompt structures, and integration approaches. The gaming industry has for several years been affected by advances in generative AI, and NPCs in particular represent a domain with correspondingly large potential for transformation through LLM integration.
With the help of a qualitative within-person comparative user study with nine participants, it was possible to evaluate a parsimonious prototype of the proposed GENPC framework (Generative Cognitive Architecture for Non-Player Characters) implemented in The Elder Scrolls V: Skyrim. GENPC is organised around five core modules - perception, memory, intent generation, dialogue, and action execution - and is designed to be game-agnostic. Empirical data from semi-structured interviews were analysed using qualitative content analysis following Mayring (2014). It was found that participants in the GENPC condition perceived the NPC as more interactive, companion-like, and immersive than the scripted baseline, with relational presence — the sense of being noticed and accompanied — emerging as the primary driver of this difference. However, it also became apparent that the comprehensive memory module, while fully developed within the codebase, was not actively integrated into the live orchestration loop, leaving long-term memory continuity unevaluated during active gameplay.
This area of real-time memory integration and speech-based interaction modalities represents a potential future field of research. The extent to which persistent memory and voice synthesis can be incorporated without introducing engine latency remains open at the time of completion of this work. Broadly, however, it can be noted that moving towards modular generative cognitive architectures for NPC design is going in the right direction and should be advanced further, as the boundaries between scripted game narrative and adaptive AI-driven interaction will continue to diminish and make frameworks such as GENPC increasingly relevant.
Studyprogram: Business Information Systems (Master)
Keywords
Confidentiality: öffentlich