Script - Scripted Message Gauge
The Scripted Message Gauge is a LUA script that enables messages to be displayed in a different fashion. Instead of the default way of a message line appearing right away with a backlog, the message will be drawn one character at a time with a background that enables messages to be seen more easily against a bright background.
The script requires code added in rev 10756 or 3.7.2 RC3 or later.
This page will assist modders to install it, configure it, and use it.
- 1 Download Link
- 2 Required File
- 3 Configuration Files
- 4 Behavior
- 5 Limitations
- 6 Using In-Game
All required files are included in the above download.
- dkjson.lua []
- zLoadFirst-sct.tbm (written by Nuke)
axmessage.cfg is a JSON configuration file
Integer or String, Font index or name used for the displayed sender's name. Default is 3.
Integer or String, Font index or name used for the displayed message text. Default is 1.
Filename, Image to use as the background for the message text. Default is messagebox.
Integer, The time it will take 1 character to draw in seconds. Default is 0.03.
Integer, The script uses length to guess how long a message should be displayed for. Normal behavior will have a message be displayed for (Length * Number of characters in message) seconds. Default is 0.07.
Integer, If a non-generic voice file is used in a message, this is the amount of extra time the message will be visible for after the voice file is over. Default is 1.5.
RGBA, If monochrome is false, this is the RGBA color the sender's name will be.
RGBA, If monochrome is false, this is the RGBA color the message text will be.
Percent based positioning similar to how the new hud positioning works.
The offset in pixels from the origin, similar to how the new hud positioning works.
X,Y offset where the Sender text will be drawn from the position
X,Y offset where the message text will be drawn from the position
Boolean, turns monochrome on or off. See behavior for a detailed explanation
Array, filenames, A list of files (minus the file extensions) that will cause the script to use generic guessing for the message length and not the actual voice file length. These are the message beeps and alarms when there's no voice acting.
Integer, optional, the vertical resolution must be at least this for the script to activate.
There are a few ways the script calculates how long a message should be visible. If there is no voice file or the voice file is in the generic list, the message will be displayed for (Length * Number of Characters in Message). If a modifier makes the message longer, the length will be extended as well (but it will not be shortened).
If there is a VoiceFile attached to the message, the message will be displayed for (VoiceFile Length + AfterVoice).
Changing the Text Draw Speed in FRED
By putting !s and .s at the beginning of messages names in FRED, the text draw speed will be modified.
- !!! = Draws instantly
- !! = Draws 66% faster
- ! = Draws 33% faster
- . = Draws 33% slower
- .. = Draws 66% slower
- ... = Draws 100% slower
The characters must be at the start of the message. So
!!!Holley says sup
Holley says sup!!!
If monochrome mode is false, the image is drawn as-is in full color without any game added-transparency. TitleColor and TextColor will be used to color the sender name and text.
If monochrome mode is true:
- The image will be colored the same color as the talking head hud gauge. An additional dark gray copy of the image is drawn underneath to minimize washout.
- The text will be colored the same as the default message lines hud gauge. The alpha is increased to max for maximum readability.
- If the talking head hud gauge and message lines hud gauge are the same color (eg you selected Amber/Green/Blue in the HUD config) the text will be brightened so its slightly easier to read.
The gauge does not brighten or dim with the Increase HUD Contrast command (L key).
The script needs no special activation. When the script initializes in a mission, it turns off the retail message lines gauge.
In order for the scripted messages gauge to be visible during in-game cutscenes where the disable-hud-except-messages is used, you need to use the included -mod.tbm file. It puts the control of HUD visibility on manual FREDder control, so the HUD may be visible during cutscenes where a camera sexp is used without any disable-hud sexps. Just add disable-hud or disable-hud-except-messages.