Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to seamlessly switch between localizations #1552

Open
5 tasks
yohjimane opened this issue Nov 29, 2023 · 8 comments
Open
5 tasks

Add option to seamlessly switch between localizations #1552

yohjimane opened this issue Nov 29, 2023 · 8 comments
Labels
Enhancement Game assets A feature or an issue that involves gamedata change Modmaker Experience Modmaker experience with OpenXRay Player Experience

Comments

@yohjimane
Copy link
Contributor

yohjimane commented Nov 29, 2023

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
@yohjimane yohjimane added Enhancement Modmaker Experience Modmaker experience with OpenXRay Game assets A feature or an issue that involves gamedata change Player Experience labels Nov 29, 2023
@yohjimane
Copy link
Contributor Author

yohjimane commented Nov 30, 2023

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.

@Hrusteckiy
Copy link
Contributor

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.

@Xottab-DUTY
Copy link
Member

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.

@Hrusteckiy
Copy link
Contributor

No, in #865 it was other problem caused with renderer or driver on non-Windows OS.

@Xottab-DUTY
Copy link
Member

No, in #865 it was other problem caused with renderer or driver on non-Windows OS.

No, it is exactly because font prefix :)

@lehrax
Copy link

lehrax commented Jan 3, 2024

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.

@Hrusteckiy
Copy link
Contributor

Hrusteckiy commented Jan 3, 2024

switchable from the settings in main menu

It was added in OpenXRay a lot of time ago.

@Hrusteckiy
Copy link
Contributor

But yes, font prefix is not changable. It's required only for Czech(might be for Polish tool), French and German localizations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Game assets A feature or an issue that involves gamedata change Modmaker Experience Modmaker experience with OpenXRay Player Experience
Projects
Status: To do
Development

No branches or pull requests

4 participants