QW262 by [2WP]BorisU revision 10

Major advances of QW262

Extra features

New settings and abilities

The client is automatically responding the f_version queue sent by any player in messagemode 1. The answer is sent only one time in 20 seconds to avoid spamming.

If your config has a line containing setinfo uid nick, this nick becomes your id-name (any string up to 5 symbols will fit, case-sensitive). This is convenient if you have lots of nicks but still want your friends to recognize you. Uid can be viewed in userinfo and everybody using QW262 can do so using users command. Some commands in QW2.62 recognize and use uid in the same manner as id of a player.

The volume of a sound produced by play and playvol commands doesn't depend on a current distance from the place where thesecommands were issued. This is very handy for grenade-timers in TeamFortress.

While opening the console the view on the remaining part of the screen is corrected in the software version (works like in Unreal so that you don't miss any event when working in the console). Users of the GL version can adjust transparency of the console by a gl_conalpha variable (default is 0.8). At values about 0.3 the console is transparent enough and there's no need for the view correction.

Client automatically determines if the server using jump-fix and tunes prediction accordingly.

Some variables have changed limits

rate

maximum rate value is increased up to 15000. Nevertheless, values of more than 10000 can be really gained only using QW262 server.

cl_maxfps

one can obtain fps higher than 72 (up to 120) but only if server permits this by setting serverinfo maxfps or during demo playback

user as extra shows the amount of userinfo in bytes. When plaing on QW2.30 server this amount can not exceed 196 bytes (255 bytes for QW262 server). When plaing TeamFortress also shows skin, topcolor and bottomcolor only to teammates.

Visual settings

crosshair 3 really a little one. The color is that of the crosshaircolor varibale.
crosshair 4 crosshaircolor painted cross, the size can be adjusted by cl_cross_size and cl_cross_width variables.
cl_crosshair_hack if set to 1 (default 0) moves the viewing point slightly so that crosshair approximately coinside with the sniper dot in TF.
default_fov when client receives a command from server to set fov to 90 (e.g. after concussion effect is gone), the client sets fov to default_fov instead. It's nice to use default_fov if you are playing TeamFortress by using a nonstandard fov.
r_draviewmodel if set to 2, weapon models are visible in soft-rendering even with fov higher than 90.
show_speed

when set to 1, the ammo counter is replaced with a speed meter like in qizmo (default is 0). Values 2 and 3 show a graphical speed meter.

show_lagmeter when set to 1, a ping and pl meter appear in the lower right corner of the screen (default is 0).
lagmeter_format when set to 1, the lagmeter looks more compact (default is 0).
con_notifylines defines the maximum number of console messages lines which can be viewed up the screen at once. Default is 4, the allowed range is 0-8.
scr_centershift defines the position of centerprint messages on the screen. The positive number shifts them down the center, the negative - up. This is useful when watching demos which were recorded on different resolution.
scr_consize determines the size of in-game console. Valid values from 0 to1 (default 0.5).
r_drawflame when 0 (default 1), removes animated torches from maps to increase your fps.
r_powerupglow when 0 (default 1), removes dynamic lighting from powerups. Value 2 removes this effect only for your own powerups.
r_lightflicker when 0 (default 1), removes lighting flicker from powerups.
r_rocketlight when 0 (default 1), removes dynamic lighting from rockets.
cl_explosion when set to 2 (default 0), removes dynamic lighting from explosions.
r_fastsky setting it to 1 (default 0) draws a singlecoloured sky texture, the colour being taken automatically from a current sky texture.
cl_muzzleflash shooting flashes: 0 - not to show, 2 - not to show own flashes only (deafult 1).
cl_sbar_inv when set to 0, inventory disappears from status bar at any viewsize level.
r_netgraph can be set to 2 or 3. The graph's background is then removed (and also numbers when set to 3).
r_fullbrightskins sets the minimum level of player skin lighting. Avalable range from 0 (normal lighting) to 1 (fullbright skins). Works only during demo playback or if explicitely allowed on server(serverinfo fbskins x, x sets the maximum allowed level of brightness).
cl_truelightning changes drawing of shaft. Available range: 0-1. Works only during demo playback or if explicitely allowed on server (serverinfo truelightning x).
v_damagecshift changes red flash intensity when you are hit. Default - 1, available range 0 - 1.
v_quadcshift, v_suitcshift, v_ringcshift, v_pentcshift changes the intensity of color change effect when you have the corresponding powerup. Default - 1, available range 0 - 1.
cl_bonusflash Turns on/off screen flash when you are picking up something . Default - 1.

GL version specific.

LIT-files are supported (static colored lighting). They are loaded from maps or lits directories. Works only if gl_colorlights cvar is set to 1.

It is possible to use 24/32bit JPG, PNG, TGA and PCX (file search is performed in this order!) textures up to 2048x2048 size. When loading 'test' texture the client first look for test.link (link to other texture), then test.jpg, test.png, test.tga, test.pcx and finally for standard 8bit texture. If the name of the texture starts from '*' it is replaced by '#'. Fullbright colors on 24/32bit textures are supported only if server permits it through 'serverinfo allow_24bit_fullbrights 1' - currently disabled.

It is possible to use 24/32bit textures for bsp-models, alias models, sprites, elements of quake interface (menu, statusbar), skyboxes and crosshairs. The following table summarizes the directories where textures shoul be placed:

bsp-models (walls, healthboxes etc.) textures/mapname, textures/bmodels, textures
alias-models (weapons, armor etc. except player.mdl!) textures/models, textures/progs, textures
Sprites textures/sprites, textures/progs, textures
textures for skybox textures/skybox, env
textures for quake interface textures/gfx, textures/wad, gfx
crosshairs textures/crosshairs

Console background can be loaded from textures/gfx/conback.* file. Console font can be loaded from textures/charset.*.

Some words abount .link file. This is a plaintext file containing the name of the texture (can contain path and must contain extention). For example if some_texture.link contain TFcommon/blue_wall.tga line, then loading some_texture will load blue_wall.tga from the indicated directory. This can eliminate texture duplication and allows meaningful naming of textures.

Skyboxes are supported. Name of skybox should be placed into r_skybox variable or you can use loadsky skyboxname command. Skybox textures have names namexx.* or name_xx.* (where xx: rt, bk, lf, ft, up, dn). Due to some problems with skybox rendering and possible cheating skybox should be allowed on server through 'serverinfo allow_skybox 1'.

32bit texture can be used as crosshair (crosshair 5). Required rexture is loaded by load_crosshair name command. Partial transparency is supported. Size and color are set by cl_crosssize and crosshaircolor cvars.

vid_hwgammacontrol

when 1 (default if your videocard supports doenloadable gamma ramps), it becomes possible to adjust gamma in GL version and the spy gas in TeamFortress works as in software version.
Value 2 is the same as 0 with only difference that you can adjust gamma when playing. It is recommended that you use the value of 2 when playing GL under Win2000/WinXP.
If you play with vid_hwgammacontrol 0, then you should use a -gamma [value] in command line when launching the client to adjust gamma.

gl_fb_models

when set to 1 (default), the fullbright colours are turned on in GL version. This works only for textures of bsp-models (walls, medkits etc.).

gl_fb_bmodels when set to 1 (default), the fullbright colours are turned on in GL version. This works only for textures of alias-models (players, grenades, etc.).
gl_player_interpolate when set to 1 (default) player model frames are interpolated to get smother movement.
gl_lightmode regulates the type of dynamic lighting (0 - standard GLQuake, 2 - ZQuake, you must restart a map for changes to take effect).
gl_colorlights when set to 1 (default is 0), turns on the coloured dynamic lighting in GL version (working only if gl_flashblend is 0, changes take place after a map restart).
gl_flares when set to 1, launched rockets have beautiful shiny tails in GL :)
scr_scalemenu when set to 1 (default), the menu in GL version is stretched along the screen.
r_watervishack Partially solves the problem of entities visibility when viewing point is close to water surface(default 1).
gl_smoothfont regulates smoothing of the console font (default 0).
gl_waterfog Controls fog when you are under water, in lava etc. Possible values: 0 - disabled, 1 - Linear Fog, 2 -Exponential Fog (default).
gl_waterfogdensity controls the strength of the effect. Available range: 0 - 1.
gl_caustics when set to 1 (default) water caustic is shown on all underwater walls. water_caustic texture should be placed in qw/textures. Works only if gl_texsort is set to 0.
gl_use_24bit_textures when set to 1 (default) allows to use 24bit textures.
gl_screenshot_format Controls the format ofscreenshots. Affects capture command. Possible values: 0 - TGA (default), 1 - PNG, 2 -JPG.
gl_screenshot_png_compression Controls the compression level of PNG screenshots. Available range: 1-9, the higher - the better and slower compression is used, 0 - libpng default (corresponds to 6 in the current version of libpng).
gl_screenshot_jpg_quality Controls the compression level of JPG screenshots. Available range:1-100, the higher - the better is screenshot quality and larger its size, 0 - libjpeg default (corresponds to 75 in the current version of libjpeg).
gl_ext_anisotropy_level Sets anisotropic filtering level. Value 0 (default) leaves anisotropy at default level. Over values: 1 (anisotropy filtering disabled), 2, 4 ... and so on up to the maximum level supported by hardware are applied during texture filtering.
gl_ext_automipmap

Allows to use OpenGL-extension for automatic mipmap creation. Enabled by default (1).

gl_ext_texture_compress Controls texture compression. Disabled by default (0). Values > 0 work as follows: : if log2(width*height) is greater or equal to the value of this cvar then the texture will be compressed during uploading to the videocard. So value 16 allows compression of textures larger than áóäóò 256x256. Some videocards work significantly faster with the compressed textures.
gl_ext_lod_bias Controls the LOD bias. Default is 0. Available range: from -3 to 3. Positive values give effect similar to gl_picmip but it can be changed ingame. Negative values give sharper picture butcan lead to texture shimmering.
gl_blend_sprites When set to 0 sprites are drawn in a standard way. When set to 1(default) partial transparency is supported and sprites look better. Videocard and processor load is slightly higher in this case.
vid_vsync Allows to control synchronization of frames with vertical sync (default 0 - disabled). Win32 version only.
v_dlightcshift Turns on/off screen color change when you are inside "light bubble" and gl_flashblend 1.
gl_cshiftpercent Controls the strength of the effects changing the color of the screen . Default - 100. Available range 0-100.

Sound settings

snd_reverse when set to 1, right and left sound channels are swapped.
snd_restart restart sound system. Sometimes is useful when you have sound problems.
stopsound 1 if you pass additional parameter to stopsound command it will stop only sounds that were played using play, playvol commands.

New variables

mapname map (read-only)
date date ;) (read-only)
time time ;)) (read-only)
date_format defines the format of date ouput: 0 - ddmmyyyy (default), 1 - ddmm, 2 - dd-mm-yyyy, 3 - dd-mm.
time_format defines the time format: 0 - hhmmss (default), 1 - hhmm, 2 - hh-mm-ss, 3 - hh-mm.
cl_currentweapon contains a number of current weapon. Equals 0 when reloading in TeamFortress. Is determined by name of a current weapon model even when r_drawviewmodel is set to 0.

gl_cachemodels (default 0) regulates the models caching on your hard drive. Since modern computers deal with models pretty fast there's no need to cache them. And , by the way, this eliminates the problem with changing of models and QuakeForge client, in which the authors for no reason changed the format of model information and as a result other clients were simply crashing during the model loading process.
cl_ping contains your current ping value (the same that is shown by show_lagmeter command).

Additional command line parameters

-mtfl gamma values are limited to 0.55 (according to the rules of Moscow TF League). In this mode "+" is added to the standard client's f_version response("*" if SetDeviceGammaRamp function returned error in Win2000/XP). In GL version -gamma 1 and vid_hwgammacontrol 1 settings are forced so that flash grenade effect is as close as possible to the software rendering.
-sgis GL version is using ARB-multitexturing by default. This key allows to force usage of SGIS-multitexturing.
-nohwtimer turns off new precise timer and returns back old behaviour
-zone default zone size is icreased up to 2 Megabytes (-zone 2048)
-heapsize client is using 32 Megabytes of memory by default.
-use8bit turns on support for shared palette 8bit textures
-fullscreen Linux-GLX version tries to start fullscreen
-freq V Sets monitor refresh rate (Hz)

Console logging

It is now possible to switch on and off console logging at any desired moment directly from the console. Here are related variables and commands:

log_filename if this variable is not empty, the logfile called @log_filename is put to <gamedir> directory.
log_prefix this variableis is not empty, its content is inserted into the beginning of each logfile line. By the way, cvar expansion is allowed, and certainly all kind of log-processing programs (like SpeedStats) will go nuts but ... who cares? :)
log_truncate this command cuts a logfile size to 0; a name of logfile is defined by log_filename variable.

The log-file described would have absolutely no connection to that of -condebug key. Moreover, you can writw them both at once :)
Examples:

// starts new log with timestamps
log_prefix "[@date @time]"
log_filename "mycoollog.txt"
log_truncate

// stops logging
log_filename ""

Handling the number of packets sent to server

The Quake engine is constructed in such a way that fps is rigidly connected to the number of packets sent to a server. This means that if you got a bad connection and a low rate number - you will hardly get nice fps. The cl_c2spps variable allows to limit the number of sent-to-server packets. At the same time your fps is defined by cl_maxfps variable. These "extra" packets are put away and the resulting backdrop is often packetloss and loss of some commands. Some solutions for keeping the most important information intact have been introduced but I would not promise heavens.

Example:

cl_maxfps 60
cl_c2spps 30

Changes in file searching algorithm

It is possible to set gamedir at client sartup:

qwcl262 -game fortress

This put fortress directory to the list of directories where files are searched, so files situating there have a priority over files lying in qw and id1. This includes among others quake.rc, autoexec.cfg, gfx.wad, conback.lmp etc.

Small comment on quake.rc: Default quake.rc is included in id1/pak0.pak and contains execution of autoexec.cfg, config.cfg and stuffcmds command, that puts into execution buffer commands that were given in the command line (+connect localhost for example). If you have decided to write your own quake.rc, then you should make these action yourselves if it is required. When launced with -game paramerter and standard quake.rc client looks for autoexec.cfg file first in the given directory that allows automatiñ launching of the required mod config at startup, before connection to any server.

A userdir command can be used for addition of directories to the list searched for files by the client (configs, sounds, models, etc.). Real handy when several players with their own configs files play Quake on a single computer.

userdir [dir [type]]

adds a directory to the search list:
0 (default) - <quake_dir>/<gamedir>/<dir>
1 - <quake_dir>/<dir>/<gamedir>
2 - <quake_dir>/qw/<dir>/<gamedir>
3 - <quake_dir>/qw/<dir>
4 - <quake_dir>/<dir>
5 - $HOME/qw/<dir> (where $HOME is the contents of HOME enviroment variable)

When issuing this command after reconnection to a server or parameter is not defined, a current userdir is printed in the console.

It is possible to set userdir at client startup. Then configs will be executed taking this directory into account. One can use -userdir and-game separately or both at once. Example:

qwcl262 -userdir vasya 2 -game fortress

It is possible to use PAK-files with arbitrary names. When the directory is added to the search path first files pak0.pak, pak1.pak are loaded, then pak.lst is read and all the PAK-files listed there are loaded (one per line with extension). GL-âåðñèÿ skips all files strting with "soft", soft-version skips files starting with "gl". If userdir is set to name, then finally name.pak is loaded.

Demo recording and playing

Demo-player is built into the client. You can reach it through multiplayer-demos menu or by the menu_demos command. It is possible to playback directly the qwd, qwz (qizmo compressed format) and mvd (multi view demos - server demos). The .qwz demos are automatically unpacked by qizmo. The unpacked file is deleted after the end of the playback. The qizmo_dir variable ("qizmo" by default) defines the folder in which qizmo surfs (according to quake dir).

Demo recording differs from that of qw2.30. In QW262 the delta-compression is not switched off and this feature reasonably decreases lags. You can now use pause command to pause while viewing a demo.

The beginning of a demo playback is detained till it's actually possible to show it. Helps when something interesting is in the very beginning and you MUST see it.

The playback of demos recorded in spectator mode with cl_chasecam 1 is improved. The player's model is not shown now but you can see proper weapon model.

Other variables connected to demos:

cl_demoflushtime determines an interval of buffer flushing while recording a demo. By default is 5 (0 value returns the old behaviour). This is introduced to avoid too frequent disk write operations causing little lags and fps drop.
cl_fovtodemo when set to 1 (default), fov changes are recorded to your demo, which is especially nice for sniper-demos.
cl_fovfromdemo when set to 0 (default is 1), the fov commands recorded in a demo are ignored during playback.
demotimescale defines a speed of demo playing. Slo- and fast motion (>1) are avaliable. The allowed range is 0.1 - 10.
cl_demoplay_restrictions when set to 0 (default 1), all buttons can be bound and hud is avaliable while watching a demo.
cl_demoplay_flash decreases the effect of flash-grenade during demo playback (default 1). Value 0.7 is well suited for watching demos of heavily flashed defenders :)
cl_demoplayer_sort determines files sorting in demo player. 0 - by name (default), 1 - by size.

Spectator mode and MVD demos playback

The spectator mode has been greatly improved. mvd demos playback is practically the same as spectating but you can set pause in any moment and switch to any player or move the cam. During camera switching effects of TeanFortress flash and concussion grenades are cleared.

cl_spec_id when set to 1 (default), a nick of a player you are looking at will be exposed; also pressing +attack will capture camera view on a player last running behind your crosshair.
track (id | uid) this commands switch camera view to a player with such an id/uid.
cl_spectator_restrictions when set to 0 (default 1), in spectator mode the hud and triggers are avaliable.

Converting demos to AVI (filming)

To faciliate this process there is a capture command. If you issue capture <fps> command during demo playback, the client starts to make a series of screenshots with the required fps. This mode is switched off by capture 0 command or automatically at demo end. There is NO NEED to worry if your computer is fast enough to write many screenshots. It is possible to write 72 fps in 1600x1200 resolution.Of course it will be slow, but it is possible. And vice versa: if you need only 5 frames per second in 320x200 resolution, then it will be rather fast :) Screenshots are put into directory given by capture_dir variable (realtive to Quake directory, default: "capture"). Subdirectory is created with name @date-@time to prevent accidental overwriting of one series of screenshot by another.

Mini-Gamespy

One can get certain info about Quake servers without being connected to them.

gamespy server:port gives you info on a map name and a number of players sitting currently on the server.
cl_gamespy_showplayers if set to 1 (default is 0), gamespy also shows the players' information.
cl_gamespy_showrules when set to 1 (default is 0), gamespy shows serverinfo.

Example:
cl_gamespy_showplayers 1
gamespy quake.orc.ru:27530

Limitation of client capabilities using serverinfo fpd

Client respects some limitations set by the server administration using serverinfo fpd and disable some functions. These bits in fpd are supported:

During connect to server client reports in the consiole if something is disabled.

Message filtering

There is a possibility to filter messages (works with any server but QW262 server makes filtering at server-side thus reducing the network traffic). For a message to be filtered and reach you it must end with #abc, where abc is a name of the channel (must consist of 3 letters!). Messages without a name of a channel are never filtered off. It is possible to assign filtering via several channels. For example, filter "#att#eng" will allow you to obtain messages on #att and #eng channels. At the given moment widely used are only #att and #def channels for attack and defence modes respectively. When a #def filter is active you will not get messages marked differently than #def. In order to totally cancel filtering use a filter "" command.

Improved console

The following buttons and combinations work in the console::

TAB tab-completion, repeated hits of TAB button allow you to scroll alternative aliases and commands names if they exist. Works in any place of the line.
SHIFT+TAB Scrolls alternatives in the opposite direction.
HOME cursor jumps to the start of the line. If the line is already empty, jumps the cursor to the beginning of the console buffer.
END cursor jumps to the end of the line. If the line is already empty, jumps the cursor to the end of the console buffer.
LEFTARROW cursor jumps to the next symbol to the left
RIGHTARROW cursor jumps to the next symbol to the right.
CTRL-LEFTARROW cursor jumps to the next word to the left.
CTRL-RIGHTARROW cursor jumps to the next word to the right.
CTRL-HOME to the beginning of console buffer.
CTRL-END to the end of the console buffer.
CTRL-ENTER sends a message via say_team.
DEL kills a symbol under the cursor.
BACKSPACE kills a symbol to the left of the cursor.
ALT-(letter or digit) brown characters input.
CTRL-digit yellow numbers input.
CTRL-(R,G,B,Y) input of "lamps" from ocrana.pak
CTRL-([,]) colored brackets input.
CTRL-V in Win32 version pastes clipboard contents to the console.

In messagemode, messagemode2, messagemode3 modes the buffer of the foregoing messages is implemented and you can scroll it by UPARROW and DOWNARROW buttons.

cl_completion_sort if set to 0 (1 by default) hitting TAB first shows commands.
cl_chatmode determines what to do with text typed in console. If set to 0, all is supposed to be commands, 1 - everything goes to server using say command , 2 (default) - first a check is made then valid commands are executed, anything else is sent to server using say command

-alias are blocked in console so that they do not executed when typing except for the keys that have no function in console (like Fx).

Keyboard

The number of bindable keys has been greatly expanded. It is now possible to bind CAPSLOCK, SCROLLCK, NUMLOCK, PRINTSCR. If a cl_keypad variable is set to 1, then you can bind the buttons of extended keyboard independently, i.e. the DEL and KP_DEL will make a difference. The names of buttons are listed below. Some buttons have several alternative names, so it is possible to use any of them.

NUMLOCK, KP_NUMLCK, KP_NUMLOCK KP_SLASH, KP_DIVIDE KP_STAR, KP_MULTIPLY,
*
KP_MINUS
KP_HOME, KP_7 KP_UPARROW, KP_8 KP_PGUP, KP_9 KP_PLUS
KP_LEFTARROW, KP_4 KP_5 KP_RIGHTARROW, KP_6
KP_END, KP_1 KP_DOWNARROW, KP_2 KP_PGDN, KP_3 KP_ENTER
KP_INS, KP_0 KP_DEL, KP_DOT

Notes:

In Win32 version PRINTSCR won't work if simultaneously CTRL, ALT etc buttons pressed.

Mouse

Mouse wheel works in DirectInput mode if m_forcemwheel cvar is set to 1.

MOUSE4 - MOUSE8 are supported. However driver support is required. It works with Microsoft drivers, does not work with Logitech Mouseware up to version 9.73.

Client has internal support for MOUSE4 - MOUSE8 buttons if Logitech Mouseware is installed (up to version 9.73) (mw_hook.dll library is required!). This mode is turned on by setting m_mwhook cvar to 1, and it does not matter what is mapped in to 4th-8th mouse button in Mouseware itself. If you don't like the default numbers of mouse buttons then you can change it using m_map_button command:

Example: logically swaps 4th and 5th mouse buttons, 6th button become an equivalent of keyboard key 'a' :
m_map_button 4 MOUSE5
m_map_button 5 MOUSE4
m_map_button 6 a

It as possible to use all keys emulated by Logitech Mouseware when mouse button is pressed (not only CTRL and SHIF). However one should know that:

  1. m_mwhook 1 mode is more convinient.
  2. Button up and down commands arrive without pause between them so you may need wait.
  3. They arrive then the mouse button is RELEASED.
  4. If you are using cl_keypad 1 then KP_* variants of button are generated for PGDN, PGUP etc.

Advanced scripting

Aliases execution speed was considerably elevated in comparison to QW2.30. The scripting language was widely extended. Command processing buffer was increased to 16K. A special alias 262_quakerc is automatically executed on launching of the client (after quake.rc is loaded), on changing the gamedir alias 262_autoexec is executed after ordinary configs loading. Thus, one can isolate specific part for QW262 config file, so that multiple error messages are not received under QW2.30 which does not understand QW262 scripting.

Variables defined by user (cvar)

register cvar_name1 [cvar_name2...] registers one or several variables for further use.
unregister cvar_name1 [cvar_name2...] kills unneeded variables. Built-in variables unfortunately can not be killed.
cl_prefixchar defines the symbol that has special meaning for cvar expansion, increment/decrement etc. Values @ (default) and $ (ZQuake compatibility mode) are allowed.

Values of variables (both built-in and defined by user) can be used in scripts. Sign @ (or $ if yo have changed cl_prefixchar) must stand before a name of such variable. Cvar expansion is not working for variables inside the dual quotation marks ", with exception of the specially stipulated cases.

Examples:

echo current fov: @fov
register class style
class medic
style att
bind t "say_team (@style-@class) Idu po kiwke"

One should remember one important thing. Script statement parsing and cvar expansion is made up to the end of line or semicolon symbol. So if you need to create a cvar containing semicolon you should create another variable, contatining it. For example:

set _tz ";"
alias example "set tmp a%a,%h@_tzlocation:%l'"
say_team @tmp

One can increase or decrease value of a variable in such way:
fov @+5 - increases fov by 5
fov @-5 - decreases fov by 5

There are some commands introduced to change values of variables:

set cvar_name value assigns a new value to a variable.
set_ex cvar_name value assigns a new value to a variable, expansion of %macros and variables is performed even in case if a parameter is inside the dual quotation marks.
set_bind_str cvar_name key_name assigns variable a value which contains anything bound to an indicated key.
set_alias_str cvar_name alias_name assigns variable a value which contains an indicated alias.
set_calc <cvar> <expr1> <op> <expr2>

allows to make some simple computations in scripts. The result is put into a <cvar> variable. <expr1>, <expr2> - are numbers. Several operations are supported:

  • + - addition
  • - - subtraction
  • * - multiply
  • / - divide
  • % - integer modulus
  • div - integer division
  • or - per-bit logical or
  • and - per-bit logical and
  • xor - per-bit logical exclusive or
  • int - converting float to integer

Additional tasks with strings:
set_calc <cvar> strlen <string> - calculate the length of the string and assign result to the <cvar>;
set_calc <cvar> substr <cvar2> <pos> [<len>] - get a piece of string in variable <cvar2> starting from position <pos> (each string starts at position 0) and of length <len> and then assign this piece to the <cvar> variable; <len> equals 1 if not defined.
set_calc <cvar> pos <cvar2> <string> - search a <string> in a variable <cvar2> and then assign a found position number to a <cvar> variable; value -1 is assigned to a <cvar> if string is not found.
set_calc <array> set_substr <var> <pos> - put <var> contents into <array> variable starting from position<pos>. If <pos> exceeds the length of <array> then <array> is extended using spaces
set_calc <cvar> tobrown and
set_calc <cvar> towhite convert variable contents to brown/white letters respectively.

set_regexp <cvar> [value] Create a regexp in <cvar> corresponding to value (all special symbols are escaped). If value is not given then starting value of <cvar> is used.
cl_autoregister when not set to 0, all set commands automatically register a variable if it doesn't exist yet.
toggle <cvar> inverts a value of a variable (0 -> 1, 1 -> 0).
crypt <cvar> <key> crypt command crypts and decrypts a cvar variable. A <key> parameter is used as a crypting/decrypting key. Limitations: a crypted variable and a key must consist of symbols belonging to a lower half of character table.
inc <cvar> [value] increases a variable by value (by 1, if value is not set).

Examples:
// a = b * 3
set_calc a @b * 3
// len = strlen(str)
set_calc len strlen @str
// a = 7 div 3 = 2
set_calc a 7 div 3
// intvar = int(3.67) = 3
set_calc intvar int 3.67
set a "aaaaaaaaaaa"
set b "bb"
set_calc a set_substr b 4
// a = "aaaabbaaaaa"

// rnd (range)
set tmp @time_format;time_format 0;set_calc rnd_seed @time div 123;time_format @tmp
alias rnd "set_calc rnd_seed @rnd_seed * 106; inc rnd_seed 1283; set_calc rnd_seed @rnd_seed % 6075; set_calc rnd_n %1 * @rnd_seed; set_calc rnd_n @rnd_n div 6075"

rnd 40
echo @rnd_n

// crypt/decrypt
set crypt_key "Crypt algorithm is simple"
set text "Very Secret string!"
echo @text
crypt text @crypt_key
echo @text
crypt text @crypt_key
echo @text

cvarlist command prints a list of all registered variables. Flags in front of variables have the following meanings:

* variable is saved in config.cfg
u variable is a part of userinfo
s variable is a part of serverinfo

bindlist command prints a list of all bound buttons.

Aliases

Aliases can possess parameters. Before alias execution %1-%9 combinations are substituted with a real parameters passed . %0 is substituted with a line containing all provided parameters. Examples:

alias s "say %0"
s hi all!
alias kick "rcon kick %1"
kick 4327

Commands to manage aliases:

viewalias reveals contents of one or more aliases.
removealiases kills all aliases. Be careful :)
unalias alias_name kills a defined alias.
alias alias_name if writing it in console - the content of an alias is printed as a result. If executed by means of script - alias is emptied.
alias_in <alias> <cvar> [<options>]

allows to insert contents of <cvar> variable into an <alias>. <options> is a bit mask which defines an action:

  • 1 - (0 - insert from left, 1 - from right side)
  • 2 - (check in advance whether a line being inserted already exists in alias)
  • 4 - (print an error message)
  • 8 - (automatically create an alias if it doesn't exist yet)
alias_out<alias> <cvar> [<options>]

allows to search for or cut off the contents of <cvar> variable from <alias>. <options> is a bit mask which defines an action:

  • 1 - (cut off or just search the string, if set the only result of command is error message if the string is not found)
  • 2 - (do not print message if string not found)
cvar_in <cvar1> <cvar2> [<options>]

allows to insert contents of <cvar2> variable into an <cvar1>. <options> is a bit mask which defines an action:

  • 1 - (0 - insert from left, 1 - from right side)
  • 2 - (check in advance whether a line being inserted already exists in <cvar1>)
  • 4 - (print an error message)
  • 8 - (automatically create <cvar1> if it doesn't exist yet)

 

cvar_out <cvar1> <cvar2> [<options>]

allows to search for or cut off the contents of <cvar2> variable from <cvar1>. <options> is a bit mask which defines an action:

  • 1 - (cut or just search the string , if set the only result of command is error message if the string is not found)
  • 2 - (do not print message if string not found)

Constructing complex aliases

One can write multiline aliases. If the last character of the line is \ , then the next line is a continuation of that line. Don not forget that the maximum length of one interpreted line can not exceed 1024 charcters.

Sometimes it is necessary to use quotes inside quotes. For example when complex aliases create other aliases. Some variables are introduced to facilitate this process:

cl_substsinglequote

if not set to 0, all single quotation marks will be substituted by dual marks when alias is executed. Two single quotation marks in a row are substituted by one (if sustitution is permitted is permitted). Replacement of quotation marks takes place on execution of any command, if only a quotation mark is not located within the dual quotation marks. One should remember that during script parsing client accepts a string in double quotes as one parameter but removes these quotes.

cl_stringescape if not set to 0, a combination of \" within the dual quotation marks is substituted by " upon the command execution.
cl_curlybraces if not set to 0, symbols { and } can be used like \", and their nesting is correctly handled.

Examples:
// automessage for a location of a flag drop:
cl_substsinglequote 1
register v_flagdeath
v_flagdeath "say_team ENEMY FLAG: %d; alias f_death"
alias f_took "say_team I''ve got a flag!; alias f_death '@v_flagdeath'"

cl_substsinglequote 0
cl_stringescape 1
alias f_took "say_team I've got a flag!; alias f_death \"say_team ENEMY FLAG: %d; alias f_death\""

Note that both variants work slightly in different ways, so in the first case it is necessary to introduce one extra variable.

cl_curlybraces 1
if {%1} == {@name} {if @tmp = 1 {alias eee {say ok; say ok2}}\
else {say tmp is not 1}}

Conditional execution of commands

if <expr1> <op> <expr2>
[then] command1 [else command2]
surely familiar to everbody conditional operators if/then/else.

<expr1> and <expr2> - are lines or values to be compared
<op> - comparison operator:

  • == - equal,
  • = - equal,
  • != - not equal,
  • <> - not equal,
  • > - greater,
  • < - less,
  • >= - greater or equal,
  • <= - less or equal;

(== and =, != and <> mean the same, use the one which is looking nicer for you :) )

It is not necessary to use then, if command2 is used in your expression, else is required.

if_exists <type> <name>
<cmd1> [<cmd2>]

if an object <name> of a type <type> exists, a command <cmd1> will be issued, or a command <cmd2> if such object could not be found.
The type of the object can be either cvar, alias, trigger or hud.

Examples:

register v_reportdeath
v_reportdeath 1

alias f_death "if @v_reportdeath = 1 then say_team I am dead [%d]"

cl_substsinglequote 1
set _tz ";"
if_exists alias f_death "set_alias_str tmp f_death;alias f_death 'play dead.wav@_tz@tmp'" "alias f_death 'play dead.wav'"

Message macros

In case if a cl_parsesay variable equals 1, the macros are substituted is performed in commands say*, echo and set_ex (even inside double quotes).

macro substituted
%a armor
%t armor type (green, yellow, red)
%h health
%p powerup, if present :) (quad, 666, eyes)
%s shells amount

%n

nails amount
%r rockets amount
%c ñells amount
%l your current location on a map (a loaded loc-file is required).
%L prints your current position or position of your last death (if you have died less then 5 seconds ago).
%d last death location (a loaded loc-file is required)
@R red ocrana.pak "lamp"
@G green ocrana.pak "lamp"
@B blue ocrana.pak "lamp"
@Y yellow ocrana.pak "lamp"
@[ and @] colored brackets
@: end line
@\ "fake" message creation (it will contain no sender name and work only with say_team and say_to_team)

Symbols @ or $ are used in macros depending on cl_prefixchar.

cl_locmessage when set to 0 (1 by default), one can transmit to teammates his coordinates on a map. Macros %l, %d, %L produce a point coordinates rather than a message line from loc-file. These coordinates can be easily caught by yourself and put in a loc_coords2loc var x y z command, which using these coordinates will find a corresponding line in your loc-file and put it to var. If you are not happy with this method, simply set cl_coords2loc cvar to 1so that coordinates are converted to message lines automatically. This looks like as for example you get some coordinates by a say_team message: (Player): I'm at [1345 -567 776], and you see (Player): I'm at enemy FR in console.
cl_digits_format when set to 1 (0 by default), the %-macros will print standard numbers rather than yellow.
cl_nofake controls the "fake"-messages output. These messages contain a 0x0D symbol which allows to hide a sender name (exception is log). When set to 1, all fake-messages are prohibited, the 0x0D symbol is substituted with # and a message is shown as always with a sender name. When set to 2 (default), fake-messages are allowed in say_team, say_to_team messages only. 0 allows any fake-messages.

For the macros of ammunition quantities there are some slier versions avaliable: %c+130 - ammout of cells which you need to get 130; %c-130 - ammount of cells which you have over 130.

Examples:
say_team "@GI'm at position, clear (%a:%h)#def"
say_team "@RHelp to defend flag [%l]"
say_team "@REnemy flag dropped [%d]"
say_team "Need rockets, have only %r"
say_team "Need %c+130 cells to build/upgrade sentrygun!"
say_team "@\@RFULL DEFENCE!@R@:Really :)"
// for hunted and QW262 server
say_to_team red "@\PRESIDENT: Clean the respawn area!"

Ocrana pak

This pack modifies the font utilized in the console. Instead of 4 unused symbols with codes of 0x86-0x89, the bright, well noticeable "lamps" are used. They are handy to use for catching some very important game messages. However, it is not worthwhile to misuse them, the messages must be actually important to use them with "lamps".


loc-files support

Loc-files are lists of special marks on a map created for a player to be able to automatically report his/her locations to teammates. Two types of the loc-files are supported: proxy (as those used by qizmo, NF-proxy, etc.) and QW262 own format. The files of QW262 format are located in the loc directory, while proxy format loc-files remain in the locs directory, so there should be no confusion :). Limits for a quantity of loc-points are removed for both types of loc-formats.

Advantages and backdrops of various loc-file types:

proxy

wide-spread format. Looks like a list of points with coordinates (x,y,z) and a message sent by %l flag. Since a point is selected by a minimum distance criteria, there is a so called "point-behind-the-wall" problem when a message does not really match your actual position.

qw262 only QW262-supported. Represents a list of blocks-parallelepipeds :). The corresponding message is printed according to your presence in a definite block. Messages can be team-dependent, so that you can easily make messages like "our FR", "enemy FR". With the comparable degree of detail these locs have substantially smaller file-size, in comparison to that of proxy-locs.

Variables and commands referred to loc-files:

cl_loctype defines the default type of used loc-files. 0 - QW262 format (default), 1 - proxy format.
cl_loadlocs defines whether to load or not to load loc-files automatically upon the map change. 0 - not to load, 1 - try to load the default-type locs, 2 - try to load a loc of the other type in the case of failure.
cl_locnear QW262 loc type only command. If not set to 0 and a defined point doesn't match any block - a message of a nearest block is printed.
loadloc locfile loads a specific loc-file (addition of .loc extention is not neccessary).
loc_unload removes current loc-file from memory

Loc creation

The client has an ability to create loc-files (qw262 format only). Please note that currently there are two ways for setting message of loc-block: 1. using index in the "msg" table, 2. using direct "name" variant. Here are some commands to edit loc-files.

mark point Establishes one of the block apexes in the current position. If this already the second apex, then you are prompted for a message of this block. If you want to use an already utilized message, it is sufficient to input % and the number of this message.
mark point2 same as previous command, but accept message directly.
mark break cancels an erroneous first apex of a block.
mark remove cancels a whole block.
mark status prints a list of all messages.
mark list [start [len]] prints a list loc blocks
mark save saves a created loc-file in <gamedir>/loc/<mapname>.loc . Attention! The program overwrites an existing loc-file without prompting!
mark position prints your current coordinates.
mark center [x y] sets coordinates of a map center. When x and y are not defined, grabs your current position. You should use this command twice to mark two symmeric points and the center will be calculated automatically.
loc_selectblock n selects a block with number n. All coordinates and a message are printed in console. The block itself is highlighted in GL version. To cancel this selection use loc_selectblock -1.

loc_selectnearestblock selects a block nearest to the player's position.
loc_editblock param [value] If parameter equals to x1, y1, z1, x2, y2 or z2, the value is added to a corresponding coordinate of a selected block. When parameter is msg1 or msg2, the value defines a number of a corresponding message. When parameter is name, then block message is set directly. If value is not set in command then it requested from console.
loc_deleteblock [start [end]]

removes the indicated interval ob blocks (loc_point's) or currenly selected block if the interval is not given.

In short, a loc-file represents a sequence of special commands which upon loading of a map create appropriate data structures. Frankly speaking, loc-files of QW262 format are simply executed by the exec command, so it is possible for player to put inside loc-files some other commands.

loc_msg n msg creates message msg with a number of n
loc_point x1 y1 z1 x2 y2 z2
msg0 [msg1 [msg2 [msg3]]
creates a block. First 6 parameters define coordinates of the block. Next four define numbers of messages printed for this block (for teams 0, 1, 2 and 3). If parameters are not enough, the number of message of team 0 is utilized then.
loc_point x1 y1 z1 x2 y2 z2
"name"
Variant of the previous command where message is given directly.
loc_mirror (x|y|xy) [team1 team2] automatically adds blocks by means of symmetrical mirror reflection of already existing blocks according to specified axes. Meanwhile, messages for teams 0 or 1 (red or blue in TeamFortress) for mirrored blocks are conveniently exchanged. Note that the center of a map has to be previously defined by the mark_center command. In the case when block was created using the second variant of loc_point command, only blocks containing substring @team1 are reflected and this substring is replaced by @team2 for the reflected block.
loc_granularity set the detail level of loc-file (real coordinates are divided by this value, available range 1 - 64). Is set to 50 before loc-file loading is started for compatibility reasons. Required value should be set inside loc-file or in console before loc-file creation. . When loc_granularity is changed loc-file block and center coordinates are adjusted mark save command saves loc_granularity into loc file.

For symmetrical maps (such as most of TeamFortress maps, by the way) it is enough to mark a half (or even a quoter) of a map followed by duplicating it with the loc_mirror command. Example:
// keep2 :)
mark center 0 0
loc_point -61 44 2 -44 61 25 "@blue tower"
loc_mirror xy blue red
loc_mirror x blue yell
loc_mirror y blue green

A cvar expansion is performed in loc-file messages. This should allow to construct more universal loc-files. For example it is possible to set red, blue variables to "our", "enemy" or even to empty string to save message length.

Triggers

In case when cl_triggers variable is not set to 0, the client automatically executes following aliases (if they are defined):

f_mapstart upon connection to a server or map change.
f_mapend upon normal ending of a map.
f_respawn upon respawn.
f_death upon death.
f_took

upon taking a flag in TeamFortress. Attention! This feature doesn't work on some maps (there's some code introduced for this feature to work correctly on some broken maps (cl_f_took_hack variable , default 1): oppose1, dkeep2, warehau1, wareh1r.

f_drop upon death with a flag.
f_low_health if your health gets lower than a value defined by critical_health variable.
f_low_armor if your armor gets lower than a value defined by critical_armor variable.
f_flash activates in TeamFortress when hit by a flash grenade (old grens).
f_conc activates in TeamFortress when hit by a concussion grenade (old grens).
f_bonusflash

when grabbing something (e.g. backpacks, medkits, power-ups).

f_weapon_change activates upon weapon change (including reload in TeamFortress).
f_got_ammo when grabbing ammunition.
f_input_done when commands input, messagemode* are finished.

Example:
alias f_death say_team "@YI'm dead [%d]#def"

It is possible to create triggers reacting at userinfo change:

cl_setinfo_triggers one can put the names of variables (separated by spaces) which change shoul be detected into cl_setinfo_triggers variable. For example, in case of change of a variable "varname" during the game, an alias f_setinfo_varname will be activated and three parameters: new value of a "varname" variable, name of a player who changed it and his id. Such aliases are called setinfo triggers - they react automatically on some changes in the game. In TeamFortress triggers can not be activated for skin, topcolor and bottomcolor changes of enemy team's players.

Example:
cl_setinfo_triggers "rate"
alias f_setinfo_rate "if %2 > 5000 then say %1: your rate is set to %2. Decrease rate to 5000!"

regexp triggers

A new possibility is built-in to automatically carry out some actions (aliases) upon detecting a specific message in console or centerprint.

regexp defines which messages (or whatever) will activate a trigger. The client uses the PCRE library (Perl-compatible regular expression library). You can find information how to write regexps in the PCRE's documentation.

A trigger is activated as soon as a string defined in this regexp is detected. At the same time a part of this string (which caused activation of a trigger) is put into a @0 variable. Variable parts of regexp are put into @1, @2 ... @9 variables. After that an alias (which name coinsides with the a name of the trigger) is executed. Tricky, huh? ;)

Commands related to regexp triggers:

re_trigger [rt_name [regexp]] when used w/o parameter, prints a list of all triggers; when regexp is not defined prints options set for rt_name trigger; otherwise creates or changes rt_name trigger.

re_trigger_options rt_name option_list changes options for a corresponding trigger
re_trigger_delete rt_name deletes the corresponding trigger.
re_trigger_enable rt_name1 [rt_name2...] enables activation of one or more triggers.
re_trigger_disable rt_name1 [rt_name2...] disables activation of one or more triggers.
re_trigger_match <trigger_name> <string> allows to direct a <string> to a trigger <trigger_name>. If this string match regexp, then a corresponding alias is activated.

A re_trigger_options command has the following options:

mask value

value represents a bit mask which determines which types of messages can cause activation of a trigger:

  • 1 - pickup messages
  • 2 - death messages
  • 4 - critical messages (most of TeamFortress messages)
  • 8 - chat
  • 16 - centerprint
  • 32 - echo command output
  • 64 - other strings printed in the console

The default mask for any trigger equals 31.

interval value sets a minimal interval of trigger activation (in seconds). If a second activation happened earlier than the value time - it is ignored. Default is 0.
final if activation of this trigger happened, the remaining (in the list of triggers) triggers are not
checked. Triggers are checked in a reversed order of their definition.
notfinal activation of such trigger doesn't stop the checking of other triggers (default).
remove a string which caused activation of a trigger is not printed on the screen.

noremove

a string which caused activation of a trigger is printed on the screen (default).
nolog a string which caused activation of a trigger is not added to a log-file.
log a string which caused activation of a trigger is added to a log-file (default).
noaction

a corresponding alias is not executed upon a trigger activation. There is no need to exec alias if all you need is to use remove option :)

action a corresponding alias is executed upon a trigger activation (default).
enable allows activation of a trigger (default).
disable prohibits activation of a trigger.

In order to bring down possible cheating the list of commands avaliable in trigger-activated aliases was specially limited. It is allowed to use triggers for launching config files, cvar operatons, alias execution and the following commands:

play playvol stopsound say say_team say_id sayid say_to_team echo alias unalias re_trigger re_trigger_options re_trigger_delete re_trigger_enable re_trigger_disable re_trigger_match hud_add hud_position hud_width hud_remove hud_bg hud_enable hud_disable hud_move hud_bringtofront bind record stop register unregister set (and all its variants) inc toggle rcon users user if/then/else if_exists exec

While in TeamFortress you are permitted to use also an impulse command with following parameters: 23(flaginfo), 99(changeclass), 101-109(changeclass commands), 135(inv), 144 (showclasses), 145(showscores).

Examples:
// Setting detpack
re_trigger dp "^Setting detpack for (.+) seconds"
re_trigger_options dp final remove mask 4
alias dp "say_team Detpack for @1 seconds at %l"

// removes spam from inv command output
re_trigger inv_spam "(^You\Dre in team|\w+ armor|^Skin \:|^Colors \:|^Scanner|^$)"
re_trigger_options inv_spam final remove nolog mask 4 noaction

// result of id command is put into @last_id_nick cvar
register last_id_nick
re_trigger postid "(?m)\n\n\n\n(.+)\n(Friendly)"
re_trigger_options postid final mask 16
alias postid "last_id_nick @1"

Important note!
Triggers would not work for debugging messages like snd_show 1. In Team Fortress triggers would not work for commands showloc and id (of enemy), and for message of your dispencer being used by enemies.

Commands alias, unalias, viewalias, cmdlist, cvarlist, unregister, hud_list, re_trigger, re_trigger_enable, re_trigger_disable, re_trigger_delete, hud_enable, hud_disable, hud_move, hud_bg hud_width and hud_remove understand regexps as parameters. Corresponding operation will work on objects that have name matching the regexp. Example:
//list of variables starting with vid_
cvarlist "^vid_"
//removing all variables ending with _test
unregister "_test$"
//list of aliases containing gren1 or gren2 in name
alias "gren(1|2)"

Customizable hud

A user now can easily configure on-screen info he or she wants to be displayed during the gameplay. Hud consists of separate elements any of which can be independently dispatched in any position of the screen .

Hud commands are:

cl_hud when set to 0 (1 by default), all huds won't be shown.
hud_add hud_name type param

creates or changes a hud element with hud_name; the following types of hud elements are avaliable:
cvar a value of a variable is displayed; in this case param must be a name of this variable.
str a string defined by param is displayed; Cvar and %macros expansion is performed every time element is shown
std

one of the standard hud elements is displayed; in this case param can be:

  • fps - fps counter
  • lag - lag meter
  • clock - watches
  • speed - speed meter (don't drink and drive afterwards! :)
hud_add with a a name of already existing element does not make it visible if it was disabled before with a command hud_disable.

hud_position hud_name pos x y indicates position of a hud element on the screen; pos defines a position of a screen point, starting from that the x and y deviations (measured in symbols) are counted:
  1. upper left corner
  2. upper rightcorner
  3. lower right corner
  4. lower left corner
  5. upper central position
  6. lower central position.
hud_width hud_name width forces a hud element width and cuts undesired space or adds it when needed. The range of width is 0-128, the value 0 (default) cancels the width forcing.
hud_bg hud_name bg_color defines a color of the hud element backgdround; 0 - transparent (default).
hud_move hud_name dx dy moves a hud element; dx and dy deviations are measured in symbols.
hud_enable hud_name [hud_name2...] allows to display one or more hud elements.
hud_disable hud_name [hud_name2...] prohibits to display one or more hud elements.
hud_remove hud_name kills a hud element.
hud_list prints a list of hud elements.
input cvar x y len [bg] allows to input text into cvar variable. x and y give the position of input field relative to upper left corner. len set the length of input field. bg sets the background (default 0 - transparent). Upon the end of data input ( ENTER or ESC are pressed) f_input_done trigger is called.

Examples:

// fps counter in lower right corner like show_fps 1
hud_add fps std fps
hud_position fps 3 0 0

// class cvar above lower left corner
hud_add class cvar class
hud_position class 4 0 3

// mapname and time at the lower central position
hud_add test str "@mapname-@time"
hud_position test 6 0 0

// turning huds on and off
alias +scores "cl_hud 0;+showscores"
alias -scores "cl_hud 1;-showscores"
bind TAB +scores

QW262

While playing on a QW262 server clients gain some extra abilities:

say_id (id | uid) text send a message to the player with indicated id or uid.
sayid text send a message to one special player (his id or uid need to be preliminarily put into uid variable).
messagemode3 allows you to input a message in the console and sends it via sayid.
say_to_team team text send a message to an indicated team. Handy on HUNTED or BORDER TF maps.

Example:

uid lamer
sayid "You are LAME!"
// hunted
say_to_team red "Please remove sniper near respawn"

What is different in QW262 lite server from standard qwsv 2.30

QW262 server for Win32 automatically sets itself as a high priority task (HIGH_PRIORITY_CLASS). This is necessary for avoiding high PL when playing on localhost under Windows9x. If you desire to turn this feature off, launch the server with -nopriority command-line parameter. By the way, the reason for high ping (when QW2.30 server is running under Windows9x) was eliminated. Server uses 32 Megabytes of memory by default.

In order to reduce network traffic server performs message filtering, according to filter variables set by players in userinfo.

Server includes support for TeamFortress flash grenade that can not be disabled by cheaters. If TeamFortress QuakeC code is modified accordingly then flashed client won't get entities updates from server, so players and other objects will dissapear for some time :)

Server has several catgories of rcon. Those who have ordinary rcon_password can not change several server settings (serverinfo, localinfo, gamedir), use rcon say and turn off rcon logging. Administrator password that allows to use any commands is set by master_password command. This command is accepted only from server.cfg

sys_sleep win32 version only. Time interval (in milliseconds) during which a server sleeps each tick allowing other programts to execute. It's better if you don't manipulate this parameter without full understanding of it :) (default 8 for Win9x and 0 for NT4/Win2000/WinXP).
rcon kick when somebody is kicked from server - all remaining players will get a message with a name of a kicker :)
sv_nailhack when set to 1, changes the nails data compression algorithm which decreases network traffic. 0 by default.
sv_maxrate client rate higher than indicated is not allowed. When a client's rate gets exceeded, it is forced down to sv_maxrate. Default is 10000. Maximum value: 15000.
sv_loadentfiles If set to 1, during map loading server first tries to load entities from file mapname.ent in the maps directory. If the file does not exist entities are taken from mapname.bsp (default 0).
sv_announcercon If set to 1, server announce in console every rcon command (default 0).
pm_jumpfix if set to 1, turns on jump prediction fix that allows better bunnyhopping. However it slightly changes physics (default 0).
pm_bunnyspeedcap limits the speed that can be gained using bunnyhopping. It is a coefficient to the maximum allowed speed. So soldier in Teamfortress (speed 240) with pm_bunnyspeedcap 1.5 can not bunnyhop faster than 240*1.5=360. This limitation does not affect grenade and rocket-jumps. Default - 0 (no limitation).
logfile Really writes log :)
logerrors Special log file is created (<gamedir>/qerror.log), that will contain error messages printed just before server crash. This log can be disabled using the same command for the second time.
logrcon Special log file is created (<gamedir>/rcon.log), that contains all rcon usage info (including IP and nick of the rconer). This log can be disabled using the same command for the second time.
admin Player that have sent this commad will be informed about rcon usage. This mode is disabled using admin off command.

Server-side demos support (Multi View Demos: MVD)

It is possible to write server-side demo. It contain all players actions. Attention: maximum number of entities tha coul be written into MVD demo is increased up to 300 (QW Extended aka mvdsv - 196). Some TF-maps have a lot of entities and some of them simply are not recorded in the demo. If some demo really contain more than 196 entities, it will be played correctly only by QW262 client.

record demoname Starts demo recording on server with name demoname. Demo is written to <quake_dir>/<gamedir>/demos directory. serverinfo shows variable serverdemo with the value demoname during demo recording.
stop Stops demo recording. It is also stopped automatically at the end of the current map.
demolist List all demos that exist on server with their size and informs about available free space.
rmdemo demoname
rmdemo *token
rmdemo *

Removes demos from server: particular, with demoname name,
all, containing token in name,
all.

rmdemon n Remove demo from server by number.
sv_demofps fps for the demo recording. Default - 20 (it is enough as interpolation is made during MVD demo playback).
sv_demopings Interval in seconds for writing player's pings into demo. Default - 3.
sv_demomaxsize Maximum allowed demo size in Kilobytes. Default - 20480 (enough for 45 minutes 6x6 TF match).
sv_demomaxdirsize Maximum allowed size of demos directory in Kilobytes. Default - 204800.
sv_demonovis if set to 1 (default) demo will contain all entities, even that are not visible to any live player.
sv_demouseñache if set to 1, demo is written through a buffer in memory (default - 0).
-democache size command line parameter setting the size of buffer for demo recording in Kilobytes.
sv_demoñachesize (read-only) shows the size of demo recording buffer.

Differences of the full version of server

QW262 server in full version works on the changed protocol. Sources of the protocol are closed, so only a QW262 full version clients can connect to such server. All proxies with built-in cheats are also out of the game. By default the client is working on a QW 2.30 compatible protocol. To connect a QW262 full server one has to use a version command in the console or launch the client with a -ver262 command line parameter.

QW262 full version server has an ability to check players' models and skins to prevent them from cheating. Clients with wrong models and skins are disconnected. Here are corresponding server commands:

allow_old_clients when set to 1 (0 by default), allows protocol 2.30 connections to a 262full server.
addskin skin adds a skin.pcx to the list of skins to check. Up to 20 different skins can be checked
addmodel model adds a model.mdl to the list of skins to check. Up to 20 different models can be checked
removeskins

cleans the list of skins to check.

removemodels cleans the list of models to check.

It is possible to automatically make a screenshot and download it from any client to check him for cheating.

Who wrote all this madness?! ;)

Original sources (c) Id software
Coding of following people was used:
-=MD=- (Alexander Pouchkov),
Tonik (Anton Gavrilov, tonik@vipmail.ru, ZQuake),
HighlandeR (Bartlomiej Rychtarski , highlander@gracz.net, QW Extended),
Sergio (k_sergio@nm.ru)
5AT0H (5AT0H@aport.ru)
don (don@sztaki.hu, surmoclient)
Vic (Victor Luchits, vic@captured.com)
fuh (A. Nourai, fuhquake@hotmail.com, FuhQuake.
Azazello , MQWCL

Currently, QW262 is being developed by [2WP]BorisU
(Boris Usievich, borisu@newmail.ru).

WAZZUP??

To download the most fresh version, complain about bugs, grab some scripts and ask for implementation of new features - proceed to QW262 homepage.

Partial manual translation by Bruttoid aka Baxta (brutt01d@by.ru).
"This manual could be translated to english only with help of Grazer Spatzen music :))"

Documentation is last updated 29.12.2002 10:16 PM