Hello. First, I would like to congratulate and thank Mnemonic for creating and providing such an amazing tool. I've looked at some of the games that have been made with the engine and was very impressed.
I've had an idea for a game buzzing around in my head for a couple of years now. I started building it in flash, but ran into a brick-wall due to the limitations of flash. The main concept of my game revolves around a complex dialog system. At it's core, my game is going to be an adventure game, but dialog will play a much more significant role than any typical adventure game. Much of the gameplay will be advanced through the user talking to the NPC's via keyboard "chat".
What it amounts to, is that every NPC in my game is going to be a unique chatbot with it's own personality.
I've looked through the engine's documentation and it seems that it may very well be suited to my purpose as it supports arrays and seems to have functions for file I/O.
This is how it would work:
User Input (string) is analyzed and a proper response (if found) is given.
Example:
The PC initiates a conversation with an NPC, let's call him Bob.
PC: "Who are you?"
--> The npc's script searches the request file(array) and finds the proper response to the string "Who are you?" in the reply file(array).
Bob: "My name is Bob."
--> If the request "Who are you?" is not found, a canned response is generated, probably something like:
Bob: "What do you mean, "Who are you?"
-->(What do you mean, 'userinput') Where 'userinput' is the variable for the string the user typed.
Every unique NPC would have their own request file and reply file which would be called from their script when the PC initiates dialog.
I've written a little console app that allows you to "chat" with your NPC's and build their personality through typing in plain English rather than putting hundreds of strings in a stringtable.
The resulting files are structured like this:
Request file:
Who are you?
What is your favorite color?
Reply file:
My name is Bob.
My favorite color is blue.
The NPC's script would read the request and reply files and store the resulting strings in an array for requests and another for replies. Once the user enters a string, the string is analyzed and matched, then the proper response is generated.
If I can get this basic system working, I have plans to add variables for disposition, etc. that would determine what information an NPC would reveal to the PC.
I actually had the system working perfectly in flash, but flash doesn't have the file I/O that I need to save an NPC's personality once I have it developed.
Do you think that I could implement a system like this in WinterMute?