Trying to find the dialog script in Dragon Quest Mobile (Android) ports UPDATE!! Current script incompatible with DQ III

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Choppasmith
Posts: 7
Joined: Tue Aug 07, 2018 2:03 am

Trying to find the dialog script in Dragon Quest Mobile (Android) ports UPDATE!! Current script incompatible with DQ III

Post by Choppasmith »

UPDATE!!

So I figured out it's a file in all three games called retro_res.dat with a number based on which entry it belongs to. The Dragon Quest script on your site DOES INDEED work in extracting all the data from I AND II, but strangely does not work on III.

I've included a 7z with all three for comparison, I imagine there's probably some tiny little difference that makes the script not work right.

http://www.mediafire.com/file/y9m8v7l85 ... aw.7z/file

Thanks in advance for any help!



Hey there! Was hoping to find a way to extract the script for the first three Dragon Quest games on mobile. I have the Android APKs and there's an assets folder (at least with Dq1) with a folder full of files with no extension and nothing that shows up in a hex editor.

http://www.mediafire.com/file/6kmsbvc3cmcbddd/assets.7z

There's also a config.bin I threw in there too. I was able to follow aluigi's guide for determining what kind of compression the bin uses and it's 167, DYNAMIC UNZIP. But I'm honestly not sure how to apply that to multiple files without extensions to see if uses the same kind of compression. I'm kinda new to all this.

Thank you very much in advance for any help!
Last edited by Choppasmith on Wed Aug 15, 2018 3:39 am, edited 2 times in total.
Choppasmith
Posts: 7
Joined: Tue Aug 07, 2018 2:03 am

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports (config.bin, no extension files)

Post by Choppasmith »

Not sure I'm doing somethign wrong or not but when I use the DQ Script on config.bin

Code: Select all

Error: incomplete input file 0: C:\Users\mog11\Downloads\DQ1\assets\config.bin
       Can't read 31123 bytes from offset 000ff478.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0   100%   1045624    1045624    . offset 000ff478

Last script line before the error or that produced the error:
  9   getdstring NAME NAMESZ

Press ENTER or close the window to quit


and the assets folder

Code: Select all

- filter   1: *
- start the scanning of the input folder: C:\Users\mog11\Downloads\DQ1\assets\dq1
- open input file C:\Users\mog11\Downloads\DQ1\assets\dq1\.\_05hcgo8ojs
- open script C:\Users\mog11\Downloads\dragon_quest.bms
- set output folder C:\Users\mog11\Downloads\DQ1\assets\extract

  offset   filesize   filename
--------------------------------------

Error: incomplete input file 0: C:\Users\mog11\Downloads\DQ1\assets\dq1\_05hcgo8ojs
       Can't read 6639 bytes from offset 000039b7.
       Anyway don't worry, it's possible that the BMS script has been written
       to exit in this way if it's reached the end of the archive so check it
       or contact its author or verify that all the files have been extracted.
       Please check the following coverage information to know if it's ok.

  coverage file 0   100%   14775      14775      . offset 000039b7

Last script line before the error or that produced the error:
  9   getdstring NAME NAMESZ


And the Arslan script

Code: Select all

open input file C:\Users\mog11\Downloads\DQ1\assets\config.bin
- open script C:\Users\mog11\Downloads\arslan.bms
- set output folder C:\Users\mog11\Downloads\DQ1\assets\extract

  offset   filesize   filename
--------------------------------------
- enter in folder C:\Users\mog11\Downloads\DQ1\assets
  coverage file 0     0%   0          1045624    . offset 00000000
- open input file C:\Users\mog11\Downloads\DQ1\assets\config.IDX

- error in src\file.c line 465: fdnum_open()
Error: No such file or directory

Last script line before the error or that produced the error:
  4   open FDDE "IDX"


Code: Select all

 open input file C:\Users\mog11\Downloads\DQ1\assets\dq1\_1x3qd6qe1q
- open script C:\Users\mog11\Downloads\arslan.bms
- set output folder C:\Users\mog11\Downloads\DQ1\assets\extract

  offset   filesize   filename
--------------------------------------
- enter in folder C:\Users\mog11\Downloads\DQ1\assets\dq1
  coverage file 0     0%   0          1080174    . offset 00000000
- open input file C:\Users\mog11\Downloads\DQ1\assets\dq1\_1x3qd6qe1qIDX

- error in src\file.c line 465: fdnum_open()
Error: No such file or directory

Last script line before the error or that produced the error:
  4   open FDDE "IDX"


Am I missing something?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports (config.bin, no extension files)

Post by aluigi »

config.bin is just a png image.
The other files are all encrypted probably with aes.
Choppasmith
Posts: 7
Joined: Tue Aug 07, 2018 2:03 am

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports (config.bin, no extension files)

Post by Choppasmith »

Anything else I can try? I tried running your comtype script on some of the large files and sadly got nothing.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports (config.bin, no extension files)

Post by aluigi »

Please NEVER use the comtype scanner.
And I told you that it's "encrypted" so why did you try a "compression"?
Without encryption algorithm (as I said it's probably aes) and key you can do nothing.
Choppasmith
Posts: 7
Joined: Tue Aug 07, 2018 2:03 am

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports (config.bin, no extension files)

Post by Choppasmith »

aluigi wrote:Please NEVER use the comtype scanner.
And I told you that it's "encrypted" so why did you try a "compression"?
Without encryption algorithm (as I said it's probably aes) and key you can do nothing.


Sorry, I guess with all the compression types it scanned for, I thought types of encrypted compression would be in there as well. My bad.

Bummer :/
Choppasmith
Posts: 7
Joined: Tue Aug 07, 2018 2:03 am

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports (config.bin, no extension files)

Post by Choppasmith »

Okay so I got good news! Sorry for the double post! Hopefully after this, I'll be out of your hair!

So I figured out it's a file in all three games called retro_res.dat with a number based on which entry it belongs to. The Dragon Quest script on your site DOES INDEED work in extracting all the data from I AND II, but strangely does not work on III.

I've included a 7z with all three for comparison, I imagine there's probably some tiny little difference that makes the script not work right.

http://www.mediafire.com/file/y9m8v7l85 ... aw.7z/file

Thanks in advance for any help!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports UPDATE!! Current script incompatible with DQ

Post by aluigi »

At line 6 before "get FILES long" put the following:
filexor "0x4e 0x69 0x29 0x75"
(you can replace the existent filexor command if you prefer)
Choppasmith
Posts: 7
Joined: Tue Aug 07, 2018 2:03 am

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports UPDATE!! Current script incompatible with DQ

Post by Choppasmith »

Thank you SO MUCH aluigi! Worked like a charm!

I've attached the modified scripts (I took the original script and gave it the title of "Dragon Quest 1 and 2 Mobile (retro_res.dat)") to avoid confusion in case someone happens to want to do the same thing. I've also attached the modified script for DQ3.

Thanks again!
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Trying to find the dialog script in Dragon Quest Mobile (Android) ports UPDATE!! Current script incompatible with DQ

Post by aluigi »

The current version 0.1.1 of the script now automatically detects if the game is 3 or 1/2:
http://aluigi.org/bms/dragon_quest.bms