# SuperHud

### From Q4MAX

Starting from version 0.80, Q4Max uses a custom hud system based on CPMA's implementation - we call it SuperHud.

advantages over using .guis

- performance
- simpler syntax
- no packaging

The syntax, elements and properties are largely similar, so you will find most of this documentation paraphrases CPMA's.

Note : For the time being, you can still revert to .gui based huds by changing hud_useSuperhud to 0 - but support for them is on hold. This will likely change in future releases.

## Syntax

The syntax in CPMA's SuperHud should be pretty straightforward to comprehend. Supports both multi-line and single-line arguments.

    ELEMENT
    {
        PROPERTY VALUE
        PROPERTY VALUE
    }

    # This is a comment !
    // This is also a comment
    /*
    as is this
    */

    # You can also represent elements like this:

    ELEMENT { PROPERTY VALUE PROPERTY VALUE }

All keywords - both element names, and property names, are case insensitive.

Note that unlike CPMA, all properties have a value. Additionally, the value must be quoted if it contains spaces or punctuation of any kind - so "1.3" or "10 10" must be quoted, unlike in CPMA.

## Elements

!Default
  Special type of element which sets default properties which are applied to all elements that follow this element. May occur multiple times.

Awards
  Shows the award icons.

Chat1 to Chat5
  Text elements showing the ingame chat.

Ctf_Holder_Own
  The name of the person currently carrying your teams flag.

Ctf_Holder_Nmy
  The name of the person currently carrying the enemy flag.

Ctf_Status_Own
  Image showing the CTF flag state for your own team.

Ctf_Status_Nmy
  Image showing the CTF flag state for the enemy team.

Death_Message_1 to Death_Message_3
  Text showing the death messages.

Fps
  Text containing the current framerate. You can hide/show it by toggling hud_fps.

Frag_Notice
  Text used to indicate who you just fragged / who fragged you.

Gametime
  A text element showing the amount of time played/remaining.

Gametime_Inf
  The infinity sign displayed when there is no timelimit

Input
  Game controller style images showing the movement keys. You can hide/show it by toggling hud_showInput.

Lagometer
  The lagometer. You can hide/show it by toggling net_clientLagometer.

Main_Notice
  Text used for notices such as "you have the flag".

Motd
  Text field used for the Message Of The Day, and any broadcast messages from the server.

Name_Nmy
  The enemy's name - shows the team name in team games.

Name_Own
  Your name - shows the team name in team games.

Pickup_Text
  Text containing the long name of the last item picked up.

Pickup_Icon
  Pickup icon corresponding to the last item picked up.

Powerups
  Dynamic list of powerups that the player currently has. Shows both the powerup icon and remaining time.

PostDecorate_Text
  Text decorator available for general use - applied after the rest of the hud.

PostDecorate_Image
  Image decorator available for general use - applied after the rest of the hud.

PreDecorate_Text
  Text decorator available for general use - applied before the rest of the hud.

PreDecorate_Image
  Image decorator available for general use - applied before the rest of the hud.

Score_Own
  Text showing your own score in non-team games.

Score_Nmy
  Text showing the enemy's score in non-team games.

Spectimers
  The display of the item timers available when spectating.

Spec_Text_0
  Line 1 of the spectator text.

Spec_Text_1
  Line 2 of the spectator text.

Spec_Text_2
  Line 3 of the spectator text.

Speed
  Text displaying you speed in UPS. You can hide/show it by toggling hud_showSpeed.
Spread
  Text containing the spread in TDM - the difference between the two teams.

Statusbar_Ammobar
  Percentage bar showing the current amount of ammo.

Statusbar_Ammocount
  Text element showing the amount of ammo the player has.

Statusbar_Ammoicon
  Image showing the icon for the current weapon.

Statusbar_Armorbar
  Percentage bar which shows the amount of armor the player has, relative to a maximum of 100.

Statusbar_Armorcount
  Text showing the current amount of armor.

Statusbar_Armoricon
  Image, showing the armor icon.

Statusbar_Healthbar
  Percentage bar which shows the amount of health the player has, relative to a maximum of 100.

Statusbar_Healthcount
  Text showing the players health.

Statusbar_Healthicon
  Image, showing the health icon

Team_Overlay_1 to Team_Overlay_8
  Rows of the team overlay.

Team_Score_Own
  Text showing your own score in team games.

Team_Score_Nmy
  Text showing the enemy's score in team games.

Thawbar
  Percentage bar used in Freezetag to show your current thawing state.

Voicechat_Transmit
  Icon displayed when transmitting voicechat.

Vote_Notice
  Text field which is set when a vote is called.

Weaponlist
  The weapon/ammo bar - a set of images and text showing the current weapons and ammo quantities.

Xhair_Text
  Text displaying info about the player your crosshair is currently over.

## Properties

Color
  Color used to draw the element.

Colored
  0/1 flag indicating whether a color should be used.

ColorBG
  Background color used for weaponlist, powerups list etc.

ColorHighlight
  Highlight color used by the weaponlist and input elements.

ColorHigh
  Color used by percentage bars for the high percentage values.

ColorMed
  Color used by percentage bars for the medium percentage values.

ColorLow
  Color used by percentage bars for the low percentage values.

Dimensions
  Width and height of the element. In some cases, such as the input element, this is not directly the dimensions of the element itself, but of part of the element.

Font
  0 - chain
  1 - marine
  2 - lowpixel
  3 - profont
  4 - chain_outline
  5 - marine_outline
  6 - lowpixel_outline
  7 - profont_outline

HighWatermark
  Percentage value to switch between medium and high colors (expressed as a value between 0 and 1).

Horizontal
  0 - vertical orientation.
  1 - horizontal orientation.
  Applies to percentage bars, weaponlist, powerups, and awards.

IconDimensions
  Width and height of icons for elements that have both icons and text (weaponlist, awards etc)

Image
  Path to an image to use - applies to progress bars, decorators etc. "_white" is a useful image if you want a solid color (combine with the color and colored properties).

MedWatermark
  Percentage value to switch between low and medium colors (expressed as a value between 0 and 1).

Monospaced
  0/1 flag indicating whether the text should be printed in a monospaced font.

NmyColor
  Sets the color to be colored with the standard strogg/marine color corresponding to the enemy team.

OwnColor
  Sets the color to be colored with the standard strogg/marine color corresponding to your team.

Position
  X and Y coordinates of the element.

Rect
  X, Y, Width and Height of the element. Duplicates the functionality of position and Dimensions keywords.

tabstops
  X coordinates, relative to the x/y coordinates of the element, to move to when reaching a tab in the output text. Mainly intended for the Team Overlay.

Text
  Text value used by decorate_text elements.

textalign
  L - left, C - centered, R - right

TextScale
  Scales the text. Values correspond to those in q4's .gui files - the values are not in pixels.

textstyle
  0 - Normal
  1 - Shadowed
  2 - Outline - Switches to the _outline font version, therefore font 4/5/6/7 + textstyle 2 are redundant.
  3 - Ignore Colors
  4 - Ignore Colors, Skip Icons

Time
  Value indicates time (in milliseconds) that the element will be visible after the last update. Used to make elements appear only when they change.

Visible
  Value is a bitmask which indicates whether the hud element is visible. By default, it will be 7 - ie, always visible.
  0 - hidden
  1 - visible in non team-game modes
  2 - visible in team-games, excluding CTF
  4 - visible in CTF

VisibleForFreeFloats
  0/1 selects whether this element is visible for freefloat spectators. This is only needed on decorators - all other elements automatically have sensible values.

Wrap
  X Coordinate to wrap at, for text elements. Especially used in Chat elements. Can also be the Y coordinate to wrap vertical weaponlists to get multi-column lists.

## Colors

The superhud uses "r g b a", which is red green blue alpha. Each channel can have values from 0-1.

Color "1 1 1 1" is white, full alpha

Color "0 0 0 0.5" is black, half transparent

Color "0.25 0.25 1 0.75" is blue, somewhat transparent

Note that colors set in SuperHud do not override colors set elsewhere. For example if your ui_nick or ui_name is "^3hello" it will be yellow regardless. Text style 3 allows you to override colors stored in the string.

Retrieved from "http://www.q4max.com/wiki/index.php/SuperHud"

##### Search

##### Views

- Article
- Discussion
- View source
- History

##### Personal tools

- Create an account or log in

##### Toolbox

- What links here
- Related changes
- Upload file
- Special pages
- Printable version