rpynx v0.1.0pre-release

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.

Source docs/COMPATIBILITY.md, docs/IMPORTER.md
On this page

Engine generations

Ren’PyPythonStatusNotes
8.5.x3.12ExperimentalRuns on the Switch (run 5)
8.0–8.43.9 / 3.12ExperimentalUntested on hardware. The importer accepts them with a warning: loading their .rpyc in 8.5.3 is untested
7.x2.7UnsupportedNo Python 2 runtime. --recompile and --decompile are an experiment
6.x and older2.xUnsupportedNot 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.

bash
python3 importer/rsl_import.py OldGame --recompile --out /Volumes/SD

The importer refuses recompile mode when:

  • the game is not Python 2;
  • it has .rpa archives, which may hold compiled scripts;
  • a .rpyc outside tl/ has no .rpy source. 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.

bash
sh third_party/unrpyc/fetch.sh
bash
python3 importer/rsl_import.py OldGame --decompile --out /Volumes/SD

Two decompilers can do it. Try unrpyc first; if it cannot read a script, try rpycdec, and the other way round.

unrpyc (default)rpycdec
ProjectCensoredUsername/unrpyc v2.0.4, MIT. The long-standing Ren’Py decompilercnfatal/rpycdec, MIT. Younger and smaller
Installthird_party/unrpyc/fetch.sh (pinned, checksummed)pip install rpycdec
PythonThe importer’s own, 3.9+3.10+, given with --rpycdec-python or on PATH
A script it cannot readNames it and decompiles the restStops; the import is refused
Packaged appCannot run it; use rsl_import_gui.pyRuns 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, so 7 / 2 is 3 there and 3.5 here. 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.

↑↓ move↵ openesc close