Game: cutscene voices switch from Portuguese (pt-BR) to Japanese after the first boss (from Hookshot #1460) #125

Open
opened 2026-11-13 05:31:07 +00:00 by dyst · 0 comments
Member

Ported from NotRexed/Hookshot#1460 (reported by deivid94, closed into the
tracking issue NotRexed/Hookshot#2506), with what has been learned since.
Not reproduced yet, on Hookshot or on Longshot.

Longshot version

Reported on Hookshot v2.0.11 (source d6369f1e). Not tried on Longshot; nothing in the code paths below has changed since.

What kind of problem

Sound

What happened

With language.txt = pt-BR (the log says oe: language pt-BR (language.txt)), the first cutscenes in Kokiri Forest
played the Portuguese dub, but the cutscene right after defeating Gohma (the Great Deku Tree) played Japanese voices.
Subtitles and menus stayed in Portuguese. No setting was changed between the two
(the report,
its log).

What is ruled out

From Joey-Magnus's notes and the report:

  • The dump. The Portuguese voice files for the scene are all there (USpt_EventFlowMsg-_Dm_Kokiri_0160 and its six
    stream files), the same set as the other languages, and none is byte-identical to its Japanese counterpart.
  • The movie's audio. Dm_Kokiri_0160.webm has no audio track; the voices are the .bwav files played alongside it.
  • The language Longshot reports. nn::oe::GetDesiredLanguage reads language.txt once and caches it.

What the game does

The game has a Voice Language option of its own, apart from the text language
(mooki's lead), and static analysis of the
binary adds how it is chosen:

  • It is the game-data enum OptionData.VoiceLanguage (murmur3 0xa2dcdc9d), saved in option.sav. On the game's own
    Options screen it offers nine languages: Japanese, English, French (France), French (Canada), German, Spanish (Spain),
    Spanish (Latin America), Italian, Portuguese (Brazil).
  • Its default in the game data is Japanese (GameDataList's DefaultValue, ResetTypeValue 4, SaveFileIndex 1).
  • The text follows the system language; the voices follow the option. GetDesiredLanguage gives a region and a
    language, and from them a region-language type (pt-BR is type 4, USpt); the fonts and messages follow that type.
    The voice files are picked from the option's value instead, mapped through VoiceSettingInfo's LanguageMapping.
  • At every start the game's voice resource (game::NpcVoiceResource, on its first update) sets the option to the
    type's default voice (Portuguese (Brazil) for pt-BR), before option.sav is read; a loaded option.sav then replaces
    the value. Whenever the option is written afterwards, the voices are picked again.
  • A value it does not know (outside the nine, 0, or the field not found) gives JPja.
  • The options' reset (Sequence/ConfirmationResetOption.module.ainb, node SeqOneShotSetDefaultVoiceLanguage) sets the
    type's default again, Portuguese (Brazil) here, not Japanese.

So Japanese voices under Portuguese text means the option held Japanese (its game-data default) or a value the game
does not know, while the text kept following pt-BR.

The reproduction so far

mooki's runs on Hookshot main bdfe09c plus
logging (Linux, RTX 4090, NVIDIA 615.78.08, pt-BR), logging the option, every save-file call and every voice file
opened:

Run What Voice Language option Voice files
1 New profile, New Game, the opening, the first save Portuguese (Brazil) throughout (not logged)
2 Restart, Continue Portuguese (Brazil)
3 option.sav emptied (0 bytes), Continue Portuguese (Brazil)
4 option.sav cut to half, Continue Portuguese (Brazil)
5 New profile, the opening narration Portuguese (Brazil) 7 of 7 USpt
6 A save in Gohma's room, the warp, the Deku Tree, the movie Portuguese (Brazil) 15 of 15 and 4 of 4 USpt

So the scene after Gohma plays the Portuguese dub while the option holds Portuguese, and neither an empty nor a
half-written option.sav turned it Japanese. The way left is an option.sav that holds Japanese (or an unknown value),
read at the start of a session. mooki saw exactly that the other way round: save folders whose option.sav held Japanese
played JPja under en-US text.

The reporter's reply: they had rebuilt the
game and copied their save folder out and back in between sessions; the game's Voice Language option now shows
Portuguese; Windows is set to English.

Where in the game

The cutscene after defeating Gohma (Great Deku Tree); the earlier Kokiri Forest cutscenes were in Portuguese.

How often

Once, in the reporter's playthrough

Graphics card and driver version

Reporter: NVIDIA GeForce RTX 4060 (8 GB), NVIDIA 610.74

CPU, RAM and operating system

Reporter: AMD Ryzen 7 5700X, 32 GB, Windows 11 Pro 24H2 (build 26100)

Changes from the defaults

Reporter: language.txt pt-BR (chosen in the builder), built from a .nup, game folder at the root of a secondary
drive, 5.1 output (audio: device sink on mix 0, 6 channels), frame generation on, ultrawide on; no env file.

What would settle it

  • From anyone who sees it: what the game's own Options screen shows for Voice Language at that moment, and whether the
    save folder (user/save/..., with option.sav) was copied from another install, an emulator or another port, or with
    scripts/oot_saves.py.
  • In code: what writes OptionData.VoiceLanguage after the start of a session, and when option.sav is read and
    written relative to the voice resource's first update. A live run that logs the voice manager's language changes
    (with their caller) and option.sav's value at each read would show it.
  • A possible hardening, if an option.sav from elsewhere turns out to be the cause: nothing in Longshot validates the
    option against the text language, and the game's own behaviour (Japanese voices under other text) is legitimate when a
    player picks it, so any change should only cover values the game does not know.
Ported from [NotRexed/Hookshot#1460](https://github.com/NotRexed/Hookshot/issues/1460) (reported by deivid94, closed into the tracking issue [NotRexed/Hookshot#2506](https://github.com/NotRexed/Hookshot/issues/2506)), with what has been learned since. Not reproduced yet, on Hookshot or on Longshot. ### Longshot version Reported on Hookshot v2.0.11 (source d6369f1e). Not tried on Longshot; nothing in the code paths below has changed since. ### What kind of problem Sound ### What happened With `language.txt` = `pt-BR` (the log says `oe: language pt-BR (language.txt)`), the first cutscenes in Kokiri Forest played the Portuguese dub, but the cutscene right after defeating Gohma (the Great Deku Tree) played **Japanese** voices. Subtitles and menus stayed in Portuguese. No setting was changed between the two ([the report](https://github.com/NotRexed/Hookshot/issues/1460), [its log](https://github.com/NotRexed/Hookshot/issues/1460#issuecomment-6758398828)). ### What is ruled out From [Joey-Magnus's notes](https://github.com/NotRexed/Hookshot/issues/1460#issuecomment-6776710334) and the report: - **The dump.** The Portuguese voice files for the scene are all there (`USpt_EventFlowMsg-_Dm_Kokiri_0160` and its six stream files), the same set as the other languages, and none is byte-identical to its Japanese counterpart. - **The movie's audio.** `Dm_Kokiri_0160.webm` has no audio track; the voices are the `.bwav` files played alongside it. - **The language Longshot reports.** `nn::oe::GetDesiredLanguage` reads `language.txt` once and caches it. ### What the game does The game has a **Voice Language option of its own**, apart from the text language ([mooki's lead](https://github.com/NotRexed/Hookshot/issues/1460#issuecomment-6786512289)), and static analysis of the binary adds how it is chosen: - It is the game-data enum `OptionData.VoiceLanguage` (murmur3 0xa2dcdc9d), saved in `option.sav`. On the game's own Options screen it offers nine languages: Japanese, English, French (France), French (Canada), German, Spanish (Spain), Spanish (Latin America), Italian, Portuguese (Brazil). - **Its default in the game data is Japanese** (`GameDataList`'s `DefaultValue`, `ResetTypeValue` 4, `SaveFileIndex` 1). - **The text follows the system language; the voices follow the option.** `GetDesiredLanguage` gives a region and a language, and from them a region-language type (`pt-BR` is type 4, `USpt`); the fonts and messages follow that type. The voice files are picked from the option's value instead, mapped through `VoiceSettingInfo`'s `LanguageMapping`. - **At every start** the game's voice resource (`game::NpcVoiceResource`, on its first update) sets the option to the type's default voice (Portuguese (Brazil) for `pt-BR`), before `option.sav` is read; a loaded `option.sav` then replaces the value. **Whenever the option is written** afterwards, the voices are picked again. - **A value it does not know** (outside the nine, 0, or the field not found) gives `JPja`. - The options' reset (`Sequence/ConfirmationResetOption.module.ainb`, node `SeqOneShotSetDefaultVoiceLanguage`) sets the type's default again, Portuguese (Brazil) here, not Japanese. So Japanese voices under Portuguese text means the option held **Japanese** (its game-data default) or a value the game does not know, while the text kept following `pt-BR`. ### The reproduction so far [mooki's runs](https://github.com/NotRexed/Hookshot/issues/1460#issuecomment-6801416729) on Hookshot `main` `bdfe09c` plus logging (Linux, RTX 4090, NVIDIA 615.78.08, `pt-BR`), logging the option, every save-file call and every voice file opened: | Run | What | Voice Language option | Voice files | |---|---|---|---| | 1 | New profile, New Game, the opening, the first save | Portuguese (Brazil) throughout | (not logged) | | 2 | Restart, Continue | Portuguese (Brazil) | | | 3 | `option.sav` emptied (0 bytes), Continue | Portuguese (Brazil) | | | 4 | `option.sav` cut to half, Continue | Portuguese (Brazil) | | | 5 | New profile, the opening narration | Portuguese (Brazil) | 7 of 7 `USpt` | | 6 | A save in Gohma's room, the warp, the Deku Tree, the movie | Portuguese (Brazil) | 15 of 15 and 4 of 4 `USpt` | So the scene after Gohma plays the Portuguese dub while the option holds Portuguese, and neither an empty nor a half-written `option.sav` turned it Japanese. The way left is an `option.sav` that holds Japanese (or an unknown value), read at the start of a session. mooki saw exactly that the other way round: save folders whose `option.sav` held Japanese played `JPja` under `en-US` text. [The reporter's reply](https://github.com/NotRexed/Hookshot/issues/1460#issuecomment-6806599165): they had rebuilt the game and copied their save folder out and back in between sessions; the game's Voice Language option now shows Portuguese; Windows is set to English. ### Where in the game The cutscene after defeating Gohma (Great Deku Tree); the earlier Kokiri Forest cutscenes were in Portuguese. ### How often Once, in the reporter's playthrough ### Graphics card and driver version Reporter: NVIDIA GeForce RTX 4060 (8 GB), NVIDIA 610.74 ### CPU, RAM and operating system Reporter: AMD Ryzen 7 5700X, 32 GB, Windows 11 Pro 24H2 (build 26100) ### Changes from the defaults Reporter: `language.txt` `pt-BR` (chosen in the builder), built from a `.nup`, game folder at the root of a secondary drive, 5.1 output (`audio: device sink on mix 0, 6 channels`), frame generation on, ultrawide on; no env file. ### What would settle it - From anyone who sees it: what the game's own Options screen shows for Voice Language at that moment, and whether the save folder (`user/save/...`, with `option.sav`) was copied from another install, an emulator or another port, or with `scripts/oot_saves.py`. - In code: what writes `OptionData.VoiceLanguage` after the start of a session, and when `option.sav` is read and written relative to the voice resource's first update. A live run that logs the voice manager's language changes (with their caller) and `option.sav`'s value at each read would show it. - A possible hardening, if an `option.sav` from elsewhere turns out to be the cause: nothing in Longshot validates the option against the text language, and the game's own behaviour (Japanese voices under other text) is legitimate when a player picks it, so any change should only cover values the game does not know.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#125
No description provided.