ORK integration
Re: ORK integration
Here's the updated ORK Support package for Quest Machine:
QM_ORKSupport_2018-08-03.unitypackage
You can now set up quest counters to stay synchronized with the player's inventory.
In the demo, Green Pants has a second quest to find a Cap for him to wear. To set it up, I added a counter named "Cap" (which has to exactly match the ORK item name) and set its update mode to Data Sync.
QM_ORKSupport_2018-08-03.unitypackage
You can now set up quest counters to stay synchronized with the player's inventory.
In the demo, Green Pants has a second quest to find a Cap for him to wear. To set it up, I added a counter named "Cap" (which has to exactly match the ORK item name) and set its update mode to Data Sync.
Re: ORK integration
This is awesome, thank you for the fast update! I need one more thing, when I user startQuestMachineDialogue and the dialogue of the quest pops up, with my game being first person(so mouse locks/cursor is disabled) I have created some custom scripts that enable the mouse when ORK block player controls.
So to be able to press the buttons on the QM dialogues I need to block the controls in the startQuestMachineDialogue event, but then I don't have a way to enable them again with an ORK Node.
I tried creating a simple script that disables player controls script when quest dialogue UI element is enabled (OnEnable) and enable the player controls component when the UI is disabled, but ORK seems to ignore that script when you press jump or something else and enables the controls again..
Long story short, If I could have QM running an ORK event on close dialogue would be awesome. if it's too much trouble for you to do that, I ll dig some more in ORK API so I can call a node from script if possible.
edit: yeah never mind, will just go custom and call an event via a script, it seems possible.
So to be able to press the buttons on the QM dialogues I need to block the controls in the startQuestMachineDialogue event, but then I don't have a way to enable them again with an ORK Node.
I tried creating a simple script that disables player controls script when quest dialogue UI element is enabled (OnEnable) and enable the player controls component when the UI is disabled, but ORK seems to ignore that script when you press jump or something else and enables the controls again..
Long story short, If I could have QM running an ORK event on close dialogue would be awesome. if it's too much trouble for you to do that, I ll dig some more in ORK API so I can call a node from script if possible.
edit: yeah never mind, will just go custom and call an event via a script, it seems possible.
Re: ORK integration
so I used the new package, and it doesn't seem to update my new acquired Items, I use {#Wood}/10 which seems to work fine (I tried randomizer on counters to check if it responds) but never updates when getting new Wood. using exactly same Item name (Wood) and data sync.
Re: ORK integration
Hi!
In your scene (with Wood), does the player prefab have a Quest Journal For ORK component (not a Quest Journal component)?
The Quest Journal For ORK component in the updated 2018-08-03 package linked above automatically adds an ORK Inventory Counter Synchronizer component. This component keeps counters in sync for all quests on the player. However, the counter will still limit its range of values to the Min and Max that you specify. For your Wood counter, make sure Max is set to 10.
Does the ORK Support > Demo scene's Fetch Cap quest work for you?dlevel wrote: ↑Sat Aug 04, 2018 3:28 pmso I used the new package, and it doesn't seem to update my new acquired Items, I use {#Wood}/10 which seems to work fine (I tried randomizer on counters to check if it responds) but never updates when getting new Wood. using exactly same Item name (Wood) and data sync.
In your scene (with Wood), does the player prefab have a Quest Journal For ORK component (not a Quest Journal component)?
The Quest Journal For ORK component in the updated 2018-08-03 package linked above automatically adds an ORK Inventory Counter Synchronizer component. This component keeps counters in sync for all quests on the player. However, the counter will still limit its range of values to the Min and Max that you specify. For your Wood counter, make sure Max is set to 10.
Re: ORK integration
Yeap I see the quest counter that is added on the quest giver, but still, the Wood doesn't update on HUD, maybe there is a problem that I already have Wood in my inventory (less than 10)?
Fetch Cap quest works but it doesn't have a HUD to test 1/10 etc. my quests seem to work too, what I m looking for is the counters in HUD.
edit: nope, test it with 0 Wood, still no counter in HUD btw I use latest 2.17.0 ORK
edit2: it works on Demo when adding a HUD for Cap. will investigate more.
edit 3: what I noticed is that it spawns a ORK Coutner component on the quest giver as well as the player, but in your demo I see that it does it only on player.
Fetch Cap quest works but it doesn't have a HUD to test 1/10 etc. my quests seem to work too, what I m looking for is the counters in HUD.
edit: nope, test it with 0 Wood, still no counter in HUD btw I use latest 2.17.0 ORK
edit2: it works on Demo when adding a HUD for Cap. will investigate more.
edit 3: what I noticed is that it spawns a ORK Coutner component on the quest giver as well as the player, but in your demo I see that it does it only on player.
Re: ORK integration
Does your HUD text contain the tag below?
Is the problem that the HUD text doesn't update, but the quest counter does correctly update on the player's active copy of the quest?
If the quest counter updates but the HUD text doesn't, please double-check the HUD text tag, counter name, and item name.
If the quest counter doesn't update at all, does your player prefab have a Quest Journal For ORK component?
Here's an updated ORK Support package: QM_ORKSupport_2018-08-05.unitypackage
The only change is that it adds the name of the GameObject to debug messages, which may make it easier to identify the issue.
In the Demo's scene "0 Main Menu QM" scene, If you tick the Quest Machine's Debug checkbox, the player's Quest Journal For ORK component will log this message to the Console / output log file:
If you tick Green Pants' Monitor Player Inventory checkbox in the "1 Town QM" scene (which isn't necessary in this demo), it will also log this:
You only need to tick that checkbox on the NPC if it needs to monitor the player's inventory for quest autostart or offer conditions. Most of the time you can leave it unticked like in the demo. The message above will actually appear 3-4 times as ORK changes around the group settings, adding the NPC to a battle group, etc. Each time, Quest Machine will re-register for inventory change events to make sure it's always up to date.
When you accept the quest, you should see messages like this:
And when you find a Cap, it will log this message:
If you can't get your Wood quest to do the same, please feel free to send a copy of your project to tony (at) pixelcrushers.com or send screenshots of whatever you think might be relevant. If you want to send your project, please zip up the Assets and ProjectSettings folders. I won't need any other folders. This will keep the file size relatively small.
Code: Select all
{#Wood}
If the quest counter updates but the HUD text doesn't, please double-check the HUD text tag, counter name, and item name.
If the quest counter doesn't update at all, does your player prefab have a Quest Journal For ORK component?
Here's an updated ORK Support package: QM_ORKSupport_2018-08-05.unitypackage
The only change is that it adds the name of the GameObject to debug messages, which may make it easier to identify the issue.
In the Demo's scene "0 Main Menu QM" scene, If you tick the Quest Machine's Debug checkbox, the player's Quest Journal For ORK component will log this message to the Console / output log file:
Code: Select all
Quest Machine: Player QM(Clone) will monitor inventory to sync player inventory counts to quest counters.
Code: Select all
Quest Machine: NPC_green will monitor inventory to sync player inventory counts to quest counters.
When you accept the quest, you should see messages like this:
Code: Select all
Quest Machine: Will synchronize inventory count of item 'Cap' to quest counter in 'fetchCap'.
Quest Machine: My Head's Cold!.SetState(Active, informListeners=True)
Quest Machine: Syncing inventory count of 0 Cap to quest counters.
Code: Select all
Quest Machine: Syncing inventory count of 1 Cap to quest counters.
Re: ORK integration
https://ibb.co/kRTALe
So I can't get it to work, the HUD works fine with {#Wood}/10 but doesnt update. In your demo it works fine and I checked every single thing. There is one thing I m thinking, I m having over 1000 items/weapons/armors in my ORK database, so maybe the counter doesnt scrap them correctly? (no dublicates checked it). Sadly is really hard to send you my project, is huge. If you can check it via screenshots or you need to check something specific please let me know
So I can't get it to work, the HUD works fine with {#Wood}/10 but doesnt update. In your demo it works fine and I checked every single thing. There is one thing I m thinking, I m having over 1000 items/weapons/armors in my ORK database, so maybe the counter doesnt scrap them correctly? (no dublicates checked it). Sadly is really hard to send you my project, is huge. If you can check it via screenshots or you need to check something specific please let me know
Re: ORK integration
Would you please post the 3 screenshots requested below?
1. Your quest's Wood counter. Here's the demo scene's Cap counter for example:
2. Your NPC's Quest Giver For ORK component, like this:
3. At runtime, after accepting the quest, your player GameObject's components, like this:
1. Your quest's Wood counter. Here's the demo scene's Cap counter for example:
2. Your NPC's Quest Giver For ORK component, like this:
3. At runtime, after accepting the quest, your player GameObject's components, like this:
Re: ORK integration
https://ibb.co/nNRJrK
https://ibb.co/f3PhJz
runtime 1: https://ibb.co/cEQpyz
runtime 2:https://ibb.co/hSVaMK
here you go
https://ibb.co/f3PhJz
runtime 1: https://ibb.co/cEQpyz
runtime 2:https://ibb.co/hSVaMK
here you go
Re: ORK integration
Thanks for the screenshots. Everything looks good as far as I can tell.
I need to research ORK's group system a little more. Maybe I missed something in my understanding of how ORK's "active group" works. I'll try to have an update for you today.
I need to research ORK's group system a little more. Maybe I missed something in my understanding of how ORK's "active group" works. I'll try to have an update for you today.