Author Topic: EDITOR PLUGIN: Speech Center - Version 2.0.4 - now with inline editing  (Read 27924 times)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
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: Adventure Game Studio
  1.     BGconv VillageEye2;
  2.  
  3.     function BGsetup()
  4.     {
  5.         VillageEye2.convSetup(cEli, "Do these drawings on the wall mean anything to you, Mandana?",null);
  6.         VillageEye2.convSetup(cMandana, "I can not decipher their meaning, but I do get a sense of... reverence?",null);
  7.         VillageEye2.convSetup(cEli, "Reverence. Like worship?",null);
  8.         VillageEye2.convSetup(cMandana, "It is only a feeling.",null);
  9.     }  
  10.  

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.
« Last Edit: 23 Jun 2016, 16:08 by Dave Gilbert »

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.

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: Adventure Game Studio
  1.     BGconv VillageEye2;
  2.  
  3.     function BGsetup()
  4.     {
  5.         VillageEye2.convSetup(cEli, "Do these drawings on the wall mean anything to you, Mandana?",null);
  6.         VillageEye2.convSetup(cMandana, "I can not decipher their meaning, but I do get a sense of... reverence?",null);
  7.         VillageEye2.convSetup(cEli, "Reverence. Like worship?",null);
  8.         VillageEye2.convSetup(cMandana, "It is only a feeling.",null);
  9.     }  
  10.  

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

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
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

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
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: Adventure Game Studio
  1. if (Game.TranslationFilename != "English") {MessageToSay[0] = "Ciao, come stai ?";}
  2. 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

  • 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!
Vincent, you may use GetTranslation instead:

Code: Adventure Game Studio
  1. MessageToSay[0] = GetTranslation("Ciao, come stai ?");
  2.  

Alternatively, you may store non-translated string in array, but translate it later when you do something, like display it onscreen:
Code: Adventure Game Studio
  1. MessageToSay[0] = "Ciao, come stai ?";
  2. <...>
  3. Display(GetTranslation(MessageToSay[0]));
  4.  

Choose the way which is more convenient for your case.
« Last Edit: 06 Nov 2016, 18:38 by Crimson Wizard »

Vincent

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
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

  • Jump back into the pond
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
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: Adventure Game Studio
  1. LabelMsg1.Say(String.Format("%s", MessageToSay[0]));

to this : (by always keeping the translation in the file text)
Code: Adventure Game Studio
  1. String translated_message = GetTranslation(MessageToSay[0]);
  2. 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

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
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: Adventure Game Studio
  1. #region RegionName
  2.  
  3. void StaticExtenderFunction(static StructName)
  4. {
  5.   for(int i=0; i<10; i++)
  6.   {
  7.     switch(i)
  8.     {
  9.       case 0:
  10.         break;
  11.     }
  12.   }
  13. }
  14.  
  15. #endregion
« Last Edit: 13 Jan 2018, 12:12 by Snarky »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
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: Adventure Game Studio
  1.     BGconv VillageEye2;
  2.  
  3.     function BGsetup()
  4.     {
  5.         VillageEye2.convSetup(cEli, "Do these drawings on the wall mean anything to you, Mandana?",null);
  6.         VillageEye2.convSetup(cMandana, "I can not decipher their meaning, but I do get a sense of... reverence?",null);
  7.         VillageEye2.convSetup(cEli, "Reverence. Like worship?",null);
  8.         VillageEye2.convSetup(cMandana, "It is only a feeling.",null);
  9.     }  
  10.  

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?

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

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
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

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
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: Adventure Game Studio
  1. cVicki.GSay("So what do we do about her?");");
  2.  

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?
« Last Edit: 02 Feb 2018, 11:46 by Dave Gilbert »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
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.

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

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
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.
« Last Edit: 16 May 2018, 15:47 by Snarky »

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
He returns! Good to have you back. :)