InfiniteAmmoInc / Yarn

934 stars 93 forks source link

Does opening twee files still work? #83

Closed fragmental closed 4 years ago

fragmental commented 5 years ago

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?

fragmental commented 5 years ago

I was using the release version of the yarn editor (2016-08-15) and I tried the latest code. Still has the same problem with .twee files, but I tried exporting a tw2 file and importing it and it seemed to work fine except that the connections were lost. It was weird too, because the syntax was mostly fine, except that one line was missing it's carriage return/new line, and there were some additional spaces at the end of two of the titles(One title had one space, and another title had two spaces). When I fixed those two issues most of the connections return. The remaining connections return when I do something arbitrary like opening and closing the affected node a second time.

The scene is a simple scene with 3 nodes and 4 connections.

julsam commented 5 years ago

Not sure if it's related to #78 & #79 or not 🤔 Can you post your files here (both .twee and .tw2) so i can try to reproduce it?

fragmental commented 5 years ago

TestStory1.zip

Here's a zip file that contains the yarn story in .yarn.txt and a .twee and a .tw2 created with "save as twee" and "save as tw2" in the yarn editor.

I have also tried creating a twee with twine 1.4.2 and it also has the same result in yarn ("Unknown filetype!").

I have tested the twee from yarn editor in twine 1.4.2 and it works fine there. I have not tested the tw2, from yarn, in other software.

fragmental commented 5 years ago

I tested the twee file created with yarn, in tweego and it fails because it's looking for :: StoryTitle. Adding:

:: StoryTitle
(Your Story Title)

to the twee makes it work, though.

Edit: I wasn't able to get the tw2 from yarn to work in tweego, though. It gives an error error: Starting passage "Start" not found. even though the passage is there. I suspect that the tw2 format may be unsupported in tweego. I'm not entirely sure where the tw2 file is supported. Possibly only Twee2.

Maybe @rcuddy knows more, since he added tw2 support

fragmental commented 5 years ago

Discovered something interesting. Renaming a .twee to .tw2 before import seems to work fine, in yarn.

fragmental commented 5 years ago

And I have also confirmed that if I edit the tw2 file, and remove the spaces between the Node name and the position, it then works correctly when I open it with the Yarn editor.

fragmental commented 5 years ago

I have also installed twee2 and tested the tw2 file with it and it works fine, with or without the extra spaces.

blurymind commented 5 years ago

thank you for submitting this report. I have fixed both bugs in my pull here https://github.com/InfiniteAmmoInc/Yarn/pull/80