An LLM-Based Behavior Agent with Natural Language Personality Control

Enabling Trait-Driven NPC Decision-Making through Prompt Engineering

Authors

  • Jos Timanta Tarigan Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Indonesia
  • Brian Wijaya Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Indonesia
  • Avin Chaili Salim Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Indonesia
  • Sri Melvani Hardi Faculty of Computer Science and Information Technology, Universitas Sumatera Utara, Indonesia
Volume: 15 | Issue: 5 | Pages: 26827-26832 | October 2025 | https://doi.org/10.48084/etasr.12631

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 development

Downloads

Download data is not yet available.

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

[1]
J. T. Tarigan, B. Wijaya, A. C. Salim, and S. M. Hardi, “An LLM-Based Behavior Agent with Natural Language Personality Control: Enabling Trait-Driven NPC Decision-Making through Prompt Engineering”, Eng. Technol. Appl. Sci. Res., vol. 15, no. 5, pp. 26827–26832, Oct. 2025.

Metrics

Abstract Views: 3
PDF Downloads: 1

Metrics Information