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

Translation Toolkit 3DS: Difference between revisions

From GameBrew
m (Text replacement - "Category:3DS homebrew rom hacks" to "")
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox 3DS Homebrews
{{Infobox 3DS Homebrews
|title=TranslationToolkit
|title=TranslationToolkit
|image=Translationtoolkit3ds2.png
|description=A command line interface to simplify the workflow for translating 3DS games and releasing patches.
|description=A command line interface to simplify the workflow for translating 3DS games and releasing patches.
|author=Ich73
|author=Ich73
|lastupdated=2021/09/25
|lastupdated=2023/01/21
|type=Hack Utilities
|type=Hack Utilities
|version=2.7.2
|version=2.7.3
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds.7z
|download=https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds.7z
Line 45: Line 46:
Extract the archive and copy <code>TranslationToolkit.exe</code> to the root of your translation directory and run it.
Extract the archive and copy <code>TranslationToolkit.exe</code> to the root of your translation directory and run it.


==User guide==
[https://github.com/Ich73/TranslationToolkit/blob/master/README.md#using-translation-toolkit Using Translation Toolkit.]
===Scripts===
'''Apply Patches (AP):'''
* This script is used to apply <code>.xdelta</code>, <code>.patJ</code> and <code>.patE</code> patches to all files from the original game.
* 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>).
** 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.
** A <code><file>.patE</code> patch will create <code><file>.e</code> and update <code><file>.savE</code> if found.
* Only files with a different hash will be overriden by default. The default original language is <code>JA</code>.
* (AP) 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):'''
==Screenshot==
* 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>).
** 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.
** 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.
* Only patches with a different hash will be overriden by default. The default original language is <code>JA</code>.
* (CP) 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 [[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.
* 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.
* 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>.
* (D) 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 [[Luma3DS|Luma]] can patch the game.
* For this to work your 3DS needs a FTP Server application, such as [[Ftpd_3DS|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 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.
* (S) 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.
* (SC) 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.
* It 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.
* (SW) 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.
* It 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.
* (UW) 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.
* (RP) 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.
* 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>).
** A <code><file>.patJ</code> patch will create <code><file>.savJ</code>.
** A <code><file>.patE</code> patch will create <code><file>.savE</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.
* No files will be overwritten by default. The default original language is <code>JA</code>.
* (CS) 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:
** <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.
** <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):'''
* This script combines the <code>D</code> and <code>S</code> scripts.
 
'''Distribute &amp; Send to Citra (DSC):'''
* This script combines the <code>D</code> and <code>SC</code> scripts.
 
===Configuration===
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:
* <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].
** Example: <code>"E31B"</code>
* <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.
** Example: <code>"Banner": [".bcwav", ".cbmd", ".cgfx"]</code>
* <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.
** 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.
** 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.
** Example: <code>["rename-folder", ["Code", "ExeFS"]]</code>
* <code>delete-folder</code>
** Delete the folders with the argument as the base name.
** Example: <code>["delete-folder", "Code"]</code>
 
===For Developers===
* Setup - 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].
* Running - You can run the program by using the command <code>python TranslationToolkit.py</code>.
* Distributing - 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.
 
==Screenshots==
https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds3.png
https://dlhb.gamebrew.org/3dshomebrews/translationtoolkit3ds3.png


==Changelog==
==Changelog==
'''v2.7.3'''
* Internal changes.
'''v2.7.2'''
'''v2.7.2'''
* Change update behaviour for tools.
* Change update behaviour for tools.
Line 258: Line 108:
==External links==
==External links==
* GitHub - https://github.com/Ich73/TranslationToolkit
* GitHub - https://github.com/Ich73/TranslationToolkit
[[Category:3DS homebrew rom hacks]]
[[Category:Homebrew 3DS game hacks]]

Latest revision as of 06:12, 6 Mayıs 2024

TranslationToolkit
Translationtoolkit3ds2.png
General
AuthorIch73
TypeHack Utilities
Version2.7.3
LicenseMixed
Last Updated2023/01/21
Links
Download
Website
Source

Translation Toolkit is a command line interface to simplify the workflow for translating 3DS games and releasing patches.

It uses the following tools:

Features

  • Scripts options:
    • Apply Patches (AP).
    • Create Patches (CP).
    • Distribute (D).
    • Send via FTP (S).
    • Send to Citra (SC).
    • Setup Workspace (SW).
    • Update Workspace (UW).
    • Release Patches (RP).
    • Replace Files (RF).
    • Create Saves (CS).
    • Extract Game (EG).
    • Rebuild Game (RG).
  • Combinations:
    • Distribute & Send via FTP (DS).
    • Distribute & Send to Citra (DSC).

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.

Extract the archive and copy TranslationToolkit.exe to the root of your translation directory and run it.

Using Translation Toolkit.

Screenshot

translationtoolkit3ds3.png

Changelog

v2.7.3

  • Internal changes.

v2.7.2

  • Change update behaviour for tools.

v2.7.1

  • Add option to enter a local zip file instead of an url to SW and UW script.

v2.7.0

  • Add CS script.
  • Remove UD script.

v2.6.0

  • Add support for Linux.
  • Add EG and RG scripts.
  • Add DS and DSC combination scripts.

v2.5.0

  • Add support for .ttparams configuration file.
  • Add support for 32-bit Windows.

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.

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.

v2.2.0

  • Add RP script.
  • Shorten descriptions to show all scripts in menu.

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.

v2.0.0

  • Add support for e files.
  • Add code patching.
  • Add Hidden Scripts.

v1.1.0

  • Show summary at the end of each script.
  • Add update checker.
  • Allow FTP connection without Login.

External links

Advertising: