ORK integration

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

Re: ORK integration

Post by dlevel »

Hey Tony,

Have an issue with quests now that I implemented a lot of handwritten ones, suddenly I experience a lot of bugs that trying to debug but I ll start with the biggest one that might be the guide to fix all smaller ones. I ll give as many details as I can.

So I have a player that he disconnected from the game (no save, but he had saved after he took the quests, since the quests take days and he had multiple saves the past couple of days, game saves every 5 minutes), but lost all his quests from the game except the auto generated ones, I loaded his save and it seems all quests are on the Quest Journal for ORK as they should, but not in the game journal. The definitely not finished. Here are some issues.

You can find images below from:

Player Quest Journal:
https://ibb.co/jrwp1GY
https://ibb.co/YjBzhdQ

In-game Journal:
https://ibb.co/Jjhw8x9

Quest Machine main GO:
https://ibb.co/YZfm11C
https://ibb.co/7t7c4y8

Hierarchy:
https://ibb.co/Ky9tsF6

One of the quests that disappeared but not finished:

https://ibb.co/ZcbzT9y
https://ibb.co/xH2xwZ6
https://ibb.co/nnSJJ52
https://ibb.co/TLDJ50w

Quest Giver of this quest:

https://ibb.co/bbg0pPM
https://ibb.co/x5mKM45

DB That shows the quest included:
https://ibb.co/FBbnVwb

Another Quest Giver (One that gives many of the new handwritten quests):

https://ibb.co/xH2xwZ6
https://ibb.co/nnSJJ52
https://ibb.co/TLDJ50w

There are other minor issues that for example only the header of the quest shows in the generated quest in the in-game journal photo, which just uses the same generation quest giver as the others daily quests that you see there with the counter.

Hope we find a solution since right now the game is broken quest-wise. In general when things don't go smooth from the player side (which never does), and something happens from the player side, like alt+f4 the game in the middle of a step of a quest, and things like that, the quest bug out in various ways. It seems the auto generated ones which are simple kill X amount work ok, other than some issues like the one mentioned above. Using latest

Thank you in advance
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,

Can you reproduce the issue yourself? If so, do any errors or warnings appear in the Console?

Were the first two screenshots (Player Quest Journal) taken during play mode or outside of play mode?
dlevel
Posts: 168
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

Yes I can reproduce the issue, and it usually happens as I said when you dont finish a quest and you stop it in between the steps. The quests are given in play mode by quest givers. I dont see any warnings or errors since they just stop existing (even though as you see the player has then in the journal). To add to that, just had another report for a quest that lost the tasks and only shows the Headtitle on a handwritten quest (just like the auto generated one I posted in my previous post). Again these things started after implementing 100 new handwritten quests, just mentioning it since the DB now is larger etc. if that makes any difference.

Any guidance appreciated
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Thanks for the details. I'll try to reproduce the issue and get to you by end of day tomorrow.
dlevel
Posts: 168
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

Hey, saw the release, anything related to my issues? Thank you!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,

I'm still looking into it. I had to clear those updates off my plate to give me dedicated time to focus on this issue.

Just making sure I'm setting up the same repro here: You're using ORK's save system and tying Quest Machine into it, right?
dlevel
Posts: 168
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

Ok perfect, thank I m counting on your right now since this issue is breaking the game a lot :/

Yes using ORK's save system, nothing else seems to break regarding saving fyi
dlevel
Posts: 168
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

Hey Tony, is this ok that Saver System and ORKQuestMachineSaveData exist is Quest Machine GO? Would it make any change if I have the quests on player with waiting to start and change the state of the quest to active with Change State ORK node instead giving the player the quests on runtime using the Give Quest node in ORK?

https://ibb.co/bmqK2vP

Another small issue that might be related and mentioning it maybe it helps, I have a quest to delete when complete, but its still showing on Journal:

https://ibb.co/whZGYsQ
https://ibb.co/W5rPhLg
https://ibb.co/RC9tPKZ

and another idea, is there a chance OnApplicationQuit messes with the saves? As I understand the game saves on ApplicationQuit. I don't care about saving when palyer quits since the game saves regularly itself and send all saves on my server as well, is there a chance these saves not forwarded on ORK on application quit on time? And that causes conflicts when player loads the game? Just some ideas trying to figure this out. Should we have an option for this if thats something that might create issues, since its not something I take advantage off?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: ORK integration

Post by Tony Li »

Hi,

Is ORKQuestMachineSaveData your own script? The integration has a MakinomQuestMachineSaveData component. Assuming ORKQuestMachineSaveData is, say, a subclass of MakinomQuestMachineSaveData, it should be fine to put it on the Quest Machine GameObject.

If you want to prevent it from saving OnApplicationQuit(), call this method

Code: Select all

Maki.SaveGame.UnregisterCustomData("quest_machine", false);
dlevel
Posts: 168
Joined: Wed Nov 16, 2016 6:17 pm

Re: ORK integration

Post by dlevel »

My thinking is, will on load the saves gets conflicts. Is there anywhere else Quest Machine saves at and loads the data on scene load or its just the ORK save? Is the SaveSystem component needed ?

No ORKQuestMAchineSaveData is not my script, it's on ORK Framework Support/Scripts/Utility and here is the code:

Code: Select all

// Copyright © Pixel Crushers. All rights reserved.

using UnityEngine;
using ORKFramework;

namespace PixelCrushers.QuestMachine.ORKSupport
{

	/// <summary>
	/// Add to Quest Machine Save System GameObject to save all Quest Machine data.
	/// Typically not required because QuestJournalForORK and QuestGiverForORK also
	/// save into ORK's save system.
	/// </summary>
	public class ORKQuestMachineSaveData : MonoBehaviour, ISaveData
	{
		public bool debug = false;

		// register to the ORK save game handler
		protected virtual void Start()
		{
			ORK.SaveGame.RegisterCustomData("quest_machine", this, false);
			DontDestroyOnLoad(this.gameObject);
		}

		// called when a game is saved
		public DataObject SaveGame()
		{
			DataObject data = new DataObject();
			var serializedData = SaveSystem.Serialize(SaveSystem.RecordSavedGameData());
			if (debug) Debug.Log(GetType().Name + ".SaveGame: " + serializedData);
			data.Set("savedgamedata", serializedData);
			return data;
		}

		// called when a game is loaded
		// depending on the 'beforeSceneLoad' parameter of the registration, 
		// the function will be called either before or after loading the scene.
		public void LoadGame(DataObject data)
		{
			if (data != null)
			{
				string s = null;
				data.Get("savedgamedata", ref s);
				if (string.IsNullOrEmpty(s))
				{
					if (debug) Debug.Log(GetType().Name + ".LoadGame: No data to restore.");
				}
				else
				{
					if (debug) Debug.Log(GetType().Name + ".LoadGame: " + s);
					var savedGameData = SaveSystem.Deserialize<SavedGameData>(s);
					if (savedGameData != null)
					{
						SaveSystem.ApplySavedGameData(savedGameData);
					}
				}
			}
		}
	}
}
Anything else you found regarding the issue that might help?

Also, any idea of the quests remain on journal after finishing even though my settings are stating to delete these quests?

Thanks


edit:

The save part of quest machine for a player that has bugged the quest "Mastering The Basics", if it would help:

https://file.io/ys6KShGuRCHQ

and the console for this quest when loading:

https://ibb.co/pfph3qn

Journal photo not showing next steps:

https://ibb.co/v35bwy0

The actual quest:

https://file.io/kMaG2FtyBfCh

Edit 2:

Some more info, it seems that if a quest is active and the game tries to re-give the quest (generate for example) causes that issue too (steps/counters dissapear and you only see the headline), or it has an autostart condition (even with 1 Max Times) it's not the only way it happens but this might help
Post Reply