Return to “Suggestions”

Post

Communication with NPCs

#1
First suggestion thread ever. Wish me luck. :D

Introduction

How do you talk to NPCs? Can you talk to NPCs?

I really hope you can. It doesn't have to be complicated. As long as you can ask "What's up?", and get an answer actually coming from the NPC, I'm fine with it. This post will tell about my proposal. It operates on the ideas I have about how the NPCs think about information. It also is kinda like speaking the NPC's "native tongue".

Knowledge and basics

Knowledge, in my proposal, is handled using Set theory, and all communication and knowledge is saved in "Set Y includes X" -format. This should tie in well with the tag system. Added to this knowledge, there should be a measure of trust to the fact, and how long it was since the fact was saved (if applicable; you don't really need to know when you saw a planet being in the position it is).

Communication is done using nodal messages, describing "Set Y includes X"-relationships. They can also be queries, requests for information. NPC-NPC communication is done in exactly the same way as Player-NPC communication, NPCs understand what you're saying, and can react intelligently.

Interface and functionality

To send such message, you choose an NPC to send it to, by hailing a ship to open comms channel or choosing a one from your contacts list. Using communication systems and information lag are applicable. You will be brought to an interface similar to a smartphone's text-messaging interface, where you can easily see your dialoque history. There is an empty message shell there, ready to be filled. The shell has two "empty" nodes, the subject (the set) and the object (the member). They're able to be filled with proper nouns (a certain system or person) or more general sets and tags. The general tags are taken from a dictionary node, where you can search them by name.

When the node is found, it can be dragged to one of the empty nodes. If the node has possible parameters, new empty nodes will pop up from the origin node. I'm imagining for it to be very pretty. If you want to set the parameters, you put them in. Some parameters are required, and some are optional.

There are four nodes in the dictionary not able to be put in the empty nodes: Yes, No, Ask and Inversion. Yes and No are messages. Choosing it overdrives the entire other message with either positive or negative answer sentence*. Ask and Inversion are nodes able to be put in the message, but don't map to any empty nodes. Inversion changes the message from "Set X includes Y" to "Set X doesn't include Y". Ask makes the message a request for truth value of the message: "Does set X include Y?".

Another important node is the "What" -node which is used to ask anything other than truth values. Putting a "What" -node on an empty node means asking the receiver to fill it in. They have a bunch of parameters to filter the list.

You can put multiple objects and subjects in the same message, which combines them by "and" i.e. "Sets X and Z both include Y and W."

The messages should be able to be glanced over and get a general idea of the message easily.

*Positive answer sentence for "Does set X include Y?" is "Set X includes Y", negative would be "Set X doesn't include Y".

Examples

This section has example sentences and conversations to provide an idea about how to use the system.

"There is Viritium in Hodet asteroid field."
Subject (shortened to S from now on): Hodet asteroid field, Object (shortened to O from now on): Viritium

"What minerals are there in Hodet asteroid field?"
S: Hodet asteroid field, O: What (parameter: Mineral)

"Where (near me) can I find Viritium?"
S: What (parameters: max 4 jumps, zone(note: to prevent including stations and people)), O: Viritium

"Does Jack know there's Viritium in Hodet asteroid field?"
S: Jack, O: Knowledge (parameters: S: Hodet asteroid field, O: Viritium)
(Note: by using this, you could ask "Does A know that B knows that C knows... ?")

"Is there anyone near(in-system) us?"
S: Around (parameters: What: sender or receiver, how far: four kilometers.) O: Person, Ask-node (shortened to "?" from now on)

"There is no Viritium in Hodet."
S: Hodet, O: Viritium, Inversion-node (shortened to ¬ from now on)

[More examples to come]
Spoiler:      SHOW
Proposal

When communicating to NPCs, there would be a workspace for it. You essentially drag nodes together to form simple sentences. There would be two fields, "object" and "subject", a "What/X" -node you can copy and drag to the fields, question choice between Informative, Truth value, Subject and Object, a "not" -toggle, and a "send" button

There is [Viritium] in [Hodet asteroid field]. The asteroid field can be any zone, person or object (ship, station, an asteroid), and Viritium can be, well, anything able to be found there, whether it be an object, or an adjective/state like "damaged".

We'll go with the example. You want to tell an NPC that there is Viritium in Hodet's asteroid field. To tell an NPC that, you choose him/her from your contacts list, and click "Send message". You would be brought to the workspace/menu. Then you would split the screen, and in the other half, you'd search a node of Viritium, and bring it over to the "Object" field. Then you'd search for Hodet's asteroid field, and bring it to the "Subject" field.

Now, using only the nodal interface, you have created a message saying "Hodet's asteroid field has Viritium". Then you just press "Send", and you have told the NPC that. It understands, because it remembers stuff as simple "[subject] has/is [object]"-sentences.

Now, if you would want to ask "Is there Viritium in Hodet?", you would do exactly as detailed above, except that you would change "Question" from informative to truth value. The NPC would see it as a request for information. It may choose to send you an answer in the form "Yes" or "No", which would be their own special messages.

If you would want to find a place to find Viritium from, you would put "What/X" -node to the subject, and maybe specify it should be a zone, and/or near you. Then put Viritium in the Object, set question to subject, and send. The NPC could then answer "There is Viritium in Hodet, Okat and Reaka."

Are you with me so far?

Special

I used listing and specifications in the previous example. Listing is fairly easy: just drag more nodes to it. Specifications can specify the "What/X" -nodes. You could specify it as a zone, a person, an item or an object, its distance range from X and its "parent node" (a system, a faction).

For example, "Is there somebody from Faction X near us?" Would be [Subject]: Faction X, [Object]: "What/X" (Specific: max. 5 kilometers from "sender" OR "receiver", person), truth value. Actually, that is translatable as "Does Faction X have any persons near us?", which is the same thing. You could also ask: [Subject]: X (Area, max. 5 km from sender or receiver) [Object]: X (Person, in Faction X), truth value.

If you would want to ask "What's up?", it would be [Subject]: The receiver's plans/task(s) [Object]: "What/X", question: Object. "How are you?" would be the same, except for instead of plans, you would ask for the current emotional state.
Yes, it would not be natural language, but it's way better than dialogue trees.

How do you like it? :squirrel:

EDIT 3: Complete rewrite, added elegance and hopefully made the concept clearer.

EDIT: Fixed spoiler.
Last edited by Behemoth on Sat May 17, 2014 2:28 pm, edited 4 times in total.
In space, no one will hear you scream. #262626
I've never played a space sim. Ever.
Vos estis tan limes.
Post

Re: Communication with NPCs

#2
One thing that could help quite a bit here is indexed search auto-complete for variable fields. So a question pops up for you to fill in the blanks:

"Is there ______ in/near ______?"

When you begin typing in each blank, after you've typed "Vi," the only two options that come up might be "Viritium" and "Viagra," and you can select like you would from your phone or google. Repeat for the other blank. Makes communication much quicker, hopefully.
Spacecredentials: looks at stars sometimes, cheated at X-Wing vs TIE Fighter, killed a titan once.
Post

Re: Communication with NPCs

#3
I will admit, I'm a bit confused as to the whole mechanics of this, and it seems a bit time-consuming and difficult to use for the average mind. However, I can see the value of your suggestion, and perhaps there is a way to modify the suggestion to be more operable, or perhaps simply easier to use.

I will have to put more thought into it and re-read the original post several times until I understand this idea more fully, however what comes to mind for me, at least, is some sort of mass effect-esque looking tree, that while still somewhat related to a dialog line, could be expanded into one of Josh's beloved nodal UI diagrams. The idea of having to combine phrases to speak to an AI just seems very difficult to me.
“If more of us valued food and cheer and song above hoarded gold, it would be a merrier world.”
― J.R.R. Tolkien
Post

Re: Communication with NPCs

#5
I really love the general concept behind Behemoth's proposal. Seriously - NPCs are going to have their own sets of information that they know (or think they know), and it makes complete sense for NPCs to communicate information or requests among themselves and with the player. A way for the player to interact with NPCs in this fashion is something I regard as pretty essential.

I also like fatmop's modification to the idea, but I'd like to settle on a compromise between Behemoth's node-based implementation ideas and fatmop's "fill the gaps" idea: node-based fill the gaps. :monkey:

Every type of dialog you can initiate with NPCs will have a certain format or structure, and this will be defined as a general node-pattern. There will be certain gaps in this pattern which you can fill in with nodes. If we were to base dialog on a programming language like ViTheory, then you'd fill in the gaps with object nodes corresponding to entities in the world or wherever that you'd find by entering text into a search dialog (similar to what fatmop suggests). I give an example of searching, dragging & dropping object nodes in Customisable Mechanics:
Image (Direct link)

I'm not going to draw another diagram BECAUSE I'M BLOODY LAZY but as a short example, you could have a general node-based format for a dialog option like "Do you know where I can mine <<Ore type>>?" You'd get a node-based pattern with a single gap where a node can be placed, and you could fill that gap by using the search tool to find an object node corresponding to a type of ore (yes, in ViTheory even abstract things can be objects) - you'd then drag and drop this object node into the pattern. If it is a valid object node (in this case, a type of ore), it will be accepted into the pattern, and you could direct it at an NPC, you will reply to you in plain-text.

I'd also like to see NPCs take the initiative and open dialog with you, based on their particular needs/wants/plans at the time.
Last edited by ThymineC on Mon Apr 07, 2014 11:49 am, edited 4 times in total.
Post

Re: Communication with NPCs

#7
Cornflakes_91 wrote:
Zantai wrote:...is some sort of mass effect-esque looking tree...
this would most likely need more time than Behemoth's idea, as you have to jump to the always same hoops even if you want to ask something different, with the OP's idea you simply take what you need and thats it


I think I am misunderstanding Behemoth's Idea, although Thymine's evil ball-spider picture has made some sense to me.

Mostly, I am concerned about overcomplexity with regards to AI-PC communication, and although I do want it to be complete and able to interface with all AI characters, I also hope that the system is fluid and does not completely break immersion.

Edit: After revisiting the image presented by Thymine, I think I understand the concept now. Still seems relatively immersion-shatering, but hopefully that won't be too big an issue.
Last edited by Zantai on Mon Apr 07, 2014 11:57 am, edited 1 time in total.
“If more of us valued food and cheer and song above hoarded gold, it would be a merrier world.”
― J.R.R. Tolkien
Post

Re: Communication with NPCs

#9
Zantai wrote:I think I am misunderstanding Behemoth's Idea, although Thymine's evil ball-spider picture has made some sense to me.
I think you're taking too much out of the picture I posted. I'm not proposing anything that looks like a ball-spider for this mechanic, I just wanted to illustrate the concept of searching for object nodes and dropping them into a pattern. :P
Zantai wrote:Mostly, I am concerned about overcomplexity with regards to AI-PC communication, and although I do want it to be complete and able to interface with all AI characters, I also hope that the system is fluid and does not completely break immersion.
Indeed, it's quite complicated just to have a chat. Ideally, you'd want something like natural language processing but that is not only a whole project unto itself but a decent set of algorithms for it is one of the most sought after things in the field of artificial intelligence.
Zantai wrote:Edit: After revisiting the image presented by Thymine, I think I understand the concept now. Still seems relatively immersion-shatering, but hopefully that won't be too big an issue.
Anything that shatters immersion is a big deal and must be fixed!

It might help if you could open a dialog box with NPCs, in which case you and the NPC communicate with each other using this strange, node-based language, while a plain-text English version of the messages appear alongside them to the right. It would feel like you were communicating with NPCs in real time in an actual language.
Post

Re: Communication with NPCs

#10
Indeed, it's quite complicated just to have a chat. Ideally, you'd want something like natural language processing but that is not only a whole project unto itself but a decent set of algorithms for it is one of the most sought after things in the field of artificial intelligence.
Worth repeating this. We can ask for a non-immersion-shattering interface all we like, but asking Josh to single-handedly revolutionise the field of computational linguistics might be a teensy bit on the overambitious side.

I don't think it seems that immersion-breaking to me. Remember people used to be able to use the SCUMM engine pretty effectively, back in the day. People are smart, they'll figure it out.
Post

Re: Communication with NPCs

#11
Okay, I knocked up a few prototypes. I don't expect to be receiving any calls from Apple's product development team, but hopefully this is enough to convey the idea. Josh can make it pretty, being a graphics genius and all.

N.B. where I say "player/NPC avatar", I imagine avatars that are also node-based, as per my suggestion here (which Josh is in favour of).
Spoiler:      SHOW
1. I establish a dialog channel with an NPC and choose one of the possible dialog templates from the triangular drop-down menu. The orange node thing missing an inner circle is a socket for an object node.
Image 2. I click the object node socket, bringing up a search menu. I search "Axi..." and it brings up "Axium" as the sole search result that matches the implicit constraints of the socket (<<ore type>>).
Image 3. I select "Axium", which adds the object node to the socket and completes the template. I can choose to send the message if I like.
Image 4. I send the message, and the NPC responds in turn. I can choose to continue the dialog if I prefer.
Image
Post

Re: Communication with NPCs

#12
So, templates? Rest of the message would be already put in there, and you fill the hole(s), while rest of the message would be represented in English.

Do you know what I love in my proposal? Unification. It uses a single "verb", which is "contains". There is [Object] in set [Subject]. The object could be even "State: is mining".

You can easily ask/tell something nonsensical, so the AI would need to know what can fit where, because "Asteroid is mining" is just impossible.

There should also be a notification of time. You probably want to know when the guy noticed the guy you are hunting pass by. The accuracy should be "1 minute ago" to "5 minutes ago' etc.
Last edited by Behemoth on Tue Apr 08, 2014 4:19 am, edited 1 time in total.
In space, no one will hear you scream. #262626
I've never played a space sim. Ever.
Vos estis tan limes.

Online Now

Users browsing this forum: Google [Bot] and 1 guest

cron