hylyh / bondage.js

Javascript-based parser for the Yarn dialogue tree markup language
https://www.npmjs.com/package/bondage
MIT License
57 stars 21 forks source link

Single option is working like a jump, not an option #64

Closed ghost closed 4 years ago

ghost commented 4 years ago

The syntax quick reference and the "controlling dialogue" sections of the YarnSpinner docs do not mention anywhere that a single option should be the equivalent of a jump. bondage js is skipping single options as if they are a jump.

A jump has the format [[nodeName]]. Similar to an option, but only contains a link to another node, without providing a text choice for the player.

I think that currently, the code that does this is on runner.js line 149.

blurymind commented 4 years ago

Is that what yarnspinner has for spec?

On Mon, 20 Jul 2020, 21:05 alforno, notifications@github.com wrote:

The syntax quick reference and the "controlling dialogue" sections of the yarn docs do not mention anywhere that a single option should be the equivalent of a jump. bondage js is skipping single options as if they are a jump.

A jump has the format [[nodeName]]. Similar to an option, but only contains a link to another node, without providing a text choice for the player.

Think that currently, the code that does this is on runner.js line 149.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hylyh/bondage.js/issues/64, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRWVLODOPJKFVROZFTTLTR4SPR7ANCNFSM4PCXTQBA .

ghost commented 4 years ago

Yes. The docs say [[description|nodeName]] for an option and [[nodeName]] for a jump. There is nothing stated in the docs that say a single option in a node is the same as a jump, or at least not that I could find. For now, I just changed that line of code in my local copy of the the js file, but wanted to let you know what I found. Regards.

ghost commented 4 years ago

Just in case you are looking for the info regarding jumps, it's at this link: https://yarnspinner.dev/docs/writing/controlling/

blurymind commented 4 years ago

yes indeed this was causing some confusion with gdevelop users as well. It would be nice if someone does a pr to change the behaviour :)

On Wed, Jul 22, 2020 at 1:24 AM alforno notifications@github.com wrote:

Just in case you are looking for the info regarding jumps, it's at this link: https://yarnspinner.dev/docs/writing/controlling/

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hylyh/bondage.js/issues/64#issuecomment-662172846, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRRWVLMOREP673XPURZGH3R4YWU5ANCNFSM4PCXTQBA .

ghost commented 4 years ago

There are some downstream effects of my changes, one is that it invalidates the distinction "named option", since all options are named. An option without a name is called a Jump. It might take a little time to unravel this and get tests passing again.

ghost commented 4 years ago

68 The tests are now passing and the new pr submitted.

[edit: pointed to new pr]

blurymind commented 4 years ago

thank you for this. Hope @hylyh gets some time and review this. Its very welcome