Search Unity

[RELEASED] Dialogue System for Unity - easy conversations, quests, and more!

Discussion in 'Assets and Asset Store' started by TonyLi, Oct 12, 2013.

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I'm having another issue unfortunately. I can't seem to get my quest to become active or the alert message to appear. I've looked at the sample scene in the Invector integration and compared everything to mine and I can't find anything I'm doing different. In my conversation, here is the Sequencer to activate the quest and show the alert.

    SetQuestState("Purge Undead", "active");
    Variable["UndeadKilled"] = 0;
    Variable["Alert"] = "New Quest: Kill 10 Skeletons"

    I've double checked the quest name matches, but still nothing happens. I have one conversation node with the following condition:

    CurrentQuestState("Purge Undead") == "unassigned"

    And another as follows:

    CurrentQuestState("Purge Undead") == "assigned"

    If I do the first node and then come back and interact with the NPC again, the first node still comes up, so I know the quest isn't being activated. Any ideas where I might have missed something?
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @magique - Make sure to use the Conditions and Script fields, not the Sequence field:

    upload_2019-5-24_9-45-43.png

    I like to use the "..." buttons' dropdowns to avoid typos.

    At runtime, you can open the Dialogue Editor onto the Watches tab to keep an eye on quest states:

    upload_2019-5-24_9-48-27.png

    If you tick Auto-Update, it will update in realtime so you can see changes as they happen.

    You can also temporarily change the Dialogue Manager's Debug Level to Info. This will log Dialogue System activity, including the execution of Conditions and Script fields.
     
  3. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Thanks so much. I can't believe I didn't see that. It works now. I know I've done this before and it worked so I was getting really frustrated that it was not working.
     
  4. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Glad it's working now! :)
     
    magique likes this.
  5. XANTOMEN

    XANTOMEN

    Joined:
    Dec 18, 2012
    Posts:
    41
    Hi Tony!

    First of all, great job with the asset, it shows that it took a ton of work on your part, and your support seems super active as well, plus the documentation is huge!

    In any case, I'm trying to Add and Remove Databases on runtime, to get rid of some Conversations when I don't want them, and get new ones, and I don't seem to be able to make it work. I can add databases and the conversation items on them, but Remove never seems to work. I've been going deep in the code and after finding the RemoveAssets code (either of the two versions) ... I have no idea how that would ever work... As in:

    Code (CSharp):
    1. var asset = assetsToRemove[i];
    2.                 var key = useTitle ? (asset as Conversation).Title : asset.Name;
    3.                 if (!cache.ContainsKey(key))
    4.                 {
    5.                     cache.Remove(key);
    6.                     myAssets.Remove(cache[key]);
    7.                 }
    As I read it, if it enters the if block, that means that there is no key in the cache, so it won't be able to remove anything from anywhere, cause it's not there.
    And even if that if statement was changed to be triggered on true instead of false, then the myAssets line would fail, as cache[key] would have been deleted in the previous line.

    What is the intention of the code, if not removing the elements? I'm confused. Would be lovely if you could explain.

    Thank you! :)

    EDIT: Okay, I tried the obvious and changed it for this code, which works... but I don't understand why the original is the way it is then xD:


    Code (CSharp):
    1. var asset = assetsToRemove[i];
    2.                 var key = useTitle ? (asset as Conversation).Title : asset.Name;
    3.                 if (cache.ContainsKey(key))
    4.                 {
    5.                     myAssets.Remove(cache[key]);
    6.                     cache.Remove(key);
    7.                 }
     
    Last edited: May 25, 2019
    TonyLi likes this.
  6. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    @XANTOMEN - Thanks for reporting this bug. I made a copy-paste error when I added caching to optimize this operation. I implemented the same fix that you show above and put a patch on the Dialogue System Extras page. This fix has also been committed to the repository for the next release.
     
    XANTOMEN likes this.
  7. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @mikemuk01 - I'm just following up on this issue. Did you have a chance to check the AC action list and/or update the Dialogue System and Adventure Creator Support?
     
  8. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Updated Character Controller Packages Available

    The Dialogue System Extras page has updated packages for Opsive and Invector character controllers. These updates will also be in the next full release of the Dialogue System.
     
    magique likes this.
  9. XANTOMEN

    XANTOMEN

    Joined:
    Dec 18, 2012
    Posts:
    41
    Hi again @TonyLi, thank you for answering the question about the bug I found before :)

    I have a very small question. I observe the Default Sequence is Delay({{end}}). I wonder, is there a correct grammar to say: Delay({{end}} + 3) ? I've already tried that one and it doesn't work, so I'm wondering if there's a simple way, without getting to understand overrides and so.

    Thank you!
     
  10. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @XANTOMEN - The sequencer doesn't do math, but you can do this:

    Delay(3)@{{end}}

    This will wait until the value of {{end}} has elapsed, and then wait 3 more seconds after that.
     
  11. XANTOMEN

    XANTOMEN

    Joined:
    Dec 18, 2012
    Posts:
    41
    Thank you so much, epic support :D

    I was aware of the @{{end}} and somehow didn't think of it for this case :X
     
  12. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Hi,

    I am interested in DialogueSystem but we use Super Text Mesh to show our Dialogue.
    I did not find it in the compatibility list and the documentation says nothing about generally getting DialogueSystem to work with other assets. Does that mean we can not easily make DialogueSystem work at the moment?
     
  13. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I have a really weird issue this time. I have a quest that kicks off in a conversation and various alternate conversations depending on if the quest was accepted, in progress, or completed. It works almost perfectly except for one branch. I have a branch with the following conditions:

    (CurrentQuestState("Purge Undead") == "active") and (Variable["UndeadKilled"] < 10)

    If I interact with the NPC right after accepting the quest, no conversation comes up at all even though the quest is active and UndeadKilled is 0. The tracker shows the quest active and killed is 0. However, if I run off and kill at least one undead and return to the NPC, then the conversation is triggered and the NPC asks about the progress of the quest. I thought maybe it just needed to exit the interact range and come back, but that didn't work. Only killing at least one undead.

    I can't see anything wrong with the dialogue and he only thing attached to the undead is the Incerement On destroy script to increment the UndeadKilled variable. But why it needs the killed value to be > 0 when the condition is < 10 is a mystery.

    However, if I change the condition to the following:

    (CurrentQuestState("Purge Undead") == "active") and (Variable["UndeadKilled"] ~= 10)

    Now it works. So there seems to be something odd with the < 10 check not quite working.
     
  14. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Glad to help! :)

    The Dialogue System includes a Super Text Mesh Support package. It's not advertised because I've only implemented dialogue UIs but not the quest log window or bark UIs yet. However, the Dialogue System is designed to be easily extended for compatibility with other assets, which is why it includes so many official integrations.

    For dialogue UIs, the Dialogue System will work happily with any script that implements a very simple C# interface named IDialogueUI. For the Super Text Mesh Support package, I implemented IDialogueUI using Super Text Mesh components. (Please feel free to download the evaluation version to try it out.)

    Barks use a similar IBarkUI, and quest log windows use an abstract QuestLogWindow class that you can override to use Super Text Mesh.

    If you're only interested in dialogue, you can go ahead and use the Super Text Mesh Support package as-is. If you're also interested in using quest UIs, you'll want to make a subclass of QuestLogWindow for Super Text Mesh. But you don't have to do it right away. You can set everything up with a regular Unity UI quest log window and then switch to a Super Text Mesh version later. Everything's modular and swappable.
     
    Last edited: May 27, 2019
  15. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Are you sure UndeadKilled is zero? You can use the Watches tab to verify, or the Lua Console in a build. If you haven't defined the variable in your dialogue database, its value will be nil (Lua's version of null) until you assign a value to it. If you compare nil to a number, the result is still nil. Since nil is not the same as true, the condition won't be true.

    Also check its Type. If it's not a Number type, then you may be comparing a string to a number or something like that.
     
  16. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I don't have a Watchers tab for some reason. I am pretty sure it's zero. When the quest is accepted, I run the following scripts:

    SetQuestState("Purge Undead", "active");
    Variable["Alert"] = "New Quest: Kill 10 Skeletons";
    Variable["UndeadKilled"] = "0";
    Variable["PurgeUndeadDeclined"] = false

    So it specifically sets it to zero. And the quest tracker shows zero as well. It's definitely defined as a Number and has an initial value of 0 as well.
     
  17. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    @magique - At runtime, the Dialogue Editor window's Template tab turns into the Watches tab.

    You're setting the variable a string value:
    Code (Lua):
    1. Variable["UndeadKilled"] = "0";
    Try this instead:
    Code (Lua):
    1. Variable["UndeadKilled"] = 0;
     
  18. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, I didn't realize that's how the scripting works. I used to use Lua years ago, but I forgot how weird it is. lol
     
  19. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Since I am only interested in Dialogue, this is enough to convince me. Thanks!
     
    TonyLi likes this.
  20. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I have a small request for future versions. Could you change the IncrementOnDestroy script from the following:

    Code (CSharp):
    1. public enum IncrementOn { Destroy, Disable }
    to this:

    Code (CSharp):
    1. public enum IncrementOn { Destroy, Disable, CodeTriggered }
    This allows me to call the TryIncrement() function in code at will instead of using the Disable or Destroy callbacks. This is useful for me since my dead AI are left around for about 10 seconds and then fade away before despawning. I can call this function myself upon notification of death. Otherwise, the AI are counted as alive until they fade away 10 seconds later.

    I've made the change myself locally and it works great, but it would be nice to have in a future version so I don't have to modify the code again on an upgrade. The additional enum won't affect anyone else and might be useful for others as well.
     
  21. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Great! If you have any questions, please post here or on the Pixel Crushers forum or PM me.

    Good idea. I just added it to 2.1.7. I named it Manually instead of CodeTriggered, but it will have the same enum index so you won't need to change anything in your project.
     
    magique likes this.
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi How can I trigger an NPC animation for a dialogue node? For example, for one line of dialogue I might want to trigger the Talk1 animation and with another node I want to trigger the AngryTalk animation, etc. It seems like we can access different components in the scene through script, but I can't find if this is possible. It's a bit hard to find information on scripting capabilities other than the commonly used stuff.
     
  23. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Use the dialogue node's Sequence field. (See Cutscene Sequences, which also includes a link to a video tutorial series.) In many cases, you can drag-and-drop items into the Sequence field. For example, if you drag an audio clip into the Sequence field, it will add an audio-related command such as AudioWait(). If you drag a GameObject, it will add a GameObject-related command such as SetActive().

    For animation, you'll typically use one or more Animator functions, assuming your NPC uses a Mecanim Animator. (There are other options if you're using a different animation system, such as legacy animation or Spine for 2D.)

    To play the Talk1 animation state, you could set the Sequence field to something like this:
    • Sequence: AnimatorPlayWait(Talk1)
     
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Fantastic. Thanks for the help. This will really make it come to life now.
     
    TonyLi likes this.
  25. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I must be doing something wrong. It didn't quite work. I get the following debug error when I use the AnimatorPlayWait function in the sequencer.

    Dialogue System: Sequencer: AnimatorPlayWait(Talking1, , fade=0, layer=-1): No Animator found on
    UnityEngine.Debug:Log(Object)
    PixelCrushers.DialogueSystem.SequencerCommands.SequencerCommandAnimatorPlayWait:Start() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Commands/SequencerCommandAnimatorPlayWait.cs:37)

    The NPC that is talking has an Animator on the game object.

    [EDIT]
    I found the issue. When I selected the conversation again to edit it, the Conversant on the Start node was pointing to the wrong NPC. Not sure how that happened, but it's working now.
     
    Last edited: May 29, 2019
  26. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    magique likes this.
  27. DMRhodes

    DMRhodes

    Joined:
    May 21, 2015
    Posts:
    81
    Hey, small question please.

    is it possible to typecast inside of a dialogue node's script field? For example the following lua snippit usually results in a float value coming out at the end as the dialogue system variable 'Damage'. Ideally I would like to force this value to become an integer as the decimal values become unwieldy quickly otherwise. Whether it rounds up or down I suppose is all the same for my purposes.

    Code (CSharp):
    1. Variable["Damage"] = Variable["EnemyStrength"] * math.random(3) - (Actor["Player"].Defense + Actor["Player"].ClothesDefense / 2 + Actor["Player"].BootsDefense / 2);
    Thank you for your time as always!

    Regards
     
    Last edited: May 29, 2019
  28. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @Candy-Bomber - Use math.floor(). For example, this will return 3:
    Code (Lua):
    1. math.floor(3.14)
     
    DMRhodes likes this.
  29. FolkvangStudios

    FolkvangStudios

    Joined:
    Aug 25, 2017
    Posts:
    91
    Hello,

    I'm having a bit of trouble getting this to work with Love/Hate. In my conversation script I have "ReportDeed("Cyber Entity", "Black", "Polite Welcome")". It produces the ugly warning at the bottom of this.

    Actors has all the names of the factions. The player Game object is even names "Cyber Entity" because it would throw different errors if not matching (also included).

    ---------------------- when player object not named "Cyber Entity"
    "Dialogue System: Can't find faction member or deed reporter on Cyber Entity
    UnityEngine.Debug:LogWarning(Object)"


    ---------------------- when player object is the name of the ReportDeed call
    Love/Hate: ReportDeed(Polite Welcome) target is null
    UnityEngine.Debug:LogWarning(Object, Object)
    PixelCrushers.LoveHate.DeedReporter:ReportDeedByActor(FactionMember, String, FactionMember) (at Assets/Plugins/Pixel Crushers/LoveHate/Scripts/Interaction/Deeds/DeedReporter.cs:63)
    PixelCrushers.LoveHate.DeedReporter:ReportDeed(String, FactionMember) (at Assets/Plugins/Pixel Crushers/LoveHate/Scripts/Interaction/Deeds/DeedReporter.cs:46)
    PixelCrushers.DialogueSystem.LoveHate.LoveHateLua:ReportDeed(String, String, String) (at Assets/Plugins/Pixel Crushers/Dialogue System/Third Party Support/LoveHate Support/Scripts/LoveHateLua.cs:220)
    System.Reflection.MethodBase:Invoke(Object, Object[])
    Language.Lua.LuaMethodFunction:InvokeMethod(LuaValue[]) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/LuaValue/LuaMethodFunction.cs:35)
    Language.Lua.FunctionCall:Evaluate(LuaValue, LuaTable) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/Expr/FunctionCall.cs:41)
    Language.Lua.PrimaryExpr:Evaluate(LuaTable) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/Expr/PrimaryExpr.cs:15)
    Language.Lua.ExprStmt:Execute(LuaTable, Boolean&) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/Chunk/ExprStmt.cs:11)
    Language.Lua.Chunk:Execute(Boolean&) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/Chunk/Chunk.cs:42)
    Language.Lua.Chunk:Execute() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/Chunk/Chunk.cs:15)
    Language.Lua.LuaInterpreter:Interpreter(String, LuaTable) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Interpreter/LuaInterpreter.cs:36)
    PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:214)
    PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:120)
    PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry, Boolean, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:233)
    PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:297)
    PixelCrushers.DialogueSystem.ConversationController:OnSelectedResponse(Object, SelectedResponseEventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:257)
    PixelCrushers.DialogueSystem.ConversationView:SelectResponse(SelectedResponseEventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:458)
    PixelCrushers.DialogueSystem.ConversationView:OnSelectedResponse(Object, SelectedResponseEventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:451)
    PixelCrushers.DialogueSystem.AbstractDialogueUI:OnClick(Object) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Abstract/Dialogue/AbstractDialogueUI.cs:346)
    UnityEngine.Component:SendMessage(String, Object, SendMessageOptions)
    PixelCrushers.DialogueSystem.UnityUIResponseButton:OnClick() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI/Unity UI/Dialogue/UnityUIResponseButton.cs:178)
    UnityEngine.EventSystems.EventSystem:Update()
     
  30. FolkvangStudios

    FolkvangStudios

    Joined:
    Aug 25, 2017
    Posts:
    91
    I traced Love/Hate's LUA ReportDeed() function and it appears that the string for player, and conversation target need to match the name of the actual GameObject.

    Is there a way to create generic conversations that globally affect the faction or is it just best to make one conversation per game character? It just seems a bit much if I have 300 NPCs'.
     
  31. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @ChaosriftGames - Deeds are always reported to faction members, not factions, because individual faction members also need to update their emotional states (PADs) based on deeds.

    That said, later today I'll post an updated package to the Dialogue System Extras page that contains two improvements:
    1. The name provided to functions such as ReportDeed() can also refer to an actor's name in the dialogue database or a faction name assigned to a faction member.
    2. In ReportDeed(), the name can also start with "faction=FactionName". If it starts with "faction=", then the deed will be reported to all faction members that belong to the faction named FactionName.
    I'll post here when it's available.
     
    FolkvangStudios likes this.
  32. FolkvangStudios

    FolkvangStudios

    Joined:
    Aug 25, 2017
    Posts:
    91
    Thanks Tony.

    In my case robots don't care about individuality so i didn't have a need to adjust on an individual basis. At least that's my excuse for being lazy and I'm sticking to it :p
     
  33. Foxaphantsum

    Foxaphantsum

    Joined:
    Jul 5, 2013
    Posts:
    139
    I was interested in saving time writing my own dialog system and so found this. It looks really great. I noticed it said it was GUI independent. I'm assuming that this means you can write ur own GUI on top of the systems in place? With that said I was curious if it would be easy to get working with DoozyUI, as I'm planning to use that to also save time where I can.
     
  34. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @Anisoft - Yes, you can write your own GUI. As long as it implements a simple C# interface named IDialogueUI that has a few methods such as ShowSubtitle and ShowResponses, the Dialogue System will happily work it. The Dialogue System ships with implementations of this interface for Unity UI (with optional TextMesh Pro integration), NGUI, legacy Unity GUI, and other GUI systems. Some devs have even implemented the IDialogueUI interface with non-GUI functionality, such as text-to-speech and speech recognition for projects catering to the visually impaired and smart speaker systems like Amazon Echo.

    I haven't worked with Doozy UI, but it shouldn't be too difficult to get it working. Then again, the built-in Standard Dialogue UI (based on Unity UI) is quite capable on its own. Most devs just stick with it as they find that it's efficient and provides more than enough features.

    If you're set on using Doozy UI, you might be able to make a subclass of StandardDialogueUI to save time over implementing IDialogueUI from scratch. This way you can inherit a lot of functionality and just replace what you want with Doozy UI. If you don't inherit from StandardDialogueUI, I recommend at least inheriting from its parent class CanvasDialogueUI, which provides some basic functionality for UI implementations that are based on Canvases.

    The Dialogue System has a free evaluation version, but it omits the source code that's included with the paid version. If you're implementing IDialogueUI yourself, you'll probably want to peek at the source code of StandardDialogueUI or some of the other implementations to see how they're put together.
     
  35. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @ChaosriftGames - You can download the updated support package from the Dialogue System Extras page (expand the "Updated packages for 2.1.6" foldout) or the Love/Hate Extras page (expand "1.9.9").
     
  36. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Out Of Office: May 31 - June 2

    I will be out of the office from Friday, May 31, through Sunday, June 2, 2019.

    When I return on Monday, I'll respond to all messages and emails as quickly as I can. Thanks in advance for your patience!
     
    DMRhodes likes this.
  37. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
    Hi,

    I bought your quest machine, is it the right place to ask questions? I don't see a forum page for quest machine.
    I know this asset lets us scroll Ui with joypad, i want to add my own inventory , will i be able to use joypad to navigate UI (now i can't)?
    What's the easiest way to do that when importing your asset?
    thanks in advance
     
  38. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    https://forum.unity.com/threads/rel...ten-and-procedurally-generated-quests.496373/
     
    TonyLi and eaque like this.
  39. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    764
  40. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi I have a few new issues. I'll start with just one because it might end up being the cause of all the issues so no need to panic until we get this one fixed and see what happens. If I do a Quick Save using EMM and Invector integration and I reload that Quick Save then I get an additional instance of the Inventory_Melee object in the scene. If I load it a second time then I get a third instance of this component. I would guess that every time I re-load the quick save then it'll get another instance.

    upload_2019-6-2_15-46-54.png
     
  41. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @magique - The manual solution is to inspect the Inventory_Melee prefab and untick the Don't Destroy On Load checkbox.

    The InvectorInventorySaver should automatically destroy the old Inventory_Melee(Clone) instance in the scene. Does your copy of InvectorInventorySaver.cs have this code near the bottom?

    Code (csharp):
    1.         public override void OnBeforeSceneChange()
    2.         {
    3.             base.OnBeforeSceneChange();
    4.             // We need to start with a clear inventory in the next scene, so destroy this one:
    5.             var vInventory = FindObjectOfType<vInventory>();
    6.             if (vInventory != null) Destroy(vInventory.gameObject);
    7.         }
    If not, please download and import the latest packages from the Extras page. There are two: Common and DS.
     
  42. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Yeah, I was checking the code to see if I could see anything and I found that code where it's supposed to be destroying it. So it seems like it may not be quite working. I'll try the manual method. I didn't know about that.
     
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi OK, that fixed problem number one. Thank you. Now on to the next one. I have a character with dialogue that triggers when the interaction key is pressed and it has been working fine. However, if I load from a Quick save slot, the NPC dialogue is triggered, but the actual GUI doesn't show. It's turned off. The only difference is that I did quick save and re-loaded. So, for some odd reason the interface doesn't come up. I can tell it's doing the conversation though because the NPC animation is triggered when I interact.

    [EDIT]
    On second glance, it looks like all Dialogue System GUI elements are off. I no longer see the quest tracker either, which is showing correctly when first run, but not after loading from quick save.

    [EDIT 2]
    I'm wondering if this is because these things are turned off when the EMM Pause Menu is displayed and maybe just not getting turned back on after. I'll check that. Maybe I missed an event to turn them back on.

    [EDIT 3]
    OK, so I see that DS GUI is definitely turned off when I press Escape to bring up the EMM Pause Menu and if I press Escape again then DS GUI comes back. But if selecting Load Game and loading a save point then the DS GUI doesn't come back. I can't see to find the code where it turns things off or where it's supposed to turn them back on in this case.
     
    Last edited: Jun 3, 2019
  44. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Which EMM Pause Menu is that? Is it a script that comes with EMM, something you wrote, or something else?
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It comes with EMM. It's in the GamePayUI hierarchy:

    upload_2019-6-2_17-50-39.png
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi So, I found a way to make it work by storing a reference to the canvas and activating it on scene loaded. But I wish I knew where it turns it off and where DS might be able to turn it back on more properly.
     
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    @TonyLi Sorry for all the questions, but I'm really moving fast on this and am trying to get all these save/load issue out of the way.

    I'm now trying to figure out how I can make sure DS clears all its saved data when I select New Game from EMM. Right now, I always get the game to load to the last save state even if I choose New Game, but there's clearly no code in EMM to handle this so I want to add it. Is there a function in DS to call to clear saved data?
     
  48. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    EMM's UIController.cs has a method named openPauseMenu() that hides all canvases.

    The corresponding closePauseMenu() shows the canvases again.

    However, the load game buttons don't call closePauseMenu(). Inspect each LoadSlot_# GameObject in the Gameplay UI > LoadGame hierarchy. Each of these GameObjects has a SaveGame child with a UI Button component. The OnClick() event calls the LoadSlot_#'s LoadSlotIdentifier.LoadSceneSaved. Configure OnClick() to also call UIController.closePauseMenu().

    Alternatively, keep your script that stores a reference to the Dialogue Manager's Canvas. Configure OnClick() to call a method in the script that reactivates the Canvas.

    Call these two lines of code:

    Code (csharp):
    1. DialogueManager.ResetDatabase(ResetDatabaseOptions.RevertToDefault);
    2. SaveSystem.RestartGame(firstSceneName);
    (In version 2.1.7, SaveSystem.RestartGame will suffice; you won't have to include the first line, but it's fine if the line is still there.)

    I figure you'll want to use code. But for those who prefer visual setup, you can hook up a UnityEvent or use the equivalent visual scripting actions.
     
    magique likes this.
  49. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Perfect. That is working now. Now, for the big one. I have an object in the scene with both Destructible saver and DialogueSystemSaver on it. When I Quick Save and re-load the game, it gives the following errors:

    Code (CSharp):
    1. Dialogue System: Lua code '{"destroyed":true,"position":{"x":361.11370849609377,"y":24.499629974365236,"z":298.32208251953127}}' threw exception 'Code has syntax errors:
    2. Line 2, Col 1 : Failed to parse Letter of Name.
    3. Line 2, Col 1 : Failed to parse Name of VarName.
    4. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    5. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    6. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    7. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    8. Line 2, Col 1 : Failed to parse Name of VariableArg.
    9. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    10. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    11. Line 2, Col 1 : Failed to parse Letter of Name.
    12. Line 2, Col 1 : Failed to parse Name of VarName.
    13. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    14. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    15. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    16. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    17. Line 2, Col 1 : Failed to parse Name of VariableArg.
    18. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    19. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    20. Line 2, Col 1 : Failed to parse Letter of Name.
    21. Line 2, Col 1 : Failed to parse Name of VarName.
    22. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    23. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    24. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    25. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    26. Line 2, Col 1 : Failed to parse Name of VariableArg.
    27. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    28. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    29. Line 2, Col 1 : Failed to parse Letter of Name.
    30. Line 2, Col 1 : Failed to parse Name of VarName.
    31. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    32. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    33. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    34. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    35. Line 2, Col 1 : Failed to parse Name of VariableArg.
    36. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    37. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    38. Line 2, Col 1 : Failed to parse Letter of Name.
    39. Line 2, Col 1 : Failed to parse Name of VarName.
    40. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    41. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    42. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    43. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    44. Line 2, Col 1 : Failed to parse Name of VariableArg.
    45. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    46. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    47. Line 1, Col 19 '"': Failed to parse Letter of Name.
    48. Line 1, Col 19 '"': Failed to parse Name of VarName.
    49. Line 1, Col 19 '"': Failed to parse 'nil' of NilLiteral.
    50. Line 1, Col 19 '"': Failed to parse Text of BoolLiteral.
    51. Line 1, Col 19 '"': Failed to parse '0'...'9' of Digit.
    52. Line 1, Col 19 '"': Failed to parse (Digit)+ of FloatNumber.
    53. Line 1, Col 19 '"': Failed to parse Name of VariableArg.
    54. Line 1, Col 19 '"': Failed to parse firstTerm of OperatorExpr.
    55. Line 1, Col 19 '"': Failed to parse Expr of ExprStmt.
    56. Line 1, Col 25 'i': Failed to parse Letter of Name.
    57. Line 1, Col 25 'i': Failed to parse Name of VarName.
    58. Line 1, Col 25 'i': Failed to parse 'nil' of NilLiteral.
    59. Line 1, Col 25 'i': Failed to parse Text of BoolLiteral.
    60. Line 1, Col 25 'i': Failed to parse '0'...'9' of Digit.
    61. Line 1, Col 25 'i': Failed to parse (Digit)+ of FloatNumber.
    62. Line 1, Col 25 'i': Failed to parse Name of VariableArg.
    63. Line 1, Col 25 'i': Failed to parse firstTerm of OperatorExpr.
    64. Line 1, Col 25 'i': Failed to parse Expr of ExprStmt.
    65. Line 1, Col 16 'u': Failed to parse Letter of Name.
    66. Line 1, Col 16 'u': Failed to parse Name of VarName.
    67. Line 1, Col 16 'u': Failed to parse 'nil' of NilLiteral.
    68. Line 1, Col 16 'u': Failed to parse Text of BoolLiteral.
    69. Line 1, Col 16 'u': Failed to parse '0'...'9' of Digit.
    70. Line 1, Col 16 'u': Failed to parse (Digit)+ of FloatNumber.
    71. Line 1, Col 16 'u': Failed to parse Name of VariableArg.
    72. Line 1, Col 16 'u': Failed to parse firstTerm of OperatorExpr.
    73. Line 1, Col 16 'u': Failed to parse Expr of ExprStmt.
    74. Line 1, Col 12 '"': Failed to parse Letter of Name.
    75. Line 1, Col 12 '"': Failed to parse Name of VarName.
    76. Line 1, Col 12 '"': Failed to parse 'nil' of NilLiteral.
    77. Line 1, Col 12 '"': Failed to parse Text of BoolLiteral.
    78. Line 1, Col 12 '"': Failed to parse '0'...'9' of Digit.
    79. Line 1, Col 12 '"': Failed to parse (Digit)+ of FloatNumber.
    80. Line 1, Col 12 '"': Failed to parse Name of VariableArg.
    81. Line 1, Col 12 '"': Failed to parse firstTerm of OperatorExpr.
    82. Line 1, Col 12 '"': Failed to parse Expr of ExprStmt.
    83. Line 1, Col 12 '"': Failed to parse Letter of Name.
    84. Line 1, Col 12 '"': Failed to parse Name of VarName.
    85. Line 1, Col 12 '"': Failed to parse 'nil' of NilLiteral.
    86. Line 1, Col 12 '"': Failed to parse Text of BoolLiteral.
    87. Line 1, Col 12 '"': Failed to parse '0'...'9' of Digit.
    88. Line 1, Col 12 '"': Failed to parse (Digit)+ of FloatNumber.
    89. Line 1, Col 12 '"': Failed to parse Name of VariableArg.
    90. Line 1, Col 12 '"': Failed to parse firstTerm of OperatorExpr.
    91. Line 1, Col 12 '"': Failed to parse Expr of ExprStmt.
    92. Line 2, Col 1 : Failed to parse Letter of Name.
    93. Line 2, Col 1 : Failed to parse Name of VarName.
    94. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    95. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    96. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    97. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    98. Line 2, Col 1 : Failed to parse Name of VariableArg.
    99. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    100. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    101. Line 2, Col 1 : Failed to parse Letter of Name.
    102. Line 2, Col 1 : Failed to parse Name of VarName.
    103. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    104. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    105. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    106. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    107. Line 2, Col 1 : Failed to parse Name of VariableArg.
    108. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    109. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    110. Line 2, Col 1 : Failed to parse Letter of Name.
    111. Line 2, Col 1 : Failed to parse Name of VarName.
    112. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    113. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    114. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    115. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    116. Line 2, Col 1 : Failed to parse Name of VariableArg.
    117. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    118. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    119. Line 2, Col 1 : Failed to parse Letter of Name.
    120. Line 2, Col 1 : Failed to parse Name of VarName.
    121. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    122. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    123. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    124. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    125. Line 2, Col 1 : Failed to parse Name of VariableArg.
    126. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    127. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    128. Line 1, Col 19 '"': Failed to parse Letter of Name.
    129. Line 1, Col 19 '"': Failed to parse Name of VarName.
    130. Line 1, Col 19 '"': Failed to parse 'nil' of NilLiteral.
    131. Line 1, Col 19 '"': Failed to parse Text of BoolLiteral.
    132. Line 1, Col 19 '"': Failed to parse '0'...'9' of Digit.
    133. Line 1, Col 19 '"': Failed to parse (Digit)+ of FloatNumber.
    134. Line 1, Col 19 '"': Failed to parse Name of VariableArg.
    135. Line 1, Col 19 '"': Failed to parse firstTerm of OperatorExpr.
    136. Line 1, Col 19 '"': Failed to parse Expr of ExprStmt.
    137. Line 1, Col 25 'i': Failed to parse Letter of Name.
    138. Line 1, Col 25 'i': Failed to parse Name of VarName.
    139. Line 1, Col 25 'i': Failed to parse 'nil' of NilLiteral.
    140. Line 1, Col 25 'i': Failed to parse Text of BoolLiteral.
    141. Line 1, Col 25 'i': Failed to parse '0'...'9' of Digit.
    142. Line 1, Col 25 'i': Failed to parse (Digit)+ of FloatNumber.
    143. Line 1, Col 25 'i': Failed to parse Name of VariableArg.
    144. Line 1, Col 25 'i': Failed to parse firstTerm of OperatorExpr.
    145. Line 1, Col 25 'i': Failed to parse Expr of ExprStmt.
    146. Line 1, Col 16 'u': Failed to parse Letter of Name.
    147. Line 1, Col 16 'u': Failed to parse Name of VarName.
    148. Line 1, Col 16 'u': Failed to parse 'nil' of NilLiteral.
    149. Line 1, Col 16 'u': Failed to parse Text of BoolLiteral.
    150. Line 1, Col 16 'u': Failed to parse '0'...'9' of Digit.
    151. Line 1, Col 16 'u': Failed to parse (Digit)+ of FloatNumber.
    152. Line 1, Col 16 'u': Failed to parse Name of VariableArg.
    153. Line 1, Col 16 'u': Failed to parse firstTerm of OperatorExpr.
    154. Line 1, Col 16 'u': Failed to parse Expr of ExprStmt.
    155. Line 2, Col 1 : Failed to parse Letter of Name.
    156. Line 2, Col 1 : Failed to parse Name of VarName.
    157. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    158. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    159. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    160. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    161. Line 2, Col 1 : Failed to parse Name of VariableArg.
    162. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    163. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    164. Line 2, Col 1 : Failed to parse Letter of Name.
    165. Line 2, Col 1 : Failed to parse Name of VarName.
    166. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    167. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    168. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    169. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    170. Line 2, Col 1 : Failed to parse Name of VariableArg.
    171. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    172. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    173. Line 1, Col 19 '"': Failed to parse Letter of Name.
    174. Line 1, Col 19 '"': Failed to parse Name of VarName.
    175. Line 1, Col 19 '"': Failed to parse 'nil' of NilLiteral.
    176. Line 1, Col 19 '"': Failed to parse Text of BoolLiteral.
    177. Line 1, Col 19 '"': Failed to parse '0'...'9' of Digit.
    178. Line 1, Col 19 '"': Failed to parse (Digit)+ of FloatNumber.
    179. Line 1, Col 19 '"': Failed to parse Name of VariableArg.
    180. Line 1, Col 19 '"': Failed to parse firstTerm of OperatorExpr.
    181. Line 1, Col 19 '"': Failed to parse Expr of ExprStmt.
    182. Line 1, Col 25 'i': Failed to parse Letter of Name.
    183. Line 1, Col 25 'i': Failed to parse Name of VarName.
    184. Line 1, Col 25 'i': Failed to parse 'nil' of NilLiteral.
    185. Line 1, Col 25 'i': Failed to parse Text of BoolLiteral.
    186. Line 1, Col 25 'i': Failed to parse '0'...'9' of Digit.
    187. Line 1, Col 25 'i': Failed to parse (Digit)+ of FloatNumber.
    188. Line 1, Col 25 'i': Failed to parse Name of VariableArg.
    189. Line 1, Col 25 'i': Failed to parse firstTerm of OperatorExpr.
    190. Line 1, Col 25 'i': Failed to parse Expr of ExprStmt.
    191. Line 1, Col 16 'u': Failed to parse Letter of Name.
    192. Line 1, Col 16 'u': Failed to parse Name of VarName.
    193. Line 1, Col 16 'u': Failed to parse 'nil' of NilLiteral.
    194. Line 1, Col 16 'u': Failed to parse Text of BoolLiteral.
    195. Line 1, Col 16 'u': Failed to parse '0'...'9' of Digit.
    196. Line 1, Col 16 'u': Failed to parse (Digit)+ of FloatNumber.
    197. Line 1, Col 16 'u': Failed to parse Name of VariableArg.
    198. Line 1, Col 16 'u': Failed to parse firstTerm of OperatorExpr.
    199. Line 1, Col 16 'u': Failed to parse Expr of ExprStmt.
    200. Line 1, Col 12 '"': Failed to parse Letter of Name.
    201. Line 1, Col 12 '"': Failed to parse Name of VarName.
    202. Line 1, Col 12 '"': Failed to parse 'nil' of NilLiteral.
    203. Line 1, Col 12 '"': Failed to parse Text of BoolLiteral.
    204. Line 1, Col 12 '"': Failed to parse '0'...'9' of Digit.
    205. Line 1, Col 12 '"': Failed to parse (Digit)+ of FloatNumber.
    206. Line 1, Col 12 '"': Failed to parse Name of VariableArg.
    207. Line 1, Col 12 '"': Failed to parse firstTerm of OperatorExpr.
    208. Line 1, Col 12 '"': Failed to parse Expr of ExprStmt.
    209. Line 1, Col 16 'u': Failed to parse Letter of Name.
    210. Line 1, Col 16 'u': Failed to parse Name of VarName.
    211. Line 1, Col 16 'u': Failed to parse 'nil' of NilLiteral.
    212. Line 1, Col 16 'u': Failed to parse Text of BoolLiteral.
    213. Line 1, Col 16 'u': Failed to parse '0'...'9' of Digit.
    214. Line 1, Col 16 'u': Failed to parse (Digit)+ of FloatNumber.
    215. Line 1, Col 16 'u': Failed to parse Name of VariableArg.
    216. Line 1, Col 16 'u': Failed to parse firstTerm of OperatorExpr.
    217. Line 1, Col 16 'u': Failed to parse Expr of ExprStmt.
    218. Line 1, Col 12 '"': Failed to parse Letter of Name.
    219. Line 1, Col 12 '"': Failed to parse Name of VarName.
    220. Line 1, Col 12 '"': Failed to parse 'nil' of NilLiteral.
    221. Line 1, Col 12 '"': Failed to parse Text of BoolLiteral.
    222. Line 1, Col 12 '"': Failed to parse '0'...'9' of Digit.
    223. Line 1, Col 12 '"': Failed to parse (Digit)+ of FloatNumber.
    224. Line 1, Col 12 '"': Failed to parse Name of VariableArg.
    225. Line 1, Col 12 '"': Failed to parse firstTerm of OperatorExpr.
    226. Line 1, Col 12 '"': Failed to parse Expr of ExprStmt.
    227. Line 1, Col 13 ':': Failed to parse Letter of Name.
    228. Line 1, Col 13 ':': Failed to parse Name of VarName.
    229. Line 1, Col 13 ':': Failed to parse 'nil' of NilLiteral.
    230. Line 1, Col 13 ':': Failed to parse Text of BoolLiteral.
    231. Line 1, Col 13 ':': Failed to parse '0'...'9' of Digit.
    232. Line 1, Col 13 ':': Failed to parse (Digit)+ of FloatNumber.
    233. Line 1, Col 13 ':': Failed to parse Name of VariableArg.
    234. Line 1, Col 13 ':': Failed to parse firstTerm of OperatorExpr.
    235. Line 1, Col 13 ':': Failed to parse Expr of ExprStmt.
    236. Line 1, Col 16 'u': Failed to parse Letter of Name.
    237. Line 1, Col 16 'u': Failed to parse Name of VarName.
    238. Line 1, Col 16 'u': Failed to parse 'nil' of NilLiteral.
    239. Line 1, Col 16 'u': Failed to parse Text of BoolLiteral.
    240. Line 1, Col 16 'u': Failed to parse '0'...'9' of Digit.
    241. Line 1, Col 16 'u': Failed to parse (Digit)+ of FloatNumber.
    242. Line 1, Col 16 'u': Failed to parse Name of VariableArg.
    243. Line 1, Col 16 'u': Failed to parse firstTerm of OperatorExpr.
    244. Line 1, Col 16 'u': Failed to parse Expr of ExprStmt.
    245. Line 1, Col 12 '"': Failed to parse Letter of Name.
    246. Line 1, Col 12 '"': Failed to parse Name of VarName.
    247. Line 1, Col 12 '"': Failed to parse 'nil' of NilLiteral.
    248. Line 1, Col 12 '"': Failed to parse Text of BoolLiteral.
    249. Line 1, Col 12 '"': Failed to parse '0'...'9' of Digit.
    250. Line 1, Col 12 '"': Failed to parse (Digit)+ of FloatNumber.
    251. Line 1, Col 12 '"': Failed to parse Name of VariableArg.
    252. Line 1, Col 12 '"': Failed to parse firstTerm of OperatorExpr.
    253. Line 1, Col 12 '"': Failed to parse Expr of ExprStmt.
    254. Line 1, Col 13 ':': Failed to parse Letter of Name.
    255. Line 1, Col 13 ':': Failed to parse Name of VarName.
    256. Line 1, Col 13 ':': Failed to parse 'nil' of NilLiteral.
    257. Line 1, Col 13 ':': Failed to parse Text of BoolLiteral.
    258. Line 1, Col 13 ':': Failed to parse '0'...'9' of Digit.
    259. Line 1, Col 13 ':': Failed to parse (Digit)+ of FloatNumber.
    260. Line 1, Col 13 ':': Failed to parse Name of VariableArg.
    261. Line 1, Col 13 ':': Failed to parse firstTerm of OperatorExpr.
    262. Line 1, Col 13 ':': Failed to parse Expr of ExprStmt.
    263. Line 2, Col 1 : Failed to parse Letter of Name.
    264. Line 2, Col 1 : Failed to parse Name of VarName.
    265. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    266. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    267. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    268. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    269. Line 2, Col 1 : Failed to parse Name of VariableArg.
    270. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    271. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    272. Line 2, Col 1 : Failed to parse Letter of Name.
    273. Line 2, Col 1 : Failed to parse Name of VarName.
    274. Line 2, Col 1 : Failed to parse 'nil' of NilLiteral.
    275. Line 2, Col 1 : Failed to parse Text of BoolLiteral.
    276. Line 2, Col 1 : Failed to parse '0'...'9' of Digit.
    277. Line 2, Col 1 : Failed to parse (Digit)+ of FloatNumber.
    278. Line 2, Col 1 : Failed to parse Name of VariableArg.
    279. Line 2, Col 1 : Failed to parse firstTerm of OperatorExpr.
    280. Line 2, Col 1 : Failed to parse Expr of ExprStmt.
    281. Line 1, Col 1 '{': Failed to parse Letter of Name.
    282. Line 1, Col 1 '{': Failed to parse Name of VarName.
    283. Line 1, Col 1 '{': Failed to parse 'nil' of NilLiteral.
    284. Line 1, Col 1 '{': Failed to parse Text of BoolLiteral.
    285. Line 1, Col 1 '{': Failed to parse '0'...'9' of Digit.
    286. Line 1, Col 1 '{': Failed to parse (Digit)+ of FloatNumber.
    287. Line 1, Col 13 ':': Failed to parse '}' of TableConstructor.
    288. Line 1, Col 1 '{': Failed to parse Name of VariableArg.
    289. Line 1, Col 1 '{': Failed to parse firstTerm of Opera<message truncated>
    I'm not really sure what lua code it is referring to that has errors.

    [EDIT]
    This might be related. I triggered a scene portal, did a quick save in that scene, and re-loaded the quick save without issues. But then when I triggered a scene portal back to the main scene where I have the object with the DestructibleSaver, here is the error I got:

    ArgumentException: JSON parse error: Invalid value.
    PixelCrushers.JsonDataSerializer.Deserialize[DestructibleData] (System.String s, PixelCrushers.DestructibleData data) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/DataSerializers/JsonDataSerializer.cs:44)
    PixelCrushers.SaveSystem.Deserialize[DestructibleData] (System.String s, PixelCrushers.DestructibleData data) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:668)
    PixelCrushers.DestructibleSaver.ApplyData (System.String s) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/Savers/DestructibleSaver.cs:101)
    PixelCrushers.SaveSystem.ApplySavedGameData (PixelCrushers.SavedGameData savedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:519)
    UnityEngine.Debug:LogException(Exception)
    PixelCrushers.SaveSystem:ApplySavedGameData(SavedGameData) (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:524)
    PixelCrushers.SaveSystem:ApplySavedGameData() (at Assets/Plugins/Pixel Crushers/Common/Scripts/Save System/SaveSystem.cs:534)
    PixelCrushers.<Start>c__Iterator0:MoveNext() (at Assets/Scripts/ApplySaveSystemOnStart.cs:22)
     
    Last edited: Jun 3, 2019
  50. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Hi @magique - There should only ever be one DialogueSystemSaver. Typically it's on your Dialogue Manager GameObject, which has its Don't Destroy On Load and Allow Only One Instance checkboxes ticked.

    If you have two Savers on the same GameObject, make sure you've assigned unique Keys to them or ticked Append Saver Type To Key. (If you have more than one of the same Saver type on a GameObject, you must assign unique keys.) Otherwise both Savers will save their information under the same key. When restoring, one of the Savers will receive the wrong information because the information will be meant for the other Saver type.

    If you don't want to manually assign unique keys, you can select the menu item Tools > Pixel Crushers > Common > Save System > Assign Unique Keys to have the Dialogue System automatically assign unique keys to Savers in the scene.