0 votes
by (350 points)
I've seen this kind of asked, but I wanted to go into more detail with what I want because that other person wanted something else, I think.

I need to be able to post up the prologue of the game, have the people able to save that game, and have the points from their choices carried over between the prologue, to episode one. Then from one to two, and so on. I might put in delayed choices, too if it's possible.

I'm not really sure how to do this, on either Philome.la or Itch.io or somewhere else, I don't know where to host or how to code to get this functionality.

I just really need the numbers to carry over because they determine how you start episode one and I don't want to have to re-release a new version with the updates attached that will need to be played all the way through all over again.

1 Answer

+1 vote
by (63.1k points)
Here's some macros fresh out of the oven:

https://github.com/ChapelR/custom-macros-for-sugarcube-2/blob/master/docs/file-system-macros.md

The docs may contain errors and there may be bugs.

To install them, copy/paste this code into your story JavaScript area:

https://raw.githubusercontent.com/ChapelR/custom-macros-for-sugarcube-2/master/scripts/minified/fs.min.js
by (350 points)
Thank you so much for answering, but can I ask how this works? Do I publish it and then I can save to file, then I plug the code into episode one and I can open the files from there?
by (63.1k points)
It depends on what data you need to save. Regardless, though, at the end of the first game, <<export>> that data. At the beginning of the second game, <<import>> it. You could have the player export their saved data via the save menu and import that, and then grab the info you need from it. Or you could export the whole variable store (State.variables), or an object or array of choices.

Generally, the smaller the data the better and easier it'll be on you.
...