This has been working for a while but I found a bug last week in my code that made the Lua variables in the Database reset to their original state (which I don't want). At that time, before I fixed that, I had this code:
Code: Select all
public static void FinishEditingConversation(ref Conversation conversation) {
PersistentDataManager.Record();
DialogueManager.DatabaseManager.DefaultDatabase.conversations.Add(conversation);
DialogueManager.Instance.ResetDatabase(DatabaseResetOptions.KeepAllLoaded);
PersistentDataManager.Apply();
}
So, at this time the Lua data stays the same when I add a custom conversation and the conversation shows up in the editor window when I look at that while playing the game, but when I try to talk to an NPC with this specific dialogue I get a warning
What can I do to make this work? I'm not sure how I have to add the conversation without the Lua variables resetting.Conversation "custom_conversation_name" not found in database