Hey there,
I'm having issues loading my quest status on starting a new game. I'm calling ORK.SaveGame.Save(0) and then trying to restore the data with ORK.SaveGame.Load(0) or ORK.SaveGame.LoadFile(0) but it's not updating the quest data properly, it looks like a blank slate when I call questHandler.HasQuests(). The questHandler var is set to ORK.Game.Quests after loading.
I can see the file gets created and I've tried calling quest.SaveGame() on the quest objects when marking them complete (before calling ORK.SaveGame.Save(0)) but it just doesn't seem to be cooperating. Any idea where I'm going wrong?
The other thing is that I've unticked 'Show Question' in both the Save and Load Question Dialogue options in the menu settings but they are still displaying (and the menu appears to be empty too...).
Might be a timing issue, e.g. loading save data before new game would naturally clear any of that data.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
My quest handling logic is all scripted calls to questEngine.HasQuests() and questEngine.GetQuests(), etc... I tried saving quest and task data in a custom save file today and re-adding the quests on loading with ORK.Game.Quests.AddQuest() but my code's just causing mayhem now trying to add quests and mark tasks complete. :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Keep in mind that loading a save game will load all saved data, not just the quests.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
tasks[taskNumber].SetFinished(player, false, false, true, true)
This usually works but I can't figure out this one problem, where I have these two active quests (quests 4 and 5) with multiple tasks... When the game loads up, my code picks up the first task completion on quest 5 but it fails to set it as finished, which usually works. I've even delayed the task completion trigger using a coroutine which waits for 7 seconds before attempting to call SetFinished(). The quest itself shows up as active.
I've also tried calling IsFinished() on the task right afterwards and also in a separate coroutine (that waits for 3 seconds after setting it to finished) but it still comes back false.
The really interesting bit is if I comment out the trigger for quest 5's first task completion and instead finish the first task of quest 4, it behaves as expected and marks quest 4's task as finished.
Any idea what I could be doing wrong?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Funny thing is, it's also stopping the first task of quest 5 from being completable. It's like it locks up something in the back-end.
Maybe I'll wipe the save and try again.