COAL HUD: Regular messages

Are you experiencing a problem? Maybe you can't get your scripts to do what you need, or are frustrated by a feature you just can't seem to get working? Let us know about it here and we will try our best to help you out!
User avatar
Marscaleb
Posts: 77
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

COAL HUD: Regular messages

Postby Marscaleb » Wed Aug 09, 2017 11:06 pm

I'm trying to use a higher-resolution font, but the regular in-game messages (ie: You got the chainsaw! Find some meat!) are getting cut-off because they partially appear beyond the top of the screen.

I'm looking through coal_hud.ec but I can't find the function that displays regular messages. How do I change how those messages appear?

CeeJay
Posts: 185
Joined: Sat Jan 26, 2013 9:56 am
Gender: None specified

Re: COAL HUD: Regular messages

Postby CeeJay » Sat Aug 12, 2017 11:33 am

As far as I know there is no way of doing so. Due the hardcoded scaling, using custom fonts can be a little problematic.

User avatar
Marscaleb
Posts: 77
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Gender: None specified
Contact:

Re: COAL HUD: Regular messages

Postby Marscaleb » Sun Aug 13, 2017 10:38 pm

Dang it!

It wouldn't be so problematic if I could just change where its displayed.
...Although I guess I could try to redo the system using RTS, but I bet that would be more work than I think it is.

CeeJay
Posts: 185
Joined: Sat Jan 26, 2013 9:56 am
Gender: None specified

Re: COAL HUD: Regular messages

Postby CeeJay » Mon Aug 14, 2017 10:24 am

It is, I've experimented with messages via RTS and it's clunky and involves quite a bit of code. You'll need to select the string, color, alignment, time and if you want it to fade in/out. It will also need to be called for from THINGS.DDF.

User avatar
Coraline
Site Admin
Posts: 717
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: COAL HUD: Regular messages

Postby Coraline » Tue Aug 15, 2017 3:15 pm

Weaving it through VM_coal is taking longer than it should, so I have added a scaling option as a CVAR, from 0.1f - 1.5f.

If desired I can also add whether the text is left, center-justified, or right-aligned.

Eventually though I want this to be a call at the top of coal_HUD.ec, along with vector access x., y., z., so the absolute position of the base HUD messages can be user-defined as well. :-)
\(סּںסּَ` )/ۜ

User avatar
Coraline
Site Admin
Posts: 717
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: COAL HUD: Regular messages

Postby Coraline » Tue Aug 15, 2017 7:28 pm

Well, I went ahead and integrated this into vm_hud since I figure this would be pretty helpful for you guys.

Two new functions exist (in COAL_API):

hud.message_ticker (with this smashed in between a few function, you can set the scale directly)

hud.text_scale (with this, you can set the individual text scale of other text).

I thought about integrating this into DDFSTYLES, but that code still needs a lot of improvements, where COAL is pretty much ready to go. I
also tweaked the error message handling for COAL huds, so now it's a little more informative (instead of having to pop open the debug.txt, it
will tell you the basic error message and what line number to look for. I would have done more but, the message strings can get super long and
naturally gets truncated, since I_Error is only so long).

I'll have basic functionality ready soon =)
\(סּںסּَ` )/ۜ

User avatar
Coraline
Site Admin
Posts: 717
Joined: Fri Jun 08, 2012 11:22 am
Gender: Female
Contact:

Re: COAL HUD: Regular messages

Postby Coraline » Tue Aug 15, 2017 10:49 pm

Here's a quick test EXE.

Before I weave it into a usable coal_hud function (you can see the starts of these new params in both the coal_api
and coal_hud), I have made simple CVARS to test out how this will actually work.

In this build, there are 3 new CVARS:

r_textscale : Scales the text (0.7 is the default scale)

r_text_xpos: Sets the 'X' coord of the start of text drawing (default is 160)

r_text_ypos: Sets the "Y" coord of the on-screen hud message (default is 3)


Play with those and let me know if they work okay, if they do -- I'll proceed with weaving them into a more mod-friendly
solution, via the coal_vm.
\(סּںסּَ` )/ۜ

User avatar
RUNSABER
Posts: 108
Joined: Sat Mar 14, 2015 3:10 pm
Gender: None specified

Re: COAL HUD: Regular messages

Postby RUNSABER » Fri Aug 18, 2017 10:40 am

I've used the HUD text feature quite extensively in my previous iteration of Astral Pathfinder. I was able to allow text to appear on screen after hitting switches, stepping on floor specials that activated other sectors on the map, even managed to script my own boss fight and make a health bar appear on screen. You can also assign text to appear via COAL but that forces a lot of other things to be worked around and may become meticulous for you to switch constantly between COALHUD & RSCRIPT just to test your function for 10 seconds. I can grab some code i've written and share to ya for reference!
DREARDEVICES - Modifications, tutorials, & resources for the 3DGE source port engine.


Return to “Support and Help”

Who is online

Users browsing this forum: No registered users and 1 guest