EDITOR PLUGIN: Speech Center - Version 2.2.0

Started by SpeechCenter, Thu 22/03/2012 14:50:32

Previous topic - Next topic

Dave Gilbert

So I have been using this plugin for four years now and had no problems. I would seriously be lost without it. Today, sadly, I have hit a snag.

My game has a lot of background conversations (e.g., non-blocking). It got very complex very quickly, so I created a system that generates them fairly quickly. I've created an array of structs called bgConv, with each struct in the array containing the character, the line to be spoken, and the audiofile name (currently "null" until I get the VO in). I created a command, attached to the struct, called "convSetup" which is used like this:

Code: ags

    BGconv VillageEye2;

    function BGsetup()
    {
        VillageEye2.convSetup(cEli, "Do these drawings on the wall mean anything to you, Mandana?",null);
        VillageEye2.convSetup(cMandana, "I can not decipher their meaning, but I do get a sense of... reverence?",null);
        VillageEye2.convSetup(cEli, "Reverence. Like worship?",null);
        VillageEye2.convSetup(cMandana, "It is only a feeling.",null);
    }  


The plugin can pick up dialog that is called by global functions, but that doesn't seem to apply to functions that are subcommands of other objects (like structs).  Is there a way to enable Speech Center to pick up these conversations? Or should I cut my losses and just redo how the function works? In hindsight, I probably should have tested this out long before now.

SpeechCenter

Quote from: Nixxon on Thu 23/06/2016 00:39:47
Can I just say that this is bloody amazing. Not sure where I would go from here without this plugin.

Top work.
Cool, glad you liked it and found it useful.

SpeechCenter

Quote from: Dave Gilbert on Thu 23/06/2016 15:57:57
So I have been using this plugin for four years now and had no problems. I would seriously be lost without it. Today, sadly, I have hit a snag.

My game has a lot of background conversations (e.g., non-blocking). It got very complex very quickly, so I created a system that generates them fairly quickly. I've created an array of structs called bgConv, with each struct in the array containing the character, the line to be spoken, and the audiofile name (currently "null" until I get the VO in). I created a command, attached to the struct, called "convSetup" which is used like this:

Code: ags

    BGconv VillageEye2;

    function BGsetup()
    {
        VillageEye2.convSetup(cEli, "Do these drawings on the wall mean anything to you, Mandana?",null);
        VillageEye2.convSetup(cMandana, "I can not decipher their meaning, but I do get a sense of... reverence?",null);
        VillageEye2.convSetup(cEli, "Reverence. Like worship?",null);
        VillageEye2.convSetup(cMandana, "It is only a feeling.",null);
    }  


The plugin can pick up dialog that is called by global functions, but that doesn't seem to apply to functions that are subcommands of other objects (like structs).  Is there a way to enable Speech Center to pick up these conversations? Or should I cut my losses and just redo how the function works? In hindsight, I probably should have tested this out long before now.
Hi Dave, long time :)
I checked and indeed this option is not covered. I'll try to find some time to update this, but I cannot really say at the moment when I'll be able to do that. Is it possible for you to use a global function for now?

Dave Gilbert

Well, it will be a looong time before this game is ready for voice acting. At least a year. So if you think it will be addressed sometime before then I will keep going as is. Thank you!

Vincent

Good evening to all AGSer.

This is much interesting to know.
I didn't knew (since a couple of minute ago) that the file.tra doesn't translate any String inside an array. (roll)
In other hand, I should revisit all of my scripts and to do something like this.

Code: ags

if (Game.TranslationFilename != "English") {MessageToSay[0] = "Ciao, come stai ?";}
else {MessageToSay[0] = "Hello, how are you ?";}


I wish I could ask you for confirmation on this issue before changing further the source code.
Thanks in advance.

Crimson Wizard

Vincent, you may use GetTranslation instead:

Code: ags

MessageToSay[0] = GetTranslation("Ciao, come stai ?");


Alternatively, you may store non-translated string in array, but translate it later when you do something, like display it onscreen:
Code: ags

MessageToSay[0] = "Ciao, come stai ?";
<...>
Display(GetTranslation(MessageToSay[0]));


Choose the way which is more convenient for your case.

Vincent

Thank you CW for the quickly answer.
I must need to try this further now, then I will be right back here again and let you know. :)

Vincent

Okay CW, it's all working like a charm !!! :D
I really much appreciate for your help, really. :)

Now the file.tra can translate String inside an array as well.
I only had to change :
Code: ags

LabelMsg1.Say(String.Format("%s", MessageToSay[0])); 


to this : (by always keeping the translation in the file text)
Code: ags

String translated_message = GetTranslation(MessageToSay[0]);
LabelMsg1.Say(String.Format("%s", translated_message)); 


Both of the way I run the game (English or not) the String get read just properly fine.

Anyhow, I still have to revisit all of scipts in this way.
But I don't care because I am really much HAPPY that I got it to work, finally. :)
With this approach it will save me a lot of time for sure.

Many thanks again CW :)

Snarky

I just tried to use SpeechCenter in AGS 3.4.0, but it seems like the parser hasn't been updated to support all the new language features, so when I hit "Refresh" it's throwing errors all over the place, and fails to find all the speech lines in affected files (Edit: it turns out that failing to find the speech lines was at least partly because it doesn't understand optional parameters, so I had to configure it for all the different ways my custom functions can be called). Here's a partial breakdown of things it doesn't like:

Code: ags
#region RegionName

void StaticExtenderFunction(static StructName)
{
  for(int i=0; i<10; i++)
  {
    switch(i)
    {
      case 0:
        break;
    }
  }
}

#endregion

Dave Gilbert

Quote from: SpeechCenter on Thu 23/06/2016 20:18:15
Quote from: Dave Gilbert on Thu 23/06/2016 15:57:57
So I have been using this plugin for four years now and had no problems. I would seriously be lost without it. Today, sadly, I have hit a snag.

My game has a lot of background conversations (e.g., non-blocking). It got very complex very quickly, so I created a system that generates them fairly quickly. I've created an array of structs called bgConv, with each struct in the array containing the character, the line to be spoken, and the audiofile name (currently "null" until I get the VO in). I created a command, attached to the struct, called "convSetup" which is used like this:

Code: ags

    BGconv VillageEye2;

    function BGsetup()
    {
        VillageEye2.convSetup(cEli, "Do these drawings on the wall mean anything to you, Mandana?",null);
        VillageEye2.convSetup(cMandana, "I can not decipher their meaning, but I do get a sense of... reverence?",null);
        VillageEye2.convSetup(cEli, "Reverence. Like worship?",null);
        VillageEye2.convSetup(cMandana, "It is only a feeling.",null);
    }  


The plugin can pick up dialog that is called by global functions, but that doesn't seem to apply to functions that are subcommands of other objects (like structs).  Is there a way to enable Speech Center to pick up these conversations? Or should I cut my losses and just redo how the function works? In hindsight, I probably should have tested this out long before now.
Hi Dave, long time :)
I checked and indeed this option is not covered. I'll try to find some time to update this, but I cannot really say at the moment when I'll be able to do that. Is it possible for you to use a global function for now?

Quote from: Dave Gilbert on Thu 23/06/2016 20:28:49
Well, it will be a looong time before this game is ready for voice acting. At least a year. So if you think it will be addressed sometime before then I will keep going as is. Thank you!

Hello! So it's been a year and a half and I'm gearing up to start recording in a month or two. Any chance of this being addressed? Thanks again and apologies for the issue. :)

Dave Gilbert

Also there's one odd discrepancy I noticed when exporting my VO lines. (sorry for the double-post)

Here's a sample from a script (exported into Word):



As you can see, only SOME of the lines have the "Player:" line before the dialog, while others do not. I did some digging and discovered why.



The player's lines that got exported to the script are the lines that are checkmarked as "show" in the editor. I would like ALL of the player's lines to be exported. Is there a way to do that? The player characters isn't voiced, which is why I didn't write include their lines in the dialog itself.

Any help appreciated! Thanks again. This module is absolutely indispensable!

Dave Gilbert

Triple posting! Sorry to keep posting in this thread, but I discovered a bug and a workaround that folks might be interested in hearing.

So I noticed that one specific room script wasn't being picked up by the module. I was tearing my hair out trying to figure out why. I noticed that when I commented out the majority of the lines in the script, it got picked up. Naturally the room in question was one with LOTS of lines, so after about an hour of commenting and uncommenting later, I discovered the cause!

The culprit was this line:
Code: ags

cVicki.GSay("So what do we do about her?");");


I mistakenly added an extra "); at the end of the command. This is something that the compiler ignored, but the Speech Center plugin did not. I removed the offending code and it now works perfectly!

Edit: I've tried contacting Gilad by PM and email, and have had no reply. So I guess it's safe to say he is no longer actively working on the plugin? Does the source for this exist anywhere?

Dave Gilbert

I found another bug in the plugin. Sorry to keep multi-posting. The developer of this plug-in doesn't seem to be working on it anymore, so i figured I'd post it here so others are aware.

If Speech Center is in edit mode and you compile the game, AGS freezes. So be sure to SAVE the game (to get out of edit mode) before compiling.

SpeechCenter

Huge apologies for the long time being away... too many things happened in real life and only now I have seen all the messages so I wasn't aware this was going on. These issues certainly need to be addressed as well as the requests which are overdue, the goal of the plugin is to improve the productivity and I'd like to ensure this is maintained.
I'm going to see what I can do, will take me a bit to figure all this out. If I see I don't have the capacity to handle then I'll look for other options to address.

Again, sorry for the delay in my response.

Snarky

Woohoo! Great to have you back.

Whatever you decide you can do about these feature requests, I really do urge you to open-source the code. It's so vital to a lot of game projects that a risk of it not working or nobody being able to maintain it in the future could mean AGS isn't a viable option any more, just because of that.

It's your choice, of course. But even if nobody actually does edit the code, just knowing that in the worst case, as a fallback option, someone else could make some desperately needed fix or addition would be a huge relief. It doesn't have to be a big effort: Just picking a license and dropping the source code on Github or Bitbucket (or just zipping it up and sharing a link) is pretty quick.

Dave Gilbert


Narehop


Chicky

I've been playing around with Speech Centre and it's such a time saver!

However, I've run into a snag. We use custom hotspot properties for base responses that don't need specific code, whenever the character responds with just a line of dialogue.

If defaultInteract or defaultLook is set to True, it uses the lines provided below.



Looks like Speech Centre doesn't pickup on these lines (those speech file numbers were added manually), I guess this isn't how most people handle default responses but it seemed like a nice tidy way of doing it when we started.

Anyway, we have 80+ rooms setup like this...

I guess my question is: Is this something SC might be able to support in the future? I really don't fancy going through and adding all of these to room script :~(

SpeechCenter

Quote from: Chicky on Tue 12/06/2018 15:09:22
I've been playing around with Speech Centre and it's such a time saver!

However, I've run into a snag. We use custom hotspot properties for base responses that don't need specific code, whenever the character responds with just a line of dialogue.

If defaultInteract or defaultLook is set to True, it uses the lines provided below.



Looks like Speech Centre doesn't pickup on these lines (those speech file numbers were added manually), I guess this isn't how most people handle default responses but it seemed like a nice tidy way of doing it when we started.

Anyway, we have 80+ rooms setup like this...

I guess my question is: Is this something SC might be able to support in the future? I really don't fancy going through and adding all of these to room script :~(
It's a very interesting way to implement, I'll have to look at whether there is an easy way to access the hotspot properties. It does sound like a very specific way to implement this (interesting to know if others are using this or something similar), so I'll likely try to first look at options that allow extracting data from other sources a bit more generically.
Since I first want to ensure to get the plugin back to working condition, this use case will go to the backlog for now.

Chicky

Thanks for taking a look, honestly it might not be worth your trouble (unless there are other people working like this). I spent a couple of days going through and converting everything over to room script, so it all plays nice with SC now. It's good to hear you're revisiting the project, it's an amazing plug-in!

SMF spam blocked by CleanTalk