1. In the Ren'Py SDK directory, open the following files using a text editor such as "Atom", "Editra", or "jEdit": "launcher/game/archiver.rpy" and "renpy/loader.py"
2. Find the following string (using "Find" (Ctrl-F)): "RPA-3.0 " (It's okay if there is anything after it)
3. Replace the string with any 8-byte string.
You can use printable ASCII characters (this is good). Examples:
"ABCDEFGH"
"12345678"
"ASDFGHJK"
"!@#$%^&*"
You can also use non-printable characters (this is good). Examples:
"\x01\x02\x03\x04\x05\x06\x07\x08"
"\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11"
Using the following headers will cause existing common archive unpackers to attempt to parse the file, but fail (this is good):
"ZiX-12A "
"ZiX-12B "
"RPA-2.0 "
"ALT-1.0 "
"\x58\x50\x33\x0d\x0a\x20\x0a\x1a"
Use only 7-bit ASCII characters. The following is not acceptable (this is bad):
"åéêîíøπ¬"
"ホゲホゲホゲホゲ"
The following headers will not prevent unpacking with the current version of common archive unpackers, so avoid these (this is bad):
"RPA-3.0 "
"RPA-3.2 "
"RPA-4.0 "
Before:
Code: Select all
padding = b"RPA-3.0 XXXXXXXXXXXXXXXX XXXXXXXX\n"
self.f.write(b"RPA-3.0 %016x %08x\n" % (indexoff, self.key))
if l.startswith(b"RPA-3.0 "):
Code: Select all
padding = b"12345678XXXXXXXXXXXXXXXX XXXXXXXX\n"
self.f.write(b"12345678%016x %08x\n" % (indexoff, self.key))
if l.startswith(b"12345678"):
After you are done making your changes, save both files, then close them.
4. Create distributions with the Ren'Py Launcher.
You can now distribute your game with the Ren'Py Launcher. The archives created in the distribution will (if you didn't use one of the "bad" strings above) not be openable in the current version of common archive unpackers like GARbro, unrpa, rpatool, arc_unpacker, etc…
This should be good enough to stop CG distributors or store reviewers from unpacking your game on the first day of release (or even before that).