ROM Hack Dragon Quest Builders 2

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
Have you made any progress locating the files?
I've been looking too, and i thought i'd share my findings.

I'm very sure it's in the LINKDATA.BIN file.
I have successfully extracted the files from LINKDATA.BIN with quickBMS (using the "arslan.bms" script).
There is a ton of files and i have skimmed through the biggest ones with HxD and Notepad++ but i cannot see anything that resembles Japanese sentences or menus.
However, I have no experience with modding games, and i don't know Japanese, so i might have overlooked something.

Anyone have any idea how to go by looking through the files for Japanese language?
 
Last edited by voltorben,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,938
Country
Poland
Why with the biggest ones only? Text files may be splitted in hundreds of small files like in Zelda BOTW.
You should search whole unpacked game with text from game (f.e. main menu "New game") by Notepad++.

It can still be in binary file like
NULL N NULL E NULL W NULL NULL G NULL A NULL M NULL E
or compressed.
So searching it could be harder. Then you need to find files manually.
 
Last edited by masagrator,

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
Why with the biggest ones only? Text files may be splitted in hundreds of small files like in Zelda BOTW.
You should search whole unpacked game with text from game (f.e. main menu) by Notepad++.

Because i'm a noob and have no experience modding ;)
There is literally thousands of files, all named an (seemingly) arbitrary number (like 0000056.bin, 0000057.szs, etc) so i really had no idea on how to start looking for the language files.
Any ideas are welcome, though! Sounds like you have some experience? How were the BOTW files organised, and was there any system? How was the files located?

One idea i haven't tried yet is finding a word/phrase from the game, eg. the menu, and searching through the files to find that word/phrase.
I'll try that when i get home.
 

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,938
Country
Poland
I will try to check by myself first, because depends on used engine how files are located and I think BOTW and Builders 2 have different engines. :P
 

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
I will try to check by myself first, because depends on used engine how files are located and I think BOTW and Builders 2 have different engines. :P

I don't much, but i think you are right ;)
Awesome! Let us know if you find anything.


EDIT: Just now noticed you are the one who made the polish translations!
Great work :) Had a look through some of them to get some inspiration.
 
Last edited by voltorben,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,938
Country
Poland
I've never translated games from Japanese, so i didn't know what to expect.
There are no uncompressed text files after using quickbms.
Txt files are not text files, that is for sure.
There are some files that I don't know what they are for (like g1em). And quickbms can't recognize formats of them, so every unsupported file format is named with .dat and rest of them is based on first bytes.
"Steven's Gas Machine" can unpack files after chosing PC Dragon Quest Builders, but can only decompress textures, models and sounds, has different name pattern and "unknown" is .unknown.

So there is another issue - you need to find a guy, who will not only find files, but they could make a tool to eject texts and inject them back.

I think translating this game will take more time than waiting for official release :P
https://www.forbes.com/sites/ollieb...2-will-be-coming-westward-sometime-next-year/
 
Last edited by masagrator,

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
I've never translated games from Japanese, so i didn't know what to expect.
There are no uncompressed text files after using quickbms.
Txt files are not text files, that is for sure.
There are some files that I don't know what they are for (like g1em). And quickbms can't recognize formats of them, so every unsupported file format is named with .dat and rest of them is based on first bytes.
"Steven's Gas Machine" can unpack files after chosing PC Dragon Quest Builders, but can only decompress textures, models and sounds, has different name pattern and "unknown" is .unknown.

So there is another issue - you need to find a guy, who will not only find files, but they could make a tool to eject texts and inject them back.

I think translating this game will take more time than waiting for official release :P
https://www.forbes.com/sites/ollieb...2-will-be-coming-westward-sometime-next-year/

Ah, that makes so much more sense why none of the bin files didn't look like anything! Thanks for explaining it - I learned a lot :)
(Hard topic to find info about)

I'll be patient and wait for the official release ;D
 

Falo

Well-Known Member
Member
Joined
Jul 22, 2012
Messages
680
Trophies
2
XP
2,627
Country
Germany
I started working on a simple menu translation after the demo was out.
First of all, you can't use generic scripts or tools like quickbms, because the files are stored in "chunks", basically a single file can be stored in 1000+ fragments all compressed with zlib.

After writing an unpacker and relinker it was easy to modify the text.
The text itself is stored as a simple excel-like table, so converting to .csv and translation is easy (game supports uncompressed files).

File 0 - 41 is the menu text, all items, quests, npc, monster, system text, etc... , the event/story text starts after file 18000.

Here a screenshot from my test menu translation of the demo version:



Note: i never planned to finish the translation, only to have a little bit more fun before an official translation happens.
 

Tisdeny

New Member
Newbie
Joined
Jun 30, 2018
Messages
2
Trophies
0
Age
30
XP
160
Country
Vietnam
I hope you can complete and release the sub eng of the items, menu. thank you very much. If you have time to work on the quest, it's great. sorry for my English not good.
 

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
I started working on a simple menu translation after the demo was out.
First of all, you can't use generic scripts or tools like quickbms, because the files are stored in "chunks", basically a single file can be stored in 1000+ fragments all compressed with zlib.

After writing an unpacker and relinker it was easy to modify the text.
The text itself is stored as a simple excel-like table, so converting to .csv and translation is easy (game supports uncompressed files).

File 0 - 41 is the menu text, all items, quests, npc, monster, system text, etc... , the event/story text starts after file 18000.

Here a screenshot from my test menu translation of the demo version:

Note: i never planned to finish the translation, only to have a little bit more fun before an official translation happens.

Awesome work!
Would you be willing to you share your unpacker and relinker tool? Maybe just PM if you don't want public? :)
I only ever intended to do menues and items anyways.
Or even better, share your mod?
 

Falo

Well-Known Member
Member
Joined
Jul 22, 2012
Messages
680
Trophies
2
XP
2,627
Country
Germany
Sharing the mod is not that simple ^^

I made 3 tools:

excel.exe
this tool converts and translates *.dat text files to *.txt and back into *.dat
it uses *.csv files and CommonWords.txt in a "Translation" subfolder to translate stuff while converting.
Note: it uses the "FILE_*Number*" to identify some text types, because for example FILE_00010_Items.dat has 2 text columns instead of 1!

nxarc.exe
this tool unpacks DQB1 nxarc files, i did this to re-use the already translated stuff, but in the end it was mostly useless, the games uses a completly different text fileformat

linkdata.exe
this tool unpacks DQB2 LINKDATA.BIN/LINKDATA.IDX files and if used via commandline/batch like this:
Code:
linkdata.exe inject MenuText\FILE_00010_Items.dat 10 LINKDATA.IDX
is able to append/inject a translated file into LINKDATA.BIN at the end of the file

the final translated mod is therefor a little bit bigger then the original LINKDATA.BIN (916 MB) extra on the sd card.

just drag&drop files onto the exe's to use them.
https://www.dropbox.com/s/hvxl1g59v323e10/DragonQuestBuilders Toolpack v1.7z?dl=0
Note: it contains all unpacked MenuText and EventText files + some of my translated files as *.txt
 

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
Wow, this is amazing work!
It's basically exactly what i wanted.
Thanks for sharing and explaining :)

I like the way you can translate directly in the files and also use the /Translation folder! Works like a charm. Awesome tool.

Are the ids in the csv files arbitrary?

Any chance you might want to share your source code for excel.exe? Mostly curious to see how the hell you manage to pull the text from the bin files :D

Also, this might just be a japanese thing, or a translation/mod thing, so sorry if this is a trivial question. What's up with the <SOMETHING:SOMETHING> stuff?
I looked at some of the strings you have translated, and you seem to have omitted the brackets and colon - and that works? eg.:
JA:
Code:
1@<小麦:こむぎ>|パンやうどんの<原料:げんりょう>。 <暖:あたた>かい<場所:ばしょ>で よく<育:そだ>つ。<br><水:みず>やりは <多少:たしょう>さぼっても <大丈夫:だいじょうぶ>
EN:
Code:
1@Wheat|Raw materials for bread and noodles. It grows well in warm places.<br>It's okay, even if you only water it a little.
(Not questioning your translation - i'm just curious)
 

Falo

Well-Known Member
Member
Joined
Jul 22, 2012
Messages
680
Trophies
2
XP
2,627
Country
Germany
The <小麦:こむぎ> stuff is simplified japanese.
Not all children are able to read all kanji symbols, so they make the a simplified version on top of it.

so
パンやうどんの<原料:げんりょう>
is in real:
パンやうどんの原料
and on top of 原料 is げんりょう, both words are the same meaning: raw material

The csv id's are just there to sort it in a tool like excel or open office calc, but they are necessary in the txt files.

The text dat file format is very simple:
Code:
4 byte = EntryCount
60 Byte = Padding
EntryCount * 4 Byte = ID Table
EntryCount * x byte = Data Table

Data Table has a different file format for each text file
file 7,10,15,20,25,26,27: 
2 * 4 Byte = TextPointer
file 5,6:
1 *4 Byte = TextPointer
1 *4 Byte = Value
file 30:
4 * 4 Byte = TextPointer
all other:
1 * 4 Byte = TextPointer

TextPointer is relative to itself, so "ftell() + fread(TextPointer) = TextOffset"
Text itself is stored as UTF8 and all special text stuff is in html tags.
 
  • Like
Reactions: voltorben

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
Very interesting - Thanks for sharing!

And thanks for learning me some Japanese ;D

One thing i was wondering - how can i use the excel.exe from command line?
$ excel.exe FILE_00020.dat
wants access to C:/, which made me thought i could specify a output folder as the second argument, but it does not seem to work...
possible?

EDIT: Oh, and also how to convert back to .dat with command line (if possible) :)


EDIT2: SORRY forget what i said - i should just use the command with full paths! Sorry for being a noob :)
 
Last edited by voltorben,

voltorben

Member
Newcomer
Joined
Jul 16, 2007
Messages
13
Trophies
0
XP
164
Country
Denmark
Just a quick update to my progress.
I've made a tool that extract all strings into a database/translation tool that is hooked up with the google translate API for easy translations, and i was planning on making a script that could extract the LINKDATA files form an xci and mod them (so anybody can use).
Unfortunately i cannot for the life of me get the mod to work with layeredFS like Falo did.

excel.exe
this tool converts and translates *.dat text files to *.txt and back into *.dat
it uses *.csv files and CommonWords.txt in a "Translation" subfolder to translate stuff while converting.
Note: it uses the "FILE_*Number*" to identify some text types, because for example FILE_00010_Items.dat has 2 text columns instead of 1!

linkdata.exe
this tool unpacks DQB2 LINKDATA.BIN/LINKDATA.IDX files and if used via commandline/batch like this:
Code:
linkdata.exe inject MenuText\FILE_00010_Items.dat 10 LINKDATA.IDX
is able to append/inject a translated file into LINKDATA.BIN at the end of the file

the final translated mod is therefor a little bit bigger then the original LINKDATA.BIN (916 MB) extra on the sd card.

As a bare-bones test, I've made a very light modifications, with Falo's tools above, to the "new game" menu and the first dialog in the game, to check if i can get it to load.
Game loads and plays fine, but no translations. Unsure wether it ignores my mod, since i presume it would break the game - or at least have missing text - if my LINKDATA files was bugged...
I've tried with atmosphere (kosmos) layeredFS and SX OS layeredFS.
(i can confirm that layeredFS works with other titles with both these methods on my switch).

I've placed the LINKDATA.BIN and LINKDATA.IDX in the title folder for the game, like so:

Code:
010050000705E000
  └ romfs
      └ LINKDATA.BIN
      └ LINKDATA.IDX

If anyone has any ideas on what i can try to make sure that the layeredFS files are loading, or how i can check for errors, please let me know :)

Ideas i have not tried yet:
- compress game file before injecting into LINKDATA.BIN
- replace translated file on original position of LINKDATA.BIN
- repack a xci with the modded files (unsure how to do this - does not seem like there is any tools available for this, that uses the romfs+exefs structure)

btw, i know an english translation is officially coming, but i kinda got hooked on learning how to mod a game and do hex editing, and i kinda enjoy it ;) so just rolling with this for now as a kinda hobby / learning experience.
 
Last edited by voltorben,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,231
Trophies
3
XP
11,938
Country
Poland
LayeredFS can't check if file is broken, so if it was, then game would crash or translated lines would be broken.
So you have 3 options:
1. TitleID is wrong (probably not)
2. You have put files in wrong folder
3. Your modified files in real are not responsible for translation (f.e. dummy files)
 
Last edited by masagrator,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    straferz @ straferz: Anybody know why this is happening to my ACWW town...