Sophie

Sophie

distrib > Mageia > 5 > i586 > media > nonfree-release > by-pkgid > 234bb69de9d5b584208353fcd4d08734 > files > 6807

sauerbraten-data-2013_02_03-4.mga5.nonfree.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>Cube 2: Sauerbraten - Configuration</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<link rel="shortcut icon" href="favicon.ico" />
</head>

<body>

<h1>Cube 2: Sauerbraten - Configuration</h1>

<div class="contents">
<ul class="contents">
<li>
<a href="#before_you_start"><b>Before You Start</b></a>
</li>
<li>
<a href="#running_cube2"><b>Running Cube 2</b></a>
</li>
<li>
<a href="#command_line_options"><b>Command Line Options</b></a>
<ul class="contents2">
<li>
<a href="#_minus_d"><tt>-d</tt></a>
</li>
<li>
<a href="#_minus_dn"><tt>-dn</tt></a>
</li>
<li>
<a href="#_minus_wn"><tt>-wN</tt></a>
</li>
<li>
<a href="#_minus_hn"><tt>-hN</tt></a>
</li>
<li>
<a href="#_minus_bn"><tt>-bN</tt></a>
</li>
<li>
<a href="#_minus_zn"><tt>-zN</tt></a>
</li>
<li>
<a href="#_minus_an"><tt>-aN</tt></a>
</li>
<li>
<a href="#_minus_vn"><tt>-vN</tt></a>
</li>
<li>
<a href="#_minus_sn"><tt>-sN</tt></a>
</li>
<li>
<a href="#_minus_t"><tt>-t</tt></a>
</li>
<li>
<a href="#_minus_f"><tt>-f</tt></a>
</li>
<li>
<a href="#_minus_fn"><tt>-fN</tt></a>
</li>
<li>
<a href="#_minus_qs"><tt>-qS</tt></a>
</li>
<li>
<a href="#_minus_ks"><tt>-kS</tt></a>
</li>
<li>
<a href="#_minus_gn"><tt>-gN</tt></a>
</li>
<li>
<a href="#_minus_ls"><tt>-lS</tt></a>
</li>
<li>
<a href="#_minus_xs"><tt>-xS</tt></a>
</li>
<li>
<a href="#_minus_un"><tt>-uN</tt></a>
</li>
<li>
<a href="#_minus_nn"><tt>-nN</tt></a>
</li>
<li>
<a href="#_minus_cn"><tt>-cN</tt></a>
</li>
<li>
<a href="#_minus_is"><tt>-iS</tt></a>
</li>
<li>
<a href="#_minus_jn"><tt>-jN</tt></a>
</li>
<li>
<a href="#_minus_ms"><tt>-mS</tt></a>
</li>
<li>
<a href="#_minus_ps"><tt>-pS</tt></a>
</li>
<li>
<a href="#_minus_ys"><tt>-yS</tt></a>
</li>
<li>
<a href="#_minus_on"><tt>-oN</tt></a>
</li>
</ul>
</li>
<li>
<a href="#console_commands"><b>Console Commands</b></a>
<ul class="contents2">
<li>
<a href="#bind"><tt>bind</tt></a>
</li>
<li>
<a href="#editbind"><tt>editbind</tt></a>
</li>
<li>
<a href="#alias"><tt>alias</tt></a>
</li>
<li>
<a href="#push"><tt>push</tt></a>
</li>
<li>
<a href="#local"><tt>local</tt></a>
</li>
<li>
<a href="#quit"><tt>quit</tt></a>
</li>
<li>
<a href="#forward"><tt>forward</tt></a>
</li>
<li>
<a href="#backward"><tt>backward</tt></a>
</li>
<li>
<a href="#left"><tt>left</tt></a>
</li>
<li>
<a href="#right"><tt>right</tt></a>
</li>
<li>
<a href="#attack"><tt>attack</tt></a>
</li>
<li>
<a href="#jump"><tt>jump</tt></a>
</li>
<li>
<a href="#zoom"><tt>zoom</tt></a>
</li>
<li>
<a href="#taunt"><tt>taunt</tt></a>
</li>
<li>
<a href="#floatspeed"><tt>floatspeed</tt></a>
</li>
<li>
<a href="#invmouse"><tt>invmouse</tt></a>
</li>
<li>
<a href="#sensitivity"><tt>sensitivity</tt></a>
</li>
<li>
<a href="#sensitivityscale"><tt>sensitivityscale</tt></a>
</li>
<li>
<a href="#maxfps"><tt>maxfps</tt></a>
</li>
<li>
<a href="#fov"><tt>fov</tt></a>
</li>
<li>
<a href="#zoomfov"><tt>zoomfov</tt></a>
</li>
<li>
<a href="#zoominvel"><tt>zoominvel</tt></a>
</li>
<li>
<a href="#zoomoutvel"><tt>zoomoutvel</tt></a>
</li>
<li>
<a href="#zoomsens"><tt>zoomsens</tt></a>
</li>
<li>
<a href="#zoomautosens"><tt>zoomautosens</tt></a>
</li>
<li>
<a href="#hudgun"><tt>hudgun</tt></a>
</li>
<li>
<a href="#hudgunsway"><tt>hudgunsway</tt></a>
</li>
<li>
<a href="#grass"><tt>grass</tt></a>
</li>
<li>
<a href="#grassdist"><tt>grassdist</tt></a>
</li>
<li>
<a href="#grassstep"><tt>grassstep</tt></a>
</li>
<li>
<a href="#shaderdetail"><tt>shaderdetail</tt></a>
</li>
<li>
<a href="#maxtexsize"><tt>maxtexsize</tt></a>
</li>
<li>
<a href="#texcompress"><tt>texcompress</tt></a>
</li>
<li>
<a href="#watersubdiv"><tt>watersubdiv</tt></a>
</li>
<li>
<a href="#waterlod"><tt>waterlod</tt></a>
</li>
<li>
<a href="#waterreflect"><tt>waterreflect</tt></a>
</li>
<li>
<a href="#waterenvmap"><tt>waterenvmap</tt></a>
</li>
<li>
<a href="#waterrefract"><tt>waterrefract</tt></a>
</li>
<li>
<a href="#waterfade"><tt>waterfade</tt></a>
</li>
<li>
<a href="#waterfallrefract"><tt>waterfallrefract</tt></a>
</li>
<li>
<a href="#waterfallenv"><tt>waterfallenv</tt></a>
</li>
<li>
<a href="#reflectdist"><tt>reflectdist</tt></a>
</li>
<li>
<a href="#reflectsize"><tt>reflectsize</tt></a>
</li>
<li>
<a href="#maxreflect"><tt>maxreflect</tt></a>
</li>
<li>
<a href="#reflectmms"><tt>reflectmms</tt></a>
</li>
<li>
<a href="#envmapsize"><tt>envmapsize</tt></a>
</li>
<li>
<a href="#maxparticledistance"><tt>maxparticledistance</tt></a>
</li>
<li>
<a href="#particlesize"><tt>particlesize</tt></a>
</li>
<li>
<a href="#emitfps"><tt>emitfps</tt></a>
</li>
<li>
<a href="#flarelights"><tt>flarelights</tt></a>
</li>
<li>
<a href="#flarecutoff"><tt>flarecutoff</tt></a>
</li>
<li>
<a href="#flaresize"><tt>flaresize</tt></a>
</li>
<li>
<a href="#setpostfx"><tt>setpostfx</tt></a>
</li>
<li>
<a href="#screenshot"><tt>screenshot</tt></a>
</li>
<li>
<a href="#musicvol"><tt>musicvol</tt></a>
</li>
<li>
<a href="#soundvol"><tt>soundvol</tt></a>
</li>
<li>
<a href="#soundbufferlen"><tt>soundbufferlen</tt></a>
</li>
<li>
<a href="#scr_w"><tt>scr_w</tt></a>
</li>
<li>
<a href="#scr_h"><tt>scr_h</tt></a>
</li>
<li>
<a href="#screenres"><tt>screenres</tt></a>
</li>
<li>
<a href="#gamma"><tt>gamma</tt></a>
</li>
<li>
<a href="#hidestats"><tt>hidestats</tt></a>
</li>
<li>
<a href="#hidehud"><tt>hidehud</tt></a>
</li>
<li>
<a href="#maxroll"><tt>maxroll</tt></a>
</li>
<li>
<a href="#crosshairsize"><tt>crosshairsize</tt></a>
</li>
<li>
<a href="#crosshairfx"><tt>crosshairfx</tt></a>
</li>
<li>
<a href="#exec"><tt>exec</tt></a>
</li>
<li>
<a href="#history"><tt>history</tt></a>
</li>
<li>
<a href="#keymap"><tt>keymap</tt></a>
</li>
</ul>
</li>
<li>
<a href="#gui_commands"><b>GUI Commands</b></a>
<ul class="contents2">
<li>
<a href="#gui2d"><tt>gui2d</tt></a>
</li>
<li>
<a href="#menudistance"><tt>menudistance</tt></a>
</li>
<li>
<a href="#menuautoclose"><tt>menuautoclose</tt></a>
</li>
<li>
<a href="#guiautotab"><tt>guiautotab</tt></a>
</li>
<li>
<a href="#cleargui"><tt>cleargui</tt></a>
</li>
<li>
<a href="#showgui"><tt>showgui</tt></a>
</li>
<li>
<a href="#newgui"><tt>newgui</tt></a>
</li>
<li>
<a href="#guilist"><tt>guilist</tt></a>
</li>
<li>
<a href="#guispring"><tt>guispring</tt></a>
</li>
<li>
<a href="#guititle"><tt>guititle</tt></a>
</li>
<li>
<a href="#guibutton"><tt>guibutton</tt></a>
</li>
<li>
<a href="#guiimage"><tt>guiimage</tt></a>
</li>
<li>
<a href="#guitext"><tt>guitext</tt></a>
</li>
<li>
<a href="#guitextbox"><tt>guitextbox</tt></a>
</li>
<li>
<a href="#guibar"><tt>guibar</tt></a>
</li>
<li>
<a href="#guislider"><tt>guislider</tt></a>
</li>
<li>
<a href="#guicheckbox"><tt>guicheckbox</tt></a>
</li>
<li>
<a href="#guiradio"><tt>guiradio</tt></a>
</li>
<li>
<a href="#guitab"><tt>guitab</tt></a>
</li>
<li>
<a href="#guifield"><tt>guifield</tt></a>
</li>
</ul>
</li>

<li>
<a href="#server_commands"><b>Server Configuration Commands</b></a>
<ul class="contents2">
<li>
<a href="#startlistenserver"><tt>startlistenserver</tt></a>
</li>
<li>
<a href="#stoplistenserver"><tt>stoplistenserver</tt></a>
</li>
<li>
<a href="#serverip"><tt>serverip</tt></a>
</li>
<li>
<a href="#serverport"><tt>serverport</tt></a>
</li>
<li>
<a href="#maxclients"><tt>maxclients</tt></a>
</li>
<li>
<a href="#serverbotlimit"><tt>serverbotlimit</tt></a>
</li>
<li>
<a href="#publicserver"><tt>publicserver</tt></a>
</li>
<li>
<a href="#serverdesc"><tt>serverdesc</tt></a>
</li>
<li>
<a href="#serverpass"><tt>serverpass</tt></a>
</li>
<li>
<a href="#adminpass"><tt>adminpass</tt></a>
</li>
<li>
<a href="#servermotd"><tt>servermotd</tt></a>
</li>
<li>
<a href="#updatemaster"><tt>updatemaster</tt></a>
</li>
<li>
<a href="#mastername"><tt>mastername</tt></a>
</li>
<li>
<a href="#restrictdemos"><tt>restrictdemos</tt></a>
</li>
<li>
<a href="#maxdemos"><tt>maxdemos</tt></a>
</li>
<li>
<a href="#maxdemosize"><tt>maxdemosize</tt></a>
</li>
<li>
<a href="#ctftkpenalty"><tt>ctftkpenalty</tt></a>
</li>
</ul>
</li>

<li>
<a href="#cubescript"><b>CubeScript</b></a>
<ul class="contents2">
<li>
<a href="#_plus_"><tt>+</tt></a>
</li>
<li>
<a href="#_minus_"><tt>-</tt></a>
</li>
<li>
<a href="#_asterisk_"><tt>*</tt></a>
</li>
<li>
<a href="#div"><tt>div</tt></a>
</li>
<li>
<a href="#mod"><tt>mod</tt></a>
</li>
<li>
<a href="#_equals_"><tt>=</tt></a>
</li>
<li>
<a href="#_lt_"><tt>&lt;</tt></a>
</li>
<li>
<a href="#_gt_"><tt>&gt;</tt></a>
</li>
<li>
<a href="#strcmp"><tt>strcmp</tt></a>
</li>
<li>
<a href="#_exclaim_"><tt>!</tt></a>
</li>
<li>
<a href="#_amp_amp_"><tt>&amp;&amp;</tt></a>
</li>
<li>
<a href="#_pipe_pipe_"><tt>||</tt></a>
</li>
<li>
<a href="#_caret_"><tt>^</tt></a>
</li>
<li>
<a href="#strstr"><tt>strstr</tt></a>
</li>
<li>
<a href="#substr"><tt>substr</tt></a>
</li>
<li>
<a href="#strreplace"><tt>strreplace</tt></a>
</li>
<li>
<a href="#strlen"><tt>strlen</tt></a>
</li>
<li>
<a href="#min"><tt>min</tt></a>
</li>
<li>
<a href="#max"><tt>max</tt></a>
</li>
<li>
<a href="#rnd"><tt>rnd</tt></a>
</li>
<li>
<a href="#if"><tt>if</tt></a>
</li>
<li>
<a href="#loop"><tt>loop</tt></a>
</li>
<li>
<a href="#while"><tt>while</tt></a>
</li>
<li>
<a href="#concat"><tt>concat</tt></a>
</li>
<li>
<a href="#concatword"><tt>concatword</tt></a>
</li>
<li>
<a href="#format"><tt>format</tt></a>
</li>
<li>
<a href="#at"><tt>at</tt></a>
</li>
<li>
<a href="#listlen"><tt>listlen</tt></a>
</li>
<li>
<a href="#listclients"><tt>listclients</tt></a>
</li>
<li>
<a href="#onrelease"><tt>onrelease</tt></a>
</li>
<li>
<a href="#result"><tt>result</tt></a>
</li>
</ul>
</li>

<li>
<a href="#variables"><b>Useful Variables</b></a>
<ul class="contents2">
<li>
<a href="#_editing"><tt>$editing</tt></a>
</li>
<li>
<a href="#getalias"><tt>getalias</tt></a>
</li>
<li>
<a href="#getbind"><tt>getbind</tt></a>
</li>
<li>
<a href="#geteditbind"><tt>geteditbind</tt></a>
</li>
<li>
<a href="#getspecbind"><tt>getspecbind</tt></a>
</li>
<li>
<a href="#getclientnum"><tt>getclientnum</tt></a>
</li>
<li>
<a href="#getclientname"><tt>getclientname</tt></a>
</li>
<li>
<a href="#getclientteam"><tt>getclientteam</tt></a>
</li>
<li>
<a href="#getname"><tt>getname</tt></a>
</li>
<li>
<a href="#getteam"><tt>getteam</tt></a>
</li>
<li>
<a href="#getweapon"><tt>getweapon</tt></a>
</li>
<li>
<a href="#getfps"><tt>getfps</tt></a>
</li>
<li>
<a href="#gettex"><tt>gettex</tt></a>
</li>
<li>
<a href="#gettexname"><tt>gettexname</tt></a>
</li>
<li>
<a href="#isconnected"><tt>isconnected</tt></a>
</li>
<li>
<a href="#isspectator"><tt>isspectator</tt></a>
</li>
</ul>
</li>
</ul>
</div>

<h2 id="before_you_start">Before You Start</h2>

<p>
Take some time to read the rest of this document, as it describes options and commands that may be crucial to a successful
experience with <i>Cube 2: Sauerbraten</i>.
</p>

<p>
Binding keys, as well as performance and gameplay related settings are documented below, these commands can be used in
both the console and configuration scripts. In addition, you can also press "ESC" to go into the menu, which will provide
you with an interface for navigating some (not all) of the commands.
</p>

<h2 id="running_cube2">Running Cube 2</h2>

<ul>
<li>For Windows: Install and then run sauerbraten.bat or select the entry from the Start menu.</li>
<li>For Linux: Extract and then run <i>./sauerbraten_unix</i> inside the <i>sauerbraten</i> directory. Needs a decent and compliant OpenGL implementation.</li>
</ul>

<p>
The game and engine derives its simplicity from some rather brute force rendering methods, and as such it needs 
a beefy machine to get good visual quality. It runs best with vertical sync (vsync) set to OFF and at high
refresh rates (otherwise, you may get excessive LOD/FPS variance).
</p>

<h2 id="command_line_options">Command Line Options</h2>

<pre id="_minus_d">-d</pre>
<p>
This starts as a dedicated server. The default is a non-dedicated server with only a single client in graphical
mode. Dedicated servers run in the shell only (no graphics), with increased priority yet use very little cpu time and memory,
so you can run one in the background, or at the same time with a client if you want to host a game (which is usually better 
than using a listen server). Servers use the ports 28785 (UDP) and 28786 (UDP).
</p>

<pre id="_minus_dN">-dN</pre>
<p>
If N=1, starts a listen server which allows it to simultaneously function as both a client and server. Note that a listen
server is limited by your in-game frame rate, so you should use a dedicated server if your graphics card is slow or you
have enabled frame rate limiting options such as "vsync". If N=2, it starts a dedicated server as for the "-d" command-line option.
</p>

<pre id="_minus_wn">-wN</pre>
<p>
Sets the screen resolution width to N (default: 640).
</p>

<pre id="_minus_hn">-hN</pre>
<p>
Sets the screen resolution height to N (default: 480).
</p>

<pre id="_minus_bn">-bN</pre>
<p>
Sets the screen depth to N bits per pixel.
</p>

<pre id="_minus_zn">-zN</pre>
<p>
Sets the z-buffer precision to N bits. This should be at least 24 or you may experience depth problems.
</p>

<pre id="_minus_an">-aN</pre>
<p>
Sets FSAA (Full Scene AntiAliasing) to N samples, i.e. -a4 is 4xFSAA
</p>

<pre id="_minus_vn">-vN</pre>
<p>
Sets v-sync to N (N=1 to enable or N=0 to disable).
</p>

<pre id="_minus_sn">-sN</pre>
<p>
Sets stencil buffer bits to N (N>=1 to enable or N=0 to disable).
</p> 

<pre id="_minus_t">-t</pre>
<p>
Sets Sauerbaten to run windowed.
</p>

<pre id="_minus_f">-f</pre>
<pre id="_minus_fn">-fN</pre>
<p>
When used alone, "-f" forces the renderpath to the old fixed function pipeline (no shaders), otherwise it sets the shader precision
to N (lower = faster). 0 disables shaders, 1 uses the fastest/lowest precision the OpenGL driver offers (default), 2 uses the OpenGL driver's defaults,
and 3 is the nicest/slowest precision. The effects of 1-3 will vary with different card/driver combos. However, 2 and 3 should be avoided
unless you are experiencing trouble with the defaults, as they will only slow rendering down. 4 forces the engine to use the GLSL-only renderpath,
which, depending on driver support, may run better or worse than the assembly shader path enabled by options 1-3; only use if the assembly shader
paths are not working for your card, and you are reasonably certain the GLSL support is better.
</p>

<pre id="_minus_qs">-qS</pre>
<p>
Sets S to your home directory. If set, the engine will look for files in your home directory as well as
the normal installation directory. However, all files will be written to your home directory, instead of the
normal installation directory.
</p>

<pre id="_minus_ks">-kS</pre>
<p>
Adds the mod directory S to the list of directories the engine will search in for files. Directories will
be searched in the order listed on the command-line, and if not found, the engine looks in the installation
directory.
</p>

<pre id="_minus_gn">-gS</pre>
<p>
Sets the log file to S. All console output is written to the log file.
</p>

<pre id="_minus_ls">-lS</pre>
<p>
Loads map S on startup.
</p>

<pre id="_minus_xs">-xS</pre>
<p>
Executes the script commands S on startup, note that this is done <i>before the map loads</i>, so if you wish them to
be executed later, you should enclose them in a <i>sleep</i> statement. Example: <tt>-x"sleep 1000 [ connect localhost ]"</tt>
</p>

<pre id="_minus_un">-uN</pre>
<p>
Sets the server upstream bandwidth to N bytes per second. Only set this parameter if you know what you are doing,
specifying a wrong value is worse than not specifying it at all.
</p>

<pre id="_minus_nn">-nN</pre>
<p>
Sets the server description, for people pinging the server. usually does not need to be set if you have a descriptive
domain name already, but if you set it, keep it short as it may otherwise be truncated (example: -n"Bobs Instagib Server").
</p>

<pre id="_minus_cn">-cN</pre>
<p>
Sets the max number of clients to N. The default is 4. If you want to set it higher, be aware that bandwidth usage almost
doubles with each extra client, so only do this if the server runs on a serious pipe (not your home DSL or Cable connection).
</p>

<pre id="_minus_is">-iS</pre>
<p>
Sets the server ip to S. This option is only useful for people running on machines with multiple network interfaces.
</p>

<pre id="_minus_jn">-jN</pre>
<p>
Sets the server port to N. This option is only useful for people running on machines with multiple network interfaces. Note that both UDP ports N (game traffic) and N+1 (pings) must be available for this to work. If not specified, the default ports used are 28785 and 28786. Regardless of what ports are set, port 28784 must be available for pinging servers over a LAN to work.
</p>

<pre id="_minus_ms">-mS</pre>
<p>
Sets the master server to use for either server (registering) and client (updating) to S. (default: sauerbraten.org).
</p>

<pre id="_minus_ps">-pS</pre>
<p>
Sets the server's administrative password to S.
</p>

<pre id="_minus_ys">-yS</pre>
<p>
Locks the server so that password S must be provided to connect to it.
</p>

<pre id="_minus_on">-oN</pre>
<p>
Sets the openness of the server to N. N=1 disables mastermodes 2 (locked) and 3 (private), while N=0 (default) enables all mastermodes.  
</p>

<h2 id="console_commands">Console Commands</h2>

<pre id="bind">bind K A</pre>
<pre id="editbind">editbind K A</pre>
<p>
Binds key K to commands A (see console language below for what you can put in A). To find out what key names and their default
bindings are, look at data/keymap.cfg, then add bind commands to your autoexec.cfg. Editbind works much the same way, except
now the key is only available in edit mode (if no editbind is defined for a certain key, it will use the normal binding).
</p>

<pre id="alias">alias N A</pre>
<p>
Binds name N to commands A, after which you can use N as a shortcut for A. You 
may re-bind N as often as you like, call it recursively etc. You may use N = A as a shortcut for alias.
</p>

<pre id="push">push N A B</pre>
<p>
Pushes the old value of name N onto its stack, and then aliases N to A, and executes B, after which the old value of N is restored from the stack.
</p>

<pre id="local">local N1 [N2...]</pre>
<p>
Makes the supplied variables local variables, such that their old values are saved onto the stack and restored at the end of the current block. They are initialized to null.
</p>

<pre id="quit">quit</pre>
<p>
Quits without asking.
</p>

<pre id="forward">forward</pre>
<pre id="backward">backward</pre>
<pre id="left">left</pre>
<pre id="right">right</pre>
<p>
Move you in said direction (default key: up down left right, w s a d).
</p>

<pre id="attack">attack</pre>
<p>
Fires the current weapon (default key: left mouse).
</p>

<pre id="jump">jump</pre>
<p>
Triggers a jump (default key: space, right mouse).
</p>

<pre id="zoom">zoom N</pre>
<p>
Zooms in if N is -1, zooms out if N is 1, and turns off zoom if N is 0.
</p>

<pre id="taunt">taunt</pre>
<p>
Plays your player model's taunt animation.
</p>

<pre id="floatspeed">floatspeed N</pre>
<p>
Sets the speed at which your character floats in edit mode or spectator mode (default: 100).
</p>

<pre id="invmouse">invmouse B</pre>
<p>
Toggles mouse between regular and inverted (flight sim) mode (default: 0 (uninverted)).
</p>

<pre id="sensitivity">sensitivity S</pre>
<p>
Sets mouse sensitivity (default: 3). The feel of which should be a similar number to Quake.
</p>

<pre id="sensitivityscale">sensitivityscale S</pre>
<p>
Scales the effect of an increase or decrease in the sensitivity value. The larger the value, the smaller the difference
between sensitivity values (default: 1).
</p>

<pre id="maxfps">maxfps N</pre>
<p>
Sets the max number of FPS (Frames per Second). Useful if you have a recent machine that can run the engine at close to 1000FPS,
or if you want to test. If you set maxfps to exactly or a simple ratio of your monitor's refresh rate, you may experience tearing.
Be aware that maxfps is not a replacement for vsync (default: 200).
</p>

<pre id="fov">fov N</pre>
<p>
Sets your FOV to 10..150.
</p>

<pre id="zoomfov">zoomfov N</pre>
<p>
Sets your zoomed-in FOV to N.
</p>

<pre id="zoominvel">zoominvel N</pre>
<p>
Sets the number of milliseconds over which zoom-in happens. Zoom-in is instant if N is 0. (default: 250)
</p>

<pre id="zoomoutvel">zoomoutvel N</pre>
<p>
Sets the number of milliseconds over which zoom-out happens. Zoom-out is instant if N is 0. (default: 100)
</p>

<pre id="zoomsens">zoomsens S</pre>
<p>
Sets mouse sensitivity when zoomed-in (default: 1).
</p>

<pre id="zoomautosens">zoomautosens B</pre>
<p>
Toggles whether mouse sensitivity should be automatically scaled to match the zoomed-in FOV relative to FOV. This overrides "zoomsens" if enabled. (default: 1)
</p>

<pre id="hudgun">hudgun N</pre>
<p>
Sets hudguns either on (1) or off (0).
</p>

<pre id="hudgunsway">hudgunsway N</pre>
<p>
Sets hudgun sway either on (1) or off (0).
</p>

<pre id="grass">grass N</pre>
<p>
Sets grass 0..1 generated by autograss textures to be drawn (default: 1).
</p>

<pre id="grassdist">grassdist N</pre>
<p>
Sets the maximum distance 0..10000 at which grass is drawn (default: 128). Higher numbers mean more grass will be drawn and be more expensive.
</p>

<pre id="grassstep">grassstep N</pre>
<p>
Sets the step distance between rows of grass to 0.5..8 (default: 2). Higher step distances will look sparser, but render faster.
</p>

<pre id="shaderdetail">shaderdetail N</pre>
<p>
This sets the level of detail shaders should use, for N=3 is highest, and N=0 is lowest. Lower settings will give speedups
on slower hardware.
</p>

<pre id="maxtexsize">maxtexsize N</pre>
<p>
This sets the maximum allow size of a texture in texture memory. If any texture's width or height is greater than N, the texture will be scaled down to be no more than NxN. This variable is not saved, and is reset on each run with the 3D card's texture size limit, so set this in your "autoexec.cfg" if you want to override it. Set this to a small value like 128 if your card has very little texture memory (i.e. 32 MB or less).
</p>

<pre id="texcompress">texcompress N</pre>
<p>
Any texture whose width or height is greater than or equal to N will be compressed using S3 texture compression, if available on your card. The default is set to 1024, so set this lower if your card supports S3TC and you have very little texture memory (i.e. 64 MB or less).
</p>

<pre id="watersubdiv">watersubdiv N</pre>
<p>
Determines the subdivision of the water surface in maps, which can greatly 
affect fps on slow machines. Must be a power of 2: 4 is the default, 8 is 
recommended for people on slow machines, 2 is nice for fast machines, and 1 is 
quite OTT. See the edit reference for more information on how to add the water material to your levels.
</p>

<pre id="waterlod">waterlod N</pre>
<p>
Sets the precision level of the water LOD (Level of Detail) from 0..3, where 0 is the lowest and 3 is the highest setting
(default: 1).
</p>

<pre id="waterreflect">waterreflect B</pre>
<p>
Enables or disables water reflections (default: 1).
</p>

<pre id="waterenvmap">waterenvmap B</pre>
<p>
Enables or disables water environment-mapping (cheaper fake reflections). By default, this is used when "waterreflect" is turned off.
</p>

<pre id="waterrefract">waterrefract B</pre>
<p>
Enables or disables water refractions. (default: 1).
</p>

<pre id="waterfade">waterfade B</pre>
<p>
Enables or disables soft fading of water edges. This option only works if "waterrefract" is enabled. (default: 1).
</p>

<pre id="waterfallrefract">waterfallrefract B</pre>
<p>
Enables or disables refractive waterfalls. (default: 0).
</p>

<pre id="waterfallenv">waterfallenv B</pre>
<p>
Enables or disables environment-mapped waterfall reflections. (default: 1).
</p>

<pre id="reflectdist">reflectdist N</pre>
<p>
Sets the maximum distance geometry/objects can be at to be in a reflection from 0..10000 (default: 2000).
</p>

<pre id="reflectsize">reflectsize N</pre>
<p>
Sets the resolution of reflected surfaces (where the dimensions would measure 2^N x 2^N), from 6..10 (default: 8). Lowering this value results
in a grainier image, whereas increasing it results in a finer and mroe detailed image. This too should be used to fine tune the speed of
reflection rendering.
</p>

<pre id="maxreflect">maxreflect N</pre>
<p>
Sets the maximum number of reflection surfaces that can be visible at once from 1..8 (default: 1). Any surfaces exceeding this
limit will not be given reflections on their surfaces.
</p>

<pre id="reflectmms">reflectmms B</pre>
<p>
Toggles whether map models are rendered in reflections (default: 1).
</p>

<pre id="envmapsize">envmapsize N</pre>
<p>
Sets the resolution of generated environment maps to 2^Nx2^N (default: 7).
</p>

<pre id="maxparticledistance">maxparticledistance N</pre>
<p>
The maximimum visibility distance for particle effects from 256..4096 (default: 512).
</p>

<pre id="particlesize">particlesize N</pre>
<p>
The size of default particle effects from 20..500 (default: 100).
</p>

<pre id="emitfps">emitfps N</pre>
<p>
The rate at which paricles can be emitted from 1..200 fps (default: 60).
</p>

<pre id="flarelights">flarelights B</pre>
<p>
Enables or disables automatic lens flares for all lights (default: 0). Requires very careful placement of lights to be effective, and most maps are not currently designed with this in mind.
Therefore it is recomended that lens flares instead be placed manually by using <a href="editref.html#_particles_">particles</a> entities.
</p>

<pre id="flarecutoff">flarecutoff N</pre>
<p>
The maximum visiblity distance of a lens flare source from 0..10000 (default: 1000).  Note that visibility also depends on the viewers angle to the flare source.
</p>

<pre id="flaresize">flaresize N</pre>
<p>
The size of the lens flare effect from 20..500 (default: 100).
</p>

<pre id="setpostfx">setpostfx [N [P]]</pre>
<p>
Sets your favourite fullscreen shader. Active permanently once set. Use without N
argument to turn it off. Certain shaders like bloom require you to specify a P for the intensity.
Current example shaders: bw, invert, gbr, sobel, bloom
</p>

<pre id="screenshot">screenshot</pre>
<p>
Writes out "screenshotN.bmp", where N is the number of milliseconds since the game was launched (default key: F12).
</p>

<pre id="musicvol">musicvol N</pre>
<pre id="soundvol">soundvol N</pre>
<p>
Sets the music/sound volume from 0..255.
</p>

<pre id="soundbufferlen">soundbufferlen N</pre>
<p>
Sets the sound buffer length in bytes, tweak this if you experience stuttering or lagging sound (default: 512).
</p>

<pre id="scr_w">scr_w N</pre>
<p>
Sets the screen resolution's width to N. This variable can also be used to check the current screen resolution width.
</p>

<pre id="scr_h">scr_h N</pre>
<p>
Sets the screen resolution's height to N. This variable can also be used to check the current screen resolution height.
</p>

<pre id="screenres">screenres W H</pre>
<p>
Sets the screen resolution's width to W and height to H. On supported platforms, this can change the screen resolution immediately without requiring OpenGL to reset.
</p>

<pre id="gamma">gamma N</pre>
<p>
Sets the hardware gamma value to N percent (default: 100). May not work if your card/driver doesn't support it.
</p>

<pre id="hidestats">hidestats B</pre>
<p>
Toggles display of fps/rendering stats on the HUD (default: 1).
</p>

<pre id="hidehud">hidehud B</pre>
<p>
Toggles the entire hud display, which includes rendering stats, ammo, and echoed text (default: 0).
</p>

<pre id="maxroll">maxroll N</pre>
<p>
Sets the maximum value your display will roll on strafing from 0..20 (default: 3)
</p>

<pre id="crosshairsize">crosshairsize N</pre>
<p>
Sets the size of your crosshair, 0 being off (default: 3).
</p>

<pre id="crosshairfx">crosshairfx B</pre>
<p>
Toggles crosshair effects (default: 1). When on, the crosshair will go grey when the weapon is reloading, orange when health &lt;= 50,
or red when &lt;=25.
</p>

<pre id="exec">exec S</pre>
<p>
Executes all commands in config file S.
</p>


<pre id="history">history N</pre>
<p>
Executes the Nth command in the command line history. For example, binding "history 0" to a key allows you to quickly repeat the
last command typed in (useful for placing many identical entities etc.)
</p>

<pre id="keymap">keymap K N A</pre>
<p>
Sets up the keymap for key code K with name N and default action A. You should 
never have to use this command manually, use "bind" instead.
</p>

<h2 id="gui_commands">GUI Commands</h2>

<pre id="gui2d">gui2d B</pre>
<p>
Sets whether menus should be shown in 2D, or 3D if disabled (default 0).
</p>

<pre id="menudistance">menudistance D</pre>
<p>
Sets the distance at which the menu is created in front of the player (default 40).
</p>
<pre id="menuautoclose">menuautoclose D</pre>
<p>
Sets the distance at which the menu is automatically closed when the player moves away from it (default 120).
</p>

<pre id="guiautotab">guiautotab H</pre>
<p>
Sets the height of the gui before tabs are automatically generated.
</p>

<pre id="cleargui">cleargui</pre>
<p>
Hides the menu.
</p>

<pre id="showgui">showgui N</pre>
<p>
Displays the menu with name N previously defined, and allows the user to pick and manipulate items with the cursor. Pressing ESC will cancel the menu.
</p>

<pre id="newgui">newgui S</pre>
<p>
Creates a new menu with name S. All the following 'gui' menuitem commands will apply to this menu.
See "data/menus.cfg" for defaults.
</p>

<pre id="guilist">guilist '[' ... ']'</pre>
<p>
Defines a menu item that is a group of menu items. The layout of each nested group will alternate - the top level (newgui) is laid out vertically, 
the first guilist will be laid out horizontally, the second guilist vertically, etc. This allows tables and lists to be created. The 
layout direction also influences the display of items such as sliders, bars, progress bars, and struts.
</p>

<pre id="guispring">guispring [W]</pre>
<p>
A list containing springs will fill its parent list along its layout direction by dividing any needed space among the springs. The spring is weighted by a positive integer W, otherwise defaults to W=1.
</p>

<pre id="guititle">guititle S</pre>
<p>
Creates a menu item with horizontally centered title S.
</p>

<pre id="guibutton">guibutton [S] A [I]</pre>
<p>
Creates a menu button with the name S and icon I, which will execute A when selected. If you only specify one parameter, then it will be used for both.
The icon used will be I if supplied, otherwise a blue-button if A contains showgui, otherwise it is a green button. Clicking a button will close the menu.
</p>

<pre id="guiimage">guiimage P A S [O]</pre>
<p>
Creates a menu image tile from the path P, which will execute A when selected. Clicking the image will close the menu. Uses image scale S and O=1 if an overlay is required.
</p>

<pre id="guitext">guitext S</pre>
<p>
Creates a menu item consisting of the text line S and an information icon.
</p>

<pre id="guitextbox">guitextbox S W [H] [C]</pre>
<p>
Creates a text box showing the text S, with width W, height H, and color C. The default is a single line of white text. Note that the height will increase automatically so as to enclose all the text.
</p>

<pre id="guibar">guibar</pre>
<p>
Creates a vertical/horizontal menu bar. The orientation depends on the layout direction.
</p>

<pre id="guislider">guislider V [MIN MAX A]</pre>
<p>
Creates a vertical/horizontal menu slider that is bound to a variable V. The min/max bounds of the slider will be as defined by the data model of the variable unless explicitly specified. 
An action A can also be specified for every slider change.
The orientation of the slider depends on the layout direction.
</p>

<pre id="guicheckbox">guicheckbox N V [ON OFF A]</pre>
<p>
Creates a menu checkbox with a label N that is bound to a variable V. The default value are 0/1 unless supplied by ON/OFF. An action A can also be specified for every checkbox change.
</p>

<pre id="guiradio">guiradio N V VAL [A]</pre>
<p>
Creates a menu radio button with a label N that is bound to a variable V. The radio button is only ticked when the variable has value VAL, and 
presing the button will update the variable to the value VAL.
An action A can also be specified for every radio button change.
</p>

<pre id="guitab">guitab S</pre>
<p>
Creates a new menu tab with title S. Note: has no effect if used within a guilist.
</p>

<pre id="guifield">guifield A N [O [U]]</pre>
<p>
Creates a field which accepts editable input, the value of which is taken from and updated
to (upon change) the alias A, and can have at most N characters. If specified, O is executed
when the user presses enter. If U is also specified, it will execute it every every frame
(unless it is currently being edited) to allow updating the field. Note that all fields that
share the same A alias, also share the same edit info, if the user moves outside the field the
changes are not committed, if they select another field, changes will be lost.
</p>

<h2 id="server_commands">Server Configuration Commands</h2>
<p>The following commands may be placed in the file "server-init.cfg" in the root Sauerbraten directory to configure a dedicated server, or they may be used inside a running client to config
ure a listen server:</p>

<pre id="startlistenserver">startlistenserver [MASTER]</pre>
<p>Starts a listen server from within a running game client. If MASTER=1, then the server will report to the master server, otherwise if MASTER=0 or not supplied the server will not report to the master server. The various server configuration commands can be used before this command to setup properties of the listen server.</p>

<pre id="stoplistenserver">stoplistenserver</pre>
<p>Stops a listen server running from within a game client.</p>

<pre id="serverip">serverip S</pre>
<p>Sets the IP the server should bind/listen to S. This is only useful if your server is running on a host with multiple interfaces.</p>

<pre id="serverport">serverport N</pre>
<p>Sets the port the server should bind/listen to N. By default, server's listen on port 8785.</p>

<pre id="maxclients">maxclients N</pre>
<p>Sets the maximum number of clients that can connect to the server to N.</p>

<pre id="serverbotlimit">serverbotlimit N</pre>
<p>Sets the maximum number of bots a master can add to N. Admins are unaffected by this limit.</p>

<pre id="publicserver">publicserver B</pre>
<p>Toggles whether a server is considered a "public" server when B=1: can only gain master by "auth" or admin and doesn't allow locked/private mastermodes. B=0 allows "setmaster 1" and locked/private mastermodes (for coop-editing and such).</p>

<pre id="serverdesc">serverdesc S</pre>
<p>Sets the description shown for the server in the server browser to S.</p>

<pre id="serverpass">serverpass S</pre>
<p>Sets the password required to connect to the server to S. This option is only useful if you don't want anyone connecting to your server.</p>

<pre id="adminpass">adminpass S</pre>
<p>Sets the password to gain admin access to a server to S, as well as the password that may be used to override the private mastermode when connecting.</p>

<pre id="servermotd">servermotd S</pre>
<p>Sets the "message of the day", a message shown to users when they connect to the server, to S.</p>

<pre id="updatemaster">updatemaster B</pre>
<p>Toggles whether or not the server should report to the masterserver. B=1 enables (default) and B=0 disables.</p>

<pre id="mastername">mastername S</pre>
<p>Sets the IP of the master server the server reports to. This defaults to "sauerbraten.org" and generally should not be changed.</p>

<pre id="restrictdemos">restrictdemos B</pre>
<p>Toggles whether admin is required to start recording a demo. B=1 enables (default) and B=0 disables.</p>

<pre id="maxdemos">maxdemos N</pre>
<p>The maximum number of demos the server will store (default: 5).</p>

<pre id="maxdemosize">maxdemosize N</pre>
<p>The maximum size a demo is allowed to grow to in megabytes (default: 16).</p>

<pre id="maxdemosize">maxdemosize N</pre>
<p>Toggles whether admin is required to start recording a demo. B=1 enables (default) and B=0 disables.</p>

<pre id="ctftkpenalty">ctftkpenalty B</pre>
<p>Toggles whether teamkilling the flag runner in CTF modes should disallow the teamkiller from stealing the flag (default: 1).</p>

<h2 id="cubescript">CubeScript</h2>

<p>
Cube's console language is similar to console languages of other games (e.g. Quake), but is a bit more powerful in that it is a
full programming language.
</p>

<p>
What is similar to quake is the basic command structure: commands consist of 
the command itself, followed by any number of arguments seperated by 
whitespace. you can use "" to quote strings with whitespace in them (such as 
the actions in bind/alias), and whereever a command is required you can also 
use ; to sequence multiple commands in one.
</p>

<p>
What is new compared to quake is that you can evaluate aliases and expressions. 
You can substitute the value of an alias as an argument by prefixing it with a 
"$" sign, (example: echo The current value of x is $x). You can even 
substitute the values of console variables this way, i.e $fov gives the current 
fov. Some aliases are set automatically, for example $arg1 to $argN are set (as if by the "push" command)
if you supply arguments when you execute an alias, and are popped when the alias finishes executing.
</p>

<p>
There are two alternatives to "" for quoting a string: () and []. They work in
the same way as "", with the difference that they can be nested infinitely, and
that they may contain linefeeds (useful for larger scripts). () is different
from [] in that it evaluates the commands contained in it _before_ it evaluates
the surrounding command, and substitutes the results. () bracketed strings are
called expressions, while [] bracketed strings may be thought of as blocks.
</p>

<p>
An alternative to $x is @x, which uses an alias as a macro. The difference is that @x 
can be substituted inside [] forms before they have ever been evaluated (at parse time), 
which makes them useful for composing strings or creating code on the fly. The @x form will be
substituted using the value of x at the time the enclosing [] is evaluated. You can add more @ prefixes
to move up more levels of []s, so @@x will move up two levels of []s and so on.
Example: x = 0; if $cond [x = 1; [x = 2; echo @@x]] will echo 0, since it uses the value of x at two levels up. 
</p>

<p>
The form @(body) is similar to @x, except that body contains commands executed at parse time.
The result value after body executes is substituted in for @(body). 
You may use multiple @ prefixes as with the @x form.
Example: @(result "Hello, World!") will substitute itself with Hello, World!
</p>

<p>
@[body] is also similar to @(body), except that it does not execute its contents and instead expands macros to use as the alias name for the final macro substitution.
</p>

<p>
The following commands are available for programming:
</p>

<pre id="_plus_">+ A B</pre>
<pre id="_minus_">- A B</pre>
<pre id="_asterisk_">* A B</pre>
<pre id="div">div A B</pre>
<pre id="mod">mod A B</pre>
<p>
(add, substract, multiply, divide, modulo): these all work like the integer 
operators from other languages (example: echo x squared is (* $x $x)).
</p>

<pre id="_equals_">= A B</pre>
<pre id="_lt_">&lt; A B</pre>
<pre id="_gt_">&gt; A B</pre>
<pre id="strcmp">strcmp A B</pre>
<p>
(equals, lessthan, greaterthan, stringcompare): comparison operators that return 1 for true and 0 for false.
</p>

<pre id="_exclaim_">! A</pre>
<pre id="_amp_amp_">&amp;&amp; A B</pre>
<pre id="_pipe_pipe_">|| A B</pre>
<pre id="_caret_">^ A B</pre>
<p>
(not, and, or, xor): boolean operators. 0 is false, everything else is true.
The AND and OR operators are implemented to shortcut.
</p>

<pre id ="strstr">strstr S N</pre>
<p>
Searches the string S for the substring N and returns its starting position.
This function is case sensitive, when N is not found it returns -1.
(example: echo (strstr "for example this sentence" "this" ) - would return 14 ).
</p>

<pre id ="substr">substr S A B</pre>
<p>
Returns a part from the string S starting from A for B chars
(example: echo (substr "grab this part here" 11 4 ) - would return "here" ).
</p>

<pre id ="strreplace">strreplace S A B</pre>
<p>
This searches the string S for substring A and replaces it with another substring B.
(example: echo ( strreplace "this is serious" "serious" "fun" ) - would return "this is fun" ).
</p>

<pre id ="strlen">strlen S </pre>
<p>
Returns the length of the string S
(example: echo (strlen "long sentence") - would return 13 ).
</p>

<pre id ="min">min A B </pre>
<p>
This results the lower number of the 2 Strings A and B
</p>

<pre id ="max">max A B </pre>
<p>
This results the higher number of the 2 Strings A and B
</p>

<pre id ="rnd">rnd N </pre>
<p>
Grabs a random number from 0 to N, and results it.
</p>
<pre id="if">if cond true false</pre>
<p>
Executes the true or false&nbsp;part depending on wether cond is "0" or 
something else (example: if (&lt; $x 10) [ echo "x is" $x ] [ echo "x is too big" ]).
</p>

<pre id="loop">loop I N body</pre>
<p>
Evaluates body N times, and sets the alias I from 0 to N-1 for every iteration (example: loop i 10 [ echo $i ]).
</p>

<pre id="while">while cond body</pre>
<p>
Evaluates body while cond evaluates to true. Note that cond here has to have [], otherwise it would only be evaluated once
(example: i = 0; while [ (&lt; $i 10) ] [ echo $i; i = (+ $i 1) ]).
</p>

<pre id="concat">concat S...</pre>
<p>
Concatenates all the arguments and returns the result
</p>

<pre id="concatword">concatword S...</pre>
<p>
Same as concat but without spaces between the elements.
</p>

<pre id="format">format F V1..Vn</pre>
<p>
Substitutes the V values into the format string F and returns the result. The format strings %1 through %9 are substituted with V1 through V9, respectively, and may be
used multiple times. %% will generate a single % character (example: format "%1 bottles of %2 on the %3, %1 bottles of %2!" 99 beer wall).
</p>

<pre id="at">at S N</pre>
<p>
Grabs the Nth word out of string S and returns the result
</p>

<pre id="listlen">listlen L</pre>
<p>
Returns the number of items in the list L
</p>

<pre id="listclients">listclients N</pre>
<p>
Gives a list of all playernumbers if N is 1
if N is 0 it lists all players except you.
</p>

<pre id="onrelease">onrelease A</pre>
<p>
Only executes A if the command is executed on the release of a key/button (must be in an action in a bind or an alias in a bind).
</p>

<pre id="result">result V</pre>
<p>
Normally the result of a [] block is the result of the last command in the block. If you want the result to be a particular
variable or value, you can use e.g. "result $i" etc.
</p>

<h2 id="variables">Variables that are only really useful when used as value:</h2>

<pre id="_editing">$editing</pre>
<p>
This is true when in edit mode.
</p>

<pre id="getalias">getalias V</pre>
<p>
Returns the alias from the variable V.
</p>

<pre id="getbind">getbind B</pre>
<pre id="geteditbind">geteditbind B</pre>
<pre id="getspecbind">getspecbind B</pre>
<p>
Returns the game, edit or spectator bind B
</p>

<pre id="getclientnum">getclientnum N</pre>
<pre id="getclientname">getclientname N</pre>
<pre id="getclientteam">getclientteam N</pre>
<p>
This returns the client number, name or team of the player N.
</p>

<pre id="getname">getname</pre>
<pre id="getteam">getteam</pre>
<pre id="getweapon">getweapon</pre>
<pre id="getfps">getfps</pre>
<p>
Tells your own Name Team Weapon or FPS
</p>

<pre id="gettex">gettex</pre>
<p>
Adds the current selected texture to the front of your texture list in Y+scroll
Needs Allfaces set to 0 so it works.
</p>

<pre id="gettexname">gettexname</pre>
<p>
Results the current Texture name
</p>

<pre id="isconnected">isconnected N</pre>
<p>
If the Player N is online this is 1 (true)
</p>

<pre id="isspectator">isspectator N</pre>
<p>
If the Player N is spectator this is 1 (true)
</p>

</body>
</html>