Author Topic: EDITOR PLUGIN: Speech Center - Version 2.1.1 - updated to support AGS 3.4  (Read 41279 times)

Some updates:
1. Updated parser to include all new capabilities of AGS 3.4.0
2. Added ability to add methods to custom speech function
3. Added DisplayTopBar to the list of speech functions
4. Playback of <Player> text will use the configured player character

Will release in the next few days, just finalizing some tests.

@Dave Gilbert:
1. I plan to include an option to show in the grid dialog text that is not shown or spoken, this it will be visible in the VO script. I'd like to release all changes above soon, will try to include that as well, if that won't happen now, will have another minor release with this change.
2. I reproduced the problem you reported of build while editing text. The changes are applied prior to the build, so nothing is lost, only that the edit box remains visible. The workaround is to go back again to edit mode and then cancel to get rid of that edit box. I"m still not sure what's the source of the problem, I'll work on it, seems to be related to the grid I used. It will take some time to work this out, but for now at least there's a workaround.
3. The fact that AGS ignores '");' at the end seems odd, I doubt it was done in AGS intentionally. However, if this is somehow officially supported I'll work to include that as well in the parser. If this behavior is just an artifact of some AGS parsing code, recreating this behavior in a different parser is going to be difficult, plus I assume AGS can break this behavior if it's not part of the official support.

Also note that at the moment the plugin will not work with AGS 3.5.0 Alpha version, there's a discussion in another thread regarding that issue.

New release (2.1.0) is now available here

1. Updated parser to include all new capabilities of AGS 3.4.0
2. Added ability to add methods to custom speech function
3. Added DisplayTopBar to the list of speech functions
4. It is now possible to display dialog option text even if it is not used for display or speech in the game
5. Playback of <Player> text will use the configured player character

Note that the minimum AGS version required for this plugin is 3.4.0.
At the moment the plugin does not work with the current implementation of AGS 3.5.0 Alpha.

Update: due to a fix in AGS 3.5 Alpha, the plugin now works with this release. The only caveat is speech playback is not working at the moment with that particular AGS release (this should work fine with AGS 3.4), I'll work on a fix for that, but everything else should function as normal.

I noticed I get an error in the refresh part of the plugin ("Files not fully parsed: somefile.asc..." ) when I am initializing an array of managed structs like:

Code: Adventure Game Studio
  1. managed struct StarStruct{
  2.   int x;
  3.   int y;
  4.   int speed;
  5. };
  6.  
  7. StarStruct * starfield[]; //background stars
  8.  
  9. void initializeStarfield(){
  10.   starfield = new StarStruct[5];
  11.   starfield[0] = new StarStruct;
  12.   starfield[1] = new StarStruct;
  13.   starfield[2] = new StarStruct;
  14.   starfield[3] = new StarStruct;
  15.   starfield[4] = new StarStruct;
  16. }
  17.  

The error points to the last column of the line `starfield[0] = new StarStruct;` and similar lines.

Plugin version: 2.1.0.0
AGS editor version: 3.4.3.1
Game Settings:
Debug: True
Left to right precedence: True
Enforce object based script: True
Enforce new audio: True
Enforce new strings: True

Is it possible to order the texts by location and line? This would allow reading the dialogs like... Dialogs! :]
« Last Edit: 25 May 2019, 16:21 by eri0o »

I see the issue and working on a fix. I suspect this bug has been lurking since the first release, thanks for finding and reporting it.

As for the question regarding sort, when you sort by location, the line numbers are automatically sorted in ascending order for all rows that have the same location. So if you have Dialog 1 lines 1 through 5, and you sort by location, you should expect to see lines 1 through 5 of Dialog 1 appear one after the other. I checked the code to confirm that's how it's supposed to work, if you have seen a different behavior, please let me know.

Just released a new version of the plugin that should address the issue. Please check and let me know.
https://1drv.ms/u/s!AgDXrcGi1DGgb59otK4Z8fEy_9I

Solved it beautifully! Thank you! :]

Also you are right! Clicking on Location first does order by line number after! I think I clicked on something else after! Sorry for giving extra trouble.  8-)
« Last Edit: 30 May 2019, 00:34 by eri0o »

Dave Gilbert

  • Mittens Vassal
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Hello! So I decided to try out the latest version of AGS today and snuck the latest version of this plugin into the installation directory. When I load up AGS, I now get this error:



Any ideas on why this happens?

Thanks!

-Dave

First time I see this issue. Just so I know where to look, is this using the latest AGS 3.4 release or on the 3.5 beta release?
Edit: never mind, I see in the screenshot, this is 3.5, I'll take a look, might be related to the fact it's using a newer .net version than AGS 3.4.
« Last Edit: 18 Sep 2019, 11:28 by SpeechCenter »

Dave Gilbert

  • Mittens Vassal
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Sorry! I thought I replied here. I figured out the solution. I right-clicked on the speech center DLL, went to properties, and selected "unblock."

Okay, that explains it. I might add a note to the installation instructions.

Dave Gilbert

  • Mittens Vassal
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
So even though I got the plugin to load, the sound files no longer play properly. I press the "play" button, then an "error playing" message appears and no sound plays. Here's a screenshot of what happens:



All the speech files are present in the speech folder. The game runs fine when I compile it.

I am using the latest version of the plugin and the latest version of AGS 3.5.

Any help appreciated! :)

-Dave
« Last Edit: 26 Sep 2019, 14:58 by Dave Gilbert »

Does it play sounds through its own means or Editor API?

Dave Gilbert

  • Mittens Vassal
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
I don't know myself. Hopefully @SpeechCenter can answer.

It's using the editor, I understand why it's happening, but it may take some time to fix.
@Gilbert, please let me know if this is time critical, if so I may provide a specific workaround so you don't get stuck.

Dave Gilbert

  • Mittens Vassal
  • Eye see you.
    • Lifetime Achievement Award Winner
    • Dave Gilbert worked on one or more games that won an AGS Award!
    •  
    • Dave Gilbert worked on one or more games that was nominated for an AGS Award!
Sorry I didn't see this until now. I don't know why I didn't get the usual notification!

Anyway, no it's not time critical. I am only just starting a project so it will be awhile before I need voiceover. Is this something specific to my computer/setup? Is there anythign I can do in the interim to get it working? I imagine others will be having this problem as well.

It's not something wrong in your environment. The audio playback works fine with AGS 3.4, so at the moment, the only immediate workaround to use this functionality is to use AGS 3.4. I could release a hacky workaround but I prefer to fix this properly if possible. All other functionality should work fine with AGS 3.5 and I'm hoping people that upgraded are not stuck.
Since AGS 3.5 is already a RC then I'll make sure to address it as soon as possible, but it might be a few weeks until I'll be able to do this properly. In the meantime, if you or anyone else find themselves in a situation that they use AGS 3.5 and need a quick fix for audio playback from the plugin then drop me a note and I'll release that interim solution.

AGS 3.5.0 have different versions of some 3rd party libs, I think, including the audio library. Maybe that's relevant, or some other changes.

I will try looking as well, although tbh I never used this plugin before.

Yes, that is the reason, but the problem is with my code.