# Cvars

### From Q4MAX

## Q4Max-specific CVARs

The following CVARs have been added/changed in Q4Max.

Client variables:

- cg_logXMLStats - Enables / disables client-side logging of game statistics to a .xml file.
- cg_noChatBeep - Enables / disables the beep on chatting.
- cg_enemyModel - Specifies the model to be used for opposition players.
- cg_teamModel - Specifies the model to be used for teammates.
- cg_enemyColor - Specifies the color to skin opposition players.
- cg_teamColor - Specifies the color to skin teammates.
- cg_weaponFovEffect - Enables/disables automatic adjustment of the weapon model depending upon the g_fov setting.
- cg_blood - When enabled, shows bloodstains, spurts, etc on players.
- cg_gibs - explode corpses into itty bitty pieces, when enabled.
- cg_deadbody - dead body filter
- cg_smoke_RL - show rocket trail smoke.
- cg_smoke_GL - show grenade trail smoke.
- cg_ambientEffects - enable a number of world particle effects
- cg_usehitscantint - Specifies rail color usage
- cg_teamhitscantint - Team rail color
- cg_enemyhitscantint - Enemy team rail color
- g_crosshaircustom - Selects the first crosshair
- g_crosshaircustomsize - Selects the first crosshair's size
- g_crosshaircustom2 - Selects the second crosshair
- g_crosshairsize2 - Selects the second crosshair's size
- g_crosshaircolor2 - Selects the second crosshair's color
- g_crosshairblink - Toggles crosshair blinking
- hud_FPS - A better implementation of com_showFPS.
- hud_style - Specifies which client HUD to use.
- hud_lagometerPosition - position of the net_clientLagOMeter on the HUD.
- r_vertexlight - Enables Vertex Lighting mode.
- s_ambient - Enables / disables world sound effects.
- ui_autoAction - Allows demos and screenshots to be automatically created.
- ui_showgun - Toggle inview gun model display mode.
- fs_xslTemplate - The XSL template with which to associate the XML statistics logs.

Server variables:

- ref_password - Specifies the password that referees must use to log in.
- si_autoAction - Forces ui_action for all clients.
- si_mode - Sets the game mode - eg, FFA, TDM, CA etc.
- vote_allow_* - Allows the server operator to specify what options are votable.
- sv_logXMLStats - Enables / disables server-side logging of game statistics to a .xml
- sv_timeoutMaxLength - The maximum duration of a timeout.
- sv_maxTimeouts - The maximum number of timeouts per player / team.
- fs_xslTemplate - The XSL template with which to associate the XML statistics logs.
- g_feedscorebot - Enables the scorebot feed/

### cg_logXMLStats

Summary
  Enables / disables client side logging of game statistics to a .xml file.
Type
  bool
Default value
  `1`
Q4Max versions
  0.72 and upwards
Description
  When set to 1, at the end of every game a dump of the game statistics is created in XML format. This can be viewed in your web-browser, however it is intended for processing by external tools. The files are created grouped by year, month, day, and then named by the game time. This is a client cvar - see sv_logXMLStats for a server-side version of this cvar.

### cg_noChatBeep

Summary
  Enables / disables the beep on chatting.
Type
  bool
Default value
  `0`
Q4Max versions
  0.7 and upwards
Description
  When set to 1 this turns off the sound played whenever someone uses the "say" command to chat.

### cg_enemyModel

Summary
  Specifies the model to be used for opposition players.
Type
  String
Default value
  `None`
Q4Max versions
  0.7 and upwards
Description
  If set to the name of a model, this will be used to display all opposition players. The model name is exactly the same as would be used in the standard "model" cvar - eg "model_player_marine_cortez" for the Cortez model.
  This cvar can be found in the Settings / Multiplayer menu.

### cg_teamModel

Summary
  Specifies the model to be used for teammates.
Type
  String
Default value
  `None`
Q4Max versions
  0.7 and upwards
Description
  If set to the name of a model, this will be used to display all players on the same team as you. As with cg_enemymodel, the value is exactly the same as the standard "model" cvar - eg "model_player_marine_cortez" for the Cortez model.
  This cvar can be found in the Settings / Multiplayer menu.

### cg_enemyColor

Summary
  Specifies the color to skin opposition players.
Type
  3 numeric values
Default value
  `None`
Q4Max versions
  0.7 and upwards
Description
  This sets the color that enemy player skins will be set to. The color is specified as 3 numbers in the range 0 to 255, representing the Red Green and Blue components of the color. eg, "255 0 0" is bright red, and "0 0 255" is bright blue, and "255 255 0" is bright yellow. If set to blank, this will disable enemy skin colors.
  This cvar can be found in the Settings / Multiplayer menu.

### cg_teamColor

Summary
  Specifies the color to skin teammates.
Type
  3 numeric values
Default value
  `None`
Q4Max versions
  0.7 and upwards
Description
  This sets the color that teammates skins will be set to. The color is specified as 3 numbers in the range 0 to 255, representing the Red Green and Blue components of the color. eg, "255 0 0" is bright red, and "0 0 255" is bright blue, and "255 255 0" is bright yellow. If set to blank, this will disable team skin colors.
  This cvar can be found in the Settings / Multiplayer menu.

### cg_weaponFovEffect

Summary
  Enables/disables automatic adjustment of the weapon model depending upon the g_fov setting.
Type
  bool
Default value
  1
Q4Max versions
  0.7 and upwards
Description
  When setting FOV to a value higher than 90 the gun model is distorted. To counteract this, the model can be pulled back to make it less obtrusive - this is what happens if this cvar is set to 1. Setting this to 0 returns this to default Quake 4 behaviour.
  This cvar can be found in the Settings / Competition menu.

### cg_blood

Summary
  When enabled, shows bloodstains, spurts, etc on players.
Type
  bool
Default value
  1
Q4Max versions
  0.71 and upwards
Description
  This cvar controls whether blood effects should be drawn or not. Setting this variable, combined with cg_gibs turns off all significant gore effects.
  This cvar can be found in the Settings / Competition menu.

### cg_gibs

Summary
  Explodes corpses into itty bitty pieces, when enabled.
Type
  bool
Default value
  1
Q4Max versions
  0.71 and upwards
Description
  This cvar controls whether gibs should be displayed or not. Setting this variable, combined with cg_blood turns off all significant gore effects.
  This cvar can be found in the Settings / Competition menu.

### cg_deadbody

Summary
  Filters out dead bodies.
Type
  bool
Default value
  1
Q4Max versions
  0.73 and upwards
Description
  When this cvar is set to 1, dead bodies will be shown - if it is set to 0, they will not be drawn.

### cg_smoke_RL

Summary
  Show rocket trail smoke.
Type
  bool
Default value
  1
Q4Max versions
  0.71 and upwards
Description
  When this cvar is set to 1, rocket trail smoke will be shown - if it is set to 0, it will not be drawn.
  This cvar can be found in the Settings / Competition menu.

### cg_smoke_GL

Summary
  Show grenade trail smoke.
Type
  bool
Default value
  1
Q4Max versions
  0.71 and upwards
Description
  When this cvar is set to 1, trail smoke on the grande launcher will be shown - if it is set to 0, it will not be drawn.
  This cvar can be found in the Settings / Competition menu.

### cg_ambientEffects

Summary
  Enable a number of world particle effects
Type
  bool
Default value
  1
Q4Max versions
  0.73 and upwards
Description
  This cvar controls whether most world particle effects should be drawn or not (teleporters, jump pads...). Setting it to 0 removes the effects.

### cg_usehitscantint

Summary
  Specifies rail color usage
Type
integer
Default value
  3
Q4Max versions
  0.74 and upwards
Description
  This replaces si_usehitscantint and allows clients to choose how rail colors should be handled.
    0 - no tinting allowed
    1 - player hitscan tinting allowed in DM, NO hitscan tinting in team games
    2 - player hitscan tinting allowed in DM, use strogg-marine colors in team games
    3 - player hitscan tinting allowed in DM, use teamcolor-enemycolor in team games
    4 - enemies use cg_enemyhitscantint and teammates use cg_teamHitscanTint
    5 - same as 4, except the local player uses ui_hitscantint

### cg_teamhitscantint

Summary
  Team rail color
Type
  3 floats
Q4Max versions
  0.74 and upwards
Description
  When using cg_usehitscantint 4/5, rails shot by your team will match this color. The color is coded the same way as ui_hitscantint (hue 0-360 saturation 0-1 value 0.75-1).

### cg_enemyhitscantint

Summary
  Enemy team rail color
Type
  3 floats
Q4Max versions
  0.74 and upwards
Description
  When using cg_usehitscantint 4/5, rails shot by the enmy team will match this color. The color is coded the same way as ui_hitscantint (hue 0-360 saturation 0-1 value 0.75-1).

### g_crosshaircustom

Summary
  Selects the first crosshair
Type
  integer
Q4Max versions
  0.74 and upwards
Description
  We have slightly changed the behaviour of this variable.
  0 - no custom crosshair, use default per-weapon settings
  1 to 18 - access to individual crosshairs.
  Before, you would switch crosshairs by having g_crosshaircustom 1 and specifying the path to a crosshair image in g_crosshaircustomfile. Now, the latter is irrelevant : you can simply select a crosshair by using a different value.

### g_crosshaircustomsize

Summary
  Selects the first crosshair's size
Type
  integer
Q4Max versions
  0.74 and upwards
Description
  The range of crosshair sizes is free between 4 and 100 now.

### g_crosshaircustom2

Summary
  Selects the second crosshair
Type
  integer
Q4Max versions
  0.74 and upwards
Description
  This allows you to have a second crosshair on top of the original. It is independant of the first crosshair, its attributes (number, size, color) are set in other variables which behave like those you already know.
  0 - no second crosshair layer.
  1 to 18 - access to individual crosshairs.

### g_crosshaircustomsize2

Summary
  Selects the second crosshair's size
Type
  integer
Q4Max versions
  0.74 and upwards
Description
  Second crosshair layer control. Has similar functionality than g_crosshaircustomsize.

### g_crosshaircolor2

Summary
  Selects the second crosshair's color
Type
  floats
Q4Max versions
  0.74 and upwards
Description
  Pick the second crosshair layer's color in the same fashion as g_crosshaircolor.

### g_crosshairblink

Summary
  Toggles crosshair blinking
Type
  boolean
Q4Max versions
  0.74 and upwards
Description
  Enables or disable the crosshairs blinking red when the enemy is hit.

### hud_FPS

Summary
  A better implementation of com_showFPS.
Type
  boolean
Default value
  0
Q4Max versions
  0.72 and upwards
Description
  com_showFPS calculates the FPS count 60 times a second. This isnt a very good way to measure how many frames you get per second since its assuming all frames are the same, which they are not. When using this variable it will display the number of frames actually rendered in a second - ie, a true representation of your FPS. Note that Q4 appears to lock the framerate to 62.5fps, not the 60fps that is often quoted. Therefore, when you have a rock solid framerate it will alternate between 62 and 63 each second.

### hud_style

Summary
  Specifies which client HUD to use
Type
  String
Default value
  `cpmhud1`
Q4Max versions
  0.5 and upwards
Description
  Chooses which file to use as the main player HUD. The file guis/`hud_style`.gui will be used.
  It is possible to make your own HUD, see guis/cpmhud1.gui for an example. A number of Custom Huds have been created.
  This cvar can be found in the Settings / Competition menu.

### hud_lagometerPosition

Summary
  Position of the net_clientLagOMeter on the HUD.
Type
  2 numeric values - X Y
Default value
  10 380
Q4Max versions
  0.71 and upwards
Description
  This cvar controls the position of the graph displayed when setting the cvar net_clientLogOMeter. The value is the coordinates of the top left of the graph, relative to the top-left of the screen. The bottom left of the screen is considered 640 480.

### r_vertexlight

Summary
  Enables Vertex Lighting mode.
Type
  bool
Default value
  `0`
Q4Max versions
  0.7 and upwards
Description
  When set to 1 this enables the vertex lighting mode, and when set to 0 behaves the same as normal Quake 4. Vertex Lighting mode disables all dynamic lighting, and ensures that the entire level is lit. This gives a significant speed boost over the standard lighting. Note that this works with all maps.
  This cvar can be found in the Settings / Competition menu.

### s_ambient

Summary
  Enables / disables world sound effects.
Type
  bool
Default value
  `0`
Q4Max versions
  0.7 and upwards
Description
  When set to 1 this turns off world sound effects - ie ambient background noise.
  Changes take effect after a reconnect.

### ui_autoAction

Summary
  Allows demos and screenshots to be automatically created.
Type
  String
Default value
  `None`
Q4Max versions
  0.7 and upwards
Description
  Setting this variable allows you to automatically record demos, take screenshots, or both. When this string contains "demo" it will automatically record a demo, which will be created with the names of the players and a timestamp. If the string contains "ss" it will take a screenshot at the end of the match. The string may be "demo ss" to both record a demo and take a screenshot.

### ui_showgun

Summary
  Toggle inview gun model display mode.
Type
  integer
Q4Max versions
  0.74 and upwards
Description
  We have added the option 2 to this stock variable. It displays the inview gun model, but removes the bobbing and swaying - the gun stays still then.

### ref_password

Summary
  Specifies the password that referees must use to log in.
Type
  bool
Default value
  None
Q4Max versions
  0.7 and upwards
Description
  This specifies the password that clients must supply when using the "referee" command to become a referee.

### si_autoaction

Summary
  Forces ui_action for all clients.
Type
  bool
Default value
  None
Q4Max versions
  0.7 and upwards
Description
  This variable is similar to ui_autoAction, but is a server variable, which if set will trigger all clients to perform the auto action. As with ui_autoaction, the value may be any combination of "demo" and "ss".

### si_mode

Summary
  Sets the game mode - eg, FFA, TDM, CA etc.
Type
  String
Default value
  `FFA`
Q4Max versions
  0.7 and upwards
Description
  This variable specifies the game mode that is currently being played. A game mode sets a number of settings to "standard" values with a single setting. There are a number of standard modes provided: DM, TDM, FFA, CTF, ACTF, CA, CTFS and Duel, as well as custom modes such as ATDM. Each of these will set a number of other cvars (eg fraglimit, timelimit, si_gametype etc). Both the current mode, and the settings controlled within the mode can be voted via the callvote command.
  For more information, see the page on Modes.

### sv_logXMLStats

Summary
  Enables / disables server-side logging of game statistics to a .xml file.
Type
  bool
Default value
  `1`
Q4Max versions
  0.72 and upwards
Description
  When set to 1, at the end of every game a dump of the game statistics is created in XML format. This can be viewed in your web-browser, however it is intended for processing by external tools. The files are created grouped by year, month, day, and then named by the game time. This is a server cvar - see cg_logXMLStats for a client-side version of this cvar.

### fs_xslTemplate

Summary
  The XSL template with which to associate the XML statistics logs.
Type
  string
Default value
  `"../../../basic/styl.xsl"`
Q4Max versions
  0.73 and upwards
Description
  The XML statistics logs (both server and clientside) can be displayed in a web-browser using XSL templates. This cvar controls the path and name of the file that will be written to all XSL files. This cvar is intended to allow server operators to use a different stylesheet / directory structure if they chose. Note that the MAXStats stylesheet and PHP scripts assume the default structure, so it is strongly recommended that this is not changed unnecessarily.

### sv_timeoutMaxLength

Summary
  The maximum duration of a timeout.
Type
  int
Default value
  `60`
Q4Max versions
  0.73 and upwards
Description
  When a player uses the timeout command it has a maximum period of time to prevent abuse. This cvar controls how long a period is allowed.

### sv_maxTimeouts

Summary
  The maximum number of timeouts per player / team.
Type
  int
Default value
  `5`
Q4Max versions
  0.73 and upwards
Description
  When a player uses the timeout command it has a maximum number of timeouts per match to prevent abuse. This cvar controls how long a period is allowed. Setting this cvar to 0 effectively disables player timeouts.

### g_feedscorebot

Summary
  Enables the scorebot feed.
Type
  bool
Default value
  `1`
Q4Max versions
  0.70 and upwards
Description
  Setting this cvar to 1 enables the scorebot feed. When this is active, a number of serverinfo variables are set on the server which can be read by scorebots and serverbrowsers to display the scores of the currently running game.