Is this possible with quest machine?

Announcements, support questions, and discussion for Quest Machine.
Post Reply
Passero
Posts: 32
Joined: Thu Jan 18, 2018 1:19 pm

Is this possible with quest machine?

Post by Passero »

I am building a 2D space game and I am starting to work on my own quest system but was wondering if quest machine can be my solution.

The idea is that you interact with NPC from a UI so every NPC doesn't actually have a gameObject.
In the UI you see a list of available people on the planet with icons of their available quests.
Each person can have a max of 4 quests (one for each type: research, transport, combat, manufacturing).
See an example of the UI in the attachment on this thread.

In order to use quest system I would need:

1) get a list of quests assigned to an NPC
2) Define quest types (research, combat,...) where each type has an icon so I can represent it in the UI
3) Being able to use the system without NPC being represented by gameObjects

Is this easy to do with quest machine or would it require a lot of customization? (Not talking about UI customization but code customization)
Attachments
quests.JPG
quests.JPG (47.88 KiB) Viewed 642 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is this possible with quest machine?

Post by Tony Li »

Hi,

Yes, you can do that. It's easiest if you use an empty GameObject (it can even be on a UI element if you want) to hold each NPC's info. The GameObject doesn't have to have a physical representation of the NPC, such as a character model. It can just be an empty GameObject. This makes it much easier to tie into the save system, etc. The GameObject will have a QuestGiver component, which is the component that holds the NPC's list of quests, etc.

If you don't want to use a GameObject, you can still maintain your own list of Quest objects in a non-MonoBehaviour script. You won't have to customize any Quest Machine code, but you may have to write a little more of your own code to do the things that QuestGiver normally provides.
Passero wrote: Sun Sep 29, 2019 6:11 am1) get a list of quests assigned to an NPC
If the NPC has a QuestGiver component, just check QuestGiver.questList.
Passero wrote: Sun Sep 29, 2019 6:11 am2) Define quest types (research, combat,...) where each type has an icon so I can represent it in the UI
Yes. In Quest Machine, they're called quest groups. In each quest, you'd just specify which group it belongs to (research, combat, etc.).

Please feel free to try out the evaluation version.
Passero
Posts: 32
Joined: Thu Jan 18, 2018 1:19 pm

Re: Is this possible with quest machine?

Post by Passero »

Thanks. Based upon your reply I'm confident I can make it work.
I already use your Dialog system so I'll go ahead and buy they quest machine.
I'll ask away if I'm in trouble ;)
Passero
Posts: 32
Joined: Thu Jan 18, 2018 1:19 pm

Re: Is this possible with quest machine?

Post by Passero »

So I went ahead and bought quest machine and started integrating it into my work.
Took me only 1 hour to rewrite my code and change my own quest system to quest machine.

Didn't have to change anything in my UI, just rewrite a few lines of code.

I created some empty game objects that acts as the NPC where I add the Quest Giver component. Before I created a "Person" which was a scriptable object so I changed that to a MonoBehaviour and added both Quest Giver an Person to that empty game object.

Works like a charm!
Looking forward diving much deeper into the capabilities.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Is this possible with quest machine?

Post by Tony Li »

Great! Thanks for buying Quest Machine! If any questions come up, just let me know.

BTW, there is a patch on the Extras page that fixes the Activate GameObject quest action, and a new version (1.2.1) is pending release on the Asset Store.
Post Reply