Dragon Quest I - II - III string *.bin file

How to translate the files of a game
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Dragon Quest I - II - III string *.bin file

Post by cyberdog »

Hi, i want to translate Dragon Quest to another language, but i am stuck with it.
I am unpacked games with QuickBMS and get game resources, but i can't decompile text *.bin file.
Text bin file looks like a normal text file, but when i edit this, and run games - it's crashed
How can i safely edit this bin? I so trying comtype_scan2 for extract text, but it's not helpfully
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Re: Dragon Quest I - II - III string *.bin file

Post by cyberdog »

I'm continue researching this files.
Strings in file have next structure:
{ count variation of one event (like string array) } {weight of next block text (in byte)} {text block}
{weight of next block text (in byte)} {text block}
Zmkiy
Posts: 27
Joined: Mon Mar 09, 2020 3:14 pm

Re: Dragon Quest I - II - III string *.bin file

Post by Zmkiy »

Use reimport3 for import
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Re: Dragon Quest I - II - III string *.bin file

Post by cyberdog »

Zmkiy wrote:Use reimport3 for import

Wow, it's awesome.
Can you see please another file like a stringDataEn.bin?
it's contain's some artefacts after import at line 324 for dq2 bin

p.s. thank you very much ^^
Last edited by cyberdog on Sun Nov 29, 2020 10:25 am, edited 1 time in total.
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Re: Dragon Quest I - II - III string *.bin file

Post by cyberdog »

If you want to joke, here is my java import tool (not completed)
I spend 9 hours for research file's at this topic, but i'am very newbie in it.
I newbie in reverse engineering, because i working in enterprise development, but i like this expirience :)
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Re: Dragon Quest I - II - III string *.bin file

Post by cyberdog »

Oops, i update stringDataEn.bin for first part of game.
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Re: Dragon Quest I - II - III string *.bin file

Post by cyberdog »

I found why script for stringMap don't extract stringData.
Because in 5430h have text array:
-> 00 00 2E 00 20 what means
-> 00 00 2E (count elements in array) - 46 (dec)
-> 00 20 (size of first element) - 32 (dec)
--> skipping 32 bytes
-> 00 00 16 (size of second element) - 22 (dec)
--> skipping 22 bytes
-> etc.. to 46 element's end :)

But what interesting too:
at start of bin file contains some arrays like that:
-> 00 00 07 00 4C
-> 00 00 07 (7 elements)
-> 00 4C (76 byte next string)

and it's working good, hmmm...
Zmkiy
Posts: 27
Joined: Mon Mar 09, 2020 3:14 pm

Re: Dragon Quest I - II - III string *.bin file

Post by Zmkiy »

Here's how it actually works

Code: Select all

2 byte COUNT
for k = 0 < COUNT ; k++
   2 byte COUNT1
   j =0
   while (j < COUNT1)
      2 byte COUNT2
      for i = 0 < COUNT2 ; i++
         2 byte STRING_SIZE
         STRING
         1 byte NULL
      end
      j += COUNT2
   end
end

But for "StringData", it has a variant structure :?
cyberdog
Posts: 12
Joined: Mon Nov 23, 2020 6:42 am

Re: Dragon Quest I - II - III string *.bin file

Post by cyberdog »

Zmkiy wrote:Here's how it actually works

Code: Select all

2 byte COUNT
for k = 0 < COUNT ; k++
   2 byte COUNT1
   j =0
   while (j < COUNT1)
      2 byte COUNT2
      for i = 0 < COUNT2 ; i++
         2 byte STRING_SIZE
         STRING
         1 byte NULL
      end
      j += COUNT2
   end
end

But for "StringData", it has a variant structure :?


Thank you very much, it's very helpfull
heraldopkg
Posts: 5
Joined: Sun Jan 02, 2022 1:34 am

Re: Dragon Quest I - II - III string *.bin file

Post by heraldopkg »

And the dragon quest III strings bms, any news?