Author Topic: Speech Bubble extensions  (Read 205 times)

Narehop

  • Solodev on @Outline_team
Speech Bubble extensions
« on: 10 Mar 2018, 10:19 »
Scuse me, but i can't set a custom text window gui for a speech bubbles of my characters with lucas arts style. How i can to do this? i'm going to Default settings and pick option called "Custom text window GUI" but nothing happens :(

Slasher

  • slasher
    • I can help with AGS tutoring
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
    • Slasher worked on a game that was nominated for an AGS Award!
Re: Speech Bubble extensions
« Reply #1 on: 10 Mar 2018, 11:55 »
Do you get any errors/warnings when you run the game?

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: Speech Bubble extensions
« Reply #2 on: 10 Mar 2018, 13:58 »
Nareshop: you have to
  • Create the GUI by right-clicking the GUI node in the project tree and selecting "New Text Window GUI"
  • Note the number and enter that in General Settings -> Text output -> Custom text-window GUI
(As explained in the manual: http://www.adventuregamestudio.co.uk/manual/ags14.htm#TextWin)

dayowlron

  • been programming computers since 1981
    • I can help with AGS tutoring
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
Re: Speech Bubble extensions
« Reply #3 on: 11 Mar 2018, 11:06 »
Could the reason his did not work be that the left graphics were of different widths?
If he made the middle left and top left be 10 pixels wide it would work?
Pro is the opposite of Con
This fact can clearly be seen,
If progress means to move forward
Then what does congress mean?  --Nipsey Russell

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #4 on: 01 Apr 2018, 19:06 »
Nareshop: you have to
  • Create the GUI by right-clicking the GUI node in the project tree and selecting "New Text Window GUI"
  • Note the number and enter that in General Settings -> Text output -> Custom text-window GUI
(As explained in the manual: http://www.adventuregamestudio.co.uk/manual/ags14.htm#TextWin)

but this only works on Sierra style. In Lucas style i can't work it :(

Khris

    • Lifetime Achievement Award Winner
    •  
    • I can help with play testing
    •  
    • I can help with scripting
    •  
    • I can help with translating
    •  
    • Khris worked on a game that was nominated for an AGS Award!
Re: Speech Bubble extensions
« Reply #5 on: 02 Apr 2018, 20:34 »
If you want actual speech bubbles (as opposed to Display() text that looks like them): http://www.adventuregamestudio.co.uk/forums/index.php?topic=55542.0

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #6 on: 02 Apr 2018, 23:51 »
If you want actual speech bubbles (as opposed to Display() text that looks like them): http://www.adventuregamestudio.co.uk/forums/index.php?topic=55542.0

Snarky is doing a good work with this module, but unfortunately doesn't support backgrounds into bubble yet.
I don't know if this question is hard to resolve with code, i'm not good programming modules U^_^

if someone can help me trying to use a custom background in Snarky's module...?

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #7 on: 03 Apr 2018, 10:44 »
It's a fairly simple addition, so I did a quick update of the module just for you:

https://www.dropbox.com/s/ksevew1hfmvbx5r/SpeechBubble_0.8.1.asc?dl=0
https://www.dropbox.com/s/wl8imff2l15b36m/SpeechBubble_0.8.1.ash?dl=0

It compiles, at least, but I haven't had a chance to actually test it, so if there's a problem with it I'll have to debug it later.

To use, you set the SpeechBubble.BackgroundSprite property to the sprite number of the graphic you want to use as the background.

Edit: Having now had a chance to test it, I've fixed the clipping of the background so it only covers the bubble itself. Seems to work fine now.
« Last Edit: 03 Apr 2018, 18:11 by Snarky »

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #8 on: 03 Apr 2018, 20:02 »
It's a fairly simple addition, so I did a quick update of the module just for you:

https://www.dropbox.com/s/ksevew1hfmvbx5r/SpeechBubble_0.8.1.asc?dl=0
https://www.dropbox.com/s/wl8imff2l15b36m/SpeechBubble_0.8.1.ash?dl=0

It compiles, at least, but I haven't had a chance to actually test it, so if there's a problem with it I'll have to debug it later.

To use, you set the SpeechBubble.BackgroundSprite property to the sprite number of the graphic you want to use as the background.

Edit: Having now had a chance to test it, I've fixed the clipping of the background so it only covers the bubble itself. Seems to work fine now.

Really, you're amazing! Thank you so much for your update! I've a question, I can set images in the corners too?

EDIT: Ok I see... it's so difficult to implement a background for a corner bubble?
« Last Edit: 03 Apr 2018, 20:08 by Narehop »

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #9 on: 03 Apr 2018, 20:25 »
Yes, that would be quite a bit more work, since it would also change how the size is calculated, the way the background and outline are combined, etc. It would be an entirely different way of drawing the bubbles. So I would also need to think about how to do it without adding too much complexity to the code and to the API.

It would help if you could show what you're trying to do, like CTxCB did at the top of the thread.

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #10 on: 03 Apr 2018, 20:35 »
Yes, that would be quite a bit more work, since it would also change how the size is calculated, the way the background and outline are combined, etc. It would be an entirely different way of drawing the bubbles. So I would also need to think about how to do it without adding too much complexity to the code and to the API.

It would help if you could show what you're trying to do, like CTxCB did at the top of the thread.

yes, sorry for don't explain me.

Something like a TextWindowGui but working on LucasArts style. I don't like Sierra style with portraits and i can't custome text colour for all characters (i think) so, i'm using Lucas style for this.



« Last Edit: 03 Apr 2018, 20:36 by Narehop »

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #11 on: 07 Apr 2018, 18:20 »
That looks very nice!

Just so I have your requirements quite clear:
-Although it can't be seen in the second picture, that little arrow pointing at him is part of it, right? The easiest would be to have that entire part (with borders and all) on a separate sprite.
-Is there supposed to be any variation between different characters for this speech GUI (either in color or pattern), or will all characters use the same design?

Oh, also: What version of AGS are you using?
« Last Edit: 07 Apr 2018, 18:25 by Snarky »

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #12 on: 07 Apr 2018, 18:28 »
That looks very nice!

Just so I have your requirements quite clear:
-Although it can't be seen in the second picture, that little arrow pointing at him is part of it, right? The easiest would be to have that entire part (with borders and all) on a separate sprite.
-Is there supposed to be any variation between different characters for this speech GUI (either in color or pattern), or will all characters use the same design?

Thank you for your response, I see your other reply in my post.

-The little arrow i don't know really if i want to set it. But maybe i'll delete it.
- Not really. I think that all characters will have the same design. But all my characters have different colour to speak. Tom (the cat) have a red colour for example... but the background will be the same for all.

I can do the sprites all together or all separate. Corners + upper sprite, etc... this background may to scalate in widht and height depends of lenght about text. Do you need something mine (sprites or another resources)?

EDIT: I'm using 3.4.1 ^^

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #13 on: 07 Apr 2018, 18:43 »
Sure, if you send me the sprites it might help with testing.

Just like with the AGS custom text window GUI, the sprites should be separate: one for each corner, one for each side, (optionally) one for the background, and (optionally) one for the arrow – 10 in all.

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #14 on: 07 Apr 2018, 19:10 »
Sure, if you send me the sprites it might help with testing.

Just like with the AGS custom text window GUI, the sprites should be separate: one for each corner, one for each side, (optionally) one for the background, and (optionally) one for the arrow – 10 in all.

I make corners, all sides and arrow.
So, yes, my idea its just like custom text window gui for Lucas Arts style! (laugh)(laugh)
Download Sprites

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #15 on: 08 Apr 2018, 20:23 »
Thanks!

The module update turned into a major rewrite, and I wasn't able to get it finished today. I'll keep at it when I have time.

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #16 on: 08 Apr 2018, 20:30 »
Thanks!

The module update turned into a major rewrite, and I wasn't able to get it finished today. I'll keep at it when I have time.
i'll wait. Thank you for your time ^^

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #17 on: 25 Apr 2018, 22:31 »
Hello Snarky! Have you been able to find some time to be able to advance in the module? Thank you! ^^

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #18 on: 26 Apr 2018, 04:49 »
Yes, I have put quite a lot of time into it, actually, but it's not ready yet.

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #19 on: 05 May 2018, 17:03 »
OK, I've implemented sprite-based borders in the SpeechBubble module. As mentioned this led to a major rewrite, which I'm still not finished with, so this is just a beta of the new version that you can test out: SpeechBubble v0.8.9

The way you configure it is now a little bit different. I've moved all the formatting settings into a SpeechBubbleFormat class, and you can set SpeechBubble.TalkFormat and SpeechBubble.ThinkFormat to control those formats separately, or just SpeechBubble.Format to set the formatting for all SpeechBubbles generally (eventually you'll also be able to provide your own SpeechBubbleFormats to control the formatting of bubbles individually.

In your case, you'll need something like this to set up the formatting correctly:

Code: Adventure Game Studio
  1.   // Set up the border
  2.   SpeechBubble.Format.BorderRenderMode = eRenderSprite; // Use sprites to render the border
  3.   SpeechBubble.Format.BorderSpriteTopLeft = 32;  // Sprite index...
  4.   SpeechBubble.Format.BorderSpriteTopRight = 33;
  5.   SpeechBubble.Format.BorderSpriteBottomRight = 34;
  6.   SpeechBubble.Format.BorderSpriteBottomLeft = 35;
  7.   SpeechBubble.Format.BorderSpriteTop = 39;
  8.   SpeechBubble.Format.BorderSpriteBottom = 36;
  9.   SpeechBubble.Format.BorderSpriteLeft = 37;
  10.   SpeechBubble.Format.BorderSpriteRight = 38;  
  11.  
  12.   // Set up the tail
  13.   SpeechBubble.Format.TailRenderMode = eRenderSprite;  // Use a sprite to render the tail
  14.   SpeechBubble.Format.TailSprite = 31;
  15.   SpeechBubble.Format.TailTipOffset = 35;  // This is what x-coordinate in the tail sprite the tip is (the pixel that should be over the character's head)
  16.   SpeechBubble.Format.AllowTailSlide = false;  // The tail will always be centered in the bubble
  17.  
  18.   // We set negative padding so the text actually extends into the edge sprites (since they are quite big)
  19.   SpeechBubble.Format.PaddingTop = -10;
  20.   SpeechBubble.Format.PaddingBottom = -10;
  21.   SpeechBubble.Format.PaddingLeft = -20;
  22.   SpeechBubble.Format.PaddingRight = -20;
  23.  
  24.   // General formatting
  25.   SpeechBubble.Format.BackgroundColor = Game.GetColorFromRGB(0, 0, 0);  // Black background
  26.   SpeechBubble.Format.TextOutlineWidth = 2;


Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #20 on: 05 May 2018, 17:28 »
OK, I've implemented sprite-based borders in the SpeechBubble module. As mentioned this led to a major rewrite, which I'm still not finished with, so this is just a beta of the new version that you can test out: SpeechBubble v0.8.9

The way you configure it is now a little bit different. I've moved all the formatting settings into a SpeechBubbleFormat class, and you can set SpeechBubble.TalkFormat and SpeechBubble.ThinkFormat to control those formats separately, or just SpeechBubble.Format to set the formatting for all SpeechBubbles generally (eventually you'll also be able to provide your own SpeechBubbleFormats to control the formatting of bubbles individually.

In your case, you'll need something like this to set up the formatting correctly:

Code: Adventure Game Studio
  1.   // Set up the border
  2.   SpeechBubble.Format.BorderRenderMode = eRenderSprite; // Use sprites to render the border
  3.   SpeechBubble.Format.BorderSpriteTopLeft = 32;  // Sprite index...
  4.   SpeechBubble.Format.BorderSpriteTopRight = 33;
  5.   SpeechBubble.Format.BorderSpriteBottomRight = 34;
  6.   SpeechBubble.Format.BorderSpriteBottomLeft = 35;
  7.   SpeechBubble.Format.BorderSpriteTop = 39;
  8.   SpeechBubble.Format.BorderSpriteBottom = 36;
  9.   SpeechBubble.Format.BorderSpriteLeft = 37;
  10.   SpeechBubble.Format.BorderSpriteRight = 38;  
  11.  
  12.   // Set up the tail
  13.   SpeechBubble.Format.TailRenderMode = eRenderSprite;  // Use a sprite to render the tail
  14.   SpeechBubble.Format.TailSprite = 31;
  15.   SpeechBubble.Format.TailTipOffset = 35;  // This is what x-coordinate in the tail sprite the tip is (the pixel that should be over the character's head)
  16.   SpeechBubble.Format.AllowTailSlide = false;  // The tail will always be centered in the bubble
  17.  
  18.   // We set negative padding so the text actually extends into the edge sprites (since they are quite big)
  19.   SpeechBubble.Format.PaddingTop = -10;
  20.   SpeechBubble.Format.PaddingBottom = -10;
  21.   SpeechBubble.Format.PaddingLeft = -20;
  22.   SpeechBubble.Format.PaddingRight = -20;
  23.  
  24.   // General formatting
  25.   SpeechBubble.Format.BackgroundColor = Game.GetColorFromRGB(0, 0, 0);  // Black background
  26.   SpeechBubble.Format.TextOutlineWidth = 2;

Thank you Snarky! but I think that I have a problem



the only thing that I make it's use my sprites on borders. I don't touch anything of your code. (btw, can we make the background with some alpha transparency?)

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #21 on: 05 May 2018, 17:55 »
The tail is displayed instead of the border, not on top of it (or under it, as in your mockup). So if your tail sprite is meant to also show the border, you have to actually include the border in the sprite (they don't have to be the same height, though; if not, they'll be top-aligned). Here's the sprite I used in testing:



(btw, can we make the background with some alpha transparency?)

Yes, you can set the background transparency with SpeechBubble.Format.BackgroundTransparency and the border transparency with SpeechBubble.Format.BorderTransparency. If you just want part of the border to be transparent (for example the black part, not the gold part), that needs to be part of the sprites you use.

Also, because it bugs me a little: the top border edge of your text window is not precisely aligned with the corners, and the outside gold rim is a little bit wider/heavier than the corners, creating a noticeable seam. You might want to fix that.
« Last Edit: 05 May 2018, 18:01 by Snarky »

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #22 on: 05 May 2018, 18:12 »
The tail is displayed instead of the border, not on top of it (or under it, as in your mockup). So if your tail sprite is meant to also show the border, you have to actually include the border in the sprite (they don't have to be the same height, though; if not, they'll be top-aligned). Here's the sprite I used in testing:



(btw, can we make the background with some alpha transparency?)

Yes, you can set the background transparency with SpeechBubble.Format.BackgroundTransparency and the border transparency with SpeechBubble.Format.BorderTransparency. If you just want part of the border to be transparent (for example the black part, not the gold part), that needs to be part of the sprites you use.

Also, because it bugs me a little: the top border edge of your text window is not precisely aligned with the corners, and the outside gold rim is a little bit wider/heavier than the corners, creating a noticeable seam. You might want to fix that.

SO NICE! IT WORKS VERY FINE! :D

How can i to use the module on dialogs? Because in AGS the dialogs only use "cEgo: bla bla bla bla" can i use speechbubble?

I have a last question about your module. When i'm using a cutscene the game freeze around 5-6 seconds and I've to do double-click to solve. Before to use your module this not happens.

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #23 on: 05 May 2018, 18:27 »
How can i to use the module on dialogs? Because in AGS the dialogs only use "cEgo: bla bla bla bla" can i use speechbubble?

You can write normal AGS commands in a dialog, but you have to put a space (or several spaces) at the beginning of the line. So instead of:

Code: Adventure Game Studio
  1. cEgo: bla bla bla bla

You put:

Code: Adventure Game Studio
  1.  cEgo.SayBubble("bla bla bla bla");

(Note the space!)

Quote
I have a last question about your module. When i'm using a cutscene the game freeze around 5-6 seconds and I've to do double-click to solve. Before to use your module this not happens.

Ah, hmm... yes, I can see how that could happen. I think it's due to the custom blocking code. It might be tricky to solve properly, but as a workaround, try setting an invisible font with SpeechBubble.InvisibleFont. This should bypass the custom blocking. You can download an invisible font here: http://www.angelfire.com/pr/pgpf/if.html

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #24 on: 05 May 2018, 21:28 »
How can i to use the module on dialogs? Because in AGS the dialogs only use "cEgo: bla bla bla bla" can i use speechbubble?

You can write normal AGS commands in a dialog, but you have to put a space (or several spaces) at the beginning of the line. So instead of:

Code: Adventure Game Studio
  1. cEgo: bla bla bla bla

You put:

Code: Adventure Game Studio
  1.  cEgo.SayBubble("bla bla bla bla");

(Note the space!)

Quote
I have a last question about your module. When i'm using a cutscene the game freeze around 5-6 seconds and I've to do double-click to solve. Before to use your module this not happens.

Ah, hmm... yes, I can see how that could happen. I think it's due to the custom blocking code. It might be tricky to solve properly, but as a workaround, try setting an invisible font with SpeechBubble.InvisibleFont. This should bypass the custom blocking. You can download an invisible font here: http://www.angelfire.com/pr/pgpf/if.html

man, you're the best! If you have a job, tell your boss to increase your salary.

I'll put your name on the credits of Train to Nowhere. Really you saved my project with this ^^
http://www.adventuregamestudio.co.uk/forums/index.php?topic=56019.0

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #25 on: 06 May 2018, 06:20 »
So it's all working now? Cool!

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #26 on: 06 May 2018, 10:51 »
So it's all working now? Cool!

yes, but i have a little problem, but I don't know why happens this:




if you can see, I've a line on left side and bottom side. But in top and left doesn't exist :S


Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #27 on: 06 May 2018, 11:21 »
Yes, I see it. The background fill must overlap the edge by one pixel (it's one pixel too wide and too tall), which is only visible when they're semi-transparent, because you're drawing twice, adding to the opacity. These off-by-one errors are really annoying, and a lot of the work on this module has been fixing them.

Edit: OK, so that was a really easy fix: SpeechBubble v0.8.10

I really dig the visual style you've got going here, by the way. The font fits really well.
« Last Edit: 06 May 2018, 11:31 by Snarky »

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #28 on: 06 May 2018, 14:09 »
Yes, I see it. The background fill must overlap the edge by one pixel (it's one pixel too wide and too tall), which is only visible when they're semi-transparent, because you're drawing twice, adding to the opacity. These off-by-one errors are really annoying, and a lot of the work on this module has been fixing them.

Edit: OK, so that was a really easy fix: SpeechBubble v0.8.10

I really dig the visual style you've got going here, by the way. The font fits really well.

Thank you one more time Snarky! Now it works FINE AT 100%! Thank you for your comment. I hope in a month I can have a full demo to download for all people ^^

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #29 on: 01 Jun 2018, 22:22 »
Snarky i detected a little issue in your module. When my characters are talking if i press a long time a key for pass to the next bubble, it goes really so fast. How i can to resolve this? :(

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!
Re: Speech Bubble extensions
« Reply #30 on: 01 Jun 2018, 22:30 »
Snarky i detected a little issue in your module. When my characters are talking if i press a long time a key for pass to the next bubble, it goes really so fast. How i can to resolve this? :(

There is Game.IgnoreUserInputAfterTextTimeoutMs property for builtin speech, I guess it may be made used in the module too.

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #31 on: 01 Jun 2018, 22:35 »
Snarky i detected a little issue in your module. When my characters are talking if i press a long time a key for pass to the next bubble, it goes really so fast. How i can to resolve this? :(

There is Game.IgnoreUserInputAfterTextTimeoutMs property for builtin speech, I guess it may be made used in the module too.

thank you, i'll going to try it :)

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!
Re: Speech Bubble extensions
« Reply #32 on: 01 Jun 2018, 22:47 »
Snarky i detected a little issue in your module. When my characters are talking if i press a long time a key for pass to the next bubble, it goes really so fast. How i can to resolve this? :(

There is Game.IgnoreUserInputAfterTextTimeoutMs property for builtin speech, I guess it may be made used in the module too.

thank you, i'll going to try it :)

From the looks of the module code, this property is not used in there. What I meant, it could be supported.

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #33 on: 01 Jun 2018, 22:53 »
From the looks of the module code, this property is not used in there. What I meant, it could be supported.

Doesn't works... i tried to do but nothing happen.

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #34 on: 02 Jun 2018, 06:38 »
If you are using voiced speech or have set an invisible font, SpeechBubble calls Character.Say() internally to handle the speech animation and timing of the display. As I recall, you set an invisible font earlier to workaround a cutscene bug. So Game.IgnoreUserInputAfterTextTimeoutMs should work without any changes to the module code.

Edit: However, this setting doesn't actually do what you're interested in: it only ignores input after the last line timed out, not if you dismissed it. If you hold down a button, AGS will still speed through the dialog at high speed.

This behavior is by design, but I have also had the impression that the speed has increased lately (or maybe I'm just getting old...). It would be good to be able to control how fast it happens (I would guess it's at the key-repeat speed for holding down a keyboard key, but does that also apply to mouse-button presses?), and also ensure that a slightly longer click/button press doesn't accidentally skip two lines.

I've also split this continuing discussion into its own thread since the "(SOLVED)" part of the title kept annoying me. Arguably it should be merged with the module thread, though.
« Last Edit: 02 Jun 2018, 08:31 by Snarky »

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #35 on: 02 Jun 2018, 17:28 »
If you are using voiced speech or have set an invisible font, SpeechBubble calls Character.Say() internally to handle the speech animation and timing of the display. As I recall, you set an invisible font earlier to workaround a cutscene bug. So Game.IgnoreUserInputAfterTextTimeoutMs should work without any changes to the module code.

Edit: However, this setting doesn't actually do what you're interested in: it only ignores input after the last line timed out, not if you dismissed it. If you hold down a button, AGS will still speed through the dialog at high speed.

This behavior is by design, but I have also had the impression that the speed has increased lately (or maybe I'm just getting old...). It would be good to be able to control how fast it happens (I would guess it's at the key-repeat speed for holding down a keyboard key, but does that also apply to mouse-button presses?), and also ensure that a slightly longer click/button press doesn't accidentally skip two lines.

I've also split this continuing discussion into its own thread since the "(SOLVED)" part of the title kept annoying me. Arguably it should be merged with the module thread, though.

Thank you for your reply Snarky. I was using SpeechBubble.InvisibleFont = eFontinvisibleFont but actually I had to disable because I saw that my characters doesn't do speech animation. They allways stay quiet and text continues.



btw I tried to fix the speech speed using this:
You can set how speech (and dialog lines) are skipped in your game's General Settings -> Dialog -> Speed Skipped by...

You can also change the text speed by altering Game.TextReadingSpeed, and finally there is Game.MinimumTextDisplayTimeMs to make sure that even very short words stay on screen for a fixed amount of time. The manual has info all these, but these settings make stuff very easy to read and follow.
Game.TextReadingSpeed = 7;
Game.MinimumTextDisplayTimeMs = 2000;


Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble extensions
« Reply #36 on: 03 Jun 2018, 07:21 »
Thank you for your reply Snarky. I was using SpeechBubble.InvisibleFont = eFontinvisibleFont but actually I had to disable because I saw that my characters doesn't do speech animation. They allways stay quiet and text continues.


Well that's no good. I'll take a look at it. Could you post what SpeechBubble settings you're using and the lines where you call it that aren't animating properly?

Quote
btw I tried to fix the speech speed using this:
You can set how speech (and dialog lines) are skipped in your game's General Settings -> Dialog -> Speed Skipped by...

You can also change the text speed by altering Game.TextReadingSpeed, and finally there is Game.MinimumTextDisplayTimeMs to make sure that even very short words stay on screen for a fixed amount of time. The manual has info all these, but these settings make stuff very easy to read and follow.
Game.TextReadingSpeed = 7;
Game.MinimumTextDisplayTimeMs = 2000;

Those settings are only going to change the speed of text progression when you're NOT holding down a key. AFAIK the only ability you have to control how text is skipped is which keys skip, and whether mouse-clicks skip.

Narehop

  • Solodev on @Outline_team
Re: Speech Bubble extensions
« Reply #37 on: 03 Jun 2018, 12:21 »
Thank you for your reply Snarky. I was using SpeechBubble.InvisibleFont = eFontinvisibleFont but actually I had to disable because I saw that my characters doesn't do speech animation. They allways stay quiet and text continues.


Well that's no good. I'll take a look at it. Could you post what SpeechBubble settings you're using and the lines where you call it that aren't animating properly?

Code: Adventure Game Studio
  1.  // Set up the border
  2.   SpeechBubble.Format.BorderRenderMode = eRenderSprite; // Use sprites to render the border
  3.   SpeechBubble.Format.BorderSpriteTopLeft = 1187;  // Sprite index...
  4.   SpeechBubble.Format.BorderSpriteTopRight = 1188;
  5.   SpeechBubble.Format.BorderSpriteBottomRight = 1189;
  6.   SpeechBubble.Format.BorderSpriteBottomLeft = 1190;
  7.   SpeechBubble.Format.BorderSpriteTop = 1194;
  8.   SpeechBubble.Format.BorderSpriteBottom = 1191;
  9.   SpeechBubble.Format.BorderSpriteLeft = 1192;
  10.   SpeechBubble.Format.BorderSpriteRight = 1193;  
  11.  
  12.   // Set up the tail
  13.   SpeechBubble.Format.TailRenderMode = eRenderSprite;  // Use a sprite to render the tail
  14.   SpeechBubble.Format.TailSprite = 1186;
  15.   SpeechBubble.Format.TailTipOffset = 30;  // This is what x-coordinate in the tail sprite the tip is (the pixel that should be over the character's head)
  16.   SpeechBubble.Format.AllowTailSlide = false;  // The tail will always be centered in the bubble
  17.  
  18.   // We set negative padding so the text actually extends into the edge sprites (since they are quite big)
  19.   SpeechBubble.Format.PaddingTop = -10;
  20.   SpeechBubble.Format.PaddingBottom = 5;
  21.   SpeechBubble.Format.PaddingLeft = -5;
  22.   SpeechBubble.Format.PaddingRight = -5;
  23.  
  24.   // General formatting
  25.   SpeechBubble.Format.BackgroundColor = Game.GetColorFromRGB(0, 0, 0);  // Black background
  26.   SpeechBubble.Format.BackgroundTransparency = 40;
  27.   SpeechBubble.Format.TextOutlineWidth = 1;
  28.   SpeechBubble.InvisibleFont = eFontinvisibleFont;
  29.  

And allways stop animation with any character.