This PR migrates the importer from the TwineJson Twine format to the Twison Twine format (in response to #93).
It also allows users to select the destination for their story prefab (instead of just putting it in the Assets/Ignored/ directory. Also, the prefab is now named after the title of the Twine story, instead of just being called Story.prefab.
Here's what the new importer looks like:
There are a few other things to note about this change:
You no longer use a .json file to import the story -- now you copy and paste the json code. This is because the Twison exporter simply creates a page with all the json text and the easiest way to import it is to copy and paste it, rather than copy and paste it into an intermediary file.
We now support "alias" child names for children nodes. For example, in one of the complex workhouse Twine stories, all the nodes are titled things like Righteous01 or 6:00am. When those nodes are linked to, though, they use the Twine syntax [[Get up and get ready->Righteous01]]. This links to the twine node titled Righteous01, but it does so with a link that says "Get up and get ready." I added support for these child-name "aliases" in this PR.
Okay I fixed up some things (brace yourself for huge screenshots):
Default text in JSON text area that suggests you copy and paste into it
A little JSON validation to make sure you're putting the right format into the textbox. Looks like this when it's invalid:
A paste from clipboard button! Works perfectly!
It turns out that we were making the first twine node in the import list be the start node. Well, that's not always how a story is created! Now we explicitly use the startnode field from the JSON to find the right node to activate first.
This PR migrates the importer from the TwineJson Twine format to the Twison Twine format (in response to #93).
It also allows users to select the destination for their story prefab (instead of just putting it in the
Assets/Ignored/
directory. Also, the prefab is now named after the title of the Twine story, instead of just being calledStory.prefab
.Here's what the new importer looks like:
There are a few other things to note about this change:
Righteous01
or6:00am
. When those nodes are linked to, though, they use the Twine syntax[[Get up and get ready->Righteous01]]
. This links to the twine node titledRighteous01
, but it does so with a link that says "Get up and get ready." I added support for these child-name "aliases" in this PR.