Adventure Game Studio

AGS Support => Modules, Plugins & Tools => Topic started by: IceMan on Thu 02/02/2012 18:22:42

Title: Module: Lip synching with Lucasarts-style speech
Post by: IceMan on Thu 02/02/2012 18:22:42
This is a feature I've long-requested for AGS, but didn't get implemented, so here's a module for it!

Lip synching with Lucasarts-style speech module (http://www.iceboxstudios.co.uk/files/LipSynchPamela.scm)

AGS won't let you use both Lucasarts-style speech and Pamela-file lip-synching, so this module hacks speaking characters after picking up the Pamela files manually.  It's adapted from Calin Leafshade's original code (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36284.msg554642#msg554642), without which I wouldn't have had the faintest clue of what to do, so thanks Calin!

I've tried to comment the code and make it all understandable, but post a reply here and I'll see if I can help further.  It was a big help for my own game, Da New Guys: Day of the Jackass (http://www.danewguys.com), and with the help of Smiley's lip synch manager (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37792.0) (which auto-generates the pamela files), I got lip-synching into my game in about two days.

Hope someone finds it useful!
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Grundislav on Thu 02/02/2012 22:40:36
Thanks!  This is indeed very useful.  The only nitpick I have is that it wasn't clear where I had to put the Dat folder.  I didn't know "game directory" meant "compiled directory" but I'm a little slow.

Aside from that it works like a charm!
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Akril15 on Fri 03/02/2012 09:55:17
After so many years, my biggest AGS-related wish has finally come true! :D

Well, technically, it kind of already did when Calin contributed his code back in 2010...but at least it's all wrapped up in a tidy little module now.

Thank you very much!
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Calin Leafshade on Fri 03/02/2012 14:01:15
Glad someone found my code useful. A few things that puzzle me though.

Why did you change the iSay function from an extender function?

cChar.iSay(what);

makes more sense than

iSay(cChar, what);

Also there're a few things you could do to clean up the code since some of my sloppiness remains but overall it probably wont matter.

All in all a job well done!
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: IceMan on Sat 04/02/2012 15:45:36
Put any confusion in the code down to my own ineptitude  :=

I'm afraid my philosophy when it comes to coding is pretty much "If it works for me, don't go changing it"
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Herooftime1000 on Sun 23/06/2013 05:18:36
The link to this is gone. Does anyone have it?
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: kaput on Mon 24/06/2013 02:23:01
Quote from: Herooftime1000 on Sun 23/06/2013 05:18:36
The link to this is gone. Does anyone have it?

I second this curiosity - it was only a year ago so somebody has to have it, right.
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Dualnames on Mon 24/06/2013 07:46:40
http://duals.agser.me/Modules/Lip_Synching_With_Lucas_Arts_v1.0.rar

Don't know if somebody has it, but I do. So there.
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: kaput on Mon 24/06/2013 10:01:36
Awwah, yer a star so ye are  :=
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Herooftime1000 on Mon 24/06/2013 18:53:34
Quote from: Dualnames on Mon 24/06/2013 07:46:40
http://duals.agser.me/Modules/Lip_Synching_With_Lucas_Arts_v1.0.rar

Don't know if somebody has it, but I do. So there.

You are a lifesaver!
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Akril15 on Thu 30/05/2024 08:28:43
Sorry to pull up this old thread, but for some reason I'm having a lot of trouble getting this module to work in AGS 3.6.1. I was able to get it working to some degree in an earlier version of AGS (and the old dat file from that version seems to behave in a similar manner in my 3.6.1 game), but every time I create a .pam file, convert it to a .dat file and place it in the /Compiled/Dat folder, the lip sync animation won't play -- the voice line plays just fine, but the player's speech loop just keeps repeating, without any actual lip syncing.

Also, does anyone have a link to Smiley's Lip Synch Manager? The link in the original post is broken. (Not that I'm sure if will help fix this problem, but I'm willing to try anything at this point.)
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Snarky on Thu 30/05/2024 08:57:33
@Akril15, since you're having similar problems with both this module, TotalLipSync and the built-in lipsync, it seems clear that there is some common underlying issue. That appears to be that none of them can find or open the sync files. Something must be going wrong with how you are adding them to the game project.

I think you should start by debugging that part: just try to open the file yourself (on game start, for example, using some test code like:

Code (ags) Select
  String filepath = "..."; // Put the path you want to try here
  File* file = File.Open(filepath, eFileRead);
  if(file == null)
    Display("Could not open %s", filepath);
  else
  {
    Display("Opened %s OK!", filepath);
    file.Close();
  }

(Or you can use System.Log() if you prefer.)

Once you are able to figure out what filepath you need for a particular folder location so that this is working, it should be easy to get it to work with the modules/built-int lipsync as well. Check out the File.Open() (https://adventuregamestudio.github.io/ags-manual/File.html#fileopen) and Package custom data folder(s) (https://adventuregamestudio.github.io/ags-manual/GeneralSettings.html#compiler) documentation for guidance. (Crimson Wizard just posted an improved version of the explanation on Discord, but I don't know when it will actually appear in the online manual.)
Title: Re: Module: Lip synching with Lucasarts-style speech
Post by: Akril15 on Sat 01/06/2024 05:38:52
The file was detected by AGS, but the proper lip sync animation still doesn't play. I'm not sure what I should try putting in the Package custom data folder(s) field. I tried "Compiled/Dat/" (since the dat files for this module are in [game directory]/Compiled/Dat) but that didn't make any difference.