CustomLua and Variable Calculation

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 23135
Joined: Thu Jul 18, 2013 1:27 pm

Re: CustomLua and Variable Calculation

Post by Tony Li »

Glad to help! If anything's unclear above, please let me know how I can clarify.
User avatar
ds2497
Posts: 80
Joined: Wed Jun 14, 2023 2:13 am

Re: CustomLua and Variable Calculation

Post by ds2497 »

Yesterday, I received multiple reports from players in the internal testing group stating that data in the Quest Journal disappears after restarting the game and loading from a save file. After various tests, here’s my solution:
  • "Save Current Scene" in the Save System must be checked. (The data loss this time was due to this not being enabled.)
  • In Dialogue System for Unity, the Persistent Data Setting can be adjusted to "No Game Objects". (Unless I misunderstood, this feature doesn’t seem necessary in most cases.)
  • Objects like Quest Giver or Dialogue System Saver should have "Save Across Scene Changes" enabled.
The game seems to be working fine (at least for now), but I have a few final questions:
  1. How does Quest Journal save its data? It doesn’t seem to be a Saver object.
  2. Does Quest Journal require "Save Current Scene" in the Save System to function properly?
  3. I’ve seen articles mentioning a "Save Settings" option under Quest Journal, but I can’t seem to find it. Has it been removed in a recent update?
Sorry for the frequent questions lately... My game has a lot of active players, and all three major Pixel Crushers assets are deeply integrated into my project. That's why sometimes I have to study the details. Thanks for your patience and support!
User avatar
Tony Li
Posts: 23135
Joined: Thu Jul 18, 2013 1:27 pm

Re: CustomLua and Variable Calculation

Post by Tony Li »

> 1. How does Quest Journal save its data? It doesn’t seem to be a Saver object.

It's a Saver. It's a subclass of QuestListContainer, which is a subclass of Saver. Make sure your Quest Journal has a unique save key.

> 2. Does Quest Journal require "Save Current Scene" in the Save System to function properly?

No. But "Save Across Scene Changes" must be ticked if you want to retain the contents of the Quest Journal across scene changes. Also make sure the player's Quest Journal in all scenes uses the same key.

> 3. I’ve seen articles mentioning a "Save Settings" option under Quest Journal, but I can’t seem to find it. Has it been removed in a recent update?

It's there:
saveSettings.png
saveSettings.png (77.67 KiB) Viewed 1778 times
User avatar
ds2497
Posts: 80
Joined: Wed Jun 14, 2023 2:13 am

Re: CustomLua and Variable Calculation

Post by ds2497 »

Thank you so much! I kept focusing on the UnityUIQuestJournalUI and completely overlooked that the QuestJournal is actually on the player object... Now that all my confusion is cleared up, I really appreciate your help!
User avatar
Tony Li
Posts: 23135
Joined: Thu Jul 18, 2013 1:27 pm

Re: CustomLua and Variable Calculation

Post by Tony Li »

Glad to help!
Post Reply