Solved: Player portrait is only changed for Response Panel

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Thistis
Posts: 27
Joined: Sat Oct 05, 2019 5:05 pm

Solved: Player portrait is only changed for Response Panel

Post by Thistis »

Hello,

I was trying to use different actor images with the Focus Dialogue UI depending on the answer of the player and I failed :/
For NPC, it was working fine:
I added a second picture for the NPC with Portrait Textures, showing a number [2] below the actor entry in the Dialogue Database.

Image

Then I added the [pic=2] markdown in for both dialogue texts (english + german translation) and it worked fine
Image

I tried to do the same for the actor, added a texture, which resulted in number [2] and added it into the dialogue.
But the picture never showed up. I then tried to use the Sequencer command, which worked but it seems it only changes the actor image for the response panel, but not for the subtitle panel?
Image
Whenever my actor is choosing a response, the actor image is now [2]. If I chose an answer and the NPC will continue its dialogue and the image will revert to the previous one. After clicking continue, the image changes back to the new image [2].
(

(Please don't mind the subtitles text that is currently see through because of the transparent background image for the dialogue, that is a whole other issue I will ask in a separate thread :))

All the best,
Evelyn
Last edited by Thistis on Sat Dec 07, 2019 8:01 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player portrait is only changed for Response Panel

Post by Tony Li »

Hi Evelyn,

I posted this example scene in your other thread, too:

DS_FocusAndPortraits_2019-12-05.unitypackage

Try assigning only the Portrait Textures list or the Portrait Sprites list, but not both. In the example scene, I only assigned images to the Portrait Sprites list. If you have images assigned to both lists, the Dialogue System may be getting confused.
Thistis
Posts: 27
Joined: Sat Oct 05, 2019 5:05 pm

Re: Player portrait is only changed for Response Panel

Post by Thistis »

Hello Toni,

I just tried the testscene and there it worked fine.
I changed the pictures for the player character in it to mine and it also worked.

In my project, I then removed the portrait textures from my player character and only left the portrait sprites added. I started the conversation again, but unfortunately the problem still persists. When the NPC is talking, the player profile switches back quickly to the previous image (pic=1). At this point, I have changed my Standard Dialogue UI to your working version where I can see the transparent background + text dissolve correctly, to make sure it is not a problem with the dialogue template.


As you can see, the portrait of the player reverts to pic=1 the moment, the NPC is talking for the second time.

Next steps I tried:
- Create a new actor to make sure that no old files might be causing issues and only assign sprites to it -> same result
- Recreate your exact conversation and start it with the new player actor -> same result
- In my scene, the dialogue system trigger had an actor and conversant assigned. I saw that this was not the case in your test scene so I removed both GameObjects from my scene as well -> same result
- Testing in general with SetPortrait and pic=. This works perfectly fine for other actors, it seems to only fail for me for the player actor. Also the pic=# command doesn't work for the player (it just doesn't do anything)
- Prolongued the dialogue to see how it would behave it NPC spoke again -> Player portrait temporarily switched back to pic=1, then to pic=2 when Player was talking -> see video below




My settings:
Scene - Dialogue System Trigger script, attached to Player Pet GameObject
Image

Player - Actor settings in Dialogue Manager Database
Image

Test-dialogue in conversation, where portrait image should be switched
Image

Dialogue UI
I exported your Focus Template Standard Dialogue UI GameObject from your testscene, imported it as new asset and assigned it as template to my Dialogue Manager instance as Dialogue UI, so no changes here :/
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player portrait is only changed for Response Panel

Post by Tony Li »

Hi,

Would it be possible for you to send a copy of your project to tony (at) pixelcrushers.com? I don't know why that's happening. In fact, I want to apologize for always taking the longest time to reply to your forum threads. They're stumping me, too, so I've been thinking them over for a while before replying.
Thistis
Posts: 27
Joined: Sat Oct 05, 2019 5:05 pm

Re: Player portrait is only changed for Response Panel

Post by Thistis »

Update:
I could reproduce the bug in your test example.
Try to set the option "Skip PC Subtitle After Response" to checked in Dialogue Manager -> Subtitle Settings.

When I set this option to checked, the error also happens in your test scene.
User avatar
Tony Li
Posts: 22034
Joined: Thu Jul 18, 2013 1:27 pm

Re: Player portrait is only changed for Response Panel

Post by Tony Li »

Hi Evelyn,

This patch should fix the issue:

DS_SetPortraitPatch_2019-12-06.unitypackage

In the situation you described, the SetPortrait() command cut out too early after updating the speaker's (NPC's) panel but not the listener's (player's) panel. Now it makes sure to update all applicable panels.

This fix will also be in version 2.2.4.
Thistis
Posts: 27
Joined: Sat Oct 05, 2019 5:05 pm

Re: Player portrait is only changed for Response Panel

Post by Thistis »

Hello Toni,

thanks a lot, the patch helped and now it is working as expected. :)
I only found one more minor issue that is also reproducable in your example and opened a new topic for it:
[url = https://www.pixelcrushers.com/phpbb/vie ... f=3&t=2763]Dialogue Player Portrait flickering[/url]
All the best,
Evelyn
Post Reply