ttm_unpack — An extractor for To the Moon's datafiles

Anya the Lighthouse, extracted with ttm_unpack

ttm_unpack is a program to extract the resources from the game To the Moon and other games based on the RPG Maker XP engine. It was developed with the intent of getting the game to work under wine on non-windows operating systems, as wine was at the time unable to run the game's decryption routines.

Note that To the Moon now has an official Linux version: you should play that instead of using wine if you can.

You can download ttm_unpack here (C source code) or you can get a precompiled binary for x86 (or x86-64) Linux systems, or x86 Windows. The Linux binaries were built with bingcc, so they should work on most systems!

Note that the Linux/Mac ports of To the Moon store their data in a Game.rgssad file, rather than the Windows version's To the Moon.rgssad file. ttm_unpack defaults to trying to extract To the Moon.rgssad if no filename is specified.

darklord42 on the Freebird Games forums got it working under Mac OS X! Check it out!

Kaira and Morgawr ported ttm_unpack to python for the GOGonLinux project and wrote a blog post about the porting progress. I feel quite bad about the horrible pointer hackery now!

Ancurio wrote a ttm_pack (C source code) utility to allow you to create new .rgssad files. It can be compiled and run in a similar way to ttm_unpack, and is part of the mkxp project: a complete reimplementation of the RPG Maker XP engine used by, amongst other things, the official Linux port of To The Moon. mkxp includes a PhysFS backend for reading RGSSAD files as well, which can be found here

carstenels maintains an AUR package for ttm_unpack so that users of Arch Linux can easily install it.

To compile and extract To the Moon's datafiles on Linux, you should simply need to:
  1. Download ttm_unpack.c.
  2. Compile it with cc -o ttm_unpack ttm_unpack.c
  3. Find the RGSSAD file you want to extract. It's usually To the Moon.rgssad on Windows and Game.rgssad on other platforms.
  4. Run it (in the game directory):
    cd <path to To the Moon>
    ./ttm_unpack <RGSSAD filename>
  5. Rename or delete the existing file (e.g.):
    mv To\ the\ Moon.rgssad{,.old}
  6. Run the game with wine To\ the\ Moon.exe or ./ToTheMoon.bin.x86
  7. Enjoy!
On Windows, you should simply need to:
  1. Download ttm_unpack.exe to the game directory.
  2. Drag-and-drop the RGSSAD file you want to extract (probably To the Moon.rgssad) over ttm_unpack.exe
  3. Alternatively, run ttm_unpack.exe <RGSSAD filename> from a command prompt.
  4. Delete or rename the RGSSAD file so that the game will load the extracted files.
  5. Enjoy!

Some people have found a couple of problems with filename encoding. A few strategic renames should be enough to fix that. Of course, patches are accepted!

Also be warned that the demo version, and the version bought directly from the developer have some DRM which also has problems with wine. Get the game from or Steam and you'll have no problems. Don't forget to get the soundtrack if you have a heart somewhere in your chest (and tissues at hand).

You can also check out the forum threads about this at Freebird Games and Steam.