Speech Bubble extensions

Started by Narehop, Sat 10/03/2018 10:19:26

Previous topic - Next topic

Narehop

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

Do you get any errors/warnings when you run the game?

Khris

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

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                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

Narehop

Quote from: Khris on Sat 10/03/2018 13:58:20
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

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

Quote from: Khris on Mon 02/04/2018 20:34:39
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

#7
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.

Narehop

#8
Quote from: Snarky on Tue 03/04/2018 10:44:39
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?

Snarky

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

#10
Quote from: Snarky on Tue 03/04/2018 20:25:09
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.



[imgzoom]https://i.gyazo.com/83a10fca2ae814e7656c8fb892d12a3c.png[/imgzoom]

Snarky

#11
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?

Narehop

Quote from: Snarky on Sat 07/04/2018 18:20:52
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

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

Quote from: Snarky on Sat 07/04/2018 18:43:39
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

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

Quote from: Snarky on Sun 08/04/2018 20:23:01
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

Hello Snarky! Have you been able to find some time to be able to advance in the module? Thank you! ^^

Snarky

Yes, I have put quite a lot of time into it, actually, but it's not ready yet.

Snarky

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: ags
  // Set up the border
  SpeechBubble.Format.BorderRenderMode = eRenderSprite; // Use sprites to render the border
  SpeechBubble.Format.BorderSpriteTopLeft = 32;  // Sprite index...
  SpeechBubble.Format.BorderSpriteTopRight = 33;
  SpeechBubble.Format.BorderSpriteBottomRight = 34;
  SpeechBubble.Format.BorderSpriteBottomLeft = 35;
  SpeechBubble.Format.BorderSpriteTop = 39;
  SpeechBubble.Format.BorderSpriteBottom = 36;
  SpeechBubble.Format.BorderSpriteLeft = 37;
  SpeechBubble.Format.BorderSpriteRight = 38;  

  // Set up the tail
  SpeechBubble.Format.TailRenderMode = eRenderSprite;  // Use a sprite to render the tail
  SpeechBubble.Format.TailSprite = 31;
  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)
  SpeechBubble.Format.AllowTailSlide = false;  // The tail will always be centered in the bubble
  
  // We set negative padding so the text actually extends into the edge sprites (since they are quite big)
  SpeechBubble.Format.PaddingTop = -10;
  SpeechBubble.Format.PaddingBottom = -10;
  SpeechBubble.Format.PaddingLeft = -20;
  SpeechBubble.Format.PaddingRight = -20;

  // General formatting
  SpeechBubble.Format.BackgroundColor = Game.GetColorFromRGB(0, 0, 0);  // Black background
  SpeechBubble.Format.TextOutlineWidth = 2;



SMF spam blocked by CleanTalk