I've been using yarn2 with dialogue system. I'm at a point where I've just been making small tweaks to the wording, etc - but whenever I update dialogue in the yarn script and import it again to dialogue system (using the overwrite function), it removes all the portrait sprites from the characters. It also remove all quests, etc.
Is there any way to preserve the portraits/quests when updating the yarn dialogue? Maybe a way to save that information in the yarn file somehow so that when it overwrites it overwrites with the same settings? Or is this just something I'll have to do every time I re-import the yarn files?
Yarn2 Import Overwriting issues
Re: Yarn2 Import Overwriting issues
Hi,
The importer is designed with the idea of keeping one authoritative source for your dialogue content -- in this case, Yarn. Otherwise it can become a versioning nightmare with some changes in Yarn and others directly in your dialogue database.
I just noticed that the Yarn importer, unlike most of the other importers, doesn't set up portrait images. I'll fix that in the next update and send you a patch before then. Then you'll be able to put your actors' portrait images in a folder in your project, and the import process will automatically assign them to the actors in your dialogue database.
Alternatively -- or to include other info in dialogue databases -- you can create a second dialogue database for editing directly in Unity. In the Dialogue Editor's Database section, set this database's Base ID to a high value such as 1000 so its internal IDs won't conflict with the internal IDs that the Yarn importer assigns to the Yarn-imported database. Then you can add your quests to this database. Add an Extra Databases component to your Dialogue Manager, and assign this database to it.
The importer is designed with the idea of keeping one authoritative source for your dialogue content -- in this case, Yarn. Otherwise it can become a versioning nightmare with some changes in Yarn and others directly in your dialogue database.
I just noticed that the Yarn importer, unlike most of the other importers, doesn't set up portrait images. I'll fix that in the next update and send you a patch before then. Then you'll be able to put your actors' portrait images in a folder in your project, and the import process will automatically assign them to the actors in your dialogue database.
Alternatively -- or to include other info in dialogue databases -- you can create a second dialogue database for editing directly in Unity. In the Dialogue Editor's Database section, set this database's Base ID to a high value such as 1000 so its internal IDs won't conflict with the internal IDs that the Yarn importer assigns to the Yarn-imported database. Then you can add your quests to this database. Add an Extra Databases component to your Dialogue Manager, and assign this database to it.
Re: Yarn2 Import Overwriting issues
Hi Tony! Thanks for the help. I've added an external database with my quests and connected it with the Extra Databases component, but I'm running into an issue where I can't seem manage them with Lua from the first database's conversations.
So now, I have two databases:
[*]Yarn Dialogue Database
[*]Quest Database
But when I try to add a script to the end of a conversation in Yarn Dialogue Database, for example to set a quest as Active after a conversation, I can't reference any of the quests in the Quest Database.
Do you know if there is a workaround to this without having to merge databases?
So now, I have two databases:
[*]Yarn Dialogue Database
[*]Quest Database
But when I try to add a script to the end of a conversation in Yarn Dialogue Database, for example to set a quest as Active after a conversation, I can't reference any of the quests in the Quest Database.
Do you know if there is a workaround to this without having to merge databases?
Re: Yarn2 Import Overwriting issues
Hi,
You shouldn't need to merge databases. What do you mean by "add a script to the end of a conversation in Yarn Dialogue Database?"
You shouldn't need to merge databases. What do you mean by "add a script to the end of a conversation in Yarn Dialogue Database?"
Re: Yarn2 Import Overwriting issues
When I try to add a Lua script to a conversation in the Dialogue Database (or use the point and click wizard), I cannot reference the quests in the other Quest Database. Attaching a screenshot of the module I'm referring to.
- Attachments
-
- Screen Shot 2024-12-02 at 8.50.22 PM.png (65.07 KiB) Viewed 82 times
Re: Yarn2 Import Overwriting issues
Hi,
Is that a screenshot of a database imported from Yarn? If so, I recommend not modifying it in the Dialogue Editor after importing from Yarn. Otherwise, you'll lose your Dialogue Editor edits when you reimport from Yarn, and also keeping changes in two separate places in a recipe for version mismatches.
Instead, you can put the Lua code right in your Yarn file, like:
That should import into the dialogue database as a proper Lua function in the corresponding dialogue entry's Script field.
Is that a screenshot of a database imported from Yarn? If so, I recommend not modifying it in the Dialogue Editor after importing from Yarn. Otherwise, you'll lose your Dialogue Editor edits when you reimport from Yarn, and also keeping changes in two separate places in a recipe for version mismatches.
Instead, you can put the Lua code right in your Yarn file, like:
Code: Select all
<<SetQuestState "Look At Mirror" unassigned>>