R3EXS
RGSS3_Extract_Strings_Tool
A tool for extracting and translating strings from the RGSS3 game engine.
Contents
Synopsis
R3EXS is a gem built using Ruby, designed to extract and translate strings in RGSS3 games.
Features
It uses Prism to accurately extract strings and symbols from Ruby scripts.
Function List
- Unpack Game.rgss3a file
- Serialize rvdata2 files to JSON file
- Deserialize JSON files to rvdata2 file
- Extract all strings
- Inject all strings
Installation
Install using RubyGems
gem install R3EXS
Usage
The following commands assume they are run in the game’s root directory, ensuring the ./Game.rgss3a file exists or has
already been unpacked into the ./Data folder.
If you enjoy a crazy amount of console output or feel like the execution is too fast, please enable the --verbose
option.
Unpack Game.rgss3a file
NAME
decrypt - Decrypt the Game.rgss3a file
SYNOPSIS
R3EXS [global options] decrypt [command options] <Game.rgss3a file path>
COMMAND OPTIONS
-o, --output_dir=DIRECTORY - The *.rvdata2 output dir (default: ./)
Example code:
R3EXS decrypt ./Game.rgss3a
Serialize rvdata2 files to JSON file
NAME
rvdata2_json - Serialize rvdata2 files into JSON
SYNOPSIS
R3EXS [global options] rvdata2_json [command options] <the *.rvdata2 dir>
COMMAND OPTIONS
-c, --[no-]complete - Enable complete serialization
-o, --output_dir=DIRECTORY - The *.json output dir (default: ./JSON)
-s, --[no-]with_scripts - Enable Scripts.rvdata2 serialization
Example code:
// Serialize only translatable parts
R3EXS rvdata2_json ./Data
// Complete serialization
R3EXS rvdata2_json -c ./Data
Deserialize JSON files to rvdata2 file
NAME
json_rvdata2 - Deserialize JSON files back into rvdata2
SYNOPSIS
R3EXS [global options] json_rvdata2 [command options] <the *.json dir>
COMMAND OPTIONS
-c, --[no-]complete - Enable complete deserialization
-o, --output_dir=DIRECTORY - The NEW *.rvdata2 output dir (default: ./Data_NEW)
-r, --original_dir=DIRECTORY - The ORIGINAL *.rvdata2 dir (default: ./Data)
-s, --[no-]with_scripts - Enable Scripts JSON deserialization
Example code:
// If --complete was not enabled in rvdata2_json
// Provide --original_dir or ensure ./Data folder exists in the current directory
R3EXS json_rvdata2 ./JSON
// If --complete was enabled in rvdata2_json
// --original_dir is not required
R3EXS json_rvdata2 -c ./JSON
Extract all strings
NAME
ex_strings - Extract all strings
SYNOPSIS
R3EXS [global options] ex_strings [command options] <the *.json dir>
COMMAND OPTIONS
-o, --output_dir=DIRECTORY - The ManualTransFile.json or ManualTransFile_scripts.json output dir (default: ./)
-p, --[no-]with_scripts_separate - Enable Scripts extraction into a separate ManualTransFile_scripts.json
-s, --[no-]with_scripts - Enable Scripts extraction
-y, --[no-]with_symbol - Enable Symbol extraction in Scripts extraction
Example code:
// Do not extract Scripts
R3EXS ex_strings ./JSON
// Extract Scripts
R3EXS ex_strings -s ./JSON
// Extract Scripts and separate them into ManualTransFile_scripts.json
R3EXS ex_strings -s -p ./JSON
Inject all strings
NAME
in_strings - Inject all strings
SYNOPSIS
R3EXS [global options] in_strings [command options] <the *.json dir>
COMMAND OPTIONS
-m, --manualtransfile_path=FILE - The ManualTransFile.json path (default: ./ManualTransFile.json)
-o, --output_dir=DIRECTORY - The NEW *.json output dir (default: ./JSON_NEW)
-s, --[no-]with_scripts - Enable Scripts Injection
Example code:
// Do not inject into Scripts
R3EXS in_strings ./JSON
// Inject into Scripts
R3EXS in_strings -s ./JSON
For more information, use
R3EXS help
Project Build
To build and run the project, first clone the entire repository:
git clone https://github.com/LuoTat/R3EXS.git
Then use bundle to install dependencies:
bundle install
Finally, compile the C extension:
rake compile
Build the local documentation:
yardoc
View all rake tasks:
rake -T