Entry 89
English voices on a story start, and --voice en|jp
Filescrates/piney-game/src/area.rscrates/piney-game/src/mode.rscrates/piney-game/src/main.rscrates/piney-game/src/world.rscrates/piney-game/src/desktop.rscrates/piney-game/src/stream.rscrates/piney-game/src/session.rsdocs/engine/sound.md
The user played story:4 and got English text with Japanese voices.
Why
- The save said English. A new game's save comes from the boot's
Init(0), which setssaveData.voiceto 1 (English,VOICE_E/). - The driver never heard it. The game's sound driver reads that byte
each time it plays a line. The port's driver keeps its own copy,
voice_english, which is false until a mode sendsVoiceOptions. - Who sent it. Only the desktop and the town sent it as they start.
story:4starts straight in the dungeon, a field-and-dungeon mode that never sent it, so the copy stayed Japanese. Anyone who reached a field through the desktop or Mac Anu heard English.
The fix
- Fields and dungeons send it too. They hand the driver the save's voice language and Parody Mode as they start, as the town does.
- One reader. Every read of the language goes through
mode::voice_english(save):- the three modes'
VoiceOptions; - the town's event voice requests;
- the stream player, which picks a stream's voice track from it.
- the three modes'
- The command-line option.
--voice en|jpsets the language for the whole run, over the save's Options setting. The user asked for an easy switch.
Checked
- A new test.
a_dungeon_start_sets_the_voice_languagerunsstory:4for 30 frames and requiresVoiceOptions, every one English. - The test catches the bug. With the dungeon's events emptied again, it fails ("no voice options in the first 30 frames").
- The rest.
story_starts_open_their_event, the workspace's tests, clippy, fmt and the docs check pass.
Still unknown
- Not seen with the new flag.
--voiceis not yet in any playthrough test; the unit path is the same helper. - Options changes during play. Changing Voice in the game's Options inside The World goes through the field UI'sSoundEnvrequest, which carries the volumes only. The driver's copy may not follow until the next mode starts. Whether the game applies it at once is not checked.