Speech GUI's?

Started by A�rendyll (formerly Yurina), Sun 09/10/2005 16:10:34

Previous topic - Next topic

A�rendyll (formerly Yurina)

Hi!

I'm currently searching for some way to make a speech GUI. I'm aware of the Text window option, but it doesn't work out the way I want it.

I use:
- 16 bit colour depth
- 320x240 as screenresolution
- Sierra Style as gamestyle (because of the portraits)

What I want:
- A speech GUI which also displays the speech portraits of the characters who are talking.
- Multiple portraits per character because of expressions

In a nutshell: I want a variation on the Text Window GUI which supports portraits just like in Baten Kaitos: Eternal Wings and the Lost Ocean (3D RPG, GameCube).

Can someone help me out?
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

#1
Depends how much scripting you're willing to do, and exactly how you want it to look.

If you want more customisation than just Sierra-style w/ Background (you posted in the RPG thread about wanting HP, XP etc displaying - is this the same thing?), you might be better with some version of ~}Shade{~'s code from this thread. EDIT: Which, reading the thread, you've already seen. Was it not what you wanted after all? And, if not, why not?
I know what you're thinking ... Don't think that.

A�rendyll (formerly Yurina)

No, it's not the same.

I'm searching for two different things. What I'm searching for now is merely a speech GUI, and the other one is more like a status GUI.

What I ment is a plain speech GUI which also displays the speechportraits. I prefer one with a default height and width.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

Then Shade's code should do the trick - it should display a fixed size GUI (there're no commands to change the size, at least), with text and a speech portrait. Have you tried it?
I know what you're thinking ... Don't think that.

A�rendyll (formerly Yurina)

No, but does it also support viewchange of portraits?
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Ashen

#5
Yes:
Quote
function Speech(int who, int Face, int Color, const string text)

int Face controls what portrait is shown. However, here's my version (2.7 code):
(I worked it out after you posted last, but since you never got back I've just been holding on to it.)

Requires a GUI called DISPGUI, with a button btnPortrait and a label lblText.
Code: ags

function Speech (Character *Who, string message, int expression) {
  btnPortrait.Animate(Who.SpeechView, expression, 3, eRepeat);
  lblText.TextColor = Who.SpeechColor;
  lblText.SetText(message);
  gDispgui.Visible = true;
  WaitKey (((StrLen(message) / game.text_speed) + 1) * GetGameSpeed());
  gDispgui.Visible = false;
}


Now, it's back to using Speechviews and loops - mostly because I thought it was easier than having to remember (or store in a variable somewhere) what the sprite numbers of the various faces are. Assign the Speechview in the editor as normal, and each loop can be a different 'expression' - up to 16 per character. It even allows animated views, unlike Shade's - but it'll still work fine with single frames, provided there's at least one frame in the specified 'expression' loop.


Import it like this:
 
  import function Speech (Character *Who, string message, int expression=0);

To make expression optional - if you don't put anything there, it'll pass as 0 (i.e. Speech (cEgo, "Hello, my name is Roger."); is the same as Speech (cEgo, "Hello, my name is Roger.", 0);), for a default, 'normal' expression.


You'll probably need to play around a bit, to figure out how much text you can fit on the GUI at once (i.e. maximum message length), especially if you want a fixed size GUI.
I know what you're thinking ... Don't think that.

Shade

i never got back because i thought no one else had this problem so i just improved it for myself but i think your way is better than mine. thx for improving it.  ;D

Ashen

Glad to help - not that there was anything wrong with the original, I think this is just a bit more streamlined. If you hadn't noticed, you'll probably need to change string message to const string message for later versions - I'm not using them yet myself, so it's mostly untested beyond 2.7.

I'd be interested to see what you came up with, though - if it's something you're actually using, you'd have a better idea of what's needed of it than I do.
I know what you're thinking ... Don't think that.

Shade

i use this to have a better atmosphere. with the sierra-style-speech i only can use one picture for each character. but what is if EGO is sad and the picture looks as if he is happy? that doesn't fit. so i wanted a speech style with different expressions.
with your version of this script one even can play animations. i think the atmosphere really gets better with that and it's easy.
if i have enough backgrounds finished for my game i will release a demo which shows some things i have done.

SMF spam blocked by CleanTalk