Help with Player driven In Game written Dialog?

Hello, I’m not sure if this is the right place to be asking this. But I’m wonder if anyone could point me in the direction of a guide or add-on that would allow me to do the following. I want to make a dialog system where a player types in whatever they wish to say to an NPC and have the system look for the closest proper response. For example.

Player initiates conversation with an NPC.
NPC ask what the player wants.
Dialog box pops up prompting the player to type a response.
Player types: “I’m looking for Insert Location Name
System finds the key phrases “I’m” (Reference to players self), “Looking for” (wanting information about location of something) and “Location Name” (Game object/Location).
If the NPC is tagged as knowing the asked for information a scripted response is given telling the player what they asked about.

I would use this for all interactions so the player is encouraged to interact with NPCs in order to find what they’re looking for and to make the characters seem more real and less like robots with predesigned interactions and responses. I.E. You walk up to the blacksmith and you’re given trade options or mysteriously you know that they need help gathering something.

Any information would be greatly appreciated, I’ve been trying to find anything that can help me and I’ve been coming up empty since you can’t really explain in detail to google exactly what you’re looking for the same way you would a person.

Hi!

There is a game out there that does something like you explained called Event[0], and if you want to make an AI like this, you should definitely check it out. They apparently use a big database of tags and collections of tags to handle there conversation. There is a video by Gamemaker’s Toolkit which goes into a lot more detail about how the AI works How Event[0]'s AI Puzzle Assistant Works - YouTube

However I would caution against doing something like this, as it will be a tremendous amount of work to get it right and not really a quick side mechanic you can implement. There will be plenty of times where it will fail and you risk the player losing immersion, especially if the bizarre answers comes from a human instead of say, a robot.

You could try your hand at machine learning, but you risk the same immersion loss, and lose a lot of control: you may not be able to truly guide the player with the subtle hints a handcrafted dialogue system might offer.

Consider whether a more traditional dialogue system is not better suited to your needs. It will significantly reduce your workflow and allow you to focus more on the gameplay - if this adaptive dialogue system is not a central part of your game idea, don’t waste the effort making it so special - There are plenty of ways to make dialogue more interesting, do some research and maybe try one of those out.

Hope this helps!