Carry Choices Over Installments

0 votes
asked Jun 27 by UnrealRomance (280 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 or 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
answered Jun 29 by Chapel (48,690 points)
Here's some macros fresh out of the oven:

The docs may contain errors and there may be bugs.

To install them, copy/paste this code into your story JavaScript area:
commented Jul 3 by UnrealRomance (280 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?
commented Jul 4 by Chapel (48,690 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.
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.