Integrating example Character Creator into Corgi scene

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
lostmushroom
Posts: 193
Joined: Mon Jul 01, 2019 1:21 pm

Integrating example Character Creator into Corgi scene

Post by lostmushroom »

Hey Tony, I've been looking at this character creator scene and trying to figure out how it works.

https://www.pixelcrushers.com/phpbb/vie ... ion#p17433

I made some changes to it (adding new variables and buttons etc) but I'm having some trouble integrating it into my existing Corgi scene.

I added the Skill Points NPC Subtitle and Menu Panels into my Dialogue Manager and added the Stat Button/Panel canvas to the scene. The Character Creator conversation is set to On Start. But when I play, the text shows up in the Corgi speech bubble instead of the custom panel, I get an error and the buttons don't seem to do anything, so it's all pretty broken. D:
char creator.PNG
char creator.PNG (243.69 KiB) Viewed 873 times
error.PNG
error.PNG (3.92 KiB) Viewed 873 times

I'm not sure where to start trying to figure out what's up with it.
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Integrating example Character Creator into Corgi scene

Post by Tony Li »

Hi,

For the character creator conversation, you'll want to use the regular dialogue UI, not the bubbles that individual characters override. To do this, on the Dialogue System Trigger, set the Conversation Actor and Conversation Conversant to GameObjects that do not have Conversation Zone or Dialogue Actor components -- or, if the GameObjects have Dialogue Actor components, don't assign a custom bubble subtitle panel/menu panel to them. You can use empty GameObjects for this purpose.
lostmushroom
Posts: 193
Joined: Mon Jul 01, 2019 1:21 pm

Re: Integrating example Character Creator into Corgi scene

Post by lostmushroom »

Thanks, that's getting closer. I set both Conversation Actor and Conversant to empty game objects, but the player is still using a bubble. Is there a way to disable that just in this specific case?
char creator2.PNG
char creator2.PNG (662.89 KiB) Viewed 867 times
Another issue is that it doesn't seem to be reading the Skill Points panels. I just copy and pasted them from the example scene, so maybe I missed something in setting them up.
char creator 3.PNG
char creator 3.PNG (399.13 KiB) Viewed 867 times
Thanks for your help (:
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Integrating example Character Creator into Corgi scene

Post by Tony Li »

Hi,

On the empty NPC GameObject, add a Dialogue Actor component. Set the Subtitle Panel Number to the panel number that corresponds to your skill panel.

Temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. Then play the scene and start the conversation. It will log a line similar to:

Dialogue System: Starting conversation 'Title' with actor=XXX and conversant=YYY

Are XXX and YYY the empty GameObjects?
lostmushroom
Posts: 193
Joined: Mon Jul 01, 2019 1:21 pm

Re: Integrating example Character Creator into Corgi scene

Post by lostmushroom »

How do I know which panel number corresponds to the correct panel?

I checked the console, that line seems correct - XXX and YYY are the empty game objects.
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Integrating example Character Creator into Corgi scene

Post by Tony Li »

EDIT: Here's an example scene. It assumes your project already has the DS Corgi integration and Character Creation Example files.

DS_CorgiCharacterCreationExampleFiles_2021-05-13.unitypackage

In the "Character Creation Example" scene, the "CUSTOMIZED Basic Standard Dialogue UI" has three subtitle panels. Panels 0 and 1 are the regular NPC and PC subtitle panels. Panel 2 is the customized panel for the skill points conversation. (You can see the panel numbers by inspecting CUSTOMIZED Basic Standard Dialogue UI's Conversation UI Elements > Subtitle Panels list.)

The example conversation's has a node whose Dialogue Text is: "[panel=2] Set your skill points". The [panel=2] tag tells the conversation to use Panel 2.

In addition, the dialogue UI has a second menu panel build for the skill points conversation. The node that has [panel=2] also has this Sequence: SetMenuPanel(Player, 1)

That Sequence tells the conversation to use menu panel 1 (the custom skill points panel).

It's a bit more complicated to set it with Corgi, though. Since the Corgi integration has overridden the dialogue UI to use overhead bubble panels, we need to tell this conversation to not use those overhead bubble panels.

To do this in the example scene, I used these steps:

1. Added another actor named "OtherPlayer" and ticked its Is Player checkbox.

2. Made empty GameObjects named OtherPlayer and OtherNPC (instead of XXX and YYY).

3. Assigned OtherPlayer and OtherNPC to the Dude-DS1's Conversation Zone > Dialogue System Trigger, and UNticked Conversation Zone > Actions > Player Is Actor.

4. Changed the Sequence in the conversation node to: SetMenuPanel(OtherPlayer, 1)
This is because we want the fake (non-overhead bubble) player to use menu panel 1.

5. In step 3, I unticked Player Is Actor so it wouldn't try to use the regular player GameObject (and its overhead menu panel). However, this means the Conversation Zone doesn't automatically disable player movement during the conversation. To handle this, I added a Dialogue System Events component to OtherPlayer. I configured the OnConversationStart() event to call Dude1's ConversationZone.DisallowMovement and OnConversationEnd() to call UndoDisallowMovement.
lostmushroom
Posts: 193
Joined: Mon Jul 01, 2019 1:21 pm

Re: Integrating example Character Creator into Corgi scene

Post by lostmushroom »

Hey, thanks so much for this. I followed those steps and got it mostly working in my scene.

Only one problem (hopefully the last one) - I previously had the continue button set to Always, but that doesn't seem to be working well with the Skills NPC subtitle panel. I added a continue button to it, but it causes a weird behaviour. Video below:



Is it possible to disable the continue function just for this particular panel?

Thanks again for your help, I really appreciate you taking the time.
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Integrating example Character Creator into Corgi scene

Post by Tony Li »

Hi,

Yes. Set the node's Sequence to:

Code: Select all

SetContinueMode(false)
This will disable the continue button.

Set the "Done" node's Sequence to:

Code: Select all

SetContinueMode(true); {{default}}
This will re-enable the continue button.
lostmushroom
Posts: 193
Joined: Mon Jul 01, 2019 1:21 pm

Re: Integrating example Character Creator into Corgi scene

Post by lostmushroom »

It totally works :D :D

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

Re: Integrating example Character Creator into Corgi scene

Post by Tony Li »

Awesome! Glad to help.
Post Reply