Page 1 of 4

New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 3:51 pm
by dragonlord3989
Hi so before I go into unity I used ren'py My question is would it be possible to show a layered image. Because I want to make a visual novel and that would save me time not having to make a different facial expression every image also allows players to customise the npc's

Re: New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 5:21 pm
by Tony Li
Hi,

Yes, you can show layered images. That's more of a Unity thing than a Dialogue System thing. Ren'Py is a dedicated visual novel engine, whereas Unity is a general-purpose game engine. You can do more different things in Unity, but that extra flexibility comes with some extra complexity. I'll try to help you out where I can, especially as it pertains to Dialogue System questions.

Re: New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 8:05 pm
by dragonlord3989
Also would it be possible to change the text boxs to a image to the text goes over the image

Re: New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 8:23 pm
by Tony Li
Yes, that's an easy one. The text boxes are already images. They're just solid box images. You can swap them out for more interesting images.

If you give me a few minutes, I'll put together a sample scene.

Re: New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 9:18 pm
by Tony Li
Here's an example with some more interesting images: VisualNovelSimpleExample_2016-01-02.unitypackage

Download and import that unitypackage file (Assets > Import Package > Custom Package...).

Then play the scene Dialogue System Examples > Visual Novel Simple Example > Test Scene. It will look like this:

Image

In the Hierarchy view, if you expand Dialogue Manager > Canvas > Images > Character Images, you'll see some images such as "Boy Image", "Girl Image", and "Girl Angry Image". These could also be animated (for example blinking or waving), but I wanted to keep this example as simple as possible.

The conversation, which is in the Dialogue Database, uses the SetActive() sequencer command to show the Boy Image and the Girl Angry Image at the appropriate time.

The text box uses the "JRPG2" prefab. If you want to swap out the gray box with a more interesting image, in the Hierarchy view expand Dialogue Manager > Canvas > JRPG2 Unity UI Dialogue UI > Dialogue Panel and inspect Subpanel. In the Inspector view, you'll see an Image component. The Source Image is currently set to "JRPG 1 Panel Sprite", which is the gray box.

Re: New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 10:34 pm
by dragonlord3989
thank you very much

Re: New to Unity and the Dialogue System

Posted: Sat Jan 02, 2016 11:26 pm
by Tony Li
Glad to help! Consider that example scene a jumping off point. Unity and the Dialogue System can both do a lot, but they also have big learning curves. Don't hesitate to ask questions if any come up.

Re: New to Unity and the Dialogue System

Posted: Thu Jul 21, 2016 6:33 am
by UnWrecker
Hello!

I'm new to Dualogue System and framework for novel. I need an advise how can I make a several dialogues?
For example, I'm starting the game and see map. Pressing the location and here starting the conversation. Then exit, press the 2nd location and there starts another converstion.
Can you please help me with advise how to realize this things? Maybe you have a guide, but I didnt find it.

Re: New to Unity and the Dialogue System

Posted: Thu Jul 21, 2016 9:40 am
by Tony Li
Hi,

Thanks for using the Dialogue System! The free visual novel framework on the Dialogue System Extras page uses one conversation. You can link to other conversations from this one conversation, though.

If you want to start different conversations from a map, here's a suggestion:

1. Write your conversations and make a note of each conversation's Title (e.g., "France").

2. Make each location a Unity UI button.

3. In the button's OnClick event, add an entry and point it to the Dialogue Manager.

4. In the entry, select DialogueSystemController.StartConversation.

5. In the text field, enter the conversation's Title (e.g., "France").


Once you get this working, you may want to lock off locations until the player has unlocked them. If you want to do this, define variables in the Variables section of the Dialogue Editor. Let's say the player can't click on the France location until they've visited Spain.

1. Create a variable named something like "FranceUnlocked". Set its Type to Boolean. Its default value is False.

2. In the Spain conversation, use the Lua wizard to set FranceUnlocked to True. This means some dialogue entry node in the Spain conversation will have a Script field with this:

Code: Select all

Variable["FranceUnlocked"] = true
3. On the France button, add a Conversation Trigger and an Alert Trigger.

4. Set up the Alert Trigger like this:
  • Message: "This location is locked."
  • Condition > Lua Condition: Variable["FranceUnlocked"] == false
5. Set up the Conversation Trigger like this:
  • Trigger: OnUse
  • Conversation: France
  • Condition > Lua Condition: Variable["FranceUnlocked"] == true
6. On the France button, change the OnClick event. Point it to the France button itself, instead of the Dialogue Manager. Select AlertTrigger.OnUse. Then add another entry to the OnClick event, assign the France button, and select ConversationTrigger.OnUse.


I realize this is quite a lot of information. If you have any questions, please let me know how I can help. If you get stuck, feel free to send me an example project and let me know what version of Unity to use. I'll be happy to take a look.

Re: New to Unity and the Dialogue System

Posted: Thu Jul 21, 2016 1:40 pm
by UnWrecker
Thank you very much for your advise! It works!

I'm sorry for annoying and silly questions. But I have another one)
How can I start the second conversation in the same location after first? I need to add a Condition to [END] node?

For example: I talk to someone in "France" and quit conversetion and get back to "WorldMap". If I'll go again to "France" there we'll be another conversation.