Tool Ren'Py rpa.bat 1.02 - a DOS interface for rpatool

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,863
16,012
Overview:
Among the persons who use the, excellent, UnRen.bat, some want to later do the opposite process, and archive in a RPA file, the images, scripts, etc. unarchived by UnRen.bat. Then they face a problem, they don't have Python, nor necessarily the knowledge to use rpatool. This tool provide them an easy way to archive back a game content into a unified rpa archive, or into more than one archive. For the more advanced user, it can also act as direct interface to rpatool, letting anyone use it with the version of Python embedded into the Ren'py game they are working on.

Updated: 27 February 2021
Author: anne O'nymous
Tool version: 1.02
Language: English

Features:
Frontend for generic rpa manipulations
By running the tool without parameters, you access its menu letting you archive the scripts, and the content of the "game/images" and "game/gui" directories, including any sub directory they can have. Depending of your choice, the result will be a global rpa archive, or separated rpa archives.​
Interface to rpatool
You can also use this tool like you would have used rpatool as Python script. Just pass the command line to rpa.bat, and look rpatool do its magic.​
For a list of the available command of rpatool, just type rpa.bat -h from the DOS console.​
Offer the possibility to use your own scheme
Sometimes your needs are really specific. In this case, open the rpa.bat file with any text editor (notepad is good) and look at the top of the file, right bellow the first big block of text. You'll found both the place where to put your custom scheme, and the explanations to help you do it.​


Instruction:
Extract the content of the archive in the game root directory. Then launch rpa.bat, either from the console or directly from windows files explorer ; this with or without parameters.

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

Download: rpa.bat


Legal notice:
This tool use by Shizmob, and part of UnRen.bat by Sam.


Screenshots:
rpa.bat.jpg
 
Last edited:

MG_

Newbie
May 14, 2020
37
48
Great thanks for the tool, but:

Let's say, I've a dir with
-\Images\patch\*(image files)
-\patch\*(script files)

Now I want to pack these into a single rpa. For this I've to make 2 rpas, images and scripts with options 2,3. Option 6 doesn't work in this case.

So, another option for this would be nice for the next release.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,863
16,012
So, another option for this would be nice for the next release.
It would be a too specific option.

But now that you've an easy access to rpatool, you can do it yourself.
Or you can look at the updated version I just uploaded. It add the possibility to create your own archive scheme, in order to meet specific needs ; just open rpa.bat with any text editor, and look at the top of the text, right bellow the first big block of text, everything is explained.

In your particular case, it should looks like this (I removed the comments):
Code:
:customScheme
set "dest=patch"
call :create
echo   Compressing according to a custom scheme into %gamedir%%dest%.rpa
cd "%gamedir%Images\patch"
call :batchRecursive "*" "%dest%"
cd "%gamedir%\patch"
call :batchRecursive "rpy" "%dest%"

cd "%currentdir%"
echo.
set "custom=DONE"
goto :eof
 
  • Like
Reactions: LePorn and MG_

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,863
16,012
Oops...

There were a small bug in the last version, and the tool sometimes refused to works because of this. It's now fixed, sorry.
 
  • Like
Reactions: "CJ" and Meushi

ec24ce

New Member
Dec 3, 2018
3
0
Hello there, Somehow I was unable to edit the scripts.rpa file to edit and import the game's language back. Inside the scripts.rpa game folder. Can you write step by step what I need to do to edit this scripts.rpa file? (as an example scenario according to the folder in the picture)

RPA Edit.png
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,863
16,012
Hello there, Somehow I was unable to edit the scripts.rpa file to edit and import the game's language back.
Hmm, normally it should be this:
  • Edit the "rpa.bat" file
  • line 31:
    Replace: set "dest=NAME OF YOUR ARCHIVE"
    by: set "dest=scripts.rpa"
  • line 38:
    Replace: cd "%gamedir%images"
    by: cd "%gamedir\tl"
  • Save the "rpa.bat" file
  • Launch the "rpa.bat" file
  • Chose the option "7) Custom scheme."
 
  • Like
Reactions: YadenYu

ec24ce

New Member
Dec 3, 2018
3
0
Thank you very much for your help.
I created scripts.rpa but it was a huge 3.6GB file and there was no text I edited...
Something went wrong, I'm very inexperienced. :(
From the folder, I just want to open the scripts.rpa file, edit it, then close it again.
Can you help me?

RPA Edit.png
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,863
16,012
I created scripts.rpa but it was a huge 3.6GB file and there was no text I edited...
3.6GB, yeah, it's clearly too much for such rpa file. It shouldn't even reach more than 10 MB.
What have you done for it to have this size ? Not what I said above, or there's a big bug in my script.


From the folder, I just want to open the scripts.rpa file, edit it, then close it again.
Hmm, a question, why do you want to do that ?
 

ec24ce

New Member
Dec 3, 2018
3
0
  • I've probably packed everything in the "Game" folder together with its previous and edited versions...
  • I hope it's not too silly, I'm trying to make the game language Turkish...
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,863
16,012
I hope it's not too silly, I'm trying to make the game language Turkish...
It's not silly, but you don't need to add the translation files into the game rpa file. You can perfectly have a rpa file dedicated to them.
What would change the scheme to use:
  • Edit the "rpa.bat" file
  • line 31:
    Replace: set "dest=NAME OF YOUR ARCHIVE"
    by: set "dest=turkish.rpa"
  • line 38:
    Replace: cd "%gamedir%images"
    by: cd "%gamedir\tl\turkish"
  • Save the "rpa.bat" file
  • Launch the "rpa.bat" file
  • Chose the option "7) Custom scheme."

Note: I assumed that the translation folder is named "turkish". If you used another name, it's it that you've to use in line 38.