ORK integration

Announcements, support questions, and discussion for Quest Machine.
dlevel
Posts: 181
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

Ok perfect, right on time with the new ORK update out :)
User avatar
Tony Li
Posts: 22090
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

I'll be running the Dialogue System + ORK integration and Quest Machine + ORK integration through testing next week to make sure nothing in the latest versions of ORK broke anything with the integrations. I'm running a couple versions behind on ORK, and I want to make sure everything will run perfectly in the latest version.
dlevel
Posts: 181
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

I was able to finally start playing around with QM, and I have some questions, all ORK/QM related.

1) how can I have the HUD counter for kills/items gathered? I saw in your demo that you do it with {#coins} but how can I do it with ORK Items (gather 10 Wood for example). And the same for kills.

2) I use some strings in ORK like: #varstringplayerName# that gets the player name, is it possible to get those from QM?
User avatar
Tony Li
Posts: 22090
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,
dlevel wrote: Wed Aug 01, 2018 8:23 am1) how can I have the HUD counter for kills/items gathered? I saw in your demo that you do it with {#coins} but how can I do it with ORK Items (gather 10 Wood for example). And the same for kills.
Use the SetQuestCounter event step to keep a Quest Machine quest's counter in sync with the number of kills / items gathered. For kills, you may find it easier to set up the message system to send a message (e.g., "Killed":"Orc") that auto-increments the counter.

For the completion condition, you can either check the counter using a Counter Value Quest Condition or check the player's inventory directly using an ORK Has Item Quest Condition.
dlevel wrote: Wed Aug 01, 2018 8:23 am2) I use some strings in ORK like: #varstringplayerName# that gets the player name, is it possible to get those from QM?
It will probably require a little scripting. To get the player's name as defined in its Quest Journal component:

Code: Select all

var questJournal = FindObjectOfType<QuestJournal>();
string playerName = questJournal.displayName.value;
If that's not what you're looking for, would you please give me an example of how you'd want to use it?
dlevel
Posts: 181
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

Tony Li wrote: Wed Aug 01, 2018 10:54 am Hi,
dlevel wrote: Wed Aug 01, 2018 8:23 am1) how can I have the HUD counter for kills/items gathered? I saw in your demo that you do it with {#coins} but how can I do it with ORK Items (gather 10 Wood for example). And the same for kills.
Use the SetQuestCounter event step to keep a Quest Machine quest's counter in sync with the number of kills / items gathered. For kills, you may find it easier to set up the message system to send a message (e.g., "Killed":"Orc") that auto-increments the counter.

For the completion condition, you can either check the counter using a Counter Value Quest Condition or check the player's inventory directly using an ORK Has Item Quest Condition.
dlevel wrote: Wed Aug 01, 2018 8:23 am2) I use some strings in ORK like: #varstringplayerName# that gets the player name, is it possible to get those from QM?
It will probably require a little scripting. To get the player's name as defined in its Quest Journal component:

Code: Select all

var questJournal = FindObjectOfType<QuestJournal>();
string playerName = questJournal.displayName.value;
If that's not what you're looking for, would you please give me an example of how you'd want to use it?

Hmmm, I can't quite get how the event steps work, I mean where do I set the SetQuestCounter to sync the counter with QM? Would love a video tutorial with ORK and the workflow that you have in mind as the best with ORK/QM, or just a workflow graph/explanation here :)

for now I just use it like in your ORK demo, which is pretty straight forward and easy
User avatar
Tony Li
Posts: 22090
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

dlevel wrote: Wed Aug 01, 2018 4:02 pm...where do I set the SetQuestCounter to sync the counter with QM?
I had in mind something like adding a SetQuestCounter step to GiL's Harvesting items event, but there's probably a better approach. I'll dig into ORK's gameplay source and see if there's a better way.
dlevel
Posts: 181
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

yeah that doesn't seem very handy, if you find any other way let me know :)
User avatar
Tony Li
Posts: 22090
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

ORK's Inventory class has a "changed" event. I'll update Quest Machine's ORK Support package to hook into this event. I'll try to have it ready some time next week.
dlevel
Posts: 181
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

that sounds awesome! it would be pretty nit if you could call an ORK event from QM, as an alternative component so you could start an ORK event when a quest starts/finishes. Just a thought :)
User avatar
Tony Li
Posts: 22090
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

dlevel wrote: Fri Aug 03, 2018 8:36 amthat sounds awesome! it would be pretty nit if you could call an ORK event from QM, as an alternative component so you could start an ORK event when a quest starts/finishes. Just a thought :)
You already can. Just add an ORK Event Quest Action to your quest.
Post Reply