Cvars

From Q4MAX

Q4Max-specific CVARs

The following CVARs have been added/changed in Q4Max.

Client variables:

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 - see the page about votes.
  • 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.

Client variables

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_railstyle

Summary
Alternate rail trail styles.
Type
bool
Default value
1
Q4Max versions
0.75 and upwards
Description
Allows for two different rail trail styles : 1 is the Q4 default, 0 has no spiral and a slightly thinner core.

cg_ambientEffects

Summary
Enable a number of world particle effects
Type
bitmask
Default value
3
Q4Max versions
0.73 and upwards
Description
This cvar controls whether most world particle effects should be drawn or not (teleporters, jump pads...) and/or item effects (glow shells...).
0 - don't show any ambient particle effects
1 - show world effects
2 - show item 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).

cg_thinshaft

Summary
Toggle between q4's default lightning gun beam and a thinner one.
Type
bool
Q4Max versions
0.76 and upwards

cg_drawcrosshairnames

Summary
Enables displaying player names under the crosshair.
Type
bool
Q4Max versions
0.76 and upwards

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 24 - 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 of g_crosshaircustom.

Using a value of 0 will stick to Quake 4's default per-weapon crosshair assignments and disable the second crosshair layer.

1 gfx/guis/crosshairs/crosshair_blaster.tga
2 gfx/guis/crosshairs/crosshair_grenadelauncher.tga
3 gfx/guis/crosshairs/crosshair_lightninggun.tga
4 gfx/guis/crosshairs/crosshair_machinegun.tga
5 gfx/guis/crosshairs/crosshair_nailgun.tga
6 gfx/guis/crosshairs/crosshair_railgun.tga
7 gfx/guis/crosshairs/crosshair_rocketlauncher.tga
8 gfx/guis/crosshairs/crosshair_shotgun.tga
9 gfx/guis/crosshairs/crosshair_q3_1.tga
10 gfx/guis/crosshairs/crosshair_q3_2.tga
11 gfx/guis/crosshairs/crosshair_q3_3.tga
12 gfx/guis/crosshairs/crosshair_q3_4.tga
13 gfx/guis/crosshairs/crosshair_q3_5.tga
14 gfx/guis/crosshairs/crosshair_q3_6.tga
15 gfx/guis/crosshairs/crosshair_q3_7.tga
16 gfx/guis/crosshairs/crosshair_q3_8.tga
17 gfx/guis/crosshairs/crosshair_q3_9.tga
18 gfx/guis/crosshairs/crosshair_q3_10.tga

If you use double crosshairs, you may notice raven's ones on 1,2,4,6,7,8 don't line up well with a lot of others. Use the following numbers if that is a problem to you.

19 gfx/guis/crosshairs/crosshair_blaster2.tga
20 gfx/guis/crosshairs/crosshair_grenadelauncher2.tga
21 gfx/guis/crosshairs/crosshair_machinegun2.tga
22 gfx/guis/crosshairs/crosshair_railgun2.tga
23 gfx/guis/crosshairs/crosshair_rocketlauncher2.tga
24 gfx/guis/crosshairs/crosshair_shotgun2.tga

g_crosshairsize

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 24 - access to individual crosshairs.

g_crosshairsize2

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_crosshairsize.

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.

hud_timer

Summary
Timer style.
Type
integer
Default value
1
Q4Max versions
0.75 and upwards
Description
Changing this will make the timer count up (-1), or down (1, standard Q4 behaviour). Alternatively you can turn it off altogether by setting this to 0.

hud_timerPosition

Summary
Position of the timer on the HUD.
Type
2 numeric values - X Y
Default value
305 10
Q4Max versions
0.75 and upwards
Description
This cvar controls the position of the timer. 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_handicap

Summary
Lowers the health of the player to this value, and adjusts damage done by the player.
Type
integer
Default value
100
Q4Max versions
0.76 and upwards
Description
When you lower this, your health will tickdown to that value. The damage you give is scaled accordingly.

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.

ui_autoswitch

Summary
Set weapon switching behaviour.
Type
bitmask
Q4Max versions
0.75 and upwards
Description
ui_autoswitch used to enable automatic weapon switches - it now also allows switching to weapons that have no ammo. This variable now being a bitmask, you can combine the two possibilities if needed.
    0 manual switches
    1 auto switches
    2 empty weapons allowed

Client variables

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
string
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.