Harlowe utility for saving and loading game progress to encrypted file
It's a GUI for non-linear text games available at:
It's a macro based scripting language made from Javascript, used inside Twine.
- Remember that you have to use Harlowe story format (tested with 3.1.0)
- Paste it inside your story script
- Now you can use additional macros!
NOTE: Twine (GUI) will mark these macros as incorrect, beacuse they are not its native macros - don't worry, they'll work.
This macro pulls your save data from cookies - the last time when you used (save-game:)
and downloads it as an encrypted file. It's important to use (save-game:)
or checking with (saved-games:)
before using this macro.
- fileName - string containing your file name, without extension for example
my_save
- slotName - string containing your slot name. The same as you would use for
(load-game:)
or(save-game:)
macro.
This macro works similar to (savetofile:)
, but it pulls your save data directly from Twine, meaning it doesn't need already saved game. Note, that it doesn't overwrite your cookies, so if you want to save your progress here as well, you should use (save-game:)
accordingly.
- slotName - string containing your slot name. The same as you would use for
(load-game:)
or(save-game:)
macro. - fileName - string containing your file name, without extension for example
my_save
This macro takes save file and loads it. Simple, right? But, there are few options...
- slotName - string containing your slot name to load progress into. Note that if you already have saved game here, it'll overwrite it
- acceptedSlots [optional] - strings containing accepted name slots - if not specified defaults to slotName's value. Note, that if you specify al least one accepted slot, it won't include slotName in accepted slots (if you want so, you should pass it again). How it works? For ex. if you saved your progress with slotname "SLOT A", and your accepted slot is "SLOT B" it won't work. "SLOT A" must be included in acceptedSlots, or if they are not specified - same as slotName
Configurables are specified at the top of the file.
cheatPassage
(string) if specified instead of saying "Cheater!" (when it detects modifying save file) it goes to specified passagemaxFileSize
max save file size specified in kilobytes, in most cases 512 is more than enoughextension
file extension - default issav
binKey
key for the last (3rd) and weakest from of the encryption - integer from 2 to 10* - higher number - bigger file
Utility uses a few types of encryption. All keys (except binKey) are taken from story's ifid. It means, that different stories are automatically incompatible.
- Vigenere encryption
- 8 char checksum
- Checksum is inserted in various places inside the file
- Additional scramble using Javascript's
^
operator
- Click
Story statistics
while having your story opened inside Twine - In HTML published version of your story, it's stored in
ifid
attribute oftw-storydata
element
All issues are reported by built-in Twine dialog boxes and JS console :)
It uses checksum to determine i file was modified. Also, it checks if ifid is correct (however wrong ifid is reported as file from different game - not cheating)