Coder Social home page Coder Social logo

yarn's People

Contributors

alecholowka avatar alistairwoodcock avatar blurymind avatar brainblasted avatar chetrippo avatar desplesda avatar grizeldi avatar infiniteammoinc avatar julsam avatar kaosumaru avatar prayagverma avatar qworg avatar rickdoesdev avatar seiyria avatar simianlogic avatar subliminalman avatar tekknobabblr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yarn's Issues

Support for Twee Setter Links?

Twine supports a more robust version of a link called a setter link, which assigns variables at the time a jump is made. Importing a twee file using these links, however, doesn't show the links, and YarnSpinner (for example) also cannot parse them. Is there planned support? If there is not, was this decision made explicitly, or would there be interest in this feature?

Thanks for all your hard work on this project!

auto complete node names

would be nice if when typing [[ click here | NODENAME ]] that NODENAME would suggest-complete if NODENAME exists, or error underline if it didn't. Similar to using a code editor.

Please put the build zip in a folder

Its really frustrating when I extract something in my downloads folder and the contents go everywhere because the files were not zipped inside a folder. Please consider this and update the latest build.

CDATA Format for body in XML export

It would be helpful to have a CDATA container on the body element within the XML format so that angled brackets can be used without making the XML poorly structured.

The highlighting of conditionals/code snippets contained in <<>> is very helpful and a good way to have inline code, but it's a bit of a problem when using Yarn as a way to generate XML files, as angle brackets are interpreted by most parsers as starting or ending a tag.

If the whole thing is in a CDATA container then any characters can be used and XML parsers will know to treat the whole thing as a block of characters rather than interpreting angle brackets as markup.

Colored Node Titlebars

It'd be cool to be able to colour code nodes for easy visual organization. :)

Going to think about how to approach this...

Node deselection behaviour

  • Clicking on a node once should select it, and deselect any other nodes.
  • Clicking on the background should deselect all nodes.

(Currently, if you drag a box around nodes, the only way to deselect them is to drag another box, and select either different nodes or no nodes. There's no other way to deselect nodes, I think?)

Cannot build executable on latest electron commit

Made sure to update npm and node. Runs fine with npm start but npm run-script build outputs

C:\Users\jjpma\Desktop\Yarn\node_modules\read-config-file\out\main.js:72
async function readConfig(configFile) {
^^^^^^^^
SyntaxError: Unexpected token function
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at _readConfigFile (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:10:1)
at Object.args [as handler] (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:45:5)
at Object.runCommand (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\lib\command.js:235:44)
at Object.parseArgs [as _parseArgs] (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\yargs.js:1042:24)
at Object.get [as argv] (C:\Users\jjpma\Desktop\Yarn\node_modules\yargs\yargs.js:957:21)
at Object. (C:\Users\jjpma\Desktop\Yarn\node_modules\electron-builder\src\cli\cli.ts:19:1)
at Module._compile (module.js:570:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\jjpma\AppData\Roaming\npm-cache_logs\2018-07-16T22_01_20_678Z-debug.log

Support for voice overs

Hi all! I'm very impressed about this project. I've been trying for some time to devise a flexible yet simple dialogue system for our adventure game Asylum which also integrates with Unity; it never occurred to me that Twine was the answer, but I can see how it makes much sense. After a few tests, I'm ready to adopt Yarn. It's really neat how you can go from simple conversations to very complex systems with the same editor and small base code.

Anyway, I'd like to contribute in any way I can. If you don't mind, I'm going to open a few suggestions/ideas to consider (maybe this is better suited for a wiki but I don't see one).

As I see it, the main drawback in the project right now is lack of support for voice overs. Currently, it would be cumbersome to build a custom system on top of Yarn. Ideally, I think the editor should have an option to collect all strings and automatically assign a string ID to them. Only problem is how these IDs could be retrieved by something like DialogueImplementation.cs. The only information pertaining to the line we can get is pure text, which can't be used to match a filename containing the corresponding audio.

That is, unless I'm missing something. Thoughts?

ported Yarn to Electron

For anyone interested, there are a couple of small things to change to get it to work, but it works ๐Ÿ‘

I can do a pull request if Yarn's creators are interested :)

Handling facial expressions

It would be nice to have some way to trigger facial expressions in our characters. I was thinking that maybe tags were the answer but this is not feasible; tags are useful for editing the dialogue but I don't see how we could reuse them in our respective implementations as they're specific to each node (which contain several lines of dialogue).

Rather, a system could be devised in which we insert certain string codes in each line. I'm thinking something like this:

Frank: [frown]Why not?

All that would be needed then is to pass this expression (if available) to Say() like this:

public IEnumerator Say(string characterName, string text, string expression)

It's trivial then in Unity to trigger the respective blendshape or whatever is being used to animate character faces.

I guess the developer could implement this system separately, but I believe this is useful enough that it could be added to the main app.

Brackets cause issues with inputted text

Sorry for the weird title. To avoid confusion, I've attached a screenshot to hopefully explain the problem better.

My game uses a tag system of its own for identifying characters and objects, such as [[PLAYER_NAME]]. Coincidentally, you guys use the same scheme for indicating branching dialogue. This has caused a small issue, as you can see in the screenshot.

A simple solution is to just have it identify the last set of brackets for indicating branching dialogue, rather than having it select the first.

Thank you for your time! And the software works, looks, and feels great!

yarn bug

Lag in large yarn file when repositioning cursor

Using yarn in windows 10. Roughly 20k words and 50 nodes. Scrolling and moving around works well / smoothly, as does creating connections. However, double clicking on a node to open it has a noticeable lag, and repositioning the cursor via mouse click in a node has noticeable lag. Writing is completely smooth. Has anyone else experienced this?

Having Trouble Saving Anything

So if I open Yarn in either NW.js or my browser, I can write out the dialogue tree I'm working on just fine, but whenever I go to save I get the four file type options but none of them save anything. In NW.js, if I click save as _____ it opens a separate window with a word document of my tree in it and will not save the file type I request.

Mouse-wheel actions for Zoom and Scroll aren't contextual, happen simultaneously

Simple little bug/quality-of-life feature. If a node has enough text in it, a scrollbar will appear while the mouse is hovering over the node. But if you use your mouse-wheel to scroll through the text field, it'll also zoom in/out.

yarnzoomscroll

It'd be nice if Yarn didn't zoom while the mouse is hovering over a scrollable text field.

Idea: Bundle yarn with gdevelop - a great open source game engine

Gdevelop is an incredibly fun and user friendly open source game engine that allows even people with no programming knowledge to create games.
https://gdevelop-app.com/
For programming it uses event sheets - similar to the ones in construct2 and clickteam fusion.
events 88952ff1

Now the reason for this proposal is gdevelop's new editor. I have been making some contributions to it lately and learning it's design - because it is written in javascript, using electron.

The editor is very user friendly, but it lacks storytelling tools - one has to make a story system in it from scratch (even with event sheets).

Since both Yarn is web based and gdevelop's new editor is web based- I can try bundling yarn in it. But to do it, Yarn needs to be ported over to electron.
I already ported yarn to electron for a personal project myself- and got it to communicate with my app- so that is out of the way. I had to however change some of the code and add code to get it to work and open and save files like before.

I am thinking of using the excellent bondage.js for the story parsing part
https://www.npmjs.com/package/bondage
Many thanks to @jhayley for implementing it!

Posting here to see if there is community interested in this :)

Would you guys be interested to use yarn in an engine that is much smaller and easier to use than Unity3d? An engine that is both open source and actually would come packaged with yarn editor built into it?
:)
related issue post: 4ian/GDevelop#511

Scrolling/Panning the file doesn't work on Windows Build

Clicking and dragging on the back of the node area doesn't let you drag the screen around anymore. Seems to only happen with the Windows build.

Scrolling to zoom doesn't seem to work either.

Clicking the area around the node editor window to close it also doesn't work.

Documentation for file formats

I can't seem to find any documentation for the different file formats that Yarn exports. I want to write a library for LibGDX that adds support for the files Yarn exports.

I can get a general idea in data.js but I think it'd be useful to have written documentation somewhere for future developers who want to use Yarn for other languages/frameworks other than Unity. (maybe the wiki?)

I can document them as I go, but I don't know where to put it..

Panning using Alt+Drag produces heavy lag immediately

Problem: When using Alt+Drag to pan the canvas it will work smoothly for ~1 second and then suffer from heavy slowdown. Provided is a screenshot with an example.
yarn_lag
This problem occurs in both master (commit c353da7 at the time of writing this issue), and in the released 2016-08-15 build. I have only confirmed it in Windows.

I opened the devtools and profiled the action, nothing immediately jumps out, there's some garbage collection spikes but only 2 of them within a 5 second timeframe. Everything else seemed consistent across the entire profiling session.

[Question] Is there a way to navigate to a node without a user choice button?

I'm looking for a way to do the following:

<<if visited("SectionA") is false>>
Hi There
*Instead of a line of text, the "next" button takes you to | SectionA.Details*
<<else>>
Remember me?
[[What was your story again? | SectionA.Details]]
[[Yeah, gotta go though! | SectionA.Exit]]
<<endif>>

I can't find any documentation that shows how to make this happen. The best I can find is to present a button on the first pass through as the only user option. It would feel much more fluid if there was only the basic next button on the first visit. Is this possible?

Does opening twee files still work?

Every twee file I have tried to open with the Yarn editor has caused the error "Unknown filetype!". This includes twee files that were exported from the Yarn editor.

However, I was able to open the twee file if it ended in .txt, and while the nodes were all there they had lost all their connections and the syntax for the connections was the same as it had been in twine, which doesn't work in yarn.

Bonus question: What file types can be opened?

Copy/Paste/Undo on Mac don't use command key

For some reason it seems tricky to get the command key to work on Mac. Instead CTRL+C, CTRL+V, CTRL+X, CTRL+Z are being used for now.

An attempt was made to capture the command key into the self.appleCmdKey variable. This seems to be getting set properly, but using it to detect key combos doesn't seem to work yet.

Question about running Yarn as a web page vs an app

Currently, Yarn can be run as a web page, in the browser. This has its good points and bad points - running in a web view means you can link to it directly, and can run it in a browser tab if you like. Some people quite like that.

However, running in a web browser has its downsides: web pages can't access the filesystem, which means that 'saving' really means opening a new page containing the JSON. It also means that it can't use some especially fancy Node.js modules that could lead to some very nice features in the future.

If you run Yarn as an app, you get all the nice filesystem features, plus all of the feature possibilities that that unlocks, but it doesn't run in the browser.

There are some things that I'm poking at that would require running as an app, making running Yarn in the browser not possible.

So, I guess my questions (for both @InfiniteAmmoInc and anyone else who uses Yarn): How big of a deal would that be? Do people prefer to download the builds from the main page? Or do they download the source code and open the index.html?

SetValue turns Number into Bool

Hi guys, I've got:

variableStorage.SetValue ( "$QuestProgress", new Yarn.Value (quest.activeQuestProgress) );

"activeQuestProgress" is an INT, but when I print it it shows up as True. How would I add an INT variable to the Variable Storage? Thanks in advance!

unable to save as json file

after creating a simple dialogue when I click save as json nothing happen. I did not found the json file in the app directory please tell me how to save file as json.

[Windows] CTRL+Z clears a node's contents

Test case :

  • Create a node, add content
  • Exit node
  • Double-click on that same node
  • Hit CTRL-Z
  • Node text disappears, and that operation can't be undone

Before hitting CTRL+Z

image

After hitting CTRL+Z

image

Word wrap in editor?

I'm trying to implement word wrap in the editor window. Been researching for hours now and no luck lol. It seems like it should already be working, based on what I've seen, since Yarn uses "TextArea".

Here's what we're seeing now:

current

And a mock-up of what I'm thinking (how word wrap works in Notepad++, for example):

should

Anyone have any ideas?

"Play" mode?

Would be nice if there were a super simple way to just check out your stories like in Twine. (unless there already is?!)

Command to go automatically from a node to another without options

Hello. I would ask if there is a way to connect two nodes without insert an option that the player must click.
For example, I have:

NODE1
[[Talk with him | NODE2]]
[[HIt him | NODE3]]

NODE2
Hello

I want that from the NODE2, the player returns automatically to the NODE1. Do you know if there's a specific command?

replace current editor with ace editor

The current editor could be replaced with Ace Editor. Questions are:

  • What syntax is there? Preferably, a grammar would help but a bunch of examples can serve that purpose just as well.
  • What colors should the syntax highlighter be?

Exporting back to Twine?

Twine doesn't use the .twee format anymore, so I'm not able to even use the Twee export tool at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.