Game Development Community

dev|Pro Game Development Curriculum

So, exactly what is there to talk about with NPC's anyway?

by Ted Southard · 01/29/2008 (8:20 pm) · 2 comments

Honestly, it's not like they watch the game or anything... But still, chatting with an NPC can add a new dimension to gameplay, and while Interactive Fiction has been tackling and trying to drag that particular quarterback to the ground for decades now, MMO's have largely forgotten all about it...

In my last .plan, I discussed some of my ideas for getting dialog with NPC's back into MMORPG's (or even plain MMO's, for those that aren't RPG's), and here's a very quick and very dirty version of the chat done up in Excel and VB (used to quickly emulate a database and quickly code out some functions):

bablbrain.com/images/chatv001.jpg
Snazzy, eh! No? Well, that's because I reinstalled my shitty Alienware laptop with Vista and only have Paint on here to cut and paste the relevant cells from Excel, but the other reason why you're not treated to the fabulous "cells of mysterious numbers" that my last .plan had is because: a) It's even more cluttered than usual, and b) Work product.

I'm hoping to learn how to grab video out of TGE soon after I actually improve on this, move it to MySQL, and tie it in with some rudimentary AI (also shown in the last .plan), but for now there's only these odd glimpses of bad conversation between myself and an NPC about things you probably would never ask one about.

However, the point of the excercise was to prove that a database-driven dialog solution is actually possible that does not involve Natural Language Parsing, which this does not. As a matter of fact, it has absolutely no idea what any of those words on the screen mean, but the way that dialog snippets are generated are theorectically geared towards providing for a large range of response. That said, the generation of dialog is not going to leave human hands, and even with the creation of database tools to allow for smoother generation of these dialog pieces, it promises to be a tedious process- just like most other data generation tasks that MMO's entail. But the "canned" nature of the dialogs ensure that users can't burden the system with bad grammar and/or spelling, and certain other methods are meant to make it easier for my side of the equation to dynamically create an NPC with the dialog it needs to know, without it having dialog that allows it to talk about absolutely everything in the world. So no, the old guy on the corner probably doesn't know where those bandits who kidnapped the farmer's daughter are, but he could chat about how sunny and warm it is outside.

And I do apologize for the rambling nature of the post, but I'm a little excited and wanted to share- especially since dealing with the laptop set me back a full week, and even after that I was one of the unlucky ones cut off from connecting to the forums until today (kudos to David Blake for helping me out with that!), so I'm a little pent-up.

In any event, back to work. Hopefully, I can polish it up in time to show off at the IMGDC in Minneapolis this year so I'm not just the weird guy with the weird gui sitting there and talking design with nothing to show. In the immortal words of Howard Dean: Byyyyyaaaaahhhhhhh!!!!!!!

About the author

Started with indie games over a decade ago, and now creates tools and tech for games. Currently working as a contractor for startups and game studios.


#1
01/30/2008 (1:29 pm)
Ted,

I've often wondered about NPC conversations myself. I've always daydreamed about implementing some kind of database system, but I don't really have the necessary skills. Hopefully it works out for you!

Kevin
#2
01/30/2008 (1:47 pm)
@Kevin: What I'm finding is that it's really just playing with how the data is both displayed and stored. On the one hand, it has to be both searchable and manageable (for the game logic and the devs, respectively), and on the other, it needs to be at least somewhat relevant and definitely usable/readable (for the players).

With a system like this, users can forgive asking a question and getting a response like "I'm sorry, but I think you should rephrase that" as an error message. Likewise, the user doesn't need prose constructed with fine control over grammar. With this system, it gives very basic, generic, "second-person" dialog, which is remeniscent to what a GM would do during a campaign:

Player: Okay, I ask the farmer if he's seen the bad guy pass through here...
GM: [checks stats, etc] The farmer tells you that he hasn't, but your ranks in Sense Motive make you feel like he is not being totally honest with you.

I think that's all that's really needed to push the feature in the direction it needs to go. Right now the dialogs look super contrived (because they are- I was always a really bad GM), but once I get things down so that I can organize this data, it will look better. Before that even happens though, I should have some other interesting features done up, hopefully this week, like dice-rolled dialogs for convincing NPC's to divulge information, and things like that. It's in my head already, but I'm also learning VB as I go, so it's a slugfest at times, lol!

There's a lot I think I can do with this, and I can't wait to show it within the game with a proper GUI and a target NPC, instead of in Excel cells =D