WelcomeWhat's NewsORLibraryDownloadsLinksWebMaster@OnyxRing.com

This site
pageviews since

Today's date:

Author: Jim Fisher
Title: Advanced NPCs: Introduction

Creation Date: 8/6/2004 10:38:27 PM
Last Updated: 8/6/2004 10:38:27 PM

1. Pronouns on Steroids
2. NPC Conversation and Learning
3. NPC Actions
4. NPC Movement (Incomplete)
Advanced NPC Creation: Introduction

he creation of a believable non-player character (NPC) is, at times, a daunting task. In part, this is because there is such breadth in the spectrum of detail that can be given to an NPC, but even this is just an element of the bigger truth: NPCs represent people, and people know people.

Unlike a book or a mirror, a person is alive. Living things by their very nature are not static. Even basic creatures, like a cat (no offense cat lovers!) walk around. They move with purpose, or perhaps they just wander aimlessly.

Living things also interact with the world around them. More than just seeking the warmth of a sunspot, cats knock things off counters and mercilessly attack helpless pairs of house shoes. They interact with other living creatures in different ways, such as rubbing against their legs or hoping into their laps. They also respond to interaction, like purring when pet.

People are even more complex, since they speak. Not only do they respond to questions, but they also initiate conversion. Language itself further adds to the complexity, since people learn. They can be told something, or read about it, and then relay that information to another person in conversation.

To some degree a player will expect these things from an NPC, too. Players of interactive fiction, new or experienced, experiment with the world in which they are playing. The player knows what happens in real life and tries actions to see if they work in the game.

Players will invariably test to see what the NPCs are capable of. They understand intuitively that people are subjective and that they may choose to either do something or refuse to do something simply because they are in a good or bad mood. When dealing with people who refuse them, players will often attempt persuasion by complimenting, or trying to establishing a camaraderie with a character. They may even attempt bribery.

What the NPC is capable of will add to its believability. The NPC’s believability will add to the player's enjoyment and therefore overall assessment of the game.

So what’s the big deal?

A believable NPC is just not an easy thing to accomplish.

This multi-part article series will describe some of the hurdles that are encountered when developing NPCs, describe design principals that can be used to address these hurdles, and give INFORM specific examples of implementing the principals. The examples vary in complexity and are implemented with intermediate to advanced coding techniques. These techniques include:
  • creating new base classes to inherit from
  • creating new print rules
  • extending the standard library
  • replacing the language definition file

  • The results are more than worth the effort, however, and include dynamic text that reads more naturally, library messages that relate to NPC actions, and a more believable, more powerful NPC implementation.

    For more complete examples of these principals in action, see the ORNPC and ORKnowledgeTopic entries in the ORLibrary section of this site.

    (Note: at the time if this writing, the ORKnowledge and ORNPC entries are in ALPHA state. That is, they are still actively being developed and bugs are being ironed out, however they are developed enough to sufficiently serve as example code that will compile and run.)

    Pronouns on Steroids

    Copyright 2004 - 2021 : Jim Fisher
    OnyxRing.com has been given the potentially non-exclusive right to display the content of this article. However the original author retains all rights. Permission to reproduce this article -- either in part or in whole -- is left strictly to the discretion of the original author.

    Table of ContentsAuthorsSearchIndex
    Would you
    recommend this
    article to
    someone else?
    You bet I would! Heck No!