ARM Backup/Ar tonelico 2 retranslation/Rpkextractrb

From the original post:

Morgan Light Industries would like to present the first of more than one of their tools for working with Ar tonelico II's files:

[| rpkextract.rb]

This program extracts files from rpk.bin. It doesn't rebuild rpk.bin. That'll be a different program.

Advantages over exar2rpk:\\ -Ability to extract only the files you're interested in.\\ -Support for JP version. (untested...) (Wikifier's note: This line is completely wrong now, as it has been tested, and there is a JP version of exar2rpk.)\\ -Postfix insertion to simplify side-by-side comparison of EN and JP files.\\ -Toggleable clobber protection

Disadvantages:\\ -Requires [| Ruby]. You can safely assume that any program provided by me will though...\\ -More options mean a more complicated command line.

Usage:

To extract all files: ruby rpkextract.rb\\ Defaults to original filenames from US version, US offsets, unchanged filenames. If a file already exists, the program will halt.

To select a different executable name: --elf (filename), -e (filename)

To select a different RPK file name: --rpk (filename), -r (filename)

To extract from Japanese version files: --jp, -j

To select desired files to extract: --select (pattern), -s (pattern)\\ For example, to extract all .evd files, use --select .evd

To add postfixes: --postfix, -p\\ Postfixes add a marker based on the region before the file extension. For example, "01ruka_map_LV01.tm2.lzr" becomes "01ruka_map_LV01.tm2__EN.lzr" for the US version and "01ruka_map_LV01.tm2__JP.lzr" for the JP version.

To overwrite existing files: --overwrite

Notes: Even if only some files are being extracted, the program will reconstruct the entire directory structure.

Any comments or suggestions for improvement are welcome.

Example of extracting from the JP version:

rpkextract.rb --elf SLPS_258.19 --rpk RPK_JP.BIN --jp --postfix --select .evd