Next Previous Contents

17. Heads-Up Display

The HUD is so named because it overlays information over the visual field. This is in contrast to "looking down" at a dashboard of instruments; a HUD provides critical information while the head is still "up".

17.1 HUD components

The Q3TA HUD is a special case of the menus. It is the menu interpreter embedded in cgame (client game). Each HUD ``block'' is a menuDef, containing itemDefs that define the HUD contents. The complete HUD description is actually composed of three parts:

  1. The regular in-game HUD
  2. A non-team-game scoreboard
  3. A team-game scoreboard

Each may be individually customized. In fact, all three can be combined into one single file, however unwieldy that may be. The non-team-game scoreboard is one large menuDef that must be named (the `name' field) ``score_menu''. The team-game scoreboard is one large menuDef that must be named ``teamscore_menu''. When the player wants to see the scoreboard, Q3TA hides the entire HUD, and then display only one of the scoreboards by name depending on gametype.

The regular in-game HUD to use is determined by the contents of the cvar ``cg_hudFiles''. This value names a file that lists the in-game HUD menu files to use. This file may not exceed 4096 bytes in size. Default value for ``cg_hudFiles'' in Q3TA is "ui/hud.txt", the content of which is:

  loadmenu { "ui/" }
  loadmenu { "ui/" }
  loadmenu { "ui/" }

The keyword ``loadmenu'' indicate the menu file to load and parse. Multiple uses indicate multiple files to combine together. Each of the .menu has a filesize limit of 65536 bytes (XXX: verify).

The default descriptions for the menus `score_menu' and `teamscore_menu' are defined in ui/ and ui/, respectively.

The command ``loadhud'' enacts the actual change of HUD.

In the event of errors, the game may crash or quit. In the extreme case, you may have to set ``cg_hudFiles'' back to "ui/hud.txt" by some other means -- in the startup menus with "/set cg_hudFiles ui/hud.txt", or by manually editing q3config.cfg.

17.2 Loading Custom HUD

In cookbook form:

Next Previous Contents