Fix #5742 - Add voice language separation option - #8659
Open
mmustafasenoglu wants to merge 1 commit into
Open
Conversation
Adds a separate voice language setting that allows using different voice acting language from the text translation language. When voice and text languages differ, a second language MPQ is loaded at VoiceLangMpqPriority (9150). FindMpqFile routes sfx/* requests to the voice MPQ and other files to the text MPQ, so voice clips and text strings come from independent language packs.
Author
|
Hi! Just checking in on this PR. Happy to address any feedback or make changes if needed. Thanks for reviewing! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5742
Adds a separate voice language setting that allows users to use a different voice acting language from the text translation language. This is especially useful for Android users who want English voices with their native text (e.g. Russian text + English voices).
Approach
The existing language MPQ system bundles both text translations and voice clips in a single MPQ file per language. This PR adds path-aware MPQ routing to separate them:
VoiceCode)VoiceLangMpqPriority)FindMpqFile: Files undersfx\route to the voice MPQ, all other files route to the text MPQChanges
Source/engine/assets.hpp: AddVoiceLangMpqPriorityconstant,LoadVoiceLanguageArchive()andVoiceMpqSeparationActive()declarationsSource/engine/assets.cpp: Implement path-aware routing inFindMpqFile(), addLoadVoiceLanguageArchive()andVoiceMpqSeparationActive()Source/utils/language.h/.cpp: AddGetVoiceLanguageCode()Source/options.h/.cpp: AddOptionEntryLanguageCodeconstructor overload,voiceCodetoLanguageOptionsSource/diablo.cpp: Load voice archive on startup, add voice language change callback