Howdy, Stranger!

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

Twine Errors/Problems - Max size of TWS file for HTML compiling

jiji
edited November 2014 in Help! with 1.x
I am trying to build a visual novel using Twine and Daz. I've been working on it for the past few months and have encountered the following errors.

1. EOFError - When Twine crashed, I recovered the story test from Notepad ++ which was a time consuming process. Following that I've been archiving HTML builds, just in case. My interest in this is when does Twine save? For example if I saved a file and Twine crashed I should have the option of not saving and re-loading an older (non corrupt) version. Is there an autosave option that can be turned off, to limit chances of corruption? I ask because when I searched for Twine EOFError I found two recent topics in the Forum, both answered by GreyElf.

2. Memory Error in build (HTML compile) -The file is currently 170mb and when I go to build it I get a memory error. I work on the basis the HTML file can be any size, it will just affect the load latency. But what about Twine itself? I have purchased some more RAM (PC needed it anyway) but is there any theoretical maximums for any visual novel author?

UPDATE - I've been playing around with the story and if I chop it to 115mb I can build it, if I make it bigger or use STORYINCLUDES it will give me an memory error. I have added virtual memory on my PC to see if that helps. Is the Python script to blame or my hardware?

Thank you

Comments

  • > 1. When does Twine save?
    From memory the Twine GUI does not have an auto-save option, it only does a save when you use the File > Save (or related Save As) option.
    Because of this I would suggest you save your story TWS file before using the Build > Build Story (or related) option to generate your HTML file if your story contains images.

    > 2. Memory Error when building HTML file.
    To build the HTML file the app currently creates a single string variable that contains everything which will be in the HTML file, this includes all text passage (converted to UTF-8), all CSS passage, all scripts passage, the story format header, and importantly all the base64 image passage. It is generally during the conversion of text passages to UTF-8 or the adding of image passages to the string variable that things die.

    The current Twine 1.x HTML generator is/was not designed for large image based games/stories.

    As a suggestion, use external referenced images if your story/game is going to have MBs of images, though you may not to be able to use the built-in story formats if you do this.
  • greyelf - Thank you

    I asked about the auto-save as I don't recall saving the game over a period when I added a number of images and new passages. I then was working with a couple of other apps which caused the PC to go into meltdown. I tried to close all Apps down and when I fired up Twine again the file was corrupt. After trying to save it (unsuccessfully) I used Notepad++ to extract the text, I then found a third of the story had disappeared from the corrupted file which seemed like all the new content.

    Either way I found a good method to pull text out of a corrupted .tws file.

    With the memory size I guess I have found the maximum size of a Twine file is 115mb (approx.) if you want it to build a visual novel. I'm a bit disappointed with that as when I looked into the various tools I looked at RAGS, Renpy, RPGMaker VX Ace and Twine. I picked Twine as I wanted more narrative than images and to lessen the time spent on rooms, maps etc.

    The only way round this I can see is to host the images at a site and link the URL. It is a pity that the images cannot be stored in the same way they can for Renpy, in an external repository and loaded when required.
  • The images can be loaded from the same directory/folder as the HTML file (or a sub-directory/folder related to it), just don't import the images into the story TWS file(s).

    The in-built story formats may have an issue referencing/loading these external image files due to a change to them introduced in Twine 1.4.2, if so you may need to use a third-party story format like SugarCube.

    Some of the ways to decompile the generated HTML are as follows, though your images may cause problems:
    1. The File > Import > Compiled HTML File option built into the Twine GUI
    2. The TheMadExiles tweego tool
    3. Leon's HTML file to Twee source code converter
    4. The untwee tool that comes with the Twine 1.x python source code


    https://bitbucket.org/tmedwards/tweego
Sign In or Register to comment.