Page 10 of 26
Re: ORK integration
Posted: Mon Jan 13, 2020 9:13 am
by Tony Li
Quest labels should be fine for that.
Re: ORK integration
Posted: Tue May 26, 2020 8:55 pm
by Talairina
Hi, I was hoping you'd be able to help with this error I'm getting.
Code: Select all
NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.ORKSupport.ORKInventoryCounterSynchronizer.RefreshCounterItemNames () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest List MonoBehaviours/ORKInventoryCounterSynchronizer.cs:108)
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>d__6.MoveNext () (at Assets/Pixel Crushers/Quest Machine/Third Party Support/ORK Framework Support/Scripts/Quest List MonoBehaviours/ORKInventoryMonitor.cs:40)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <d815b7efac424eeb8e053965cccb1f98>:0)
I have the QuestMachine Prefab at the Main Menu, I then load in to a UI only scene with a QuestJournal attached to a empty GameObject. The error then occurs on this scene. If I then move to another UI only panel that assigns a given quest, the quest is assigned as expected and can be seen in the Journal.
Re: ORK integration
Posted: Tue May 26, 2020 9:17 pm
by Tony Li
Hi,
Can you back up your project, then update to the latest version of Quest Machine and import the ORK Support package included in its Third Party Support folder?
Also, make sure the game has an active group and an active group leader. Since it looks like you might be using an older version of the ORK integration, I can't be sure, but I think it's having a problem finding the current leader (i.e., the active player).
Re: ORK integration
Posted: Tue May 26, 2020 11:51 pm
by Talairina
I'm currently using ORK 2.28.1 which is the latest non-Beta version. I'm using Quest Machine 1.2.6. I have three combatants added to the Active Group with one set to Player via ORK events. The ORK support package is installed. I can assign Quests to the Journal attached to the Prefab of the main Combatant (Player), they show in the Journal. The above error is thrown though.
I did a quick check on if an Active group was set via script on the scene that throw's the error and sure enough all 3 combatants are there and set correctly. The whole thing is annoying me as you can imagine. I hate a bug that make's no sense to me xD
Re: ORK integration
Posted: Wed May 27, 2020 2:24 pm
by Tony Li
Thanks for the details. I'll check this out and try to post a solution here by the end of the day.
Re: ORK integration
Posted: Wed May 27, 2020 8:01 pm
by Tony Li
Hi,
This updated ORK Support package should prevent that error. It handles party configurations in a more flexible manner.
QM_ORKSupport_2020-05-27.unitypackage
Re: ORK integration
Posted: Wed May 27, 2020 8:45 pm
by Talairina
Hi, that fixed that issue, thank you for the quick support. However I now have a new one.
Code: Select all
Some objects were not cleaned up when closing the scene. (Did you spawn new GameObjects from OnDestroy?)
The following scene GameObjects were found:
Save System
I assign the quest via an ORK event. It show's correctly in the Journal. If I then change scene I get that error. If I attempt to save the game, the ORK data save's correctly but no Quest Machine data saves that I can see.
Re: ORK integration
Posted: Wed May 27, 2020 8:55 pm
by Tony Li
Hi,
Sorry, the documentation doesn't make it clear that Quest Machine's save system also needs to be set up. The QuestGiverForORK, QuestJournalForORK, etc., components grab the data from Quest Machine's save system and send it to ORK's save system.
Add these components to the Quest Machine GameObject: SaveSystem, JsonDataSerializer, and PlayerPrefsSavedGameDataStorer (not actually used, but silences a warning). Inspect the SaveSystem component, and untick Save Current Scene.
I just added that explanation to the manual. It'll be in the next update.
Re: ORK integration
Posted: Wed May 27, 2020 9:11 pm
by Talairina
Ahh, that silences the error. However it still does not save the Quest upon using the ORK Save system.
These are the steps I currently go through to check for an issue. Three scenes in all. A 'Main' scene that links to an 'Adventure' scene that lists various quests (Scene transfer buttons really) and links a UI button for the Journal. Then a 'Quest' scene with the actual Quest Giver.
- Game starts on Main scene (UI panels, Quest Master sceneObject with everything attached as per instruction above)
- Enter adventure scene. SImple UI button with ORK Event attached to toggle Journal UI.
- Single UI button that moves to next scene where Quest Giver is.
- Press Button to accept quest. Quest HUD shows quest has been accepted.
- Return to previous scene and open Journal. Quest shows up.
- Return to Main scene. Save game using UI button attached to an ORK Event.
- Close game. Start Game. Load Game.
- Enter Adventure scene, click Quest Journal UI. No quest listed. Quest Hud is empty.
I feel like I'm being really stupid with this.
Re: ORK integration
Posted: Wed May 27, 2020 9:44 pm
by Tony Li
Hi,
If you set up a save point, does it work correctly (i.e., save and load)?
If so, then we know the save system is working, and it's just a matter of making sure ORK saves the data in the old scene before changing to the new scene, and then applies any saved data for the new scene after entering it.
If you haven't already, try creating a new ORK project to play with the integration's demo:
- Import ORK
- Import Quest Machine
- Import Quest Machine's ORK integration
- Inside the ORK integration folder, import the package named DemoFiles.
I'm wrapping up work for the night, but I'll check back first thing in the morning.