Resume dialogue on LoadFromSlot
Resume dialogue on LoadFromSlot
Hi Tony!
Working on a VN game, I need to resume a dialogue to the current progress. Using LoadFromSlot works when from the main game scene when another dialogue is in progress. But when I come from another Unity Scene, how can I start the right dialogue?
Running another dialog before and using a button that calls "LoadFromSlot" seems to work but I can't script it.
Any tip?
Working on a VN game, I need to resume a dialogue to the current progress. Using LoadFromSlot works when from the main game scene when another dialogue is in progress. But when I come from another Unity Scene, how can I start the right dialogue?
Running another dialog before and using a button that calls "LoadFromSlot" seems to work but I can't script it.
Any tip?
Re: Resume dialogue on LoadFromSlot
Hi,
Set up the save system, and add a DialogueSystemSaver component and ConversationStateSaver component to the Dialogue Manager.
Set up the save system, and add a DialogueSystemSaver component and ConversationStateSaver component to the Dialogue Manager.
Re: Resume dialogue on LoadFromSlot
Thanks for your answer!
The ConversationStateSaver was what I was missing
The ConversationStateSaver was what I was missing
Re: Resume dialogue on LoadFromSlot
Glad to help!
Re: Resume dialogue on LoadFromSlot
Now that I can resume a conversation, I've a last issue: It does not load variables. I've the following error:
(It's linked to Lua.cs RunRaw function)
The error message is:
It's all my quests but with names replaced by ID?
Edit: The error was due to an import with "use technical name", it's fixed .. but I still have default value on every variable (even if I can see lua.cs RunRaw function process all the variables from my actual save)
(It's linked to Lua.cs RunRaw function)
The error message is:
After my variables, there is those Items who cause this error (it's only the first 5 lines):"Cannot assign to a null value. Are you trying to assign to a nonexistent table element?."
Code: Select all
Item[\"Ntt_7BCF675F\"].Track=true; Item[\"Ntt_7BCF675F\"].State=\"unassigned\"; Item[\"Ntt_7BCF675F\"].Entry_1_State=\"unassigned\"; Item[\"Ntt_7BCF675F\"].Entry_2_State=\"unassigned\"; Item[\"Ntt_7BCF675F\"].Entry_3_State=\"unassigned\"; Item[\"Ntt_9D02E68F\"].Track=true; Item[\"Ntt_9D02E68F\"].State=\"unassigned\"; Item[\"Ntt_9D02E68F\"].Entry_1_State=\"unassigned\"; Item[\"Ntt_9D02E68F\"].Entry_2_State=\"unassigned\"; Item[\"Ntt_9D02E68F\"].Entry_3_State=\"unassigned\"; Item[\"Ntt_30566BCE\"].Track=true; Item[\"Ntt_30566BCE\"].State=\"unassigned\"; Item[\"Ntt_30566BCE\"].Entry_1_State=\"unassigned\";
Edit: The error was due to an import with "use technical name", it's fixed .. but I still have default value on every variable (even if I can see lua.cs RunRaw function process all the variables from my actual save)
Re: Resume dialogue on LoadFromSlot
Hi,
Are you saying that the "Dialogue System: Lua code" log indicates that it's restoring the correct saved variable values, but later when you check the values they've been reset to their initial values? If so, is it possible that something's resetting the database after the load game operation?
Re: Resume dialogue on LoadFromSlot
Yes, it's possible that something's resetting the database but I don't know where and why.
We are using OnConversationLineEnd to trigger a save. Could this be a problem?
We are using OnConversationLineEnd to trigger a save. Could this be a problem?
Re: Resume dialogue on LoadFromSlot
That should be fine.
Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then reproduce the issue. The extra logs in the Console may help you identify what's going on.
If that doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?
Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then reproduce the issue. The extra logs in the Console may help you identify what's going on.
If that doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?
Re: Resume dialogue on LoadFromSlot
Problem solved ! Dialogue System LoadScene was performing a database clear after the LoadSlot function execution. We now use Unity LoadScene and it works as expected.
Re: Resume dialogue on LoadFromSlot
Great! Thanks for the update.