Compatibility
Ren'Py 8 and 7
Ren'Py 8 games run as they are. Ren'Py 7 games need their scripts recompiled for Python 3, or decompiled first.
On this page
Engine generations
| Ren’Py | Python | Status | Notes |
|---|---|---|---|
| 8.5.x | 3.12 | Experimental | Runs on the Switch (run 5) |
| 8.0–8.4 | 3.9 / 3.12 | Experimental | Untested on hardware. The importer accepts them with a warning: loading their .rpyc in 8.5.3 is untested |
| 7.x | 2.7 | Unsupported | No Python 2 runtime. --recompile and --decompile are an experiment |
| 6.x and older | 2.x | Unsupported | Not planned |
A proper fix for Ren’Py 7 would be a separate Python 2.7 runtime. That is a possible later phase, if it turns out to be feasible.
Recompile (--recompile)
For Ren’Py 7 games that ship their .rpy sources. The export leaves out every .rpyc/.rpymc (Python 2 pickles that Ren’Py 8 cannot load) and game/cache/. Ren’Py 8.5.3 then compiles the sources with Python 3 on the first launch, which is slow once.
python3 importer/rsl_import.py OldGame --recompile --out /Volumes/SDThe importer refuses recompile mode when:
- the game is not Python 2;
- it has
.rpaarchives, which may hold compiled scripts; - a
.rpycoutsidetl/has no.rpysource. The refusal says to add--decompile.
Without --decompile, sourceless .rpyc under tl/ are left out with a warning: those translations may be missing.
On a Switch: Forbidden Fantasy, a Ren’Py 7.5.3 game exported with --recompile, compiled its scripts on the console and rendered (run 13). Its menus, links and D-pad were fixed and checked in runs 24 and 25.
The runtime also carries one fix for Ren’Py 7 games: for games with script_version up to 7.5.3/8.0.3, a language change does not re-run define gui.*. Ren’Py 8.5.3 does, which erased gui values the game set in init python.
Decompile (--decompile)
For Ren’Py 7 games that ship only .rpyc. It rebuilds a .rpy for every compiled script that has no source, including those under tl/, then exports as --recompile does.
sh third_party/unrpyc/fetch.shpython3 importer/rsl_import.py OldGame --decompile --out /Volumes/SDTwo decompilers can do it. Try unrpyc first; if it cannot read a script, try rpycdec, and the other way round.
| unrpyc (default) | rpycdec | |
|---|---|---|
| Project | CensoredUsername/unrpyc v2.0.4, MIT. The long-standing Ren’Py decompiler | cnfatal/rpycdec, MIT. Younger and smaller |
| Install | third_party/unrpyc/fetch.sh (pinned, checksummed) | pip install rpycdec |
| Python | The importer’s own, 3.9+ | 3.10+, given with --rpycdec-python or on PATH |
| A script it cannot read | Names it and decompiles the rest | Stops; the import is refused |
| Packaged app | Cannot run it; use rsl_import_gui.py | Runs if rpycdec is on PATH or in the tools folder |
Both decompilers unpickle .rpyc files with restricted unpicklers, so neither runs inside the importer. The importer copies only the sourceless .rpyc into a temp folder and runs the decompiler on it as a separate process, with a 600 s timeout. Archives are not touched, and there is no decryption.
Before you play a recompiled game
warning
This is an experiment, not support.
- Python 2 code can behave differently under Python 3 without any error. Ren’Py 7 scripts use Python 2 division unless they declare
rpy python 3, so7 / 2is3there and3.5here. Check the game’s logic. - Saves from the original game do not load.
- Decompiled scripts lose comments and formatting, and statements can be misread. The manifest lists the rebuilt files under
decompiled. Play the whole game to check.