From 0.9.7 Excessive Dawn we have had extremely configurable Head-Up Display (HUD). This document explains some of the HUD settings for EDAWN and is based on the CPMA documentation.

General information
Elements

HUD file syntax

# single-line comment
// this is also single-line comment

 ELEMENT
 {
   PROPERTY VALUE;
   PROPERTY VALUE;
 }

 ELEMENT { PROPERTY VALUE; PROPERTY VALUE; }


/*
   this is an example of block comment
   it may be useful if you need to comment multiple lines
   or disable one or many elements at once
*/



HUD element properties


ALIGN L | C | R
How to align element horizontally, works only for some elements


BGCOLOR r g b [a]
BGCOLOR t | e [a]
Sets the background color for the element, the element must have a width and height


COLOR r g b [a]
COLOR t | e [a]
Sets the foreground color for the element.

Colors in edawn hud represented in RGB(Red-Green-Blue)-components form with optional transparency (alpha) component, all component values takes in range [0..1]. Alpha component value is 1 by default. Examples:
Color R G B
red 100
green 010
blue 001
yellow 110
silver 0.50.50.5
black 000

Special Colors

Color/bgcolor  T  and color/bgcolor  E  for elements to use red/blue according to your current team. Useful for flag modes, but not necessesary for tdm/1v1.

Note that colors set in SuperHud do not override colors set elsewhere. For example if your \name is ^3hello it will be yellow regardless.


DRAW2D
DRAW3D
Specify display mode for some elements, now is working only with ammo,health,armor,powerups and attacker icons


FADEOUT time
Specifies fadeout time (in ms) for element


FILL
If the element has a background color, this fills the area it occupies with that color, the element must have a width and height


NOFILL
Generally can be used to reset FILL in default element


FONT name
Selects one of the following fonts, where name can take one of the following values:
GTMASK bitmask
specifies at which gametypes element should be displayed

bitg_gametypedescription
1 0 FFA
2 1 Tournament
4 2 Single Player
8 3 TDM
16 4 CTF
32 5 RTF
64 6 1FCTF
128 7 Clan Arena
256 8 Freeze Tag
512 9 Protect The Leader

default is -1 (draw in all gametypes)


IMAGE "name"
Selects image or any available shader to draw with IMAGE element


FONTSIZE pointsize | xsize ysize
The EDAWN (ED0..ED3) fonts is correctly aspect-adjusted already, and generally looks best if you just specify a pointsize.


MONOSPACE
By default, all HUD fonts are proportionally spaced, meaning that an "i" takes up less room than an "m". Monospacing forces every character to take up the same amount of space.


PROPORTIONAL
Generally can be used to reset MONOSPACE in default element


RECT x y w h
Sets the position and size of the element. Text may be clipped/wrapped horizontally for some elements like ChatInput


SHADOW
Display text elements with shadow, (alias for TEXTSTYLE 1)


SHOW bitmask
Controls element drawing. Value can be a combination of following bit values:

bitdescription
1 display element during game
2 display element during game when scoreboard is up
4 display element when spectating
8 display element when spectating and scoreboard is up
16 display element on-death
32 display element during intermission
64 display element before scoreboard, i.e. scoreboard will overdraw element if it overlaps scoreboard area

For most elements default value is 1, i.e. draw during game.
Here is the defaults for some elements:
STYLE value
Element-specific parameter


SIZE
Element-specific parameter


NOSHADOW
Generally can be used to reset SHADOW in !DEFAULT element


TEXTALIGN l | c | r
Justify the text either Left, Centered, or Right within RECT


TEXT "SomeText"
Draw specified text with TEXT element


TEXTSTYLE flags
Currently, only one flag is supported: "1", for dropshadowed text


TEXTURE x0 y0 x1 y1
Selects texture coordinates of image to draw with IMAGE element, values should be in range 0..1.
Default values is 0 0 1 1 (i.e. draw entire image).


TIME value
How long the element will be displayed for if it doesn't update again.
Works only for some elements. Generally used for item pickups, frag messages, chat, etc.

TIME 0 means infinite but only when FADEOUT is also 0.

When used with MOTD - will ADD specified value to MOTD display time.


VALIGN t | c | b
How to align element(s) vertically, used only in some elements such as Rewards, WeaponList, CenterPrint, MOTD, SpecMessage



Properties accepted by parser, but actually does nothing:

FADE
MODEL
OFFSET


Element-specific parameters/values

New element-specific parameters/values is introduced to get more control over element layout and allows to emulate BASEQ3/CPMA weaponlists
WeaponList specific

SIZE width height
So called "virtual box" dimensions i.e. pieces, on which specified rect should be divided to place multiple elements, i.e if you specify RECT 100 100 and SIZE 50 33 you will get 6 virtual boxes in 3 rows and 2 columns. Number of resulting columns/rows will not be zero, and number of columns will be automatically increased to place all elements

ICON x y w h
Position and size of weapon icon, x and y is relative coordinates to the virtual box

SELECT x y w h
Weapon selection box, filled with BGCOLOR, x and y is relative coordinates

COUNT x y w h
Ammo count for weapons, uses COLOR, x and y is relative coordinates.
Do not specify this element if you don't need ammo count text

Rewards specific

SIZE width height
Behaviour is almost the same as for WeaponList except that there is only one row and if all elements is not fit in rect (by width) - one element with counter will be drawed instead

ICON x y w h
same as for WeaponList

COUNT x y w h
Count for rewards, if they dont't fit in width, uses COLOR, x and y is relative coordinates.

Team1..Team8 specific

SIZE x1 x2 x3 x4
Specifies lengths for team overlay fields: name, location, ammo, health

Weapon icon is drawed after these 4 fields so make sure you leave enough space for it

Bars specific

COLOR2
BGCOLOR2

Specifies second color for color scaling

SIZE x1 x2
Specify range for parameter (health,armor,ammo).
For health and armor values <=100 means %% of health/armor soft limit, values <=200 means percents of health/armor hard limit minus 100, i.e. [0..softlimit(100)..hardlimit(200)]. For ammo - value 100 means 100% of ammo limit or constant from CPMA if there is no limit for that weapon.

STYLE bitmask
Specify bar drawing options, available bit values:

bitdescription
1 draw element when element value (such as ammo, for example) is less than x1 specified in SIZE property
2 draw element when x1 >= value => x2 i.e. values is in range [x1..x2]
4 draw element when value > x2
8 scale element width (when x1 >= value => x2)
16 scale element height (when x1 >= value => x2)
32 scale element color from '''color''' to '''color2'''
64 scale element background color from '''bgcolor''' to '''bgcolor2'''

default value for all types of bars is 14 (2+4+8), i.e. draw element when its value is greater or equal SIZE x1 and scale its width

ALIGN
VALIGN

Specify scale direction withing rect.
For example if ALIGN L then bar will grow from left edge to right, and if VALIGN C then bar will be expanded from center to top/bottom edges.
Please note than align parameters have sense only if style values 8, 16 is used i.e. when scaling is enabled and element value is in range [x1..x2], in other case you will see statically filled rect.


Elements


!DEFAULT
The first element in the hud file MUST be !DEFAULT, and every other element inherits from that default: this gives you an easy way to change fonts/colors/etc for a whole bunch of elements at once. !DEFAULT can be reused later in the document affecting every following element but it will not overwrite the parameters set by previous !DEFAULTs. It is advisable to place Team1..Team8 and Chat1..Chat8 at the bottom of your hud config so that !DEFAULTs can be used without interfering with other elements.

* Note: Only following properties will be inherited from !DEFAULT: ALIGN, BGCOLOR, COLOR, FADEOUT, FILL, FONT, FONTSIZE, MONOSPACE, SHADOW, SIZE, TEXTALIGN, TEXTURE, TIME, VALIGN. Other properties (such as RECT) should be separately specified for each element.


PreDecorate and PostDecorate
Leaved for compatibility with CPMA hud files, actually does nothing.
Use FILL, IMAGE, and TEXT elements instead


Accuracy
Current weapon accuracy in text form - "33%" for example


AmmoMessage
Low ammo/Out of ammo.


AttackerIcon
Who attacked you last


AttackerName
Who attacked you last


CenterPrint
Prints some important messages (during timeout or team changes)


Chat1..Chat8
Chat area - if you want the order of the messages reversed then reverse the Y coordinates.

Following STYLE bits can be used to control this element:
bitdescription
1 do not set defined colors for chat messages (green for regular chat, cyan for team chat, magenta for private chat)


ChatInput
Chat input area.


Console
Replacement for ID's console. Will automatically set con_notifyTime -1.


Fill
Fill specified rect with background color on the screen


FlagStatus_NME
Status of enemy flag. To get old RED/BLUE use color T and color E, plus bgcolor.


FlagStatus_OWN
Status of your flag. To get old RED/BLUE use color T and color E, plus bgcolor.


FlagTime_OWN
FlagTime_NME
Time of your/ememy flag. To get old RED/BLUE use color T and color E, plus bgcolor.


FollowMessage
Following [Player]


FPS
Frames Per Second


FragMessage
You fragged [Player]


GameTime
Game Clock

Following STYLE bits can be used to control this element:
bitdescription
1 Display counting down clock in time-limited games
2 Mark overtime by color (cyan) in time-limited games
4 Show seconds during last minute countdown


GameType
Free For All, Freeze Tag, Clan Arena etc.

TIME property specifies time to display after warmup, TIME 0 means do not display


Image
Draw specified image on the screen


ItemPickup
Text string of whatever item you pick up


ItemPickupIcon
Icon of whatever item you pick up


KillMessage
[You were]"Fragged by someone" message


MOTD
Message Of The Day, also can be used to display player stats during intermission


NetGraph
Lagometer


NetGraphPing
Ping


PlayerSpeed
Units Per Second


PowerUp0_Icon
Used in CTFs for flag


PowerUp1_Icon to PowerUp4_Icon
Powerup Icons.


PowerUp0_Time to PowerUp4_Time
Powerup Time remaining


RankMessage
Placed 1st with 30 frags


Rewards
Draw rewards. Do not use more that one element as its alters rewards stack!

Element-specific parameters >


Score_Limit
Frag/Cap/Round limit - if set.


Score_OWN
Your score.


Score_NME
Enemy score.


SpecMessage
SPECTATOR, FRAGGED (in CA/CTFS/FT)


StatusBar_ArmorCount
Armor level in number form

Following STYLE bits can be used to control this element:
bitdescription
1 set color depending from current armor value
  • >= 100% - use specified COLOR value
  • > 25% - yellow
  • <= 25% - red


StatusBar_ArmorIcon
Type of armor - essential in CPM but irrelevant in VQ3


StatusBar_ArmorBar
Armor level in bar form

Element-specific parameters >


StatusBar_AmmoCount
Ammo level in number form

Following STYLE bits can be used to control this element:
bitdescription
1 set color depending from current ammo value:
  • > 100% - use current color element value
  • > 20% - yellow
  • <= 20% - red


StatusBar_AmmoIcon
Current weapon ammo icon


StatusBar_AmmoBar
Ammo level in bar form

Element-specific parameters >


StatusBar_HealthCount
Health level in number form

Following STYLE bits can be used to control this element:
bitdescription
1set color depending from current health value, color behavior is the same as for StatusBar_ArmorCount element


StatusBar_HealthIcon
Health (player icon)


StatusBar_HealthBar
Health level in bar form

Element-specific parameters >


TargetName
Current target's playername


TargetStatus
Current friendly target's health/armor level


TeamCount_OWN
Players alive on your team (CA/CTFS/FT)


TeamCount_NME
Players alive on enemy team (CA/CTFS/FT)


Team1..Team8
Teamoverlay

Element-specific parameters >


Text
Draw specified text on the screen


VoteMessageWorld
Normal/team votes


WarmupInfo
10sec countdown, Waiting for players, etc.

TIME property specifies time to display after warmup, TIME 0 means do not display


WeaponList
Weapon selection bar

Element-specific parameters >

Following STYLE bits can be used to control this element:
bitdescription
1hide gauntlet from weapon list
2set ammo count color according to its amount (same as for StatusBar_AmmoCount)


Elements accepted by parser but not implemented:

VoteMessageArena
TeamIcon_NME - use
Image element instead
TeamIcon_OWN - use Image element instead


HUD Related Cvars

These cvars do not directly influence the SuperHud but are still related to the HUD in some way.

\cg_teamChatsOnly value
Controls what text reaches the HUD Chat1..8 elements

valuedescription
0All messages appears in chat
1Display messages only from teammates (default)
2  1 + same behavior for Console element



Notes

cvars such as cg_drawfps, cg_drawtimer plus many others have been removed and their functions moved to the custom hud.


Known Issues

Limitation: Time/fadeout/align/valign is not working for all elements because not (yet) implemented or its not possible/useful
Limitation: Color fails on elements with color codes embedded in their strings (RankMessage, etc)
Limitation: Alpha fails on some elements containing images (StatusBar_AmmoIcon, StatusBar_ArmorIcon, ItemPickupIcon, etc)
Limitation: Fadeout fails on some elements containing images without alpha channels (ItemPickupIcon etc)-