Creating a database for the dialogues

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
will_888
Posts: 26
Joined: Mon Feb 07, 2022 4:09 am

Creating a database for the dialogues

Post 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!
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a database for the dialogues

Post 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 447 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 447 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.
will_888
Posts: 26
Joined: Mon Feb 07, 2022 4:09 am

Re: Creating a database for the dialogues

Post by will_888 »

Thank you so much for the support, I've fixed this problem :)
User avatar
Tony Li
Posts: 21981
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a database for the dialogues

Post by Tony Li »

Great! Happy to help.
Post Reply