Practical solutions to the 'Dumb NPC' problem

Started by
46 comments, last by Kylotan 20 years, 1 month ago
The game I (more correctly, we) am currently working on uses the knowledge base system to some extent, but it has an interesting quirk. The NPCs have no characters/personalities until the player gets to know them. The player can only "know" a limited amount of people (somewhere near 1024) to keep the size of KBs/Personalities/personal KBs down.
"Quality games for quality people." - Company Motto
Advertisement
The game I (more correctly, we) am currently working on uses the knowledge base system to some extent, but it has an interesting quirk. The NPCs have no characters/personalities until the player gets to know them. The player can only "know" a limited amount of people (somewhere near 1024) to keep the size of KBs/Personalities/personal KBs down.
"Quality games for quality people." - Company Motto

quote:
Oblivious to danger. Ever played an RPG where, for some reason, a monster has strayed close to town, and is hacking lumps out of you while local farmers mill around as if this is normal and not a threat? I have.

It tries to kil you not them. You are servant of their lord this is why they don''t kill you, but why they would like someone with magical powers that serves theirs lord? They are loyal to him and didn''t wanna kill his servants. They are not supposed to like every brainless maniac that serves theirs lord. If he will fight or not it''s not their bussines. Some could actually think it will be fun if that monster would win. What would the lord''s servant do?

quote:
''The autocue''. NPCs in many games have scripted lines to deliver hints, plot development, and so on. Sadly, they often repeat the exact same line each time you speak to them, and worse still, 100 different people might say the same thing, with a slight change to the subject matter. How can you believe someone is real when what they say is so obviously scripted?

This is old designer problem. Nobody created the standard talk library.

quote:
Amnesia. This follows from the last point. I hate it when NPCs forget you already talked to them. Real-world people remember who they spoke to - within reason - and adapt their conversation accordingly. They may also adapt their behaviour. However many NPCs don''t care if they already argued with you, or if you shot them before leaving the area, or if you were the one who liberated their town on your last quest.

So another lord''s servant, a hero, they look everyone the same, and he would probably die quicly, so why should he remmember him.
quote:
Do they have no lives? I''m currently playing Might and Magic 6 where I see peasants happily marching around at 3am. In all fairness, M+M6 doesn''t have any indoors areas where they would go, but to see them out and about at that time just drives home how fake the settlement is. Real people have families, jobs, hobbies, and schedules. They don''t walk around randomly 24/7/365.

To be a hero you have to work 24/7 every day in year, Peasants could go to drink, sometimes not blood, and return at 3 at morning.
Some heros actually work more than every day in year.

Other symptoms?


Kill them all like in System Shock.

quote:Original post by Kylotan

'The autocue' . NPCs in many games have scripted lines to deliver hints, plot development, and so on. Sadly, they often repeat the exact same line each time you speak to them, and worse still, 100 different people might say the same thing, with a slight change to the subject matter. How can you believe someone is real when what they say is so obviously scripted?

Amnesia . This follows from the last point. I hate it when NPCs forget you already talked to them. Real-world people remember who they spoke to - within reason - and adapt their conversation accordingly. They may also adapt their behaviour. However many NPCs don't care if they already argued with you, or if you shot them before leaving the area, or if you were the one who liberated their town on your last quest.

Do they have no lives? I'm currently playing Might and Magic 6 where I see peasants happily marching around at 3am. In all fairness, M+M6 doesn't have any indoors areas where they would go, but to see them out and about at that time just drives home how fake the settlement is. Real people have families, jobs, hobbies, and schedules. They don't walk around randomly 24/7/365.


Well the thing here is games usually are not fun when they are realistic. Who wants to wait 12 (gametime) hours for an NPC to wake up from sleep? Many NPCs repeat information like "Weird stuff is happening at the docks," because there is something you need to do at the docks to progress in the game. Instead of forcing you to go there, you gather information and make the decision to go there. All NPCs in modern games know if you have talked to them or not, and they usually say greetings like "Oh, Hi again!" You also have the option to access necessary information if you cannot remember what an NPC told you the first time you spoke to it. Their function is more of a databank than actually AI. The biggest problem is you are limited in the amount of questions you can ask to NPC.


(EDIT - Fixed your quote. -- Kylotan)

[edited by - Kylotan on February 29, 2004 1:25:20 PM]
Waiting 12 hours for an NPC to wake up is not a big deal if you can click the "wait 12 hours" button, or sleep, or something.

NPCs don''t need to keep reminding you of a quest or whatever if you have a journal.

Not all NPCs in games I play remember you.

"Their function is more of a databank than actually AI." - that is exactly the problem.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
Ok. Here''s a link:

http://www.skotos.net/articles/dawnof27.shtml

If you''re not immediately thrilled then I don''t know what kind of programmer are you =P

Here''s the table of contents, the articles about planning are #23 and from that on (#27, the link above, is where the meat really begins)
http://www.skotos.net/articles/DAWNOF.shtml

You can view it as a more inteligent way of choosing states for an NPC that uses a state-machine (usually it would be: stand, attack, guard, etc, but with planning AI each action of a plan is a different state). So I think it works for most of the problems you describe:
- they can create plans to solve problems on certain events like stopping someone from stealing their stuff, or to react to threats and stuff like that
-plans can be used to create interesting conversations and quests
-and to make the NPCs have actual lives with goals and daily routines (there''s a kind of a forum for the series, some posts are quite interesting, like my own =P )
Yeah, I read the Dawn Of Time series of articles a while ago. Planning can be very cpu-intensive though and you still need to define all the cause/effect actions in advance. Also, it doesn''t help with communication or memory. But it is certainly one approach towards making NPCs appear to be doing something useful.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]

This topic is closed to new replies.

Advertisement