Page 1 of 1
Corgi Engine Dialogue persistent
Posted: Thu May 02, 2024 2:16 am
by Monsterdium
Hello! The dialogue system is amazing, and it's very easy to use and integrate with other third-party systems. I am using the Corgi Engine along with the Inventory Engine. I have managed to get everything working with the dialogue system, but I don't understand how to save the conversations.
That is, if I accept a quest or finish a conversation, how do I save the state of that dialogue? How do I save the state of the quest?
I use the MMPersistentManager to save the state of the character, the enemies, etc., but although I have added the Dialogue System Corgi Event Listener script and the Dialogue System Inventory Event Listener (and unticked Handle MMSaveLoadEvents in one of the two) to the Dialogue Manager, I can't save the progress. How can I manage to save the conversations?
Thanks!
Re: Corgi Engine Dialogue persistent
Posted: Thu May 02, 2024 7:57 am
by Tony Li
Hi,
You'll also want to set up the
save system. The Dialogue System *** Event Listener components listen for save/load events from Corgi. They pull data from the save system when Corgi wants to save and restores data when Corgi wants to load.
Re: Corgi Engine Dialogue persistent
Posted: Thu May 02, 2024 11:43 am
by Monsterdium
It works! I thought it had to be one saving system or the other, not both at the same time. I really appreciate the help.
Re: Corgi Engine Dialogue persistent
Posted: Thu May 02, 2024 11:54 am
by Tony Li
Glad to help!
Re: Corgi Engine Dialogue persistent
Posted: Fri May 03, 2024 10:08 am
by Monsterdium
Hi Tony! I'm sorry to bother you again. I've encountered a very strange behavior...
For some reason, when I quit the game in play mode, it saves automatically, and when I load it, my character appears in the position where I closed the game. I don't have the Auto Save Load component, so I can't find any reason for this to happen.
Something important I discovered is that if I remove the Dialogue System Corgi Event Listener, this behavior stops, but obviously the state of the conversations is no longer saved.
Do you have any idea why this is happening? Or where do you think the problem might be?
I share the components I have in the Dialogue Manager prefab with you in case you notice something I don't.
Thanks!
- 1.png (227.93 KiB) Viewed 357 times
- 2.png (147.41 KiB) Viewed 357 times
- 3.png (90.67 KiB) Viewed 357 times
Re: Corgi Engine Dialogue persistent
Posted: Fri May 03, 2024 10:45 am
by Tony Li
Hi,
Is it possible that Corgi's Persistent data system is kicking in?
Re: Corgi Engine Dialogue persistent
Posted: Fri May 03, 2024 1:16 pm
by Monsterdium
I remembered that I extended the Character Persistence to save the character's position and acquired abilities. If I remove that, everything works as it should, but the character's position is no longer saved at the save point.
Anyway, at least I see that the problem is on the Corgi Engine side. I'll see how to resolve it.
Thanks for your time!
Re: Corgi Engine Dialogue persistent
Posted: Fri May 03, 2024 2:50 pm
by Tony Li
Glad you found the issue!
Re: Corgi Engine Dialogue persistent
Posted: Fri May 03, 2024 5:59 pm
by Monsterdium
Hi again! I've been investigating the issue, and I have a question. Does the Dialogue System Corgi Event Listener save the game automatically upon exiting, or is there any other component besides Auto Save Load that does this?
Edit: I found the "error"! When exiting the game, the OnWillUnloadScene method of the Dialogue System Corgi Event Listener saved the game, which is why my character appeared where I closed the game. By clearing out the content of that method and calling SaveDialogueSystem() from my save point, everything was fixed!
Thanks for your time!