13 Mar, 2010, Bojack wrote in the 1st comment:
Votes: 0
Im trying to get ideas on how to go about making a new interpreter that will take a persons sentence and key words within that sentence will cause an action. For instance:
A quest is over, mob gives you a wish of your choice, player says I wish for custom equipment or I wish for immortality then it takes a keyword out of that and does the wish. Now that one is simple but im talking bout more complex like I wish for this person to have custom equipment with yellow colors. Also what im going to do is save everyone's wish to a file and have it loop through the file to see if that wish has been done before and itll pull out those key words to do a wish. Ive seen a c++ game do this just not a mud. Anyone have any ideas of how to go about this? Or has it been done?
13 Mar, 2010, Deimos wrote in the 2nd comment:
Votes: 0
This might interest you. Shrug.
13 Mar, 2010, Runter wrote in the 3rd comment:
Votes: 0
Well, if you're constantly scanning over possible commands from communication from the player it becomes a little more difficult.

You're going to want to tokenize the sentence into things your parser can understand easily. Many times in these types of parsers they ignore undefined tokens.

And easy way you can start is by making it understand the most simple commands possible.

For example:

"Give me coins."

"You give me the coins that I deserve."

"Give Bojack helmet."
"You should give bojack the helmet."

You should build on simplicity. You're not going to be able to write a parser in any practical amount of time that really understands English.
0.0/3