EDITOR PLUGIN: Speech Center - Version 2.2.0

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

Previous topic - Next topic

Dave Gilbert

No pressure or anything, but this will come very useful in about two weeks when I get back from vacation to finish the rest of the VO acting on my game. :)

SpeechCenter

Quote from: Dave Gilbert on Thu 13/09/2012 09:39:34
No pressure or anything, but this will come very useful in about two weeks when I get back from vacation to finish the rest of the VO acting on my game. :)
I think it will be sooner than that, but worst case drop me a note and I'll find a solution.

SpeechCenter

I'm very happy to announce a new version of the Speech Center plugin. This release includes major changes:

  • Edit mode, now there's support for in-place text editing
  • Ability to add missing speech line numbers for the displayed lines
  • Display the script and highlight the line within the script of the current selected speech line
  • VA Scripts

    • Export only displayed lines
    • Option to group VA script lines by code block rather than by function
    • index.html is now created together with the voice scripts
  • Significantly improved refresh performance
  • Line info is displayed in the AGS properties window when selecting the line in the grid
  • New icons

It took a lot of effort to test this and to provide the best experience possible. Please let me know if you encounter any trouble. I also took many precautions in the edit feature and tested it with any source I could find. I still recommend you backup your game before editing, especially when using the feature for the first time.

The plugin is available here

As usual, please provide any feedback you'd like. Many of the features here are the direct result of the posts in this forum.

Enjoy!

SpeechCenter

Greetings,

I uploaded a minor update with a few fixes. Download link remains the same.

Feel free to comment or suggest additional improvements.

SpeechCenter

Version 2.0.2 released. Includes a bug fix that prevented exporting VA scripts in some cases.


m0ds

Hello! I have copied the DLL into my AGS root folder but every time I load AGS I get this error pop up and I can't use Speech Center.



Any idea what may be causing this please?

Could it be that the game files were saved with an AGS that had no speech center installed?

Mind you, I think one of the games I'm trying to load definitely did have Speech Center installed and was used before I got given the game files, yet the error still pops up.

Perhaps I'm missing some essential system file?

Any help appreciated! Thank you

PS. Win XP Pro SP 3

monkey0506

The error message indicates that it failed to load the "System.Core.dll" which is part of the .NET Framework 3.5+. Do you have .NET 3.5 or higher installed? The AGS editor itself requires .NET 2.0, but it looks like the plugin requires a higher version of the framework.

m0ds

Aha, thanks - that's very likely. I'm pretty sure I only have framework 2 or 3, not .5

I'll give it a shot, thanks!

EDIT- Solved! You were right. It doesn't like .NET 4 but it likes .NET 3.5

Thanks sir!

m0ds

Ok, so next question... You have a complete game, with no voice acting attached yet. There are many, many lines spread over different rooms, dialogs and global script etc.

None of them have line numbers, &1, &2. I was under the impression Speech Center would be able to work through and number them all for me, but I guess this isn't the case?

Will I still have to go through every line of script and number them, &1, &2 etc? Is there a quick method of doing this? I was thinking maybe in the "number" box you could just add a number but it seems you have to double click to enter the script etc.

If this is the case, I guess sorting by character and working through it that way would be quickest? If anyone has any decent methods for working on it from a game that has no VA currently, it'd be a lot of help :) Sorry, I'm new to this, and need to find the quickest and simplest method.

Many thanks!

SpeechCenter

The plugin does support automatic numbering of the game, you have to switch to edit mode and then in the edit dropdown you have an option to number all non-numbered lines. After that once you save the project it would apply the changes to your scripts/dialogs. The way it works is that it only numbers the lines currently displayed and not the ones you may have filtered out. It also only touches lines that don't have a number. The number is the lower available for the character. It also detects if a character has two different lines with the same text and if so it reuses the same number.

I had to add a specific edit mode due to the fact that the plugin interface doesn't have a way of notifying other components that an edit is in progress and no way of knowing if a script/dialog has pending changes. For this reason there's a dialog when entering edit mode and also upon save it closes all other windows and exits edit mode. However, you have full control over this behavior in the preferences because I didn't want these features to become nagging or annoying.

For the .net part, yes you guys are correct, I compiled it with 3.5 which is the highest .net version I can use while the editor is compiled with 2.0. Sticking to 2.0 for the plugin would have made some parts of the code overly complicated. My hope is that the editor would move to at least 4.0 at some point and then I'll make the same transition.

Currently aside from automatic numbering there's inline editing of the text itself. I didn't add an option to manually edit the number from the plugin. It's not impossible, but there are some details to take care of so it may take time to add it. Anyway, let me know if that feature has real use.

Please update if you managed to use the auto-number feature or whether something else needs to be worked out.

m0ds

Thanks. I tried it, but...

The game's default language is Italian. It has an English translation. Being English, it's only viable for me to work with the English texts and voice scripts.

I can only auto number the lines to the default language (Italian).

Although it also numbers the lines of the English translation, it no longer displays any English, whether I select to view default or English translation, and so exporting the voice scripts always occurs in Italian.

From that point, attempting to switch to English nothing happens, it just remains all in Italian, as if it's overwritten the English or something.

So I'm back at square one :(

I don't want to set the translation (English) as the game default because that will overwrite and destroy the Italian text.

If there is no way around it, I guess that's the only option, turn it into an English only game.

m0ds

Ah, I just thought of a workaround.

Have two copies of the game.

With copy 1, set the English translation as default, auto number it and compile the scripts, record the lines, the filenames always will be the same, ie ego1.ogg etc

When complete, copy all the voice files into Copy 2 speech folder. Then run speech center to number all the lines in Italian, and in theory, it will then work okay.

Does that seem like a fair assumption? There could be some errors that way though..

SpeechCenter

I believe the source of the problem is that once you have a game with translation, the code doesn't update the existing translation key with the new string (the &number is considered part of the key when translating).
So if you go to the translation you see Italian because the key for each line changed and there's no English translation for the new one.

The workaround you suggest will most likely work since the same lines will appear and will have the same order for both languages. However, I believe it will not work if you would like the compiled game to use the compiled translation file with this method.

I'll try to see if there's a quick fix for this.

m0ds

Thank you. I'm sure in time other commercial developers who deal with multiple languages may to need it to work like this too. Let me know if you come up with something. I don't really want to use the workaround, but deadlines...so will probably have to for now :) Other than that it certainly is a nifty thing!

Dhelayan

I just noticed a bug (is it?) when using 2.0.2 with AGS 3.3.0 Beta..

When i edit some random line in edit mode, then press enter, save the game and hit refresh, the line is back to normal (i.e. without the edits)

SpeechCenter

Quote from: Dhelayan on Wed 09/10/2013 22:32:15
I just noticed a bug (is it?) when using 2.0.2 with AGS 3.3.0 Beta..

When i edit some random line in edit mode, then press enter, save the game and hit refresh, the line is back to normal (i.e. without the edits)
It's more than just this edit. The bug is in the AGS editor beta code. AGS.Types.Scripts doesn't return the correct count. If I have 10 scripts (5 header and 5 code) it returns 5 as the count (multiplying by 2 is not a good solution since some scripts may not have both file types).
This problem was introduced on July 24 or July 27 in the AGS Git code repository.

I changed my code to work around it and not rely on count, but this should be fixed in AGS.


SpeechCenter

Version 2.0.3 is now released here.
This version fixes the automatic numbering with translation problem and a workaround for the script count problem in AGS 3.3.0 beta.

Snarky

Quote from: SpeechCenter on Thu 10/10/2013 04:37:34
AGS.Types.Scripts doesn't return the correct count. If I have 10 scripts (5 header and 5 code) it returns 5 as the count (multiplying by 2 is not a good solution since some scripts may not have both file types).

Out of curiosity, how? Doesn't the editor always create and remove headers and script files together?

Crimson Wizard

Quote from: Snarky on Thu 10/10/2013 07:59:31
Out of curiosity, how? Doesn't the editor always create and remove headers and script files together?
Dialog and room scripts do not have headers.
Also, there is at least one header created internally (where all the system symbols are defined).

PS. To clarify: this "Scripts" class is used not only to keep user scripts, it may be used for some internal purposes too.

SMF spam blocked by CleanTalk