Page 1 of 1

Creating a database for the dialogues

Posted: Mon Feb 14, 2022 3:32 pm
by will_888
Hello!
I'm trying to make a specific kind of interaction in the game where the Player talks with an NPC.

Then, the name of the NPCs you talked with is registered inside a Diary (which is made with the Unity UI Canvas). The diary should also register and show a variable (for example: you gave a certain answer to the character/you gave a certain item to the character).

How can I make the Canvas and the Dialogue System communicate? I'm using Playmaker, so I would like to use that to simplify things. However, I can also work with code.

Thank you so much in advance and I hope I was clear about the request!

Re: Creating a database for the dialogues

Posted: Mon Feb 14, 2022 4:26 pm
by Tony Li
Hi,

If you aren't already using the quest system, I recommend using it for your diary. Make a quest with entries like this:

diary1.png
diary1.png (42.68 KiB) Viewed 477 times

It has a quest entry for each NPC. The main quest is active, and the entries are unassigned at start.

In each NPC's conversation, set the corresponding quest entry to success or active:

diary2.png
diary2.png (37.89 KiB) Viewed 477 times

The main quest state should be active, but the entries can be active or success. The only difference is how they appear in the quest log window. (Active and successful entries can use different text templates.)

So there's no need to work with code. Just show the quest log window when the player wants to see the diary. You can style the quest log window UI to look however you want.

Re: Creating a database for the dialogues

Posted: Fri Feb 25, 2022 4:23 pm
by will_888
Thank you so much for the support, I've fixed this problem :)

Re: Creating a database for the dialogues

Posted: Fri Feb 25, 2022 4:26 pm
by Tony Li
Great! Happy to help.