Dragon Quest Builders 2

Discussion in 'Switch - ROM Hacking, Saves, Translations & Tools' started by ben nahalewski, Jan 6, 2019.

  1. ben nahalewski
    OP

    ben nahalewski Member

    Newcomer
    2
    Mar 17, 2013
    United States
    Lawndale, North Carolina
    Anyone know where the dialogue, menu is stored to be translated?
     
  2. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    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, Jan 9, 2019
  3. masagrator

    masagrator GBAtemp Regular

    Member
    3
    Oct 14, 2018
    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, Jan 9, 2019
  4. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    Denmark
    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.
     
  5. masagrator

    masagrator GBAtemp Regular

    Member
    3
    Oct 14, 2018
    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
     
  6. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    Denmark
    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, Jan 9, 2019
  7. masagrator

    masagrator GBAtemp Regular

    Member
    3
    Oct 14, 2018
    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
    http://www.forbes.com/sites/ollieb...2-will-be-coming-westward-sometime-next-year/
     
    Last edited by masagrator, Jan 9, 2019
  8. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    Denmark
    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
     
  9. Falo

    Falo GBAtemp Fan

    Member
    6
    Jul 22, 2012
    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:
    [​IMG]
    [​IMG]

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

    Tisdeny Newbie

    Newcomer
    1
    Jun 30, 2018
    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.
     
  11. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    Denmark
    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?
     
  12. Falo

    Falo GBAtemp Fan

    Member
    6
    Jul 22, 2012
    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.
    http://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
     
    Killrain, lordelan, hausa51 and 2 others like this.
  13. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    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)
     
  14. Falo

    Falo GBAtemp Fan

    Member
    6
    Jul 22, 2012
    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.
    
     
    voltorben likes this.
  15. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    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, Jan 10, 2019
  16. cobjak

    cobjak Newbie

    Newcomer
    1
    Jan 16, 2019
    France
    Sorry for that but how to install it ?
     
  17. masagrator

    masagrator GBAtemp Regular

    Member
    3
    Oct 14, 2018
    Poland
    It's not made for installing. You are using this as it is.
     
  18. whitebuff1822

    whitebuff1822 Newbie

    Newcomer
    1
    Jan 4, 2019
    Thailand
    thank you..
     
  19. voltorben

    voltorben Member

    Newcomer
    2
    Jul 16, 2007
    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.

    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, Jan 21, 2019
  20. masagrator

    masagrator GBAtemp Regular

    Member
    3
    Oct 14, 2018
    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, Jan 21, 2019
Loading...