Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

BinJ Editor 3DS: Difference between revisions

From GameBrew
No edit summary
No edit summary
Line 2: Line 2:
|title=BinJ Editor
|title=BinJ Editor
|image=BinJEditor.jpg
|image=BinJEditor.jpg
|description=A Tool For Translating Dragon Quest Monsters Games.
|description=A tool For translating Dragon Quest Monsters games.
|author=Ich_73
|author=Ich_73
|lastupdated=2021/08/25
|lastupdated=2021/08/25
Line 8: Line 8:
|version=2.2.1
|version=2.2.1
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/3dshomebrew/BinJEditorv2.2.1.7z
|download=https://dlhb.gamebrew.org/3dshomebrews/binjeditor.7z
|website=https://gbatemp.net/threads/release-binj-editor-a-tool-for-translating-dragon-quest-monsters-games.573053/
|website=https://gbatemp.net/threads/release-binj-editor-a-tool-for-translating-dragon-quest-monsters-games.573053
|source=https://github.com/Ich73/BinJEditor
|source=https://github.com/Ich73/BinJEditor
}}
}}
<youtube>ksgFDNKbdts</youtube>
BinJ Editor is an editor for .binJ and .e files with custom decoding tables. It allows you import, edit, save, share and export translations for games using the .binJ and .e file format to store messages. Those games include:
* [[Dragon_Quest_Monsters_-_Terrys_Wonderland_3D_3DS|Dragon Quest Monsters: Terry's Wonderland 3D]].
* [[Dragon_Quest_Monsters_2_-_Cobi_and_Taras_Marvelous_Mysterious_Key_3DS|Dragon Quest Monsters 2: Iru and Luca's Marvelous Mysterious Key]].


==Abstract==
The program was written while researching binJ and e file formats, if you want to learn more about them, check out [https://github.com/Ich73/BinJEditor/wiki/BinJ-Format BinJ Format] and [https://github.com/Ich73/BinJEditor/wiki/E-Format E Format].
BinJ Editor lets you import, edit, save, share and export translations for games using the .binJ and .e file format to store messages. Those games include ''Dragon Quest Monsters: Terry's Wonderland 3D'' and ''Dragon Quest Monsters 2: Iru and Luca's Marvelous Mysterious Key''.


==Introduction==
==Features==
Hi, the last past weeks I was trying to find out how the binJ file format works. Simply because I wanted to change a few messages in ''Dragon Quest Monsters 2: Iru and Luca's Marvelous Mysterious Key''. I thought this surely can't be that hard. The short answer is I was wrong, the long answer is:
* Import and Export .binJ and .e files.
* Save and Open .savJ and .savE project files.
* Apply and Create .patJ and .patE patch files.
* Use different separator tokens and decoding tables.
* Send the current file via FTP.
* Search for texts in multiple files at once.
* English, German, Spanish.


==Backstory==
==Installation==
Download contains builds for Windows as standalone executable and installer.
* BinJEditor-Standalone.zip - Extract the archive to a directory of your choice and run BinJEditor.exe.
* BinJEditor-Installer.zip - Extract the archive and run BinJEditor-Installer.exe in order to install BinJ Editor on your PC. You can then start it from the start menu. File associations will be registered for .savJ, .savE, .binJ and .e files.


The first thing I did to translate a text was opening the binJ file using Notepad++. Since it directly showed japanese characters I thought, I could directly replace them and expected it to work. Even though I was looking at a binary file, which you usually can't just read with a text editor. But when I copied some texts to Google Translate to find out what they mean, I was disappointed. The texts weren't real japanese. So I googled a bit and found [https://gbatemp.net/threads/dragon-quest-monsters-2-iru-and-lucas-marvelous-mysterious-key-translation-project.471939/ this thread] where they chatted about binJ files.
If you cannot start BinJ Editor on Windows 7, have a look at [https://github.com/pyinstaller/pyinstaller/issues/4706#issuecomment-633586051 this answer]. Additionally you may want to install [https://www.python.org/downloads/release/python-383/ Python 3.8].


They wrote that these files use a custom encoding for japanese characters and characters in general. What you have to understand about binary files is that they are basically 1s and 0s. This is true for all files, but &quot;normal text files&quot; use a standardized encodings. This means that the byte &quot;0110 0001&quot; with a common encoding like ASCII or UTF-8 always stands for the character &quot;A&quot;.
'''Note:''' It is recommended to update the decoding table of every .savJ and .savE file even if you did not use any of those symbols. To update the decoding table of all save files you can use the CS -f script of [[Translation Toolkit 3DS|Translation Toolkit]] or open the file, choose Edit > Decoding Table and select the table you want (not Table from Save).


But for the game I tried to translate a custom encoding is used. They encode the character &quot;A&quot; using the byte &quot;0000 1101&quot;. Once I used the encoding table provided in the thread I was able to read the correct texts. Now I tried to change a single character by replacing the original bytes for this character with the bytes for the character I replaced it with. I sent the file to my 3DS and launched the game. It worked. Great.
==User guide==
Import a file:
* Choose File > Import... and select the file. This process may take a few seconds.  
* Now you can start editing the file by entering text into the last column.
* To save, choose File > Save As... or export an edited .binJ file by choosing File > Export....
* A full explanation can be found on [https://github.com/Ich73/BinJEditor/wiki/BinJ-Editor-Manual BinJ Editor Manual].


Now I only needed to find a way to tell the individual texts appart and luckily the texts were always separated by a special two-byte long token. Thus I wrote a small programm that read the binary data, splitted the texts and decoded the bytes to japanese texts. And it worked great. This was the point where I started developing the first version of BinJ Editor.
FTP Client:
* Handy for directly sending the edited files to your 3DS for Luma to patch.
* More on that can be found on [https://github.com/Ich73/BinJEditor/wiki/BinJ-Editor-Manual#ftp-client BinJ Editor Manual].


A thing that I haven't talked about yet is that with this method you have to keep the byte length of the original text and the translated text the same. Otherwise the game won't find the texts and just crashes. The problem with this method is that japanese is a lot denser than english. Normally two characters of japanese text are translated with about eight characters of english text.
Search Dialog:
* Another useful tool which let's you search multiple binJ, e and other files at once.
* More on this tool can be found on [https://github.com/Ich73/BinJEditor/wiki/BinJ-Editor-Manual#search-dialog BinJ Editor Manual].


But since the encoding table they used is optimized for japanese text, a lot of common japanese characters are encoded using no more than a single byte. This means the english translation for a two character long japanese text is only allowed to have two bytes as well. As an example you could translate "耐性"; (resistance) with &quot;RE&quot; but not &quot;RES&quot; and definitely not with &quot;Resistance&quot;. That was a thing I was able to overcome much later.
In the below section, you will find some examples screenshots from Dragon Quest Monsters 2: Iru and Luca's Marvelous Mysterious Key. Note that the first screenshot of each row is the original, the second one the translated (using BinJ Editor) and the third one the translated including a custom font and custom images (cannot be done using BinJ Editor).


But what I was able to do was shorten the texts by simply replacing not-needed characters with null bytes. And therefore I started developing the first version of BinJ Editor. After the first sketch was finished I started translating a few menu texts as a proof of concept. And this was the point were I realized all binJ files have a weird long &quot;first text&quot; that I never looked into.
==Screenshots==
'''BinJ Editor''' <br>
https://dlhb.gamebrew.org/3dshomebrews/binjeditor3.png


All first texts looked similar and at this point I thought maybe those bytes are the addresses of the texts in the binary file. I checked it and I was right. That means that given a list of texts (with their respective lengths) I was able to re-create this address block. Now I had two possibilites: rewrite my import function of binJ files to validate that the texts I obtain by looking at the separator tokens are correct OR just believe it works.
https://dlhb.gamebrew.org/3dshomebrews/binjeditor4.png


And... I chose the second option. Which was the bad one. But at least I could now replace texts with translated texts of arbitrary length. So I rewrote a lot of parts of BinJ Editor and started translating more parts of the game. Until...
'''Examples''' <br>
https://dlhb.gamebrew.org/3dshomebrews/binjeditor6.png


... there were problems. I translated some battle messages and whenever I entered a battle the game crashed. So I looked into the binary data once again and found out that this particular binJ file included the same address twice. So I had to look into the address block while parsing binJ files...
https://dlhb.gamebrew.org/3dshomebrews/binjeditor7.png


I started rewriting the corresponding parts of BinJ Editor and at some point I realized that I always missed the first text of the translation before because the first text does not start with the separator token as all the other texts do. And did I mention one file contains a one-byte off pointer? Anyway... someday I got all of this to work and this basically is the whole story of how I got to decipher the binJ file format and how I wrote BinJ Editor. I later cleaned things up, added some convenient features, wrote documentation and... created this post.
https://dlhb.gamebrew.org/3dshomebrews/binjeditor8.png


If you simply want to know more about the binJ and e file formats check these out: [https://github.com/Ich73/BinJEditor/wiki/BinJ-Format BinJ Format] and [https://github.com/Ich73/BinJEditor/wiki/E-Format E Format]
==Changelog==
'''v2.2.1'''
* Small bug fixesm
* Update decoding tablesm


==Presentation==


https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-01.png
==External links==
* GitHub - https://github.com/Ich73/BinJEditor
* GBAtemp - https://gbatemp.net/threads/release-binj-editor-a-tool-for-translating-dragon-quest-monsters-games.573053


To import a file choose &quot;File &gt; Import...&quot; and select the file. This process may take a few seconds. Now you can start editing the file by entering text into the last column. When you finished editing you can save a project file by choosing &quot;File &gt; Save As...&quot; or export an edited .binJ file by choosing &quot;File &gt; Export...&quot;.
[[Category:3DS homebrew rom hacks]]
A full explanation can be found on the Website of this project: [https://github.com/Ich73/BinJEditor/wiki/BinJ-Editor-Manual BinJ Editor Manual]
[[Category:Homebrew hack utility for 3DS games]]
 
https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-02.png
 
It also includes a very handy FTP Client for directly sending the edited files to your 3DS for Luma to patch.
More on that can be found in the Manual as well: [https://github.com/Ich73/BinJEditor/wiki/BinJ-Editor-Manual#ftp-client BinJ Editor Manual]
 
https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-03.png
 
Another very useful tool is the Search Dialog which let's you search multiple binJ, e and other files at once.
More on this tool can be found in the Manual: [https://github.com/Ich73/BinJEditor/wiki/BinJ-Editor-Manual#search-dialog BinJ Editor Manual]
 
==Examples==
As an example I present you four screenshots from ''Dragon Quest Monsters 2: Iru and Luca's Marvelous Mysterious Key''.
 
The first one is the title screen, the second one the loading screen and the third one the status screen of my buddy Pineapple. All texts are stored in binJ files.
The fourth screenshot shows a dialog with the father of the protagonists which is stored inside an e file.
 
Note that the first screenshot of each row is the original, the second one the translated (using BinJ Editor) and the third one the translated including a custom font and custom images (''cannot'' be done using BinJ Editor).
 
'''Title Screen'''
 
https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-04.png
 
'''Loading Screen'''
 
''Note:'' The monsternames are fixed, so my Slimey has a japanese name and the others have german nicknames.
 
https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-05.png
 
'''Status Screen'''
 
''Note:'' The game does weird things with the width of some texts, so "AGIL" displays unreadable and "A G I L" does the job.
 
https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-06.png
 
'''Conversation with Dad'''
 
https://dlhb.gamebrew.org/3dshomebrew/BinJEditor-07.png
 
I hope you like it
Ich_73

Revision as of 05:26, 3 April 2022

BinJ Editor
File:BinJEditor.jpg
General
AuthorIch_73
TypeHack Utilities
Version2.2.1
LicenseMixed
Last Updated2021/08/25
Links
Download
Website
Source

BinJ Editor is an editor for .binJ and .e files with custom decoding tables. It allows you import, edit, save, share and export translations for games using the .binJ and .e file format to store messages. Those games include:

The program was written while researching binJ and e file formats, if you want to learn more about them, check out BinJ Format and E Format.

Features

  • Import and Export .binJ and .e files.
  • Save and Open .savJ and .savE project files.
  • Apply and Create .patJ and .patE patch files.
  • Use different separator tokens and decoding tables.
  • Send the current file via FTP.
  • Search for texts in multiple files at once.
  • English, German, Spanish.

Installation

Download contains builds for Windows as standalone executable and installer.

  • BinJEditor-Standalone.zip - Extract the archive to a directory of your choice and run BinJEditor.exe.
  • BinJEditor-Installer.zip - Extract the archive and run BinJEditor-Installer.exe in order to install BinJ Editor on your PC. You can then start it from the start menu. File associations will be registered for .savJ, .savE, .binJ and .e files.

If you cannot start BinJ Editor on Windows 7, have a look at this answer. Additionally you may want to install Python 3.8.

Note: It is recommended to update the decoding table of every .savJ and .savE file even if you did not use any of those symbols. To update the decoding table of all save files you can use the CS -f script of Translation Toolkit or open the file, choose Edit > Decoding Table and select the table you want (not Table from Save).

User guide

Import a file:

  • Choose File > Import... and select the file. This process may take a few seconds.
  • Now you can start editing the file by entering text into the last column.
  • To save, choose File > Save As... or export an edited .binJ file by choosing File > Export....
  • A full explanation can be found on BinJ Editor Manual.

FTP Client:

  • Handy for directly sending the edited files to your 3DS for Luma to patch.
  • More on that can be found on BinJ Editor Manual.

Search Dialog:

  • Another useful tool which let's you search multiple binJ, e and other files at once.
  • More on this tool can be found on BinJ Editor Manual.

In the below section, you will find some examples screenshots from Dragon Quest Monsters 2: Iru and Luca's Marvelous Mysterious Key. Note that the first screenshot of each row is the original, the second one the translated (using BinJ Editor) and the third one the translated including a custom font and custom images (cannot be done using BinJ Editor).

Screenshots

BinJ Editor
binjeditor3.png

binjeditor4.png

Examples
binjeditor6.png

binjeditor7.png

binjeditor8.png

Changelog

v2.2.1

  • Small bug fixesm
  • Update decoding tablesm


External links

Advertising: