Questions about Dialogue Editor
Posted: Fri Jun 19, 2020 5:24 pm
Hi Tony, I am slowly moving my ink project to Dialogue System.
I did a first iteration of a dialogue to test most of my needs, but I am not sure if I am doing things as they should be, so I need some general advice, if you can help me.
First, in this example, I have a narrator, and one actor (the player) that acts and make decisions. So I created 2 actors, one for "the narrator" with isplayer unticked, and one actor "maincharacter" which is the player, with isplayer ticked. I wasn't sure if this is a good approach, or there is another way to have a narrator in the scene. I use the narrator for all the non interactive text, and the maincharacter to show the options to select an continue with the narrative.
All the previous issues with variables and C# functions and Lua are working now. But I am not sure if I am using the dialogue editor as it should be. I saw the videos and some examples but still not sure.
I attach an image, and ask some questions about.
My second question is... I have 3 options to start the dialogue, and then 18 different descriptions depending on a specific previous situations. So I created a grouping node marked as "group", pointed the 3 previous initial descriptions to it, and then this node points to the 18 descriptions. Each one has a state to check which one I should show. It works. But Not sure if this is the way to manage it, or of it may be better to have only one node instead of 18, as they are mutually exclusive, and in the text of the only node control the state variable and show the text depending on it. For sake of simplicity I should prefer the second option, instead of creating so many nodes.
Third question, after the 18 possibilities, I created a "gather node" to avoid having so many M to N relationships among the previos nodes and the next choices. Again, not sure if this is a good thing.
Fourth. I want a set of 4 choices to show. Only 1 of them gets you out, but the other 3 ones gives you more information, and then I need to show again the non visited ones. To do that I needed a new node below the previous gather node (I don't know the reason, but if i pointed the loop to the gather node it didn't worked), and then I created the 4 choices as the player, and when selected each choice goes to a child node with a description (by the narrator), and then those description nodes point to the original node, so the other options are shown again. I use state variables and simstatus to do that. Maybe there is another way to do the same? An option that I overlooked? so I can avoid doing the loop by hand?
Fifth, the previous loop worked, but it is strange, if I select the 3 previous options of the loop (not the exit one), in any order, i get an error on unity. The flow continues and I receive the last option anyways, but surely there is something wrong there. I understand it is something in the UI, but probably derived of an infinite loop or something like that? I am using the WRPG UI as it is, without changes. The error I see in the console is:
ArgumentException: Mesh can not have more than 65000 vertices
UnityEngine.UI.VertexHelper.FillMesh (UnityEngine.Mesh mesh)
UnityEngine.UI.Graphic.DoMeshGeneration ()
UnityEngine.UI.Graphic.UpdateGeometry ()
UnityEngine.UI.Text.UpdateGeometry ()
UnityEngine.UI.Graphic.Rebuild (UnityEngine.UI.CanvasUpdate update)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate ()
UnityEngine.Canvas:SendWillRenderCanvases()
And, final, 6th question in 2 parts, In the same previous 4 options, I want to show an option only if a specific of the other 3 had been shown, but not after it. I want to show 3 options at first, and if I pick the "analyze" option, then I replace that option with the new one. So I cannot put it below analyze because I want it to appear among the other 2 in replacement of the first one, and if I put it below, it sits alone without the other ones shown. Maybe, again, I am doing it wrong, so that's why asking for advice.
On the other side, to be able to do what I want, I check for SimStatus this way:
Dialog[thisID].SimStatus ~= "WasDisplayed" and Dialog[24].SimStatus == "WasDisplayed" (where 24 is the ID of the previous one). I don't like it, because I am afraid that if I add or remove nodes in the future, 24 might change to other number and then this control break? Or I can be sure that the ID will be 24 forever? Or there is another way to test by a name instead of the ID?
Sorry for the long email, but I believe if I get your advice on these questions, I will have covered most of my needs on the writing of the conversations and descriptions. Surely there is a long way to go, and some additional complexities, but at least I will be sure that I am doing things right.
Thanks a lot!
I did a first iteration of a dialogue to test most of my needs, but I am not sure if I am doing things as they should be, so I need some general advice, if you can help me.
First, in this example, I have a narrator, and one actor (the player) that acts and make decisions. So I created 2 actors, one for "the narrator" with isplayer unticked, and one actor "maincharacter" which is the player, with isplayer ticked. I wasn't sure if this is a good approach, or there is another way to have a narrator in the scene. I use the narrator for all the non interactive text, and the maincharacter to show the options to select an continue with the narrative.
All the previous issues with variables and C# functions and Lua are working now. But I am not sure if I am using the dialogue editor as it should be. I saw the videos and some examples but still not sure.
I attach an image, and ask some questions about.
My second question is... I have 3 options to start the dialogue, and then 18 different descriptions depending on a specific previous situations. So I created a grouping node marked as "group", pointed the 3 previous initial descriptions to it, and then this node points to the 18 descriptions. Each one has a state to check which one I should show. It works. But Not sure if this is the way to manage it, or of it may be better to have only one node instead of 18, as they are mutually exclusive, and in the text of the only node control the state variable and show the text depending on it. For sake of simplicity I should prefer the second option, instead of creating so many nodes.
Third question, after the 18 possibilities, I created a "gather node" to avoid having so many M to N relationships among the previos nodes and the next choices. Again, not sure if this is a good thing.
Fourth. I want a set of 4 choices to show. Only 1 of them gets you out, but the other 3 ones gives you more information, and then I need to show again the non visited ones. To do that I needed a new node below the previous gather node (I don't know the reason, but if i pointed the loop to the gather node it didn't worked), and then I created the 4 choices as the player, and when selected each choice goes to a child node with a description (by the narrator), and then those description nodes point to the original node, so the other options are shown again. I use state variables and simstatus to do that. Maybe there is another way to do the same? An option that I overlooked? so I can avoid doing the loop by hand?
Fifth, the previous loop worked, but it is strange, if I select the 3 previous options of the loop (not the exit one), in any order, i get an error on unity. The flow continues and I receive the last option anyways, but surely there is something wrong there. I understand it is something in the UI, but probably derived of an infinite loop or something like that? I am using the WRPG UI as it is, without changes. The error I see in the console is:
ArgumentException: Mesh can not have more than 65000 vertices
UnityEngine.UI.VertexHelper.FillMesh (UnityEngine.Mesh mesh)
UnityEngine.UI.Graphic.DoMeshGeneration ()
UnityEngine.UI.Graphic.UpdateGeometry ()
UnityEngine.UI.Text.UpdateGeometry ()
UnityEngine.UI.Graphic.Rebuild (UnityEngine.UI.CanvasUpdate update)
UnityEngine.UI.CanvasUpdateRegistry.PerformUpdate ()
UnityEngine.Canvas:SendWillRenderCanvases()
And, final, 6th question in 2 parts, In the same previous 4 options, I want to show an option only if a specific of the other 3 had been shown, but not after it. I want to show 3 options at first, and if I pick the "analyze" option, then I replace that option with the new one. So I cannot put it below analyze because I want it to appear among the other 2 in replacement of the first one, and if I put it below, it sits alone without the other ones shown. Maybe, again, I am doing it wrong, so that's why asking for advice.
On the other side, to be able to do what I want, I check for SimStatus this way:
Dialog[thisID].SimStatus ~= "WasDisplayed" and Dialog[24].SimStatus == "WasDisplayed" (where 24 is the ID of the previous one). I don't like it, because I am afraid that if I add or remove nodes in the future, 24 might change to other number and then this control break? Or I can be sure that the ID will be 24 forever? Or there is another way to test by a name instead of the ID?
Sorry for the long email, but I believe if I get your advice on these questions, I will have covered most of my needs on the writing of the conversations and descriptions. Surely there is a long way to go, and some additional complexities, but at least I will be sure that I am doing things right.
Thanks a lot!