Translation & Speech file[SOLVED]

Started by Vincent, Tue 28/11/2017 14:11:07

Previous topic - Next topic

Vincent

Good evening to all AGSer around the world.

I have a noob question to ask you.
My question is, if a game have a translation file and there is aviable the speech sound when talking, how Ags know which language is running to play properly a speech file according with the selected language when a character is talking?

Khris

#1
Afaik AGS doesn't support multi-language voice speech.

However, since the lines contain the number of the wav file, one could in theory change the number in the translation, then store the spoken line using the new number? I've never tried.

Edit:
Gave this a try and it worked perfectly fine.

Crimson Wizard

Quote from: Vincent on Tue 28/11/2017 14:11:07
My question is, if a game have a translation file and there is aviable the speech sound when talking, how Ags know which language is running to play properly a speech file according with the selected language when a character is talking?

I guess more experienced game developers may correct me, but from what I remember about engine, AGS does not support multiple speech.vox files, and the two options I can see here are:

1) Provide multiple speech.vox files for download, or include them in the separate folder with instructions to copy required one to where the game exe is.

2) If your game has limited speech, you may try to put all voice-overs into same speech.vox, then you would need to use different voice numbers (&N tags) in the translated speech.

Vincent

Thanks both Khris and Crimson Wizard.

I would like to try to put all voice-overs into same speech.vox, since there are only two language at all.
So do you think I should go ahead and do something like this?

Code: ags

if (Game.TranslationFilename == "") // eng
{
  cEgo.Say("&1 Hello");
}
else
{
  cEgo.Say("&1x Ciao");
}


Although in this way there would be a lot of script that should be duplicated right?

Khris

Yeah, don't do that. Even if you wrote a custom function that prevented this total duplicate code armageddon nightmare hell, you'd short-circuit the entire native translation functionality.

We already told you how to put them all in the same speech.vox: change the numbers in the translation source. Just add 1000, so "&23 Hello" becomes "&1023 Ciao".

Vincent

Right, I understand. I test it and it's working fine.
It's simply enough to just change the numbers in the translation source, luckly. I've never tried this myself too.
Thanks again both for the info. :)

Snarky

I think you could also write a function to change the speech clip number depending on the active translation, so that you don't have to write multiple lines of code for each line of dialog.

Vincent

#7
Hello Snarky, thanks for your response.
Maybe after some time I might have done so too, but fortunately I stopped in time.
In this case I think the workaround to edit the tag number via the translation file is definitely much simpler.
Thanks Snarky, Khris and Crimson Wizard.

Quote from: Khris on Tue 28/11/2017 15:11:23
Edit:
Gave this a try and it worked perfectly fine.

SMF spam blocked by CleanTalk