NPC's
#1
Posted 13 January 2006 - 02:32 AM
#2
Posted 13 January 2006 - 07:36 AM
Text.
That's right. Text.
In the manner of an oldschool dungeon game.
Go east.
You see a door to the north. There is a passage east. There is a Zorkmid on the floor.
Take the Zorkmid.
You take the Zorkmid.
Unlock the door with the key.
You unlock the door with the key.
Except more like this:
Hello.
Hello. How are you?
Fine, you?
I do not understand the question.
Nevermind. How do I get to the castle of the dragon-king?
I do not understand the question.
The castle of the dragon-king
The castle of the dragon king is a scary place.
How do I get there?
Get where?
The castle of the dragon-king.
The castle of the dragon king is a scary place.
Bah. I'll find it myself.
I do not understand the question.
Admittedly, there are some flaws. I've been thinking though. Do the words have to be in sequence? I'm thinking there would be key words in the sentence of the user that would be searched for (that sentence was really awkwardly put together). By that I mean... One main question word, quest names, greetings etc...
So the speech engine would, in the following case, search and find the following words:
Where is the castle of the dragon-king? ===> "where", "castle of the dragon-king"
Thus the NPC would respond and say "The castle of the dragon-king is the third door on the left."
Examples of words in the standard speech-search at a point like this:
"hello" ==> "Greetings, kind sir(mam), the day is young, the air is fresh, and you are standing on my flowers."
"who" ==> If this is found, stick it with other possible nouns to make the following:
"you" ==> If this is found with "who", then the NPC would say: "I am the good Sir Tankard, and I am the proprietor of this humble tavern."
Example line of code:
if "where" and "castle of the dragon-king" then print "The castle of the dragon-king is the third door on the left.";
if "where" and "lavoratory" or "lou" or "can" or "crapper" or "toilet" or "bathroom" or "washroom" then print "Oh, don't even ask. It's being guarded by Ivan the Terrible Body Odour Gnoll.";
This allows for a lot more freedom. It may take more work, but for the most part it is just copying and pasting, changing a few words and their responses, for example the multiple hot-words for "bathroom". I would recommend the speech engine stops searching after 4 words, meaning it ignores the rest of the sentence. If there are multiple hot-words which conflict ("how who what are dragon-king excretement?"), the NPC would respond like any human ("Excuse me sir, you seem to be suffering a stroke, because I really can't understand you.").
I think this method would nest easily in the normal chat arrangement (ie. the NPCs would show up as bots that speak or something, and the player can initiate a private chat with any of them, and this would allow multiple players to talk to one NPC), and it would also be a lot freer and interesting. Other possibilities to be explored are searching for words not only as they are spelled, but phonetically too (wur ist der kassle of der draygun-king, any of which can be substituted for the real words etc).
Indeed.
sum day ill eat ur cat ricko...
#3
Posted 13 January 2006 - 12:38 PM
#4
Posted 14 January 2006 - 05:40 AM
#5
Posted 14 January 2006 - 08:50 AM
#6
Posted 14 January 2006 - 04:45 PM
Well, I'm thinking there could be one main repository of responses that everybody says, for example "You leave my mother out of this!" and such. Then each individual npc could have their own vocalizations for their specific tasks. This would prevent overlap.
Also, to keep up with user interests, you could program it to record every use question that returns the "I do not understand the question" into a secondary file. Every once in a while someone could quickly skim through this file, root out the reasonable ones and add new rosponses or new key words for old responses.
Thinking more on the one main "repository" of responses, there could be several which target specific npc character types and behaviors. For example, there could be "male specific", "female specific", "rude", "quest *.*", etc.
There would also be multi-layered conversations, where the npc would search for only certain words, and respond again. "Help!"; "What do you need help with?"; "My hair."; "How can I help you with your hair?"; "You can give me a freaking perm, you stupid idiot npc."; "I'd love to give you a perm, Please have a seat."
Or something. Hm.
sum day ill eat ur cat ricko...
#7
Posted 15 January 2006 - 01:14 PM
#8
Posted 16 January 2006 - 05:26 PM
Btw, i'd like to just say how refreshing it is to see decent spelling and grammar
Don't post here ever again.
#9
Posted 17 January 2006 - 03:26 AM
Yeah, it occaisionally happens on the net. Just not very much!
#10
Posted 17 January 2006 - 07:38 AM
I had the idea that if two people were talking to the same NPC, they would both have their own private insulated conversation, and possibly extend that to the local area chat (however that goes) by printing out the responses. So the conversation actually all occurs on the client, and is then dumped to the server. Just like normal user actions.
sum day ill eat ur cat ricko...
#11
Posted 17 January 2006 - 04:23 PM
The second part is a good idea but leaves room for the players to screw with things. There was a problem with Deloria and someone haxoring it. I will be implementing things to stop that but still better to be safe than sorry. It may be possible if I split the server like I want to but yeah anyways, we'll see what happens!
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users