Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electron: Add option to disable auto-creation of nodes #90

Open
rdominick opened this issue Jan 27, 2019 · 12 comments
Open

electron: Add option to disable auto-creation of nodes #90

rdominick opened this issue Jan 27, 2019 · 12 comments

Comments

@rdominick
Copy link

My yarn interpreter has support for function calls instead of node names when making a choice -- i.e., [[Fight!|!e_go]]. Every time I edit a node with this feature in it, a node is created for the function and any choice that calls this function is linked to it, and it kind of makes this version of Yarn unusable for me. It'd be nice to be able to turn it off like the other auto-complete options.

@blurymind
Copy link
Collaborator

blurymind commented Jan 27, 2019

Are you using yarn spinner or bondage.js? Your function call syntax is very odd. We use <<call>> for calls usually.

I am planning to add support for yarn to write a config file where the exectuable is. Then with that config file be able to disable things like automatic node creation for corner cases like yours - all corner cases will be relegated to a config file, so as to avoid cluttering the ui too much. But that is not high on priorities at the moment, you are probably the only person in the universe who uses node connection syntax to call functions.

Alternatively I can add a rule to yarn to not auto-create a new node if in its name has a <<call>> pattern, but that would also mean that you have to change your interpreter and all the strange calls to be
[[Fight!|<<!e_go>>]]
Will you be ok with that?

In any case, you can submit a pull request if you want to add the option to disable it :)

I can look into this once I finish I few pulls on gdevelop

@rdominick
Copy link
Author

rdominick commented Jan 27, 2019

I'm using a Yarn interpreter that I implemented in Godot. It has the ability to load multiple yarn files at once and call nodes in any of them. I have an 'os' yarn that holds base functionality -- but even if I created an "os_e_go" node there, the editor would create an empty node in any yarn that called it.

I'd be more than willing to use the call syntax -- it's clearer, in any case, and I can just use a temporary interpreter node to run it.

One of the great points of yarn, from a toolkit standpoint, is that it leaves the disposition of output and choices to the calling program. An assumption that the target of a link has to be a node is a bit limiting.

In any case, thanks for looking at this.

@rdominick
Copy link
Author

Oh, yeah, and trust me -- as a total Javascript newbie, you wouldn't want any pull requests from me!

@blurymind
Copy link
Collaborator

blurymind commented Feb 4, 2019

Can you link us to your interpreter,
I plan to add links to other interpreters for yarn files in different game engines. We need to stop giving unity complete monopoly over this :)

Please when you write and share plugins to interpret yarn files, follow the syntax rules. I quickly learned that we need to follow them, especially to be compatible with bondage.js and yarnspinner. The more consistent we are across the board, the better for the file standard

@rdominick
Copy link
Author

Oh, dangit, I came here to post about how it's not ready for use and it's not going to support dialog shortcuts anyhow, and then I thought of a nifty dumb way to get them to work and grr. If I can get that to work and I can get some sort of error messaging going and tighten down the type checking for operators to a sane level, I'll open up the repository.

@blurymind
Copy link
Collaborator

blurymind commented Feb 5, 2019

sweet =)
The more engines we get to work with yarn the better. In any case, I will try to update the main page a bit to invite for other devs to submit to us their interpreters. It would be good to get Yarn to work on other game engines. Unity should be just one of many options - it will help us spread its adoption

blurymind referenced this issue Feb 7, 2019
@blurymind
Copy link
Collaborator

blurymind commented Feb 7, 2019

@rdominick I added this now via:
35b1663

Download and build the latest from the electron branch, then extract this to your windows home folder:
C:\Users\YOU
.yarn-story-editor.ini.zip
and set it to false

@rdominick
Copy link
Author

This works well, too. I've even added another option in my local copy: to turn off the preview mode altogether. I just want to see the code I've written as it is.

Thanks for this.

@blurymind
Copy link
Collaborator

blurymind commented Feb 8, 2019

Please do a pull request and will see to merge it :)

@blurymind
Copy link
Collaborator

ok scrap that for now, I am going to replace the ini file with a json one - to make it easier to maintain

@rdominick
Copy link
Author

I'll hold off until I see that as a commit, then.

@blurymind
Copy link
Collaborator

@rdominick give it a try now :)
The json file should be automatically be created after starting and closing yarn for the first time. In it you will find the same variable which can be used to disable automatic node creation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants