Search Unity

Procedural quest generation

Discussion in 'Game Design' started by TonyLi, Nov 18, 2014.

  1. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    In the other thread, a judgment system gives characters:

    • An importance value for each Motivation (Security, Pleasure)
    • Affinity values (like/dislike) toward other characters.

    Characters also have other data that I'll describe by way of an example quest:

    Farmer Fred offers the player 50 gold to kill 5 wolves in his field.

    • World State Observers: Information the NPC is interested in tracking (e.g., the number of hostiles in the farmer's field). World State Observers are semi-hardcoded right now. This is a weak point in the system.
    • Quest Assets: Prefabs the NPC can spawn when creating quests (e.g., a wolf spawner). They have motivation values, and some other attributes to help choose appropriate assets.
    • Rewards: Things the NPC can offer the player to take the quest, such as currency.
    • Dialect: A lookup table of phrases. The "Hello" lookup for a knight could be "Salutations, good sir," while for a pirate it could be "Ahoy, matey!"

    The system (not individual NPCs) also has a library of Quest Templates and Conversation Templates.

    A Quest Template defines a generic quest structure. For example:

    Quest Template: KillTargets
    • Conversation: KillTargetsConversation (one or more quest conversations; see below)
    • Description: "[giver] has offered you [reward] to [kill] [count] [targets]."

    A Quest Conversation defines a generic conversation that can be used by quest templates.

    Quest Conversation: KillTargetsConversation
    • Giver: (new) "[Hello] If you [kill] [count] [targets], I'll give you [reward]."
      • Player: Okay.
    • Giver: (active) "Have you killed [count] [targets] yet?"
      • Player: No.
      • Player: Yes.
        • Giver: "[Thanks] Here's [reward]."
    • Giver: (done) "Thanks for completing the quest!"

    So for the farmer's quest: He has positive affinity for the player, so he'll offer a quest. His field is empty, but he has a wolf spawner in his assets. The KillTargets quest, combined with the wolf spawner, meets his primary motivation, which is Security. His resources include 50 gold, so he offers a 20 gold reward, which is equivalent to the difficulty value of the wolf spawner. The generated quest looks like this:

    Description: "Farmer Fred has offered you 20 gold to exterminate 5 wolves."
    • Farmer Fred: (new) "Greetin's! If you exterminate 5 wolves, I'll give you 20 gold."
      • Player: Okay.
    • Farmer Fred: (active) "Have you killed 5 wolves yet?"
      • Player: No.
      • Player: Yes.
        • Giver: "My thanks to ye! Here's 20 gold."
    • Farmer Fred: (done) "Thanks for completing the quest!"

    In practice, the quest templates and especially quest conversations are more elaborate. But, even so, my test scenes have just felt very artificial and meaningless. Perhaps I haven't leveraged affinities enough. But I'm afraid that if all of the quests involve asking the player to act against other NPCs that the quest giver dislikes, everyone will end up dead. What am I missing?
     
  2. randomperson42

    randomperson42

    Joined:
    Jun 29, 2013
    Posts:
    974
    Is this an extension you're trying to make? A game?

    For a long while I've been thinking about a relatively similar concept I would like to try for an asset store pack but it would be pretty huge and I've got other project(s) I'm busy with so it would be a while before I could announce anything.
     
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I wonder if it is right to have the quest itself spawn the wolf spawner. I know the quest system is not the farmer, but it still feels like the farmer is creating his own troubles just so the player can solve them. Perhaps that's why the quests feel meaningless?

    An alternative (though perhaps harder?) approach would be to write some evil-god code that goes around causing trouble for the poor NPCs... and then have those NPCs offer quests to sort it out. So this would mean, whether you've talked to the farmer or not, he's got wolves in his fields and is unhappy about it. Now you (as the player) aren't causing problems just by talking to people; the problems are there, whether you choose to ignore them or not.

    Though on a functional level, maybe this is no different, except that you spawn the quests right away instead of when an NPC talks to a player (which maybe you're doing already, I don't know). Hmm.

    Another thought is: this quest is considered complete after killing X number of wolves... but the poor farmer still has a wolf spawner in his field. It'd feel much more satisfying for me if I could remove the source of the problem. So, instead of adding a spawner, maybe you should just create N wolves, tied down to a certain point and radius, so that after they've been killed then the farmer is truly safe.

    I think you're right that you can't just have the player be everybody's hit-man, killing other NPCs. You could randomly generate fetch-quests and collection-quests instead... but how do you make those actually interesting? I don't know. Even when they're hand-written, they're usually not terribly interesting to me.
     
    URPian, _met44, Ryiah and 2 others like this.
  4. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Do all the quests have to involve killing? :) How about giving the developer the ability to plug in their own dialogue. Plenty of games have generated quests and some of them are really boring and hated by hard core gamers. On the other hand, they are great for newbie players and a fantastic way to help crafters to gain experience and up their skills without grinding away for hours and tossing silly newbie crafted items. Could work for resource gatherers as well.

    Way back in the text game days, I remember doing delivery tasks. Boring yeah, but I learned my way around the city. I could imagine such simple quests generated and used to teach players about their world or for training missions. Players earn a little coin so they can buy tools they need to start crafting or buy a sword to start swinging. :)

    In a role play type environment, little quests like the farmer's wolves might be perfect. How often does the farmer's daughter get kidnapped leading to some deep meaningful quest? Not often. But for a trainee swordsman, killing rats and eventually wolves would seem to be a commonplace career for a lad in a medieval city. Repeating these quests would not seem out of place, especially if there were more than one farmer. :)
     
    URPian and Ony like this.
  5. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    No, they are not, but they do serve a purpose in an open world. I remember doing many boring tasks in games to earn a few coin to get trained for my skills. I didn't mind it that much because it helped my character to grow. It wasn't as boring as killing worms or rabbits over and over again. At least I was able to visit new places.
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    True enough.

    What would make them even more engaging for me, though, is if I felt I were really making a difference in the world. I want to see that farmer cowering, so terrorized by wolves he's afraid to come out, and then I go in and fix the problem, and from then on he strolls cheerfully about his fields, always with a smile and a cool drink for me when I happen by.

    You sometimes see this sort of effect in games, but too often the motivations for the quests are subtle at best, and having done them, I don't feel like I've really changed the world much — at best, I ran an errand for somebody who was apparently to busy to do it themselves.

    Infamous did a somewhat better job at this; the quests you choose to complete affect your reputation, which in turn strongly affects how random citizens react to you. But you still don't affect the world that much, except through the advancement of the linear plot. I'd love an RPG where I can choose to go around solving problems, like the farmer's wolves, or creating more problems, and over time the whole character of the area changes accordingly — right down to crops in the fields, fresh baked pies on the windowsills, etc.
     
    Xepherys and Teila like this.
  7. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I think you could make the farmer cower at the wolf. You might even be able to use Tony's judgement system if he includes animals as NPCs. :) The wolf attacks the farmer or his sheep and he has a negative affinity to the farmer. The farmer is afraid of him and therefore, the cower animation is triggered if the wolf is near.

    You go in, clear out the wolves and farmer is happy and has a positive affinity to you and cheers you, giving you a pie off the windowsill. :)
     
    Xepherys likes this.
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Yes, you can define your own quest templates. So far, I've made templates for kill quests, gather quests, use quests, talk to NPC quests, give item to NPC quests, etc.

    And perhaps the wolf spawner was a bad choice of example. Existing wolves, or orcs, or whatever, can also be quest assets. Say the player scares all the orcs away from their cave. The orcs end up wandering the farmer's field. They show up as quest assets, so the farmer to create a kill quest for them instead of using a spawner. In this case, the player does have more of an ability to affect the world.

    Similarly, if the farmer has a very negative affinity to the tax collector, he might offer a kill quest against the tax collector. You could even participate in escalating the negative affinity that villagers have for the tax collector.

    I like @JoeStrout's idea about a meddling power that causes situations that can result in quests. Also, quest assets can be abstract ideas, such as becoming the mayor of a village. The system currently uses a simple back-chaining planner to cobble together quest assets to make quests. Most quests are just one-step plans, though.

    But, no, they're not all kill quests. It's just an easy template to use for examples.

    And there's my dilemma. Coming from games like Mass Effect, where everything is lovingly hand-written (at least in principle), all quests are deep and meaningful.

    There's the other side of that coin. There's also something meaningful about having a real impact in the sandbox world, not just locked into the author's writing.

    BTW, it's so coincidental that you mentioned pie off the windowsill. In my test scene, the farmer has 50 gold and a pie (!) to offer as rewards for quests. :)
     
    Last edited: Nov 18, 2014
    Teila likes this.
  9. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    It's an extension. It's written. It just needs to go through that refinement period to make it actually seem (hopefully) useful. :)
     
    Xepherys likes this.
  10. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    It's hard to find quest generators that aren't just doing mad libs with game entities for basic tasks. Quests these days are rarely more than mindless activities anyway.

    Since talking about quest in general is a good idea...




    One of the things I would be more inclined to do is not have simple quests. If there is a problem with orcs, the NPC's would take care of it themselves. They might pad their ranks with some adventurers, but for the most part they would be fine on their own. It would be a much different affair if players are actually being conscripted into service.
     
    jepriddy and RJ-MacReady like this.
  11. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    I'm not sure what's missing. It sounds like a decent starting point for a framework for repeatable quests.

    As for the fun ... generally, the quest giving is relatively straightforward. In my experience, many players don't even read the bulk of the text, they just skip to the end to see what the objectives and rewards are. That's because the players are on their own quest, which is typically to find the easiest path to the rewards they're seeking.

    And the story the players remember generally isn't the one the quest giver delivers ... it's the one they experience as they try to complete the quest. In a hunt, it's expected that two primary complications will be 1) finding the targets and 2) defeating them. But there can be other complications. Perhaps the targets form in bunches that are too large to engage at once, and the player has to discover some sort of method to separate them. Or maybe the targets can become aware they are being hunted, and so after being attacked they are harder to find and more prone to flee. Or maybe there is a third party that becomes involved ... like a druid who seeks to protect the wolves.

    I think the main thing to avoid in quest giving is making the player feel like the servant of everyone who has a quest. Try to anticipate the desires of the players and write the quests in that vein.
     
  12. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Good point! I'm really glad I brought up this topic. I'm beginning to think that complex quests are best hand-written, while procedural quests should be very simple so they can focus on reacting to the current state of the game world rather than focusing on complex quest structures. No wolf spawners, either. Just use the wolves that are already in the game, or perhaps spawned by a complicating entity outside of the context of the quest. I think the challenge is going to be designing a sufficiently diverse environment with enough stuff to feed all the interactions...

    (BTW, total aside, I did Richard Bartle a disservice by not crediting his series of articles on procedural quest generation in MUDs. They're the original inspiration for this project. If you're interested in this topic, you'll enjoy reading his articles.)
     
    URPian, JoeStrout and Teila like this.
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    My mantra is to try to show story as much as possible, and tell it as little as I can get away with. So little to no exposition for me, if I can manage it. Instead, things are literally revealed.

    My experience is that few players want to stop and read text. They want to play. So if they're going to learn something in the game, it's best if they see it and preferably interact with it.

    And while receiving a story is ideally one of the rewards of story-based game play, generally speaking there should be other rewards in there too, preferably ones that are keyed to the story.
     
    TonyLi, Teila and randomperson42 like this.
  14. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Oh, a great link! Thanks, Tony. I love reading Richard's stuff. I worked on MUD's way back in the old days. :)

    Also, love reading what everyone has to say about games and stories. You guys are great! I want to play your games.
     
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Do you have any suggestions for how the quest generator can show more and tell less?

    Currently, it uses "Mad Libs" style conversation templates. The generated conversations have some variety because they pull words from different dialect databases (e.g., "Greetings, good sir." versus "Ahoy, matey!") but the structure of the conversation is always the same.

    Maybe this isn't so bad if there are a lot of conversation templates to choose from. But a human author has to write each template, so it's time-consuming.

    Like you said, many people skip the text entirely. It sounds like they wouldn't mind if all kill quests were formatted exactly like this:
    • Quest Giver: Farmer
    • Kill: Wolf
    • Amount: 5
    • Reward: 20 gold
    • Accept? (yes/no)
    But other people (myself included) like to hang on the nuance of every word in a well-written quest.

    Thoughts, anyone?

    Also, what is everyone's opinion on quest logs? I like them because (1) they remind me what I need to do, and (2) I get a sense of accomplishment by ticking off items. However, I also see @JoeStrout's point about pointlessly ticking off items on someone else's laundry list, and it does feel like that sometimes. And my most memorable "quests" have been goals that I've set for myself outside what the author wanted me to do -- for example, "I wonder if I can ramp this car onto that helicopter..." or "I wonder if I can train those orcs into the village and cause mischief." Quest logs are a huge design consideration for the quest generator. Currently it uses quest logs, but I'm not sure if this is the right approach.
     
    Last edited: Nov 19, 2014
  16. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I like quest logs too, especially if I am distracted by something outside the game while in the middle of a quest and need to come back to it later. :) I would forget it existed otherwise. So I think they do have a place.

    Maybe they could be displayed more like a journal or a "memory" tucked inside the character's head. Not sure how to do that, but it could be interesting. Although, in real life, I keep a list when I need to remember something, written on a scrap of paper that often gets lost.

    As for self-setting goals in a game, creative players will probably do that regardless of whether you have quests or not. I am the type of player who does not do a lot of quests if I am not required to do so. I prefer to set my own goals, such as starting a business entirely outside of the game mechanics, but not everyone likes to do that. Some people are more rigid and more logical in the way they play a game and prefer being told what they should do. Self-directed "quests" only require a content rich environment and a little imagination.
     
    Last edited: Nov 19, 2014
    JoeStrout likes this.
  17. 0tacun

    0tacun

    Joined:
    Jun 23, 2013
    Posts:
    245
    It sounds like an interesting idea and I would like to give some feedback:

    I don't know if this will be an custimizable package or for a specific game, but I would like to give some feedback from an realistic perspective:

    "Greetin's!(positive thing) If you exterminate(negative thing) 5 wolves, I'll give you 20 gold." - I think there is a hugh discrepancy in bevielability, because the farmer acts if it is nothing to kill some wolves. Imagine two wolves meet and talking about killing 5 humans. Pretty morbid. That is one reason why the quest emerges like a meaningless one.

    You said you like to read every word in a quest, then I think you should let the player interact more with the quest giver. I know this would mean more data to provide, but I like to give an example:

    - Farmer: "*mubles*...Oh hello there...hmm...you look like a [player's class] and that you could defend yourself."
    -----Player: "Yes, indeed."
    -----------Farmer: "Would you mind helping me out? I have some problems with [targets] "
    -----------------Player: "How many are there?"
    -------------------------Farmer:"I'm not sure, I have spotted [targetNumber + Random.Range(-1,2)], could be more."
    -----------------Player: "Where are they?"
    --------------------------Farmer:"They are currently rampanging at [targetLocation]"
    -----------------Player: "What do I gain in return?"
    -------------------------Farmer:"I grant you my best handshake of manliness +1[reward]"
    -----------------Player: "Where is the hunter of this village"(optional questions)
    -----------------Player: "Leave it to me."
    -----------------Player: "I'm sorry, I have my own problems."
    -----Player: "No not at all, I'm just cosplaying."
    ---------Farmer:"Oh I see..."
    --------------Player:"Who are you?"
    --------------Player:"You look like you have an problem"
    -------------------Jump To Farmer:"Woud you mind helping me out?...."
    --------------Player:"Where is the inn?"


    I hope you understand my dialog flow. You let the player choose several options how the dialog should go.

    Again I don't know what kind of game you would like to do, but I thing this would be more meaningful. The player needs now to interact with the npc to get proper information for the quest and it isn't delivered anymore on a silver platter. Besides I don't know if the players would like this, or the simplified approuch.

    Also I know that this would mean you have to write more but maybe you can stick some sentences randomized together.

    For example: greeting.sentence1a + greeting sentence2c
    instead of *mumbles* *sighs*,
    Oh... hello there..., welcome stranger...
    etc.

    P.S.: I just noted that I didn't overlap with your new/active/done state for a quest, but I think you get the general idea I mean.
     
    RJ-MacReady likes this.
  18. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Nice!

    However, I think farmers would talk about killing wolves as if were nothing. :) Even farmers today kill wolves, even when it is against the law. The see wolves as a threat to their livelihood.

    But I like the additional dialogue. Looks more natural.
     
  19. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Agreed, if you're going to have quests at all, a quest log is pretty much essential.

    I inserted "not do" where a double-space appeared in your original text because I think that's what you were trying to say — apologies if I got that wrong.

    If I didn't get it wrong, then I entirely agree. I think back to my DikuMUD days in particular (of all the MUD engines I played — or wrote — DikuMUD was the most like modern RPGs, with extensive leveling, classes, lots of areas to explore, and yes, some quests). Quests were a pretty new and experimental concept at the time. We found them interesting, but they weren't essential, and many of us didn't bother with them most of the time — there was plenty to do in setting our own goals, which usually revolved around exploring new areas. Because of the sorting algorithm of evil, these areas got tougher and tougher the further away you got from the starter town. And because the game was huge, there were always more areas to explore, including entire cities you probably couldn't get to until you were at least so-tall. So the cycle of: explore, gain XP and better loot, now able to explore harder areas, was very rewarding in itself. Occasionally we had to grind, but not very often. Usually we were pursuing some self-selected goal.

    That reminds me of a story... (geez, I sound like an old coot, don't I?). There was a creature called "Blob" that appeared in the center of town now and then. It was not aggressive, but it was very, very tough. Anyone foolish enough to attack the blob would be smashed into a thin paste very quickly. Even a higher-level character couldn't take it alone. So it became a delightful game for us: a group of higher-level characters would get together now and then and agree to hunt the Blob. We would put on all our best gear, buff up with every potion we had, make sure we were all rested and stocked up on mana, and then go for it. Epic battle ensued.

    I realize such raids happen all the time in modern MMORPGs. I bring it up just to illustrate that a self-selected goal can be more fun than a quest.

    However, I don't think we should dispense with quests entirely. They can be fun too, and they're a great way to advance the plot (for games that have one — though I'm not entirely certain plots are necessary, either). And I think all players are different — as several here have said, some players prefer to have more concrete objectives handed to them, and there's nothing wrong with that.
     
    Xepherys likes this.
  20. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    As an old MUD builder, I can relate. :) Quests were not important and not even sure we thought in "quest" mode back then. But just exploring a new area of the game was a quest to some extent, although not so structured.

    You got it right. I corrected the grammar and accidentally left out words. LOL So I just corrected it again, thank you.

    I think quests could be a lot more useful and integrated into the story if one tried. Even the generated quests could work well if they offered jobs to the players. While it would be nice if a player farmer (in a multiplayer game) was the one offering money to the other player to kill wolves on his property, players are notoriously undependable for things like that so the generated quests could fill in the holes and provide jobs for players who are on late at night or in a different time zone.
     
  21. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    I definitely think we should steer away from the kill and fedex quests, to those more like TSW and EQ as shown in the Extra Credits videos above. Quests have become quite stale of late, and could really use an injection of awesomeness.
     
  22. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I think those have their place in some games. :)

    I would probably call them something other than quests though, maybe jobs or tasks, a way to make money and learn about the world.
     
    JoeStrout likes this.
  23. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Reading back, and having watched the Extra Credits videos, I wonder if there's a way for citizens of various areas to have a knowledge pool, and a larger pool of knowledge for races or countries - so that NPCs could pull from these pools in order to generate quests or gossip (spreading knowledge). Some method whereby you don't need to talk to every NPC, but bits and pieces of information can be gleaned by talking to some NPCs, as well as personal or family knowledge being used to create personal quests.
     
  24. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    Pretty sure this is already being done in dwarf fortress. You'll only notice it in adventure mode.

    I'm kind of in the mindset that simple quests are just kind of stupid. If a town is in need of potions, there should just be a market effect. You shouldn't need a peasant toiling in the fields to have an exclamation mark over their head to dictate this effect. If the town is gearing up for war, they should talk about their needs, but it shouldn't necessitate the fanfare of a quest. If you actually get to the point where you have an active and lively world and have a system that is responding to this, then you should should be pumping its output back into the world to try to capitalize on player exploration and exploitation.
     
  25. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    There's a lot to respond to here ... so let me see if I can stay on track and be concise. I have some seemingly contradictory things to say, but I guess it is all a matter of nuance and perspective.

    First, if what we're talking about here with procedural quest generation is a completely random quest generator that is terse, I'm not sure I will have much use for it. Maybe some use, but not much. As a design principle I want to avoid grinding, and this smacks of that.

    But I will include a few specific outlets for grinding in a game, as sometimes players have only a short time to play and they want something super casual to do, and that type of play tends to resemble grinding.

    And I will include some terse quests along the lines of the wolf hunt. But I do want the majority of my quests to be hand-written.

    If I was to use a random quest generator, I would use it either A) in a specific area of the game where players could come to the random quest guy, or B) maybe use it in the editor to help come up with simple one-off quests that I would add text and context to, and then put in a list.

    In the case of A (the random quest guy), this could be like a security officer who gives hunt quests to have the player address some of the different rowdy elements in the area. So if I can restrict the enemy groups from which the generator can pick, and if I can even further isolate the objective to particular spawns (like drug-dealers of faction X in the downtown district, or fire-starting faction Y NPCs in uptown), that would be good. I can manipulate those sorts of things to be consistent with my overall story.

    Some players like doing hunts and have made characters that are well-suited to hunting, and it makes sense to accommodate this aspect of play. What I would want to have to enhance this play mode are rewards and complications in line with this activity, like rewards for defeating X number of a group / faction, for clearing out a zone, maybe there would be some rewards that assist in hunting, the player's character could earn the antipathy of the targeted groups (which can lead to reprisals), and a few hunts could accumulate to unlock hand-made content.

    My experience tells me that players like this sort of activity when it is organized properly, but it preferably would be more of a sideline and not the central action of the game.
     
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    There's nothing preventing the designer from making conversation templates as complex as they want. But any conversations that use that template will always have the same basic structure. Is that a problem? If there are enough templates to choose from, and the blanks get filled in with different values, will it provide enough variety?

    That's what motivated me to start this thread. Maybe I'm missing something, but I think quests with awesomeness need to be hand-written by a human being who can inject subtext and theme. (Just like @hopeful just wrote.) Procedurally-generated quests will necessarily be simpler, like kill and fedex quests. But, the difference is that these quests occur in reaction to what you as the player have done to the world. Here's a classic example used in Ultima Online: If you kill all the wolves, the rabbits overpopulate and eat up the farmer's field. With the quest generator, at this point the farmer may offer a quest to kill rabbits -- but only because you shaped the world so that killing rabbits is necessary to him. In a way, the meta-game involves the player manipulating the world to affect NPCs, who in turn generate quests. Does this degree of "aliveness" in the world make up for the very basic nature of the quests?

    Tracking how NPCs feel about other characters :)
     
    Teila likes this.
  27. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I say yes. As a player, it's frustrating when I feel that either (A) I have no real impact on the world, or (B) the impact I have on the world is simply in advancing the author's story line.

    But if I can disrupt the ecosystem and have NPCs react to this in sensible ways — including offering rewards for restoring the balance — then that is cool!
     
    TonyLi likes this.
  28. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    As for quest logs ... I don't want to do it in the classic sense.

    In line with my idea that players experience the story of what happens in the game, and not so much what happens in the text of game, I want my players to build up a series of rewards through play, and let that be a functional version of the quest log.

    So if a player completes a particular quest or story arc, they get one or more of a series of explicit rewards: a note of accomplishment (badge or whatever), unlock of quests that follow as a consequence of the one just completed, and a personal item of some sort that is linked to the quest.

    The idea being that I want players to be able to choose from a list of available quests on the basis of the rewards, and to select the quests that give the rewards they most want for the character they are building. So, in a sense, the character itself becomes the quest log.
     
  29. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    I mentioned before the idea of creating a list of one-off quests. I don't know if it would help to have the procedural quest generator for that or not, but one of the features I'd like to include to support casual play is a list of short scenarios that I can enhance with a variety of complications, aimed at providing structured play that can be completed in a 5-20 minute time frame.
     
  30. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    That is exactly the idea behind this. I think I have to accept that it's a completely different beast from the narrative experience provided by human-authored stories. But should they be recorded in a quest log? I can imagine clogging the quest log with tons of "Farmer Fred had you kill 5 wolves", "Farmer Fred had you kill 10 rabbits", Farmer Fred had you kill 8 wolves", etc.

    More like a journal entry? If so, I think this implies that the player needs to decide what to do, rather than following steps outlined in a quest log. This kind of free will sounds nice, but won't the player feel a lack of direction?

    I think short, simple procedurally-generated quests would work well for this, perhaps better than complex, multi-step hand-authored quests. The key is making them feel meaningful.

    Disrupting the ecosystem and having NPCs react sensibly seems cool to me, too. How do you make it feel meaningful? If it's not meaningful to me, I might tinker with it as a toy for a few minutes and then drop it forever.

    Is the key social relevance or some similar kind of context? Helping an NPC kill his enemy is a fine, but boring, quest. Helping an NPC kill the villain who murdered his father, causing him to dedicate his life to seeking revenge, gives it some context that makes it seem more relevant. But in a hand-written game like Knights of the Old Republic, the subtext of the writing had something to say about the nature of revenge, neglecting your own life to pursue a motive that you've projected onto someone else who's dead and couldn't care, etc. Procedurally generating context is possible, but certainly not that higher level of subtext. Without it, what aspects can help make a quest generator more than just a toy to the player? Shifting the player's focus from the physical aspects (wolves and fields) to emotional aspects (fear vs. security)?
     
  31. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Okay, the "disrupting the ecosystem" caught my eye. I happen to have a culture in our game that is very focused on the ecology of their forest. There is a profession within that culture which focuses on protecting the balance of the forest. Quests that touch upon this sort of thing, even short ones, would be invaluable to me and EXTREMELY meaningful. Their entire religion is built around this concept.

    In our case, it is the lore that makes the ecology of the forest important, but the quests will not only enforce the lore, but make the lore actually mean something. So you asked for meaning, and there is a prime example.

    Original Concept Art
     
    TonyLi and JoeStrout like this.
  32. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Ha! Didn't realize that would be so big! Sorry.
     
  33. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Implementation-wise, in the context of my quest generator, what would you think of (1) a dialect dictionary containing words and phrases common to this culture, and (2) a library of conversation templates specific to this culture, built in ways that the culture would speak? Each NPC in the culture could also have their own dialect dictionary and library of conversation templates; that would just be more work on the designer's part.
     
    Teila likes this.
  34. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I love both of those ideas. We have actual languages for our cultures, not complete, but words that were common. I was lucky enough to have an army linguist on the team before he went off to Tibet! So a dialect dictionary would be fabulous. I might even be able to get him to work on it if he has time between his classes.

    Conversation templates would also be helpful and could bring the culture to life. Since each culture has their own religion and world view, I could see this as really separating them, making them different, and guiding the players when interacting with the NPCs from each culture.
     
  35. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    As for skipping the quest log / journal ... players won't get lost. Each quest that is given has explicit objectives for completion in the HUD, and they get ticked off (and possibly new ones introduced) as the player goes. No quest would be saved mid-way, each individual quest must be completed within a single play session (MMO-style). Story arcs would be made up of multiple quests. So one quest chains to another in the arc, and the player can take breaks between quests in an arc, or go off and do other things. They can also opt to quit the arc, in which case if they want to run it again they have to start from the beginning.

    As for whether the procedural quest generator is meaningful or not ... I'm not sure what to say. I don't have a clear concept of what you're trying to do, and I haven't actually used the Dialogue System yet, so I don't know how the new bit varies with what capabilities already exist. So all I can say is what I plan to do.

    I know for certain I will have story arcs: that's my top priority. I will have at the very least some sort of basic encounter mechanism outside of the arcs. Dev time permitting, next would be the creation of one-off quests. Any framework that facilitates the construction or delivery of the quests - whether they are obtained from discovering a piece of paper in the street, if they come as directives from a computer, or if they are delivered by a person - is a help.

    Eventually I'd like to be able to provide my players with an authoring tool for their own quests, where they can select this enemy group and that encounter area, assign these objectives, and chain this event to that, and fill in text here and there for dialogue and exposition. So if this tool provides any help in that direction, it is appreciated as well.
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    @Teila - Thanks! Currently there's a single, global library of conversation templates, but it's easy enough to add subsets for NPCs and groups.

    @hopeful - The Space Dwarves team is using the Dialogue System to let players create quests in their current sci-fi MMO. I think they're also using an early beta version of Quest Machine (the quest generator), but only the quest/conversation template part, not the generator part, since the players do the "generating." Players select the quest giver, targets, and rewards, and the quest is added to the database. Sounds like I need get the next version of the Dialogue System out the door and dust off Quest Machine for a general release. :)
     
    Last edited: Nov 19, 2014
    Teila likes this.
  37. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Quest Machine sounds awesome!!! Thanks, Tony. :)
     
    hopeful likes this.
  38. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Based on your feedback, I split it into three new prototypes. None is perfect, but I'd like to put one up next week for Feedback Friday. At this point, I can't see the forest for the trees. I'd be grateful for any perspective you all can provide. As designers, which one would be the most useful?

    First, some quick definitions:
    • Quest assets are things that can be referenced in a quest instance. For example, in a Kill 5 Bandits quest, the asset is Bandit.
    • NPCs have a list of synonyms. For the term [hello], one NPC might say “Ahoy, matey!” while another says “Salutations.”

    Prototype 1: Utility
    This prototype uses utility-based AI and smart objects, such as in The Sims. The presence of a quest asset affects the NPC’s happiness value. For example, a Bandit in the Field makes the Farmer unhappy (because he wants to farm the field). It makes the Mayor unhappy (because she wants the town to be safe). (The mayor has a high priority for Safety, and the bandit has a negative Safety modifier.)

    Quest templates are stored on the asset. The Bandit has templates such as Kill (“kill n bandits”), Loot (“loot n bandit scarves”), Bribe, Heal, etc., each with modifiers to the happiness value.

    The NPC generates a quest by identifying the asset that makes it the most unhappy. Then it chooses a quest template (e.g., Bandit + Kill). Farmer: “I want you to kill [5] [bandits]. I’ll give you [20 gold] as a reward.”
    • Pros: Easy to set up.
    • Cons: Quests are short, basic, and obviously rigid in structure. No sense of the emotional motivation behind the task.

    Prototype 2: Detailed, Hand-written Templates
    This is the most Mad Libs-style prototype, close to what Rockstar games like Red Dead Redemption do with random encounters, or the mission generator in Privateer. The NPC has a library of detailed quest templates. Motivations are written into the quest text. The NPC chooses a template and instantiates assets or chooses existing assets to fill it out. Mayor: “The [bandits] are planning a raid. We’re terrified and need your help! Get the [magic sword] from [Drakengard Castle] to help stop them. Then kill [5] [bandits] to draw out their cowardly leader. Finally, kill the [Bandit King]. I know you can save us! We pooled our resources and can offer you [50 gold].”
    • Pros: Longer quests with clear, hand-written emotional motivation. Can include optional random sub-tasks for variety (e.g., get the magic sword).
    • Cons: Rigid template may become apparent. (Keep in mind different NPCs can use different synonyms.)

    Goal-Oriented Planner
    This prototype uses a planner similar to FEAR’s AI, or the system described by Bartle or implemented in Shadow Quest by Bryson and Grey. NPCs have goals (gain power) and a library of actions (become mayor, get famous, stop enemy, kill, bribe enemy, get item, deliver item). It currently uses a terribly inefficient back-chaining planner to generate plans like: GetItem(gold bar) → DeliverItem(gold bar, Bandit King) → BribeEnemy → StopEnemy → GetFamous → BecomeMayor.
    • Pros: Flexible; can generate unexpected quests.
    • Cons: Hard to convey emotional motivation to player. It’s easy to make the NPC ask: “Get me a gold bar” but I’m not sure there’s a good way to reliably generate the context: “because I want to bribe the bandits to leave so I can become famous and be elected mayor.”

    Any suggestions? They all make for interesting toys, but which (if any) actually seem practical as a designer?
     
    Last edited: Dec 5, 2014
  39. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    Speaking only for myself, ...

    "Quest Machine" is a great name, but I can't see using a computerized quest generator. Even my casual play quests would be scenarios that are manually created. (I do like the judgment system, though.)

    For my random repeatable quests I will create a series of one-off scenarios and put them all in a list. The player will receive a random selection of these and can pick from them. The quests that are available may change depending on the status of the player's quest log / achievements, so there can be a sense of change in the player's world as a result of their actions.

    For my player-authored quests, the idea is to provide the player with an interface that allows them to select from lists of level maps and enemy groups, assign encounters / objectives, provide NPCs with names and dialogue, and chain things together with event triggers (like "on boss defeat, 3 waves of ambushes"). And then title, save, and share these quests with other players.

    The player-authored quest interface would be different from a quest generator, though, in that the player would be coming up with a story to tell, and they just need to access various things like NPC enemy groups, maps, and events (so they can trigger dialogue to be given when a particular NPC has low health, and the like).

    Frankly, something like that could probably even be of use for me, as I go about creating the main quests for the game. I could use the quest interface to rough out scenarios and then add liberal doses of developer's magic (specially created models, FX, cutscenes) to make them exceptional.
     
  40. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    @hopeful - Hmm, you and the Space Dwarves team both described the same thing. They're already using the quest template part of Quest Machine to do this; they're not using the procedural generator either. I'll keep this in mind for the redesign. Thank you for your thoughts!
     
    hopeful likes this.
  41. blueivy

    blueivy

    Joined:
    Mar 4, 2013
    Posts:
    633
    Did Love/Hate develop from this? I still would like a nice procedural quest system, it would be useful to me :)
     
  42. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    Yes, Love/Hate is a spin-off of the procedural quest generator, Quest Machine. Based on some great feedback, I'm reworking some things in Quest Machine. I hope to make it available on the Asset Store soon!
     
    Last edited: May 15, 2015
    blueivy and Teila like this.
  43. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    This thread has my attention - there are two ideas in this thread that I'm seeing:

    1 - Procedural quests. 'Nuff said.
    2 - "Something" that interferes.

    In my case, I'm considering making the "something" a "nemesis" party that is pretty much the evil twin of the player's party. As you complete quests in one city-state, they're completing quests in another; as you gain a good name for yourself in one place, they're wrecking yours (and making their own "good" name.) When you attack a target necessary to access the "final" dungeon, they come to defend it.

    The result? A "strategy"/diplomacy game wrapped in JRPG mechanical tropes :D
     
    TonyLi likes this.
  44. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    The idea I'm getting excited about is a self regulating eco system with natural quests arising out of it. You could drop the "Please kill [5] [wolves] for me, I will give you [20 gold]". And switch it to "I'm paying [4 gold] for [wolf pelt]." As the farmers gold drops, or the number of wolves drop, or the number of wolf pelts the farmer has increases, then the price offered goes down until it drops off of the farmers quest list.

    This leave the farmer in a situation where he has a lot of wolf pelts. So delivery of these to the tanner makes sense for anther quest. However as he is out of gold the farmer decides to do this himself. And so forth.
     
  45. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Evolving NPC targets/needs. That's a very interesting concept.
     
  46. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    It's part of one of the super projects I have in my head that might get built one day. Or might not, it probably requires more skills then I will obtain.

    But the basic idea would be an RPG where every resource is finite and controlled. That includes various enemy fractions, the various resources needed for crafting, ammunition for weapons and so forth.

    Say in the overarching story line there is a war between two fractions. You decide to help one side. You can do this by fighting in the front lines. Or by crafting weapons. Or by attacking enemy supply lines. Or by any number of things that would affect the way the simulation panned out.

    In this type of world a general might give you an assignment to attack a certain caravan at a certain time and place. If you dawdle, you miss the window of opportunity and have to report failure.

    I don't even know if such a large scale simulation is possible. The AI alone would be phenomenal. But if it is there could be some interesting consequences for quests.
    • Quests would be based on each NPCs current objectives
    • NPCs would be able to lie, cheat, offer rewards they don't have ect to meet their own goals
    • NPCs could give 'quests' to other NPCs
    • NPCs with incorrect information could give impossible quests. (The missing daughter was killed by bandits, not kidnapped. The fabled treasure doesn't exist. The enemy is not sneaking supplies in tonight.)
    • Player driven quests would have world impact (stockpiling every cheese wheel in the game would cause the price of cheese to go up)
    • Quests would all be time limited by the nature of the simulation. (If you don't find a magic ingredients to cure the village someone else will or they all will die)
    All of this is probably not possible. Definitely not possible for a hobbyist developer on the weekends. But it's a pretty nice dream.
     
  47. Whippets

    Whippets

    Joined:
    Feb 28, 2013
    Posts:
    1,775
    Love the idea - A world where all NPCs are busy dealing with each other, and all have their own current requirements to be met.
     
  48. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Yup. The basic idea would be the world is fully functional on its own, without the player. Then the player jumps in and messes things up. But you could still run the game without an actual player with no problems.
     
  49. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,706
    I used to work professionally in simulation, so part of me loves the idea of a world that runs independently of the player.

    But, when it comes down to it, we make games for players. The story has to be for the player. This doesn't mean the story has to be about the player. The player needn't be the story's galaxy-saving hero. But the game exists to give the player an experience.

    That's where Quest Machine currently draws the line. NPCs have the agency to make plans, but those plans currently require the player's involvement, and they're generally based on things in the game world that the player has affected. Otherwise it would just be an a-life simulation like The Sims. Am I missing some opportunity here?
     
    AndrewGrayGames likes this.
  50. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Hmm, this was so common in the old Mud world. As supplies of a specific item grew, the cost went down. Players had a huge impact on the economy. We are writing this into our game as well, probably because of my Mud background. :) I miss the complexities of those "simple" text games.