(EDIT: I just realized that you selected harlowe as a story format. I am not certain how well this would work in it. I have been using sugarcube)
I have been thinking about this too. For I will probably have to break mine up into chapters. What I have been thinking on is making an array that stores a numerical value.
<<set $gamecode = >>
So if the player is a certain class then give each class a numerical value.
Mage Value of 1
Ranger Value of 2
Thief Value of 3
Warrior Value of 4
<<set $gamecode.push (2)>> // 2 for Ranger
Then later if they make a choice
Like help the old man defend against robbers.<<set $helpingHand = true>>
It could be given the value of 26 if $helpingHand is set to true.
The value would have to be unique to that point in time. And you would need to keep track of what action gets what value.
Then at the completion of the game it could print out the $gamecode. <<print $gamecode>>.
They would copy it. Then at the next game they would paste it in a text box in the new game and click to move forward.
When you're ready, click [[here|Character Creation]].
Those numbers could be entered into an array of $pastGamecode, then that array could be translated into variables.
<<print $pastGamecode [2,26,358,66,105]>>
<<if $pastGamecode.contains (2)>>
<<set $class = "Ranger">>
<<if $pastGamecode.contains (26)>>
<<set $helpingHand = true>>
Now the problems I forsee... I am not sure if the text box will translate into an array. I have not tested this and so I am not sure how well it would work. But by having a code at the end, it could give the player a chance to play several times and keep the codes to play a different way in the next chapter of your game.
If someone knows a better way please do not feel afraid of hurting my feelings. I would be interested in knowing since I am planning the same thing.