Page 1 of 1
Subdirectories for VoiceOverFile
Posted: Tue May 28, 2024 12:00 pm
by nehvaleem
Hi,
I am using a VoiceOverFile entrytag, to specify my vo files. But there is an issue, I want to have multiple vo languages organized in subfolders like:
Resources/en/LineTagXXXXXX.mp3
Resources/ja/LineTagXXXXXX.mp3
But there is a stripping going on in DialogueDatabase, that prevents me from inputting my entrytags like `en/LineTagXXXXXX.mp`, it is happening due to the:
Code: Select all
entrytagRegex.Replace(voiceOverFile, "_")
Is there anything I can do to bypass that?
Re: Subdirectories for VoiceOverFile
Posted: Tue May 28, 2024 12:57 pm
by Tony Li
Hi,
What if you set your language in a variable -- e.g., DialogueLua.SetVariable("language", "ja") -- and then use a sequencer command like this:
Code: Select all
AudioWait([var=language]/entrytag)
In this case, your entrytag will just be "LineTagXXXXXX.mp3"
Re: Subdirectories for VoiceOverFile
Posted: Tue May 28, 2024 1:51 pm
by nehvaleem
Theoretically, I could do something like this, but honestly, it seems like a workaround.
I'll need to maintain the current language value in 2 separate places and update it whenever the player changes the language. Is it the best possible solution?
To give you a bit more context: what if I would like to check if a given (translated) version of a voiceover exists and provide some fallback for a given, individual entry? I can do that when setting the VoiceOverField value, but won't be if I'll resort to lua driven language variable.
Re: Subdirectories for VoiceOverFile
Posted: Tue May 28, 2024 3:00 pm
by Tony Li
I was trying to work with your example, but perhaps the typical way would be better. Typically, you might name your files:
Resources/LineTagXXXXXX_en.mp3
Resources/LineTagXXXXXX_ja.mp3
Then set VoiceOverFile to LineTagXXXXXX, and use the entrytaglocal keyword in your sequence:
You could make a custom version (maybe subclass) of AudioWait() that checks if the specified audio file exists. If not, then replace the last 2 character (e.g., "ja") with a default value (e.g., "en").
Re: Subdirectories for VoiceOverFile
Posted: Tue May 28, 2024 4:29 pm
by nehvaleem
Actually the custom AudioWait / AudioWaitOnce implementation might be a good fit for me.
Thank you a lot for the outstanding support
Re: Subdirectories for VoiceOverFile
Posted: Tue May 28, 2024 6:35 pm
by Tony Li
Glad to help!