xray-16
xray-16 copied to clipboard
Add option to seamlessly switch between localizations
Players should have the following options available in sound settings: Audio Language, Text Language
Changing audio language will load sounds in from some localized sound directory.
Changing text language will load translation .xml files from gamedata/configs/text/LANGUAGE_NAME/
Ideally, this will happen in realtime and not require a game restart for changes to take effect.
- [ ] Create new options in sound settings for Audio Language, Text Language
- [ ] Update filesystem structure to support multiple languages for audio (should be similar to the structure built out for text translations)
- [ ] Pack all vanilla sound localizations into a master localized audio .db, using the new filesystem structure.
- [ ] Figure out engine logic to update sound paths in real time
- [ ] Figure out engine logic to update text paths in real time
One idea to switch between soundpaths in realtime, without messing with existing logic that much.
Context:
ALL Game sounds are loaded from a macro, in both engine and scripts: $game_sounds$
We can add some sort of flag in engine to tell what language we're using.
Based on the flag, we look for files in $game_sounds$\LANGUAGE_IDENTIFIER\
If the sound doesn't exist in our localized sounds folder, then we fallback to original $game_sounds$
dir.
It's good, but can you also add the font prefix changing? For German language it requires _west
. For Czech - _cent
. For Russian no prefix.
It's a big problem, because if wrong prefix is selected - you will see wrong symbols instead of letters.
It's good, but can you also add the font prefix changing? For German language it requires
_west
. For Czech -_cent
. For Russian no prefix. It's a big problem, because if wrong prefix is selected - you will see wrong symbols instead of letters.
Ahhh! Thank you. Now I know why we have issue #865.
No, in #865 it was other problem caused with renderer or driver on non-Windows OS.
No, in #865 it was other problem caused with renderer or driver on non-Windows OS.
No, it is exactly because font prefix :)
Developers of True Stalker (based on modified version of OpenXRay) managed to make game localisation (text, at least) switchable from the settings in main menu. Actually, here's extracted lua script that is used for it (I have borrowed it into my repo): https://github.com/lehrax-gaming/true-localisation/blob/main/gamedata/scripts/ts_utils.script#L597 If/when the sources are shared, we'll all benefit.
switchable from the settings in main menu
It was added in OpenXRay a lot of time ago.
But yes, font prefix is not changable. It's required only for Czech(might be for Polish tool), French and German localizations.