https://github.com/cnfatal/rpycdec
Tools to decompile renpy .rpyc .rpymc files.
https://github.com/cnfatal/rpycdec
renpy rpyc
Last synced: 8 months ago
JSON representation
Tools to decompile renpy .rpyc .rpymc files.
- Host: GitHub
- URL: https://github.com/cnfatal/rpycdec
- Owner: cnfatal
- License: mit
- Created: 2023-08-20T13:10:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T04:28:34.000Z (about 1 year ago)
- Last Synced: 2025-04-04T00:01:29.193Z (about 1 year ago)
- Topics: renpy, rpyc
- Language: Python
- Homepage: https://pypi.org/project/rpycdec
- Size: 128 KB
- Stars: 19
- Watchers: 1
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rpycdec
A tool for decompiling Ren'py compiled script files (.rpyc and .rpymc).
## Features
- Decompile .rpyc and .rpymc files to readable Python code
- Extract RPA archives
- Parse translations from .rpyc and .rpymc files to `tl/{language}/` directories
- Support for multiple Ren'py versions (7.x, 8.x)
## Installation
Install with pip:
```sh
pip install rpycdec
```
Or install from source:
```sh
git clone https://github.com/cnfatal/rpycdec.git
cd rpycdec
pip install .
```
## Usage
### Command Line Interface
Decompile a single file:
```sh
rpycdec decompile script.rpyc
```
Decompile all files in a directory:
```sh
rpycdec decompile /path/to/game/
```
Extract RPA archive:
```sh
rpycdec unrpa archive.rpa
```
Extract translations:
```sh
rpycdec extract_translations /path/to/game/ --language chinese
```
### Library Usage
```python
from rpycdec import decompile, extract_rpa
# decompile a file
with open('script.rpyc', 'rb') as input_file, open('script.rpy', 'wb') as output_file:
decompile(input_file, output_file)
# Extract RPA archive
with open('archive.rpa', 'rb') as f:
extract_rpa(f, './extracted/')
```
## Troubleshooting
- **Q: It always raise pickle `import ** \nModuleNotFoundError: No module named '**\*'` error.**
A: It's because the our fake packages("renpy","store") is not contains the object you want to decompile. Please open an issue and tell us the renpy version and the rpyc file you want to decompile. Join our telegram group to get help also be better.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## Community & Support
- [GitHub Issues](https://github.com/cnfatal/rpycdec/issues) - Bug reports and feature requests
- [Telegram Group](https://t.me/rpycdec) - Community discussion and help