ChatGPT could be huge for in-game conversations with NPCs

Hotstar in UAE
Hotstar in UAE

ChatGPT is currently taking the world by storm, most recently because of both Microsoft’s and Google’s adaptations of the technology for search, but the possibilities of what the tech could be used for are much more vast, like say, conjuring up more contextually aware conversations with NPCs (non-player characters) inside of a video game.

Spotted by Hackaday, YouTube user Bloc designed a mod for Mount and Blade II: Bannerlord that utilizes ChatGPT to weave together conversations with NPCs. Here’s a basic (admittedly very basic) rundown of how the mod works. It lets Bloc ignore the game’s original response options and instead allows for user-generated text input. So, instead of selecting from a list of pre-generated responses, you can type out your own response.

Already this makes things feel more interactive. Because instead of using directional controls to highlight and select a response, you get to type one up. Just like you’re having a real conversation with someone over chat.

ChatGPT drives a custom story engine for conversations with game NPCs

The real magic comes in the form of ChatGPT driving a custom-built story engine to make the game NPCs more lifelike. NPCs are aware of their surroundings, including factions, occupations, nearby events, and more, and can “respond appropriately” to your responses while taking those conditions into account.

For example, at one point in the demonstration Bloc comes upon a farmer and asks if they sell grain. The farmer says yes, and then Bloc types back a response – “How much do you want for 1 pack of grain?” The farmer responds yet again, noting 1 pack will cost 7 denars. Bloc then responds one last time saying “Alright, give me 6 pack then. Here is your payment.”

A few moments later, Bloc receives 6 packs of grain in their character’s inventory. While 42 denars is deducted. All of this happens by simply having a conversation with the NPC. There is no opening and cycling through menus. Or clicking “buy” buttons. Everything just feels more like a realistic, natural transaction. To an extent. This is a still a game of course. The point is, ChatGPT has huge potential for making game NPCs way more interesting. Which could make games that much more exciting to play.

In addition to showing off trading capabilities, the video also showcases the story engine in various other interactions. Including normal encounters, recruiting, help requests, hiring companions, and more. You can give the video a watch below. Just be aware that because ChatGPT has been insanely popular, the AI tool, Bloc says, was overloaded much of the time. Making response times slow. Regardless of the wait times, the video is an interesting look at how ChatGPT could be integrated into gaming.

2023-02-11 15:05:54