Custom UI + Articy Integration

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

Re: Custom UI + Articy Integration

Post by albuarki »

I have checked the Textline example and it seems like what I was looking for and should be enough to start testing but I tried to import the package and I got missing prefabs and errors such as:
Assets\Dialogue System Extras\Textline\Scripts\MenuUtility.cs(63,47): error CS0246: The type or namespace name 'SaveHelper' could not be found (are you missing a using directive or an assembly reference?)
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

Textline requires the Menu Framework, which you can also download from the Extras page.

The SMS Dialogue UI prefab works the same way as Textline, but it doesn't require the Menu Framework. It's included in the core Dialogue System package in the folder Plugins / Pixel Crushers / Dialogue System / Prefabs / Standard UI Prefabs / Pro / SMS. Try assigning the SMS Dialogue UI prefab to DemoScene1's Dialogue Manager, tick Subtitle Settings > Show PC Subtitles During Line, and untick Skip PC Subtitle After Response Menu. Then give it a play to see what it looks like.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

The SMS prefab is exactly what I was looking for in terms of having each line separately and it’s a good starting point to try out before deciding if there are more customization to be made. I’m happy with everything in the standard UI so as you mentioned, this might be easier instead of trying to reinvent the wheel. This will save a lot of work and let us focus on our story and special aspects of the gameplay.

There are a couple of things I’d like to do, I have a lot of NPCs that are the same type but then I have another special NPC that’s always available in conversations so I’d like them to have a special template that’s for example in a centered position.

The other thing is not using the pre delay icon. Plus using text animator here shouldn't create any problems, right?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

albuarki wrote: Thu May 20, 2021 3:06 amThere are a couple of things I’d like to do, I have a lot of NPCs that are the same type but then I have another special NPC that’s always available in conversations so I’d like them to have a special template that’s for example in a centered position.
That's fine. You'll just need to add a Dialogue Actor component to the special NPC. If the special NPC doesn't have a GameObject, you can create an empty one for it. You can assign a custom subtitle panel to the special NPC's Dialogue Actor component.
albuarki wrote: Thu May 20, 2021 3:06 amThe other thing is not using the pre delay icon. Plus using text animator here shouldn't create any problems, right?
That works fine.
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

I’ve been testing it and it works great! The couple things i mentioned need some tweaking. I couldn’t choose a different panel for the actors but it was fixed with a simple adjustment in the SMS Dialogue UI.

For the Text Animator I need to check that the current message finished typing before showing the next on because it doesn’t does that right now.

I hope tweaking the SMS Dialogue UI script is ok?

Thank you for all the support, that saved us a lot of time to basically do the same thing.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

Hi,

The prefabs and source code are yours to customize however you want. If you need to change anything about how the code works, I strongly recommend making subclasses or using event hooks instead of directly modifying the scripts. This way you won't lose your changes when you import an updated version of the Dialogue System in the future.

The conversation will remain on a dialogue entry node (dialogue fragment in articy) until its Sequence is done. If the Sequence field is blank, the node will use the Dialogue Manager's Display Settings > Camera & Cutscene Settings > Default Sequence. The initial value of Default Sequence is:

Delay({{end}})

where {{end}} is a special keyword. Its value is based on the text length and the values of the Dialogue Manager's Display Settings > Subtitle Settings > Subtitle Chars Per Second and Min Subtitle Seconds. If your Text Animator is set to 0.1s per character (60 characters per second), then set Subtitle Chars Per Second to 60. This will cause {{end}} to match the time it takes the Text Animator to finish (with a minimum duration of Min Subtitle Seconds).
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

I’ve been trying to make it work for with your suggestions but it didn’t work.

It has a nice effect but I want to make sure that this is how it’s supposed to act?

https://1drv.ms/v/s!AhzTU1cG8uocj6dT9x1gkgF3ryDnlA

I’ve made a small clip of text playing soon. I think it has to do with Text Animator’s timing. It’s more visible if I use the <waitfor> action.

I have another unrelated question, is it possible to dynamically specify an entry to jump to?

For example, I want the player to interact with the game outside of the response menu. I’m thinking of having a search button that the player can click on at anytime and it would take them to another conversation (displayed with the previous one) and it would use variables to check for certain things and at the end we want to go to the same location we were at.

Describing it now makes me think that we can have another response menu UI just for that? And basically running a simultaneous conversation?
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

Hi,
albuarki wrote: Mon May 31, 2021 12:55 pmI’ve made a small clip of text playing soon. I think it has to do with Text Animator’s timing. It’s more visible if I use the <waitfor> action.
The issue is that the line "Do you have any idea how bad that'll make me look?" starts typing before "They're sending over peacekeepers!" has finished, correct?

If so, you must make sure the "peacekeepers" node's Sequence lasts at least as long as the typewriter. Normally you could do this by setting the Sequence to: Delay({{end}}) and setting the Dialogue Manager's Subtitle Settings > Subtitle Chars Per Second to the same speed as the Text Animator typewriter effect. Since the Dialogue Manager's Default Sequence is initially set to Delay({{end}}), you can usually leave the nodes' Sequence fields blank.

Alternatively, if you were using the Dialogue System's built-in typewriter effect, you could set the Sequence / Default Sequence to: WaitForMessage(Typed) because the built-in typewriter effect sends the sequencer message "Typed" when done.

However, if the <waitfor> can make the typing wait for an undetermined amount of time, you will need the sequence to wait for a custom message. You can write a small script to make the Text Animator typewriter effect send the same "Typed" sequencer message when done. Then set the Sequence / Default Sequence to the same WaitForMessage(Typed).
albuarki wrote: Mon May 31, 2021 12:55 pmI have another unrelated question, is it possible to dynamically specify an entry to jump to?
Yes. If you're using a Dialogue System Trigger, tick Specify Starting Entry:

specifyStartingEntry.png
specifyStartingEntry.png (26.26 KiB) Viewed 505 times

If you're starting the conversation in C# code, you can specify the starting entry in DialogueManager.StartConversation().
albuarki
Posts: 18
Joined: Mon Dec 28, 2020 12:23 pm

Re: Custom UI + Articy Integration

Post by albuarki »

Hi Tony,

adjusting the characters per seconds helps a bit with that.

I'm looking for a way to run simultanious dialogues at once and I had no luck with that. I got it to work once and I'm not sure how it broke and I can't recreate it again.

Using the SMS Dialogue UI, I want to have my main conversation running at all times and I want to have a button that we can click to run a second conversation. In order to avoid any problems, that button is displayed when the response menu for the main conversation is visible.

The second conversation should use the same NPCs and Player characters and the same subtitle UI, it only has a different response menu.

when it's time for the player to response, they can talk to the character in the main dialogue + they can do certain actions using the second dialogue (such as interacting with a system that isn't the NPC in the main dialogue).

I tried creating a differnet player character just for that and using another response menu that I defined for that character but the current conversation gets restarted when the second conversation is triggered and all choices and subtitles are doubles after that. Also, the main conversation ends when the second one ends, which we don't want to happen.

It's possible to have a certain system like that outside of the dialogue system but I'd prefer if we had it in the system and wrote it in articy.
User avatar
Tony Li
Posts: 22049
Joined: Thu Jul 18, 2013 1:27 pm

Re: Custom UI + Articy Integration

Post by Tony Li »

Hi,

To allow simultaneous conversations, you can tick the Dialogue Manager's Other Settings > Allow Simultaneous Conversations checkbox. However, the actors and UIs must be different between the conversations.

If you need to use the same NPCs and Player, and the same subtitle UI, then it should be the same conversation. You can still show the responses in different areas. This thread contains a discussion of showing an extra menu alongside the regular response menu.
Post Reply