Save Transfer Tool for Hyper Light Drifter
Hyper Light Drifter is an amazing game by Heart Machine.
Explore a beautiful, vast and ruined world riddled with unknown dangers and lost technologies. Inspired by nightmares and dreams alike.
My problem
I needed to transfer my save game from my Windows machine to my Mac because I had issues launching the game on Windows, and I didn't want to lose all my progress.
Unfortunately, the game encodes unique data into the save that prevents you from copying a save file to a different machine (this is also the reason Steam Cloud is not supported). From what I can tell, the developer didn't do this on purpose; it's how the underlying engine (GameMaker) writes its save data.
I came across some threads on Reddit and Steam discussing manual steps to take. None of them worked for me, so I wrote my own tool to facilitate save transfers. It is a command line tool that runs on Windows, Mac, or Linux.
The readme file in the repository contains information on how to use the tool.
How it works
The save game is a chunk of JSON prepended with a unique string of bytes that is specific to the computer on which the save was generated. The entire payload is Base-64 encoded.
The tool therefore requires a save from each system; the source save which contains the data to transfer and the target save which contains arbitrary data, but most importantly the unique header for that machine.
The tool automates the following steps:
- Base-64 decode the source save
- Skip the header and extract the JSON data
- Base-64 decode the target save
- Extract the unique header
- Combine the header with the JSON data
- Base-64 encode the new payload
- Write the payload to disk