Page 1 of 1

Questions about Textline

Posted: Mon Jun 17, 2019 4:39 pm
by allisonrose
Hi!

I'm considering using the Textline add on for a certain part of my project, but before I dig into it, I wanted to find out if it is possible to use this functionality alongside my already current project which is using the Visual Novel framework. I only want to use textline functionality for short periods of the game and then switch back to normal VN dialogue.

My goal is to essentially create an interactive "Diary" where the user can fill in bits almost mad-lib style, so i assumed textline might do the trick, but perhaps textline is not the best solution for something like this?

Re: Questions about Textline

Posted: Mon Jun 17, 2019 5:47 pm
by Tony Li
I think they might work together. The heart of the Textline framework is a custom dialogue UI script. You can probably set it up to use the Textline dialogue UI only for the diary conversation, and use the VN dialogue UI for the rest.

Re: Questions about Textline

Posted: Mon Jun 17, 2019 6:23 pm
by allisonrose
Okay, I guess I'll make a test project to see how this could work together!

Really all I need is the "log" ability to save the previous lines and after the user is presented with a multiple choice, it inserts that text into the log and continues. The back and forth text bit isnt really necessary since it's going to be a single person conversation with themself. :)

Re: Questions about Textline

Posted: Tue Jun 18, 2019 3:52 pm
by allisonrose
After doing some digging, I've decided that the template for the Runic Dialogue UI could work for my purposes since really all I want to do is Accumulate the text in the subtitle panel. So I thought I could solve my issue in a much more simple way than using Textline by just switching to the Runic UI during specific conversations.

So I created a new test project using the VN Framework example scenes.

I've tried to create a new actor (called Diary) and a new conversation using the Diary actor with an Override UI component on it. Unfortunately, the UI doesn't change when the conversation with actor Diary starts, it continues to show the Standard VN dialogue.

What am I missing here? is it an issue with the VN framework?

I am using Unity version Unity 2019.1.7 and the newest version of Dialogue System

Image

Re: Questions about Textline

Posted: Tue Jun 18, 2019 4:24 pm
by Tony Li
Hi,

How are you starting the conversation? Is the Diary GameObject being used as one of the participants?

Instead of a conversation, what if you use the quest log window? Create a quest for your diary, and add quest entries for each diary entry. Set the quest active. When you want to make an entry visible in the quest log window, set it active.

Re: Questions about Textline

Posted: Tue Jun 18, 2019 4:37 pm
by allisonrose
I'm just linking to the Diary conversation from another conversation and using the Diary actor as a participant.


Image
Image
Image
Tony Li wrote: Tue Jun 18, 2019 4:24 pm Instead of a conversation, what if you use the quest log window? Create a quest for your diary, and add quest entries for each diary entry. Set the quest active. When you want to make an entry visible in the quest log window, set it active.
I want the diary to be interactive so the player can make a choice and have it reflect in the diary entry in the next line. So they're updating their diary with their choices. So I think I have to have a conversation for that.

Re: Questions about Textline

Posted: Tue Jun 18, 2019 6:57 pm
by Tony Li
Yup, a conversation would be best for what you describe.

Unfortunately, the Override Dialogue UI component doesn't take effect when just linking from one conversation to another since the primary actor and conversant are still the original ones, not the Diary GameObject.

Instead, you'll need to stop the current conversation and start the Diary conversation.

I'll see if I can put together a brief example tomorrow. It won't look fancy, but I think it will cover all the technical requirements.

Re: Questions about Textline

Posted: Wed Jun 19, 2019 12:44 am
by allisonrose
that would be helpful, thanks!

I saw the demo was using conversation triggers, but my game doesn't really use them since each conversation just flows to the next. Not sure what the best way to implement that in the VN format would be.

Re: Questions about Textline

Posted: Wed Jun 19, 2019 11:49 pm
by Tony Li
Hi,

Here's the example:

DS_VN_Diary_Example_2019-06-19.unitypackage

To try it out, you can either import it into your project (after backing up your project to be safe) or a new VN framework project. Add the scene "0 VN Diary Start" as the first scene in build settings. Then play the scene.

To set it up in your own project:

1. Import the package above. It contains the minimum files needed from the Textline package. Actually you don't need anything except TextlineDialogueUI.cs. But I included Textline's Dialogue Manager prefab in case it's helpful to look at. If you import the entire Textline package, exclude MenuUtility.cs.

2. Create a new actor for your diary and tick its Is Player checkbox, or just use the Player actor.

3. Write a diary conversation with this actor as both participants.

4. Create a new canvas in the Dialogue Manager prefab. Set the Sort Order to 2.

5. Add the Textline Dialogue UI from Textline's Dialogue Manager prefab to the new sort order 2 canvas. I recommend making its Dialogue Panel's image fully opaque so it hides everything underneath it.

6. Tick the Dialogue Manager's Dialogue System Saver > Save Across Scene Changes checkbox.

7. Add an empty GameObject to Dialogue Manager. Name it Diary.
  • Add the DiaryManager script to it. Select your diary conversation.
  • Add an Override Display Settings component.
    • Assign the Textline Dialogue UI to the Dialogue UI field.
      Tick Subtitle Settings > Show PC Subtitles During Line.
      Untick Input Settings > Always Force Response Menu.
8. Rename Dialogue Panel > Heading Panel > Menu Button to Close button. Change the OnClick() event to invoke the Diary GameObject's DiaryManager.CloseDiary().[/list]

9. Untick the Visual Novel Menu Canvas > Menus > Return To Menu On Conversation End checkbox.

10. Rename the Gameplay Panel's Quest Log Button to Diary Button. (Or duplicate it.) Change the OnClick() event to invoke the Diary GameObject's DiaryManager.OpenDiary().

Re: Questions about Textline

Posted: Thu Jun 20, 2019 12:56 pm
by allisonrose
Thanks Tony!
I got it working in my test project so I'll venture into adding it into my main project now and let you know if I manage to break it. :lol: