Mittens 2018 will be in Boston this September. There are three spaces left, so check out the thread for details!

Author Topic: Translation & Speech file[SOLVED]  (Read 313 times)

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Translation & Speech file[SOLVED]
« on: 28 Nov 2017, 14:11 »
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?
« Last Edit: 29 Nov 2017, 17:41 by Vincent »

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Multi-language Speech files
« Reply #1 on: 28 Nov 2017, 15:11 »
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.
« Last Edit: 29 Nov 2017, 15:27 by Khris »

Crimson Wizard

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Translation & Speech file
« Reply #2 on: 28 Nov 2017, 15:13 »
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

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Translation & Speech file
« Reply #3 on: 28 Nov 2017, 15:35 »
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: Adventure Game Studio
  1. if (Game.TranslationFilename == "") // eng
  2. {
  3.   cEgo.Say("&1 Hello");
  4. }
  5. else
  6. {
  7.   cEgo.Say("&1x Ciao");
  8. }

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

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: Translation & Speech file
« Reply #4 on: 28 Nov 2017, 15:42 »
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

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Translation & Speech file
« Reply #5 on: 28 Nov 2017, 16:47 »
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

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Translation & Speech file
« Reply #6 on: 28 Nov 2017, 16:53 »
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

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
Re: Translation & Speech file[SOLVED]
« Reply #7 on: 29 Nov 2017, 15:05 »
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.

Edit:
Gave this a try and it worked perfectly fine.
« Last Edit: 29 Nov 2017, 17:41 by Vincent »