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?
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 (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22666.0). EDIT: Which, reading the thread, you've already seen. Was it not what you wanted after all? And, if not, why not?
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.
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?
No, but does it also support viewchange of portraits?
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.
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 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
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 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.