Skip to content

Language Pt2: Use English metrics in wide messages, Language Development GUI, D-Pad Menu Localization - #2605

Open
JackTriton wants to merge 2 commits into
OoTRandomizer:Devfrom
JackTriton:Language-Pt2
Open

Language Pt2: Use English metrics in wide messages, Language Development GUI, D-Pad Menu Localization#2605
JackTriton wants to merge 2 commits into
OoTRandomizer:Devfrom
JackTriton:Language-Pt2

Conversation

@JackTriton

Copy link
Copy Markdown

This PR is the continuation of RE:Language and reopened PR of #2594

The main goal is to make languages with larger alphabets easier to support, especially when they need to use the Japanese wide-character table instead of the limited English character table.

What changed

Character widths

Language files can now define individual character widths with CHAR_WIDTHS.

This is useful when a replacement character does not have the same width as the original character slot. It works with both single-byte and wide characters.

For example, characters such as Œ, accented Latin characters, or Cyrillic letters can now use widths that better match their actual appearance.

English metrics for wide messages

A new language option is available:

"wide_text_english_metrics": true

This keeps wide-character encoding, but uses English-like text size, line spacing, wrapping, and positioning.

It also adjusts item icons and choice arrows so they remain aligned with the new message layout.

When this option is disabled, the original Japanese metrics are still used.

Wide message example

D-Pad menu localization

The D-Pad menu can now use text from the selected language.

This includes:

  • Menu labels
  • Dungeon and boss names
  • Entrance destinations
  • Reward areas
  • MQ and normal-layout labels

Languages without a dpad_menu section continue to use the English defaults.
(The image was captured using Japanese as example)

Localized D-Pad menu

Language Development GUI

This PR also adds a development tool for editing language files.

It can:

  • Load and export property.json
  • Merge missing entries from the latest template
  • Browse sections and entries separately
  • Validate edited entries
  • Show added, modified, and deleted entries
  • Import changes from another language file
  • Display changes in a Git-style view
  • Undo and redo edits
  • Rearrange, resize, and group workspace panels

The editor keeps section data separated and does not export workspace or Memo data into property.json.

Default Language Editor layout Customized Language Editor layout

Why this is needed

The original English character table is too small for some languages.

For example, Russian requires more alphabetic characters than the original English table can hold. Using the wide-character table solves the space problem, but previously forced the language to use Japanese text spacing and sizing.

This PR allows those languages to use the larger wide-character table while keeping an English-like message layout.

Per-character widths are also needed because replacement characters do not always match the width of the character slot they replace.

The GUI is included because manually maintaining larger property.json files has become difficult and error-prone as more language-specific settings are added.

Review notes

The changes are grouped by feature so they can be reviewed in this order:

  1. Language.py — language settings and validation
  2. Patches.py — writing language data to the ROM
  3. Messages.py and TextBox.py — wrapping and text layout
  4. ASM/c/message.c and ASM/src/hacks/message.asm — in-game message rendering
  5. ASM/c/text.c and ASM/c/dungeon_info.c — localized D-Pad text
  6. GUI/devtools/language-editor — language development tool

The new options are optional, and existing language files remain compatible.

@fenhl fenhl added Type: Enhancement New feature or request Component: ASM/C Changes some internals of the ASM/C libraries Component: GUI/Website Specifically affects the OoTR GUI Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Status: Under Consideration Developers are considering whether to accept or decline the feature described Component: Patching Affects the patching of the ROM Type: Maintenance Code style, infrastructure, updating dependencies labels Jul 13, 2026
@flagrama

Copy link
Copy Markdown

Could you provide a zpf file? I believe that d-pad localization screenshot is going to be completely unreadable on a CRT, and potentially some of the adjusted normal text too.

@JackTriton

Copy link
Copy Markdown
Author

@flagrama
Ok, provided the Japanese patch but with wide english metrics
I also think that the D-Pad Menu Japanese is unreadable as well
I'll adjust the size of it for the final one
OoT_92A36_3BJPUGZA50.zip

@flagrama

flagrama commented Jul 14, 2026

Copy link
Copy Markdown

Can't properly test because Japanese language is fundamentally broken on actual console. That's going to be needed to be fixed on Dev first.

@JackTriton

Copy link
Copy Markdown
Author

@flagrama
Could I get the context of it?
The patch is intended for NTSC-1.0 by the way

@flagrama

flagrama commented Jul 14, 2026

Copy link
Copy Markdown

I've been with the project since the beginning. I know how patches work.

I apply that patch and try to talk to the kokiri twin in the house you start in and it crashes. If it crashes on console that means it crashes on ares. Load it into ares, display any textbox, and then display the debug output in-game to see what the error is. I assume it is a misalignment. This needs to be resolved in a separate PR because it affects current Dev which is why I had fewer details here and a more specific message in Discord.

@fenhl

fenhl commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Please do not offer to share the base rom, it could cause legal issues.

@flagrama

flagrama commented Jul 14, 2026

Copy link
Copy Markdown
image You definitely lose out on some of the finer details of the Kanji, but I suppose you would know best if that is still readable or not. D-pad menu is, as expected, unreadable though.

@JackTriton

JackTriton commented Jul 14, 2026

Copy link
Copy Markdown
Author

@flagrama
For the text, I think it's readable enough

The D-Pad ones though, will be the issue
It's unreadable even if I used the PC emulation
Considering the spaces it has, I think it can be much wider
I think adding the capability to change the size (or aspect ratio) of the D-Pad characters using the property.json would have the best outcome from all of the perspectives

…s, D-Pad text contrast adjustments, Full Localization of Lang GUI
@JackTriton

Copy link
Copy Markdown
Author

As the title says, I added the capability to adjust the width scale and contrast of D-Pad texts for both narrow and wide characters
I also found that the Lang GUI had some non-translated parts so I fully adapted all of them

For the record, here are some showcases of width controls and new D-Pad texts for English

AdjustedUIJP AdjustedUIEN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: ASM/C Changes some internals of the ASM/C libraries Component: GUI/Website Specifically affects the OoTR GUI Component: Patching Affects the patching of the ROM Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Status: Under Consideration Developers are considering whether to accept or decline the feature described Type: Enhancement New feature or request Type: Maintenance Code style, infrastructure, updating dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants