# ezQuake Manual: Radar & team hold statistics hud items

## Introduction

The Radar is a hud item that displays a picture of the current map and then plots the players on it during demo playback or when spectating (and in the future hopefully when watching QTV).

### Requirements

First of all the radar only works in GLQUAKE.

For the radar to work properly you need to be watching a MVD that hasn't been converted from a QWD demo. This is because an MVD contains all the information for all the players on the map at all times, such as ammo, position, health and so on. When you're spectating or watching QWD's on the other hand, only the information that is needed to display what your "current view" is available, that is, the information of the players closest to you.

You also need a radar picture for each level that you want the radar to work on that you put in your qw/radar directory.

## The Basics

### Showing and placing

scr_newhud 1
  Enables showing hud items.
show radar
  Shows the radar hud item.
place radar screen
  Places the radar on the screen area.
align radar right top
  Aligns the radar to right top.
move radar -20 5
  Moves the radar 20 pixels to the left and 5 down.

Place the radar where you want it on screen using align, move and place. (For more information about this, check the general HUD manual page.)

#### Sizing the radar

When you want to size the radar there are two options:

- Using "radar autosize 1". This will automatically size the hud item so that it fits the radar image at it's original size, the height and width of the hud item is ignored.
- Set the height and width manually. This will resize the radar picture so that it will fit inside the hud item.

#### Opacity

radar opacity 0.5
  You can use "radar opacity" to set how transparent the radar picture should be using a value between 0 and 1.

## Player appearance

The players are shown as circles with a line pointing in the direction they're facing. These are the settings that you can use to modify the appearance of they players on the radar:

- radar show_height 1/0

  Decides if the players relative height position on the map should be shown or not. If this is set to "1" the players will change size depending on if they're located high or low on the level. Otherwise the players will always stay the same size.

- radar player_size <value>

  Sets the size of the player on the radar, if show_height is off, the players will be shown in this size at all times. If it's on, the size specified here is the size that the player has when he's located at the highest point of the level.

- radar fade_players 1/0

  If this is on the players will fade gradually as they lose health/armor, this enables you to spot weak players easily on the radar.

- radar show_powerups 1/0

  This will highlight players that has taken a powerup of some kind (quad, pent, ring and suit).

- radar show_names 1/0

  Show the names of the players on the radar.

## Items

You can choose what types of items that should be shown on the radar, if any. The following settings takes a string as an argument containing the items that should be shown on the radar. Any character chan be used as a delimiter, but if you use a whitspace character, remember to put the string in quotes.

- radar weaponfilter

  Decides what weapons that should be shown.

  Valid values:

  Value | Shows
  --- | ---
  all | All weapons
  ng, nailgun | Nail gun
  ssg, supershotgun | Super shotgun
  sng, supernailgun | Super nail gun
  rl, rocketlauncher | Rocket launcher
  gl, grenadelauncher | Grenade launcher
  lg, shaft, lightning | Lightning gun

  ##### Example

  radar weaponfilter "rl lg gl"
  This will show the rocket launcher, lightning gun and grenade launcher.

- radar itemfilter"

  Decides what items should be shown.

  Valid values:

  Value | Shows
  --- | ---
  all | All items
  bp, backpack | Backpacks
  hp, health | Health packs
  armor | All armors
  ra, redarmor | Red armor
  ya, yellowarmor | Yellow armor
  ga, greenarmor | Green armor
  ammo | All ammo
  rockets, rocks | Rockets
  nails, spikes | Nails
  cells, battery | Shaft cells
  shells | Shotgun shells
  powerups | All powerups
  quad | Quad
  pent, pentagram, 666 | Pentagram
  ring, invisible, eyes | Ring
  suit | Hazard suit
  mh, mega, megahealth, 100+ | Mega health

  ##### Example

  radar itemfilter "powerups armor mh"

  This shows all powerups, all armors and megahealth.

- radar otherfilter

  Decides what other things such as projectiles, gibs and explosions should be shown.

  Valid values:

  Value | Shows
  --- | ---
  all | Show all other stuff
  projectiles | Show all projectiles
  nails | Show nail projectiles
  rockets | Show rocket projectiles
  shaft | Show shaft beams
  gibs | Show gibs (gib filter needs to be turned off)
  explosions | Show explosions
  tele | Show teleport effects
  shotgun, sg, buck | Show where shotgun shots hit

  ##### Example

  radar otherfilter "projectiles explosions buck tele"

  Will show projectiles, explosions, shotgun bucks and teleport effects.

## Statistics

### Statistics on radar

During a match statistics such as what team holds what position of the map and where people die is collected. You can choose to visualize this on the radar using "radar show_stats". It has 6 different options:

Value | Result
--- | ---
0 | Show no stats
1 | Show team statistics for both teams
2 | Show team statistics for team 1
3 | Show team statistics for team 2
4 | Show death statistics for both teams
5 | Show death statistics for team 1
6 | Show death statistics for team 2

The color that is shown for the team statistics is calculated depending on the "weight" of a player when he moves over a grid in the map. A stronger player leaves a greater weight when passing over a grid cell. Each grid cell then has a weight for each team, and based on which team has the greater weight, that grid cell is colored in that teams color.

So basically when a team is holding a certain position on the map (has RL/armor/good health) they will color that area in their teams color, and it is obivous what team is dominating the map. For more information like this check out the teamholdbar and teamholdinfo hud items below.

### Teamholdinfo

#### Introduction

Teamholdinfo is a hud item that shows what team is holding specific "important" items on the map.

#### Radar interaction

The radar can display the names of the items that are listed for the teamholdinfo hud item. This is handy if a map has more than one item of the same type, such as DM2 that has several YA's. If you want to know the name of the YA next to tele, then use:

radar show_hold 1

to show the hold items on the map. Each item will be surrounded by a circle. This circle is used when calculating which team that is holding that item. Basically all the weights inside of the circle are summed up and the team with the highest percentage of cells inside that perimitter is considered to be holding the item.

Tip: Create an alias for this, so that if you forget which item name corresponds to what item on the map, you can just press a button and see all the item names.

alias +show_item_names "radar show_hold 1"
alias -show_item_names "radar show_hold 0"
bind k +show_item_names

#### Filtering items

The teamholdinfo hud item also has a filter option like the radar does:

teamholdinfo itemfilter

which decides what items to show in the list.

Valid values are:
rl, quad, ring, pent, suit, lg, gl, sng, mh, ra, ya and ga.

Setting different styles is also possible using teamholdinfo style"

Style | Result
--- | ---
0 | The team name of that holds the item in question is show to the right of the item name.
1 | A "teamholdbar" is shown for each item, with the percentage of the item held by each team.
2 | Two bars for each item is shown corresponding to the two teams hold percentage.

### Teamholdbar

This hud item shows you a percentage bar that shows how much of the level each team is holding at the moment.

teamholdinfo vertical
  Will draw the hold bar vertically.
teamholdinfo vertical_text
  Will draw the text vertically when in vertical mode.
teamholdinfo show_text
  Toggles the percentage text on or off.
teamholdinfo onlytp
  Show only in teamplay or always.

## Only in teamplay/demo playback

Since these controls only works "good" during demo playback, and you most likely only want them visible when they're useable, there is a property that allows you turn them off when the game is not a teamplay game, or when not in demo playback:

radar tponly 1
  Only show when teamplay is on.
radar tponly 2
  Only show when in demo playback.
radar tponly 3
  Only show when in teamplay + demo playback.

Last update: 18.10.2007 02:24 PDT, made by JohnNy_cz | ezQDocs