Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Response audio file  (Read 6923 times)

0 Members and 1 Guest are viewing this topic.

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Response audio file
« on: November 19, 2007, 09:16:18 AM »

Hello,

How do I add audio files to responses? I've got all my dialogues setup, and the normal actor.talk line audio files setup, but AddResponse doesn't seem to mention audio files, so I don't know where to reference them.

Thanks.
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Response audio file
« Reply #1 on: November 19, 2007, 10:19:09 AM »

You definitely should use built in auto voiceover function! Speech is not bound to response box, but to Talk itself which gets executed below in the script. AddResponse only fills the box.
For help on built in voiceover function see this:

http://wiki.dead-code.org/wakka.php?wakka=FAQ&v=41i#AutomatedSubtitles



Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Response audio file
« Reply #2 on: November 19, 2007, 11:32:51 AM »

Wouldn't it be easier to just let me associate a sound file with the responses I'm "adding"...? I can add icon files, and hover icon files, so why not a sound file too?  ???
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Response audio file
« Reply #3 on: November 19, 2007, 11:52:01 AM »

What EXACTLY are you trying to do?

Normally you fill in the response box (with texts, icons or whatever) and no sound sounds. Whenever your option is selected, you trigger the Talk line in the script
which has associated your voiceover line. As explained if you are using the string.tab file (which is a must as you never know when you're going to localize your game),
you simply name the voiceover in the same way you did in string.tab and the rest is done automatically. No need to script additional lines of code?

No talking at all comes out of the ResponseBox. It's just a container. Or you mean sounds like *oink* whenever you hover over the response box icon?

Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Response audio file
« Reply #4 on: November 19, 2007, 12:32:48 PM »

Code: WME Script
  1. // let the player choose one
  2.     Selected = Game.GetResponse();
  3.  
  4.     // let the actor say the selected sentence
  5.     // (that's why I use the array for storing the sentences)
  6.         Game.Interactive = false;
  7.     actor.Talk(Responses[Selected]);
  8.  

That seems to govern what the actor "says" when you select a response. But where do I associate the audio file for each response?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Response audio file
« Reply #5 on: November 19, 2007, 12:41:08 PM »

Responses is an array.


earlier on you have in this very script something like

Code: WME Script
  1. Responses[0] = "blablabla";
  2. Responses[1] = "blablabla blablabla";
  3. Responses[2] = "blablabla blablabla blablabla";
  4.  

simply change these lines to:

Code: WME Script
  1. Responses[0] = "/key0001/blablabla";
  2. Responses[1] = "/key0002/blablabla blablabla";
  3. Responses[2] = "/key0003/blablabla blablabla blablabla";
  4.  
where keys coincide with those in the string table file and you have files named as key0001.ogg etc.
« Last Edit: November 19, 2007, 12:44:17 PM by metamorphium »
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Response audio file
« Reply #6 on: November 19, 2007, 12:42:17 PM »

But what if I don't have a string table file?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Response audio file
« Reply #7 on: November 19, 2007, 12:47:30 PM »

it's a very very bad idea not to have a string file. String files are vital for the following things:

1, proofreading
2, localization
3, automatic voiceovers

If you still are not convinced of using them (which means you are really stubborn, aren't you  ;D), then you have to setup second array:

var Voiceovers;

Voiceovers[0] = "Path to ogg file here";
Voiceovers[1] = "Path to ogg file here";
Voiceovers[2] = "Path to ogg file here";

and then call

actor.Talk(Response[Selected],Voiceovers[Selected]);

Did I tell you already how bad this is? :D
Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Response audio file
« Reply #8 on: November 19, 2007, 12:56:33 PM »

I'm not stubborn.  ;D

I just don't fully understand the string table thing yet, and I'm trying to make a demo, in English, so I'm planning on worrying about the whole string table thing and localisation later on, when I actually have to localise the game. If it works, it's not bad really. Nobody but me (and you) will know about it.  ;)

But I was actually thinking of doing exactly what you say, so at least I might be starting to understand arrays.  8)

It just seemed strange that I can easily use actor.Talk("text", "path/audio.ogg"); to make my actor talk with sound, but there was nothing built in for adding an audio file to the responses. Responses are an integral part of the game, so it didn't make sense. Unless I'm missing something...?
Logged

metamorphium

  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 12
  • Offline Offline
  • Gender: Male
  • Posts: 1511
  • Vampires!
    • View Profile
    • CBE  software s.r.o.
Re: Response audio file
« Reply #9 on: November 19, 2007, 01:19:53 PM »

okay, once again. Response box is completely unrelated to any talking.  ;)

actor.Talk is a function which takes some parameters. For now you supplied first parameter, which means that it gets the string.

actor.Talk("Hello"); is identical to

var a = "Hello";
actor.Talk(a);

or to

var Responses;

Responses[0] = "Hello";
Selected = 0;
actor.Talk(Responses[Selected]);

See, I didn't even mentioned any response box at all. :) It's still on the variable basis. The only thing which response box does to you is, that it returns a number which indicates the selected option. So although you supply the string for showing it in the response box, you never get it back. That's why you have to implement array to store this information so you can then use it for actor to actually speak that line.

For this we have an array Responses which contains those lines, which you supply again outside of the response dialog.

So no. ResponseBox doesn't care about voiceovers but it also doesn't care about text lines. Maybe you got confused by the variable name Responses, but you can use other name as well as it's only variable.

While single variable contain one piece of information eg. var a="Hello"; array variable contains ... array of informations:

var a;

a[0] = "Hello";
a[1] = "Derman";

Arrays always start from 0 so first item is on a[0];
you can index them directly Game.Msg(a[0]); or indirectly through variable:

var f = 0;
Game.Msg(a[f]);

which is the same thing.

If you need to *pair* text lines with voiceovers without supplying the string.tab file, you have to create another array, which would contain the voiceover filenames. You have to pair them
through the array index:

Responses[0] = "Hello";
Voiceovers[0] = "path to hello ogg file";

so when your response box returns number 0, you point to the right pair - Responses[0], Voiceovers[0]

Hope that cleared it up a bit.



Logged
J.U.L.I.A. Enhanced Edition, Vampires!, J.U.L.I.A., J.U.L.I.A. Untold, Ghost in the Sheet

TheDerman

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 225
    • View Profile
Re: Response audio file
« Reply #10 on: November 19, 2007, 01:40:08 PM »

That's great man - you should write a book about WME.  ;) ;D

Thanks.
Logged

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Response audio file
« Reply #11 on: November 19, 2007, 03:09:32 PM »

String tables make a lot of things easier, actually ... it's in fact harder to learn how to archive this stuff without them ;-)
« Last Edit: November 20, 2007, 01:30:33 AM by sychron »
Logged
... delete the inner sleep ...
 

Page created in 0.094 seconds with 24 queries.