0 votes
by (470 points)
I want to let users have their save files with them and use them on Web version and Windows app whenever they would like to. I downloaded TwineJS source and tried to find where the save function lies but I couldn't find it.

Anyone have any ideas to make this work? These localstorage savings in unreliable for my project.

2 Answers

+1 vote
by (144k points)
selected by
 
Best answer

As explained by @Chapel you need to use the question tags to state the name and full version number of the story format you are using as answers can vary based on this information, I will assume you are using the default story format which is Harlowe v1.2.4 (not v2,0,1 as you suggested)

I suggest you read the Twine 2 wiki because: the How to Choose a Story Format page of the Twine 2 wiki explains about the three built-in story formats; the The Story List wiki page explain how to see what story formats (and versions) you have installed and how to set which one you will use as a default for new story projects; and the Setting a Story's Title wiki page explains how to change which story format (and version) is being used for the current story project.

Each story format is a mini web-application in its own right and their developers decide what core functionally (like macro syntax and list of default macros) it's built-in Javascript based engine supports, and each story format has it's own source code repository where you can see the uncompressed version of it's engine.

Currently only the SugarCube related story formats (both 1.x and 2.x) support the ability for an end-user of a story HTML file to be able to persist their saves to an external file.

If you want to add this same ability to the Harlowe or Snowman story formats then I suggest you fork the relevant repository and create your own version of that story format. I should note that adding functionality like this to those story formats is not a trivial undertaking for a number of reasons, two of which are: that neither of them currently has the ability to show a dialog; and Snowman doesn't currently really have a full functioning progress save feature.

Official story format repositories: Harlowe (both 1.x and 2.x); SugarCube (both 1.x and 2.x); Snowman

by (470 points)
edited by
Thank you very much. I will read all those wiki stuff now. So, the story-formats are like different templates for different types of games. Ok, that is pretty convenient. Let me see...
Edit: I am using 2.0.1 by default somehow. Just checked.
by (470 points)
Yeap. I will simply use SugarCube-2 now as it has that functionality and moreover - sidebar, which I needed anyway.

That's the answer, thank you.
by (144k points)

So, the story-formats are like different templates for different types of games

Not exactly, all three were originally designed to create Interactive fiction (like the Choose Your Own Adventure games) however you can create a wide range of other game types with any of the story formats.

The main differences between the story formats are: the syntax of it's macro language; what core functionality comes included in it's custom engine; and what methods you can use to extend that core functionality.

+1 vote
by (61.3k points)
Do you mean the save system for saving and loading your actual Twine project, or the save system within the respective story format for the end-user to save their progress while playing? I thought you were talking about the latter at first, but now I think you might be talking about the former. If you are, it seems like you just need to make use of the archive feature, which allows you to create a backup of all your story projects, and it can be created and imported into either the web version or the installable version.

You can also compile your project to html and import it back into Twine if you'd rather not use an archive. In this case, you just build your project as normal.

If you're talking about the latter, we need more to go on: what story format are you using and how do you want this feature to work, exactly? Note that the SugarCube 2 format supports importing and exporting saved data already. (SugarCube 1 does as well, but you should use 2.)
by (470 points)
Thank you for the response!

Yes, I need to make work the latter one. I want users to have their saves with them so they could make sure they never lose anything. I am not sure which story format I am using so as I haven't changed anything I guess it is Harlowe 2.0.1. Still, I see other story-formats in source files, how do I enable them? And if I would like to include this feature to other formats I need to look into those story-formats files? (the only problem is they are obfuscated)
Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...