Easy ways to keep your NPC's connected to the player

I recently added a simple feature to my game to allow my NPC’s to send text messages to the player. It works like this:

After taking the flashlight for the first time:
	the flashlight-timer bings in 3 turns from now;
	continue the action.

At the time when flashlight-timer bings:
	say "Your watch vibrates. You have an incoming text from Martin. [line break][italic type]Nice work. The flashlight should put some light on the situation.[roman type][paragraph break]".

I thought I’d see what creative ways others use to keep their NPC’s “in the game” and connected to the action of the game. What’s your favorite simple add on to make your game engaging?

Greg

3 Likes

Thank you for sharing this. It’s really cool to share some code like this and start a discussion topic. I’m a bit disappointed that I can’t reciprocate, even after reviewing my WIP. I do have some guiding principles (which I apply) aimed at keeping the player engaged, but it doesn’t really translate to simple code or technical stuff that I can easily repeat—it’s more of a narrative strategy. If you think it might be of interest, I can explain them briefly (to avoid too much off-topic content). Let me know. It will inevitably be incomplete and subjective (and a bit radical too—choosing means giving something up). Thanks again, in any case.

1 Like

Feel free to offer a simple explanation of an idea if you like! Glad it was helpful!

Maybe too simple for you, but I use interjections a lot – period speech/actions on the part of an NPC in the vicinity. The key is to make a fair number of possible interjections, so the player is unlikely to see the same one twice – and keep track of which have been used, so you can least cycle around once before you repeat

I use a lot of interjections in BOSH.

Klimp jumps up from his chair, looks sheepish, and then sits back down. ‘Sorry, I was just thinking about Budapest. Scary place. Lots of ghosts. Lots of vampires. Lots of good food.’

3 Likes

OK, I’ll try to keep this short and efficient (a real challenge for me). Tested and approved in TTRPG, I apply this to my WIP:

  • From the start, choose a guiding theme to create a constraining perspective that will keep the player focused on the scenario’s stakes while allowing the creator to avoid scope creep. It’s better to really engage a few than to vaguely distract the majority.
  • The world model should allow the player to learn and master it. Gradually adapting what is written to what is identified and understood helps the player assimilate and take ownership of the imaginary world. This feeling of familiarity instills a powerful emotional element over time, ranging from nostalgia to the eagerness to discover more.
  • If it’s truly a story and not a fable, then the player must be able to both generate a decisive impact on the course of events and fully own their choices in resolving moral dilemmas. This means that a player who favors a heroic act over its more cynical yet profitable counterpart should not necessarily be more rewarded for it. Being able to stand by one’s moral choices, even at the expense of scoring, is a reward in itself. The impact on worldbuilding is the following: the ideologies of the virtual world must find an explanation in the material causes that generate them; they don’t exist in a vacuum. It’s highly rewarding for a player to exhibit behaviors, make choices, or perform actions that are socially out of sync with what the NPCs promote (in fact, this is how you can give the player an intense experience of a steadfast character who charts their own path).

Sorry, I am very very off-topic (one more time) !

1 Like

Oh, I’ve just remembered that my game generate random passersby the player can interact with:

A tall man with long blond hair, wearing a floral-patterned tunic, stands beside you. He greets an acquaintance with a warm smile and a nod.

The code is still an ugly spaghetti-thing, I have to do some refactoring.

1 Like

I tend to go the other direction: the NPCs don’t especially care about the player, but the player has to care about them. All four of The Enigma of the Old Manor House, Death on the Stormrider, The Labyrinthine Library of Xleksixnrewix, and now Miss Gosling’s Last Case involve using the environment to manipulate NPC movements and behaviors to get what you want.

…hm. Is this becoming my signature thing?

4 Likes

Very interesting indeed. So, with this approach, the player has also to learn and master the world model to perform that, doesn’t (s)he ?

2 Likes

Pretty much, yeah!

In Enigma, you’re a teenager in a haunted house, trying to rig up the house to figure out where the ghost is and finally trap it. The majority of the game is about arranging things to get you more information, since you can’t see or hear the ghost directly, only detect its effects on the environment.

In Stormrider, you’re a passenger on a cargo airship, where the only crew member who spoke your language was just murdered; now you need to clear your brother’s name without being able to communicate with anyone. You need to learn about all the crew members, how they act and react, what secrets they have to hide, etc, to get the evidence you need. (E.g. if you jam a mechanism, an engineer will come fix it, meaning she’s out of her workshop, and you can slip in and steal her tools.)

In Labyrinthine Library, you’re a kobold building a dungeon in preparation for adventurers attacking; they’ll kill you if they ever have line of sight to you, so the only way to win is to construct your maze to control their movements to your advantage.

In Gosling, it’s a much smaller part of the game, but this time you’re the ghost who can’t be seen or heard, and have to find ways to make people open doors and such for you.

3 Likes

Thank you for developing these points. It’s an interesting way to involve the player in taking control of their story. In an excellent book designed for TTRPG game masters (The Return of the Lazy Dungeon Master), one of the -brilliant- pieces of advice given by the author is the following: if your players do nothing, the world moves on without them; decide before the game what your NPCs, factions, and organizations are doing as if the players didn’t exist. This is something I also practice, and it’s fun to realize that this can become a central element of the narrative engine, as you have designed it.

1 Like

Some great ideas here. I love the concept of breaking the machine to distract the NPC so you can get their tools… Great way to engage your NPC’s into the story.

1 Like

In this context, perhaps you have different scoring / winning titles… one approach gives you the winning title of Highest integrity, scoring the most integrity points, and another approach gives you a different title based on what trait you maximized…. Potentially even a ‘balanced champion’ who scores points across multiple traits but as a result cannot maximize points in any of them.

1 Like

It’s a perfectly valid approach. However, since you initially mentioned NPCs, I’ll take this opportunity to try and stay on topic for once. As a (future) interactive fiction writer and as a Game Master in general, I’m not too keen on quantifying the successes and failures of characters beyond what the game design requires to fit the rule system. I find that it breaks immersion a bit, projecting the player into the metagame, which may work for rogue-like games between runs, for example. But if the goal is to stay within the atmosphere of the story, then NPCs are very useful because they have the ‘freedom’ to praise, disdain, reward, thank, insult, or ignore the characters based both on their actions and their own ideology. Rather than relying on scoring, the direction chosen by the player is then directly expressed through the narrative via the NPC. And this feature could be twisted.

I remember a memorable role-playing game session where the players were one of my daughter and her friends. Perhaps driven by a sense of vengeance, I had created a scenario in which the characters had to escort an insufferable and overly spoiled teenager from a wealthy merchant family, who constantly created conflict-ridden and dangerous situations requiring the characters’ constant and delicate intervention. Of course, this NPC believed everything was owed to him and didn’t see the problem. In Inform programming, one could imagine a ‘non-gratitude meter’ for the teenager that fills up as the player does their job correctly, making interactions with the NPC increasingly frustrating. The humor of the absurd lines delivered by the teenager highlights the player’s situational intelligence by contrast, subtly rewarding them.

1 Like

In something I am working on, I have interjections and flavor text based on which of a series of scenes is active, because that lets me tailor things according to a place in the narrative. I also just have the character do things.

I had to learn about scenes to do it, but everything else felt pretty straightforward.

It helps that the scenes are short; I think the illusion would be harder to preserve over, say, fifty turns.

1 Like

I’ve been looking at scenes to see if I should incorporate them… so far, I’ve accomplished what I’ve needed with [if player is in location] kinds of logic… but I think Scenes would be a more elegant implementation and may make some other tasks easier. (like changing broader items such as backdrops)…

1 Like

So to do interjections, you do some type of: if player in the den and it is the knight scene, say “the knight looks at you and says, Hey!” (Just a pseudo code simplistic example)