CensoredUsername / unrpyc

A ren'py script decompiler
Other
824 stars 149 forks source link

[Feature Suggestion] Support decompiler based on Renpy 5.x games #167

Closed jwcloverain closed 8 months ago

jwcloverain commented 1 year ago

Here rpyc file script.rpyc

Full Traceback:

Decompiling script.rpyc to script.rpy...
Error while decompiling script.rpyc:
Traceback (most recent call last):
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\unrpyc.py", line 202, in worker
    tag_outside_block=args.tag_outside_block, init_offset=args.init_offset, try_harder=args.try_harder)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\unrpyc.py", line 174, in decompile_rpyc
    init_offset=init_offset)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\__init__.py", line 46, in pprint
    decompile_python=decompile_python, translator=translator).dump(ast, indent_level, init_offset, tag_outside_block)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\__init__.py", line 116, in dump
    super(Decompiler, self).dump(ast, indent_level, skip_indent_until_write=True)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\util.py", line 29, in dump
    self.print_nodes(ast)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\util.py", line 120, in print_nodes
    self.print_node(node)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\__init__.py", line 133, in print_node
    self.dispatch.get(type(ast), type(self).print_unknown)(self, ast)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\__init__.py", line 643, in print_init
    self.print_nodes(ast.block, 1)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\util.py", line 120, in print_nodes
    self.print_node(node)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\__init__.py", line 133, in print_node
    self.dispatch.get(type(ast), type(self).print_unknown)(self, ast)
  File "C:\Users\Jason Wu\Desktop\unrpyc-master\unrpyc-master\decompiler\__init__.py", line 735, in print_python
    code = ast.code.source
AttributeError: 'Python' object has no attribute 'code'
Decompilation of 1 file failed
madeddy commented 1 year ago

You should be able to use a old unrpyc version form the time of the game. Or not?

Edit: Ok. This will maybe not work with the earliest unrpyc versions from 2014. RenPy 5.x was 16 years ago and i don't think anybody writes a decompiler for this. RenPy uses there possible even the old *.rpyc(v1) format. So...sry to say.

CensoredUsername commented 8 months ago

Right now we don't support ren'py 5 due to its age. I'm honestly surprised the tool got this far. I might take a look at one point as I've never even seen a ren'py game from that time.

Either way, closing this as no additional information has been provided for 6 months.