Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Procedural content and emergent gameplay, a brainstorming

OlSheep

Novice
Joined
Aug 13, 2004
Messages
42
Location
Lost in Quebec
There I was, sitting in front of my computer, already bored with Oblivion and unable to get any work done (even though that's what I had planned for my evening). Since productivity is obviously not my forte, I thought I'd do some lurking 'round here. That's when it happened. The unprecedented need to stop lurking to try and create some sort of interesting debate.

This is probably going to be a long post, feel free to leave the thread (with my apologies) if r3dd1ng 1s teh h4rd...

Before I begin, the post will contain a few references to Oblivion. Whatever conclusion you may draw from this, please keep in mind that this thread is not about that particular game. The concepts presented here will mostly be purely speculative and they are placed under the spotlight merely because I believe them to be interesting.

I believe that most of you have seen Will Wright's presentation of Spore at the GDC (it's kind of old news now). It's also pretty obvious that we all know about... Speedtree and incredible algorithmic soil erosion :roll: .

The question here is, has anyone tried to create a roundtable about the potential of serious use of procedural content in RPGs? Since I couldn't find one (if there actually is one... sorry?), I'd like to use this thread to share my thoughts (and to read yours) on this.

It seems to me that procedurally generated content should be a RPGer's wet dream. What you guys call the hive mind seems to have its big fiery eye set on choices and consequences. Let's see where we can go from there. Anyone here who fell for Peter Molyneux's hyping of the first iteration of Fable will remember that, at one time, the ability for your hero to get a child was supposed to be in the game.

Just take a look at Oblivion's face creation system (I believe it's base on facegen or something). You actually have that coupled with an AI capable of calculating the basic needs of an NPC (it doesn't do so flawlessly but it still tries) and a set of skills that can increase over time for any creature within the world. Am I the only one who sees tremendous theoretical potential here (not that Bethsoft would ever dare to try and exploit that kind of thing :evil:)?

By pushing this envelope, you could simulate a kid that would:
a) Be calculated to look a bit like your character and your char's... partner.
b) Be capable of having a relatively believable existence within the gameworld.
c) Be able to learn from your character and assist you in times of need.

Obviously, this would potentially bring to light the very amusing buzzwords that are "emergent gameplay". What are you going to do with the kid? You take care of him, his need for a parent will be calculated as satisfied. He will evolve with you, assist you, respond to you positively. Let's say you abandon him or mistreat him. There are virtually dozens of avenues that could be algorithmically simulated here. He could become a hero of reknown, he could decide that he's gotta become better than you, he could become an assassin with no love for you whatsoever, he could become a merchant, etc. He could also simply get killed by some random NPC(s), leaving nothing particularly interesting for you to notice.

By placing all the pieces of the puzzle together, the concept goes much farther than Molyneux's long gone promise. It adds to your experience an element that is both a good way to generate emotions and a potential random variation to the way you play the game.

It all comes down to what kind of training he gets/what skills increase. It doesn't necessarly depend on you. Yet, it's your fault. At the end of the day, that kind of idea seems like the perfect exemple of choice/consequence. It's entirely seemless. You don't even get to make a choice within a conversation menu, it just happens because you behaved in a certain way. Does that sound like a lot of work to implement? Yes, it does. Does it sound impossible once you've got all the tools you need to implement this? No, it doesn't, it only requires some exemplary scripting. Even though we're obviously still far from having the raw computing power necessary to simulate such an evolution for each NPC within a gameworld, creating a procedural NPC and the gameplay this entails doesn't sound impossible at all.

So, to conclude this rather overly long observation/rant, I'd like the hive mind to "work" on these questions:
- Are there any procedurally generated concepts that you feel are feasible, remotely reasonable and that would greatly enhance your experience with RPGs?
- Do you believe that emergent gameplay adds to the gameworld or that it reduces its credibility?
- What are your thoughts on procedurally generated content vs handwritten stuff?

I hope this is interesting (I believe it is). If anyone is wondering, this isn't some kind of marketing research and whatnot. I'm a student in software engineering and I have a genuine interest in the new trends that games seem to be taking (and I'm not referring to the mass-market appeal that we all hate).

Let me know if I try too hard :) . Should the thread become popular, I'll probably add to these ideas in new posts.
 

Zomg

Arbiter
Joined
Oct 21, 2005
Messages
6,984
This is a subject that I've kind of expended myself talking about in the past, but this is a good idea for a thread and it was falling too far.

I think the first step in RPG emergent gameplay is strong and consequential AI-AI interactions on a large scale. So, for the standard issue medieval fantasy game example I usually use, think of having a world where AI farmers gather crops, sell them to AI caravan merchants, who then carry the crops into town for sale to town AI consumers, who have a non-cosmetic need to eat. Now, that's a lot of work just for verisimilitude, but the payoff in gameplay is that it's all fundamentally interactive and the player can participate in every step. You can replace the farmer or the merchant yourself, you can corner the market on food, you can burn all the farms and create a famine that actually alters the gameworld, etc.

I honestly don't think that kind of thing would even help verisimilitude, due to Uncanny Valley effects, but it sounds like fun gameplay to me.

That particular idea is suited for a sandbox world TES or GTA type game, although the sandbox term might not be appropriate when the sand is playing, too. Or maybe an apocalyptically great X-Com game, now that I think about it. I think some procedumergent content could be integrated into the periphery in more structured games like Fallout, which have their own types of artistic payload, but handmade content would still be the rule.
 

OlSheep

Novice
Joined
Aug 13, 2004
Messages
42
Location
Lost in Quebec
Thanks for your reply, Zomg. I don't like to admit it but seeing the topic go down was a bit painful :) .

I believe that the economical system you've just depicted was also a part of Fable's hyping (never trust Molyneux hehe). The guys at Lionhead have actually succeeded in implementing merchants that would deliver goods to cities within the gameworld. Since the price for a given good was modulated depending on the quantity immediately available, you could travel from town to town to do some trading.

Obviously, this neat little feature didn't affect anything else. In fact, it was very hard to have an impact on the delivery of goods. You couldn't burn farms, you couldn't sink ships, you couldn't do much. Even if you killed merchants, I believe that the long-term impact would be a boring price hike and nothing else.

I think that the problem here is that, as you said, the NPCs needs mustn't be purely cosmetic for emergent gameplay to happen. This shouldn't be that hard to implement. I can't imagine it happening though.

Mass-market appeal means that you need to make sure your game can be completed by any slack-jawed yokel out there. The inherent question is: how do you prevent your "procedumergent content" from breaking your storyline? If an important NPC dies from hunger, the whole game can stop functionning properly. Does this bring back the old debate on invincible NPCs or would you get rid of the said storyline altogether and stick to a sandbox game?
 

AlanC9

Liturgist
Joined
Aug 12, 2003
Messages
505
The problem with this sort of content is that there's no logical place to stop, short of going all the way to a world simulator. If you let players kill merchants and farmers, then the world has to react to that. Not just by people starving, but by NPCs mobilizing to protect their food supply.
 

OlSheep

Novice
Joined
Aug 13, 2004
Messages
42
Location
Lost in Quebec
I think that one could achieve satisfying results (keeping in mind that a full world simulator isn't reasonnable by today's standards) by simply modulating the NPCs "hate level" towards your character.

Something along the lines of a simulated suspicion could also be included in the mechanics. Even if no one saw you burn the farms, NPCs could suddenly begin to keep an eye on you, bounty hunters could stalk you at night (edit: interesting elements of emergent gameplay would be possible here), little things like that.

By creating a bunch of generic consequences for being a bad guy and implementing them within the gameworld, you wouldn't have to script specific defenses (or to code an uber-AI) to allow the NPCs to arm themselves against you.

Of course, it would reduce the spectrum of possible player-induced consequences. Still, you've gotta know when to stop (and there are probably more spectacular aspects of causality to explore than the results of destroying food).
 

Xi

Arcane
Joined
Jan 28, 2006
Messages
6,101
Location
Twilight Zone
I think this whole concept is reliant on an AI middleware package. Currently there are no companies who develop such a thing though.

It sounds pretty awesome, but it would just take a lot of time to develop. This is where a Middleware Developer could come in. I'm actually surprised that no one has started doing this. It's truely a next generation type of feature, but it would take a lot of work to implement which would possibly degrade other areas of development.
 

OlSheep

Novice
Joined
Aug 13, 2004
Messages
42
Location
Lost in Quebec
I'd guess that creating a middleware would entail both the algorithimical and philosophical design of a portable AI. The problem is that intelligence isn't like, say, physics. It's not constant.

I mean, if you're coding a FPS, you'll want NPCs to dodge, run, shoot, jump and whatnot. On the other hand, if you're working on a tycoon-like, you'll want your NPCs to have a calmer and certainly more believable existence.

This is all very game-specific. Usually, these things rely on heavy scripting (that's interpreted code written outside of the game engine) and I believe that they need to be tweaked to be both functionnal and easy to compute. Encapsulating everything in a programmer-friendly way sounds like a humongous task.
 

obediah

Erudite
Joined
Jan 31, 2005
Messages
5,051
There's a disgusting amount of potential for this sort of stuff, but like Xi said, it will need to be a middleware (either product or in-house tool for a mega publisher like EA) thing, because no one developing a game is going to be to put the effort in to do it right.

My impressions from the spore video is that it will by far be the most overrated game ever when the reviews come in. Once you crack through it's very shiny layer of 'OMFG this is cool' the gameplay is pretty much a Midway Arcade Classics pack chained together. I didn't see any depth at all in any of the stages. My expectations have been in a steep and steady decline since it's announcement (my first expectation was a evolution-sim into civilization into MOO) but we got a flash game into Hasbro SimTown into My First RTS into ZOMG I blew up a cow.
 

OlSheep

Novice
Joined
Aug 13, 2004
Messages
42
Location
Lost in Quebec
obediah said:
Once you crack through it's very shiny layer of 'OMFG this is cool' the gameplay is pretty much a Midway Arcade Classics pack chained together.

I'd say your prediction is probably a good one. The thing that amazes me with Spore isn't the gameplay in itself. Actually, the game sounds like it's gonna be a collection of dumbed-down versions of the most popular gaming phenomenons of the 90s.

Still, from a programmer's perspective, the code running in the background is truly amazing. Procedural animations, procedural character creation, procedural world generation, asynchronous player created-content downloading.

Personnally, I believe that the artists have been taking up too much space on the game-creation floor recently. While it is true that good arts as turned the industry into a major, mainstream thing, it's also killing it. Features are being replaced by shiny thingies!

Therefore, I think that Spore could be a first step towards going back to "the old ways". Ultima, Fallout, Planescape, etc. These games come from a time when the programmers were kings rather than puppets :) .

Call me a daydreamer if you will, I still like that notion. Anyhow, it's still going to allow interesting interactions between player created-entities. I can't see how that could fail.

[edit]: hmmm I think I should stop posting so much and let the discussion flow a bit :lol: .
 

Zomg

Arbiter
Joined
Oct 21, 2005
Messages
6,984
AlanC9 said:
The problem with this sort of content is that there's no logical place to stop, short of going all the way to a world simulator. If you let players kill merchants and farmers, then the world has to react to that. Not just by people starving, but by NPCs mobilizing to protect their food supply.

That's why I had the caveat about verisimilitude vs. gameplay, and why this kind of thing would be good for sandbox games that try to be interesting toys rather than games that are about good fiction. At first, anyway. Now, the dream for world simulation is to have very simple rules that through grand interaction create extremely complex systems, like Conway's Game of Life, in which case the systems could be very robust without lots of specific implementations, but that's probably a little too weird.

@obediah re: Spore - I tend to agree, but those procedural organisms/gaits/whatever are shit hot. I have no doubt that it will be a good toy, a la the Sims. I'm going to make a concious effort to tune out the hype.
 

OlSheep

Novice
Joined
Aug 13, 2004
Messages
42
Location
Lost in Quebec
I thought this would get more replies :cool: .

I'll try to add to the brainstorming a bit, hoping that it'll give a direction to the discussion. In fact, I'll use the next few lines to give my brain some kind of workout. Let me know if there's anything interesting in there (ideally, you should also let me know if there isn't :)).

Since this could be considered as a premature bump, I'd like to reassure everyone: if this fails, I'm not gonna do it again.

Let's try to discuss the theory behind procedural quest creation. After all, quests are essential to RPGs as we currently know them. One could argue that, to efficiently role-play, a character needs to be able to choose whether or not to go questing. Still, for the sake of this reflexion, we'll remain within the boundaries that are already defined by the industry.

What's a quest? It's a task. It doesn't matter how you look at it, at the end of the day, it'll still be some kind of task you've got to accomplish. How do you create a task? You create the possibility to fulfill a particular need. How do you create an interesting task? You make sure that the said need is as spectacular as it gets.

Keeping these definitions in mind, let's try to create a feasible (and interesting) model. A computer is nothing more than a very powerful calculator. It cannot invent (at least not with today's software). For a calculator to create (interesting) quests, you need to give it numbers to crunch. Therefore, you've got to simulate various things (in that order):

- Needs --> Abilities --> Actions --> Consequences

Before defining examples of these elements, let's make a few assumptions.

a) Your NPCs benefit from a good implementation of some kind of pathfinding algorithm.
b) Objects within the gameworld can be labeled as part of different categories (i.e.: food, clothes, weapons, etc.)
c) Your NPCs can pickup stuff within the gameworld.
d) Your NPCS can be given affiliation (meaning that a group of NPCs can be "allied", "neutral" or "at war" with other groups).

Needs
This is a crucial stage of the operation. You need to define your NPCs' needs properly. This goes beyond the need for food. This is where your NPCs' personnality is defined.

At its core, a need should be programmed as a scalable (meaning that it can increase or decrease in priority) desire to get either a particular item or any item within a given category.

Obviously, you'd have to do common stuff:
- Hunger --> The higher this need gets, the more likely a NPC is to search for food.
- Thirst --> The higher this need gets, the more likely a NPC is to search for drinkable liquids.
- Health --> The higher this need gets, the lower an NPC's health is and the more likely he is to search for some kind of medicine.
- Sleep --> The higher this need gets, the more likely a NPC is to search for a bed.
- Safety --> The higher this need gets, the more likely a NPC is to search for a home/guild/group/etc.

Then there's the least obvious stuff (this list isn't exhaustive):
- Vanity --> The higher this need gets, the more likely a NPC is to try to obtain luxury goods.
- Power --> The higher this need gets, the more likely a NPC is to try to obtain weapons and allies.
- Love --> As this need increases, a given NPC will care more about another NPC.
- Superiority --> As this need increases, the more likely a NPC is to use his power against another NPC.

Finally, there's entity-based needs:
- Money --> As this gets higher, the NPC turns into a skinflint.
- Item --> A given item his worth a lot of gold coins so its owner cares about it.
- Other NPCs --> The higher this gets, the more likely a NPC is to go looking for a suspiciously missing one.

Abilities
This merely defines what a given character can or cannot do. Consequently, it will affect how a NPC tries to satisfy his needs.

If an entity is capable of pickpocketing, the easiest computable solution to satisfy "vanity" is to steal from other NPCs.

On the other hand, if an entity knows how to trade, the easiest computable solution becomes to buy at the lowest possible price.

Actions
This is the phase were your NPCs are programmed to use their abilities. Since you've got to calculate the easiest solutions amongst many possibilities, a neural network would probably be an interesting way to do things. I'm not going to try and depict algorithms here. It's beyond both my current skills and the scope of this thread.

Consequences
Once an action has been completed, the proper consequences are applied.

NPC X buys item W from NPC Y.

NPC Y receives money (needs for money is satisfied).
NPC X receives item (needs for that particular item, vanity or power is satisfied).

Where do the quests come in? As soon as a NPC's need gets to the point where it kills all the others in terms of priority.

How does it work? The NPC with a critical need simply asks the player to help him get satisfaction. With the current needs enunciated here, you could get quests that would involve (not an exhaustive list):

- Retrieving a stolen valuable item
- Finding a cure for an illness
- Assassinating an entity within the gameworld
- Genocide (killing many entities)
- Rescue (saving an entity)
- Fedex (getting food/water)
- Helping the poors to obtain money
- Much more

It all comes down to what kind of database you're able to run in the background to store all the information such a system would generate. Of course, these quests sound rather bland. But keep in mind that, with such an heavy simulation, your quests would come from a entities that would offer an almost infinite spectrum of variations in their personalities. Fedexing food for the poors -> boring. Fedexing a precise type of rare food for a king -> potentially interesting (cook it yourself? pay a cook? threathen a cook? ...).

Does that sound feasible?
 

Twinfalls

Erudite
Joined
Jan 4, 2005
Messages
3,903
No-one's had the balls to pursue this stuff since the makers of Daggerfall.
 

Allanon

Augur
Joined
Oct 11, 2005
Messages
249
OlSheep said:
Where do the quests come in? As soon as a NPC's need gets to the point where it kills all the others in terms of priority.

Not following you on this one. Even if a certain need gets a priority over others (which is usually the case anyway), why would NPC ask for help? Computable solution based on NPC's abilities will always exist, no matter how hard it might befor the npc to succeed. For example, NPC might want to retrieve a valuable item from a thief. Based on his abilities, the probability of his success might be very low. At that point ideally the NPC should think about asking for help, but won't. He will give it a try anyway and presumably fail. How would you implement in his decision taking algorithm the need to ask for help from PC? After all PC's success can't be predicted, so it might be lower than his own or higher. Anyway, I realize it's just details, and it's not what you're talking about in this thread, but I'm curious. :)

OlSheep said:
Of course, these quests sound rather bland. But keep in mind that, with such an heavy simulation, your quests would come from a entities that would offer an almost infinite spectrum of variations in their personalities. Fedexing food for the poors -> boring. Fedexing a precise type of rare food for a king -> potentially interesting (cook it yourself? pay a cook? threathen a cook? ...).

The question is how would you generate the background information for those quests? From computer's point of view, it's just a list of items/locations/npcs/etc'. It won't be able to generate the background story for those quests, interesting enough to create a compelling adventure game. For example, let's say a noble NPC figured out he needs a rare ingredient to cure his illness. He looks around his defined boundaries (let's say a city) and fails, so he turns to PC. What information would the player receive in this case?
All the NPC knows is - A) His need (illness). B) Name of the ingredient.
"Go bring me X for my Y" :P
 

Nog Robbin

Scholar
Joined
Jan 24, 2006
Messages
392
Location
UK
Incredibly this thread has strted off a topic I inteded to do some time ago (after my mixed concepts thread about party mechanics, game style and viewpoint).

Anyway, the concept is relatively sound. If you can provide a genuinely life like world and have some quests genereated by the characters based on their needs you have the basis of a great game. I say "basis", because I feel that to add some real depth there would have to be some scripted sequences and an involving plot line - though to an extent this could be carried by the actions of the game world inhabitants (NPC's mostly).

My first point would be the NPC's need for assistance. If an NPC needs to do something, and either trys and fails, or believe his chance of success is low, he/she needn't go straight to the player. In fact, for the gameworld to seem lifelike they should first go to known characters of experience, friends and family. As the PC's fame grows and his abilities become known *then* NPC's may start directly approaching the player.

Of course, this could have been developed at very basic level in OB - for example, had the mercantile side been developed at all a shop keeper may have been able to generate simple random (as needed) quests for the player to get certain items they want to sell. Of course, that didn't happen, shops auto stock, and the only quests are those that are hand defined).

You then have the issue of replacing NPC's. It's one thing for NPC's to move around the gameworld (following work, having to sell their house as it was too expensive - whatever). However, if NPC's can die (as they should be able to), eventually the world would become pretty depopulated. So - do you have children? Relationships? Or just move in new fully grown characters with a generic back story? Some mechanic would need to be in place.
You also have the issue of housing for the characters. Can a city expand - do you have predefined dwellings that can be used, do they appear over night or is there some kind of building activity (providing another source of work for characters). Will characters move around, for example, desert a town if too many people die, move away if there is a spreading illness?

I guess the key would be to set the limits of the world and it's interaction very early on - what you expect the world to be able to do, what level of interaction the characters could have, what their primary aims, desires and needs would be, and what potential solutions they have.

It could produce something amazing - but it would take a lot of work. The question being would the return on the work be worth while? When many people can achieve a "living" world by producing an MMORPG, what would be the market for a living single player world?

And while I agree that it would ideally be a middleware issue, I think it would be very heavily designed with particular things in mind, and wouldn't turn out being as universally usable as things such as speed tree or havok.
 

DarkSign

Erudite
Joined
Jul 24, 2004
Messages
3,910
Location
Shepardizing caselaw with the F5 button.
Great topic. Our design group has been analyzing this for awhile and coming to some of the same conclusions.

a) needs-based NPCs - we're calling them pseudo life characters (PLC's for short). Not only would they have a complete 24-hr schedule (sped up a bit so its not a true 24 hour day), but would have a certain loop of checking their states.

I. Are my needs at an acceptable state?

A. Physical (the most basic requirements)
1. Safety - If Im being attacked I will forget hunger and sleep
2. Food - If I am hungry, I may not be able to sleep
3. Sleep - If I am tired, I cannot meet other goals
4. Shelter - I need a place to sleep, avoid distraction, collect things
5. Freedom - The above conditions can be met without freedom (prisoner/slave)

B. Psychological (Is my personal identity acceptable?)
1. To like myself (Do I like who I am?)
a. My status
i. personal
ii. professional
b. My plans to manage my status (Do I like where Im going in life?)

2. For others to like me
a. My status (Do others like my identity as it is now?)
i. personal
ii. professional
b. My actions to manage my status (Do others like the direction my life is headed in?)


II. If not, who do I decide which need is most important / to be done first?
A. Character traits
1. Nature - what behavior is innate (who was I at birth or what cant I change about myself)
2. Nurture - what behavior has been shaped (adaptive response to physical or mental environmental changes over time)

B. Physical changes
1. Environment = danger?
2. Environment = incorrect for activity?
3. Environment = incorrect for schedule?

C. Social changes
1. Direct personal contact (NPC or Player)
2. Indirect social contact (Video, audio, or written information)
3. Internal emotional change (conscious change, not adaptive change like traits)


III. How do I return needs to an acceptable state?
A. Where do I do it?
B. What is needed to do it?
C. When am I to do it?
D. How do I do it?
E. Whom do I interact with to do it?

So..for example, lets imagine you meet one of these special NPCs who is a Captain in the Megalith Military Corporation. Depending on where he is in his schedule...or what his dynamic goals are for the moment...he might have personal or profession needs that arent met.

2. For others to like me
a. My status (Do others like my identity as it is now?)
i. personal
ii. professional
b. My actions to manage my status (Do others like the direction my life is headed in?)

Using this as our expostion & problem to be addressed by the player, he might not be happy with his professional life and want to advance to general. The resulting quest would generate how you could help him do that.

Or perhaps his career is going according to plan, but his wife thinks that he should have been a general by now. The resulting quest could have something to do with convincing her to change her mind or helping her change her husband's rank.

Those arent the greatest examples but hopefully you get the drift. NPCs with their own dynamically shifing goals would create a game where you arent doing the same bloody "take these rat tails to the hobgoblin."

There are a bazillion crux-points in that outline that could be chosen to set off all kinds of quests, change faction, develop character arc. Mix that with one of those internet lists of "37 basic plots" or "1001 master plot arcs" in an automated by dynamic system..and boom you have it.

Obviously not all NPCs could be PLC's with limited server bandwidth and processing speed, but perhaps if you had 50-100 of them it would be amazing.

b) CREATING STORIES/QUESTS ON THE FLY

We've been in contact with a guy named Chris Fairclo who did his Ph.D thesis on self-generating storyline engines.

I invite you to read his doctoral thesis on the subject,dubbed the OPIATE Engine here

I think Olsheep was right when he categorized a list of needs which set certain actions in motion. The real problem becomes getting enough diversity in the list. Let's face it, quest-types can get pretty stale pretty quickly.

AlanC9 brought up another problem when he said "The problem with this sort of content is that there's no logical place to stop, short of going all the way to a world simulator. If you let players kill merchants and farmers, then the world has to react to that. Not just by people starving, but by NPCs mobilizing to protect their food supply."

Once you start going down the road of realism its hard to know where to stop AND hard to make sure that you've planned for all contigencies. Just how much detail (without killing your animators and your scripters) do you go into about the PLC's work duties? How much variety is interesting..and how much becomes boring and tedious?

It wouldnt necessarily be hard to say "let's script it so that if players come to wipe out a town that the town police react when 20% of the citizens have been killed" BUT then what if the police all get killed? So then you have a ghost town with nothing to offer players. Perhaps you could script in that a runner left the town and got word to some higher authority who came in and tried to find those players across the world map. Or perhaps you'd just see if that clan wipes out a certain % of towns they'd get attacked by NPCs..or they would be KOS to any surrounding town.

Great subject. :)
 

galsiah

Erudite
Joined
Dec 12, 2005
Messages
1,613
Location
Montreal
I'm all in favour of procedural content and emergent gameplay, but unfortunately I think an RPG is probably the hardest place to do it.

The reason is that most RPGs are strongly tied to good, convincing dialogue. They are usually filled with NPCs who talk about the world they're in, and draw you into that world. [perhaps RPGs don't have to be like this, but most are]

That means that if your procedural content has significant consequences, NPCs need to be able to react to them and talk about them convincingly. I don't see how that's going to be possible.
In particular, the idea of emergent gameplay is that the system you set up leads to gameplay situations which were unpredictable from the initial setup. How do you write dialogue for unpredictable situations? How can you avoid the need to write dialogue if these situations have important consequences?

I only see randomness and procedural content working in RPGs (in the near future) if they are in a well defined framework, and quite closely controlled. E.g. random fed-ex quests can work, as can slightly more complex random quests.

However, largescale, influencial systems - e.g. economic / environmental / military / political... Will only work convincingly if you can keep them controlled enough so that you can write good dialogue for any situation that comes up. This limits the possibility of emergent gameplay, but I don't see a way around it - in a game with dialogue.

So for an economy, you'd probably need to make sure it remained stable. There could still be adaptive, emergent occurences in the game - e.g. dynamic trade routes, dynamic item prices, new shops set up / closed down etc. All this could occur reasonably without requiring every NPC to know/talk about it. Perhaps you might have some saying e.g. "X is cheap around here these days", or "There's a new X shop over in Y" (although voice acting would limit such possibilities of course).

You simply couldn't allow economic collapse of any area though, unless you can be sure of exactly how / where it'll happen, and write convincing dialogue. It is not reasonable to have largescale economic / military / political / environmental disaster without every NPC in that area having something to say about it.

The strict controls that would be necessary to avoid massive change might end up being very limiting. I agree that it is a reasonable possibility to approach a decent "world simulation" in RPGs. It is not a reasonable possibility to have NPCs react convincingly to the changes though. Unless there is a way around this, any procedural system will need to be tightly controlled. Any largescale "emergent" gameplay will need to have been predicted and taken into consideration by the developers.
 

Allanon

Augur
Joined
Oct 11, 2005
Messages
249
Nog Robbin said:
Anyway, the concept is relatively sound. If you can provide a genuinely life like world and have some quests genereated by the characters based on their needs you have the basis of a great game.

How exactly this would make the game great? It might feel more realistic, sure, but I don't believe it will make a good gaming experience. Quests are basically adventures you undertake for gain of some sort, being it loot, fame or experience points. However, the resulting gain is only the reward, while the plot of the adventure itself is the reason for playing it in the first place. Right now I can't imagine how you could generate *plot* for the quests.

DarkSign said:
Those arent the greatest examples but hopefully you get the drift. NPCs with their own dynamically shifing goals would create a game where you arent doing the same bloody "take these rat tails to the hobgoblin."

How exactly by scripting the NPC to figure out its own needs, will generate more interesting plots for the quests? Or is this strictly theoretical? I'll check out the OPIATE engine, for some answers.
 

Klinn

Novice
Joined
Nov 3, 2005
Messages
98
Allanon said:
Even if a certain need gets a priority over others (which is usually the case anyway), why would NPC ask for help? Computable solution based on NPC's abilities will always exist, no matter how hard it might befor the npc to succeed. For example, NPC might want to retrieve a valuable item from a thief. Based on his abilities, the probability of his success might be very low.
I think you're zeroing in on a core mechanism for generating quests: they are not so much about fullfilling an NPC's need, but resolving the conflict between two of their needs. E.g. they really want item X but also want to stay safe. Since their fighting skills are low, the chances of their successfully battling and acquiring X without being killed are also low. But they still want item X. How to resolve the conflict between needs? Try to tempt the player into doing the dirty work for them.

For a more heroic storyline, it's even more satisfying to apply this 'two-need-conflict' to groups of NPCs, e.g. the villagers really want to storm Dr. Frankenstien's castle because of the threat it represents, but are terrified of what they might encounter. So in steps the player hero who takes it upon themselves to resolve the conflicting needs.
 

Allanon

Augur
Joined
Oct 11, 2005
Messages
249
Klinn said:
I think you're zeroing in on a core mechanism for generating quests: they are not so much about fullfilling an NPC's need, but resolving the conflict between two of their needs. E.g. they really want item X but also want to stay safe. Since their fighting skills are low, the chances of their successfully battling and acquiring X without being killed are also low. But they still want item X. How to resolve the conflict between needs? Try to tempt the player into doing the dirty work for them.

Definitely makes sense. However, how npc can be certain that the player might help? Just to take it to extreme, let's assume the player plays a fighter character and a certain npc asks him to steal a certain item, without being detected. In that case, the player won't be able to participate. This kind of conflict might lead to high amount of quests being generated without the player being able to help. On the other hand, if such quest was written by the developers, they might have come up with a clever way for the fighter to finish this quest as well, by making sure alternative solutions were possible.
 

galsiah

Erudite
Joined
Dec 12, 2005
Messages
1,613
Location
Montreal
EDIT: Allanon - it really doesn't matter if a fighter can't do 50% of the quests if they're procedurally generated, since there will be an unlimited amount of diverse quests for pretty much every NPC. Not being able to do some quests is only a problem if the number of quests is limited - with procedural generation, it is impossible to finish all the quests, since there are an infinite number.

Only being able to accomplish some quests should make the situation more convincing - if you're a fighter and you choose to get item X for NPC Y, it'll probably be harder. However, who says you have to steal it? The NPC only has a need for that item - how you get it is up to you. Perhaps you can barter for it / offer to fulfill a need of the other NPC for it / kill the NPC for it...

It's unlikely that a need-generated quest would require the "undetected" part - what NPC need does that correspond to? Perhaps the NPC has other requirements, but they could probably be satisfied in other ways by a fighter. If not, it doesn't matter.


I just thought of a problem with these kind of "need generated" quests, but that quickly turned into a solution, and a "That's actually quite good.". Perhaps this is quite obvious, but I thought I'd spell it out, in the spirit of brainstorming.

Problem:
NPC ... has a need ... which is unfulfilled because of situation(s) ...
All the NPC knows (in the game code, and possibly in the game world), is that his need is not fulfilled.
In most cases, the NPC won't know exactly what combination of factors is getting in the way of his need.
Even if he does know, it's not clear how to spell that out to the player (procedurally) if there are many factors.

So how can the NPC give the player a quest?


Solution:
The NPC just tells the player the problem - i.e. his unfulfilled need(s) -, and leaves the solution to the player.

This would mean you don't get quests like:
I'm really hungry and don't have any food. Please go to NPC ..., tell him about ..., persuade ... to ... and together find ..., then bring it to ... and all will be well. I'll give you this reward if you succeed.

You'd get quests like:
I'm really hungry and don't have a food supply. I'll give you this reward if you can help me.

This automatically means that the player will not be told exactly how to solve a quest, since the NPC won't know in general - the game doesn't even know. In some cases, solving the quest might not even be possible - but that's life.

This just puts the onus on the player to discover the causes of the problem, and find a way to remove enough of them to solve the problem. The player might have to ask around to find information. Importantly, that's what he'd be doing - not finding Quest-NPC-X to get Predefined-Quest-Info-Y, but actually asking around about little bits of information from various NPCs, which may or may not shed light on the situation.

For instance, merchants could tell the player when they last had a delivery of X; town guards could tell the player when they last encountered bandits, or if there has been any unusual disturbance; guards could also give information on recent thefts; any NPC could tell the player if he's been attacked, has seen an attack, or been stolen from (and what was stolen)...

Getting this information needn't be easy of course - if you've pissed off local guards, don't expect much help from them...

So say you've offered to help a starving family get a food supply. You might talk to local food merchants. Perhaps there have been no grain deliveries for ten days. You might talk to local farmers. Perhaps some have been attacked, others stolen from, and some are no longer on their farms. You might talk to town guards, and find that they've been having trouble coping with many bandit attacks from the west over the last week.

Putting all this together, you might think that bandits have arrived, and that they've been stopping merchants getting through to the town, and attacking farms (you might be wrong, of course). Why have these bandits been doing this? You don't know, but perhaps they'll be able to tell you.

You set off, find the bandits' camp, prepare to fight, but try talking to their leader first. It turns out they are deserters, having left army X after fighting on front Y and having become disillusioned with the endless killing. Fearing attacks from both sides, they have turned to banditry, but only to obtain food. They'd much rather be fighting for a noble cause, of course, and would only require modest pay...

Kill the foul, disloyal deserters?
Inform captain of army X of their presence?
Hire them to help you on noble quest Y?
.....


All the dialogue for these sorts of things would need to be fairly general, but many different situations would be possible. The player would need to play detective, and to fill in the gaps himself quite a bit, but that could make things more involving if handled well. The player wouldn't feel like he's reading a script, but that he's piecing together actual events from a series of clues.
 

Allanon

Augur
Joined
Oct 11, 2005
Messages
249
galsiah said:
EDIT: Allanon - it really doesn't matter if a fighter can't do 50% of the quests if they're procedurally generated, since there will be an unlimited amount of diverse quests for pretty much every NPC. Not being able to do some quests is only a problem if the number of quests is limited - with procedural generation, it is impossible to finish all the quests, since there are an infinite number.

That's exactly the problem. You don't need an infinite amount of simple quests. I think the whole point of quests in role playing games is to present the player with intricate and unique dilemmas and allow him to find his own way out. FedEx quests are usually not popular. I agree that investigating the case on your own sounds interesting, but also daunting. Once in a while a good investigation quest is nice, but turning stones all the time isn't.
 

Mangler

Novice
Joined
Jan 23, 2005
Messages
67
So a PC can kill some important-NPC, and break all the quests associated with them.

Bit of a lame system if it can't adapt to changes like that.

What happens if you kill a King/President/Leader?

What nobody has mentioned yet is a Global meta-state:

A Nation needs Kings;
Kings need a kingdom,
Kingdoms need Security and protection,
Land (for safety and food, mining, ect...),
Resources (from trade or war),
Influence (stop your neighbours from stealing the above),
and a bunch of other stuff.

You could add annother state-property like:

Nation affiliation (Like Kingdom of Gondor)
Group affiliation (Farmer guild of Some Town)
Class affiliation (Farmer/Peasant)
Affiliation rank (Leader of Farmers)

And Make several Super-Groups become a Nation/State.

And you've got annother layer of simulator to program. (Infact a complete, AI controled Civilization type game more or less)

See why nobody has the cojones to design/develop/test and MARKET such a beast?

The chance of failure to the shareholders would look like 99% because such a risky thing has NEVER been tried before.

Even SPORE is built from elements from other games.

So to get to my point of HOW a quest could NOT be broken:

There are several 'Universal' Quests:
(For example)

D. Many quests are tied to events in the general world.

C. Find out what is hapening in the world (in general).

B. Find evidence about some 'evil force' acting against your/a nation.

A. Destroy/Help/Join the 'Evil' Necromancer/Dragon/Cyborg plotting to distroy/enslave/conquer the world.

So to fill out the requirements of UQ 'D':

1. Some merchant/baron/mage wants you to bring him news about some other places or nations.
2. Infact he will constantly want more info especially on the prices of 'Magic Crystals' in other towns and cities. (as its messing up the local economy)
4. The Merchant/Baron/mage may want you to find the biggest 'Magic Crystal' Mine or other secure source.
3. He will want you to enshure the supply for 'Magic Crystals' is secure against competetors/raiders/corrupt officials/greedy Mages/Ogres...

'C':

1. Find out why his 'Magic Crystal' supply keeps running low/out.
2. The source of these drains to the 'MC' supply.
3. Take steps to stop the get alternate sources of 'MC' or
stop whatever is draining his supply of 'MC'.

'B':
1. The most of the 'MC' sold near towns around 'Black Mountain'.
2. Find out the buyer(s) of these 'MC' and why they would need so many.
3. Locate where the buyer keeps all these 'MC'.

'A':
1. Talk to whomever is the leader of the groups buying the 'MC', find out what they want it for.
2. Take this info back to the Merchant/Baron/whoever.

3. Discover that the entire (Merchant/baron/mage) guild/group have been wiped out by a angry horde of Trolls for not paying their bridge fees.

4. The Trolls however STILL want their $$$ and would have taken it out of YOUR hide had you not told them about somebodys 'Magic Crystal' horde,
They want you to steal the 'MC' horde to pay off the Merchants/Barons/mages debts. (and stop them from eating you if you don't pay them back)

5. Get back to 'Black Mountain' and get inside the caves where the 'MC' "MUST" be kept.

6. Try to get the 'MC' from the underground caves (with a horde of Trolls running behind you who may or may not be helpful) and get out of the place alive.

7. Discover the 'Arch Villan' and:

Kill 'em,
Help 'em (and mabey he/she/it will waste those pesky Trolls bothering you)
Run away from 'em (and hope the trolls try and steal the 'MC' and get killed off by the traps/guardians/'Arch Villan')
Join 'em and help make the world a better place (for Arch Villans of course!)
Steal their treasure and hope the Trolls will try and fight off the 'Arch Villan' leaving you to escape.

Basically what I said was:

As long as the general outline is the same, you can change details quite dramatically and still have a similar effect.

For instance I could have replaced Trolls with Brigands, or Tax collectors (Merchants were 'made an example of', selling 'MC' without a licsense AND NOT paying taxes for it.), or some Paladins (who 'accidentaly' killed off the guild, resisting a search...heretics they must have been trying to buy the now illegal 'Magic Crystal')

The master storyline remains the same; but various story modules can be swapped in and out of it to still complete some of the same goals.
 

Mangler

Novice
Joined
Jan 23, 2005
Messages
67
The end

Also on annother point:

When does the game end?

Does it finish after one of the 'A7' goals are completed?

Or could the system take all the other stuff into account and keep going forever?

(Might be cool to be the "Arch Villan's" head henchman and help conquer/save/whatever the world... It could be a whole new "DCBA" set of quests after the first set, but much harder)
 

galsiah

Erudite
Joined
Dec 12, 2005
Messages
1,613
Location
Montreal
Mangler:
But how is that interesting after the first time? It's better than nothing, but after a while it'll become obvious that you're doing quest type X, and just filling in the blanks. Either you'll do that quest type a lot - and get bored with it -, or you won't - in which case why not have all the quests written individually?

It's no more emergent than random fed-ex quests - it's just more complex, and has a little window dressing. It's better than nothing, but not inspiring.


As to your "global meta-state" idea, I don't see your point. That could be used, but it's not necessary. Why introduce a new idea which isn't completely necessary (but might be interesting), then say it's not workable? So what if it isn't?

What is so complex about that anyway? Extra levels of organization are there to organize systems. So long as there are quite a few interactions on that level of abstraction (which again, there may or may not be) they make things easier, not harder.

Also, I find this a little silly:
...to design/develop/test and MARKET such a beast?
The idea that the hardest aspect is the marketing is nonsense. Marketing these things is easy, you can use terms like "Emergent gameplay", "Immersion", "World simulation", "Infinite potential"; you can say that the player is part of a living world which responds to his every action - that the player can shape the world through his deeds...

The hard part is living up to the hype with solid design and construction.


Allanon said:
Once in a while a good investigation quest is nice, but turning stones all the time isn't.
But it needn't be "turning stones" a lot of the time. For most quests, if the goal is "Satisfy need X", the player will have a good idea where to look. Either a quest will be completely linear - i.e. a series of connected fed-ex stages -, or it will involve some player decisions along the way.

Admittedly, total freedom / unconstrained decision is not usually interesting - most people find it difficult to handle. However, as soon as you get a quest goal, that narrows things down considerably.

Take my example above:
The NPC has no food. So where do you go first? - farmers / food merchants. Not rocket science. Farmers attacked, merchants not supplied - something's up, so talk to the guards. Learn about bandit attacks. Investigate.

The obvious course of action turns the above into a fairly clear, linear process. No-one is holding your hand, but it's not hard to see what to do. Once you find the bandits, you have a more important choice, with potential medium / long term consequences (e.g. your reputation if you turn them in to an army captain, or kill them all; your prospects in a new quest if you need to hire armed help...).

If you want elaborate, quests with detailed dialogue and writing to be procedurally generated, you'll be waiting a long time. With enough reasonable in game possibilities, random quests can certainly offer many choices to the player. If general in game actions have consequences, then those choices will also often have consequences.

For example, hiring deserters could annoy certain factions, limiting your options with them; offering to protect the farmers might please the locals, but possibly upset the travelling merchants (complicated to implement, but possible); offering protection to the merchants might have the reverse effect. Solving the problem temporarily, collecting the reward, then leaving the locals to suffer, might have consequences (even if the recurrence of the problem wasn't your fault, that doesn't mean you won't get blamed if you claim to have fixed things, but they go wrong soon afterwards).


Not all offered quests might be this simple - sometimes it might even be impossible to identify a few clear causes, or to do anything about the many causes. In that case, the player will just have to admit that there's nothing he can do, and move on. Of course that would seem strange to most players at the moment, since current games almost entirely have pre-written quests, and also allow any player to complete them. The player doesn't think "Perhaps there is no way to solve this problem", but rather "This is frustrating, I can't find the trigger for the next stage of this quest." Which of those gives the impression of a real world?

If there were an infinite amount of potential quests, and solutions were emergent, there would be no need to make sure every problem had a solution, or to worry that the player was missing out on the next parts. It's not hard to let the player know this - you can write it in the manual: NB you won't be able to solve every problem you come across - sometimes NPCs will have problems with no solution. Alternatively, you could have an NPC early in the game tell you something like:
"Remember, you're talented, but you're not all-powerful. You won't be able to fix everyone's troubles. If you've offered to help, but you can't find a way, just be a man and admit it. Move on to something more productive."


Of course, there's also potential for the player to "set up" quests, with this kind of system. For instance, perhaps all the grain merchants travelling to a certain town are getting wounded (or killed) by a mysterious archer, so they've stopped coming. At the same time, local farmers have found their tools stolen, and have no way to get new ones, since the merchants aren't arriving.

In comes the player, who offers to get the food supply going again, for a large reward, and offers to find tools for the farmers - for a large reward. Then all the player needs to do is to stop attacking the merchants, and return the tools he stole, and he's laughing - until someone puts two and two together, of course.
 

Allanon

Augur
Joined
Oct 11, 2005
Messages
249
galsiah said:
Admittedly, total freedom / unconstrained decision is not usually interesting - most people find it difficult to handle. However, as soon as you get a quest goal, that narrows things down considerably.

That's what I was referring to with "turning stones". In your example, you created a very nice chain of logical straightforward events, which anyone could figure out. No food on the markets->the supply chain is cut->Bandits. From players perspective it's fairly easy to figure out what's the first step. However, procedural content might create situations where the player will be at loss. For example, the same farmer might complain his tools got stolen. It just might be the case of a perfect crime...nobody will be able to give clues because the thief successfully got away with it.

As a matter of fact, all your examples seem highly theoretical to me. Frankly, I was talking about the practical side of procedural content, as something that is possible to implement today. Unless I'm wrong, I see absolutely no way to implement the system you are talking about...making npcs act upon a set of needs, is scripting. Making them come up with a dialogue isn't. In your example, I really have no clue how to make the city merchant tell the player about the cut supply lines, or how the military will share about the bandits’ attacks from the west. Right now I imagine some sort of a wiki system, similar to what was implemented in Morrowind...which wasn't fun at all. You can expect one liners, and even then I have no clue how to come up with them on the fly in real time.

If you want elaborate, quests with detailed dialogue and writing to be procedurally generated, you'll be waiting a long time. With enough reasonable in game possibilities, random quests can certainly offer many choices to the player.

Quantity over quality is really a bad idea when gameplay is concerned. As excited I am about the possibilities of procedural content, it won't make fun games. I was thinking about combining the good old human designed quests with stuff generated by PC, but it seems impossible.

The player doesn't think "Perhaps there is no way to solve this problem", but rather "This is frustrating, I can't find the trigger for the next stage of this quest." Which of those gives the impression of a real world?

Why do you think the players want this? It just doesn't make sense, to wander around in a world full of people with problems (ranging from mundane to epic), some of them might be irresolvable...I mean, where is the fun? As a simulation it might be very realistic, but we're still discussing games.

"Remember, you're talented, but you're not all-powerful. You won't be able to fix everyone's troubles. If you've offered to help, but you can't find a way, just be a man and admit it. Move on to something more productive."

Why am I playing then?
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom