HUDs
Under construction.
You can highly customize the appearance of your HUD by the so called hud files.
The /hud your_hud_name command will load the file excessiveplus/hud/your_hud_name.cfg.
Note: There is the special default hud to disable the whole customizable HUDs.
So the command /hud default will disable and fallback to the default hud defined in the code.
To get your preferred HUD loaded automatically you can set the xp_hud variable in your config file.
Note that the /hud command will also set this variable for you.
Check out the great SuperHud Editor. It provides a visual editor, reducing the creation of a new HUD to a few mouse clicks.
Syntax
The syntax has been derived from CPMA, so most HUDs should load just fine.
# single-line comment // single-line comment /* multi-line comment */ NetGraph { rect 592 432 48 48 bgcolor 0.25 0.25 0.25 0.25 fill } NetGraph { rect 592 432 48 48; bgcolor 0.25 0.25 0.25 0.25; fill; }
Differences
There are some differences compared to CPMA.
- All elements are optional. Loading an empty file will result in an empty screen.
In contrast, CPMA draws some elements even if not defined, probably the most noticeable one would be
Console. - We have a flexible z-layer. Elements defined first will be drawn first, thus
PreDecorateandPostDecorateare just the same.If you run into problems with your existing HUDs and overlapped elements, just change the order.
Such fixed HUDs will load fine in both Excessive Plus and CPMA. - Elements can be defined multiple times and each appearance will be drawn. For example you can display your health two or even ten times all over the screen, if you fear the death.
- Several elements can be disabled by the default variables like
cg_drawFPS, even theDraw3Dproperty can be overwritten by/set cg_draw3dIcons 0.Of course you can only toggle the display if the element is actually defined by the hud file. If there is no
FPSdefined, you cannot display the FPS with/set cg_drawFPS 1. - We have new properties not available for CPMA, namely:
Anchors,ParamandVerticalBar.
Properties
Note: All sizes, positions and drawing is done in an virtual 640x480 box and then scaled to your actual screen resolution.
Anchors FlagsDefines to which directions the element will be anchored relative to the drawn screen. This property will be applied when
xp_aspectRatiois enabled, which allows the HUD to not look stretched on non-4:3 resolutions. The possible flags are:1top
2right
4bottom
8leftFlags can be combined. For example, the default value of
15(which is 8 + 4 + 2 + 1) will anchor the element in all directions, which means that CPMA HUDs will look stretched, just like ifxp_aspectRatiois disabled.Angles Pitch Yaw Roll [ Pan | -Rotate ]Used to alter the display of a
Model. The fourth value is optional, if given it will either pan or rotate the model, depending on the algebraic sign (positive or negative).BGColor Red Green Blue AlphaDefines the background color for the element, valid values are
0..1. In combination withRectandFillthis will fill the area with the color.Color Red Green Blue AlphaorColor T | EDefines the foreground color for the element, valid values are
0..1. Icons andImageproperties will use this color.There are two special colors
TandE, they will represent the colorsredorbluedepending on your current team.Note: Define
BGColorto control the alpha of these special colors.DoubleBar [ 0 | 1 ]Makes the elements
StatusBar_ArmorBar,StatusBar_AmmoBarandStatusBar_HealthBaruse two lines instead of one.Note: If optional parameter is omitted it will default to
1.Draw3D [ 0 | 1 ]Will force the display of a 3d model. This can be overwritten by
/set cg_draw3dIcons 0Note: If optional parameter is omitted it will default to
1.Fade Red Green Blue AlphaIf both
FadeandTimeare defined, the element will linearly fade fromColorto this.Fill [ 0 | 1 ]Will fill the area defined by
RectwithBGColor.Note: If optional parameter is omitted it will default to
1.Font fontnameDefines the font for an element. If omitted
xpwill be used.xpis the default Excessive Plus font
numberssupports only numbers, no letters
uiis the font used by Quake 3 UI
baseq3will use the old Quake 3 fontCompatibility mode:
cpma,sansmanwill bexpwithTextStyle 4(lite)
idblockwill benumbers
idwill bebaseq3
threewavewill bebaseq3withTextStyle 8(outline)Any other fonts will output a warning and the default font will be used instead.
Note: It is highly suggested to use font
xpfor elements that can contain player names, because Excessive Plus allows highly customized names with bold/lite styles and special characters not present in other fonts.FontSize PointSizeorFontSize Width HeightThe default Excessive Plus font is already aspect-adjusted and generally looks best if you just specify the
PointSize. It is suggested to use a distinctWidthandHeightfor all other fonts, withHeightbeing 25-50% larger thenWidth.Note: Negative values can be used to create mirrored text.
Image "path/to/image_or_shader"Displays the image in the area defined by
Rect. You can use any image or shader available in a PK3. IfColoris present, it will colorize the image.This can also be used to load a skin for a
Model, just point the path to a .skin file.Note: On a
sv_pureenabled server you can only use images available in the PK3s the server provide.Model "path/to/model.md3"Displays a 3d model in the area defined by
Rect. A specific skin can be loaded for that model with theImage "path/to/skin_name.skin"property.Monospace [ 0 | 1 ]By default, all fonts are proportionally spaced. Meaning that an "i" takes up less room than an "m". Use this to get the old Quake 3 behaviour but generally this is not suggested.
Note: If optional parameter is omitted it will default to
1.Offset X Y ZChanges the offset of a
Modelalong the X Y Z axis.Param Value1 [ Value2 [ Value3 [ Value4 ] ] ]Up to four special parameters for some elements.
Rect X Y Width HeightDefines the position and size of an element.
Note: Elements and especially
Imagecan be mirrored using negativeWidthorHeightvalues.Text "some text here"Will output the text in the area defined by
Rect. Currently only supported byPreDecorateandPostDecorate.TextAlign L | C | RJustify the text either left, centered or right within
Rect.Note: In combination with some elements, this will define the element's position rather then it's text.
TextStyle Flags1text will have a drop shadow
2ignores inline color codes and forces color defined by theColorproperty
4forces a text to be "lite". Only works in combination with thexpfont
8text will have an outline shadowFlags can be combined e.g.
TextStyle 6will be 4 (lite) + 2 (force color).Time IntervalDefines how long the element will be displayed in milliseconds.
VerticalBar [ 0 | 1 ]Makes the elements
StatusBar_ArmorBar,StatusBar_AmmoBarandStatusBar_HealthBarbe vertical instead of horizontal.Note: If optional parameter is omitted it will default to
1.
Elements
!DefaultThis is a helper element and will not be drawn. Once defined, all followed elements will inherit properties from this element. You can reuse this element as often as you want.
PreDecorateandPostDecorateEmpty elements that can be used to draw decoration like separator bars, static
Text, images etc.Note: Because HUDs have a dynamic z-layer, both elements are the same and are just there for compatibility reasons. The draw order is defined by appearance order in the file.
AmmoMessage"LOW AMMO WARNING" and "OUT OF AMMO" message. Display can be toggled by
cg_drawAmmoWarning.AttackerIconIcon of the player who last attacked you.
Timecan be used.AttackerNameName of the player who last attacked you.
Timecan be used.Chat1tillChat8Display up to eight lines of player chats.
Timecan be used.Note: This can prepend the client number, depending on
xp_drawClientNum.ConsoleReplacement for the engine notify console.
Timecan be used. Display can be toggled withxp_drawNotify.FlagStatus_NMEStatus of the enemy flag in CTF gametypes.
Note: Use
Color Eto get aredorblueflag, depending on your current team.FlagStatus_OWNStatus of your own flag in CTF gametypes.
Note: Use
Color Tto get aredorblueflag, depending on your current team.FollowMessage"Following <PlayerName>" message. Obviously will only display when following a player while spectating.
FPSFrames per second. Can be toggled by
cg_drawFPS.FragMessage"You fragged <PlayerName>" message.
Timecan be used.GameTimeDisplays the game timer. Can be toggled by
cg_drawTimer.Note: The last 60 seconds will display milliseconds while overtime will change color to cyan.
GameTypeDisplays the current gametype like "Freeze Tag" while spectating or during warmups.
ItemPickupName of the item you've just picked up.
Timecan be used.ItemPickupIconIcon of the item you've just picked up.
TimeandDraw3Dcan be used.NetGraphDisplays your net graph or lag-o-meter. Can be toggled by
cg_lagometer.NetGraphPingDisplays your current ping, based on the net graph. Can be toggled by
xp_drawPing.PlayerSpeedYour current speed on the X-Y-axis in units per second. Can be toggled by
xp_drawSpeed.Powerup1_IcontillPowerup4_IconPowerup icons.
Draw3Dcan be used.Note: CTF gametypes will display the flag in
Powerup1_Iconwhile you hold it.Powerup1_TimetillPowerup4_TimePowerup time left in seconds.
RankMessage"1st place with 12" message.
Timecan be used.Score_LimitFraglimit, Roundlimit or Capturelimit. Can be toggled by
xp_drawScores.Score_NMEEnemy score. Can be toggled with
xp_drawScores.Note: Use
Color Ein combination withFillto get aredorbluebackground, depending on your current team.Score_OWNYour score. Can be toggled with
xp_drawScores.Note: Use
Color Tin combination withFillto get aredorbluebackground, depending on your current team.SpecMessageHelp message for spectators, explaining the keys or informing about your thaw status in Freeze Tag.
StatusBar_AmmoBar,StatusBar_ArmorBar,StatusBar_HealthBarCurrent ammo/armor/health in bar form. For a single bar, it will get full when it reaches the hard limit.
DoubleBarcan be used to get two lines instead of one, representing the soft and hard limits.TextAlignwill change the alignment of the whole bar andImagecan be used to customize it even further. Can be toggled bycg_drawStatus.This element accepts an additional
Param, which can be a combination of the following flags:
1single bar will behave like the second bar ofDoubleBar
2single bar will get full when it reaches the soft instead of hard limit
Combining those flags on different bars can achieve some fancy effects. Seehud/qlive_snippet.cfgfor an example.Note: If
Coloralpha is 0, flexible color will be used.Redfor critical,orange/yellowfor normal andwhitefor over limit values.StatusBar_AmmoCount,StatusBar_ArmorCount,StatusBar_HealthCountCurrent ammo/armor/health in numeric form. Flexible colors are enforced. Can be toggled by
cg_drawStatus.StatusBar_AmmoIcon,StatusBar_ArmorIcon,StatusBar_HealthIconCurrent ammo/armor/player icon.
Draw3Dcan be used. Can be toggled bycg_drawStatus.Note: If both
ImageandModelis ommited inStatusBar_HealthIcon, your current model will be used.TargetNameCurrent crosshair target's name. Can be toggled by
cg_drawCrosshairNames.TargetStatusCurrent crosshair target's status, only available for team members. Can be toggled by
cg_drawCrosshairNames.TeamCount_NMEPlayers alive on enemy team, only for Freeze Tag and Clan Arena. Can be toggled by
xp_drawScores.TeamCount_OWNPlayers alive on your team, only for Freeze Tag and Clan Arena. Can be toggled by
xp_drawScores.TeamIcon_NMEDefaults to
red/blueSarge icon, depending on your team. You can use anyImageorModel.TeamIcon_OWNDefaults to
red/blueSarge icon, depending on your team. You can use anyImageorModel.Team1tillTeam8Teamoverlay for up to 8 team members. Can be toggled by
cg_drawTeamOverlay.TextStylewill change alignment for the whole element.Note: The column design will be kept, no matter if
Monospaceis set or not. Generally it will look better without.VoteMessageWorldCurrent vote text.
Note: Votes can be called at the end of a map, while the scoreboard is displayed. A position should be taken to work for both, in-game and scoreboard.
WarmupInfo"Waiting for players", "Warmup", "Starts in: X" etc.
WeaponListThe weapon list has some special settings that differ from the rest.
The
WidthandHeightare for each weapon, not the total.
TextStylecan be used to have a horizontal or vertical weapon list.
Colordefines the color for your current selected weapon andFillwill show ammo for weapons you do not have.Note: The list will wrap at the bottom of the screen for both vertical styles. This way you can get a multi-column list.
