|
|
(14 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| {{Infobox-3DS-Homebrews | | {{Infobox 3DS Homebrews |
| | title = TranslationToolkit | | |title=TranslationToolkit |
| | type = Hack Utilities | | |image=Translationtoolkit3ds2.png |
| | version = v2.7.2 | | |description=A command line interface to simplify the workflow for translating 3DS games and releasing patches. |
| | lastupdated = 2021/09/25 | | |author=Ich73 |
| | licence = Mixed | | |lastupdated=2023/01/21 |
| | author = Ich73 | | |type=Hack Utilities |
| | website = https://github.com/Ich73/TranslationToolkit | | |version=2.7.3 |
| | download = https://dlhb.gamebrew.org/3dshomebrew/TranslationToolkitv2.7.2.7z | | |license=Mixed |
| | source = https://github.com/Ich73/TranslationToolkit | | |download=https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds.7z |
| | |website=https://github.com/Ich73/TranslationToolkit |
| | |source=https://github.com/Ich73/TranslationToolkit |
| }} | | }} |
| == Translation Toolkit ==
| |
|
| |
| Translation Toolkit is a command line interface to simplify the workflow for translating 3DS games and releasing patches. | | Translation Toolkit is a command line interface to simplify the workflow for translating 3DS games and releasing patches. |
|
| |
|
| It uses the following tools: | | It uses the following tools: |
| | * [[xdelta|xdelta]] ([https://github.com/jmacd/xdelta-gpl/releases/tag/v3.1.0 v3.1.0]) |
| | * [[3dstool_by_dnasdw_3DS|3dstool]] ([https://github.com/dnasdw/3dstool/releases/tag/v1.1.0 v1.1.0]) |
| | * [[Project CTR 3DS|ctrtool]] ([https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v0.7 v0.7]) |
| | * [[Project CTR 3DS|makerom]] ([https://github.com/3DSGuy/Project_CTR/releases/tag/makerom-v0.17 v0.17]) |
|
| |
|
| * [https://github.com/jmacd/xdelta-gpl xdelta] ([https://github.com/jmacd/xdelta-gpl/releases/tag/v3.1.0 v3.1.0])
| | ==Features== |
| * [https://github.com/dnasdw/3dstool 3dstool] ([https://github.com/dnasdw/3dstool/releases/tag/v1.1.0 v1.1.0])
| | * Scripts options: |
| * [https://github.com/3DSGuy/Project_CTR ctrtool] ([https://github.com/3DSGuy/Project_CTR/releases/tag/ctrtool-v0.7 v0.7])
| | ** Apply Patches (AP). |
| * [https://github.com/3DSGuy/Project_CTR makerom] ([https://github.com/3DSGuy/Project_CTR/releases/tag/makerom-v0.17 v0.17])
| | ** Create Patches (CP). |
| | | ** Distribute (D). |
| == Using Translation Toolkit == | | ** Send via FTP (S). |
| | | ** Send to Citra (SC). |
| You can download the newest version as an executable from the [https://github.com/Ich73/TranslationToolkit/releases/latest Release Page]. Extract the archive and copy <code>TranslationToolkit.exe</code> to the root of your translation directory and run it.
| | ** Setup Workspace (SW). |
| | | ** Update Workspace (UW). |
| == Scripts ==
| | ** Release Patches (RP). |
| | | ** Replace Files (RF). |
| === Apply Patches (AP) ===
| | ** Create Saves (CS). |
| | | ** Extract Game (EG). |
| This script is used to apply <code>.xdelta</code>, <code>.patJ</code> and <code>.patE</code> patches to all files from the original game.
| | ** Rebuild Game (RG). |
| | | * Combinations: |
| It searches internally specified folders using the naming scheme <code><folder>_<language></code> (e.g. <code>Layout_EN</code>) for patches and applies them to the files with matching names from the folder <code><folder>_<originalLanguage></code> (e.g. <code>Layout_JA</code>).<br />
| | ** Distribute & Send via FTP (DS). |
| A <code><file>.<ext>.xdelta</code> patch will create <code><file>.<ext></code>, a <code><file>.patJ</code> patch will create <code><file>.binJ</code> and update <code><file>.savJ</code> if found and a <code><file>.patE</code> patch will create <code><file>.e</code> and update <code><file>.savE</code> if found.<br />
| | ** Distribute & Send to Citra (DSC). |
| Only files with a different hash will be overriden by default. The default original language is <code>JA</code>.
| |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if their hashes match (e.g. <code>AP -f</code>). | |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>AP -o=JA</code>). | |
| | |
| === Create Patches (CP) ===
| |
| | |
| This script is used to create <code>.xdelta</code>, <code>.patJ</code> and <code>.patE</code> patches for all edited game files.
| |
| | |
| It searches internally specified folders using the naming scheme <code><folder>_<language></code> (e.g. <code>Layout_EN</code>) for edited files and creates patches using the files with matching names from the folder <code><folder>_<originalLanguage></code> (e.g. <code>Layout_JA</code>).<br />
| |
| A <code><file>.<ext></code> file will create a <code><file>.<ext>.xdelta</code> patch, a <code><file>.savJ</code> project file will create a <code><file>.patJ</code> patch and a <code><file>.savE</code> project file will create a <code><file>.patE</code> patch. If no <code><file>.savJ</code> or <code><file>.savE</code> project file is found <code><file>.binJ</code> and <code><file>.e</code> files are used to create the patch.<br />
| |
| Only patches with a different hash will be overriden by default. The default original language is <code>JA</code>.
| |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all patches even if their hashes match (e.g. <code>CP -f</code>). | |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>CP -o=JA</code>). | |
| | |
| === Distribute (D) ===
| |
| | |
| This script is used to copy all edited game files to a folder that matches the file structure of an extracted <code>.cia</code> or <code>.3ds</code> file. You can use this to either copy it to your extracted game to create a patched <code>.cia</code> or <code>.3ds</code> file, or use the <code>S</code> script to send the files to your 3DS so [https://github.com/LumaTeam/Luma3DS Luma] can patch them.
| |
| | |
| The script requires you to specify a single language (e.g.<code>EN</code>) or multiple languages (e.g. <code>DE,EN</code>) to distribute. If you specify multiple languages the translations of the first language are used whenever possible. The other languages are used when translations are missing. This works line-by-line for <code>.binJ</code> files (if <code>.patJ</code> files are found) and file-by-file for all other file types.<br />
| |
| Additionally you need to specify a version. If you choose the original version (<code>v1.0</code>) only those files are being distributed. If you chose an updated version (e.g. <code>v1.1</code>) the files from the original version and the updated files will be distributed.<br />
| |
| The third value is the directory you want the files to be distributed to.
| |
| | |
| The script only overrides files with a different hash by default. The default original language is <code>JA</code>.
| |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if their hashes match (e.g. <code>D -f</code>). | |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>D -o=JA</code>). | |
| | |
| === Send via FTP (S) ===
| |
| | |
| This script is used to send the with the <code>D</code> script generated folder to 3DS so [https://github.com/LumaTeam/Luma3DS Luma] can patch the game. For this to work your 3DS needs a FTP Server application, for example [https://github.com/mtheall/ftpd FTPD], and your 3DS and your PC need to be connected to the same network.
| |
| | |
| The script requires you to specify the following values to properly send the files:
| |
| | |
| * <code>Folder</code>: The folder generated by the <code>D</code> script.
| |
| * <code>Title ID</code>: The ID of the game you want to patch.
| |
| * <code>3DS IP</code>: The local IP address of your 3DS. FTPD displays it on the top screen (e.g. '''[192.168.1.1]''':5000).
| |
| * <code>Port</code>: The port the FTP Server is listening. FTPD displays it on the top screen (e.g. [192.168.1.1]:'''5000'''). | |
| * <code>User</code>: The registered username. In FTPD you can configure this in the settings by opening the Menu (Y) and selecting Settings. (This can be left blank to connect unauthorized.) | |
| * <code>Password</code>: The registered password. This value can be configured the same way as the username can. (This can be left blank to connect unauthorized.)
| |
| | |
| The script only overrides files when they are newer than the files on the 3DS by default. Make sure your computer and the 3DS are set to the same time and date.
| |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if the timestamp is newer (e.g. <code>S -f</code>).
| |
| | |
| === Send to Citra (SC) ===
| |
| | |
| This script is used to send the with the <code>D</code> script generated folder to [https://citra-emu.org/ Citra]'s mod folder.
| |
| | |
| The script requires you to specify the following values to properly send the files:
| |
| | |
| * <code>Folder</code>: The folder generated by the <code>D</code> script. | |
| * <code>Title ID</code>: The ID of the game you want to patch.
| |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if their hashes match (e.g. <code>SC -f</code>). | |
| | |
| === Setup Workspace (SW) ===
| |
| | |
| This script is used to download the latest patches from the repository, copy the required original files from the extracted CIA and run the <code>AP</code> script.
| |
| | |
| The script requires you to specify the following values:
| |
| | |
| * <code>Download URL or Zip File</code>: The url for downloading all patches as a zip file, or the full path to a local zip file.
| |
| * <code>CIA Folder</code>: The folder containing the extracted CIA file. | |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if their hashes match (e.g. <code>SW -f</code>).
| |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>SW -o=JA</code>). | |
| | |
| === Update Workspace (UW) ===
| |
| | |
| This script is used to download the latest patches from the repository and run the <code>AP</code> script.
| |
| | |
| The script requires you to specify the following values:
| |
| | |
| * <code>Download URL or Zip File</code>: The url for downloading all patches as a zip file, or the full path to a local zip file. | |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if their hashes match (e.g. <code>UW -f</code>). | |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>UW -o=JA</code>).
| |
| | |
| === Release Patches (RP) ===
| |
| | |
| This script is used to create <code>banner.xdelta</code>, <code>code.xdelta</code> and <code>RomFS.xdelta</code> patches by distributing the files for a given language and version and rebuilding the banner and romFS files.
| |
| | |
| The script requires you to specify the following values:
| |
| | |
| * <code>Language</code>: A single language (e.g.<code>EN</code>) or multiple languages (e.g. <code>DE,EN</code>) to distribute. More information can be found in the details of the <code>D</code> script. | |
| * <code>Version</code>: The version to release patches for (e.g. <code>v1.0</code>, <code>v1.1</code>). | |
| * <code>CIA Folder</code>: The folder containing the extracted CIA file to override. Do ''not'' use the folder you used for the <code>SW</code> script, but a copy of it.
| |
| * <code>Patches File</code>: The archive file to write the patches to.
| |
| | |
| ''Options:''
| |
| | |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>RP -o=JA</code>).
| |
| | |
| === Replace Files (RF) ===
| |
| | |
| This script searches the given destination folder for files with the same name as the files in the given source folder and replaces them. This can be used to update multiple <code>.bclim</code> files at once when editing <code>.arc</code> files.
| |
| | |
| === Create Saves (CS) ===
| |
| | |
| This script is used to apply <code>.patJ</code> and <code>.patE</code> patches to all files from the original game in order to create <code>.savJ</code> and <code>.savE</code> files.<br />
| |
| It can also be used to update the decoding tables used in those files by enabling the <code>-f</code> option.
| |
| | |
| It searches internally specified folders using the naming scheme <code><folder>_<language></code> (e.g. <code>Message_EN</code>) for patches and applies them to the files with matching names from the folder <code><folder>_<originalLanguage></code> (e.g. <code>Message_JA</code>).<br />
| |
| A <code><file>.patJ</code> patch will create <code><file>.savJ</code> and a <code><file>.patE</code> patch will <code><file>.savE</code>.<br />
| |
| No files will be overwritten by default. The default original language is <code>JA</code>.
| |
| | |
| The script requires you to specify the following values:
| |
| | |
| * <code>Table File</code>: The filename of the updated decoding table. This table will be stored inside the save files. | |
| | |
| ''Options:''
| |
| | |
| * <code>-f</code>: Force overriding all files even if they exist (e.g. <code>CS -f</code>). | |
| * <code>-o=<XY></code>: Set the original language to <code><XY></code> (e.g. <code>CS -o=JA</code>). | |
| | |
| === Extract Game (EG) ===
| |
| | |
| This script is used to extract a <code>.cia</code> or <code>.3ds</code> file in order to use the extracted folder for the <code>SW</code> script.
| |
| | |
| The script requires you to specify the following values:
| |
| | |
| * <code>Game File</code>: The full path to the <code>.cia</code> or <code>.3ds</code> to extract. | |
| * <code>Game Folder</code>: The full path to the folder the game should be extracted to. This folder can then be used by the <code>SW</code> script. | |
| | |
| === Rebuild Game (RG) ===
| |
| | |
| This script is used to rebuild a <code>.cia</code> or <code>.3ds</code> file after using the <code>RP</code> script.
| |
|
| |
|
| The script requires you to specify the following values:
| | ==Installation== |
| | Download contains the following prebuilt binaries: |
| | * win_i686 - For 32-bit Windows. |
| | * win_x86_64 - For 64-bit Windows. |
| | * linux_x86_64 - For and 64-bit Linux. |
|
| |
|
| * <code>Game Folder</code>: The full path to the folder containing the game files. The folder from the <code>RP</code> script can be used for it.
| | Extract the archive and copy <code>TranslationToolkit.exe</code> to the root of your translation directory and run it. |
| * <code>Game File</code>: The full path to the destination <code>.cia</code> or <code>.3ds</code> file to create.
| |
| * <code>CIA Version</code>: If you want to rebuild a <code>.cia</code> file you need to specify a version as a string (e.g. <code>v1.0.0</code>) or integer (e.g. <code>1024</code>).
| |
|
| |
|
| === Distribute & Send via FTP (DS) ===
| | [https://github.com/Ich73/TranslationToolkit/blob/master/README.md#using-translation-toolkit Using Translation Toolkit.] |
|
| |
|
| This script combines the <code>D</code> and <code>S</code> scripts.
| | ==Screenshot== |
| | https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds3.png |
|
| |
|
| === Distribute & Send to Citra (DSC) === | | ==Changelog== |
| | '''v2.7.3''' |
| | * Internal changes. |
|
| |
|
| This script combines the <code>D</code> and <code>SC</code> scripts.
| | '''v2.7.2''' |
| | * Change update behaviour for tools. |
|
| |
|
| == Configuring Translation Toolkit ==
| | '''v2.7.1''' |
| | * Add option to enter a local zip file instead of an url to SW and UW script. |
|
| |
|
| When starting the program it searches for a file named <code>.ttparams</code> which defines the file structure of the game and the repository. If the file is missing default values will be used. It is a json file with the following, optional parameters:
| | '''v2.7.0''' |
| | * Add CS script. |
| | * Remove UD script. |
|
| |
|
| * <code>SEP</code>: The separator token used in <code>.binJ</code> and <code>.e</code> files as a string of hexadecimal digits. More information can be found in [https://github.com/Ich73/BinJEditor/wiki/BinJ-Format BinJ Format] and [https://github.com/Ich73/BinJEditor/wiki/E-Format E Format].<br />
| | '''v2.6.0''' |
| Example: <code>"E31B"</code>
| | * Add support for Linux. |
| * <code>XDELTA</code>: The base names of the folders in the repository and the corresponding file extensions of game files inside those folders for which <code>.xdelta</code> patches should be used as an object from string to list of strings.<br /> | | * Add EG and RG scripts. |
| Example: <code>"Banner": [".bcwav", ".cbmd", ".cgfx"]</code>
| | * Add DS and DSC combination scripts. |
| * <code>PAT</code>: The base names of the folders in the repository and the corresponding type of file (<code>binJ</code> or <code>e</code>), game file extension, save file extension and patch file extension for which <code>.patJ</code> or <code>.patE</code> patches should be used as an object from string to list of strings.<br /> | |
| Example: <code>"Message": ["binJ", ".binJ", ".savJ", ".patJ"]</code>
| |
| * <code>PARENT</code>: The base names of the folders in the repository mapped to the directories in the game files as an object from string to string.<br /> | |
| Example: <code>"Banner": "ExtractedBanner"</code>
| |
| * <code>UPDATE_ACTIONS</code>: A list of operations that should be executed when the <code>UW</code> or <code>SW</code> script is called as a list of lists. Valid actions are:
| |
| ** <code>rename-folder</code>: Rename the folders with the first argument as the base name to folders with the second argument as the base name.<br />
| |
| Example: <code>["rename-folder", ["Code", "ExeFS"]]</code>
| |
| ** <code>delete-folder</code>: Delete the folders with the argument as the base name.<br />
| |
| Example: <code>["delete-folder", "Code"]</code>
| |
|
| |
|
| == For Developers ==
| | '''v2.5.0''' |
| | * Add support for .ttparams configuration file. |
| | * Add support for 32-bit Windows. |
|
| |
|
| === Setup ===
| | '''v2.4.0''' |
| | * Auto-download for xdelta and 3dstool. |
| | * Add support for missing files and icon patching. |
| | * Improve CP script for binJ and e files. |
| | * Update xdelta version for smaller patch files. |
| | * Add support for custom Citra mod folders. |
|
| |
|
| This program is written using [https://www.python.org/downloads/release/python-383/ Python 3.8]. Addionally you need [https://github.com/Ich73/BinJEditor/blob/master/JTools.py <code>JTools.py</code>] found in [https://github.com/Ich73/BinJEditor BinJ Editor].
| | '''v2.3.0''' |
| | * Add SC script. |
| | * Config save folder per language and version in D script. |
| | * Parameter input checks that directories exist. |
| | * Fix bug in S script that caused files to be sent even though they didn't changed. |
|
| |
|
| === Running ===
| | '''v2.2.0''' |
| | * Add RP script. |
| | * Shorten descriptions to show all scripts in menu. |
|
| |
|
| You can run the program by using the command <code>python TranslationToolkit.py</code>.
| | '''v2.1.0''' |
| | * Add support for multiple versions of a game. |
| | * Add support for code patching in the S script. |
| | * Fix crash in D script. |
|
| |
|
| === Distributing ===
| | '''v2.0.0''' |
| | * Add support for e files. |
| | * Add code patching. |
| | * Add Hidden Scripts. |
|
| |
|
| To pack the program into a single executable file, [http://www.pyinstaller.org/ pyinstaller] is needed. Simply run the command <code>pyinstaller TranslationToolkit.spec --noconfirm</code> and the executable will be created in the <code>dist</code> folder.
| | '''v1.1.0''' |
| | * Show summary at the end of each script. |
| | * Add update checker. |
| | * Allow FTP connection without Login. |
|
| |
|
| [[Category:3DS homebrew rom hacks]]
| | ==External links== |
| [[Category:Homebrew 3DS game hacks]]
| | * GitHub - https://github.com/Ich73/TranslationToolkit |