Tool Ren'Py UnRen for MacOS and Linux v0.8.2

5.00 star(s) 1 Vote

darklink5222

Newbie
Jul 16, 2017
85
243
I had the same issue. Do this to fix it.

1. Extract the unren files to any location.
2. Open UnRen.command in text editor.
3. Go to line 72 (may be different) where rpatool_raw and unrpyc_raw variables are defined. Your last screenshot shows the exact lines I am referring to. Remove space in this text "UnRen Tools"
4. Remove space from the actual UnRen Tools folder
5. This error will now be gone and will likely get python is not defined.
6. If you get python is not defined, find and replace "python " (that is python with space at the end) to "python2 " (that is python2 with space). Select match case option. Replace all.
7. After this it will work and ask you to drag and drop your game directory.
8. It will give an error after you select an option. Repeat step 5 in rpatool file inside UnRenTools folder.
Didn't end up working for me unfortunately. 1111.png
 

stallerlelo12

New Member
Jan 18, 2022
2
1
I think it is because of this space in this dir "UnRen v0.8.2"
Likely that too. Remove space and try.

Didn't end up working for me unfortunately. View attachment 1891228
Not sure why it is still not working for you.

Try this, put this after line 72
echo "rpatool path:$rpatool_raw"

See what path you get when you run the command. See if you can access that path (copy and paste in terminal and enter). Try accessing the path in terminal by manually accessing that folder to see if terminal uses the same path format.

Do the same after unrpyc_raw variable declaration to see what path that returns. Use unrpyc_raw variable in echo in this line.

Lastly, remove underscore from the parent folder. Remove all special characters from the entire path and try. That's all I can think of. Not an expert in bash or python.
 

ArchmageFil

Newbie
Aug 19, 2017
22
16
Getting this to work wasn't easy. Thanks to stallerlelo12's post finally succeeded. Also keeping in archive proprietary apple .DS_Store files somehow strange, they just invisible junk on Gnu/Linux.

By the way, if someone just need to unpack the *.rpa archive, you can make it one-click-operation. Write in text editor:
Code:
[Desktop Entry]
Encoding=UTF-8
Path=    // ← must be empty or all extracted go there
Exec=python2 "/full/path/to/rpa tool/rpatool" -x  // ← dont forget "" if there spaces
Icon=
Terminal=true
TerminalOptions=
Type=Application
MimeType=application/rpa;
Name=rpatool -extract
Save it in "/home/username/.local/share/applications/" like "unpack-renpy.desktop" (only extension matters). Now go in settings find file associations and add file type like "application/rpa" and filename template "*.rpa", and associate it with rpatool-extract. (in my KDE-Plasma last operation was not even required - the system itself picked up the association with the only suitable application)
After that all file managers must run extract on enter/mouse click. Same can be done with unrpyc.py. It may seem complicated, but after doing it 1 time, then it's easy to repeat.
 
Jan 19, 2018
2
3
Got it working thanks to stallerlelo12's guide, and managed to cut some steps from the process.
  1. If you don't have python2 already on your machine, install it. On Ubuntu, run "sudo apt update" on your terminal, then "sudo apt install python2".
  2. Extract the UnRen files.
  3. Open Unren.command in your text editor of choice. Using Find and Replace, find "python " (python with a space at the end) and replace with "python2 " (python2 with a space at the end). Select Match Case option. Replace All. Save and close.
  4. Open rpatool (in Unren Tools) in your text editor of choice. On the first line, replace the "python" by "python2". It should look like "#!/usr/bin/env python2" now. Save and close.
  5. You're done! Execute UnRen as usual by running from the terminal via "./UnRen.command" and enjoy.
 
  • Like
Reactions: Silvonch

hhd12258

Member
Jun 18, 2018
236
91
game


UnRen for Mac and Linux v0.8.2
by goobdoob @ www.f95zone.to
based on the original version by jimmy5 @ www.f95zone.to
and UnRen.bat by sam @ www.f95zone.to
Python is installed, detected
Please drag + drop the game you are wanting to modify into the terminal.
'/Project-Redacted--0.1c-pc'

What would you like to do?
1) Extract RPA packages
2) Decompile rpyc files
3) Decompile rpyc files, overwriting existing rpy files
4) Enable Console and Developer Menu
5) Enable Quick Save and Quick Load
6) Force enable skipping of unseen content
7) Force enable rollback (scroll wheel)
8) Open game directory

99) Options 1-7 (no overwrite)

q) quit UnRen

1
Extracting RPA packages
extracting archive.rpa
Traceback (most recent call last):
File "/UnRen v0.8.2/UnRen Tools/rpatool", line 363, in <module>
archive = RenPyArchive(archive, padlength=padding, key=key, version=version, verbose=arguments.verbose)
File "/UnRen v0.8.2/UnRen Tools/rpatool", line 65, in __init__
self.load(file)
File "/UnRen v0.8.2/UnRen Tools/rpatool", line 230, in load
self.indexes = self.extract_indexes()
File "/UnRen v0.8.2/UnRen Tools/rpatool", line 111, in extract_indexes
indexes = _unpickle(contents)
File "/UnRen v0.8.2/UnRen Tools/rpatool", line 38, in _unpickle
return pickle.loads(data)
File "/usr/lib/python2.7/pickle.py", line 1388, in loads
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 864, in load
dispatch[key](self)
File "/usr/lib/python2.7/pickle.py", line 892, in load_proto
raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 5

fixed by using rpatool directly
 
Last edited:

Emoon

Member
May 4, 2017
124
239
Unren 8.2 doesn't work with Ren'Py 8.

Run the directly in the games 'game' folder. Follow the instructions on the Github page. It's not as convenient as the solutions we had before but works for Ren'Py 7 & 8 packages.

I'm not yet sure if the bash script needs an update or the rpatool but i guess it's the bash script as the rpatool works when launched on its own from the games 'game' folder.
 
Last edited:

witcher123

Member
Jun 19, 2017
185
115
can anybody help me get Unren working on mac? I'm using OS Monterey 12.5.1 and python 2 was depreciated. is there another way to extract assets from .rpa files?
 

Kijuz

Newbie
Jan 29, 2021
16
47
game


UnRen for Mac and Linux v0.8.2
by goobdoob @ www.f95zone.to
based on the original version by jimmy5 @ www.f95zone.to
and UnRen.bat by sam @ www.f95zone.to

....

fixed by using rpatool directly
I have used Windows for a long, long time, but recently switched to Linux. I have also programmed a few things, I enjoy it and like the challenge, but I am far from a programmer. As such I thought I would try and convert the UnRen by Sam bat script to a script using the Bash shell as a learning challenge for programming Bash. I have attached my working file, and I have tested on about 15 games. I ran into errors using the UnRen-1.0.5.zip posted in the first post on the Windows UnRen.bat thread with some random RPYC files not de-compiling properly. I then found a new post with UnRen-ultrahack.rar by VepsrP attached for some people who were having de-compile issues. I switched to the changes made in that file, and all errors I was having were now gone. I have also added some changes to the script from the UnRen-Ultrahack version, such as deobfuscating and instead of deleting the RPA file when extracted give the option to rename it instead. I think that is better then deleting.

I tried to credit the creators properly, I credited Sam as the original creator and VepsrP for the Ultrahack changes, and left the previous credits as well. If there is anyone missing I should add, let me know.

I have attached the file below. It is a readable script, so you will need to give it execute permissions (chmod +x <script>). I have tried to optimise the coding as I went, but I am new to Bash scripting and Googled things I did not know how to create. I tried to find a few examples for anything I was looking for incase there was a better, or optimised/preferred/correct way of doing things. As I have tried to recreate the Windows BAT file it may not use the best practices for Linux or Bash, i.e. there may be better ways to do things. If you have any feedback let me know, I enjoy this stuff so am always eager to learn. I made and tested this on Linux Mint 21, so if it doesn't work for you, you can post your error but bear in mind I am two weeks into Linux, so I myself may not have a fix or solution.

FYI, I also tested my script on the game you linked to on Google Drive, Project Redacted, and it worked ok, extracted the archive.rpa file and ran.

Forgot to add, you extract the file in to the Games folder (where the game, lib, and renpy folders are) and run it, just like the Windows BAT.
 

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,151
4,698
I have used Windows for a long, long time, but recently switched to Linux. I have also programmed a few things, I enjoy it and like the challenge, but I am far from a programmer. As such I thought I would try and convert the UnRen by Sam bat script to a script using the Bash shell as a learning challenge for programming Bash. I have attached my working file, and I have tested on about 15 games. I ran into errors using the UnRen-1.0.5.zip posted in the first post on the Windows UnRen.bat thread with some random RPYC files not de-compiling properly. I then found a new post with UnRen-ultrahack.rar by VepsrP attached for some people who were having de-compile issues. I switched to the changes made in that file, and all errors I was having were now gone. I have also added some changes to the script from the UnRen-Ultrahack version, such as deobfuscating and instead of deleting the RPA file when extracted give the option to rename it instead. I think that is better then deleting.

I tried to credit the creators properly, I credited Sam as the original creator and VepsrP for the Ultrahack changes, and left the previous credits as well. If there is anyone missing I should add, let me know.

I have attached the file below. It is a readable script, so you will need to give it execute permissions (chmod +x <script>). I have tried to optimise the coding as I went, but I am new to Bash scripting and Googled things I did not know how to create. I tried to find a few examples for anything I was looking for incase there was a better, or optimised/preferred/correct way of doing things. As I have tried to recreate the Windows BAT file it may not use the best practices for Linux or Bash, i.e. there may be better ways to do things. If you have any feedback let me know, I enjoy this stuff so am always eager to learn. I made and tested this on Linux Mint 21, so if it doesn't work for you, you can post your error but bear in mind I am two weeks into Linux, so I myself may not have a fix or solution.

FYI, I also tested my script on the game you linked to on Google Drive, Project Redacted, and it worked ok, extracted the archive.rpa file and ran.

Forgot to add, you extract the file in to the Games folder (where the game, lib, and renpy folders are) and run it, just like the Windows BAT.
Holy shit dude! This is awesome! Thank you so much for doing this. It works just like the windows version.

You need to create a new thread and post this.
 

Kijuz

Newbie
Jan 29, 2021
16
47
Holy shit dude! This is awesome! Thank you so much for doing this. It works just like the windows version.

You need to create a new thread and post this.
Thanks for the encouragement.

I am going to give the code a little review and finesse, I think there is a bug with the part that is unren-skip.py as it is not setting the Skip Text to Unseen like the Windows version, and merge some changes. I will then put it on Github as others are suggesting, and then I will post a new thread.
 

Kijuz

Newbie
Jan 29, 2021
16
47
Here is the latest update, version 1.0.9.9. I have named it this based on the 1.0.9 from UnRen.bat, and the .9 from UnRen-Ultrahack. Version numbers will follow this scheme going forward as I am simply making a working script for Linux. The actual software that does the work, UnRpyc and Rpatool, is being maintained by others and gathered from those existing scripts.

UnRen.bat - RPA Extractor, RPYC Decompiler, Console/Developer Menu Enabler: f95zone.to/threads/3083

UnRen-old, UnRen-Ultrahack, UnRen Windowed, UnRen-Powershellhack: f95zone.to/threads/92717

Before I post a new thread I am providing it here for others to use first.

You don't have permission to view the spoiler content. Log in or register now.

You can download it from , or attached.

If no issues, I will make a new thread for changes going forward.
 

SteelyDan14

Formerly Known as GeekBone
Modder
Donor
Jan 13, 2018
1,151
4,698
Here is the latest update, version 1.0.9.9. I have named it this based on the 1.0.9 from UnRen.bat, and the .9 from UnRen-Ultrahack. Version numbers will follow this scheme going forward as I am simply making a working script for Linux. The actual software that does the work, UnRpyc and Rpatool, is being maintained by others and gathered from those existing scripts.

UnRen.bat - RPA Extractor, RPYC Decompiler, Console/Developer Menu Enabler: f95zone.to/threads/3083

UnRen-old, UnRen-Ultrahack, UnRen Windowed, UnRen-Powershellhack: f95zone.to/threads/92717

Before I post a new thread I am providing it here for others to use first.

You don't have permission to view the spoiler content. Log in or register now.

You can download it from , or attached.

If no issues, I will make a new thread for changes going forward.
Working great for me!

Thanks again!
 
  • Like
Reactions: Kijuz

Kijuz

Newbie
Jan 29, 2021
16
47
Does UnRen work for Mac again? Or is it still broken?
I have had a look at the original Mac file, and I have started some integration to the script I already released for Linux to also work for MacOS, and will post it here for you to test as I don't have access to MacOS. The main differences is the folder location and how to launch it, I have already adapted the script to accept drag and drop and to set the folder locations correctly for MacOS in script.
 
  • Like
Reactions: DLgamer

Kijuz

Newbie
Jan 29, 2021
16
47
EDIT: Fix miss -quote on Quicksave n Quickload key
======
Here is an updated UnRen for Mac and also works for Linux. Based on the latest UnRen-ultrahackv10.

You don't have permission to view the spoiler content. Log in or register now.
Are you able to test on Mac if it works correctly? I don't have Mac, but it works ok except for a bug I found with game directories that have spaces in the names. I tried to submit to Codeberg but is is giving me a permissions issue, so I will attach it here, with my changes documented below. The changes fix the quoting, folder names were being expanded when passed to trap and as they have a space it was breaking the command. The folders weren't being cleaned up. Tested on Linux Mint 21, not MacOS.

I also uploaded a new script on the previous pages, mainly to learn Bash scripting having moved to Linux now, and because at a quick glance at the first code I wasn't sure where to start (at the time). While my script has a bug or two I was working on, as well as adding, in theory, support for the Mac drag and drop, I did it mainly as a learning experience. Your update to the original still has a polish to it mine does not yet have, and this works ok for me, I will stop development and contribute to your version instead as it already has a userbase and this thread. I am just unable to test if the changes I make work on Mac.

You don't have permission to view the spoiler content. Log in or register now.
 

dikau

Member
Dec 16, 2019
315
271
Are you able to test on Mac if it works correctly? I don't have Mac, but it works ok except for a bug I found with game directories that have spaces in the names. I tried to submit to Codeberg but is is giving me a permissions issue, so I will attach it here, with my changes documented below. The changes fix the quoting, folder names were being expanded when passed to trap and as they have a space it was breaking the command. The folders weren't being cleaned up. Tested on Linux Mint 21, not MacOS.

I also uploaded a new script on the previous pages, mainly to learn Bash scripting having moved to Linux now, and because at a quick glance at the first code I wasn't sure where to start (at the time). While my script has a bug or two I was working on, as well as adding, in theory, support for the Mac drag and drop, I did it mainly as a learning experience. Your update to the original still has a polish to it mine does not yet have, and this works ok for me, I will stop development and contribute to your version instead as it already has a userbase and this thread. I am just unable to test if the changes I make work on Mac.

You don't have permission to view the spoiler content. Log in or register now.
Yes, I'm using a mac, and I even installed a Linux vm just to check for compatibility and still miss that quoting bug :LOL:

Thanks for the catch and I will update my repo later for your changes, and other changes I have in mind...
 

RoughlySpecific

Active Member
May 27, 2020
615
771
Thanks for updating Unren, both of you. The old one stopped working on some newer games, so this came just in time for me.

Tested on Linux Mint 21, not MacOS.
Just used in on up-to-date Manjaro, and at first glance it worked fine as well.

Edit: Used it on a couple of games now. All worked as expected.
 
Last edited:
5.00 star(s) 1 Vote