Multiple quests from one NPC

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Multiple quests from one NPC

Post by supadupa64 »

Is there a specific way to set up multiple quests given from one NPC?

At the moment I just listed out a bunch of new quests in the Quests/Items tab, but I feel like there may be a better way to do it. Use Groups? Subtask?

I feel like if there was a list of quick start tutorials, that would be so awesome. I watch the videos to make the quest and things, which was really helpful, but if there was a list of like things to get started:

Click here if you want to set up
- play an icon when you walk into an area
- keep track of locations visited
- xyz whatever
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple quests from one NPC

Post by Tony Li »

Hi,

The decision to use Groups and/or Entries (subtasks) are up to you.

Groups are a good way to categorize individual quests. If each NPC offers lots of quests, it might be a good idea to group quests by NPC name. Another way to group quests is by location, such as Village, Caves, and Mountain. Or you could group them by story chapter, such as Chapter 1: Intro, Chapter 2: On Your Brother's Trail, Chapter 3: Rumble in the Jungle, etc.

Whether you use Entries is again up to how you want to organize your quests. If it makes sense to use subtasks, use Entries. For example, you might have a "Get The Elemental Pendants" quest with four Entries (subtasks) for: Get the Fire Pendant, Get the Water Pendant, Get the Earth Pendant, and Get the Air Pendant.

Another big job is presenting all the quests in a conversation. You can use Conditions fields to branch the conversation based on the current state of the quests.

I don't plan to add any additional advanced quest management features to the Dialogue System. A separate asset (which is still in development) will provide more quest management features. I'll also include specific step-by-step quick start tutorials for each of these features.
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Multiple quests from one NPC

Post by supadupa64 »

Alright, so here's what I have in mind. I don't know if this sort of thing is workable, but I'll describe it.

I want to have what I would call quest lines. You get the first quest from one NPC, and there are no other quests available at the time anywhere. Once you finish this one quest, other quests become unlocked (activated) and he will then either offer you another quest to do, or direct you to another NPC to get a quest from. You go to the next NPC, take some quests from him, finish those and then off to the next NPC for more. More quests become active when quests are completed.

Is this type of thing a main function of dialogue systems?

I did set up a conversation with multiple quests using lua commands, but they all showed up at once. I guess just make them unassigned to start or something. I guess the real situation I'm wanting to figure out is how to set up the conversation. Maybe show multiple buttons in the ui? That might be a feature that isn't offered, but you did say you were working on advanced features?
Last edited by supadupa64 on Sat Apr 09, 2016 4:10 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple quests from one NPC

Post by Tony Li »

Hi,

This is all supported in the Dialogue System.

Set all your quests' states to unassigned. (You could also have a master quest like "Find Your Brother" that starts active and doesn't change state until the end of the game, but we'll ignore that one for now.)

Let's say you have this quest line:
  1. NPC "Adam" gives you a quest "Find Tablet" to find the 5 pieces of a broken clay tablet.
  2. When you turn in the pieces to Adam, he says they contain ancient writing that he doesn't understand. He gives you a quest "Talk to Bill" who may be able to translate it.
So Adam's conversation might look like this:
  • START
    • Dialogue Text: "Find the tablet pieces to find your brother."
      { Conditions: CurrentQuestState("Find Tablet")=="unassigned" }
      { Script: SetQuestState("Find Tablet", "active") }
    • Dialogue Text: "I'm still waiting for you to find all the pieces."
      { Conditions: (CurrentQuestState("Find Tablet")=="active") and (Variable["numPiecesFound"]<5) }
    • Dialogue Text: "Great job! Talk to Bill to translate them."
      { Conditions: (CurrentQuestState("Find Tablet")=="active") and (Variable["numPiecesFound"]>=5) }
      { Script: SetQuestState("Find Tablet", "success"); SetQuestState("Talk to Bill", "active") }
    • Dialogue Text: "Remember to talk to Bill."
      { Conditions: (CurrentQuestState("Talk to Bill")=="active") }
    • Dialogue Text: "Hi. I have no more quests for you."
      { Conditions: (CurrentQuestState("Talk to Bill")=="success") }
And Bill's conversation might look like this:
  • START
    • Dialogue Text: "Hi." (no active quest)
      { Conditions: CurrentQuestState("Talk to Bill")~="active" }
    • Dialogue Text: "You want me to translate this tablet? Sure. It's a map to Skull Cave."
      { Conditions: (CurrentQuestState("Talk to Bill")=="active") }
      { Script: SetQuestState("Talk to Bill", "success"); SetQuestState("Enter Skull Cave", "active") }
Let's take a look at Bill's conversation.
  • If the "Talk to Bill" quest isn't active yet, the first dialogue entry's Conditions are true, so Bill just says "Hi."
  • If the "Talk to Bill" quest is active, Bill translates the tablet and sets the quest successful.
  • If the "Talk to Bill" quest is successful, the first dialogue entry is once again true, so Bill just says "Hi" again.


To make it more complicated, let's say Adam also has a quest "Retrieve Radio". So now Adam has two quests: "Find Tablet" and "Retrieve Radio".

You'll need to decide which quest is more important to Adam. Let's say it's "Retrieve Radio". Then add some more dialogue entries like this:
  • START
    • Dialogue Text: "A monkey stole my radio! I need you to retrieve it."
      { Conditions: CurrentQuestState("Retrieve Radio")=="unassigned" }
      { Script: SetQuestState("Retrieve Radio", "active") }
    • Dialogue Text: "Any luck finding the radio yet?"
      { Conditions: CurrentQuestState("Retrieve Radio")=="active" }
      • PC Menu Text: "Here it is."
        { Conditions: Variable["hasRadio"]==true }
        { Script: SetQuestState("Retrieve Radio", "success") }
      • PC Menu Text: "Not yet. Can you help me find my brother?"
        • (Link to 'Find the tablet pieces...')
    • Dialogue Text: "Find the tablet pieces to find your brother."
      { Conditions: CurrentQuestState("Find Tablet")=="unassigned" }
      { Script: SetQuestState("Find Tablet", "active") }
    • Dialogue Text: "I'm still waiting for you to find all the pieces."
      { Conditions: (CurrentQuestState("Find Tablet")=="active") and (Variable["numPiecesFound"]<5) }
    • Dialogue Text: "Great job! Talk to Bill to translate them."
      { Conditions: (CurrentQuestState("Find Tablet")=="active") and (Variable["numPiecesFound"]>=5) }
      { Script: SetQuestState("Find Tablet", "success"); SetQuestState("Talk to Bill", "active") }
    • Dialogue Text: "Remember to talk to Bill."
      { Conditions: (CurrentQuestState("Talk to Bill")=="active") }
    • Dialogue Text: "Hi. I have no more quests for you."
      { Conditions: (CurrentQuestState("Talk to Bill")=="success") }
I'm skipping some player responses to keep this reply from getting too long, but I think this should give you the idea. If you'd like details on anything, just let me know.
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Multiple quests from one NPC

Post by supadupa64 »

This is awesome! Thank you!!! This helps a ton!

One thing though, so I've been working on this. Is there a way to rearrange what is said first in a conversation? I have a dialogue set up, but if I add (new dialogue) quest line features to NPC's with currently dialogue it will be in the wrong order.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Multiple quests from one NPC

Post by Tony Li »

For NPC nodes, try to set up the Conditions so only one node will be true at a time. It's just a matter of working out the logic of what gets said when. You might find it helpful to write it out on paper before implementing it in the Dialogue Editor.

For PC response nodes, if you want to change the order they're shown in the response menu, inspect the preceding NPC node. In the Inspector, there are up/down buttons next to each link to a PC response. You can use these to set the order.
User avatar
supadupa64
Posts: 200
Joined: Sun Mar 06, 2016 9:40 pm
Contact:

Re: Multiple quests from one NPC

Post by supadupa64 »

That helped a ton! Had to change things to fit what I wanted, but I figured it out! I got it all set up so far, everything good! Thanks!
Post Reply