Hello everyone, I wanted to ask how to make it so that an npc response to you talking to them. Like you say Hello (NPC NAME) and they respond with hi (Player Name). And is it possible to have a basic conversation with them. You can ask How are you and they say how they are feeling or whatever. I just want to know if it's possible to have an actual conversation with an npc as if your talking to a person and if so then how do I get started.
1
2
ID:1738971
|
|
Dec 14 2014, 12:05 pm
|
|
do you mean like type in something and send it to them and they respond ?
|
Dayvon64 wrote:
Is it possible to have a basic conversation with them? Yes, it is. If so then how do I get started.Really matters on how advanced you want it, though I believe something along the lines of this would work. (I'm not too good at DM, just thought I'd take a swing at this. I'm sorry if I gave you the wrong information but I think it should work. I have tested it and it worked for me) mob |
What he wants would have to be done in the OOC/Say proc/verb. A simple way I could think of is use findtext when a NPC is in view and if the name matches the name you say (If the NPC is in view) it responds back. It would just be a lot of if statements.
I'm guessing. |
1) was that code example not correct because I wanted to try it
2)I wanted to have the npc sort of like a small pixe so like it floats above you or whatever and when ever you say like Hey (name of the pixe) or something along those lines. So my worry is would I have to prest sentences for it to say and also could i make it so that it can only be in say. Like pixie is in inventory you take pixie out so that it floats visibly next to you. And you can just casually say Hey(Elfon) how are you feeling. and the pixie says I'm bored let's have some fun. Or like Hey(Elfon) what should we do and he says let's fight or something else. Also I would like to have it so that others can talk to it aswell. I hope this all makes sense |
mob/verb or if they only have availabe 1 fairy: mob/verb I didn't test this before giving it to you but I think it should give you what you want. |
In response to Ganite
|
|
The issue with your snippet (not to say that it's bad or anything) is that it doesn't account for the absolute complexity nightmare that the thread's author is asking for. Any changes in punctuation, capitalization, spelling, or phrasing will cause this to fail. You'd have to say the phrase exactly as it was programmed in.
The alternative of course is... well, a rather complex system of parsing and understanding what the player is saying, weighing words to determine the proper response. I believe this field is natural language processing. |
In response to LordAndrew
|
|
Figured, I was just trying to give him a way (only way I know). But if he can't figure out the more complex way he will have to resort to this method and make it clear to players. Or an alternative he could just make code words/phrases just for the spirit to make my way work more efficient.
|
Ganite I like your way and I will certainly resort to it, but you know I would like a bit more complex and I won't stop looking for that way. Which is why I need you guys help. Either way I might just use this instead because it's awesome as heck.
|
In response to LordAndrew
|
|
Which is why games that offer dialogue exchange usually force you to choose from a list of dialogue options and in return, you get one of a select few responses.
|
So I tried to enter the code Granite sent the last one that says 1 fairy and it said that comma was missing. Why do I do?
|
Honestly this sort of thing would take massive amounts of effort. No one will help you on this one, this will have to be done on your own. Speech can be as complicated as 20 lines of code as shown above to hundreds which the later is what it sounds you want
|
but i think a good talking mechanism is what bioware games have. You have a wheel and a choice of select phrases that you must select. This is probably the best way to get it done
|
1
2