Yarn Import merge with current database

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
zaqsway
Posts: 4
Joined: Wed Sep 04, 2024 2:00 pm

Yarn Import merge with current database

Post by zaqsway »

Hello,

Not sure if this has been covered already so apologies if it has.

I have implemented some dialogue and logic through Yarn, and some were created through Dialogue System.
I want to update something through yarn and then import it into Dialogue System without overwriting what I've written in Dialogue System.
Is this possible or do I have to re-do everything I did in Dialogue System once I import the Yarn changes?

Looking through some other posts I am thinking it's not possible to merge the two but I just wanted to ask to be sure.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Yarn Import merge with current database

Post by Tony Li »

Hi,

It's possible but not easy.

In the future, I recommend having one "single source of truth" for your conversation data. If you're using Yarn, it should be Yarn. Then you only need to import Yarn into a dialogue database without worrying about overwriting anything.

If you do need to make some content editable in the Dialogue Editor, I recommend making a second dialogue database. You can set this dialogue database's Base ID to a high value such as 10000 so it doesn't conflict with the IDs that the Yarn import process assigns. See Working With Multiple Databases for info about using 2+ databases.

If your database has data that you can't recreate easily by hand in Yarn, you can try to merge it into your Yarn database using the Dialogue Editor's Database tab > Merge Database feature.
zaqsway
Posts: 4
Joined: Wed Sep 04, 2024 2:00 pm

Re: Yarn Import merge with current database

Post by zaqsway »

Thanks for the quick reply!

I will be sure to stick to one method going forward.
Thanks for the options, I tried merging and it seems to have worked so I think I'll stick with that and move forward with a singular method.


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

Re: Yarn Import merge with current database

Post by Tony Li »

Glad to help!
zaqsway
Posts: 4
Joined: Wed Sep 04, 2024 2:00 pm

Re: Yarn Import merge with current database

Post by zaqsway »

Hi Tony,

I just have a quick question about another issue I'm having when importing from Yarn.

When I import the updated Yarn files it seems to break something with the interactions in the game.
For example, playing as the main character I can no longer start conversations with the NPCs in the game.

When I import I select Overwrite and Merge Variables. I have tried it without merging variables and without overwriting but since that creates a new dialogue database, when I assign the new database the interaction is broken again.

Is there a step I am missing? I feel like this might be something really obvious but I'm just missing it. so apologies if it is staring me in the face and I'm just not seeing it.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Yarn Import merge with current database

Post by Tony Li »

Hi,

I don't think anything in the database by itself will break interactions. But it could be contributing to something. Let's first take the approach of figuring out why a specific interaction isn't working. How do you start interactions with NPCs?

If the interaction seems to be starting but not doing anything, have you tried the Logging & Debugging Tips video to identify the GameObjects that are being used as the actor & conversation? The Console might also have some other info or warning messages that could be helpful.
zaqsway
Posts: 4
Joined: Wed Sep 04, 2024 2:00 pm

Re: Yarn Import merge with current database

Post by zaqsway »

Hi,

I think it is an old conversation that is being triggered somehow by default. I realized that when trying to start a conversation (by approaching an NPC and pressing the interact button) the console states another conversation is already happening so it cannot start another.
I'm currently working on debugging this.

Thanks for your suggestion about the logging and debugging, it was helpful to see what exactly was happening behind these scenes so I can work on figuring this out.


Thanks!
Post Reply