Custom UI + Articy Integration

Announcements, support questions, and discussion for the Dialogue System.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Custom UI + Articy Integration

Post by albuarki »

Hello there,

I have a few questions about creating a custom UI for the dialogue system that I think is not supported by default and I would like to know how doing so would affect the dialogue system and if there’s anything to take into consideration when importing the story from Articy.

This information will be really helpful for us to create the right structure and to pass it through to our writers who use Articy (variables information and sequencer commands?).

The dialogue system out of the box supports dialogues that shows the speaker’s text and it disappears when moving to another line/node. It also supports accumulated text, which is what we are currently considering. However, the accumulated text is one UI Label that holds the entire conversation which is limiting us since we are considering to add other visuals in the conversation (between the dialogue lines).

To achieve some flexibility, we are considering to have the regular dialogue option without accumulation and use a template UI label for that, this label would be cloned in a vertical layout group so that each new dialogue line would be a clone of the template and would simulate the accumulated text. Using that, we can add other elements in the vertical layout group that can appear between the texts (maybe through a custom sequencer command?).

My question is now, is there another approach to achieve the same results? And if not, is there anything to consider in the dialogue system settings and how that would affect saving and so on.

Another reason for thinking of that approach: we have 2 actors in each conversation + the player, one of the actors might need to comment simultaneously as the other actor is saying their line and we’re thinking of having that comment below the active line. I’m not sure if the system support such a thing. If not, those comments will need to be done outside of the system (Text Animator supports triggering actions as the text is being typed). Is there a way to achieve that within the system?


Finally, we want to use dialogue as the main way of interfacing with the game so there are no actual characters or anything in world space, it’s all UI based. It’s structured this way: Main conversations that are interrupted by other conversations throughout the game. The main conversations will always take into account what happened in the other conversations using variables. Is it advisable to have all those conversations take place into the same scene if the UI is identical, and taking into consideration the custom UI question, where the visuals in between the texts, if available, are different for each conversation.

I really appreciate your help,
Thanks.
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

Hi,

All of that is possible.

If the only extra visual elements are images, you can add them in-line with the text using TextMesh Pro <sprite> tags. This way you don't have to do anything unusual.

If you want your extra character to put text in a different area, you can configure that character to use a different subtitle panel. Both subtitle panels can be open at the same time.

If you don't want to use the built-in Standard Dialogue UI, you can provide your own implementation of a simple C# interface called IDialogueUI. The core Dialogue System engine will work happily with any IDialogueUI implementation. Standard Dialogue UI is just one implementation. Some devs use the NGUI implementation, others write custom implementations for smart speakers, or special hardware in museum spaces, etc.

You can also tie in Text Animators events to your own dialogue UI if you need to.

The Dialogue System survives scene changes, so you can use one scene or multiple scenes. It's up to you.

Before asking your writers to create production content, I recommend creating a series of test scenes to iron out how you will implement everything. For example:
  • Start with a minimal test scene, such as a scene that tests how to import a very basic conversation from articy:draft and play it in a default dialogue UI. You could start with a copy of the WRPG template.
  • Then customize your copy of the WRPG template to use TextMesh Pro and Text Animator.
  • Then get your extra content to appear, such as using <sprite> tags or some other solution depending on your needs.
  • Then get the third participant's text to appear in a different place, etc.
After you have worked out the technical details, then your writers can start writing content.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

Thanks for the great reply and tips. I was worried about the import from articy but it works better than I expected :)

One last question, is it possible to connect the player response to 2 NPC nodes and have them appear simultaneously in an appended text?
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

albuarki wrote: Sat May 15, 2021 6:27 amOne last question, is it possible to connect the player response to 2 NPC nodes and have them appear simultaneously in an appended text?
Technically, no. But, effectively, yes. Conversations are sequential, one node at a time. However, you can start showing a node's text and immediately go to the next node in the same frame so they appear simultaneously.

Every node has a Sequence, which is an optional set of commands to do things like play lipsync, or move the camera, or just delay for a duration. A conversation stays on a node for the duration of the node's Sequence. To show 2 nodes, the first node's Sequence will just need to finish immediately. This will cause it to immediately go to the next node. Many dialogue UI setups clear the previous node's text by default, but that's not mandatory; it's simply the way the prefabs are currently set up.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

That’s something we might take a look at. Than you so much for your help.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

I’d appreciate if you could help me a bit with the IDialogueUI. A simple example would help a lot. I’m also not quite sure if we have to keep the UI panels, Subtitle panels, Response panel, etc that are used in the standard UI.

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

Re: Custom UI + Articy Integration

Post by Tony Li »

Hi,

If you're implementing IDialogueUI on your own, you don't have to do anything that StandardDialogueUI does. That is, you don't need UIPanels, subtitle panels, response panels, etc. How you implement the methods is entirely up to you.

Start with a copy of TemplateDialogueUI.cs. This template script has comments explaining what each method should do.

If you'd like more guidance on any particular method, please let me know.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

That helps a lot, I haven’t noticed the template script.

I’m gonna discuss this with our programmer next week but in the meantime I just wanted to make sure about certain stuff.

In our case, everything is fine about the standard UI elements, the only customization we want is that instead of having a single UI Text that holds the entire conversation, we want each subtitle to have its own UI Text so that we can use a custom sequence to instantiate prefabs between the subtitles in the same scrollrect, and finally since the dialogue is the game, we don’t want it to deactivate, at all.

The alerts, response menu, input field, QTEs and continue button are all fine. So do we have to do a custom versions of those as well? Or is there another way to add that customization while leaving everything intact?

If not, In the standard UI, the dialogue UI script goes on to the parent dialogue object and then each panel has its own script. I’m wondering how things would be structured.

Thank you so much for your amazing support.
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

Hi,

I recommend running all of your UI ideas by your programmer. They may prefer to write their own IDialogueUI implementation that does only what your project needs. Then again, StandardDialogueUI provides a lot of features that they may want to use to avoid having to reinvent the wheel.

If you only need to put images between subtitle text, I recommend using TMPro <sprite> tags.

If you need other things (not just images) between subtitle text, you can write your own IDialogueUI implementation, or adapt the SMSDialogueUI (which is a subclass of StandardDialogueUI), or make your own subclass of StandardDialogueUI. If you're happy with StandardDialogueUI's alerts, response menu, input field, and QTEs, your programmer may decide that it's easiest to subclass StandardDialogueUI and/or StandardUISubtitlePanel to add the features you want.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

Thank you again for the support. I will check the SMSDialogueUI and run all that by my programmer.

That helps a lot, thanks.
Post Reply