Saving and Opening Stories

Hi,
I’m new to Twine and coding but am really enjoying getting into using Sugarcube and Css. I’ve started a story and been been using YouTube guides by Adam Hammond and Dan Cox to supplement the wiki twine guides.
As recommended. I have been working in the offline version and regularly use ‘publish to file’ to save my work. My issue is when I close the twinery app and then reopen it my story is not appearing as when I last saved it but loses my last lot of work. I’ve searched online for a solution and gone through forum posts on similar subjects. But I’m definitely in SugarCube and the story could be emailed to a friend who could open it and play it.
The issue definitely seems to be with saving. I have tried opening the zipped file I emailed, that I know is the latest version but when I open it in the app, then go to amend, an older version of the story appears. The home page also shows 10 stories but I’m only working on one.
I know I’m doing something wrong but can’t see what. I apologise that I’m not always using the correct terminology in my descriptions. I probably understand more terms than I’m comfortable using publicly.
Any help would be gratefully received.

1 Like

Saving your file in an Archive from the home screen may work better for saving than publishing to a file. The published version is one that can be “played” where the archive is one that can be restored for further editing.

fos1

Ahh! Thank you. I knew I was doing something wrong in my saving technique.

I remember something about the archive but started using ‘publish to file’ to check that my codes (to show images) were working.

I will archive in future.

Actually, you can use the “Import” option to import any Twine 2 HTML file into Twine 2, including the published ones. It doesn’t have to be the archived version.

The advantage of the “Archive” option is just that it backs up all stories at once, so you don’t have to save and import them all one at a time.

Twine shouldn’t behave like you describe. Normally if you close Twine and then re-open it, it should be the same as you left it.

It sounds like your problem is due to the story duplication bug that cropped up in the v2.3.x branch of Twine 2.

I’ve reported the problem to the author of Twine, but they haven’t fixed it yet. Until then, you can use the instructions here to fix Twine to work properly: “How to fix “undeletable” duplicate stories in Twine v2.3.0 - v2.3.5”. (That was written before later versions of Twine came out, but it should still work fine currently.)

Once you’ve fixed Twine, to prevent the problem from cropping up again you should refrain from using the “Rename Story” and “Duplicate Story” options from within Twine, and also you shouldn’t import an HTML file which has an internal name which matches a story already in your version of Twine. (The “internal name” is the one found within <tw-storydata name="(internal name here)" inside the HTML.)

If you need to duplicate a story, you should export the HTML with the new filename you want, then edit the HTML in a decent text editor (like Notepad++) to change the internal name to match that new name you want, save it, and then import that HTML into Twine.

Hopefully the author of Twine will fix the two bugs that cause these problems soon, but in the meantime that should work.

Please let me know if you have any further problems, and have fun! :smiley:

Thanks so much for this HiEv. I knew something wasn’t right with multiple copies of the story appearing but assumed it was something I was doing and never thought of a bug in the system. I will use the fix and follow your advice in future. I did use the ‘Rename Story’ when the problem first occurred.

I also appreciate your clear explanation and instructions for a newbie. Thanks for your time.

I found restore from published version unreliable at times. I knew the archive option saved everything. It has always been reliable and my goto save option.

v/r
fos1

AFAIK, restoring from published files is 100% reliable for games saved from the Twine 2 editor, provided that you don’t already have a story with the same (internal) name in Twine already.

If you’ve encountered any unreliability with it, then it’s probably either due to the above mentioned bug or due to it being created using a command line compiler, like Tweego, which doesn’t always set the positions on the story nodes to a usable value. Also, you may occasionally have to manually set the story format or start passage after importing a story, but that’s a pretty easy fix.

1 Like

Thank you for the clarification. I have had a number of stories in the works over a fair period of time. I am sure I have crossed Twine versions. I always save frequently to prevent loss of work. I lost all of my local files when a new RPi 4 installation crashed deleting all user data on an SD. The local version of Twine does not seem to work on an RPi.

v/r
fos1

If positional data does not exist, Tweego always generates sane, usable values for passages in data chunks. Being written in a strongly typed language with zero values for all types, it can’t really do anything else there.

If positional data exists, Tweego passes it through as-is, since it doesn’t use that data itself.

AFAIK, the only compiler actively known to have occasionally generated invalid values for passages’ positional data is Twine 2 itself—though, I’d hope that’s been fixed by now.

Hi HiEv, I found the fix and would never have found the post whilst searching as I didn’t realise the system was ‘duplicating’ stories being unfamiliar with the programme. The pictures on the thread of extra stories are just what I see on my Twine screen. Thanks so much.

I’ve been working through the steps described in the fix but have got stuck in number 11 as I can’t find Program Files\Twine\Resources. I’m using Windows10. I’ve checked my typing and I’ve used the exactly characters as in the instruction. I’ve tried searching PC and c drive. I’ve tried searching for just Program Files but nothing appears with Twine. I tried to search for “app.asar” but nothing came up. I did search Google for Program File Twine Resources but nothing told me where to find it.
I’m sorry to bother you but if you have any thoughts on what I’m missing on this step, I’d be grateful to hear them.

Well, when you start up Twine, are you using a shortcut icon? If so, you should be able to right-click that, go to “Properties”, and then you can see where Twine is installed from that. That’s where the “Resources” directory should be with the “app.asar” file.

Alternately, you can open Twine, then open Task Manager (taskmgr.exe), find “Twine.exe” in the “Processes” list, right-click that, choose “Properties”, and find out where it’s installed from that.

Hope that helps! :smiley:

Thank you so much HiEv!!! It’s worked!!! I followed your advice and used the task manager and I’ve got my work back and can continue, Phew!
Never done anything like this on my computer previously and was a bit nervous going into folders I’ve never delved in before but it’s worked. So relieved!!
Many, many thanks :grinning: