An LLM-Based Behavior Agent with Natural Language Personality Control
Enabling Trait-Driven NPC Decision-Making through Prompt Engineering
Received: 8 June 2025 | Revised: 7 July 2025 and 20 July 2025 | Accepted: 23 July 2025 | Online: 6 October 2025
Corresponding author: Jos Timanta Tarigan
Abstract
This study explores the use of Large Language Models (LLMs) for implementing personality-driven behavior in Non-Player Characters (NPCs) within games. A companion NPC leverages the OCEAN personality model to guide decision-making through natural language prompts, eliminating the need for traditional scripting or behavior trees. A stateless LLM combined with an automated prompt generator dynamically constructs context-aware prompts based on NPC traits, game states, and environmental factors. Implemented in the roguelike Rudantara RPG game, the companion NPC responds to gameplay conditions with behaviors aligned to its defined personality. The test results show that the system enables flexible and coherent decision-making and lowers the technical barrier to creating personalized behavior by allowing the player to interact using natural language instead of a complex behavior tree and scripting. Furthermore, to evaluate the decision-making process, participants with prior experience in RPG games were invited to play the prototype. Their responses indicated that the system was capable of simulating behavior aligned with the assigned personality traits.
Keywords:
NPC agent, Large Language Model (LLM), behavioral agents, game developmentDownloads
References
S. Ahriz, H. Gharbaoui, N. Benmoussa, A. Chahid, and K. Mansouri, "Enhancing Information Technology Governance in Universities: A Smart Chatbot System based on Information Technology Infrastructure Library," Engineering, Technology & Applied Science Research, vol. 14, no. 6, pp. 17876–17882, Dec. 2024.
S. Hu et al., "A Survey on Large Language Model-Based Game Agents." arXiv, 2024.
S. Abdelnabi, A. Gomaa, S. Sivaprasad, L. Schönherr, and M. Fritz, "LLM-Deliberation: Evaluating LLMs with Interactive Multi-Agent Negotiation Games," 2024.
L. M. Csepregi, The Effect of Context-aware LLM-based NPC Conversations on Player Engagement in Role-playing Video Games. 2021.
A. Isaza-Giraldo, P. Bala, P. F. Campos, and L. Pereira, "Prompt-Gaming: A Pilot Study on LLM-Evaluating Agent in a Meaningful Energy Game," in Extended Abstracts of the CHI Conference on Human Factors in Computing Systems, Honolulu, HI, USA, May 2024, pp. 1–12.
A. Marincioni et al., "The Effect of LLM-Based NPC Emotional States on Player Emotions: An Analysis of Interactive Game Play," in 2024 IEEE Conference on Games (CoG), Milan, Italy, Aug. 2024, pp. 1–6.
X. Peng et al., "Player-Driven Emergence in LLM-Driven Game Narrative," in 2024 IEEE Conference on Games (CoG), Milan, Italy, Aug. 2024, pp. 1–8.
S. Rao et al., "Collaborative Quest Completion with LLM-driven Non-Player Characters in Minecraft," 2024.
S. Rao et al., "Collaborative Quest Completion with LLM-driven Non-Player Characters in Minecraft." arXiv, 2024.
S. Värtinen, P. Hämäläinen, and C. Guckelsberger, "Generating Role-Playing Game Quests With GPT Language Models," IEEE Transactions on Games, vol. 16, no. 1, pp. 127–139, Mar. 2024.
A. Goslen, Y. J. Kim, J. Rowe, and J. Lester, "LLM-Based Student Plan Generation for Adaptive Scaffolding in Game-Based Learning Environments," International Journal of Artificial Intelligence in Education, vol. 35, no. 2, pp. 533–558, Jun. 2025.
K. Plupattanakit et al., "LLMs in Eduverse: LLM-Integrated English Educational Game in Metaverse," in 2024 IEEE 13th Global Conference on Consumer Electronics (GCCE), Kitakyushu, Japan, Oct. 2024, pp. 257–258.
X. Feng et al., "ChessGPT: Bridging Policy Learning and Language Modeling." arXiv, 2023.
S. Hu, T. Huang, and L. Liu, "PokeLLMon: A Human-Parity Agent for Pokemon Battles with Large Language Models." arXiv, 2024.
W. Ma et al., "Large Language Models Play StarCraft II: Benchmarks and A Chain of Summarization Approach." arXiv, 2023.
O. Topsakal and J. B. Harper, "Benchmarking Large Language Model (LLM) Performance for Game Playing via Tic-Tac-Toe," Electronics, vol. 13, no. 8, Apr. 2024, Art. no. 1532.
J. T. Tarigan, "Rudantara Supplementary Files," Google Drive. https://drive.google.com/drive/folders/1d57gxZDeydPgum47UbxDcy2jAJpvpP6R.
G. Liapis, A. Vordou, and I. Vlahavas, "Machine Learning Methods for Emulating Personality Traits in a Gamified Environment," in Proceedings of the 13th Hellenic Conference on Artificial Intelligence, Piraeus, Greece, Sep. 2024, pp. 1–8.
S. Noh and H. C. H. Chang, "LLMs with Personalities in Multi-issue Negotiation Games." arXiv, 2024.
L. J. Klinkert, S. Buongiorno, and C. Clark, "Driving Generative Agents With Their Personality." arXiv, 2024.
Downloads
How to Cite
License
Copyright (c) 2025 Jos Timanta Tarigan, Brian Wijaya, Avin Chaili Salim, Sri Melvani Hardi

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain the copyright and grant the journal the right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) after its publication in ETASR with an acknowledgement of its initial publication in this journal.