Use Dialogue System speech system in place of Adventure creator

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Use Dialogue System speech system in place of Adventure creator

Post by DragoonHP »

Possibly a very stupid (and extremely newbie) question, but is there a way of using DS speech system in place of Adventure creator (completely)?

I want to use the VN Template Standard with Adventure Creator, but I'm not sure how to go on about that? I read this > https://www.pixelcrushers.com/dialogue_ ... eator.html but I'm not sure if the game will still be using Adventure Creator Subtitles menu to show the text.

Thanks.
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use Dialogue System speech system in place of Adventure creator

Post by Tony Li »

Hi,

That's a perfectly valid question, since Adventure Creator (AC) does have its own subtitle and speech system.

By default, when you use the Dialogue System's Adventure Creator integration and start a conversation using the Third Party: Dialogue System Conversation action, it will solely use the Dialogue System's dialogue UI without using AC's subtitles or speech features.

That said, the integration provides several ways to tie DS into AC should you want to:

The Dialogue System's Adventure Creator Bridge component has a checkbox to tell DS to use the player's subtitles on/off setting from AC. If the player turns off AC subtitles, DS also won't show subtitles. The bridge can also do things like pause the player during conversations, etc.

The integration provides three sequencer commands for AC:
  • AC() runs an AC actionlist during the conversation.
  • ACCam() controls an AC camera.
  • ACSpeech() plays a line through AC's subtitle and lipsync system.
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: Use Dialogue System speech system in place of Adventure creator

Post by DragoonHP »

Thanks.

Another question if you don't mind, is there a easy way to implement skip already seen dialogue features?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use Dialogue System speech system in place of Adventure creator

Post by Tony Li »

Hi,

If I understand you correctly, you'll want to use conditions for this. Here are some relevant links:
You can get by with just the first link and file away the others for later reference.

Here's an example. Let's say you have a conversation that tells a fairy tale. At some point, the player can choose to ask the storyteller to stop or continue:

Image

If the player chooses to continue, the conversation flows like this:

Image

If the player chooses to stop and resume later, you'll want to resume the conversation at "Now where were we...". To do this, we can define a Boolean (true/false) variable named "IntroducedCinderella" in the Dialogue Editor's Variables section, and set up conditions like this:

Image

The conversation will follow the left branch if IntroducedCinderella is still false. The end of this branch sets IntroducedCinderella true. The conversation will follow the right branch if IntroducedCinderella is true.

To check and set this variable, I clicked the "..." next to the Conditions and Script fields and chose what I wanted from dropdown menus.
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: Use Dialogue System speech system in place of Adventure creator

Post by DragoonHP »

Sorry I should have been clearer.

I wanted to know if player can press a key and quickly skip through dialogues that they might have seen in a previous playthrough? (So, does DS keep track of which dialogues have been viewed by the player?)

Thanks for the mini tutorial though. I learned a lot. :)
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use Dialogue System speech system in place of Adventure creator

Post by Tony Li »

Apart from using a continue button to skip through each dialogue entry individually, there isn't anything built in. But with a little scripting it's relatively easy to do. You could do something like this:

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;

public class FastForwardDisplayedEntries : MonoBehaviour
{
    public bool fastForward; // Set true to fast forward through displayed entries.
    
    public float fastForwardDelay = 0.5f; // When fast forwarding, show displayed entries for this duration.
    
    void OnConversationLine(Subtitle subtitle)
    {
        if (fastForward && subtitle.sequence != "None()" && subtitle.sequence != "Continue()")
            subtitle.sequence += "; Continue()@" + fastForwardDelay;
        }
    }
}
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: Use Dialogue System speech system in place of Adventure creator

Post by DragoonHP »

Thanks!
perezbalen
Posts: 40
Joined: Mon May 24, 2021 7:22 pm

Re: Use Dialogue System speech system in place of Adventure creator

Post by perezbalen »

Hi

Is there a way to use Adventure Creator’s subtitles instead of Dialogue System’s panels? I mean, have DS display the texts using AC subtitles system?
User avatar
Tony Li
Posts: 21678
Joined: Thu Jul 18, 2013 1:27 pm

Re: Use Dialogue System speech system in place of Adventure creator

Post by Tony Li »

Hi,

You could write a simple implementation of IDialogueUI that calls AC's subtitle methods. But, depending on which advanced features you use in the Dialogue System, you may find that AC's subtitle system can't handle what the Dialogue System calls for. If you're just doing basic subtitle and response buttons, you should be fine. If you want to write an implementation of IDialogueUI, it's easiest to start with the starter template script TemplateDialogueUI.cs located in Plugins/Pixel Crushers/Dialogue System/Templates/Scripts.
Post Reply