Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

One Thousand Lies .rpa files

Featured Replies

  • Author
  • Localization

bugmenot, posted Sun Feb 19, 2017 4:56 pm (20886)


aluigi, any chance you can take a look at https://gofile.io/?c=1Y7GeA and see why it isn't working with the scripts you quoted? A Python based script can unpack the files without a problem but I'd prefer not to have to install it.

P.S. If you'd like a look at the Python script just send me a PM.
  • Author
  • Localization

aluigi, posted Mon Feb 20, 2017 10:16 pm (20910)


Ok I have updated the nopython script to version 0.1.2.
Please note that it's still a work-around and not a full implementation but it does the job with the archive you provided.
  • Author
  • Localization

bugmenot, posted Wed Feb 22, 2017 9:10 pm (20951)


Thanks.
  • Author
  • Localization

bugmenot, posted Fri Feb 24, 2017 8:14 pm (20995)


Here is another example where the script doesn't work (if you have the time to check it): link is dead
  • Author
  • Localization

aluigi, posted Sat Feb 25, 2017 10:57 am (21006)


Ok I decided to give up with the work-arounds and finally we have a Python Pickle deserializer that can be implemented in any script, including the RPA one :D
Script 0.2 http://aluigi.org/bms/pickle.bms
  • Author
  • Localization

bugmenot, posted Tue Feb 28, 2017 10:09 pm (21096)


Do I use it as usual or is there something specific about it?

Code:
  offset   filesize   filename
--------------------------------------
0x00000000 0x00000052
0x00000001 0x00000050 A-3.0 0000000002c2c978 42424242
Made with Ren'Py.%PNG


Error: unknown opcode 0x00000000 at offset 0x0000003c

- 0 files found in 0 seconds
  coverage file 0     0%   61         46336039   . offset 0000003d
  • Author
  • Localization

aluigi, posted Tue Feb 28, 2017 10:57 pm (21097)


The script works perfectly with the 2 archives you provided.
Are you using the script with other archives?
  • Author
  • Localization

bugmenot, posted Thu Mar 02, 2017 4:51 pm (21159)


Yes, here is an example: https://gofile.io/?c=YEiXjX

P.S. The old RPA archives (ren.py) (no python version) (script 0.1.2) is working fine for that one.
  • Author
  • Localization

aluigi, posted Thu Mar 02, 2017 5:17 pm (21167)


Ok I have updated pickle.bms to version 0.1.1:
http://aluigi.org/bms/pickle.bms

Anyway I have not found the same error you reported, here the only error was the offset/size because LONG1 and LONG4 were not correctly converted to number while in your example I see also problems with the filename.
  • Author
  • Localization

bugmenot, posted Fri Mar 03, 2017 7:58 am (21173)


The same error with version 0.1.1, here is the file I'm testing with: https://gofile.io/?c=YEiXjX
I'm using quickbms v0.7.7.0 by dragging the bms file over the exe and then selecting the rpa file and the output folder.
Code:
- GUI mode activated, remember that the tool works also from command-line
  where are available various options like folder scanning, filters and so on

- select the input archives/files to extract, type * or "" for whole folder and
subfolders
- select the output folder where extracting the files
- open input file D:\TEMP\archive.rpa
- open script D:\Tools\BMS\Python Pickle parser.bms
- set output folder D:\TEMP\OUT

  offset   filesize   filename
--------------------------------------
0x00000000 0x00000052
0x00000001 0x00000050 A-3.0 0000000002c2f67e 42424242
Made with Ren'Py.%PNG


Error: unknown opcode 0x00000000 at offset 0x0000003c

- 0 files found in 0 seconds
  coverage file 0     0%   61         46347521   . offset 0000003d

Press ENTER or close the window to quit


Here is an example where the code is partially working: https://gofile.io/?c=pHcQEZ
Code:
SauzerBracers   Armgear Bracers Of Truth        True    0       1       5
0       0       0       0       0.0     0.0     0.0     0.0     0.0     0.0
0.0     0.0     0.0     0.0     0.0     2       ['Sauzer']      100     clothbra
cers01  Cloth armor     True    0
SauzerLeggings  Greaves Leggings Of Truth       True    0       1       8
1       0       0       0       0.0     0.0     0.0     0.0     0.0     0.0
0.0     0.0     0.0     0.0     0.0     4       ['Sauzer']      250     clothleg
gings01 Cloth armor     True    0
ApoCloak        Pauldron        Gwen's Mantle   True    0       0       8
0       10      5       0       0.0     0.0     0.0     0.0     0.0     0.0
0.0     0.0     0.0     0.0     0.0     2       ['Apolimesho']  1500    clothsho
ulder04 Unique cloak usable only by Apolimesho. True    0
AmuShield       Shield  Shield Of The Bear      True    0       -4      25
0       0       0       2       0.0     0.0     0.0     0.0     0.0     0.0
-0.5    0.0     0.0     0.0     0.0     9       ['Amukiki']     1500    roundshi
eld13   Unique shield usable only by Amukiki.   True    0
Made with Ren'Py.%PNG


Error: unknown opcode 0x00000000 at offset 0x0000f92f

- 0 files found in 0 seconds
  coverage file 0     0%   63792      106762879  . offset 0000f930

Press ENTER or close the window to quit


Here is another example with a different error: https://gofile.io/?c=jUGRZG
Code:
- GUI mode activated, remember that the tool works also from command-line
  where are available various options like folder scanning, filters and so on

- select the input archives/files to extract, type * or "" for whole folder and
subfolders
- select the output folder where extracting the files
- open input file D:\TEMP\archive.rpa
- open script D:\Tools\BMS\Python Pickle parser.bms
- set output folder D:\TEMP\OUT

  offset   filesize   filename
--------------------------------------
0x00000000 0x00000052
0x00000001 0x00000050 A-3.0 00000000032f6413 42424242
Made with Ren'Py.yOya
Error: unknown opcode 0x00000010 at offset 0x00000038

- 0 files found in 0 seconds
  coverage file 0     0%   57         53454902   . offset 00000039

Press ENTER or close the window to quit


P.S. Links that might be helpful:
https://www.taricorp.net/2014/reverse-engineering-renpy-packages/
https://bitbucket.org/tari/renpy-rv
https://github.com/Lattyware/unrpa/blob/master/unrpa
  • Author
  • Localization

aluigi, posted Fri Mar 03, 2017 11:42 am (21177)


Here I have no errors. Everything works perfectly.
I have also checked the md5 of the online scripts and they are correct:
35cf4d7e8d4d31cdd24ea7cd4dcef228 *rpa_renpy_nopython.bms
48d376c5d5849c680f1bbd3779572e33 *pickle.bms
  • Author
  • Localization

bugmenot, posted Fri Mar 03, 2017 12:24 pm (21178)


Now i see what the problem was - I had to use the two files together.

Can you check what's the problem with the attached file (might be corrupt although I don't think so - I used offzip -a file folder 0 to unpack it from the zlib compressed version)

Code:
- GUI mode activated, remember that the tool works also from command-line
  where are available various options like folder scanning, filters and so on

- select the input archives/files to extract, type * or "" for whole folder and
subfolders
- select the output folder where extracting the files
- open input file D:\TEMP\00000000.dat
- open script D:\TEMP\BMS\rpa_renpy_nopython.bms
- set output folder D:\TEMP

  offset   filesize   filename
--------------------------------------
- enter in folder D:\TEMP
- open input file D:\TEMP\00000000.dat
- enter in folder .
  coverage file 0   100%   54479      54471      . offset 00000008
- open input file D:\TEMP\TEMPORARY_FILE
Error: unknown opcode 0x00000000 at offset 0x00000057

- 1 files found in 0 seconds
  coverage file 0     0%   88         54471      . offset 00000058
  coverage file 1     0%   0          54471      . offset 00000000


Code:
- select the input archives/files to extract, type * or "" for whole folder and
subfolders
- select the output folder where extracting the files
- open input file D:\TEMP\00000000.dat
- open script D:\TEMP\BMS\pickle.bms
- set output folder D:\TEMP

  offset   filesize   filename
--------------------------------------
0x00000000 0x00000080 2
0x00000002 0x00000063
0x00000003 0x00000072 2037411429
0x00000008 0x0000002e
0x00000009 0x00000070 ersistent
Persistent
q)?q}q(U_seen_translatesqc__builtin__
set
q]q(X
Error: unknown opcode 0x00000000 at offset 0x00000057

- 0 files found in 0 seconds
  coverage file 0     0%   88         54471      . offset 00000058


P.S. Thanks for all the time you spent on this.
  • Author
  • Localization

aluigi, posted Fri Mar 03, 2017 4:13 pm (21181)


bugmenot wrote:
Now i see what the problem was - I had to use the two files together.

What you mean?
Both rpa_renpy_nopython.bms and pickle.bms must be in the same folder yes.

Just a note, I did a test by using quickbms in GUI mode (double click on quickbms.exe) and the only error I had was with the (re)loading of the input file, something that I'm going to fix in the next version.

What's the file 00000000.dat you attached and why did you try to open it with quickbms?
It's not a rpa file.
If you got it from the extraction of the rpa archives, it's ok. I noticed it too and in fact there is a nameless file as first file. You get the same result by using the python version of the script.
  • Author
  • Localization

aluigi, posted Fri Mar 03, 2017 4:25 pm (21182)


Ah ok probably that file you attached is directly the TOC.
Let me check.
  • Author
  • Localization

aluigi, posted Fri Mar 03, 2017 4:33 pm (21183)


pickle.bms 0.1.2, there was an opcode (GLOBAL) not instructed to read data
  • Author
  • Localization

bugmenot, posted Fri Mar 03, 2017 6:40 pm (21185)


aluigi wrote:
Both rpa_renpy_nopython.bms and pickle.bms must be in the same folder yes.
Yes but I had renamed the pickle one so it wasn't working with ether one of them.

Great work, thanks but it seems there is more opcode's missing: Error: unknown opcode 0x00000088 at offset 0x000011d1
  • Author
  • Localization

aluigi, posted Fri Mar 03, 2017 7:07 pm (21186)


Yes, you are right.
pickle.bms 0.1.3 and I have also changed one word in rpa_renpy_nopython.bms 0.2a due to a modification of the pickle script to avoid problems with the variable names of other scripts using it (currently none).
  • Author
  • Localization

bugmenot, posted Fri Mar 03, 2017 7:12 pm (21187)


Shouldn't OPCODE PICKLE_NEWTRUE be DATA = 1 instead of 0?
  • Author
  • Localization

aluigi, posted Fri Mar 03, 2017 7:25 pm (21188)


Eh, copy&paste and rush :D
  • Author
  • Localization

bugmenot, posted Sat Mar 04, 2017 8:25 pm (21200)


:D

BTW Are you sure that PICKLE_NEWTRUE and PICKLE_NEWFALSE should return an Int value and not a Boolean (True & False)?

Code:
sage: from pickle import *
sage: from sage.misc.explain_pickle import *
sage: test_pickle(NEWTRUE)
    0: \x88 NEWTRUE
    1: .    STOP
highest protocol among opcodes = 2
explain_pickle in_current_sage=True/False:
True
result: True

Code is taken from: http://doc.sagemath.org/html/en/reference/misc/sage/misc/explain_pickle.html
  • Author
  • Localization

aluigi, posted Sat Mar 04, 2017 8:33 pm (21201)


Do you mean returning the word "true" and "false" instead of 1 and 0?
In quickbms it's better 1 and 0 instead of using strings and honestly I don't see any difference.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.