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.

Procedurally generated dialog/quests and the Diplomat.

SpaceKungFuMan

Scholar
Joined
Nov 19, 2007
Messages
253
I posted this at Iron Tower, and figured it might be worth discussing here too.

The way that I see it, there is no reason that 90% of the dialog in a game which offers viable non-combat options can't be procedurally generated. The system I propose would involve assigning "dialog stats" and "quest stats" to NPCs, in the same way that combat stats are assigned now. Essentially, dialog stats will determine how hard it is to convince an NPC of something (think of how the player's Strength and the NPC's Defense are used in combat). Quest stats will be fields allowing for randomly chosen desires/fears/motivations to be assigned to each NPC. An example is the easiest way to demonstrate.

Player wants to get past the gate. The gate has a guard. The player has three immediate options: 1) attack the guard, 2) hide until either the guard says something to himself, talks to someone else, or in some other way gives a clue about motivation (success is based on stealth ability), or 3) go talk to the guard.
When you talk to the guard, you will have a randomly selected set of options, including trying to bribe him, trick him into letting you pass, or intimidate him/appeal to authority. With a sufficient skill check, you can succeed at any of these, but the skill checks are so high, that you will only succeed if you really outclass him, much like how you can one shot kill rad scorpions later in fallout, because you're so much stronger than them. You will also always have some sort of small talk/feel out the situation option, the purpose of which is finding out the guard's motivation. So he may say "I can't be bothered by you now, I'm looking for my lost dagger" or "You can't come in here. Don't like it? Tough, I don't like that I forgot my lunch either." Better writers than me could obviously craft better options. The key is that all of these possible lines are procedurally generated, so that no two guards will say the exact same thing twice. The more frameworks, and objects included, the lower the chance dialog which just feels repetitive.

The real aim of the encounter is to obtain some information, either by overhearing, or asking. In addition, once you initiate the fact finding with the guard, randomly generated NPC's could be placed on a bench talking about a problem the guard is having, or something similiar. So, armed with knowledge about what the guard wants/fears, you have to set out to find it. This will be accomplished by randomly generating NPCs who either have the item the guard wants, know a secret about the guard you could black mail him with, etc. Ideally, either multiple NPC's, each with a different possible "key" to pass the guard are generated, or multiple existing NPC's have the keys and accompanying random dialog assigned to them. Of course, these NPC's probably won't just give the item/information up, and they will each have something THEY want. Again, randomly generated. In this way, an entire bargaining chain resulting in getting the key to get past the guard has been procedurally generated.

Of course, it doesn't have to stop at bargaining. Maybe Farmer Bob won't give you his sandwich unless you get revenge for stealing his pig/having sex with his daughter/building his fence on Bob's property. So you have to go to the person Bob designates and work out a solution. Of course, for a non-violent resolution to that, you'll probably have to do a favor for this person too. This could result in a pretty interesting and unique quest line to get into the castle, and none of it has been custom made.

The key to this whole system is to have a large selection of possible tasks, each with multiple frameworks for the introductory language (since having a randomly picked dialog choice with randomly filled in information will keep things feeling more unique and less procedurally generated) and each with a variety of randomly chosen solutions. Since we don't want to eliminate combat from the game entirely, we could even have randomly generated combat encounters like saving a daughter from kidnappers or recovering a stolen item from a local street tough thrown in. Of course, even these encounters could have randomly generated non combat solutions (maybe sometimes the street tough's gang can be turned against him, and sometimes he's standing below a window you could push a flower pot out of to knock him out).

Another important point is that each of these randomly generated quest lines will actually have different possible solutions. So maybe you don't have the skill set to complete the line for the sandwich, but you do have the skills to get the information to blackmail the guard. A wide variety of stats could be incorporated into these randomly generated quest lines, to make sure that every skill in the game is actually useful. When you get to short circuit the entire quest line because you have a high enough medicine skill to cure the sick kid instead of having to barter for the drugs, you'll really feel like you're character is interacting with the world, instead of ignoring his own skill set just because the linear quest design doesn't permit him to remember that he's the chief of surgery. And unlike with conventional games, no hand written events are skipped by using skills as a short cut, so you don't have to worry about missing content.

I know this is all rough, and maybe a little bit confusing, but I think there is real merit here. While implementing these random quest fragments is more time consuming than throwing together filler combat, the return on investment is MUCH better than time spent hand crafting dialog. I think this system is preferable to abstract persuasion too, because it allows the player to use diplomacy in the same way for random encounters as key story dialogs, much like how a combat character uses the same combat engine to fight 30 rats as the king of the trolls. I'd love to hear what people think of this idea.
 

SmokedWolf

Scholar
Joined
Jul 19, 2007
Messages
158
I have thought that to have to a good procedurally generated dialogue system some more complex model of mind must be implemented into npc interaction.

The model I think that would work best would be one of relational value. The npcs have a number realating to certain ideas/values/objects/people and they are also linked to a database giving them their own unique knowledge. From these two sets of information ai behaviour, and so dialogue script, would be produced.

From here, we could then produce your quests, based upon the relationship values of the npcs to the world and you.

~Just a thought
 

elander_

Arbiter
Joined
Oct 7, 2005
Messages
2,015
"The key to this whole system is to have a large selection of possible tasks, each with multiple frameworks for the introductory language (since having a randomly picked dialog choice with randomly filled in information will keep things feeling more unique and less procedurally generated) and each with a variety of randomly chosen solutions. Since we don't want to eliminate combat from the game entirely, we could even have randomly generated combat encounters like saving a daughter from kidnappers or recovering a stolen item from a local street tough thrown in. Of course, even these encounters could have randomly generated non combat solutions (maybe sometimes the street tough's gang can be turned against him, and sometimes he's standing below a window you could push a flower pot out of to knock him out). "

I think your ideas are good, specially the part where you mention multiple solutions. Procedural quests give it a certain roguelike feeling and make the world seem more alive. Also SmokedWolf made a very good suggestion. You should have a table of faction relations and reputation tags and use it to control npc reactions.

It would be simpler if you split a quest into steps.

1) Conditions to offer a quest or if the quest isn't offered how the player knows about it, where and in what frequency does it appear. One thing about procedural quests is that they can be repeated and so npc roles, items and places that are part of the quest have to allocated anew each time the quest is created.
2) Quest continuation (when the pc accepts the quest if a verbal offering is used or knows about it). This is when the game should create a new quest from it's template.
3) You can further split your quest into steps here like a chose your own adventure game, where choices are made available as dialog options, reputation/faction checks, random rolls, skill checks or whatever is suitable.
4) Quest completion (the final step where you decide in how many ways the player can complete a quest). Finishing the quest will automatically free all resources used by the quest.
 

Nael

Arcane
Joined
Dec 12, 2005
Messages
11,384
Location
Indy
If I'm reading you correctly it sounds like Daggerfall on a daily regimen of HGH. Obviously you would need a large sandbox type environ for it to work ala DF, otherwise the random nature of procedural generation of conversation topics would become fairly repetitive after very few iterations. The man hours to do something like this and have it work would unfortunately and most likely be too much for an indie studio.

I dunno though. I admit that I have fairly sparse experience when it comes to game design, but it strikes me as a moon shot. If it worked... Jesus Tap Dancing Christ, think about the replay value! If it didn't work it would probably be nothing more than a curiosity; a bauble to be hung from the Tree of Novelty. And you would've spent a lot of time trying to get it working for naught.
 

Hory

Erudite
Joined
Oct 1, 2003
Messages
3,002
SpaceKungFuMan said:
While implementing these random quest fragments is more time consuming than throwing together filler combat, the return on investment is MUCH better than time spent hand crafting dialog.
Is it? Maybe it is better to have this sort of random quests instead of just random combat, but I doubt they'll be of greater dramatic value than hand-crafted ones. Complexity may be simplicity multiplied, but hand-crafted complexity hides the multiplication of simplicity better than the random chaining of the basic blocks. And what will these blocks be? Fed-ex missions, kill-the-boss challenges, sneaking segments, all linked shallowly.

This system, by its nature of duplicating building blocks, will prevent having original challenges. Do you think that with this system you could eventually generate a scene similar to the Diner robbery in Pulp Fiction? And if you could, 30 minutes later you could be robbed again, because this would have to be one of the basic blocks. And 30 minutes later, you'll see another couple in love, willing do to crazy things together. And 30 minutes later, another panicked/irrational NPC that you'd have to calm down. But maybe this time it won't be a woman. Big deal.

Don't get me wrong, I'm interested in free form dialogue (will start a thread soon), but for the sake of interactivity freedom, not limiting the importance of writing. The time spent hand-crafting it is almost irrelevant. Games are now being developed with the contribution of hundreds of people. They don't have enough writing because it's not seen as a priority.

Say no to procedurally generated art. :)
 

Herbert West

Arbiter
Joined
Nov 19, 2007
Messages
1,293
When shall we witness the first procedurally designed game, I wonder :wink: ?
 

SpaceKungFuMan

Scholar
Joined
Nov 19, 2007
Messages
253
Smoked Wolf, Elander -Obviously, implementation would require a much better worked out system than I proposed. I just wanted to offer a basic model that showcases the idea. But these are both logical extensions.

Nael -I was actually thinking entirely the opposite. If the random events are not called constantly, then it will take longer for perceived repetition to occur. Maybe I wasn't clear in the first post, but what I really intended was for this system to be implemented in a somewhat limited extent, ad a means of using dialog skills to progress through the game in situations that normally would have involved combat. I recognize that it would be very expensive to implement this much original dialog, especially relative to putting in cheap to implement combat. That's why I see this as a way to have a reasonable compromise between the demand for hand crafted non-combat solutions, and cost savings.

Hory - I'm not claiming that this system can or even should replace hand crafted dialog. What I'm saying is that this system could be implemented to give enjoyable non-combat options to encounters which would have only had a boring fetch quest or combat as solutions.
 

galsiah

Erudite
Joined
Dec 12, 2005
Messages
1,613
Location
Montreal
Hory said:
This system, by its nature of duplicating building blocks, will prevent having original challenges...
That only applies if the granularity of the blocks is much too large. If each challenge is formed of one or two "blocks", naturally it'll get repetitive very quickly; if each challenge is formed of, say, 50 fine-grained "blocks" knitted together in one particular way, it won't be repetitive. It's important to realize that it's not just the building-blocks which make the difference here - it's how they connect. Constructing a situation from 10 blocks gives you an absurd number of possible configurations (e.g. if any block has only one binary relation to each other block, that's 2^90 [EDIT oops, 2^45 :)] configurations). Using 50 gets even sillier.

You only prevent originality by having the individual elements be too large - so that any combination is already pretty obvious, or too large-scale to be considered at once. Have the blocks be simple enough, and you can get a load of emergent interesting situations.

And if you could, 30 minutes later you could be robbed again, because this would have to be one of the basic blocks. And 30 minutes later, you'll see another couple in love, willing do to crazy things together. And 30 minutes later, another panicked/irrational NPC that you'd have to calm down.
I fail to see why having these kinds of possibilities is a bad thing....

I started a counter-argument, but thought I'd do well to read the original post again beforehand. Your points are probably reasonable as a response to the SpaceKungFuMan, since he's sadly used the word "random[ly]" fifteen times more than he should have (i.e. 15 times).

Having these sorts of situation constructed randomly is a daft approach, since the world will lack any overall coherence - and possibly even lack internal quest coherence. That's no argument against procedural/emergent quests in general though - they just need to be constructed on a non-random basis.


...not limiting the importance of writing. The time spent hand-crafting it is almost irrelevant.
Using a non-hand-crafted system for writing isn't necessarily limiting its importance at all. In a static/linear context it would be, since the writing gains little/nothing from responsiveness/versatility in the face of dynamic/unanticipated gameplay situations, yet loses a lot in not having a human writer.
In a highly dynamic, non-linear context, generated writing is the only kind that can respond to the current situation - the clearest case being an emergent situation which wasn't anticipated at all by a designer. In such a context a procedural system isn't simply being used to save time - it's being used to allow a highly dynamic world to remain responsive to player-action/world-events in writing, no matter the path taken.

What makes sense depends on the type of game. Clearly tacking a procedural system onto something like PS:T would be absurd. It has its place nonetheless - to do more than save development time.

Say no to procedurally generated art. :)
But say yes to procedural (i.e. versatile, highly responsive) methods in interactive art. (and say no to an exaggerated emphasis on static art in a medium which is defined by interactivity/dynamism)
 

SmokedWolf

Scholar
Joined
Jul 19, 2007
Messages
158
What I think would be both possible and immensly enjoyable would be to see dialogue written for the specificc value sets that npcs could have. So you could speak to the intellectual who speaks verbosely on the subjects that interests, using all the big words in all the right places, and alongside you could have the great pretender to intellect (you know who you are) who has all the big words that the intellectual knows, just doesn't know how to use them. Imagine a complex system where the few base values of the npcs mentalscape affect speech, indirectly through knowledge.

edit: I can't type
 

SpaceKungFuMan

Scholar
Joined
Nov 19, 2007
Messages
253
Posted on both forums - When I said random, all I really meant was the choice made at the end (and some other specified portion) of the stat based decision tree. Basically, at every step where what I called a "random" decision needs to be made, the system will generate an answer using an equation that factors in NPC stats, location, and the number of times that particular answer has been made, to avoid repetition. So if there are 500 possible goal items some will be eliminated based on what the guard's stats are, so he can't get the pink tutu but it likely to get the dagger, drinks, or money. Maybe this guard lives in a very pious town though, so the drinks are eliminated too, and the quest start for money will skew towards an option like needing it for a sick kid, vs to pay off gambling debt. The only reason that I used the word random to describe this process is that you can't have it entirely determined by stats, otherwise you'll get the same outcome every time in any given situation, which kills replay.

Smokedwolf - that would be amazing, but I guess I'd be concerned about overuse of the archetypes. Maybe that could work as a sort of second generation version of my system, once the core quest functionality was in place. Although it would not be hard to do it in a basic way by having different sets of possible quest prompt structures and details based on intelligence, personality, etc. While it might not reach the complexity of the intellectual vs pseudo intellectual, it would add a lot to the world.
 

Oarfish

Prophet
Joined
Sep 3, 2005
Messages
2,511
It would also be interesting to generate the PC's dialogue based on the characters perception of the situation they are dealing with and the desired outcome. Diplomatic mistakes are as likely to be caused by a misunderstanding of the situation as a lack of tact.

That would even help to make dialogue far more dependent on character rather than player skill, while still giving the player interesting choices.

Exactly how the hell you would model that is the obvious problem though :)
 

SpaceKungFuMan

Scholar
Joined
Nov 19, 2007
Messages
253
Oarfish said:
It would also be interesting to generate the PC's dialogue based on the characters perception of the situation they are dealing with and the desired outcome. Diplomatic mistakes are as likely to be caused by a misunderstanding of the situation as a lack of tact.

That would even help to make dialogue far more dependent on character rather than player skill, while still giving the player interesting choices.

Exactly how the hell you would model that is the obvious problem though :)

Well, Sheppard in ME does that basically, and we all know how well that went. . . Of course, your idea involves actually showing the player what the char will say, which is much more interesting, and prevents the problem of not saying what you think you will in ME.
 

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