- Dec 13, 2017
- 1,387
- 1,384
Another update. Now there are even more options to choose from.
I seem to have described everything quite clearly in the change log. Now there is a new numbering based on the engine versions.Have the newer Unren versions disappeared? The only ones that seems to be left are 7.5/8, and the windowed version. Where is the console version of 12/13?
There's no further Ren'Py version beyond v8. He has just matched UnRen versions to Renpy'sI read the change log, but I am still confused. I do not see any versions beyond v8?
View attachment 1931995
Traceback (most recent call last):
File "F:\f95\ToBeAKing-0.8.1-pc\unrpyc.py", line 53, in <module>
import decompiler
File "../decompiler/__init__.py", line 28, in <module>
from importlib import reload
I calmly decompiled the code of this game. Just exactly on this tested. I'll check again, but I haven't noticed any such problems.Anyone else having issues decompiling ToBeAKing-0.8.1-pc which is 7.5 with the 7.5 version? Getting the below error when i try
Code:Traceback (most recent call last): File "F:\f95\ToBeAKing-0.8.1-pc\unrpyc.py", line 53, in <module> import decompiler File "../decompiler/__init__.py", line 28, in <module> from importlib import reload
What about versions 7.4.7 or 7.5.0? Or do you mean higher versions?I read the change log, but I am still confused. I do not see any versions beyond v8?
View attachment 1931995
Would you mind also updating that big red text just to be safe and clear all misunderstandings?I seem to have described everything quite clearly in the change log. Now there is a new numbering based on the engine versions.
Attention. UnRen v.0.12 and UnRen (windowed by Gideon)v.2+ works only with RenPy 7.4.7+
UnRen v.0.13 works only with RenPy 8+
UnRen v.0.11 for 7.4-
Windowed version requires python 3, PyQt5 and the skill to run files with the .py extension
Yes. I really forgot about this description. I'll fix it now. Also corrected the title.Would you mind also updating that big red text just to be safe and clear all misunderstandings?
Yes. I inserted the wrong version of un.rpyc into the code. Now everything works as it should, I checked it on this game.Anyone else having issues decompiling ToBeAKing-0.8.1-pc which is 7.5 with the 7.5 version? Getting the below error when i try
Code:Traceback (most recent call last): File "F:\f95\ToBeAKing-0.8.1-pc\unrpyc.py", line 53, in <module> import decompiler File "../decompiler/__init__.py", line 28, in <module> from importlib import reload
There is already a check. I have already added everything I could find on this issue.Suggestion: If you select Y to delete the rpa after extraction, check the return status first. E.g. if the extraction failed, don't delete the rpa.
Thanks for updating, this was the route of my confusionYes. I really forgot about this description. I'll fix it now. Also corrected the title.
def reconstruct_arginfo(arginfo):
if arginfo is None:
return ""
rv = ["("]
sep = First("", ", ")
for (name, val) in arginfo.arguments:
rv.append(sep())
if name is not None:
rv.append("%s=" % name)
rv.append(val)
if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
rv.append(sep())
rv.append("*%s" % arginfo.extrapos)
if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
rv.append(sep())
rv.append("**%s" % arginfo.extrakw)
rv.append(")")
return "".join(rv)
def reconstruct_arginfo(arginfo):
if arginfo is None:
return ""
rv = ["("]
sep = First("", ", ")
for i, (name, val) in enumerate(arginfo.arguments):
rv.append(sep())
if i in arginfo.starred_indexes:
rv.append("*%s" % val)
elif i in arginfo.doublestarred_indexes:
rv.append("**%s" % val)
elif name is not None:
rv.append("{}={}".format(name, val))
else:
rv.append(val)
if hasattr(arginfo, 'extrapos') and arginfo.extrapos:
rv.append(sep())
rv.append("*%s" % arginfo.extrapos)
if hasattr(arginfo, 'extrakw') and arginfo.extrakw:
rv.append(sep())
rv.append("**%s" % arginfo.extrakw)
rv.append(")")
return "".join(rv)
set
as parameter to line 111 in unrpyc.rpy like this?class_factory = magic.FakeClassFactory((frozenset, PyExpr, PyCode, RevertableList, RevertableDict, RevertableSet, Sentinel, set), magic.FakeStrict)
How do I find out what version of Renpy was used to create a particular game?
game/script_version.txt
estrada777's method is not safe, reason: Ren'Py doesn't overwrite this file, so if the dev doesn't delete the old "script_version.txt" before building a new distribution, Ren'Py keeps the old file, even if another (older or newer) version is used. An example is "Corrupted Kingdoms". In the original uncompressed version "script_version.txt" says "(7, 3, 5)" but actually it's built with 7.4.11.renpy/__init__.py
Huh, I didn't know that the script_version.txt file doesn't get replaced, that's probably a bug.estrada777's method is not safe, reason: Ren'Py doesn't overwrite this file, so if the dev doesn't delete the old "script_version.txt" before building a new distribution, Ren'Py keeps the old file, even if another (older or newer) version is used. An example is "Corrupted Kingdoms". In the original uncompressed version "script_version.txt" says "(7, 3, 5)" but actually it's built with 7.4.11.
As I don't use giqui's method, I don't know for sure if it's safe but I guess it is.
Another safe method is to start the game and then check "log.txt" in the games root folder (where the .exe is located).
I'll take a look and check today. Then I will update this version of the tool again. In addition, this piece of code is exactly what I spied in the issues of the original decompiler.VepsrP,
I tried Unren v7.5.0 v1 today with Love & Sex: Second Base and I think there is a little issue (there's no error while decompiling, but some of the arguments are missing an asterisk) with reconstruct_arginfo.
extrapos and extrakw are deprecated and I see you've added a check for that, but the ArgumentInfo now has starred_indexes and doublestarred_indexes instead (You must be registered to see the links)
I changed in the util.py
toCode:def reconstruct_arginfo(arginfo): if arginfo is None: return "" rv = ["("] sep = First("", ", ") for (name, val) in arginfo.arguments: rv.append(sep()) if name is not None: rv.append("%s=" % name) rv.append(val) if hasattr(arginfo, 'extrapos') and arginfo.extrapos: rv.append(sep()) rv.append("*%s" % arginfo.extrapos) if hasattr(arginfo, 'extrakw') and arginfo.extrakw: rv.append(sep()) rv.append("**%s" % arginfo.extrakw) rv.append(")") return "".join(rv)
and now it works fine. (attached you can find my util.py)Code:def reconstruct_arginfo(arginfo): if arginfo is None: return "" rv = ["("] sep = First("", ", ") for i, (name, val) in enumerate(arginfo.arguments): rv.append(sep()) if i in arginfo.starred_indexes: rv.append("*%s" % val) elif i in arginfo.doublestarred_indexes: rv.append("**%s" % val) elif name is not None: rv.append("{}={}".format(name, val)) else: rv.append(val) if hasattr(arginfo, 'extrapos') and arginfo.extrapos: rv.append(sep()) rv.append("*%s" % arginfo.extrapos) if hasattr(arginfo, 'extrakw') and arginfo.extrakw: rv.append(sep()) rv.append("**%s" % arginfo.extrakw) rv.append(")") return "".join(rv)
Also wouldn't it make sense to addset
as parameter to line 111 in unrpyc.rpy like this?
class_factory = magic.FakeClassFactory((frozenset, PyExpr, PyCode, RevertableList, RevertableDict, RevertableSet, Sentinel, set), magic.FakeStrict)
This way the check if there's an unpickling error in magic.rpy should work without uncommenting it.
Thanks for looking into it.