Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Season's Greetings, everyone!
(This project uses Dialogue System for Unity and Adventure Creator, the versions are in my signature)
So, I have two game saves. One is at the start of the conversation, the other is a couple of entries in. If I load either of them
when no conversations are active, they run fine.
Save 1: https://www.mediafire.com/view/3yfiypci ... 1.png/file
Save 2: https://www.mediafire.com/view/a28kajbf ... 2.png/file
If I load them while any conversation is running, they skip straight to entry 7, but with their expected
entry's sequences played out:
Save 1: https://www.mediafire.com/view/20sk42b9 ... 3.png/file
Save 2: https://www.mediafire.com/view/18dkg690 ... 4.png/file
There's a similar issue where if you load a save with no active dialogue and the previous game state had an active conversation, that conversation remains open in the newly loaded game. It seemed like the simplest solution was to
make an AC variable monitor when a conversation was started, then have the Pause menu's resume button's on_click
action list shut down any conversations that don't line up.
Somehow, shutting down a conversation in this way interferes with the Pause menu's ability to fade out during shutdown.
example: https://www.mediafire.com/view/zqswbpt5 ... 5.png/file
Finally, it seems the AC variables don't update when a game is loaded with an inventory open during a conversation.
To trigger this bug, start a conversation, click the Court Record button and create two saves, each with a different item in the inventory selected. Then, try loading either save. Nothing will seem to happen. If you load the after the conversation closes, the saves behave normally.
Merry Christmas to all... Gaaah!
(This project uses Dialogue System for Unity and Adventure Creator, the versions are in my signature)
So, I have two game saves. One is at the start of the conversation, the other is a couple of entries in. If I load either of them
when no conversations are active, they run fine.
Save 1: https://www.mediafire.com/view/3yfiypci ... 1.png/file
Save 2: https://www.mediafire.com/view/a28kajbf ... 2.png/file
If I load them while any conversation is running, they skip straight to entry 7, but with their expected
entry's sequences played out:
Save 1: https://www.mediafire.com/view/20sk42b9 ... 3.png/file
Save 2: https://www.mediafire.com/view/18dkg690 ... 4.png/file
There's a similar issue where if you load a save with no active dialogue and the previous game state had an active conversation, that conversation remains open in the newly loaded game. It seemed like the simplest solution was to
make an AC variable monitor when a conversation was started, then have the Pause menu's resume button's on_click
action list shut down any conversations that don't line up.
Somehow, shutting down a conversation in this way interferes with the Pause menu's ability to fade out during shutdown.
example: https://www.mediafire.com/view/zqswbpt5 ... 5.png/file
Finally, it seems the AC variables don't update when a game is loaded with an inventory open during a conversation.
To trigger this bug, start a conversation, click the Court Record button and create two saves, each with a different item in the inventory selected. Then, try loading either save. Nothing will seem to happen. If you load the after the conversation closes, the saves behave normally.
Merry Christmas to all... Gaaah!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Hi and Merry almost-Christmas!
Both saves skip straight to entry 7? Even though you didn't save while it the conversation was on entry 7?CodePrincess wrote: ↑Thu Dec 17, 2020 7:55 pmSo, I have two game saves. One is at the start of the conversation, the other is a couple of entries in. If I load either of them when no conversations are active, they run fine. ...
If I load them while any conversation is running, they skip straight to entry 7, but with their expected entry's sequences played out ...
Maybe your variable check is causing the load game actionlist to jump past the action that fades out the pause menu. What if you configure your load game actionlist to always run the Third Party: Dialogue System Conversation > Stop Conversation action before loading the game, without checking a variable? If no DS conversation is active, the action won't do anything.CodePrincess wrote: ↑Thu Dec 17, 2020 7:55 pmThere's a similar issue where if you load a save with no active dialogue and the previous game state had an active conversation, that conversation remains open in the newly loaded game. It seemed like the simplest solution was to make an AC variable monitor when a conversation was started, then have the Pause menu's resume button's on_click action list shut down any conversations that don't line up.
Do you mean that it won't load the saved game, or when you load the saved game it doesn't have the saved AV variable values?CodePrincess wrote: ↑Thu Dec 17, 2020 7:55 pmFinally, it seems the AC variables don't update when a game is loaded with an inventory open during a conversation.
To trigger this bug, start a conversation, click the Court Record button and create two saves, each with a different item in the inventory selected. Then, try loading either save. Nothing will seem to happen.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Exactly!Both saves skip straight to entry 7? Even though you didn't save while it the conversation was on entry 7?
Good Idea! I'll try that in the morning!Maybe your variable check is causing the load game actionlist to jump past the action that fades out the pause menu. What if you configure your load game actionlist to always run the Third Party: Dialogue System Conversation > Stop Conversation action before loading the game, without checking a variable? If no DS conversation is active, the action won't do anything.
AV is the Adventure Creator variables, right? If so, yes, that's right, the AV vars don't reflect the values in the game save; the game successfully goes through the motions of loading a game, yet I don't see any changes in the variables that are supposed to reflect which inventory menu is open, or which category is selected, or which item is highlighted.Do you mean that it won't load the saved game, or when you load the saved game it doesn't have the saved AV variable values?
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then reproduce the issue. The Dialogue System will log every entry that it goes through, including every Sequence that it plays. This may give you some insight into what's going on under the hood.CodePrincess wrote: ↑Fri Dec 18, 2020 1:41 amExactly!Both saves skip straight to entry 7? Even though you didn't save while it the conversation was on entry 7?
"AV" is how I misspell "AC" when it's late at night.CodePrincess wrote: ↑Fri Dec 18, 2020 1:41 amAV is the Adventure Creator variables, right? If so, yes, that's right, the AV vars don't reflect the values in the game save; the game successfully goes through the motions of loading a game, yet I don't see any changes in the variables that are supposed to reflect which inventory menu is open, or which category is selected, or which item is highlighted.Do you mean that it won't load the saved game, or when you load the saved game it doesn't have the saved AV variable values?

This sounds like a bug that I can make a patch for. I'll check it out today and let you know.
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Hi Melissa,
How is your save system set up? Are you using a Dialogue System Saver component? If so, please make sure Skip Apply Data After Frames If Apply Immediate is ticked.
Can you configure your save process to call the Adventure Creator Bridge component's SyncLuaToAdventureCreator() method just before saving?
How is your save system set up? Are you using a Dialogue System Saver component? If so, please make sure Skip Apply Data After Frames If Apply Immediate is ticked.
Can you configure your save process to call the Adventure Creator Bridge component's SyncLuaToAdventureCreator() method just before saving?
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
I added a partial copy of the readout. It's still a little long, though.Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then reproduce the issue. The Dialogue System will log every entry that it goes through, including every Sequence that it plays. This may give you some insight into what's going on under the hood.
Okay, it goes roughly:
DialogueProgressSaver.LoadDialogueProgress(): attempting to load slot 2...
Restoring Dialogue System state from Adventure Creator.
Dialogue System: Ending conversation.
Dialogue System: Recording persistent data to Lua environment.
UnityEngine.Debug:Log(Object)
Dialogue System: Dialogue System Trigger is firing OnConversationEnd.
Dialogue System: ConversationStateSaver is resuming conversation Talk With Maya with actor=nil and conversant=nil at entry 4. (The correct entry for this
load)
Dialogue System: Starting conversation 'Talk With Maya', actor=, conversant=Maya
Dialogue System: Add Link (Maya): ID=3:5 '...' (True)
Dialogue System: Maya says 'He won the No-bell prize!'
Dialogue System: Dialogue System Trigger is firing OnConversationStart.
Dialogue System: Resetting Lua environment.
(Variable Update info)
Dialogue System: Applying persistent data from Lua environment.
SaveMessageMenu_TurnOn has been run.
(From Action #3 in ActionList 'SaveMessageMenu_TurnOn')
*I have no idea why this action list is activated!*
Restoring Dialogue System state from Adventure Creator.
.............................................................
It then proceeds to shut down the conversation and reopen it at entry 7.

I am using Dialogue System Saver and "Skip Apply Data After Frames If Apply Immediate" is ticked.How is your save system set up? Are you using a Dialogue System Saver component? If so, please make sure Skip Apply Data After Frames If Apply Immediate is ticked.
I tried calling this script at the front of GameMessageMenu_YesButton_OnClick (Which loads the game) But it acts like aCan you configure your save process to call the Adventure Creator Bridge component's SyncLuaToAdventureCreator() method just before saving?
dead loop when I run it. How should I use SyncLuaToAdventureCreator?
Code: Select all
public class SyncLuaToAC : MonoBehaviour
{
public void SyncLuaToAdventureCreator()
{
// A shot at following Tony Li's advice from the PixelCrushers' forum.
// I hope I did this right.
SyncLuaToAC luaToAC = new SyncLuaToAC();
luaToAC.SyncLuaToAdventureCreator();
}
}
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Gaaah! I applied to to my loading routine!... just before saving?
Let me try that again!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Nope. Still a dead loop.
I guess I can't configure my save process to call the Adventure Creator Bridge component's SyncLuaToAdventureCreator() method just before saving, or at any other time.
I guess I can't configure my save process to call the Adventure Creator Bridge component's SyncLuaToAdventureCreator() method just before saving, or at any other time.

Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Hi,
This AC action will let you sync from AC to the Dialogue System's Lua, or from Lua back to AC:
DS_AC_SyncAction_2020-12-19.unitypackage
Before saving the game, use it to sync from Lua back to AC.
This AC action will let you sync from AC to the Dialogue System's Lua, or from Lua back to AC:
DS_AC_SyncAction_2020-12-19.unitypackage
Before saving the game, use it to sync from Lua back to AC.
-
- Posts: 111
- Joined: Thu Sep 27, 2018 11:06 pm
Re: Loaded Conversation Displays Wrong Entry if the Former Game State had a Conversation Running
Got it! Thank you so much, I'll report what I find on Monday!
Merry Christmas, Tony!
Merry Christmas, Tony!
Thank you so much for your help.
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12
Oh! My stats!
Unity 2020.1.10f1
Adventure Creator 1.72.2
Dialogue System for Unity 2.2.12