Author Topic: make NPC Dialogs easier and more realistic  (Read 2066 times)

Sisilam

  • Traveller
  • *
  • Posts: 38
    • View Profile
make NPC Dialogs easier and more realistic
« on: March 21, 2006, 07:21:03 pm »
So how to get an NPC act more realistic ind still get it easier?

So the main problem on the Dialogs is to figure out the correct keyword or keysentence.
In fact that people all over the world are playing that game it is quite difficult to get it sometimes. In natural spoken language someone will understand me even if I misstyped a key or changed the lexical order.

So it doesn\'t realy matter if I say:

1. \"Have you a quest?\"
2. \"Do you have a quest?\"
3. \"Do u have a kest?\"

In the sentence 3 a natural speaker would correct me and ask: \"Do you meant \'quest\'?\".

Ok .. one goal is that NPCs will give more detailed feedback as shown above. So if It sounds like the Keyword the NPC will reask the Player if he meant that.

So how it may be implemented? There is a function called SOUNDEX (see http://en.wikipedia.org/wiki/Soundex) which is even included in MySQL. This function reduces words on there phonetic description into Soundex Tokens.

So as example the word \'Holy\' and \'Holly\' will both result in the Soundex Token \'H400\'

That does not mean that the player has to type in the Soundex! Instead the client will transform the typed dialog into a list of Soundex Tokens. That Soundex Tokens will be send to the server who will prrof it with the keywords in the Quest.

Player \'Holly\' -> Client \'H400\' -> Server \'H400\'=Soundex(\'Holy\')

Maybe a more detailed example:

1. Player typed in:
\'Allover I forgot, Bjorid is realy in need of some blue dye\'
2. Client transforms that with Soundex into:
\'A416 I000 F623, B263 I200 R400 I500 N300 O100 S500 B400 D000\'
.. where XxXx may be the keywords ..
3. Server prechecks for the Soundex Keys
Found: B263, N300, D000
4. Server rechecks if also the regular Words in the sentence
Found: Bjorid, need, dye
5. Server goes into next Quest state

So what happens on misspelling?

1. Player typed in:
\'Biorid realy nied some blue dye\'
2. Client transforms that with Soundex into:
\'B263 R400 N300 S500 B400 D000\'
.. where XxXx may again be the keywords ..
3. Server prechecks for the Soundex Keys
Found: B263, N300, D000
4. Server rechecks if also the regular Words in the sentence
Found: dye
Failed: Bjorid, need
5. Server let the NPC reask both words:
\'You mean Bjorid need something?\'
6. Player may type the sentence correctly again
..

So what happens if even soundex failed?

1. Player typed in:
\'Allover I forgot I need some blue\'
2. Client transforms that with Soundex into:
\'A416 I000 F623 I000 N300 S500 B400\'
.. where XxXx may again be the keywords ..
3. Server prechecks for the Soundex Keys
Found: N300
Failed: B263, D000
4. Server let the NPC reask including found Keyword:
\'Who need what?\'
6. Player may type the sentence correctly again
..

So it\'s more like a dialog then a bubbling of monologues where the player hopes he might have typed the correct one.

Maybe to prevent to big data packages the client can remove the keywords like \'I=I000\' before sending the data to the server.

If the sentence is still to long the NPC might answer with \'Please don\'t use such complex sentences\' which in that case is also a good hint for the player to use more simple sentences!
« Last Edit: March 21, 2006, 07:24:46 pm by Sisilam »

Falzaek

  • Hydlaa Resident
  • *
  • Posts: 53
    • View Profile
(No subject)
« Reply #1 on: March 21, 2006, 11:20:12 pm »
I like this. We all know the NPC\'s need revision in this area,and this seems like a simple idea. One question, what\'s the bandwidth consumption like?
If I had a little wheelbarrow I could...
Respect D&D, the ganddaddy of RPG\'s. If possible or practicle, offer weekly sacrifices of lamb, goat kids or unwanted childern bi-monthly to it. It is god. It gave thouands of us unwanted hope in a new life. It will Return!

derwoodly

  • Hydlaa Notable
  • *
  • Posts: 539
    • View Profile
(No subject)
« Reply #2 on: March 25, 2006, 09:31:20 pm »
Yes!

I my humble opinion this much more important to game play than new monster loot.  And even more important than new death ream NPC\'s.

Deathbrush

  • Wayfarer
  • *
  • Posts: 1
    • View Profile
(No subject)
« Reply #3 on: March 29, 2006, 12:38:27 pm »
I don\'t think bandwith would be much of an issue with a couple client side flags to check against.  Obviously this would only be in effect when an NPC is selected, but there should also be a cap on the number of words or there could be the equivalent of a DOS effect with a rediculously long string being passed, this brings up my concearn though, how much server side processor will this take?  The best way to cut down on that would be to array a different set of values for each npc, since they would be relatively tiny arrays I don\'t think it would take up to much resident and would cut down on processor consumption since you could eliminate large chunks of data with a simple comperison, plus it wouldent have to rededicate any memory since multiple client requests to the server could pull from the same array.

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
(No subject)
« Reply #4 on: March 29, 2006, 03:18:04 pm »
Great idea, except that the devs are already working on it.
http://wordnet.princeton.edu/

You should check the CVS now and then, it\'s got some useful info.
http://cvs.sourceforge.net/viewcvs.py/planeshift/planeshift/docs/history.txt?&view=auto
« Last Edit: March 29, 2006, 03:21:36 pm by ThomPhoenix »
We're not evil. We're simply amazing.

mateuszzz

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
(No subject)
« Reply #5 on: April 10, 2006, 08:41:39 am »
I have another idea, I think even easer. In almost all cRPG games you are shown different options to say. If something like this is not easy to make, or you just don\'t want to do that, it would be nice to add \"/whattosay \" command returning sentences possible to understand by this NPC you are talking to.
example:

/whattosay Harnquist
*hello
*who are you
*give me a quest
*\'Spine will know it\'
*wonderful weather, isn\'t it? //maybe in the future ;-)

WHY:
1) some players don\'t speak english very well as they are foreiners (I\'m for example Polish). In most games i use dictionary and somehow manage to play. But it\'s a way harder to guess what sentence will be accepted by NPC.
2) in real life (and Planeshift is to be realistic, isn\'t it?) nobody cares whether you say \"Bjorid needs dye\", \"I need blue dye for Bjorid\", \"You forgot to give Bjorid a blue dye\"... and so on. Knowing exactly what to say nobody would spend hours trying to guess.

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
(No subject)
« Reply #6 on: April 10, 2006, 08:48:17 am »
Never an option. Knowing exactly what to say destroys the RP element of NPC interaction quite thoroughly, and they become pure machines instead of possible real people to interact with. Such suggestions have been made numerous times in the past, but they will never be taken. Feel free to read previous threads :)
Judge: Are you trying to show contempt for this court, Mr Smith?
Smith: No, My Lord. I am attempting to conceal it.

neko kyouran

  • Guest
(No subject)
« Reply #7 on: April 10, 2006, 08:53:18 am »
@ mateuszzz:

This has been suggested before, and it has been decided against for for many reasons.  The main one that sticks out in my mind, is that I think something like that takes away from the whole experience of the immersion you are supposed to be able to do.  you\'re not just a player that made a character, you\'re a enki, kran, etc, living in this world and you must interact with your surroundings.  

It is easiest to just give options yes, but wheres the fun in that?  The speech er tect recognition coding is improving tredmondously so if you are patient, the npcs will be albe to hold a conversation with you like you would with another player soon (tm).  Personally, I don\'t mind waiting.  I tried for 3 weeks to figure out the magic sentance I need to say to a certain someone for a certain quest and I have tried every possible thing I can think of bu tno luck so I\'m just waiting and doing other things in the meantime.  Patience is virtue.

Edit: note to self, not to leave your screen to actually work while at work while in the middle of a post or Miss K will come along and you\'ll finish your post and find out the question has already been responded to. X-)
« Last Edit: April 10, 2006, 08:55:28 am by neko kyouran »

mateuszzz

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
(No subject)
« Reply #8 on: April 10, 2006, 05:38:47 pm »
I would find it more interesting to have a talk with NPC rather than stop it every time I can\'t guess the correct \'magic sentence\'. So there is another method - make NPC able to understand different versions of one sentence - this will be time consuming for people who make scripts, but you must admitt that only then we can call talking interactive. What\'s more it would make long-talking quests real - have you ever played \"planeshift: torment\"? THAT was role-play game... there was fun in choosing the best possile answers (often one of five-seven, not the one-and-only \'magic sentence\'), as it affected the way NPC answered later. I know that is a lot of work to do, but making NPC more understanding would be a good start, wouldn\'t it?

Karyuu

  • Forum Legend
  • *
  • Posts: 9341
    • View Profile
(No subject)
« Reply #9 on: April 10, 2006, 06:00:32 pm »
You write as though we\'re completely ignoring NPC interaction and what we have now is the best we can do... :) Far from it. The plan right now is to use WordNet to allow more realistic communication - basically NPCs will have \"access\" to a dictionary for synonyms and hypernyms, making them more capable of understanding things no matter how a player may say it.
Judge: Are you trying to show contempt for this court, Mr Smith?
Smith: No, My Lord. I am attempting to conceal it.

derwoodly

  • Hydlaa Notable
  • *
  • Posts: 539
    • View Profile
(No subject)
« Reply #10 on: April 11, 2006, 06:46:45 am »
Currently, I would describe PS quest system as a hard core magic sentance style of NPC interaction.  By that I mean you are given almost zero hints as what to type in order to communicate with a NPC.  When the NPC\'s get smart enough to recognize several verants on a thiem it will be better, but still not Human like.

I would prefer NPC\'s give you some hints.  For instance If you get a \"I don\'t understand\" message three times in a row, the NPC should have a short \"you seem to be having trouble\" paragraph.  Something like \"I don\'t know what you mean, I am just a humble Blacksmith, I many fine weapons if your interested.  Or perhaps you can assist me with a problem I am having. [hint: type blah blah blah].\" I also thing typing help should give a similar sentance.

Nyramael

  • Hydlaa Resident
  • *
  • Posts: 103
    • View Profile
(No subject)
« Reply #11 on: April 11, 2006, 12:33:19 pm »
What about some sort of limit to the number of times that you can stay on the same point of a quest? Said simply, if you sit there saying something to an NPC and they don\'t understand you, after the 100 th or so attempt, you get the choice of seeing a hint or something about the \'magic sentence\'? That way people not 100% fluent with english can still enjoy the game, and people who do want the challenge of interacting with the NPC in a real-life way, don\'t get a spoiler. Perhaps put in a check as well so that people can\'t enter in \'asdfgh\' 100 times and get the hint then proceed?

Arangol

  • Hydlaa Citizen
  • *
  • Posts: 244
    • View Profile
(No subject)
« Reply #12 on: April 11, 2006, 12:41:32 pm »
100 times seems a bit too much, you know...clicking 100 times in the same thing and then get the hint for some small quest. Not that I don\'t want to interact with them. Maybe 20-30 times would be enough.
"The answer to all life's problems aren't on the bottom of a bottle, they're on TV!"-Homer Simpsons

Choose how the Klyros town will look like:
Klyros City Project
Klyros Names

mateuszzz

  • Wayfarer
  • *
  • Posts: 5
    • View Profile
(No subject)
« Reply #13 on: April 11, 2006, 10:03:28 pm »
@ derwoodly
I think you have a great idea - especially combined with Nyramael\'s one ;-) The way i see it: after typing simmilar sentences a few times in a row NPC would react giving a hint, but not a exact \'magic sentence\' (f.e. magic sentence to guess is \"I want to buy lamp fuel\", so NPC hints \"I don\'t fully understand you, but it seems to me you want to buy lamp fuel\"). After another twenty Nyramael\'s idea - give player option whether he wants to see exact sentence. Should they choose to see it, give them less experience (50% or something like this) for completing the quest. To prevent typing \"asdf\" and such \'sentences\' make script checking key words (for example \"Spine\" in thorian shield quest).
WHY:
*The player will spend some time trying to guess on his own
*People who play \'more realistic\' (no hints) will be awarded with more experience for quests
*You must admitt that interactive conversation can be achived only when both sides try to make a consensus - not only the alvie one ;-)

Nyramael

  • Hydlaa Resident
  • *
  • Posts: 103
    • View Profile
(No subject)
« Reply #14 on: April 12, 2006, 10:02:01 am »
I\'d like to add one thing that i found interesting. The script checking system seems to look for order and keyword. I managed to get over one hurdle in a quest dialog by simply typing out a sentence, and then around each word typing every varient of it i could think of. I also threw a few words at the end.

** EDIT: please delete if totally and utterly considered a spoiler **

[Deleted]
« Last Edit: April 12, 2006, 05:49:05 pm by Nyramael »