Create A To-Do Like Checklist Quest

Announcements, support questions, and discussion for Quest Machine.
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Create A To-Do Like Checklist Quest

Post by ko_games »

Hi Tony,

In my game, at the start of a level, I want the player to be able to open a to-do like checklist UI screen that the player can open and close at any time to be able to check on the player's progress in completing certain tasks during that level. When the player completes something on this list I would like the list to get updated to show that it has been completed. I have the dialogue system for unity and quest machine for unity. I wasn't sure which one might work better to do something like this? I thought maybe Quest Machine would work best, but I wasn't sure how to do this. In the example videos, I just saw that the quest log gets updated only when the player starts talking to an NPC to start quests.

For reference, an current in game example of what I'm trying to accomplish is the to-do like list that players can pull up in the game Untitled Goose Game. Similar to the screenshot below:

Image
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create A To-Do Like Checklist Quest

Post by Tony Li »

Both systems can update quests without having to talk to NPCs, but it's a bit simpler in Quest Machine.

Unless your to-do list is massive, it's probably easiest to make it a single quest with a quest node for each item on the to-do list:

todoList.png
todoList.png (32.36 KiB) Viewed 2614 times

Set Active Text and True Text (i.e., completed) for each node, such as:

todoNode.png
todoNode.png (23.71 KiB) Viewed 2614 times

In the screenshot above, the True Text is the same as the Active Text but wrapped in TextMesh Pro strikethrough codes (assuming you're using TextMesh Pro).

As the player completes each item, it should set the node's state to true. Frequently this is done by putting a Message Condition on the node. For example, say you've configured the "get into the garden" node to listen for the message "Entered" + "Garden". Then you can set up a trigger to send this message when the player enters it:

todoTrigger.png
todoTrigger.png (25.08 KiB) Viewed 2614 times
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Re: Create A To-Do Like Checklist Quest

Post by ko_games »

Thanks Tony! Really appreciate your detailed responses. They are very helpful! I just had a couple of questions on displaying the checklist. In my game, I don't intend for players to use a mouse. I'm thinking they will just push a button to toggle the checklist UI on and off. I got this part working. The part I can't figure out is how to get the Quest Details Panel to display by itself without needing to click on the active quest. See screenshots below:

First screen shot shows the Journal open with just the Active Quest showing. If I click this button then I get the details.


This shows the details that are shown after clicking.


My goal is to have something like this screenshot. I tried to deactivate the Quest Selection Panel. This then shows just the Quest Detail panel. The only problem is the Quest details do not display.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create A To-Do Like Checklist Quest

Post by Tony Li »

Hi,

Add this script to your Quest Journal UI:

AutoInspectFirstQuest.cs

Code: Select all

using System.Collections;
using UnityEngine;
using PixelCrushers.QuestMachine;

public class AutoInspectFirstQuest : MonoBehaviour
{
    private void OnEnable()
    {
        StartCoroutine(SelectFirstQuest());
    }

    IEnumerator SelectFirstQuest()
    {
        var journal = QuestMachine.GetQuestJournal();
        if (journal.questList.Count == 0) yield break;
        yield return new WaitForEndOfFrame();
        GetComponent<UnityUIQuestJournalUI>().SelectQuest(journal.questList[0]);
    }
}
(The Quest Journal UI is a child of the Quest Machine's Quest Machine Canvas.)

You can change the layout so the Quest Selection Panel is either invisible (e.g., width 0) or occupies the title bar. If it occupies the title bar, the quest's title will appear in the title bar. Then expand the Quest Details Panel to occupy the rest of the window.
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Re: Create A To-Do Like Checklist Quest

Post by ko_games »

This worked perfect! Thanks Tony! You are awesome!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create A To-Do Like Checklist Quest

Post by Tony Li »

Happy to help!
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Re: Create A To-Do Like Checklist Quest

Post by ko_games »

Hi Tony. One follow up question I had on this same thread is there a way to reorder the quest detail items in the list? For example, in this previous screenshot from before (see below) if I want Steal Keys to be on top of the list and Get Into Garden at the end of the list how would I do this? I tried disconnecting the connections to the nodes and then connecting them in the order I wanted the items, but this did not work.


User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create A To-Do Like Checklist Quest

Post by Tony Li »

Hi,

Inspect the main quest info. (Click on blank canvas space in the Quest Editor.)

At the bottom of the inspector, expand Node Order for UIs. Reorder the list here.
ko_games
Posts: 29
Joined: Wed Jan 08, 2020 3:20 am

Re: Create A To-Do Like Checklist Quest

Post by ko_games »

Thanks! That worked perfect.
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Create A To-Do Like Checklist Quest

Post by Tony Li »

Glad to help!
Post Reply