Git Product home page Git Product logo

thlaby2-save-convert's Introduction

Touhou Labyrinth 2 Save Converter

This repository provides a Python script that converts your saves from the DLSite version's format to the Steam version's format. At the top of the file are two variables that allow you to control where the save file to be converted is, and whether you want to fully unlock map data, fully erase map data, or transfer your map progress.

For a more in-depth look at the new save file format, please refer to this pastebin.

Installing Python

The script requires Python to be installed in your computer. Python is a scripting programming language, and what you need to install is its interpreter. You can then use the interpreter to run any scripts you download. Installing and running Python in Windows is easy:

  • Head over to https://www.python.org/downloads/ and download Python 3.9 (or any other release >= 3.6)
  • Make sure you click the option to add Python to your system's PATH
  • Optionally, install the "py launcher" module to easily run python scripts
  • Download this repository's source code through Github
    • There should be a "Download ZIP" option in the page, inside the "Code" dropdown button
  • If you installed the py launcher, simply double click .py files to run them
    • You can also open a CMD and type "python anyfile.py" from a directory
    • On CMD, you can move around directories using the "cd" command
      • For example, "cd C:\Users\username\Downloads" should put you in your Downloads directory

If you're running Linux, please refer to your distribution's Python installation instructions. Chances are you already have Python 3.x installed by default!

How to Use

The script convert_save.py must be copied into the directory of the save file you want to convert (for example, inside the save2 or save3 directory). There is a variable at the top of the script to control an option: useFullMaps. You can open the script in any text editor to edit it as needed:

  • useFullMaps should be set to None (the default value) to carry over your map progress from the old save file format. Set it to True to fully unlock all map progress for every floor. You can set it to False to fully erase all map progress, too.

After copying the script into the directory, simply double click it (or run it via cmd, see install instructions above) to run it. After the script runs, you will find two files in your save directory: result-decrypted.dat and result.dat.

  • result.dat is the save file you'll use for the Steam version. It is already encrypted and can be used by simply renaming it to save1.dat (or similar) and moving it to the Steam save directory.

    • Your Steam save file should be in %APPDATA%/CUBETYPE/tohoLaby
    • If you rename it to save1.dat, make sure you already have a save1.dat to replace the new file with
      • If you don't already have a save1.dat, the game won't recognize the new save
    • Note that the save file preview the game shows you is only updated AFTER you load the save and then save in-game.
      • This happens because the game is the one that keeps track of the preview now, not the save file
  • result-decrypted.dat is the same file as above, but fully decrypted if you want to look at the data on a hex editor.

    • It's mainly used for troubleshooting, so you can kinda ignore it if you just want to convert things

thlaby2-save-convert's People

Contributors

qazmlpok avatar thurler avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

qazmlpok

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.