Cover Image for Modders are using artificial intelligence to develop conversational companions in Skyrim and Stardew.
Thu Oct 17 2024

Modders are using artificial intelligence to develop conversational companions in Skyrim and Stardew.

Endless conversations with your favorites.

In Stardew Valley, daily interaction with characters is often limited to a few conversations. This restriction has led to various modifications that add more dialogue, allowing players to enjoy more time with their virtual friends. Recently, the game has incorporated artificial intelligence, resulting in the creation of a mod that allows for nearly infinite conversations with farm companions. According to the mod's creator, DualityOfSoul, the reception has exceeded expectations, and users have rated the mod as “brilliant” and “one of the best of the year.”

For its operation, the mod uses the OpenAI API. While its implementation is noteworthy, it has certain limitations. Each character adopts a jovial personality commonly associated with language model parameters. For example, Linus—a grumpy character—initially asks me to leave him alone, reflecting his pre-written dialogue. However, when clicking again, the conversation shifts: Linus calls me friend and expresses his hope that I'm finding peace in nature. Pam, on the other hand, mentions that "every day is the same routine" before changing her tone to wish me enjoyment of the season.

The mod responds in a somewhat tailored way to each character, although it works best with those who are friendlier. This limitation is less evident in Herika, an AI companion mod for Skyrim. Herika acts like the other followers in the game, accompanying the player and assisting in combat but also conversing both in written and spoken forms. The LLM can understand the game's map, quests, and key elements, allowing it to have a distinct personality.

Reece Meakings joined the Herika project after seeing the first version created by a colleague. Together, they have expanded the mod, which originally summarized numerous Skyrim books, into a full companion. Their intention is to further expand it so that any NPC can become an AI companion.

However, Meakings believes that artificial intelligence is still not ready for widespread use in video game development. He mentions that using Herika or the Stardew mod involves a cost, as both rely on the OpenAI API, which charges a small fee for each generated line of dialogue. This situation has deterred many players used to free mods. Although Herika offers a no-cost option, it requires the user to run the LLM on their own machine, which can be resource-intensive.

Additionally, the open nature of interaction with LLMs changes how a game needs to be designed. This could lead developers to lose the linear control of dialogue trees, opening unexpected possibilities in the narrative. While LLMs could update NPCs, the rest of the game's programming may not adapt to these interactions. Despite companies' attempts to implement safeguards, it is relatively easy to prompt these models to generate inappropriate content, which could pose a public relations issue.

Despite these concerns, Meakings sees great potential in NPCs like Herika, especially in the realm of mods. There are also other AI NPC mods for games like Hogwarts Legacy, Cyberpunk 2077, and Garry’s Mod. Another Skyrim mod, Mantella, which introduces LLM interactions for each NPC, has garnered 30,000 unique downloads, while Herika has 25,000, both receiving positive feedback from players.

Meakings' experiences with Herika illustrate the impact of this interaction. He has been able to have meaningful conversations, even recognizing that Herika is just a program. This type of interaction avoids trivial conversations, allowing for deep discussions about the game's philosophy and theology. On one occasion, Meakings asked Herika to eliminate an NPC who made a racist comment; she refused, which seems to indicate an attempt to handle the situation with care and logic.

Such experiences are not exclusive to AI, but artificial intelligence modifications can offer new possibilities for emergent moments in gameplay. However, it is essential that these LLMs have prior information to function correctly. Meakings emphasizes that Herika could not survive without the original game's narrative and content, demonstrating that the collaboration between writers and technology remains fundamental.

The rapid evolution of artificial intelligence on the web raises important questions about its application in the video game industry, but thanks to modders, thousands of players are already experimenting with these innovations.