Git Product home page Git Product logo

unrpyc's Introduction

Unrpyc is a script to decompile Ren'Py (http://www.renpy.org/) compiled .rpyc
script files. It will not extract files from .rpa archives. For that, use
rpatool (https://github.com/Shizmob/rpatool), or UnRPA
(https://github.com/Lattyware/unrpa).

Thanks to recent changes, unrpyc no longer needs internal renpy structures to
work.

Usage options:

Options:
  --version      show program's version number and exit

  -h, --help     show this help message and exit

  -c, --clobber  overwrites existing output files

  -d, --dump     Instead of decompiling, pretty print the contents
                 of the AST in a human readable format.
                 This is mainly useful for debugging.
  -p, --processes
                 use the specified number of processes to decompile
  --sl1-as-python
                 Only dumping and for decompiling screen language 1
                 screens. Convert SL1 Python AST to Python code instead
                 of dumping it or converting it to screenlang.
  --comparable   Only for dumping, remove several false differences when
                 comparing dumps. This suppresses attributes that are
                 different even when the code is identical, such as file
                 modification times.
  --no-pyexpr    Only for dumping, disable special handling of PyExpr objects,
                 instead printing them as strings. This is useful when comparing
                 dumps from different versions of Ren'Py. It should only be used
                 if necessary, since it will cause loss of information such as
                 line numbers.

Usage: [python2] unrpyc.py [options] script1 script2 ...

You can give several .rpyc files on the command line. Each script will be
decompiled to a corresponding .rpy on the same directory. By default, the
program will not overwrite existing files, use -c to do that.

This script will try to disassemble all AST nodes. In the case it encounters an
unknown node type, which may be caused by an update to Ren'Py somewhere in the
future, a warning will be printed and a placeholder inserted in the script when
it finds a node it doesn't know how to handle. If you encounter this, please
open an issue to alert us of the problem.

For the script to run correctly it is required for the unrpyc.py file to be in
the same directory as the modules directory.

You can also import the module from python and call
unrpyc.decompile_rpyc(filename, ...) directly

As of renpy version 6.18 the way renpy handles screen language changed
significantly. Due to this significant changes had to be made, and the script
might be less stable for older renpy versions. If you encounter any problems
due to this, please report them.

Alternatively there is an experimental version of the decompiler packed into
one file available at https://github.com/CensoredUsername/unrpyc/releases
This version will decompile a game from inside the renpy runtime. Simply copy
the un.rpyc file into the "game" directory inside the game files and everything
will be decompiled.

Supported:
renpy version 6 up to 6.99.4
Windows, OSX and Linux

Requirements:
Python version 2.7

https://github.com/CensoredUsername/unrpyc

unrpyc's People

Contributors

al42and avatar censoredusername avatar hyphz avatar iamghost avatar jackmcbarn avatar meishuu avatar mwchase avatar red54 avatar sleeplessone avatar yuriks avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.