User
Guide
Automated refactoring tool for Ren'Py R8. Developed by ROOTWIN PROJECT.
This guide is aimed at mod authors and translators who need to bring an old Python 2 / Ren'Py 7 mod to Ren'Py 8 / Python 3 compatibility.
R-Migrator automates the typical fixes. It doesn't guarantee a perfect port of heavily custom code — always test the mod after migration, especially anywhere the original author wrote one-off Python.
Python 2 to Python 3 fixes
R-Migrator scans .rpy files and applies these fixes automatically.
print-statement -> print()
except X, e -> except X as e / raise X, msg -> raise X(msg)
has_key / iteritems / iterkeys / itervalues -> Python 3 equivalents
xrange -> range
long / L-suffix, octal 0755, ur"...", `expr` -> Python 3 syntax
unicode() / basestring -> str
patched in poem and game scripts
float/int fixes in ATL transforms and random.randint
Step-by-step workflow
Launch
Open R-Migrator. The main screen lists what the tool can fix and shows the "SELECT TARGETS" button.
Pick the mod folder
Click "SELECT TARGETS" and choose the folder that contains your mod. R-Migrator reads the subfolders inside it as migration targets.
Choose targets and backup
Tick the subfolders you want processed. The "Create .bak backup before patching" checkbox is on by default — keep it on so every changed file gets a .bak copy next to it.
Third-party tools consent
If the selected folders contain .rpa archives or .rpyc files without a matching .rpy, R-Migrator offers to unpack/decompile them first using rpatool.py and unrpyc.py. A one-time consent dialog appears before this runs.
Run the migration
Click "EXECUTE". The console at the bottom streams every processed file, warning, and fix category in real time.
Review the result
When the run finishes, the console prints the total number of patched files. Check the .bak files and the logs/ folder if you need to review or roll back anything.
Backups and third-party tools
.bak backup
With the backup option on, every file gets a .bak copy saved next to it before it is overwritten. Keep it enabled unless you already have your own backup.
Third-party unpacking tools
Unpacking .rpa and decompiling .rpyc uses rpatool.py and unrpyc.py — code R-Migrator did not write. Only proceed with archives from a source you trust.
Full mod backup
Besides the per-file .bak option, keep a separate full copy of the mod before migrating — a safety net independent of the tool.
Session logs
Every migration run writes a separate log file into the logs/ folder next to the program, named with the date and time of the run — nothing gets overwritten between sessions.
Other controls
Switches between light and dark theme.
Switches the interface language.
Opens the about window with ROOTWIN PROJECT links and a way to support development.
Feedback
What to include in a bug report
- logs/rmigrator_{date}.log — the log file for the run that failed
- Screenshot of the console output at the moment of the error
- The mod's Ren'Py version (6, 7 or 8) and whether it was packed as .rpa/.rpyc