Journal not showing anything

Announcements, support questions, and discussion for Quest Machine.
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Journal not showing anything

Post by MilziPPG »

Hi Tony!

I've just started to use the Quest Machine and everything looks great so far. I've been following your video tutorial on YouTube and I've managed to get the simple exploration working. The only problem is that nothing is showing in the journal. I'm using MoreMountains TopDown engine and I'm wondering if that has anything to do with it? I'm going to watch the first two videos again and try work out what happened but not 100% sure what I did wrong. I know that it's not a lot of information but if there's anything that you think it could be, I'd really appreciate it!

If I manage to fix it, I'll post it here just in case anyone else is having issues!

Thank you again for making this (and the dialogue system!) You're an absolute life saver!
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Journal not showing anything

Post by MilziPPG »

I should almost certainly add that I'm also using your Dialogue System too. I have disabled it for the minute (I think I've disabled it all at least) so I can work out how to use it by itself and then I'll integrate it later on using your other YouTube tutorial
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Journal not showing anything

Post by Tony Li »

Hi!

Quest Machine doesn't have an integration package specifically for TDE, but nothing should conflict.

TDE instantiates player(s) at runtime. You can add a Quest Journal component to the player prefab, or add it to an empty GameObject in the scene. If you add it to an empty GameObject, configure the quest giver to start dialogue with that GameObject so the quest giver can find the Quest Journal component to add quests to it.

It may help to temporarily tick the Quest Machine GameObject's Quest Machine Configuration > Debug Settings > Debug checkbox. Then look for log lines like these:

Code: Select all

Quest Machine: Villager.StartDialogue: #offerable=2 #active=0 #completed=0
Quest Machine: Registering quest instance 'peskyRabbits'.
Quest Machine: Pesky Rabbits.SetState(Active, informListeners=True)
The logs above are from the Demo scene when the player talks to the Villager and accepts the peskyRabbits quest.

The first line reports that Villager has started dialogue.

The second line reports that it has created an instance of the peskyRabbits quest. This instance will be added to the player's Quest Journal.

The third line reports that it has set the quest instance active.

You can also inspect the Quest Journal component. After accepting the quest, it should appear in the Quests section:

questJournalPeskyRabbits.png
questJournalPeskyRabbits.png (19.71 KiB) Viewed 2129 times
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Journal not showing anything

Post by MilziPPG »

So, just a little update on this. The demo scene's journal was not working either but when updated it, it worked fine but it still doesn't work in my own scene.

I then tried using your demo quest system in my own scene and the journal still doesn't work, which leads me to believe that I have set something incorrectly in my scene and not the components themselves. I'll keep on checking away and seeing what is going on but we're getting there!

I found the code that you told me about in the debug system and I've got the same debug messages as you. Fingers crossed!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Journal not showing anything

Post by Tony Li »

If you examine the player's Quest Journal component in the Unity editor's Inspector view, does the Quests section contain any quests?
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Journal not showing anything

Post by MilziPPG »

Yes, it does once I have accepted the quest. I just did another test where I placed the my quest system in your test demo scene and the journal works there so I'm almost certain that it is something in my scene. It's very strange indeed
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Journal not showing anything

Post by MilziPPG »

I just tried it out in the Koala Dungeon scene (one of the test demo scenes that More Mountains created) and it doesn't work in there either so not sure what is happening
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Journal not showing anything

Post by Tony Li »

Hi,

I'm going to be out of the office for several hours. When I get back in later today, I'll test Quest Machine in the Koala Dungeon scene, post a working scene here, and let you know if there are any quirks to setting it up.
MilziPPG
Posts: 33
Joined: Sat Jun 15, 2019 5:25 am

Re: Journal not showing anything

Post by MilziPPG »

Great, thank you so much Tony! I'm really sorry about all of this. I'll carry on and see if I can't work it out either
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Journal not showing anything

Post by Tony Li »

No worries! Here's the example scene (exported from Unity 2018.4):

QM_TDE_Example_2019-06-18.unitypackage

It also includes a script named TDEQuestMachineHelper.cs that I borrowed from the Dialogue System's TDE integration and customized for Quest Machine. It will probably make its way into an official Quest Machine / TopDown Engine integration at some point. This script provides a method to toggle the quest journal UI and also pauses the player when QM's dialogue or journal UIs are open.

These are the steps I used to set up the scene:
  • Created a new Unity 2018.4 project
  • Imported TDE
  • Set up TDE according to the manual (packages, etc.)
  • Imported QM
  • Selected Tools > Pixel Crushers > Common > Misc > Enable Physics2D Support so the Villager NPC could detect 2D trigger collision
  • Started with a copy of the KoalaDungeon scene
  • Copied the Koala player prefab, added a Quest Journal, and assigned it to the scene's LevelManager.
  • Added a Quest Machine prefab
  • Added the Villager NPC; changed it to start dialogue when the player enters its trigger collider. If you're comfortable with a little scripting, you could change this to use TDE's interaction system
  • Added TDEQuestMachineHelper to an empty GameObject
  • Added a UI button (with 'J' as a hotkey) to toggle the quest journal UI using a method in TDEQuestMachineHelper
In the example scene, there's no way to complete the Villager's quests. It's just meant to test the journal and dialogue UIs.
Post Reply