Advertisement

Dynamic World-Generated NPCs

Started by February 24, 2001 05:30 PM
27 comments, last by Nazrix 24 years ago
This is sort of connected w/ the thread Strategy for the main plot. As we''ve been talking about quests being generated by the game world itself, I''ve been thinking in terms of the developers setting up NPCs individually and setting up their actitivities, whether they''re good/bad/lawful/criminal etc. Then I started thinking that at the start of a new game, the game would create NPCs w/ different attributes (lawful, criminal, occupation, what faction they may belong to, goals, etc). Then the interactions of these NPCs could create a very different experience each game. Quests could, of course, be generated by the interactions of the world. An NPC that has a goal to steal money would probably end up stealing money from an NPC or the player. Then the player could be asked to get it back. That''s a lame example of course, but I''m just trying to get the point out there. The idea would really only be as limiting as the AI would allow. NPCs, perhaps, could create their own groups if they meet other NPCs that have similar goals. The possibilities are pretty vast. This probably isn''t a very novel idea, but I thought I''d bring up the possibility anyway.
Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Okay, so we''re talking gangs, guilds, knitting circles, etc.?

I think thats important if you''re going for the illusion of intelligence. It''s just a step further than having NPCs talk to one another (ie 1 to 1) like a Sailor to a Bartender, for example.

You''d want to have some sort of probability of socialising for different NPC types. Perhaps maids like to gather to gossip with women, and theives are rather solitary who only talk to the Master Thief.

This brings up the problem (or fun) of arguments, though. A group of people getting together, no matter how compatible, will a) always argue about something, and b) if they have knives, will use them.

So not only will you have to implement generation of NPCs, but also have to have an automated way of removing them.

I think I went over this in TA ...



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Advertisement
Well, I'm not saying that NPCs will have to belong to a group, but it is natrual for humans to congregate and talk to others with similar interests. I was thinking of NPCs speaking 1 on 1, but would natrually want to form some sort of groups since that's just human nature (although the NPCs forming their own groups was an example more than the central idea).

The more central thought here was that we've talked about generating random plotlines from individual parts. This would be slightly different. The game would generate NPCs from combinations of attributes. The NPCs would interact w/ each other, the world, the player, etc to create plotlines, quests, etc.

Before, I was confining my thinking by imagining that the developer would create each NPC's attributes, goals, etc individually, but by letting the game do this at the start of a new game automatically it could make things more interesting. Then that NPC's AI would take things from there. That NPC's goals and attributes would affect the world as a whole generating events that the player may interact w/ if he/she chooses.

Of course when the game creates the NPCs there should be some consistancy. If the game made an NPC that was primarily a kind, lawful person whose primary goal was to steal others' possessions it would be quite contradictory.

Like I said, it's probably not the most novel idea, but I thought it was worth discussing.



Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers


Edited by - Nazrix on February 24, 2001 7:52:23 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Gotcha now. I think this is a necessity if you want a truly large number of NPCs in your game. Trying to write/script enough NPCs, differently enough, would take a long time, whereas a decent computer could do it in a few seconds.

Obviously you''d have to consider that certain personality traits don''t mix, and are unsuitable for certain jobs - eg a psychotic axe-murderer with a nervous twitch might not be a very good tailor. Then again, they did it on DS9, so who knows?

What I think should be done, however, is to script the main characters and use generation to populate the rest of the world. Eg make the Royal family and generate the followers.

I''m not too sure it would be hard either. You have a finite number of personality types, jobs, and only two genders (normally), plus things like age and race. Add a few restrictions or guidelines and you''ve got it made.

Use a PRNG and you can have infinite NPCs generated, but of the same attributes every time. A name generator would come in handy here as well.



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Here are a few attributes I've thought of:

guild/group
gender
age
race
religion
how much the law is obeyed
honesty
loyalty
occupation
locations where most time is spent
language(s) spoken
status in society
generosity
wealth



Anyone have any others


morfe,
yes, that makes sense. I was thinking a name generator would be good as well.




Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers


Edited by - Nazrix on February 24, 2001 8:33:02 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Sorry about that, a PRNG is a Pseudo-Random Number Generator.

sexual orientation (*cough*pouya*cough* )
physical handicaps
illegitimacy
accent

Depending on the complexity (inversely proportional to the number of NPCs) you could go with more detailed aspects such as preferred weapons (say among assassins - some think crossbows are for wusses, knives are what REAL men use), etc.



"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick

"It is far easier for a camel to pass through the eye of a needle if it first passes through a blender" -- Damocles
"NPCs will be inherited from the basic Entity class. They will be fully independent, and carry out their own lives oblivious to the world around them ... that is, until you set them on fire ..." -- Merrick
Advertisement
quote:
Original post by morfe

Sorry about that, a PRNG is a Pseudo-Random Number Generator.



Yes, I had just found that via a search on the net

Does the PRNG select random numbers, but the same ones every time you run the PRNG?

quote:

sexual orientation (*cough*pouya*cough* )





quote:

physical handicaps
illegitimacy
accent

Depending on the complexity (inversely proportional to the number of NPCs) you could go with more detailed aspects such as preferred weapons (say among assassins - some think crossbows are for wusses, knives are what REAL men use), etc.



Good ideas. Another could be clothes or at least quality of clothes which would be realated to wealth of course.





Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers


Edited by - Nazrix on February 24, 2001 8:49:53 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
intresting stuff

My idea would not only have the population randomly generated, but the royals and so on as well... what this would require however, is that your random generator was advanced enough to calculate what would make a good story...

If you world was randomly generated, then chances are that your game world would be dynamic..

In a dynamic world, you need to make sure that you are careful that your randomly generated charcters are not

A) Boring or
B) so exciting that they distroy one-another/your world/whatever/the story


The advantage of this would be to have a game with almost infinate replayablily.


ANDREW RUSSELL STUDIOS
Visit Tiberia: it''s bigger, it''s badder, it''s pouyer...
Yes, good point, Andrew. It would take a lot of playtesting to make sure everything is balanced. Once that''s attained it could be quite interesting I think.



Need help? Well, go FAQ yourself.
What a plight we who try to make a story-based game have...writers of conventional media have words, we have but binary numbers
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Automated NPC generation..sounds like an easier way then typing it all in. As for game balance, my *real* first thought was that nothing is really balanced. In fact, some find this as an even bigger challenge when the odds are against them.

Maybe the royal family you *thought* was of the good/lawful way turned out to be just the opposite in time ,no thanks to your automated generator!!

Well, if i think about it it may not be the best idea for the major characters in the game to be different but having more of the grunts randomly be aligned to a side may still have the same effect i described, without pissing the player off too much.

Visit my planet: Planet John
Capt. James Tiberious Kirk -- hmm, didnt know ole Capn was a tiberia fan.

Edited by - GalaxyQuest on February 26, 2001 12:40:33 PM

This topic is closed to new replies.

Advertisement