Disabling in game messages and or modify their behavior?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
::Bloodfury::
Posts: 331
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Disabling in game messages and or modify their behavior?

Post by ::Bloodfury:: »

Hi!

I remember asking this question ages ago.. but can't remember did I get ant conclusion for this.
So. Now that we have zscript and all other fancy things. I have long had an idea where the hud has
a bar on the top. and when you pickup items or whenever the game needs to display multiple text entries.
Normal behavior is as we know that it shows up to 5 or so lines and leaves the rest in que to be displayed after the
previous messages fade.

Now what i would like to achieve, is that in that bar on top of my hud. messages would be centered and
It would show only one line of text at a time. I'd like to create kinda like a textbox thingy for my hud.

Is this so hard coded that there is no way to alter the message behavior?
Or could it be manipulated to work as I have tought? Via ACS or Zscript?

Yeah maybe one option could be using menudef and to automatically define all messages off.
and then make actors use hudmessage function to display the text and to set its position into
the huds top textbox.

Hopefully you got the point I was after.

Thank you already in advance. :)
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: Disabling in game messages and or modify their behavior?

Post by Blue Shadow »

As far as I know, you can't alter the behavior of those messages from a mod. You can change [wiki=CVARs:Messages#con_notifylines]how many of them that display at the same time, or even make them not display at all[/wiki], but that is only done as a user setting.
::Bloodfury:: wrote:maybe one option could be using menudef and to automatically define all messages off.
MENUDEF allows you to create menus, not change the settings of said menus' options.
User avatar
::Bloodfury::
Posts: 331
Joined: Mon Aug 01, 2011 7:39 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Finland

Re: Disabling in game messages and or modify their behavior?

Post by ::Bloodfury:: »

You can change how many of them that display at the same time, or even make them not display at all, but that is only done as a user setting.
Through CVARINFO these cvars cannot be altered. Is there a way to make the mod start with message settings so that it
as a default say: only one line per text displays at a time?

These are the cvars I'd like to define to be preset each time you start the mod.

con_notifylines
msg
show_messages
show_obituaries

Is there a way to do so?

Even if I could just make the mod to only display on row a text at a time would be enough. Thus my messagebox on the top middle of the screen would work. :)
And ofc they messages should be centered.

My plan B, is to make two versions of my mod. A standalone, where you have a separate GZDoom and uses local predefined settings
(and menudef to remove the possibility to alter them), and the game should be played only through it.
And for those who like full control could still play it with their primary GZdoom and fix their settings by themselves.

Return to “Scripting”