Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

"Speaking From Experience" - procedural(?) NPC conversation system

A topic by Baturinsky created Nov 06, 2016 Views: 752 Replies: 5
Viewing posts 1 to 8

Here is what I'm working on now. I'm not sure it qualifies as "procedural", exactly...

Well, it's a system of conversation with NPC that is based not on usual dialogue tree or puzzles (like in Oblivion), but on player's experiences.

Player collects experiences on the course of playing, and then discuss them with NPCs for fun, but mostly for profit.

First, what is experience? Simply put, pretty much anything. If it can be "achievement" in game-mechanic therms, it can be experience. Also, experiences examples are:

  • Visiting some place
  • Killing enemy
  • Using skill
  • Finding a (preferably interesting) item. Or even just having it or looking at it.
  • Advancing a quest
  • Talking with someone
  • Hearing or reading about someone or something
  • Learning some fact from observation, talking or reading a document
Then, when you have a library of experiences (kind of like an inventory, but with bits of information, instead of items), you can use them to try to "talk about <this experience>" with NPCs

What can you get out of that depends on the experience in question, and, of cause, who are you and the person you are talking are.

  • If the theme is interesting to NPC, he/she will more inclined to continue talking
  • Or he can be bored, if it's something trivial and/or out of his sphere of interests
  • She can give you some advices on the matter, raising your skill level
  • He can like you more or less, if you tell about some (according to him) good/bad thing you have done
  • She can tell some fact that can be used as an experience when talking with someone else
  • He can ask you for some relevant service or item. Give you a quest, or just ask to give/sell an item you have told about
  • She can offer you relevant item/question. Such as if you show her your ruined sword, she can offer you to repair it or give/sell you a better one
Now, how do we know which reaction will you get?

It depends, mainly, on two things - who you are talking with, and how interesting/new/unique your experience is.

For example, let's say you have killed a dragon with a magic sword, and collected it's hoard. It breaks apart into several experiences, which will be interesting to different people:

  • "I have found a dragon's cave" - tell that to a ranger or traveller
  • "I have observed a dragon" - mage or a scientist will be interested in your observations
  • "I have fought a powerful enemy" - talk about that with a warrior
  • "I have fought using a magic sword" - talk with a smith, he can be interested to hear about exceptional weapons and the way they are used. Maybe he'll give you some tips about how to care about your swords
  • "I have killed a dragon" - any people that were attacked by this dragon before (such as local peasants) will be happy to hear about it
  • "I have looted a dragon's hoard" - merchants will be interested to offer you some options to sell something you have found, or offer you some way to spend the money
  • "I have found an artefact (in a dragon's hoard)" - again, tell mages or merchants about it
Even if the game knows only the basics about NPC - such as class/profession, level and location - it can generate appropriate reaction. Such as, Peasant class NPC that lives in a vicinity of dragon's cave will likely to know and hate the dragon, and thank you for killing him. High-level characters (VIPs) that live in same town are likely to know and be able to tell something about each other, and be interesting to hear some news about each other.
In addition to that, NPC can have some semi-hidden character traits, which can be hand-picked or randomized (or both). For example "pacifist" character will not be interested, or even appalled to hear about fights and weapons, "talkative" will like to speak about everything more, etc.

Ideally, but not necessarily, NPC could have a dynamic life of themselves, gaining their own memories that they can tell/be asked about. There are already many games that do that: Mount&Blade, Crusader Kings, Tropico, Dwarf Fortress, Rimworld, Space Rangers etc.

So, that's the idea. Now as for implementation, things are not so simple. This model itself is rather complex, and there has also to be some game to apply it to. I was working on some simple text-based sims-like game to attach it to, but it's in a very early stage still.

But this jam seems to be a good place and time to at least get feedback, and maybe some help to make a working prototype of it.

So, what do you think? Is this idea relevant to jam, and is it interesting/perspective?


This is a really cool idea! It sounds very ambitious but I think even a small version of it would be super interesting. I love the idea of being able to use my experiences to relate to people in the world :)


Sounds like flags would be a good way to go about it. Each interesting action (experience) needs its own flag. It is raised when the character performs the action. Every NPC has a subset of actions flagged as interesting to them, and has a certain action attached. When the character has raised a flag, it will appear on their dialogue options. The harder question is how to add some dialogue options they are actually not interested in, you cannot add all experiences the character has had or players will quickly tire of scrolling through miles of options.


Flags are too binary, I was thinking number values (I call them "traits").

How to not flood player with thousands of memories is a real problem. But there is a good real-life mechanics for that: forgetting.You gradually forget about things, starting with smaller and more mundane ones. Also, some (most) of memories can be not available immediately, but you can be reminded about them by something related. Such as, an item in your inventory. For example, you can look at a sword and recall how did you get it, who you fought it with, with who you were talking about it etc.


Oops, somehow managed to delete my reply. But I was saying this sounds like a lot of bookkeeping. With the amount of data and all the relations, I'd almost rather do a SQL database than a bunch of arrays or similar for it.


This sounds awesome!


I have made a prototype

Right now there is only very primitive "text-mode The Sims", with (procedurally generated) people with skills, interests and relations, but no actual life (yet). And there are items and skills, but very primitive too - you can make some food, eat it, rest, but that's all.

But - you can talk about pretty much everything there is in this small world (i.e. skills, items, people, interests, item traits) and get more or less reasonable reaction. People will be interested to talk about things they are interested in, will give you some tips about other people, and sometimes teach you a bit of some skill they know and that is relevant to discussion. They will be tired and leave (sooner if they are not feel entertained), will be bored with a topic that you speek too much about.