Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Dave Gilbert

#61
The slide speed setting worked! Thanks!
#62
Hi all. I know this module is super old but it's also super useful! I was wondering if it's at all possible to make the credits move faster than a delay of "0"? For my high-res game it seems to be going a bit slower than I'd like. Any suggestions on how to speed it up? I tried going below 0 but as expected that didn't work. :)
#63
Yeah, if the animation is non-blocking it saves me from having to type a second, almost identical line, which could be useful. But if the animation is blocking than it's more of a hindrance than a help. Easy enough to edit. Thanks for the help!
#64
Thanks Khris! One question. It looks like your function plays the animation and THEN counts the frames/ms length. Is there a reason why you played the animation beforehand?

edit: I tried it out myself and it appears that you don't need to play the animation beforehand! The method worked.

Before I had this animation of a little girl jumping off a table. The fact that her shadow kept jumping around bothered the heck out of me. Such a tiny trivial thing, but shadow jumping happens all over the game so I wondered if there was an easy way to fix it. Now I can!  Thanks for the help, everyone!



edit2: Weird. I went to edit but it double-posted instead. Sorry about that!
#65
Thanks Khris! One question. It looks like your function plays the animation and THEN counts the frames/ms length. Is there a reason why you played the animation beforehand?
#66
Not sure how that would work, since I want the tween to finish when the animation stops, not for the tween to begin. I have an object that starts to move when the character beings her animation, and I want it to naturally come to a stop exactly when the character finishes her animation. Unless I'm misunderstanding what you mean.
#67
Quote from: Crimson Wizard on Mon 11/12/2023 14:27:27EDIT2: alright, I confirmed, and Character's AnimationSpeed is basically "Walking Animation Speed" only. In the past it was also affecting Idle animation, but no more since 3.6.0.

 :shocked:

I could have sworn the character's animation speed effected all of their animations, and not just walking. It seems like I was wrong for over 20 years!

Anyway, thanks. I will fiddle.

-Dave
#68
Thanks CW! Just a few clarifications.

So for the first one, "SUM" is calculated by taking all the delays of each frame in the animation and adding them up?

And for "(animation speed * N)", which animation speed does this refer to? The speed you set for the character? Or the "delay" you set when you type in the Character.Animate command?
#69
Hi all! Basically as the subject says. Is there a way to calculate the length of time a character animation will take to play (based on the character's animation speed, the speed you play the animation, delays on frames, the game's framerate, etc) before you play it? Preferably in seconds or milliseconds?

Basically what I want to do is to run a tween that finishes exactly when the character's animation stops. The only way to do that is to determine how long the animation takes to play.

Any light-shedding appreciated!

-Dave
#70
Thanks! I'll use that method for now, then. Right-clicking and selecting "paste" also works.
#71
Hi! I found a copy/paste bug in the latest version.

In the dialog editor tab, if I copy some text and try to paste it into one of the "option text" fields (using control-v), the text gets pasted into the SCRIPT instead of the option field.

For example, here I was trying to copy/paste the words "Yeah they do" into an option text field:

#72
Quote from: Snarky on Sun 01/10/2023 07:04:49
Quote from: Dave Gilbert on Sat 30/09/2023 23:36:53So I'm wondering if the problem lies with the rhubarb end, or if me changing the code like this messed things up. For example, what was the reason that frame 7 was originally unassigned? Was it essential to keep that?

Hmm, changing the mapping should be fine (but see below), though I would strongly recommend that instead of changing the AutoMapPhonemes implementation in the module code, you set up a manual mapping outside of the module when you initialize it—so, instead of calling AutoMapPhonemes, you use those exact AddPhonemeMapping calls yourself to set it up the way you want it.

Ok, that I can do. Thanks! Just to be sure, I did this on game_start():

Code: ags
  TotalLipSync.Init(eLipSyncRhubarb);    // Or whatever lip sync format you're using
  //TotalLipSync.AutoMapPhonemes(); <--- commented out!
  TotalLipSync.AddPhonemeMapping("X",8);
  TotalLipSync.AddPhonemeMapping("A",0);  // mbp
  TotalLipSync.AddPhonemeMapping("B",1);  // other consonants
  TotalLipSync.AddPhonemeMapping("C",2);  // EH/AH/EY etc. (bed, hut, bait)
  TotalLipSync.AddPhonemeMapping("D",3);  // AA/AE/AY (father, bat, like)
  TotalLipSync.AddPhonemeMapping("E",4);  // AO/OW (thaw, slow)
  TotalLipSync.AddPhonemeMapping("F",5);  // UW/OY/UH/OW (you, toy, poor)
  TotalLipSync.AddPhonemeMapping("G",6);  // F/V (fine, very)
  TotalLipSync.AddPhonemeMapping("H",7);  // L (letter)	

QuoteThe reason why the auto-setup is arranged the way it is (skipping frame 7) is because the other lipsync data formats, Moho and Pamela/Annosoft, distinguish between "ooh" sounds and "w" sounds, but Rhubarb uses the same phoneme/mouth shape for both. The auto-setup maps the frames the same way for all the formats, allowing you to set up the animation view once, and then use whichever lipsync data format you like. You can even switch formats along the way, if for example you want to hand-sync some scenes in Pamela format and do others automatically in Rhubarb (though you'd need to reset the module with the new format and mappings whenever you switch). I don't remember precisely why it's frame 7 that is the "optional" one rather than the last frame, but I would guess I based the order on some standard or convention for lipsync setups.

Okay. So since I never use anything aside from Rhubarb, I don't need to worry about that? I can use my version of the code?

QuoteAnyway, to get to the point of your question: looking over the code, it does assume that Frame 0 is the non-speaking frame, as in the AGS convention for NormalView and SpeechView; this frame is set when the animation file does not specify a frame. (This is necessary because some of the data formats can have gaps, but I don't remember if this applies to Rhubarb.) You could try to change it here:

Aha! Yes I have noticed that when the characters stop speaking they always end up on the wrong mouth shape. I added some code to manually change the frame when they stop speaking, but your solution is better! Thanks!

edit: Hmm. I notice that the mouth shape still finishes on the wrong frame. That's on me (because the way the mouth shape frames are imported) so if there's no way to fix that, I'll just continue using the workaround code I created.
#73
Hi! I had a question about the way Rhubarb is set up in this module:

The rhubarb mapping is written like this:

Code: AGS
void _autoMapPhonemesRhubarb()
{
 TotalLipSync.AddPhonemeMapping("X",0);
  TotalLipSync.AddPhonemeMapping("A",1);  // mbp
  TotalLipSync.AddPhonemeMapping("B",2);  // other consonants
  TotalLipSync.AddPhonemeMapping("C",3);  // EH/AH/EY etc. (bed, hut, bait)
  TotalLipSync.AddPhonemeMapping("D",4);  // AA/AE/AY (father, bat, like)
  TotalLipSync.AddPhonemeMapping("E",5);  // AO/OW (thaw, slow)
  TotalLipSync.AddPhonemeMapping("F",6);  // UW/OY/UH/OW (you, toy, poor)
  // Frame 7 unassigned to match Moho mapping
  TotalLipSync.AddPhonemeMapping("G",8);  // F/V (fine, very)
  TotalLipSync.AddPhonemeMapping("H",9);  // L (letter)
}

When my talking sprites are drawn and saved to individual files, they are labelled with the appropriate letter name. So they are called A.png, B.png, C.png, etc, all the way to X.png.

Thus, when they are imported, they are imported in alphabetical order. A first, and X last. When I assign the sprites to the loops, I just assign them in order. Like so:



Since the sprite order is different than what the code above expects, I changed the code to this:

Code: AGS
void _autoMapPhonemesRhubarb()
{
  TotalLipSync.AddPhonemeMapping("X",8);
  TotalLipSync.AddPhonemeMapping("A",0);  // mbp
  TotalLipSync.AddPhonemeMapping("B",1);  // other consonants
  TotalLipSync.AddPhonemeMapping("C",2);  // EH/AH/EY etc. (bed, hut, bait)
  TotalLipSync.AddPhonemeMapping("D",3);  // AA/AE/AY (father, bat, like)
  TotalLipSync.AddPhonemeMapping("E",4);  // AO/OW (thaw, slow)
  TotalLipSync.AddPhonemeMapping("F",5);  // UW/OY/UH/OW (you, toy, poor)
  TotalLipSync.AddPhonemeMapping("G",6);  // F/V (fine, very)
  TotalLipSync.AddPhonemeMapping("H",7);  // L (letter)
}

This SEEMS like it should work, but I am noticing that the final result for lipsyncing isn't as good as it could be. So I'm wondering if the problem lies with the rhubarb end, or if me changing the code like this messed things up. For example, what was the reason that frame 7 was originally unassigned? Was it essential to keep that?

Anyway, light shedding appreciated!

-Dave


#74
QuoteGoto Definition" command in script will now work for most of the game entities too, such as Characters, GUIs, and so forth. In that case it will find a game's entity and open a respective editor panel for it. This still does not work for some types, such as Room objects, and Views

YESSSSSSSSSSS. Thank you so much! I didn't even realize I wanted this. :)

edit: It even works from the dialog editor!! Bliss!
#75
Awesome!! Thanks so much. :)
#77
Oh! Good to know it exists at the very least. Ping this thread when ready! Thanks.
#78
Dang. I blink and there are new updates. Thanks so much! I will try it soon.
#79
Hello! Sorry for the double post. Is there a way to manually change the X position of the tail? Specifically for situations like this where my character is close to the edge of the screen:



I'd like the tail to be on top of the character, as opposed to just the center of the bubble. I looked through the script and found variables for the height and width, but not position.

Thanks in advance!

-Dave
#80
I used to cheat this by having a .Say and a .SayBackground running at the same time, but that doesn't work with the bubble. Ah well. I can probably cheat by making a bubble image GUI and place it where I need, just for the few instances where I need it. No big! Thanks anyway.
SMF spam blocked by CleanTalk