Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

A savegame element in Harlowe?

Planning an RPG, and was wondering if a saving system was possible. Like maybe writing the history to a startup page or something


  • The Harlowe project overview documents the (savegame:) and (loadgame:) macros which can be used to persist the Reader's progress through the story to their web-browser local storage, the limitation of this is that they will need to always use the same web-browser/machine to re-load their progress.

    Harlowe's Timeline sub-system records which passages the Reader visited and what values the story variables had for each of those passage, unfortunately Harlowe currently does not have a documented Javascript API for directly accessing the Timeline sub-system so it is difficult to extend the Timeline's features to include the ability to save to/load from a file on their hard-disk.

    If you do want the ability to save/load from file then one potential solution using just Harlowe's built-in features is to create a passage that displays a structured version of (history:) as well as the current value of each of your stories variables, which the Reader could cut-n-paste into a text file themselves.
    To re-load from file you would then need to create a passage that allows them to cut-n-paste the contents of the file into one or more input fields and then use a combination of (substring:) / (set:) / (goto:) macros to process that data so that the Reader returned to the passage they created the save on.
Sign In or Register to comment.