Page 1 of 5

Yarn 1.2.7

Posted: Sun Aug 14, 2022 5:05 pm
by gblekkenhorst
I have read that the system currently only works with Yarn spinner 1.2.7 - is there a link to this unity package? The YarnSpinner releases page jumps from 1.2.6 to 2.0. 1.2.6 throws errors for me. Thanks!

Re: Yarn 1.2.7

Posted: Sun Aug 14, 2022 8:20 pm
by Tony Li
Hi Gillian,

The Yarn Spinner integration should work with any Yarn 1.2.x version. (Maybe they pulled 1.2.7 for some reason?)

Have you tried installing Yarn Spinner using these instructions?

What errors does 1.2.6 throw?

Re: Yarn 1.2.7

Posted: Mon Aug 15, 2022 12:06 pm
by gblekkenhorst
I reimported it, and now it is showing no errors. I think I rejected updating the line endings last time, that was probably causing the errors. Sorry! It works great.

Another question - is there a way that currently exists to use a command in yarn to set the 'links to' another conversation? The yarn documentation uses <<jump NewNode>> to link one conversation node to another. I have not looked into writing a custom command myself yet, just wondering if it exists. I'd only be using it to keep my root conversation neat, jumping to different conversations based on the state of variables.

Re: Yarn 1.2.7

Posted: Mon Aug 15, 2022 12:42 pm
by Tony Li
Hi,

No need for <<jump>>. See Jumps.

Re: Yarn 1.2.7

Posted: Mon Aug 15, 2022 12:51 pm
by gblekkenhorst
Amazing! I should know this, I've been using Yarn spinner and twine for ages.

Re: Yarn 1.2.7

Posted: Mon Aug 29, 2022 7:27 pm
by gblekkenhorst
I'm trying to design a workflow for using Yarn import - I have hub passages that check variables to see which options should be displayed. I want some choices to only be displayed if a certain variable is true.

Code: Select all

    -> Naomi: My mom's friend George John found me this car, but it's kind of in rough shape?  
        [[Debbie/Car]]
    -> Naomi: How's Eddie?
        [[Debbie/Eddie]]
<<if $chilliQuest is 0>>
    -> Naomi: What is that delicious smell?
        [[Debbie/Smell]]
<<endif>>
What I want is for all three options to be displayed if chilli quest is 0, but what's happening is that when chilliquest is 0, only the third option is displayed instead of all three.

I also have an issue that pulling in the yarn file resets all my variables to 0. I have certain variables that need to be set to a higher number at the start of game play - is there a way to define this in the yarn file?

Re: Yarn 1.2.7

Posted: Mon Aug 29, 2022 8:27 pm
by Tony Li
Hi,

I'll need to research both of those questions and get back to you tomorrow or the next day at the latest.

I believe the first one ($chilliQuest is 0) should work the way you describe, so that may be a bug.

I'm not yet sure of the best way to initialize Yarn variables. I have a few ideas, but I need to test them out first.

Re: Yarn 1.2.7

Posted: Mon Aug 29, 2022 8:36 pm
by gblekkenhorst
It brings in the options like this - the "what is that delicious smell" node should be branching from the start node, and only run if chilliQuest is 0.

Image

I would be fine to build the hub in Dialogue System instead of Yarn, but I can't import the yarn file without overwriting the Hub conversation. And if I delete the hub conversation and select 'merge' in the import options, I get an error message, which I've figured out is because it won't import a yarn file if it's missing any references.

Just saw your reply - thanks for looking into it for me!

Re: Yarn 1.2.7

Posted: Thu Sep 01, 2022 8:07 am
by Tony Li
Hi,

Try this format instead:

Code: Select all

-> Naomi: My mom's friend George John found me this car, but it's kind of in rough shape?  
    [[Debbie/Car]]
-> Naomi: How's Eddie?
    [[Debbie/Eddie]]
-> Naomi: What is that delicious smell? <<if $chilliQuest is 0>>
    [[Debbie/Smell]]
It should produce this conversation tree:

yarnConditional.png
yarnConditional.png (946.79 KiB) Viewed 2155 times

The explanation from our Yarn expert regarding your original example is: "Lines 1-4 are the start of a shortcut options block. You cannot have that kind of an if block [lines 5-8] in the middle of a conditional options block. As soon as Yarn sees line 5, it terminates the shortcut options block from lines 1-4. So lines 5-8 are a wholly separate shortcut options block surrounded by the if statement starting at line 5."

I'll try to have an answer to your second question (initial values of variables) later today.

Re: Yarn 1.2.7

Posted: Fri Sep 02, 2022 8:35 am
by Tony Li
This patch adds a 'Merge Variables' checkbox to the Yarn Importer window. If you tick this checkbox, then importing from Yarn will not overwrite variables values in your dialogue database.

DS_YarnPatch_2022-09-02.unitypackage