Configuring a translation repository
Repos come with their own info file and configuration separate from Hachimi's user config to tweak their behaviour. Both info and config are set by a repo's maintainers. If that's you, please read this page to understand the options.
Both these files are in JSON format and go directly in the localized_data folder. Their keys are described below.
Info file
The info file contains details about the repo which will display to users in the Change Translation Repo and repo Info windows of Hachimi's GUI. The file must be called info.json.
WARNING
Relative paths are not supported for URLs.
"name": "Translation Repo Name",
"description": "Translation Repo Description",
"language": "en"Basic information, similar to the repo selector. You can add a more detailed description here, as there is more space and no other repo entries. The language key is only a label and can contain any text.
"homepage": "https://github.com/TLRepoOwner/TLRepoName",
"links": [
["button_name", "https://url.com"]
["button_name2", "https://url.com"]
// …
]Various URLs relevant to the repo. The links in the links array can be named anything you want. Each entry will display a clickable button with the name, which will open the corresponding link.
"changelog_url": "https://example.com/CHANGELOG.txt"A URL to a file which contains update information. The contents of this file will be displayed when the Show Changelog button is clicked in the translation update notification window. It is intended to list recent changes and be updated frequently.
Supports both plaintext and markdown, though links are not supported in markdown.
The URL must end in .txt or .md/.markdown.
"maintainer": "maintainer_name",
"contributors": "https://example.com/contributors-list.html"Names of contributors. The contributors key supports a .html web page URL, a newline-separated .txt URL, or an array.
Config file
INFO
This page is not exhaustive. The full internal representation of all available options can be found in the source code.
All paths in this file are relative to the folder it is in, not the Hachimi root.
Localization file paths
"localize_dict": "path"
"hashed_dict": "path"
"text_data_dict": "path"
"character_system_text_dict": "path"
"race_jikkyo_comment_dict": "path"
"race_jikkyo_message_dict": "path"
"assets_dir": "path"These are the relative paths to files for each part of the translation system.
- The first two for general UI.
- The next four for MDB tables.
- The last one is the folder where all other localization files go. Namely, stories, lyrics, images, etc. Unlike the previous dicts, files in there are organized by their internal game paths.
Extra localization assets
"extra_asset_bundle": {
"windows": "path",
"android": "path"
}An optional dict which allows you to include a custom Unity AssetBundle which will be loaded into the game. Its keys are the supported platforms, and their values are paths to the bundle.
This bundle can include any files, but exact details on its workings are lacking at the moment. It is mainly used to include a custom font for use in localization, if required.
Creating this assetbundle requires you to have a compatible version of the full Unity Editor installed, or find a third party tool.
"replacement_font_name": "path"The internal path inside the extra_asset_bundle to find a custom font, if needed.
Localized text functions
"plural_form": "n == 1 ? 0 : 1",
"ordinal_form": "(((n+9)%10)<3 && ((n+90)%100)>10) ? ((n+9)%10) : 3",
"ordinal_types": ["$st", "$nd", "$rd", "$th", "etc"]The first two are custom expressions that will be evaluated to detect plural and ordinal forms, for use with the $ordinal(n) and $plural(n, t0, t1) template expressions. In these expressions, n is usually a game text-variable like {0}. The expression decides which of the tx arguments to use for plural, and which of the ordinal_types for ordinal, based on the value of n.
Both are optional. Example is the default for English. Details in the source code.
"months": ["month 1", "month 2", "etc"],
"month_text_format": "$(half) $(month)"How to format months. The first one is an array where each entry represents a month. The second is the string used in some parts of the game which display a month half, like for Career "turns". Not sure if it's actually used.
Text wrapping
"use_text_wrapper": trueBoolean to enable custom text wrapping or let the game handle it. The other options in this section will not apply when it is set to false.
"text_common_best_fit": falseEnable Unity's "best fit" wrapping globally on all TextCommon objects. This will automatically wrap and scale text to fit within the text area bounds. Note: bounds do not always match the expected size of an element.
"wrapper_penalties": {
"nline_penalty": 0,
"overflow_penalty": 0,
"short_last_line_fraction": 0,
"short_last_line_penalty": 0,
"hyphen_penalty": 0
}An optional dict indicating the penalties used in the optimal-fit wrapping algorithm. When used, all penalties should be configured.
See the simple example for a basic idea of how it works, and Penalties for further details and settings.
"line_width_multiplier": 2.0The game's internal line width is set in CJK unicode characters, where each is usually roughly 2 ASCII characters. This setting applies globally to offset this, where needed for custom wrapping calculations (not applied everywhere).
"text_frame_line_spacing_multiplier": 0.72,
"text_frame_font_size_multiplier": 0.96Multipliers applied to the text frame/box settings. This is used primarily for story dialogue.
"systext_cue_lines": {
"type": 1,
"...": 2
}An optional dict indicating maximum amount of lines per type of systext.
Its keys are the "type" found in the MDB table's cue_sheet column: "snd_vo_TYPE_". Its values are the max lines for that type. A "default" key can also be specified, which will be used when no other type matches. If not specified, the default is 4.
Extra functions
"auto_adjust_story_clip_length": trueAllow adjusting internal values to match localized text length. Affects dialogue delay/reading time in auto mode.
"now_loading_comic_title_ellipsis": true,Trail off comic titles instead of resizing them to fit (?).
"remove_ruby": trueHide the game's furigana. Should likely be on in localization repos.
"character_note_top_gallery_button": {
"text": "Career Event\n Gallery",
"font_size": 38,
"line_spacing": 0.6
},
"character_note_top_talk_gallery_button": {
"text": " Chat\n Gallery",
"font_size": 44,
"line_spacing": 0.55
}Special settings for some non-standard elements that cause issues otherwise. Additions can be requested if other such elements are found.
"news_url": "https://hachimi.leadrdrk.com/PakaNews/"A URL to open or fetch in-game news from. Requires a specially set up source to provide localized news from the official website.
