0
Answered

Understanding the "tracked" quests feature (newbie)

VictorSB 5 months ago in Quests updated by Marti (Lead Developer) 5 months ago 8

Hello I am a happy new user of game creator but I am having trouble understanding the quest system.

I managed to create my first basic quests, open the journal and show the quest hud.

I have several quests active but only one of them tracked, I was expecting only tracked quests will appear on the HUD but actually all active quests appear on the HUD regardless of them being tracked or not. Is this expected behavior? Can you filter the HUD to only show tracked quests?

Thank you

Unity version:
2019.3.7f1
Game Creator version:
1.1.6
Answered

Hi Victor;

Thank you for your kind words :-) Yes, you can do that. It will require to create a custom HUD though (don't worry, it's quite easy). First you need to duplicate the HUD prefab used for the Quests Hud and place it somewhere outside the Plugins/ folder.

Then, drop this prefab onto the Preferences Window -> Quests -> Settings (top right corner of the window).

Now, you can edit the new HUD prefab. If you open it up, you'll see a bunch of game objects. At the root you should see a Quest Group UI component, with different filter options. You should be able to mark the checkbox that reads "Only Tracked Tasks" (or something like that, I currently don't have the Quests module with the and I'm speaking out of memory).

You can play with other filters to tailor it to your game. Cheers!

Got it! and yes now featuring a filtered HUD only with tracked quests!

Regards

One final thing, and I may have my own answer, do I need to program my own simple action to mark a quest as tracked? I don't see actions or conditions regarding the tracked attribute.

Thanks

I'm opening a ticket for this. It's true that I don't recall having an Action that marks a Quest as tracked (this is usually done in the Journal, which accesses the Quest API directly). If you want an Action for that and you're up to the task, feel free to do it. We'll add in on the next update :-)

Done! I had to modify the scriptable object IQuest to expose the setIsTracking then I created an action ActionQuestTrack.cs that takes a quest and a bool, do you have a repository where I can do a pull request? Happy to contribute

Hi Victor; Unfortunately, our repositories are just open for us. We do want to allow viewing the source code and accepting pull requests in the future, but at the moment we have our internal tools and packages all together, so it's not feasible to do.

Regarding the quest tracking, you should already be able to do that without modifying the code. The thing is that only "root quests" can be tracked, not tasks. The way quests works is:

There's a public interface (well, it was an interface, now it's a class, but we had to keep the name to avoid conflicts) called IQuest, which is the root of all quests and tasks.

Quest classes are the root of all quests, which their children are Tasks. the method SetIsTracking(bool value) is only available on a Quest class, not their sub-tasks.

Note: You can see that the Task class, its IsTracking() method queries the parent of its IsTracking, up until the root parent, which has the tracking state.

+1

Understood it was indeed a misunderstanding with the IQuest action I was able to do it only with an action by using a Quest Slot instead of IQuest. Thank you. Should I / Can I publish the action on the hub or something similar if it may be useful for other readers?


Thanks


PS: I am amazed with your ability to keep up with mine and everyone else's questions. Loving this community so far  

Sure! Would be great if you could publish it there for anyone to use it.

As for keeping up with the answers, I won't lie, it's quite the challenge! Lately all I do is answer emails and support questions, but the amazing community at Discord is also helping a lot and leaves me a few hours to develop new features and maintain the current modules. Cheers!