ORK integration

Announcements, support questions, and discussion for Quest Machine.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,

Please try this update:

QM_ORKSupport_2018-08-07.unitypackage

I added more debug messages. If it doesn't work, please tick the Quest Machine GameObject's Debug checkbox and post the output. When the scene starts, it may freeze for a couple seconds as it logs a line for

I fixed a possible bug related to item IDs that may have been the culprit. I also simplified it. Now it only counts items held by the player. The previous package summed items held by the entire party. And in retrospect I think this makes more sense, because it's the player who is turning in the quest.
dlevel
Posts: 183
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

edit: https://ibb.co/bKVD8z

sadly it didnt work, I went through every possible option also, like the start event of ork, groups etc. I can't understand what is happening
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Thanks for testing that package, and for your patience as we resolve this. There's probably one tiny little thing that will make the difference.

How are you instantiating the player? Is it different from the way the demo works?

Also, please find the first Console line that starts with:

Code: Select all

Quest Machine: Items that can be monitored for quest counters:
Click on it and press Ctrl+C to copy it to the clipboard. Then paste it into a reply. It should look something like this:
Spoiler

Code: Select all

Quest Machine: Items that can be monitored for quest counters:
Item ID=0, Name=Potion
Item ID=1, Name=Magic Potion
Item ID=2, Name=Revive Potion
Item ID=3, Name=Cure Potion
Item ID=4, Name=Fire Scroll
Item ID=5, Name=Paralyse Scroll
Item ID=6, Name=Book of Health
Item ID=7, Name=Book of Immunity
Item ID=8, Name=Underpants
Item ID=9, Name=Scan Scroll
Weapon ID=0, Name=Short Sword
Weapon ID=1, Name=Fire Sword
Weapon ID=2, Name=Long Sword
Weapon ID=3, Name=Mug Knife
Armor ID=0, Name=Cap
Armor ID=1, Name=Leather Helmet
Armor ID=2, Name=Wooden Shield
Armor ID=3, Name=Round Shield
Armor ID=4, Name=Jacket
Armor ID=5, Name=Leather Vest
Armor ID=6, Name=Fire Amulet
Armor ID=7, Name=Health Pendant
Armor ID=8, Name=Strength Pendant
Armor ID=9, Name=Mammoth Token
UnityEngine.Debug:Log(Object)
PixelCrushers.QuestMachine.ORKSupport.ORKInventoryCounterSynchronizer:GetItemIDs()
I just noticed that the support package may show the line a second time with an empty list of items; you can ignore that. It's the first one that's important. I've fixed this for the next version of the package.

After you accept the quest, I'm also looking for a line similar to:

Code: Select all

Quest Machine: Will synchronize inventory count of item 'Cap' to quest counter in 'fetchCap' on Player QM(Clone).
In your case, it should be something like:

Code: Select all

Quest Machine: Will synchronize inventory count of item 'Wood' to quest counter in 'firstCraft' on Player.
However, I don't see that in the screenshot. Without that line, the counter won't be updated.
dlevel
Posts: 183
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

so this is what we were looking for I guess:

error:

ArgumentException: An element with the same key already exists in the dictionary.
System.Collections.Generic.Dictionary`2[System.String,System.Int32].Add (System.String key, Int32 value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
PixelCrushers.QuestMachine.ORKSupport.ORKInventoryCounterSynchronizer.GetItemIDs () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest List MonoBehaviours/ORKInventoryCounterSynchronizer.cs:42)
PixelCrushers.QuestMachine.ORKSupport.ORKInventoryCounterSynchronizer.RefreshCounterItemNames () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest List MonoBehaviours/ORKInventoryCounterSynchronizer.cs:75)
PixelCrushers.QuestMachine.ORKSupport.ORKInventoryCounterSynchronizer.OnInitialize () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest List MonoBehaviours/ORKInventoryCounterSynchronizer.cs:29)
PixelCrushers.QuestMachine.ORKSupport.ORKInventoryMonitor+<Start>c__Iterator0.MoveNext () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest List MonoBehaviours/ORKInventoryMonitor.cs:40)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

other than that I cant find a debug message starting like you mentioned :) the way I instantiate the player is exactly the same as the demo (changed it to be identical).
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

That's a great clue; thank you. I suspect there may be a duplicate item name -- or maybe an item's internal name that wouldn't be visible in the ORK editor window. I'm out of the office right now, but when I get back later today, I'll update the support package to handle this.
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,

I feel hopeful about this version:

QM_ORKSupport_2018-08-08.unitypackage

It may report a warning that there's a duplicate item, armor, or weapon. That's a good thing because it means it's not choking on the duplicate as an unexpected error.
dlevel
Posts: 183
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

yeap! that fixed it, thank you for your great support Tony :)
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Whew! And thank you for your patience with it. :-)
dlevel
Posts: 183
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

hey,

Just a heads up, after ORK Framework 2.20 release I get this error:

Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest Conditions/ORKLevelQuestCondition.cs(57,35): error CS1061: Type `ORKFramework.Combatant' does not contain a definition for `Level' and no extension method `Level' of type `ORKFramework.Combatant' could be found. Are you missing an assembly reference?
User avatar
Tony Li
Posts: 22110
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,

You can download the updated support package for ORK 2.2.0 here: Quest Machine Extras
Post Reply