This work proposes the implementation of a dynamic dialogue system between players and NPCs (Non-Playable Characters) using the Gemini 2.5 Pro model from Google AI as the central text generation tool. The objective is to demonstrate how LLMs can be integrated into commercial game engines, such as RPG Maker MZ, to create more natural, contextual, and immersive interactions, without the need for additional training. The proposed system employs hybrid architecture, comprising a JavaScript client plugin and a Node.js backend server, which is responsible for storing conversation context, managing player logins, and protecting the API key. Communication between the game and the model occurs via REST requests, with dialogue history and behavioral instructions sent in real time. The use of prompt engineering ensures narrative consistency and allows for customization of NPC behavior according to their personalities and roles within the story. The system is expected to reduce the limitations of traditional dialogue approaches based on dialog trees or FSMs, providing more expressive and adaptive responses.
O Computer on the Beach é um evento técnico-científico que visa reunir profissionais, pesquisadores e acadêmicos da área de Computação, a fim de discutir as tendências de pesquisa e mercado da computação em suas mais diversas áreas.