Choice voice acting and image for localization#1009
Conversation
Choise file for localization.
For the editor, turn off the choice of localization
|
Hi @Ssid113, @scrubbless @redwolf2 what do you think about this ? In term of implementation, it looks good to me. Simple and efficient. Can you just rename the function 'ChoiseLocalizedSource' to 'FindLocalisedMultimediaFile' Also I don't understand this change: Can you please explain why you need to do this ? It is just filename there. |
|
It's a great idea. |
Hi @BenRQ Other solutions
I apologize in advance for my English) |
rename the function. Add description
|
Thanks for the explanation @Ssid113 , and don't worry for the English, I'm not fluent either :) I'm a bit worried that "source" is used for something else, and your solution may just break something. My proposal: you could check for existing localization when loading the content itself (audio or image), not when loading content description. So you are sure you have access to path. Example for pictures : Function: Code: |
Сheck for existing localization when loading, not when loading content description
|
Thanks for the tip. Сheck for existing localization when loading a lot better. |
|
Looks good ! I will merge after the merge for new scenario explorer (no conflict expected). |
|
WWW is marked as obsolete: Might be replaced with: |
Hi, @redwolf2 |
|
No biggie. I think WWW is used on serveral other places. Those should all be replaced. I am ok with keeping it to WWW for now. I'd just want to stress, that WWW is not the golden hammer for pathing, since it is obsolete. |
|
Yes let's keep this change simple :) And good point @redwolf2 we will need to update this at some point, not urgent clearly. |
|
Late to the party here, but yes. Sounds like a very efficient way to deal with this. How will it work with default language? Just as before? Will it still work if we put the default language files in a folder? E.g. -- [Scenario1] |
|
The default will be exactly as in the *.ini files.
and you need copy path from root folder scenario to file
In the second case, it is not very beautiful, but the old scripts do not change and work as before. Upd.
Upd.
|
Disabled for imput files from MoM app. Disabled for MainMenu. Fixed problem if source not equal questPath
|
Ok that's fine, as long as we know to document it. The important thing is to keep the base functionality working as it did. The ability to move files into folders is very new so not many people use it. |
|
One point : we would need to support this for audio effect (your patch just change for music I think). Second point: What we can do to avoid all those is to do the call in the quest.cs and eventManager.cs code only. In the 3 places we have access to quest info including the path. It's probably better to only change code related to quests for this, and not the code related to the audio playback itself. Tell me what you think about these two points |
|
I add
Yes, I had two problems. The first is the function searched localized multimedia file near the original.
Upd. Upd. |
|
Assets.Scripts.UI.UIWindowSelectionListAudio.Play() is used only in Editor, so you don't need to change it. So I think it should be enough with the others. |
Got rid of unnecessary checks Tested on a scenario TestChoiseVoiceAndImage.valkyrie
|
for UI: Quest.UI This option is really better. Allowed to get rid of unnecessary calls and unnecessary checks. Looked Quest.ChangeQuest(), don't need to change it. For Tests:
|
|
Build test: |
|
I did not forget this, I will test. |
|
@scrubbless maybe you want to test this too ? |
|
I can give it a go, sure. But I don't have any translated images or voice files as of yet. |
|
Works perfectly for me. I will merge now for next test release. |
|
Wiki has been updated : |
Tested on a scenario TestChoiseVoiceAndImage.valkyrie
Example:
You create scenario in your native language (this language default for scenario)
-- [Scenario1]
----- quest.ini (default language - your native language)
----- events.ini (path to file)
----- UI.ini (path to file)
----- sound1.ogg (your native language)
----- image1.jpg (your native language)
next you want add translate
-- [Scenario1]
----- quest.ini (default language - your native language, add new language)
----- events.ini (path to file)
----- UI.ini (path to file)
----- sound1.ogg (your native language)
----- image1.jpg (your native language)
----- [New language] (example Spanish, create new folder "Spanish")
--------- sound1.ogg (add file)
--------- image1.jpg (add file)
Added check when parsing for voice files and images. Do not need to change the file *.ini. Old scenarios works. Save, Load and Editor work as before.
How use:
Example: