Writing Graceful Parser NPCs

It’s easy to get bogged down while trying to implement realistic NPCs. I wrote up some notes on how to avoid fully implementing NPCs in parser games, while still retaining the feeling of having people in the game. (Plus, for the very determined, I put in some notes about full implementation.)

I hope people find it useful!


Interesting article. I think presently I’m opting for number 2: cut scenes with ‘choices’ of dialogue that attempts to hide the linear way through. Much like how Bethesda etc deal with character interactions. I don’t envy anyone that attempts more complex methods. Actually I probably do envy them. Now I’m confused.

A good article, though I wish it talked more about implementing in-depth NPCs in parser games.

I found that Threaded Conversation does a pretty reasonable job of providing a framework to implement reasonable NPCs, but it’s best if the NPC interaction is under some kind of pressure (Time, subject, danger) because if the player can just leisurely chat with the NPC forever they’ll eventually bump against the limits of the implementation.

Fair - “go implement your NPCs” is not very detailed. Perhaps I should write a post that breaks down one of my more fully implemented NPCs, kind of a show-and-tell.

I tend to cheat and I use the somewhat dreaded “ask about” model of conversation, but with characters whose mood might shift depending on what you ask them about (say you confront a thief with CCTV footage of their crime). It is limited but I’ve played enough games with the “Talk to” method to feel this removes the agency from the player.

I also feel that dialogue options are probably the best of a bad bunch (but I have no idea how to make these in TADS2), but my only gripe with them is that as all the possible conversation options get shown, the player loses some of their agency in exchange for not being frustrated by not knowing what to ask the bellhop about.

In terms of making cheaty NPCs I rustled up a quick game over the last 2 days where you play as a cat, and you can’t talk to your owner directly as you can’t talk. Language barriers are handy.

Followup post!

This one is about writing in-depth parser NPCs, with a look at four desirable NPC qualities: being active, reactive, goal-oriented, and randomized.


A different approach to dialogue is to offer one TALK command and always let the characters decide what to say based on the context, which is obviously based on the game state. The player, driving the game, creates the context. The deeper you as the programmer monitor your game state internally, the more complex the results you can create. This is how I did Six.

Arguably, the sleight of hand in my game is that everyone is six years old, and so they aren’t monstrously complex. However there are a lot of states and characters the game monitors, and it keeps track of things you’ve ever done, things you’ve done recently, etc, intersections of things. No time is wasted talking about irrelevant topics to irrelevant characters - you just won’t bring up an irrelevant topic, no matter whom you talk to or when, unless you exhaust all relevant topics, in which case you might enter a pool of smalltalk and eventually some kind of deadend of being fobbed off by the other character, or self-awareness that you have nothing important to say to them right now.

I already know if the player is likely to want to discuss a particular topic with their parents, their sister, or a particular friend, or some combination of all of the above, so I can prime those characters appropriately. To me, this follows the basic instinct of goal oriented conversation. I hope to do this with adult characters sometime.

I could envision a good combination of this approach plus menus offering choices in moments. My personal taste is to avoid ask/tell, and having to retype words I heard elsewhere to continue a conversation.


It’s a good technique, and one that works really smoothly. I think that’s the most important part of implementing conversation - finding a way to make it feel as natural as everything else the player does, so that opening a conversation is as easy and reliable as picking up an object.

My personal favorite for in-depth conversation (which, weirdly, I have never used in a released game) is exactly the one you described - having TALK launch context-based conversation trees.