Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Is there an easy way to use stretchtext in 2.0?

Hey there!

I'm a newbie and I started off with the online editor, it's very nice and simple, but I can't find any "stretchtext" story format. The editor offers me just three basic ones, that are all the one-passage-per-page kind. I read in wiki about the Jonah format, but it apparently isn't ported to 2.0 yet.

Is there any easy way to add this feature to some story format? I am using Harlowe and like the simplicity. I just would like the new passages to appear under the old ones, instead of replacing them. I know javascript, jQuery etc, but before digging deep into the code, I rather ask and save some nerves :)

Thanks!

Comments

  • note: I am not one of the developers that maintain the story formats, they may have a better answer to your question than mine.

    I believe the simple answer is no, not without replacing parts of render sub-system built-into each of the story formats because they each delete and then recreate the area that displays the current passage.

    Extending the engine (or replacing parts) of both Snowman and SugarCube is possible within your story's Story Javascript area, unfortunately this is currently not the case with Harlowe. I believe you would need to fork the Harlowe project to modify how it renders.

    I believe the three main issues you are going port Jonah to Twine 2:

    1. The Twine 2 build system uses different substitution markers then Twine 1 to insert story meta data into the generated file. ex. T1's "STORY" became {{STORY_DATA}} in T2

    So the markers in the Jonah header.html file would need to be changed to match T2.

    2. Twine 1's build system used to assemble the different parts of the story's javascript engine when the story HTML was built/generated, this is not the case in Twine 2.

    So you would need to embed the different JS files into the header.html file before you created the format.js file required by Twine 2.

    3. The structure of the {{STORY_DATA}} area within Twine 2's generated story HTML file is different to what it was in Twine 1.

    So you would need to modify the Jonah runtime engine to handle the different structure.
  • edited May 2015
    greyelf wrote: »
    note: I am not one of the developers that maintain the story formats, they may have a better answer to your question than mine.

    I believe the simple answer is no, not without replacing parts of render sub-system built-into each of the story formats because they each delete and then recreate the area that displays the current passage.

    Extending the engine (or replacing parts) of both Snowman and SugarCube is possible within your story's Story Javascript area, unfortunately this is currently not the case with Harlowe. I believe you would need to fork the Harlowe project to modify how it renders.

    I believe the three main issues you are going port Jonah to Twine 2:

    1. The Twine 2 build system uses different substitution markers then Twine 1 to insert story meta data into the generated file. ex. T1's "STORY" became {{STORY_DATA}} in T2

    So the markers in the Jonah header.html file would need to be changed to match T2.

    2. Twine 1's build system used to assemble the different parts of the story's javascript engine when the story HTML was built/generated, this is not the case in Twine 2.

    So you would need to embed the different JS files into the header.html file before you created the format.js file required by Twine 2.

    3. The structure of the {{STORY_DATA}} area within Twine 2's generated story HTML file is different to what it was in Twine 1.

    So you would need to modify the Jonah runtime engine to handle the different structure.

    I wonder why nobody haven't done this already. I played some game in Jonah before and it was very nice, it really felt like the story is being written.

    The porting thing doesn't look too difficult, but I already started doing the game I wanted it for in the one-passage-per-page format, so I do not need it now.

    Still I think it would be very nice of me (or anyone else), if I did that, because I just recieved (made a game that I find fun) and I could give something back. Yet I am slightly afraid that it really could get difficult and I would give up, because I would lack the motivation to complete it.

    How long do you think it would take, and do you think that someone else would find this handy? I will also create separate question for this.
Sign In or Register to comment.