The last blog post ‘We Need To Talk’ was heavy on the technical details of how the dialogue system works but light on the real examples. One thing that it very definitely missed out was how the NPCs express their personality through the way that they speak. As I mentioned in that previous post, a complete message is created by traversing a tree of sentence fragments – but how do we traverse that tree?
The answer is simple. Nodes on the tree are selected based on their Heuristic Score. The current heuristic that calculates the score is based on just two things: The quality of the semantic match and the strength of the personality match. the personality match score is calculated based on the difference between the personality profile stored in a node’s metadata and the NPC’s personality. In this post, I’m going to show how that simple heuristic allows NPCs to communicate in a way that expresses their individual personality using real examples taken from the tech demo that we were showing at EGX.
In the below image, we have a fairly plain conversation between Emma Stadler and Sam Mooney (reading order is bottom to top):
In that example, Sam and Emma have procedurally generated personalities falling within unremarkable ranges. They’re boring people – but you can see in the top corner that there’s a button that lets me tweak their personalities. This is a good way to explore the range of their responses in the constraints of a single initial subject (Emma’s problems at work).
So, in the next image, I have tweaked Emma’s personality to make her angrier, more assertive and less self-conscious:
I could see that that conversation wasn’t going anywhere good, so I cut it off there by deleting Sam’s response. Emma never received a response from Sam, so the conversation came to an end. The player in Human Orbit is perfectly capable of tampering in people’s conversations in that way.
In the next image, I have tweaked Sam’s personality so that he is an angry powder-keg as well:
As you can see, he starts off talking in quite a similar way to the original conversation. After all, there’s nothing to test his patience. However, as soon as Emma (rather brusquely) rejects his offer to do something together, he explodes at her. Emma responds back in a similarly violent manner and their relationship (surprise! They were a couple) comes to an abrupt end.
In the next image, I have tweaked Emma’s personality again to make her more emotional, less angry, less assertive and more self-conscious:
Emma expresses her anxiety to Sam, and is grateful when he offers to help – but if she had been a little more assertive then it could have turned out differently. That’s shown in the next image:
The start of the conversation has been cut off, but I think you get the idea. Emma has some problems at work and Sam offers to help. Now, in this final image there is something rather interesting happening – Emma has made a free association and expressed her concern that Sam doesn’t respect her.
The reason for this is that even though Sam has offered to help Emma with her work, he isn’t at all qualified to do so – Emma has gotten the impression that Sam thinks her job is easy and that he doesn’t respect her work (and by extension, her). The conversation takes an abrupt turn in terms of the actual subject being discussed but it is still very natural!
Well, Sam’s personality is still already set to be angry, so it doesn’t turn out very well.
I’m very proud of the free association mechanic – our dialogue system is already dynamic and generative, but the free association mechanic allows the NPCs a whole extra degree of freedom with which to express themselves and their internal world.