[USDF/ZSDF] More than 1 image per dialogue / offset graphic

Moderator: GZDoom Developers

User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Rachael »

I think what would help Tormentor667 more than anything else right now is just a single use-case example showing this in action that he can edit to suit his own needs.

Were I knowledgeable about this and not engaging in other projects at the moment, I would do this, myself.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Major Cooke »

Yeah, I would too. Trying to learn this stuff from scratch sucks.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Tormentor667 »

Thanks for the reply. I do understand that Graf follows this new philosophy and that's something people can actually live with. Concerning ZScript - I have no idea where to start honestly... I am really no programmer at all so taking a look at the sourcecode will make things just worse
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Graf Zahl »

You'll have to write a new DrawBackdrop function in that new class. But to give you some help you should do a mock-up as demonstration of what you plan to do.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Graf Zahl »

That may require a bit more of fiddling with the script code. If I had some time on my hands I might be able to help you but I'm afraid you'll have to ask someone else.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Tormentor667 »

Fortunately, Nash is already trying something. Let's see where he ends up with, he is very skilled with stuff like that and knows the code so we have good chances I'd say. Thanks still for your help.
User avatar
AFADoomer
Posts: 1324
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by AFADoomer »

So, I made a thing... Then saw that Nash is working this already. Oh, well.

Image

Used existing graphics (the pain flash is the background, hence the red tint).

The fade image (pain flash here) is always drawn, and the face image co-opts the existing background image in ZSDF (so no change to existing dialogue lumps is needed). Left the default font because I wasn't sure what you actually wanted done there. The indents on the name and first line are in LANGUAGE, so could be removed easily there - by default, the text all aligns left.

Some choice strings may need to be re-worked because they are too wide now (like the costs and durations on the clerk's other conversation).
Spoiler: ZScript contents
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Nash »

@AFADoomer: I suggest you go ahead and submit your work to Tormentor! I am a little short on time currently. :(

@Tormentor667: Look, what AFA did is perfect for your needs. :D
User avatar
AFADoomer
Posts: 1324
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by AFADoomer »

Thanks, Nash!

@Tormentor - Give me the go-ahead, and I'll commit this to github for testing.

Current state:
Image

Right now, everything looks good at 4:3 and 16:9, but there are alignment issues at other aspect ratios - nothing game-breaking, just not pretty... I reinvented the wheel on some of the code, because I was learning it as I went, so there's definitely room for improvement, still.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Nash »

The pixels on the font look dirty... are you using the clean scaling tags?
User avatar
AFADoomer
Posts: 1324
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by AFADoomer »

Nash wrote:The pixels on the font look dirty... are you using the clean scaling tags?
No... That was part of the "reinventing the wheel" that I was talking about. It should be a relatively quick fix, I just didn't have time to rework it last night.
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Tormentor667 »

Hey Afa, thanks alot for helping us out with this, it looks already very good :) Feel free to commit the work. Regarding the line height/gap, just keep it as it was before. The mockup for the text was only meant to know where the text is, not how it looks.

Maybe you have also ideas on how to improve it or make it look better, so feel free to add your own suggestions. :)
User avatar
AFADoomer
Posts: 1324
Joined: Tue Jul 15, 2003 4:18 pm
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by AFADoomer »

OK, just added this to Blade of Agony...

Also implemented independent scaling for the conversation text and the replies... The replies shown here are slightly smaller than the speaker's text, mostly so that everything fits without re-doing the DIALOGUE lumps.
Image
Spoiler: Code
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: [USDF/ZSDF] More than 1 image per dialogue / offset grap

Post by Tormentor667 »

Oh yes :) Thanks so kindly AFADoomer, this looks perfect now and the terribly looking Dialogue with overlapping text and mugs is gone :) Thanksthanksthanks!!!

*EDIT*
Noticed two issues when trying it with the latest SVN, first: I can't use the mouse anymore to choose from the options. Second, if you start a new game and choose the difficulty, the "are you sure" message appears to be off-center. Would you mind trying?

*EDIT2*
For some reason the toilet dialogue isn't talking anymore as well even though it hasn't been touched.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”