- NLua: Optimized DialogueLua.Get/SetTableField.
- NLua: Implemented compressed SimStatus in PersistentDataManager to match default LuaInterpreter.
- Fixed: UnityUISelectorDisplay & OverrideUnityUIControls continue button weren’t syncing with Dialogue Manager after load game.
- Fixed: Unity UI Quest Log Window slowdown when mashing Track toggle button.
- Improved: UnityUITypewriterEffect now automatically adds audio source if necessary.
- Dialogue Editor: Moved “Link To:” dropdown items “Another conversation” & “New entry” to top of menu.
- Localized text table editor: Added search bar.
- [Third Party Support] Rog: Added ReplaceActorSprite() Lua function.
Dialogue System 1.7.6 Patch 20171016 Available
Dialogue System 1.7.6 Patch 20171016 Available
Patch 20171016 is available on the Pixel Crushers customer download site. (PM me your Unity Asset Store invoice number if you'd like access.). This patch contains:
- liisi.laasik
- Posts: 13
- Joined: Tue Oct 03, 2017 9:15 am
- Location: Tallinn, Estonia
Re: Dialogue System 1.7.6 Patch 20171016 Available
Saving compressed SimStatus with NLua is crazy-fast. Thank you!
I had a few problems though. Importing the patch crashed Unity (repeatably). However when importing again, all the files were already updated, so apparently the update worked. There was only one (hopefully) relevant line in Editor.log:
Also when running the game, there are hundreds of errors of the same type. The update might have exposed some error in our data. Do you have any ideas?
I had a few problems though. Importing the patch crashed Unity (repeatably). However when importing again, all the files were already updated, so apparently the update worked. There was only one (hopefully) relevant line in Editor.log:
Code: Select all
TypeLoadException: Could not load type 'PixelCrushers.DialogueSystem.QuestCondition' from assembly 'DialogueSystem, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
Code: Select all
Dialogue System: Lua code 'return Actor["NAME_X"].Name' threw exception '[string "chunk"]:1: attempt to index field 'NAME_X' (a nil value)'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean)
PixelCrushers.DialogueSystem.DialogueLua:SafeGetLuaResult(String)
PixelCrushers.DialogueSystem.DialogueLua:GetTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedActorField(String, String)
PixelCrushers.DialogueSystem.CharacterInfo:GetLocalizedDisplayNameInDatabase(String)
PixelCrushers.DialogueSystem.OverrideActorName:GetActorName(Transform)
PixelCrushers.DialogueSystem.CharacterInfo:.ctor(Int32, String, Transform, CharacterType, Texture2D)
PixelCrushers.DialogueSystem.ConversationModel:GetCharacterInfo(Int32, Transform)
PixelCrushers.DialogueSystem.ConversationModel:SetParticipants(Conversation, Transform, Transform)
PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean)
PixelCrushers.DialogueSystem.<Bark>c__Iterator5:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PixelCrushers.DialogueSystem.DialogueSystemController:Bark(String, Transform, Transform, BarkHistory)
PixelCrushers.DialogueSystem.DialogueManager:Bark(String, Transform, Transform, BarkHistory)
PixelCrushers.DialogueSystem.BarkStarter:TryBark(Transform, Transform)
PixelCrushers.DialogueSystem.BarkStarter:TryBark(Transform)
PixelCrushers.DialogueSystem.<BarkLoop>c__Iterator18:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
Re: Dialogue System 1.7.6 Patch 20171016 Available
The error while importing shouldn't be an issue. This can happen if the Unity editor is using a Dialogue System DLL to display a custom editor (e.g., a Conversation Trigger) in an Inspector view while importing, which prevents it from successfully reloading it until you restart Unity.
This means the Actor table doesn't have a element "NAME_X". You can temporarily add a Lua Console to your scene and press ~+L to open it. Then enter: "return Actor" to list the elements in the Actor table.Dialogue System: Lua code 'return Actor["NAME_X"].Name' threw exception '[string "chunk"]:1: attempt to index field 'NAME_X' (a nil value)'
Re: Dialogue System 1.7.6 Patch 20171016 Available
Were you able to identify the source of the errors?liisi.laasik wrote:Also when running the game, there are hundreds of errors of the same type. The update might have exposed some error in our data. Do you have any ideas?
- liisi.laasik
- Posts: 13
- Joined: Tue Oct 03, 2017 9:15 am
- Location: Tallinn, Estonia
Re: Dialogue System 1.7.6 Patch 20171016 Available
Mostly the errors were because our NPC game object names did not match Articy actor names. I did not know the dialogue system has such a convention. Apparently something in the latest update is enforcing this. We are fixing them as we go.
For one of the errors (copied below) I think we need your input tho. When calling DialogueManager:ConversationHasValidEntry with just the one conversation title argument, the transforms are set to null and I suspect later used to query Actor table. The conversation does have ActorID and ConversantID set, so I am not enitrely sure how this is happening.
Another issue is with async saves. PersistentDataManager.GetSaveDataAsync() takes a total of 18482 milliseconds while PersistentDataManager.GetSaveData() takes 433 for exactly the same data. They performed the same before the laste update.
Do you have any instructions how to add Dialogue System source to the project instead of the dll? It would be nice to debug the code and give you more detailed input.
For one of the errors (copied below) I think we need your input tho. When calling DialogueManager:ConversationHasValidEntry with just the one conversation title argument, the transforms are set to null and I suspect later used to query Actor table. The conversation does have ActorID and ConversantID set, so I am not enitrely sure how this is happening.
Code: Select all
Dialogue System: Lua code 'return Actor[""].Display_Name' threw exception '[string "chunk"]:1: attempt to index field '' (a nil value)'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean)
PixelCrushers.DialogueSystem.DialogueLua:SafeGetLuaResult(String)
PixelCrushers.DialogueSystem.DialogueLua:GetTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedActorField(String, String)
PixelCrushers.DialogueSystem.CharacterInfo:GetLocalizedDisplayNameInDatabase(String)
PixelCrushers.DialogueSystem.CharacterInfo:.ctor(Int32, String, Transform, CharacterType, Texture2D)
PixelCrushers.DialogueSystem.ConversationModel:GetCharacterInfo(Int32, Transform)
PixelCrushers.DialogueSystem.ConversationModel:SetParticipants(Conversation, Transform, Transform)
PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean)
PixelCrushers.DialogueSystem.DialogueSystemController:ConversationHasValidEntry(String, Transform, Transform)
PixelCrushers.DialogueSystem.DialogueManager:ConversationHasValidEntry(String)
Do you have any instructions how to add Dialogue System source to the project instead of the dll? It would be nice to debug the code and give you more detailed input.
Re: Dialogue System 1.7.6 Patch 20171016 Available
It's not an absolute requirement. If you want to use a different GameObject name, just add an Override Actor Name component and specify the actor name. You can read more details here: How GameObject Are Associated With Conversationsliisi.laasik wrote:Mostly the errors were because our NPC game object names did not match Articy actor names. I did not know the dialogue system has such a convention. Apparently something in the latest update is enforcing this. We are fixing them as we go.
Are you sure that the conversation's actor ID and conversant ID are set to valid actors? Are their Name fields set correctly? (You can check this in the Dialogue Editor window on the Actors tab.)liisi.laasik wrote:For one of the errors (copied below) I think we need your input tho. When calling DialogueManager:ConversationHasValidEntry with just the one conversation title argument, the transforms are set to null and I suspect later used to query Actor table. The conversation does have ActorID and ConversantID set, so I am not enitrely sure how this is happening.
Code: Select all
Dialogue System: Lua code 'return Actor[""].Display_Name' threw exception '[string "chunk"]:1: attempt to index field '' (a nil value)' UnityEngine.Debug:LogError(Object) PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean) PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) PixelCrushers.DialogueSystem.Lua:Run(String, Boolean) PixelCrushers.DialogueSystem.DialogueLua:SafeGetLuaResult(String) PixelCrushers.DialogueSystem.DialogueLua:GetTableField(String, String, String) PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedTableField(String, String, String) PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedActorField(String, String) PixelCrushers.DialogueSystem.CharacterInfo:GetLocalizedDisplayNameInDatabase(String) PixelCrushers.DialogueSystem.CharacterInfo:.ctor(Int32, String, Transform, CharacterType, Texture2D) PixelCrushers.DialogueSystem.ConversationModel:GetCharacterInfo(Int32, Transform) PixelCrushers.DialogueSystem.ConversationModel:SetParticipants(Conversation, Transform, Transform) PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean) PixelCrushers.DialogueSystem.DialogueSystemController:ConversationHasValidEntry(String, Transform, Transform) PixelCrushers.DialogueSystem.DialogueManager:ConversationHasValidEntry(String)
I'll take a look and reply back later today. Maybe the async version is processing too few dialogue entries per frame. The default is only 100. If you have 6000 dialogue fragments, this means it will take a minimum of 6000 / 100 = 60 frames. At 60 frames/sec, this be a minimum of 1000 milliseconds just in overhead of releasing control back to Unity.liisi.laasik wrote:Another issue is with async saves. PersistentDataManager.GetSaveDataAsync() takes a total of 18482 milliseconds while PersistentDataManager.GetSaveData() takes 433 for exactly the same data. They performed the same before the last update.
Try increasing PersistentDataManager.asyncDialogueEntryBatchSize to, say, 10000. You can set this on the Dialogue Manager GameObject in the Inspector.
Instructions are here. However, it's a big hassle that I'm going to address in Dialogue System 2.0. The problem is that Unity associates a GUID with each script. To Unity, the GUID assigned to the unpacked script file DialogueDatabase.cs is different from the GUID assigned to the compiled DialogueDatabase class in DialogueSystem.DLL. When you remove the DLL and import the source code, Unity will no longer recognize your dialogue database asset because the GUID will be different. The solution is to switch the Inspector to Debug mode and manually assign the DialogueDatabase.cs script to the asset. The same issue applies to all ScriptableObjects and MonoBehaviours in DialogueSystem.DLL, such as ConversationTrigger.liisi.laasik wrote:Do you have any instructions how to add Dialogue System source to the project instead of the dll? It would be nice to debug the code and give you more detailed input.
My later products (Love/Hate and Quest Machine) use a wrapper class that makes it effortless to switch between DLL and source code. But I haven't converted the Dialogue System to use wrapper classes yet.
Some studios import the source code into a separate project that they just use for debugging and exploring the code.
- liisi.laasik
- Posts: 13
- Joined: Tue Oct 03, 2017 9:15 am
- Location: Tallinn, Estonia
Re: Dialogue System 1.7.6 Patch 20171016 Available
I am sorry I haven't replied for a long time.
The PersistentDataManager.asyncDialogueEntryBatchSize hint was really good. We can fiddle with the value as our dialogue size increases and we are getting some good results. Thanks!
I actually spent a few days replacing all the missing script references to get our project to work with Dialogue System source. We will keep it in a separate code branch and I believe it will be of great benefit as we are entering the testing phase for our game.
For instance I figured out, that the above error is due to the "START" dialogue entry ArticyConverter.CreateNewConversation() method creates. It has no actor and conversant information. Regular Lua apparently did not mind empty string literals in queries, but NLua does. Could you add some kind of check somewhere?
The PersistentDataManager.asyncDialogueEntryBatchSize hint was really good. We can fiddle with the value as our dialogue size increases and we are getting some good results. Thanks!
I actually spent a few days replacing all the missing script references to get our project to work with Dialogue System source. We will keep it in a separate code branch and I believe it will be of great benefit as we are entering the testing phase for our game.
Code: Select all
Dialogue System: Lua code 'return Actor[""].Display_Name' threw exception '[string "chunk"]:1: attempt to index field '' (a nil value)'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean)
PixelCrushers.DialogueSystem.DialogueLua:SafeGetLuaResult(String)
PixelCrushers.DialogueSystem.DialogueLua:GetTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedTableField(String, String, String)
PixelCrushers.DialogueSystem.DialogueLua:GetLocalizedActorField(String, String)
PixelCrushers.DialogueSystem.CharacterInfo:GetLocalizedDisplayNameInDatabase(String)
PixelCrushers.DialogueSystem.CharacterInfo:.ctor(Int32, String, Transform, CharacterType, Texture2D)
PixelCrushers.DialogueSystem.ConversationModel:GetCharacterInfo(Int32, Transform)
PixelCrushers.DialogueSystem.ConversationModel:GetCharacterInfo(Int32)
PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry, Boolean, Boolean, Boolean)
PixelCrushers.DialogueSystem.ConversationModel:.ctor(DialogueDatabase, String, Transform, Transform, Boolean, IsDialogueEntryValidDelegate, Int32, Boolean, Boolean)
PixelCrushers.DialogueSystem.DialogueSystemController:ConversationHasValidEntry(String, Transform, Transform)
PixelCrushers.DialogueSystem.DialogueManager:ConversationHasValidEntry(String)
Re: Dialogue System 1.7.6 Patch 20171016 Available
Yes, I'll make sure that's fixed in 1.7.7, which I'm working on this week.
Re: Dialogue System 1.7.6 Patch 20171016 Available
Patch 20171107 is now available on the Pixel Crushers customer download site. (If you need access, please PM me your Unity Asset Store invoice number). It has a fix for the issue above, another fix for PersistentDataManager (the save system) when saving SimStatus, and a few other additions:
- Fixed: Persistent Data Manager SimX bug.
- Fixed: NLua Get/SetTableField and Get/SetVariable handle blank table element names (e.g., blank actor names) more gracefully.
- Improved: Conversation node editor now highlights incoming link arrows in a different color.
- Improved: Unity UI Dialogue UI uses Unity UI Typewriter Effect more effectively by calling it directly instead of relying on OnEnable.
- [Third Party Support] Ink Support: Updated for Unity 2017.2.
- [Third Party Support] PlayMaker Support: Added actions to sync variables between PlayMaker and Lua.
- [Third Party Support] RPG Kit Support: Updated for RPG Kit 3.1.8.