### Decompile Ren'Py Script Files Source: https://github.com/censoredusername/unrpyc/blob/master/README.md Use this command to decompile .rpyc files or an entire folder of Ren'Py scripts. Ensure you have a local Python installation. ```bash python unrpyc.py file1.rpyc file2.rpyc ``` ```bash python unrpyc.py folder/ ``` -------------------------------- ### Run unrpyc Command Line Tool Source: https://github.com/censoredusername/unrpyc/blob/master/README.md Use one of these commands to execute the unrpyc tool from your system's command line. Ensure the script is in the same directory as the modules directory. ```bash python unrpyc.py [options] script1 script2 ... ``` ```bash python3 unrpyc.py [options] script1 script2 ... ``` ```bash py -3 unrpyc.py [options] script1 script2 ... ``` ```bash ./unrpyc.py [options] script1 script2 ... ``` -------------------------------- ### Unrpyc Command Line Help Source: https://github.com/censoredusername/unrpyc/blob/master/README.md Display the help message for the unrpyc command-line tool to see available options and their descriptions. This command shows usage, positional arguments, and various options for decompilation and AST dumping. ```bash py -3 unrpyc.py --help ``` -------------------------------- ### Unrpyc Decompilation Options Source: https://github.com/censoredusername/unrpyc/blob/master/README.md These are the available options for the unrpyc command-line tool. Use them to control the decompilation process, such as overwriting files, handling obfuscation, or setting the number of processes. ```text usage: unrpyc.py [-h] [-c] [--try-harder] [-p {int}] [-d] [--comparable] [--no-pyexpr] [--no-init-offset] [--register-sl-displayable SL_CUSTOM_NAMES [SL_CUSTOM_NAMES ...]] [-t TRANSLATE] [--version] file [file ...] Decompile .rpyc/.rpymc files positional arguments: file The filenames to decompile. All .rpyc files in any sub-/directories passed will also be decompiled. options: -h, --help show this help message and exit -c, --clobber Overwrites output files if they already exist. --try-harder Tries some workarounds against common obfuscation methods. This is a lot slower. -p, --processes {int} Use the specified number or processes to decompile. Defaults to the amount of hw threads available minus one, disabled when muliprocessing is unavailable. --no-init-offset By default, unrpyc attempts to guess when init offset statements were used and insert them. This is always safe to do for ren'py 8, but as it is based on a heuristic it can be disabled. The generated code is exactly equivalent, only slightly more cluttered. --register-sl-displayable SL_CUSTOM_NAMES [SL_CUSTOM_NAMES ...] Accepts mapping separated by '=', where the first argument is the name of the user-defined displayable object, and the second argument is a string containing the name of the displayable, potentially followed by a '-', and the amount of children the displayable takes(valid options are '0', '1' or 'many', with 'many' being the default) -t, --translate TRANSLATE Changes the dialogue language in the decompiled script files, using a translation already present in the tl dir. --version show program's version number and exit astdump options: All unrpyc options related to ast-dumping. -d, --dump Instead of decompiling, pretty print the ast to a file --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. ``` -------------------------------- ### Decompile with --no-init-offset Source: https://github.com/censoredusername/unrpyc/blob/master/README.md Use this option when dealing with games from before Ren'Py version `6.99.10` to ensure compatibility with Unrpyc v2.x. ```bash python unrpyc.py --no-init-offset game.rpyc ``` -------------------------------- ### Inject unrpyc into Ren'Py Game Source: https://github.com/censoredusername/unrpyc/blob/master/README.md To inject the tool directly into a running Ren'Py game, place either `un.rpyc` or `bytecode.rpyb` from the latest release into the game's `game` directory. The tool will automatically extract and decompile script files, logging output to `unrpyc.log.txt`. ```text Place `un.rpyc` or `bytecode.rpyb` into the `game` directory. ``` -------------------------------- ### Compile un.rpyc with Debug and Obfuscation Source: https://github.com/censoredusername/unrpyc/blob/master/un.rpyc/README.md Use this command to compile the decompiler with debug output enabled and extra obfuscation features. This is recommended for the best results. ```python python3 compile.py -d -o -p 1 ``` -------------------------------- ### Dump Raw AST View of RPYC File Source: https://github.com/censoredusername/unrpyc/blob/master/README.md Instead of decompiling, this option displays the raw contents of an .rpyc file. It is primarily useful for debugging and development, but generates a large amount of output. ```bash python unrpyc.py -d /path/to/file.rpyc ``` -------------------------------- ### Library Usage: Decompile RPYC Source: https://github.com/censoredusername/unrpyc/blob/master/README.md You can import and use the `unrpyc` module directly from Python to decompile `.rpyc` files. Note that this functionality has changed with Python 3 and is under active development. ```python import unrpyc unrpyc.decompile_rpyc(filename, ...) ``` -------------------------------- ### Translate Decompiled Scripts Source: https://github.com/censoredusername/unrpyc/blob/master/README.md Automatically translate decompiled script files to a target language using translation data from the game. The target language must match a folder name within the game's `game/tl` directory. ```bash python unrpyc.py /path/to/renpyapp/ -t french ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.