Table of Contents

monkeybeetleSoftware and s/w Development

Dec 2, 2013 (3 years and 8 months ago)

81 views

Table of Contents

Command Line Options

................................
................................
................................
................................
.......................
1

CubeScript
................................
................................
................................
................................
................................
............
2

Useful variables

................................
................................
................................
................................
...............................
4

Console Commands

................................
................................
................................
................................
........................
5

GUI Commands

................................
................................
................................
................................
..............................
8

Gameplay Commands

................................
................................
................................
................................
.....................
9

Server Configuration Commands

................................
................................
................................
................................
..

11

Editing

................................
................................
................................
................................
................................
................
12

The HUD

................................
................................
................................
................................
................................
.......
14

Settings

................................
................................
................................
................................
................................
..........
14

Heightfield

................................
................................
................................
................................
................................
.....
14

Texture Blending

................................
................................
................................
................................
...........................
15

Defining Blended Textures

................................
................................
................................
................................
.......
15

Blend Brushes

................................
................................
................................
................................
...........................
15

Adding a new Brush

................................
................................
................................
................................
............
15

Loading a Brush

................................
................................
................................
................................
...................
15

Painting

................................
................................
................................
................................
................................
.....
16

Reverting Paints
................................
................................
................................
................................
........................
16

Blending Hints and Tips

................................
................................
................................
................................
...........
16

Entity

................................
................................
................................
................................
................................
.............
16

Entity Types

................................
................................
................................
................................
................................
...
18

Lighting Commands

................................
................................
................................
................................
......................
21

Map and Config

................................
................................
................................
................................
................................
.
23

PVS Culling

................................
................................
................................
................................
................................
..
29

Waypoints

................................
................................
................................
................................
................................
......
30

Bots

................................
................................
................................
................................
................................
...............
31

Demo R
ecording

................................
................................
................................
................................
................................
31

Movie Recording

................................
................................
................................
................................
...............................
32

Multiplayer Online

................................
................................
................................
................................
.............................
33

Network Code

................................
................................
................................
................................
...............................
33

Cheating

................................
................................
................................
................................
................................
........
33


Command Line Options


-
d

This starts as a dedicated server. The default is a non
-
dedicated server with o
nly 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 back
ground, or at the
same time with a client if you want to host a gam
e (which is usually better than using a listen server). Servers use the ports 28785 (UDP) and
28786 (UDP).

-
dN

If N=1, starts a listen server which allows it to simultaneously function as both a client and server. Note that a listen ser
ver is limited b
y
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 o
ptions
such as "vsync". If N=2, it starts a dedicated server as for the "
-
d" command
-
line option.

-
wN

Sets the screen

resolution width to N (default: 640).

-
hN

Sets the screen resolution height to N (default: 480).

-
bN

Sets the screen depth to N bits per pixel.

-
zN

Sets the z
-
buffer precision to N bits. This should be at least 24 or you may experience depth p
roblems.

-
aN

Sets FSAA (Full Scene AntiAliasing) to N samples, i.e.
-
a4 is 4xFSAA
-
vN

Sets v
-
sync to N (N=1 to enable or N=0 to disable).
-
sN

Sets stencil buffer bits to N (N>=1 to enable or N=0 to disable).

-
t

Sets Sauerbaten to run windowed
.

-
f

-
fN

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 precis
ion 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 path
s are not working for your card, and you are reasonably certain the GLSL support is better.

-
r

-
rS

Executes the script commands S before any hardware initialization has taken place. If S is not specified, "init.cfg"
will be loaded by
default. The engine writes "init.cfg" out on exit with various hardware settings you have changed in
-
game (like screen width/height, FSAA,
etc.), and this option allows those settings to be restored on a restart.

-
qS

Sets S to your ho
me 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.

-
kS

Adds the mod director
y 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.

-
lS

Loads map S on startup (default: base/metl4)
.

-
xS

Executes the script commands S on startup, note that this is done
before the map loads
, so if you wish them to be executed later, you
should enclose them in a
sleep

statement. Example:
-
x"sleep 1000 [ connect localhost ]"

-

uN

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.

-
nN

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").

-
cN

Sets the max number of clients to N. The default is 4. If you want to set it higher, be awa
re 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).

-
iS

Sets the server ip to S. This option is only useful for people running on machines with mul
tiple network interfaces.

-
jN

Sets the server port to N. This option is only useful for people running on machines with multiple network interfaces. Note t
hat both UDP
ports N (game traffic) and N+1 (pings) must be available for this to work. If not sp
ecified, 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.

-
mS

Sets the master server to use for either server (registering) and client (updating) to S. Be

aware, this is the base url of the master server
and has to end in a "/" and without a "http://" prefix (default: sauerbraten.org/masterserver/).

-
pS

Sets the server's administrative password to S.

-
yS

Locks the server so that password S must be p
rovided to connect to it.

-
oN

Sets the openness of the server to N. N=1 disables mastermodes 2 (locked) and 3 (private), while N=0 (default) enables all ma
stermodes.

-
gN

Sets the maximum amount of bots a master can add to the server. Set to 0 to di
sable bots. The default is 8.





CubeScript


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.

What is similar to quake is t
he 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 whe
reever a command
is require
d you can also use ; to sequence multiple commands in one.

What is new compared to quake is that you can evaluate aliases and expressions. You can substitute the value of an alias as a
n 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" comma
nd) if you supply
arguments when you execu
te an alias, and are popped when the alias finishes executing.

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, and

[ ] bracketed strings
ma
y be thought of as blocks.

An alternative to $x is @x, which uses an alias as a macro. The difference is that @x can be substituted inside [ ] or ( ) fo
rms 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 level
s 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.

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

IMPORTANT NOTE:

When dealing with array attributes (getting a piece of information from a set of values) it is important to kn
ow that
most start at zero (0) and count upwards from there. This means that the first value is 0, the second is 1, the third is 2 an
d so forth. Please keep
this in mind, especially when dealing with entity attributes, as zero is always considered to be th
e first/default value, not 1.
Font Colors

Use
the text inside the quotes for the colors:

"^f0"
green

"^f1"
blue

"^f2"
orange

"^f3"
red

"^f4"
grey

"^f5"
purple

"^f6"
dark orange

"^f7" white

So,
echo "hello ^f6world"

will print
hello

blue and
world

orang
e

Colors are reset for each [echo] or [say] or [sayteam]

you can also use
^f~

to cancel any color previously specified.

^fs

saves a color, while
^fr

restores the color previously specified. the amount of
^fr

you use must match the
^fs

used.

also, all color

codes have to be quoted in order to work. ex:
"^f0this ^f~is ^f5^fsa ^f4laaarge ^frsentence!"


The following commands are available for programming:


+ A B


-

A B


* A B


div A B


mod A B


(add, substract, multiply, divide, modulo): these a
ll work like the integer operators from other languages (example: x squared is
echo(* $x $x)
).

= A B


< A B


> A B


strcmp A B


(equals, less than, greater than, string compare): comparison operators that return 1 for true and 0 for false.


! A


&& A B


|| A B


^ A B


(not, and, or, xor): Boolean operators. 0 is false, everything else is true. The AND and OR operators are implemented to shor
tcut.

strstr S N

Searches the string S for the substring N and returns its starti
ng position. This function is case sensitive, when N is not found it
returns
-
1. (example:
echo (strstr "for example this sentence" "this" )
-

would return 12 ).

substr S A B

Returns a part from the string S starting from A for B chars (example:
echo (
substr "grab this part here" 15 4 )

-

would return
"here" ).

strreplace S A B

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 f
un" ).

strlen S

Returns the length of the string S (example:
echo (strlen "long sentence")

-

would return 13 ).

min A B

This results the lower number of the 2 Strings A and B

max A B

This results the higher number of the 2 Strings A and B

r
nd N

Grabs a random number (integer) from 0 to N
-
1, and results it.

nummonsters N

returns the number of monsters with tag N still alive (example
curmonster1num = (nummonsters 1)

)

if cond true false

Executes the true or false part depending on
whether cond is "0" or something else (example:
if (< $x 10) [ echo "x is" $x ]
[ echo "x is too big" ]
).

loop I N body

Evaluates body N times, and sets the alias I from 0 to N
-
1 for every iteration (example:
loop i 10 [ echo $i ]

).

while cond body


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 [ (< $i 10) ] [ echo $i; i = (+ $i 1) ]

).

concat S...

Concatenates all the arguments and returns the r
esult

concatword S...

Same as concat but without spaces between the elements.

format F V1..Vn

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, respectivel
y, and may be used multiple times. %% will generate a single % character (example: f
ormat "%1 bottles of %2
on the %3, %1 bottles of %2!" 99 beer wall
).

at S N

Grabs the Nth word out of string S and returns the result (example:
echo ( at "for example
this sentence" 2 )

-

would return "this" )

listlen L

Returns the number of items in the list L (example:
echo ( listlen "for example this sentence" )

-

would return 4 )

listclients N

Gives a list of all playernumbers if N is 1 if N is 0 it lists all
players except you.

onrelease A

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 bi
nd).

result V

Normally the result of a [ ] block is the result of the last command in the b
lock. If you want the result to be a particular variable or
value, you can use e.g. "
result $i
" etc.



Useful variables


$editing

This is true when in edit mode.


ge
talias V

Returns the alias from the variable V.

getbind B

geteditbind B


getspecbind B

Returns the game, edit or spectator bind B

getclientnum N

getclientname N

getclientteam N

This returns the client number, name or team of the player N.

getname

getteam

getweapon

getf
ps

Tells your own Name Team Weapon or FPS

gettex

Adds the current selected texture to the front of your texture list in Y+scroll Needs Allfaces set to 0 so it works.

gettexname

Results the current Texture name

isconnected N

If the Player N i
s online this is 1 (true)

isspectator N

If the Player N is spectator this is 1 (true)

$numargs

How many arguments have been passed


$triggerstate

gives the state of the trigger (
-
1, 0, 1)


$consize

gives the size, in lines, of the console



Console Commands


bind K A

editbind K A

specbind K A

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

and
specbind

works much the same way, except now the key is only available in edit/
spectator mode (if no editbind is defined for a certain key, it will use the
normal binding).


alias N A

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
recurs
ively etc. You may use N = A as a shortcut for alias.

push N A

Pushes the old value of name N onto its stack, and then aliases N to A.

pop N

Pops the old value of name N off its stack, then aliases N to that value.

quit

Quits without asking.

f
orward

backward

left

right

Move you in said direction (default key: up down left right, w s a d).

attack

Fires the current weapon (default key: left mouse).

jump

Triggers a jump (default key:
space, right mouse).

zoom N

Zooms in if N is
-
1, zooms out if N is 1, and turns off zoom if N is 0.

taunt

Plays your player model's taunt animation.

floatspeed N

Sets the speed at which your character floats in edit mode or spectator mode (defa
ult: 100).

invmouse B

Toggles mouse between regular and inverted (flight sim) mode (default: 0 (uninverted)).

sensitivity S

Sets mouse sensitivity (default: 3). The feel of which should be a similar number to Quake.

sensitivityscale S

Scales th
e effect of an increase or decrease in the sensitivity value. The larger the value, the smaller the difference between
sensitivity values (default: 1).

maxfps N

Sets the max number of FPS (Frames per Second). Useful if you have a recent machine that ca
n 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 exper
ience tearing. Be
aware that maxfps is not a replacement for vsync (default: 200).

fov N

Sets your

FOV to 10..150.

zoomfov N

Sets your zoomed
-
in FOV to N.

zoominvel N

Sets the number of milliseconds over which zoom
-
in happens. Zoom
-
in is instant if N is 0. (default: 250)

zoomoutvel N

Sets the number of milliseconds over which zoom
-
out happe
ns. Zoom
-
out is instant if N is 0. (default: 100)

zoomsens S

Sets mouse sensitivity when zoomed
-
in (default: 1).

zoomautosens B

Toggles whether mouse sensitivity should be automatically scaled to match the zoomed
-
in FOV relative to FOV. This
overri
des "zoomsens" if enabled. (default: 1)

hudgun N

Sets hudguns either on (1) or off (0).

hudgunsway N

Sets hudgun sway either on (1) or off (0).

grass N

Sets grass 0..1 generated by autograss textures to be drawn (default: 1).

grassdist N

Se
ts the maximum distance 0..10000 at which grass is drawn (default: 128). Higher numbers mean more grass will be drawn and
be more expensive.

grassstep N

Sets the step distance between rows of grass to 0.5..8 (default: 2). Higher step distances will loo
k sparser, but render faster.

shaderdetail N

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.

maxtexsize N

This sets the maximum allow size of a texture i
n 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 s
ize 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).

mintexcompresssize N

Any texture whose width or height is greater than or equal to N will be compressed using S3 texture compr
ession, 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 tex
ture memory (i.e. 64
MB or less).

loddistance N

Sets the distance at which world vertex array blocks are rendered at

a higher LOD (level of detail). The lower this value, the
more geometry popup you will see, but the faster it may render. Every system has a different optimal value, experiment. This
variable only has
an effect for large scale maps where the level designe
r has turned on LOD using the "lodsize" variable.

watersubdiv N

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.

waterlod N

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

waterreflect B

Enables or disables water reflections (default: 1).

waterenvmap B

Enables or disables water environment
-
mapping (cheaper fake reflections). By default, this is used when "waterreflect" is
turned

off.

waterrefract B

Enables or disables water refractions. (default: 1).

waterfade B

Enables or disables soft fading of water edges. This option only works if "waterrefract" is enabled. (default: 1).

waterfallrefract B

Enables or disables refr
active waterfalls. (default: 0).

waterfallenv B

Enables or disables environment
-
mapped waterfall reflections. (default: 1).

reflectdist N

Sets the maximum distance geometry/objects can be at to be in a reflection from 0..10000 (default: 2000).

ref
lectsize N

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 sho
uld be used to fine tune the
speed of reflection rendering.

maxreflect N

Sets the maximum number of reflection surfaces that can be visible at once from 1..8 (default: 1). Any surfaces exceeding thi
s
limit will not be given reflections on their surface
s.

reflectmms B

Toggles whether map models are rendered in reflections (default: 1).

envmapsize N

Sets the resolution of generated environment maps to 2^Nx2^N (default: 7).

maxparticledistance N

The maximum visibility distance for particle effe
cts from 256..4096 (default: 512).

particlesize N

The size of default particle effects from 20..500 (default: 100).

emitfps N

The rate at which paricles can be emitted from 1..200 fps (default: 60).

flarelights B


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 recommended that lens flares instead be placed ma
nually by using
particles entit
ies.

flarecutoff N

The maximum visibility distance of a lens flare source from 0..10000 (default: 1000). Note that visibility also depends on th
e
viewers angle to the flare source.

flaresize N

The size of the lens flare effect from 20..500 (default
: 100).

setpostfx [N [P]]

Sets your favorite 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

screenshot

Writes out "screenshotN.bmp", where N is the number of milliseconds since the game was launched (default key: F12).

musicvol N

soundvol N

Sets the music/sound volume from 0..255.

soundbufferlen N

Sets th
e sound buffer length in bytes, tweak this if you experience stuttering or lagging sound (default: 512).

scr_w N

Sets the screen resolution's width to N. This variable can also be used to check the current screen resolution width.

scr_h N

Sets the
screen resolution's height to N. This variable can also be used to check the current screen resolution height.

screenres W H

Sets the screen resolution's width to W and height to H. On supported platforms, this can change the screen resolution
immediat
ely without requiring OpenGL to reset.

gamma N

Sets the hardware gamma value to N percent (default: 100). May not work if your card/driver doesn't support it.

hidestats B

Toggles display of fps/rendering stats on the HUD (default: 1).

hidehud B


Toggles the entire hud display, which includes rendering stats, ammo, and echoed text (default: 0).

maxroll N

Sets the maximum value your display will roll on strafing from 0..20 (default: 3)

crosshairsize N

Sets the size of your crosshair, 0 bein
g off (default: 3).

crosshairfx B

Toggles crosshair effects (default: 1). When on, the crosshair will go grey when the weapon is reloading, orange when health
<= 50, or red when <=25.

exec S

Executes all commands in config file S.

history N

Exe
cutes 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.)

keymap K N A

Sets up the keymap for key code K with na
me N and default action A. You should never have to use this command manually,
use "bind" instead.



GUI Commands


gui2d B

Sets whether menus should be shown in 2D, or 3D if disabled (default 0).


menudistance D

Sets the distance at which the menu is created in front of the player (default 40).

menuautoclose D

Sets the distance at which the menu is automatically closed when the player moves away from it (default 120).

guiautotab H

Sets the height of the gui before tabs are automatically generated. This is a variable that will affect
all

menus. Valid values are
from 6 to 40. Note: anything within a "guilist [ ]", etc. are not affected.

guiclicktab B

This variable sets how t
he tabs are selected. If set to 0, a tab is selected by roll
-
over. If set to 1, you must click on the tab.

cleargui

Hides the menu.

showgui N

Displays the menu with name N previously defined, and allows the user to pick and manipulate items with t
he cursor. Pressing
ESC will cancel the menu.

newgui S

Creates a new menu with name S. All the following 'gui' menu item commands will apply to this menu. See "data/menus.cfg" for
defaults.

guilist '[' ... ']'

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 directi
on also influences the display of items such as sliders, bars, progress bars, and struts.

guialign ALIGN '[' ... ']'

Creates a list of menu items as with the "guilist" command, except that the list is either left justified (ALIGN=
-
1),
centered (ALIGN=0
), or right justified (ALIGN=1).

guititle S

Creates a menu item with horizontally centered title S.

guibutton [S] A [I]

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.

guiimage P A S [O]

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.

guitext S

Creates a menu item consisting of the text line S and an information icon.

guitextbox S W [H] [C]

Creates a text box sh
owing 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.

guibar

Creates a vertical/horizontal menu bar. The orientation depends on

the layout direction.

guislider V [MIN MAX A]

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 a
lso be specified for every slider change. The
orientation of the slider depends on the layout direction.

guicheckbox N V [ON OFF A]

Creates a menu check
-
box with a label N that is bound to a variable V. The default value are 0/1 unless
supplied by ON/O
FF. An action A can also be specified for every check
-
box change.

guiradio N V VAL [A]

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 pressing the button wi
ll update the variable to the value VAL. An action A can also be specified for every radio
button change.

guitab S

Creates a new menu tab with title S. Note: has no effect if used within a guilist.

guifield A N [O [U]]

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 e
xecute 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.


Gameplay Commands


The following commands can be applied in the game by pressing T, and then typing
/commandname
. The backquote key (`) is a shortcut for
having the / typed for you. To have these commands applied automatically before the game starts open

the autoexec.cfg file and add them there,
without the /.
Name

and
team

in particular should be changed there.

map M

Loads a map. If connected to a multiplayer server, votes to load this map (others will have to type "map M" as well to agree
with
load
ing this map). To vote for a map with a specific mode, set the mode before you issue the map command (see multiplayer menu).
See also
map in the editref.

name yourname

Used for multiplayer, sets the name other players will know you as.

team teamname


Determines who are your teammates in any team game mode (truncated to 4 characters, case sensitive).

say text...

Outputs text to all players, as if you typed it.

echo text...

Outputs text to the console. Most useful for scripts.

saycommand P...


This puts a prompt on screen where you can type stuff into, which will capture all keystrokes until you press return (or esc
to cancel). You may press tab to autocomplete commands/aliases/variables, and up/down keys to browse the command history. If
wha
t you
typed started with a "/", the rest of it will be executed as a command, otherwise its something you "say" to all players. def
ault key =
T

for talk,
`

for commands. If P is prefix to insert to the buffer, (default key
`

inserts a
/
).

connect serverip

[port [password]]

Connects to a server, e.g. "connect fov120.com". You can optionally specify a port for connecting to
servers with custom ports. If port is 0 or not specified, then it connects to the default port. You can optionally specify a
password

for connecting
to password
-
protected servers. (
connect localhost

to connect to a listen/dedicated server on your computer. )

lanconnect

Connects to any server on the local area network by broadcasting the connection request.

disconnect

Leave the
server.

reconnect [password]

Reconnects to the server which you were last connected to. You can optionally specify a password if the server was
password
-
protected.

rate N

Sets your clients maximum downstream bandwidth to N bytes per second. Leaving

it at 0 (the default) means the server will
dynamically try to do the best thing, this is recommended for players who don't have a clue what their bandwidth is (setting
your rate
suboptimally is worse than not setting it all). Modem players (56k) could tr
y rate 4000 and tweak from there, DSL players can try rate 6000
-
10000. Note that the more players on a server, the more critical the effect of your rate.

showscores

+showscores
turns display of scores (name/frags/network) on and
-
showscores

turns it of
f. Default key = tab

conskip N

Allows you to browse through the console history, by offsetting the console output by N. Default key 'keypad
-
' scrolls into the
history (conskip 1) and 'keypad +' resets the history (conskip
-
1000).

toggleconsole

Tog
gle between a more permanent and bigger console display and default, scroll off the screen variety. Unlike other games,
you can play the game normally with the larger console on.

weapon a b c

Tries to select weapons a, b & c, in that order, if they hav
e ammo (
0
/
7

= chainsaw/fist,
1

= shotgun,
2

= chain
-
gun,
3

= rocket
launcher,
4

= rifle,
5

= grenade
-
launcher,
6

= pistol). If none of the 3 indicated have any ammo, it will try the remaining weapons for one with
ammo (in order 3/2/1/4/0) (the fist needs n
o ammo). You can use the weapon command with 0 to 3 arguments. examples:

weapon 2 1 0 // close up selection

weapon 4 3 2 // far away selection

weapon 3 2 1 // medium distance selection

weapon 0 // humiliate selection :)

weapon // just switch to anything w
ith ammo

In any selection, it will skip whichever weapon you have currently selected, so executing a weapon command repeatedly toggles

between the
two best weapons with ammo within a given selection. default keys 0 to 7 select the corresponding weapons, wi
th sensible default alternatives,
middle mouse button is a simple weapon switch.


setweapon N [F]

Sets with weapon to gun N, only if the gun has ammo. If F=1, then the gun is set to N, regardless of whether the gun has
any ammo.

cycleweapon A B C D E


Cycles through the guns specified (may specify 1
-
5 guns). The next gun with ammo after the currently used gun in
the sequence is selected.

nextweapon [N] [F]

Cycles through all available guns with ammo (or even empty guns if F=1 is specified). If N i
s
-
1, then it cycles through
the available guns in reverse.

gamespeed P

Sets the game speed in percent, i.e. 50 is playing in slow
-
motion at half the speed. does not work in multiplayer. for
entertainment purposes only :)

mode N

Set gameplay mode t
o N for the next game played (next map load). N can be:



0
: "
ffa
" /
"default" mode
. This is the default normal free
-
for
-
all game, and can also be used as "prewar" while setting up teams /
voting for the next game.



1
:"
coop
" /
coop edit mode
. This simply enables map editing in multiplayer, otherwise identical to mode 0.



2
: "
teamplay
" /
standard teamplay game
. will work with any number of teams with any number of players: you are allied with all

players whose "team" setting is the same as yours.



3
: "
insta
" /
instagib [ffa] mode
. No items will spawn, but everyone will have 100 rifle rounds and 1 health.



4
: "
instateam
" /
instagib [team] mode
. No item
s will spawn, but everyone will have 100 rifle rounds and 1 health.



5
: "
effic
" /
efficiency [ffa] mode
. No items will spawn, but everyone will get all weapons with full ammo, and green armour.



6
: "
efficteam
" /

efficiency [team] mode
. No items will spawn, but everyone will get all weapons with full ammo, and green armour.



7
: "
tac
" /
tactics [ffa] mode
. No items will spawn, but everyone will spawn with only base ammo for 2 random weapons and g
reen
armour.



8
: "
tacteam
" /
tactics [team] mode
. No items will spawn, but everyone will spawn with only base ammo for 2 random weapons and
green armour.



9
: "
capture
" /
capture mode
, see capture mode section be
low.



10
: "
regencapture
" /
regen capture mode
, like capture mode but with no respawn timer, and you regenerate health, armour, and
ammo by standing on bases you own.



11
: "
ctf
" /
capture
-
the
-
flag mode
. Capture

the flag where you must retrieve the enemy flag and return it to your own flag for points.



12
: "
instactf
" /
insta ctf mode
. Capture the flag as above, but with weapons, health, and items as in instagib mode.



13
: "
protect
" /
protect mode
. Touch the enemy flag for points. Protect your own flag by picking it up.



14
: "
instaprotect
" /
insta protect mode
. Like protect mode above, but with weapons, health, and items as in instagib mode.




15
: "
hold
" /
hold mode
. Hold the flag for a time to score points.



16
: "
instahold
" /
insta hold mode
. Like hold mode above, but with weapons, health, and items as in instagib mode.



17
: "
efficctf
" /
efficiency ctf
. Capture the flag as above, but with weapons, health, and items as in efficiency mode.



18
: "
efficprotect
" /
efficiency protect
. Like protect mode above, but with weapons, health, and items as in eff
iciency mode.



19
: "
effichold
" /
efficiency hold
. Like hold mode above, but with weapons, health, and items as in efficiency mode.



-
1
: "
demo
" /
demo playback mode
, see demo recording section below.



-
2
: "
dmsp
" /
death
-
match single player,
an arena style SP mode (akin to my "DMSP" mod for quake) which you play on DM
(actually any) maps: 10 seconds after the game starts monsters start spawning in (currently about 1 per second), which will
immed
iately be angry at you. The map ends when they all have spawned and they are all killed (either by you or by their buddies ;)
.
The number of monsters depends on the "skill" variable. Items respawn as in DM.




-
3
: "
sp
" /
single player
,
a cl
assical progress
-
based monsters
-
wake
-
up
-
when
-
they
-
see
-
you mode which is very similar to Doom &
Quake, and is played on maps specifically designed for SP. Items don't re
-
spawn.



Frag counting is the same for all modes: 1 for a frag,
-
1 for a suicide or a t
eamkill. Time limit for all games is 10 minutes, or 15 minutes for
teamplay, and no timelimit for mode 1 (and mode 0 in a local game).

Either single player mode can be turned into "slow motion SP" by toggling the "
slowmosp
" var. These modes that work the
same as regular SP,
except that the gamespeed is directly derived from your health, so the more damage you take, the more in slow motion the game

plays. Slow
motion, while in one way a punishment for your failures, also makes it easy to escape enemy fire a
nd land perfect hits, therefore allowing you
to recover. Besides that, it just looks/feels plain cool. These modes do not support the concept of death, you are simply goi
ng "infinitely" slow
at health = 1. To compensate, there is health regeneration, which

is faster the less health you have. Your score (see SP respawning below) will
be measured in real time, so any slow motion time negatively affects your score ("simulation time" shown is the time you woul
d have taken
with no slowdown at all).

Note: you ca
n also use the abbreviation to invoke mode as in:
sp <map>
. Will load <map> and start in "sp" mode (
mode
-
3
)


skill N

Sets the skill level (1
-
10) for single player modes. Default = 3. Affects number of monsters in DMSP mode, and general

monster AI in
all SP modes.

showgui servers

Displays the server menu. The server menu contains the last N servers you connected to, sorted by ping (servers are pinged
automatically when bringing up this menu). Just select one to connect again. If you
connect to a server by typing "connect" manually, the server
gets added here automatically. You can also add servers to "servers.cfg" manually.

updatefrommaster

Contacts the masterserver and adds any new servers to the server list (written to servers.c
fg on exit). (see also
multiplayer menu).

clearservers [N]

Clears all servers from the server browser's list. If N is 0 or not specified, only servers added by the masterserver are
cleared. If N is 1, all servers are cleared, including kept servers.

k
eepserver NAME PORT [PASSWORD]

Adds a server to the server browser's list with ip address NAME and port PORT. If PASSWORD
is specified, this password is used when clicking on the server in the server browser. This command causes the server to rema
in in
the server
browser's list even if the server list is updated from the master server or servers are cleared.

addserver NAME PORT [PASSWORD]

Adds a server to the server browser's list with ip address NAME and port PORT. If PASSWORD
is specified, this pas
sword is used when clicking on the server in the server browser. Note that servers added to the list with this command will
be removed when the list is updated from the masterserver!

paused B

Whether the game is paused or not (default 0, default key F1

toggles).

blood B

Toggles whether blood is enabled (default 1).

damageblendfactor F

The higher F, the longer the screen will stay red when you are damaged.

damageblend B

Toggles whether the screen is blended red when damaged (default 1).

dama
gecompass B

Toggles whether compass arrows are shown, indicating the amount and direction of damage taken (default 1).

sendmap

getmap

These two commands allow you to send other players maps they may not have while in multiplayer mo
de, and easily
keep maps in sync while doing coop edit. "
sendmap
" reloads the current map you are on, then uploads it to the server and sends every other
player a message about it. Other players can then simply type "
getmap
" to receive the current map, whi
ch is written to their local disk then
reloaded. A second variant "
sendmap name
" is available which is particularly useful for coop editing, which first does a "
savemap name
" before
performing the actual "
sendmap
". Thus in both cases you must already be on

the map you want to send before issuing the command! (in some
multiplayer that requires voting). Also note that "
getmap
" operates on the last map sent by some other player, whatever it is.



Server Configuration

Commands


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:

startlistenserver [MASTER]

Starts

a listen server from within a running game client. If MASTER=1, then the server will report to the
master server, other if MASTER=0 or not supplied the server will not report to the master server. The various server configur
ation commands
can be used befo
re this command to setup properties of the listen server.

stoplistenserver

Stops a listen server running from within a game client.

serverip S

Sets the IP the server should bind/listen to S. This is only useful if your server is running on a host wit
h multiple interfaces.

serverport N

Sets the port the server should bind/listen to N. By default, server's listen on port 8785.

maxclients N

Sets the maximum number of clients that can connect to the server to N.

serverbotlimit N

Sets the maximum
number of bots a master can add to N. Admins are unaffected by this limit.

publicserver B

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

serverdesc S

Sets the description shown for the server in the server browser to S.

serverpass S

Sets the password required to connect to the server to S. This option is only u
seful if you don't want anyone connecting to your
server.

adminpass S

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.

servermotd S

Sets the "message

of the day", a message shown to users when they connect to the server, to S.

updatemaster B

Toggles whether or not the server should report to the masterserver. B=1 enables (default) and B=0 disables.

mastername S

Sets the IP of the master server th
e server reports to. This defaults to "sauerbraten.org" and generally should not be changed.


Editing


edittoggle

Switches between map edit mode and normal (default key: e). In map edit mode you can select bits of

the map by clicking or
dragging your crosshair on the cubes (using the "attack" command, normally MOUSE1), then use the commands below to modify the

selection.
While in edit mode, physics & collision don't apply (noclip), and key repeat is ON.


dragging 0/1

Select cubes when set to 1. stop selection when set to 0

editdrag

Select cubes and entities. (default: left mouse button)

selcorners

Select the corners of cubes. (default: middle mouse button)

moving 0/1

set to 1 to
turn on. when on, it will move the selection (cubes not included) to another position. the plane on which it will move
on is dependent on which side of the selection your cursor was on when turned on. set to 0 to turn off moving. if cursor is n
ot on select
ion when
turned on, moving will automatically be turned off.

editmovedrag

if cursor is in current cube selection, holding will move selection. otherwise will create new selection.

cancelsel

Cancels out any explicit selection you currently have (def
ault: space).

editface D N

This is the main editing command. D is the direction of the action,
-
1 for towards you, 1 for away from you (default: scroll
wheel). N=0 to push all corners in the white box (hold F). N=1 create or destroy cubes (default). N=
2 push or pull a corner you are pointing at
(hold Q).

gridpower N

Changes the size of the grid. (default: g + scrollwheel)

edittex D

Changes the texture on current selection by browsing through a list of textures directly shown on the cubes. D is t
he direction you
want to cycle the textures in (1 = forwards,
-
1 = backwards) (default: y + scrollwheel). The way this works is slightly strange at first, but allows
for very fast texture assignment. All textures are in a list. and each time a texture is u
sed, it is moved to the top of the list. So after a bit of
editing, all your most frequently used textures will come first, and the most recently used texture is set immediately when y
ou press the forward
key for the type. These lists are saved with the ma
p.

gettex

moves the texture on the current selection to the top of the texture list. Useful for quickly texturing things using already
textured
geometry.

selextend

Extend current selection to include the cursor.

passthrough

normally cubes of eq
ual size to the grid are given priority when selecting. passthrough removes this priority while held down so
that the cube the cursor is directly on is selected. Holding down passthrough will also give priority to cube over entities.
(default: alt)

reorie
nt

Change the side the white box is on to be the same as where you are currently pointing. (default: shift)

flip

Flip (mirror) the selected cubes front to back relative to the side of the white box. (default: x)

rotate D

Rotates the selection 90

degrees around the side of the white box. Automatically squares the selection if it isn't already. (default: r +
scroll wheel)

undo

Multi
-
level undo of any of the changes caused by the above operations (default: z [or u]).

redo

Multi
-
level redo of

any of the changes caused by the above undo (default: i).

copy

paste

Copy copies the current selection into a buffer. Upon pressing 'paste', a selection box will be created to identify the locat
ion of
the pasted cubes. Releasing the '
paste' button will actually paste the cubes. So combined with the 'moving' command you can easily place and
clone sets of cubes. If the current gridsize is changed from the copy, the pasted copy will be stretched by the same factor.

editcopy

editpaste

Will copy cubes as normal copy, but also features entity copies. There are three different methods of use:



If no entity is explicitly selected, editcopy will copy the selected cube, just like normal the normal 'copy' command.



If one
or more entities are selected, editcopy will copy the last entity selected. Editpaste will create a new entity using copy as
the
template if no entities are selected, otherwise it will overwrite all selected entities with the copied ent.



If there are both

entity and cube selections, editcopy will copy the entire selection. In other words, when editpaste is used it will paste
the cube selection along with all of the entities that were selected.

replace

Repeats the last texture edit across the whole map.
Only those faces with textures matching the one that was last edited will be
replaced.

replacesel

Repeats the last texture edit only within the currently selected region. Only those faces with textures matching the one that

was
last edited will be repl
aced.

editmat MAT [FILTER]

Changes the type of material left behind when a cube is deleted to MAT. If FILTER is specified, then only cubes
with that material named by FILTER are changed to MAT. MAT may also be "", indicating that only those parts of th
e material mask matching
FILTER will be cleared, as opposed to setting MAT to "air", which would clear the entire material mask.

Currently the following types of materials are supported:



air
: the default material, has no effect. Overwrites other volume m
aterials.



water
: acts as you would expect. Renders the top as a reflection/refraction and the sides as a waterfall if it isn't contained. Sh
ould be
placed with a floor at the bottom to contain it. Shows blue volume in edit mode. Overwrites other volume ma
terials.



glass
: a clip
-
like material with a blended/reflective surface. Glass also stops bullets. Will reflect the closest envmap entity, or if none

is
in range, the skybox. Shows cyan volume in edit mode. Overwrites other volume materials.



lava
: renders

the top as a glowing lava flow and the sides as lavafalls if it isn't contained. It kills any players who enter it. Shows
orange volume in edit mode. Overwrite other volume materials.



clip
: an invisible wall that blocks players movement but not bullets.
Is ideally used to keep players "in bounds" in a map. Can be used
sparingly to smooth out the flow around decoration. Shows red volume in edit mode. Overwrites other clip materials.



noclip
: cubes are always treated as empty in physics. Shows green volume
in edit mode. Overwrites other clip materials.



gameclip
: a game mode specific clip material. Currently it can block monsters in SP modes, it can stop flags from being picked up in
areas in CTF/protect modes, and it can stop capturing of bases in areas in
capture modes. Overwrites other clip materials.



death
: causes the player to suicide if he is inside the material. Shows black volume in edit mode.



alpha
: all faces of cubes with this material are rendered transparently. Use the "valpha" and "texalpha" co
mmands to control the
transparency of front and back faces. Shows pink volume in edit mode.

recalc

Recalculates scene geometry. This also will regenerate any envmaps to reflect the changed geometry, and fix any geometry with

"bumpenv*" shaders to use t
he closest available envmaps. This command is also implicitly used by
calclight
.

havesel

Returns the number of explicitly selected cubes for scripting purposes. Returns 0 if the cubes are only implicitly selected.

gotosel

Goes to the position of the currently selected cube or entity.


The HUD


On the bottom left of the screen are a bunch of stats. You'll find out what they mean below.



cube
: the number of cubes in the current selection. Only the vi
sible (leaf) cubes are counted.



fps
: frames per second



ond
: number of cubes in the system. This includes parent cubes, copied cubes, and undos.



va
: number of vertex arrays used to store vertices in the map. You probably don't need to use this.



vtr
: num
ber of triangles currently being displayed. Will be a useful stat when culling is done.



vvt
: number of vertices currently being displayed. Useful when culling is done.



tri
: number of triangles in the entire map



wvt
: number of vertices in the entire map



evt
:
misc rendering effects. Stuff like particles displayed, or text written on screen.


hidestats 0/1

Turn on to hide the above stats

hidehud 0/1

Turn on to hide all HUD elements


Settings


undomegs N

S
ets the number of megabytes used for the undo buffer (default 5, max 100). Undo's work for any size areas, so the amount of
undo steps per megabyte is more for small areas than for big ones.


showsky B

This variable controls whether e
xplicit sky polygons are outlined (in purple) in edit mode. Default = 1.

outline B

This variable controls whether geometry boundaries (outlines) are shown. Default = 0. (Default key
7)

wireframe 0/1

Turns on wireframe drawing of the map. (Default ke
y
8)

allfaces 0/1

when on, causes the texture commands to apply the new texture to all sides of the selected cubes rather than just the selecte
d
face. (Default key
0)

showmat B

This variables whether volumes are shown for invisible material surfaces

in edit mode. Material volumes may also be selected
while this is enabled. Default = 1.

optmats B

This variables controls whether material rendering should be optimized by grouping materials into the largest possible surfac
es.
This will always make re
ndering faster, so the only reason to disable it is for testing. Default = 1.

entselradius N

Sets the 'handle' size of entities when trying to select them. Larger sizes means it should be easier to select entities.

entselsnap 0/1

Turns on snap
-
to
-
g
rid while dragging entities. (default: 6)

entitysurf 0/1

When on, you will move with the entity as you push it with the scroll wheel. Of course, in order to push an entity, you must
be
holding it.

selectionsurf 0/1

When on, you will move with the s
election box as you push it with the scroll wheel. Of course, in order to push a selection
box, you must be holding it.


Heightfield


Heightfields are very different than what most people are probably used to; they are just normal

cubes and are NOT special meshes. Really, it's
just another way of editing the same geometry. Editing this way is a bit different from normal editing, but just as easy. Fir
st, instead of selecting
cubes, you select a brush (B+wheel) and textures (middle m
ouse button while in heightmap mode to toggle). Once this is done, you can apply
the brush to all cubes that match the textures you've selected. Making hills and valleys can be quite fast when using this fe
ature. By default all
textures are automatically s
elected.

hmapedit 0/1

Set to 1 to turn on heightmap mode (default: hold LCTRL or use H to toggle on and off). In heightmap mode the cursor will
turn bright green when hilighting heightmap cubes and the
editface

command will

now use brushes to edit heightmap cubes. In order to avoid
accidental edits only heightmap cubes are editable in this mode. If a cubic selection is present, then only cubes within the
column of the
selection will be modifiable.

hmapselect

Selects the
texture and orientation of the hilighted cube (default: mouse buttons while in heightmap mode, or H key). If
hmapselall is set to 1, then all textures are automatically selected, and this command will simply select the orientation. Al
l cubes, of equal or
l
arger size, that match the selection will be considered part of the heightmap.

hmapcancel

Return the heightmap texture selection to default (ie: select all textures).

selectbrush D

Switches between the various height map brushes (default: hold B +
wheel).

clearbrush

This resets the current brush that is used during heightmap mode editing.

brushvert x y depth

A brush is a 2D map that describes the depth that the editface commands should push into the cubes at various points.
The first two pa
rameters of brushvert are the X and Y coordinates, respectively, of a vert on this 2D map. The last parameter is used to set
the
depth. NOTE: if all of the brush verts are 0, then a smoothing filter will be applied instead of the brush. This filter will
af
fect the same square
sized region as the brush.

brushx

brushy

Along with the 2D map, all brushes also have a handle. This handle is a reference point on the 2D map which defines where
the brush is relative to the editing cursor. These

two variables define the brush handle's coordinates.


Texture Blending


Texture blending in maps is accomplished by smoothly blending two textures together to create variations on architecture and
terrain.


Defining Blended Textures


Texture blending can use any two textures that are already set in your map.cfg, but you need to define the textures normally
first. Texture
thumbnails that have an additional texture layer to blend will hav
e the texture they are set to blend with in one of the corners in the texture
browser (f2).

To set up textures to blend, in your map cfg, under the texture that you want to have a second texture layer, you would add:
texlayer N

N is
the index of the te
xture slot you want to use as the bottom texture layer to blend with. Texture slots start at 0, which is the first slot, 1 is

the
second slot, 2 is the third slot, etc. If N is a negative number, it will reference N slots back from the current slot, i.e.
-
1 references the previous
texture slot.
vlayer N

Sets the bottom texture layer for all textures in the current selection, as if by "
texlayer
" command. However, negative
values of N are not supported.

Blend Brushes


There will be a number of brushes alre
ady included and set up in the default "data/brush.cfg". If you want to set up your own brush, create a
grayscale PNG file to use as a pattern. Keep in mind that the size of the brushes are relatively large, and not meant for sup
er detailed work. So a
16 x

16 size image will make a brush that covers a very large patch of architecture.


Adding a new Brush


addblendbrush N F

Where N is the name of your brush, that you will use later to load the bru
sh, and F is the file name, relative to the data
directory. So if the brush you want to add is called "mybrush.png", then you would add the following line to your map.cfg fil
e:
addblendbrush
mybrush "mybrush.png"
. Note that the file name of the brush image

is relative to the root directory.


Loading a Brush


setblendbrush N

Where N is the name of your brush that you defined in the cfg, or the name of an existing brush. So to set the brush to the
one t
hat was defined above, you would open the console with the tilde key and type:
/setblendbrush mybrush


nextblendbrush N

Selects the next brush after the current one if N is not specified, or is 1. Otherwise, it will advance the current brush
selected by

N over the list of brushes. N may be negative, in which case it will go backwards in the list of brushes. By default this is
bound to
the scroll wheel.

rotateblendbrush

Rotates the current blend brush. By default this is bound to MOUSE2 (right mouse b
utton).


Painting


First, texture the surfaces that you will want to paint with the textures that have had an extra texture layer defined for th
em in your map.cfg.
You can only paint on textures that have had a second layer defined i
n the cfg. Now, you need to turn on a painting mode with the following
command:


blendpaintmode N

Where N is a number from 0 to 5, which defines how the painting will be done. Setting it to 0 turns paint mode off.
Usually you should paint with mode 2. B
y default each of these modes are bound to their corresponding number on the numeric keypad.



0

-

off




1

-

"
replace
"

-

use for replacing/clearing



2

-

"
dig
" min(destination, source)
-

use for digging where black is the dig pattern



3

-

"
fill
" max(destinati
on, source)
-

use for filling where white is the fill pattern



4

-

"
inverted

dig
"min(destination, invert(source))
-

use for digging where white is the dig pattern



5

-

"
inverted fill
"max(destination, invert(source))
-

use for filling where black is the fil
l pattern

Experiment with the numbers to understand what they do. Finally, in order to paint on to the surface, you would open the cons
ole and type

paintblendmap

If you've done everything right, you should see your first blended textures. By default th
is is bound to MOUSE1 (left mouse
button).

showblendmap

If for some reason the blendmap gets messed up while editing, you can use this command cause the blendmap to reshow
without doing a full calclight.


Reverting Paints


There is NO UNDO for texture blending. If you've screwed something up, you can do one of two things. Open the console with th
e tilde key
and type


clearblendmap

This will delete ALL of the texture blending for the ENTIRE level.

clearblendmapsel

Th
is will clear the texture blending on the selected geometry.


Blending Hints and Tips


The amount of rendering passes the engine is required to make doubles on areas where the textures have been blended.




Entity


newent type value1 value2 value3 value4

Adds a new entity where (x,y) is determined by the current selection (the red dot corner) and z by
the camera height, of said type. Type is a string

giving the type of entity, such as "light", and may optionally take values (depending on the
entity). The types are defines below in the
Entity Types

section.


delent

deletes the selected entities

entfl
ip

flip the selected entities. cube selection serves as both reference point and orientation to flip around.

entpush D

push the selected entities. cube selection serves as orientation to push towards.

entrotate D

rotate the selected entities in
relation to the cube selection.

entmoving 0/1/2

set to 1 to turn on. if an entity is under the cursor when turned on, the entity will get toggled selected/unselected (set to

2 to
add to selection instead of toggle). if selected, one can move the entity

around using the cursor. if multiple entities are selected, they will also
move. the plane on which the entity will be moved is dependent on the orientation of the cube surrounding the entity. set to
0 to turn off
moving. if no entity is under the cursor
when turned on, it will automatically turn off.

entdrop N

variable controlling where entities created with "newent" will be placed. N=0 place entities at your current eye position. N=
1 drop
entities to the floor beneath you. Lights, however, will be pl
aced at your current eye position as for N=0. N=2 place entities at the center of the
currently selected cube face. If a corner is selected, the entity will be placed at the corner vertex. N=3 behaves as with N=
2, except all entities,
including lights, wil
l then bedropped from that position to whatever floor lies beneath. This mode is useful for placing objects on selected
floors. Lights are also dropped to the floor, unlike for N=1.

dropent

Positions the selected entity according to the entdrop variabl
e.

trigger T N

Sets the state of all locked triggers with tag T to N.

platform T N

If N = 0, stops all platforms or elevators with tag T. If N = 1, causes all platforms or elevators with tag T to move forward
s or
up, respectively. If N =
-
1, causes

all platforms or elevators with tag T to move backwards or down, respectively.

entselect X

Takes a boolean expression as argument. Selects all entities that evaluate to true for the given expression. examples:



entselect insel

// select all entities i
n blue selection box



entselect [ strcmp (et) "shells" ]

// select all shells in map

entloop X

Loops through and executes the given expression for all selected entities. Note that most of the entity commands are already
vector
based and will automatical
ly do this. Therefore they don't need to be explicitly executed within an entloop. Entloop is to be used when more
precise custom instructions need to be executed on a selection.

Another property of entloop is that entity commands within it, that are norm
ally executed on the entire selection, will only be done on the
current entity iterator. In other words, the two following examples are equivalent:



entset light 120 0 0 0



entloop [ entset light 120 0 0 0 ]

The entset in the second statement will NOT be a
pplied n squared times. Entloops can be nested.


entcancel

Deselect all entities.

enthavesel

Returns the number of entities in the current selection.

entget

Returns a string in the form of "type value1 value2 value3 value4". This string is the d
efinition of the current selected entity. For
example, the following statement will display the values of all the entities within the current selection:



entloop [ echo (entget) ]

Outside of an entloop, the last entity selected will be returned. Normally,
if an entity is highlighted by the cursor, it will only be considered as
in the selection if an explicit one does not exist (like cubic selections). However, entget is special in that it considers t
he highlighted entity as
being the last entity in the sele
ction. Entget is used to generate the default entdisplay at the bottom of the screen.

insel

Returns true if the selected entity is inside the cube selection

et

Cuts out the 'type' field from entget.

ea N

Cuts out the given 'value' field from en
tget. Attributes are numbered 0 to 3.

entset type value1 value2 value3 value4

Change the type and attributes of the selected entity. To quickly bring up the entset command in the
console press '.' (default: period). It will come pre
-
filled with the val
ues of the current entity selection (from entget).

entproperty P A

Changes property P (0..3) of the selected entities by amount A. For example "entproperty 0 2" when executed near a
lightsource would increase its radius by 2.

entfind type type value1
value2 value3 value4

Select all entities matching given values. '*' and blanks are wildcard. All ents that match the
pattern will be ADDED to the selection.

clearents type

Deletes all entities of said type.

replaceents type value1 value2 value3 val
ue4

Replaces the given values for the selected entity and all entities that are equal to the selected
entity. To quickly bring up the replaceents command in the console press ',' (default: comma). It will come pre
-
filled with the values of the
current e
ntity selection.

entautoview N

Centers view on selected entity. Increment through selection by N. ex: N = 1 => next, N =
-
1 => previous.

entautoviewdist N

sets the distance from entity.


Entity Types


Entities are shown i
n editmode by blue sparklies, and the closest one is indicated on the HUD.


"light" radius r g b

If G and B are 0 the R value will be taken as brightness for a white light. A good radius for a small wall light is 64, for a

middle sized room 128... for
a sun probably more like 1000. Lights with a radius of 0 do not attenuate and may be more appropriate for
simulating sunlight or ambient light; however, this comes at the cost of slightly greater map file sizes. See the
lighting commands

for an
indepth list of all lighting related commands. (+ (* (+ (* $lightr 256) $lightg) 256) $lightb)

"spotlight" radius

Creates a spotlight with the given "radius" (in degrees, 0 to 90). A 90 degree spotlight will be a full hemisphe
re, whereas
0 degrees is simply a line. These will attach to the nearest "light" entity within 100 units of the spotlight. The spotlight
will shine in the
direction of the spotlight, relative to the "light" entity it is attached to. It inherits the sphere
of influence (length of the spotlight) and color
values from the attached light as well. Do not move these very far from the light they're or attached to or you risk them det
aching or attaching
to the wrong lights on a map load!

"envmap" [radius]

Creat
es an environment map reflecting the geometry around the entity. The optional radius overrides the maximum
distance within which glass or geometry using the "bumpenv*" shaders will reflect from this environment map. If none is speci
fied, the default
is tak
en from the variable "envmapradius" (which defaults to 128 units), which may also be set in map cfgs. Environment maps are ge
nerated
on a map load, or can be regenerated while editing using the "recalc" command. Please use the absolute minimum number of th
ese possible.
Each one uses up a decent amount of texture memory. For instance, rather than using two environment maps on each side of a wi
ndow, use
only one in the middle of the pane of glass. If you have a wall with many windows, place only one environme
nt map in the middle of the wall
geometry, and it should work just fine for all the windows.

"sound" N radius [size]

Will play map
-
specific sound N so long as the player is within the radius. However, only up to the max uses
allowed for N (specified in

the
mapsound

command) will play, even if the player is within the radius of more N sounds than the max. By
default (size 0), the sound is a point source. Its volume is maximal at the entity's location, and tapers off to 0 at t
he radius. If size is specified,
the volume is maximal within the specified size, and only starts tapering once outside this distance. Radius is always define
d as distance from
the entity's location, so a size greater than or equal to the radius will just
make a sound that is always max volume within the radius, and off
outside.

"playerstart" [Y] [T]

Spawn spot, yaw Y is taken from the current camera yaw (should not be explicitly specified to "newent"). If T is
specified, then the playerstart is used as

a team
-
spawn for CTF modes ONLY, where team T may be either 1 or 2, matching the parameter
supplied to "flag" entities. For all other modes, team T should either be 0 or simply not specified at all! Note that normal
playerstarts are never
used for CTF, an
d CTF playerstarts are never used for spawns in other modes.

"flag" [Y] T

A team flag for CTF maps ONLY. Yaw Y is taken from the current camera yaw (should not be explicitly specified to "newent").
Team T may be either 1 or 2. Playerstarts with a match
ing team will be chosen in CTF mode.

"base" [ammo [N]]

A base for capture mode. If N is specified, the alias "base_N" will be looked up, and its value used for the name of the
base, or otherwise a default name will be assigned. If ammo is specified, th
e base will always produce that type of ammo. If ammo is
unspecified or 0, the server will randomly choose a type of ammo to produce at the start of the match. If ammo is negative, t
hen it will pick a
random type, but will match all other bases with the sa
me negative ammo value. Ammo types are:



1
:
shells

(shotgun)



2
:
bullets

(chaingun)



3
:
rockets

(rocket launcher)



4
:
rifle rounds

(rifle)



5
:
grenades

(grenade launcher)



6
:
cartridges

(pistol)

"shells"

10 shells to a max of 30. Respawn 12/9/6 seconds.

"bullets"

20 bullets to a max of 60. Respawn 12/9/6 seconds.

"rockets"

5 rockets to a max of 15. Respawn 12/9/6 seconds.

"riflerounds"

5 rifle rounds to a max of 15. Respawn 12/9/6 seconds.

"grenades"

10 grenades to a max of 30. Respawn 12/9
/6 seconds.

"cartridges"

ammo: 30 pistol ammo to a max of 120. Respawn 12/9/6 seconds.

"health"

adds 25 to a max of MAXHEALTH (initially 100). Respawn 20/15/10 seconds.

"healthboost"

adds 10 to your MAXHEALTH (initially 100) until the end of the
current map. Respawn 60 seconds.

"greenarmour"

light armor: 100, absorbs 40% of damage. Respawn 20 seconds.

"yellowarmour"

heavy armor: 200, absorbs 60% of damage. Respawn 20 seconds .

"quaddamage"

quad powerup: 4x damage for 20 seconds. Respa
wn 60 seconds.

A variety of pickup
-
able items. Health and ammo respawn depends on number of players in the game, the numbers given are for 1
-
2, 3
-
4, and
5+ player games respectively.


"teleport" N [M]

"teledest" [Y] N [P]

Creates a teleport connecti
on, teleports are linked to a teledest with the same N (of which there
should be exactly one). N can be 0..255. Y is the yaw of the destination and is initially taken from the current camera yaw,
it cannot be
specified when creating the entity. If M is 0 o
r not specified, the default teleporter model is used. If M is
-
1, no model is rendered for the
teleporter. If M is a value 1 or greater, the corresponding mapmodel slot is used as the teleporter's model. If P is 1, the t
eledest preserves the
velocity of t
he player, otherwise the player's velocity is reset upon teleporting.

"jumppad" Z [Y] [X]

A jumppad entity which gives you a push in the direction specified. For example, "jumppad 30 5" makes you bounce
up quite a bit and also pushes you forward a bit
(so it is easier to land on a higher platform). This entity does not render anything, so you are
responsible for creating something that looks logical below this entity.

"mapmodel" [Y] N T R

A map model, i.e. an object rendered as md2/md3 which you col
lide against, cast shadows etc. Y is the yaw of the
model and is initially taken from the current camera yaw, it cannot be specified when creating the entity. N determines which

mapmodel you
want, this depends on "mapmodel" declarations in the maps cfg fil
e. T specifies mapmodel behavior such as triggers, see table below. R is the
trigger number, 0 means no trigger. This number specifies what trigger to activate, and in addition, the alias "
level_trigger_Trigger
" will be
executed, where Trigger is substitut
ed accordingly (this allows you to script additional actions upon a trigger, i.e. put this into your map cfg file
to print a message:
alias level_trigger_1 "echo A door opened nearby"
). The alias "
triggerstate
" will hold a value of
-
1, 0, or 1 indicating h
ow
the trigger was activated.

Type

Trigger states

Trigger how
often

Sound

Description

0


0


loops mapmodel animation

1


1


do trigger animation when touched for the first time only and return to starting position (best
for switches, use switch/lever mod
els)

2


1

rumble

same as above but with sound

3

toggle (0/1)

1


do trigger animation when touched for the first time only and stay in toggled position (best
for switches, use switch/lever models)

4

toggle (0/1)

1

rumble

same as above but with sound

5


N


do trigger animation when touched every time and return to starting position (best for
switches, use switch/lever models)

6


N

rumble

same as above but with sound

7

toggle (0/1)

N


do trigger animation when touched every time and toggle positions (
best for reversible
switches, use switch/lever models)

8

toggle (0/1)

N

rumble

same as above but with sound

9

closed/open
(0/1)

1

door?

opened by approach first time only, stays open afterwards. Collides while closed. (use door
specific models)

10

close
d/open
(0/1)

N

door?

opened by approach every time, closes after 5 seconds. Collides while closed. (use door
specific models)

11

locked (
-
1)

0/N

door?

opened/closed only by associated trigger. When approached while closed, collides and
invokes level trig
ger with triggerstate
-
1. (use door specific models)

12

disappear (0)

1


do trigger animation once when touched, disappear after (good for triggers that look more
like pickups, such as the carrot)

13

disappear (0)

1

rumble

same as above but with sound

1
4

disappear (
-
1)

0


like 11, but disappears after opening.

29

disappear (0)

1

end?

FPS specific. END LEVEL

Be careful when using "switch many" for thing that affect gameplay, such as opening doors, as it can be confusing. Best is to

reserve a
particular

model to mean "many" and others "once". All types >0 are snapped to 15 degree angles for orientation.


"box" [Y] N W

"barrel" [Y] N W H

Like a mapmodel, except that damage done to it will push the entity around. Y is the yaw of the
model and is ini
tially taken from the current camera yaw, it cannot be specified when creating the entity. N determines which mapmodel you
want, this depends on "mapmodel" declarations in the maps cfg file. W is the weight of the box or barrel where the heavier it

is the
less it
moves; if W is not specified or 0, it defaults to 25. Barrels, unlike boxes, will explode if more than H damage is done to th
em; if H is not
specified or 0, it defaults to 50.

"platform" [Y] N T S

"elevator" [Y] N T S

Like a mapmodel, except

it moves around and carries players, monsters, or other dynamic
entities. Y is the yaw of the model and is initially taken from the current camera yaw, it cannot be specified when creating
the entity. N
determines which mapmodel you want, this depends on
"mapmodel" declarations in the maps cfg file. A platform will travel horizontally back
and forth along the direction of its yaw, while an elevator will travel only up and down. When they hit an obstacle such as g
eometry, they will
reverse their direction.
T is a tag that may be used to start or stop the elevator with the "platform" command; if a non
-
zero tag is specified, then
the platform or elevator will stop upon hitting an obstacle, rather than reversing direction. S is the speed at which the ent
ity mov
es, in units per
second; if S is not specified or 0, it defaults to to 8.

"monster" N [T]

A monster, currently N = 0..8 (see gameplay docs). Monster entities will be spawned when in classic single player mode,
and will attack you when you come into vie
w. yaw is taken from the current camera yaw. T is an optional tag number that is assigned to this
monster. When the monster dies, the script alias "monster_dead_T" will be invoked.

There are currently 9 monsters, with the following properties:

number

mod
el

gun used

damage

stamina

speed

freq

lag

rate

loyalty

0

ogro

fireball

5

100

14

3

0

10

1

1

rhino

chaingun

7

70

18

2

70

1

2

2

ratamahatta

shotgun

50

120

12

1

100

30

4

3

slith

rifle

25

200

12

1

80

40

4

4

bauul

rocket launcher

30

500

10

1

0

20

6

5

hellp
ig

bite

12

50

22

3

0

10

1

6

knight

iceball

10

250

8

1

0

1

6

7

goblin

slimeball

7

100

12

1

0

20

2

8

spider

Grenade launcher








The models are just temp until I find some real monster models.

The
damage

given is for a single shot, where damage is si
mply a quarter of the equivalent player gun. For the shotgun
this is if he hits you at point blank range, but is a lot less at distance. RL guy of course deals out splash damage too.

Stamina

is the amount of damage taken before dying, speed is their movem
ent speed in units/sec (player = 24), and
freq is their relative frequency of spawning in DMSP mode.

"
lag
" is how long it takes them to press fire after they have decided they will shoot in a particular direction, which
means you can out
-
strafe their bull
ets (but still get hit when standing still or moving towards them). The number is in
msec on skill 0, and half as big on skill 10.

"
rate
" indicates how often they will attempt to shoot you while they have you in their sights. It is not an absolute fire
ra
te measure, as fire rate is lower with distance and has some absolute minimum. Again, it is also dependent on skill
(skill 10 fires twice as often as skill 0). "
loyalty
" indicates how often they have to be hit by another monster in a row
before they fight
back.

Other important parameters: monsters will at most jump down 4 units in height, unless their health is 100 or less, in
which case they always jump down.


"respawnpoint"

A respawnpoint for classic SP mode (see "SP Respawning"), when the player die
s, they will repsawn at the last one of these
they touched, otherwise they start at the
playerstart

entity.

"particles" type value1 value2 value3 value4

A particle emitter. Particles includes many of the effects as see
n for weapons, explosions, and
lens flares.

Type

Values

Description

0

radius, height, rgb (0x000..0xFFF)
-

0 values are compatible with older maps,
otherwise radius&height=100 is a 'classic' size

colored flames with smoke

1

direction (0..5)

steam vent

2

direction (0..5)
-

color comes from water color

water fountain

3

size (0..40), rgb (0x000..0xFFF)

explosion, i.e. fire ball [*expensive compared to
other particles]

4

direction (0..5), length(0..100), rgb (0x000..0xFFF)

streak/flare

4

direction (256+e
ffect), length(0..100), rgb (0x000..0xFFF)

multiple streak/flare effect

Effect

Description

0..2

circlular

3..5

cylinderical shell

6..11

conic shell

12..14

cubic volume

15..20

planar surface

21

sphere

note: +32 to reverse direction of streaks

5

pe
rcentage (0..100), rgb (0x000..0xFFF)

capture meter, i.e. rgb vs black

6

percentage (0..100), rgb (0x000..0xFFF)

vs capture meter, i.e. rgb vs bgr

7

direction, length, rgb
-

see type 4

lightning

9

direction, length, rgb
-

see type 4

steam

10

direction,

length, rgb
-

see type 4

water

11

radius, height, rgb
-

radius&height=100 is a 'classic' size

flames

12

radius, height, rgb
-

radius&height=100 is a 'classic' size

smoke plume

32

red (0..255), green (0..255), blue (0..255)

plain lens flare

33

red (0..
255), green (0..255), blue (0..255)

lens flare with sparkle center

34

red (0..255), green (0..255), blue (0..255)

sun lens flare, i.e. fixed size regardless of distance

35

red (0..255), green (0..255), blue (0..255)

sun lens flare with sparkle center




Lighting Commands


ambient R [G B]

This sets the level of ambient light (default: 25), where R G B are color values 0..255. If only R is specified, it is interp
reted
as a
gray
-
scale light value. This is the minimum amount of light that a surface will get, even when no light entities reach the surface
.



edgetolerance N

This controls how far an intersection with some geometry has to be from the surface of the actual trian
gle in question before
it counts as a shadow (default: 4), where N is 1..8; the distance immediately in front of the triangle along the edge where i
t ignores shadows.

When lighting a map, each lightmap pixel is the result of many samples from a grid
-
patte
rn, as a result the sampling pattern may go over the
edge of one triangle but behind another. Increasing this variable helps alleviate this, especially in terrain heavy maps.

skylight R [G B]

This enables the skybox to "emit" light, that can be occlude
d by geometry or models in the map. A surface will cast a
number of rays (currently 17), and any of them that hit the skybox will contribute a portion of the R G B light value above t
he "ambient" level
to the surface (1/17th of the light). Effectively, the

light will vary between the "ambient" value and the "skylight" value depending on how
much of the skybox is visible. R G B are values in the range 0..255 (default: 0). If only R, is specified it is interpreted a
s a grayscale light value.
Use "skylight 0"
to disable.

lmshadows N

This controls the level of shadowing used when "calclight" or "patchlight" are not given a quality setting, where N is:



2

(default): world and mapmodel shadows



1
: world shadows only



0
: no shadows

lmaa N

This controls the l
evel of anti
-
aliasing used when "calclight" or "patchlight" are not given a quality setting, where N is:



3

(default): 8xAA



2
: 4xAA



1
: 2xAA



0
: no A
a

calclight Q

This calculates all lightmaps. Usually takes only a few seconds, depending on map size an
d settings. If you "savemap", the
lightmap will be stored along with it. Q is these predefined quality settings:



1
: 8x anti aliasing, world and mapmodel shadows (maximum quality, slow)



0

or not given: controlled by "lmshadows" and "lmaa" values



-
1
: no a
nti aliasing, world shadows only (low quality, good for lighting previews)

patchlight Q

This will calculate lightmaps for any newly created cubes. This will generally be much quicker than doing a "
calclight
", and so
is very useful when editing. However,

it will make very inefficient use of lightmap textures, and any new cubes will not properly cast shadows
on surfaces that are already lit. It is recommended you do a "
calclight
" on your map before you publish it with "
savemap
". A quality setting Q
may be
supplied, which behaves the same as for "calclight".

lightthreads N

This controls the number of threads (N) used by the "calclight" and "patchlight" commands You should set this variable to the

number of processor cores you have to get a speed
-
up. By d
efault (N=1), no multi
-
threading is used.

fullbright B

This variable controls whether the map will be shown with lighting disabled. Fullbright 1 will disable lighting, whereas 0 wi
ll
enable lighting. (Default = 0)

lerpangle A

Default = 44. This var
iable controls whether surface normals are interpolated for lighting. Normals are sampled at each vertex of
the surface. If the angle between two surfaces' normals (which meet at a vertex) is less than A, then the resulting normal wi
ll be the average of
th
e two. Normals are then later interpolated between the normals at the vertexes of a surface.

lerpsubdiv N

Default = 2. This allows more normals to be sampled at points along an edge between two vertexes of a surface. 2^N
-
1 extra
normals will be sampled

along the edge, i.e. the edge is split in half for every increment of N.

lerpsubdivsize N

Default = 4. This sets the minimum size to which an edge may be subdivided. Edges smaller than N or edge sections
smaller than N will not be sampled.

lightpreci
sion P

Default = 32. This is the most important variable for tweaking the lighting, it determines what the resolution of the lightma
p
is. As such has a BIG effect on calculation time, video memory usage, and map file size. The default is good for most m
aps, you may go as low
as 16 if you are lighting a really small map and love hard shadows, and for bigger maps you may need to set it to 64 or so to

get reasonable
memory usage.

The number to watch out for is the number of lightmaps generated which are sh
own on the HUD (and also as output after a calclight). 1 or 2
lightmap textures is very good, over 10 lightmap textures is excessive.

The map file size is 90% determined by the lightmaps, so tweak this value to get an acceptable quality to size ratio. Loo
k at the size of the map
files, sometimes a slightly higher
lightprecision

can halve the size of your .ogz.

Every surface matters, even though the engine attempts to compress surfaces with a uniform lightvalue, it is always a good id
eas to delete parts
of

the world that are not part of your map.
Lightprecision
,
lighterror
, and
lightlod

are stored as part of map files.


lighterror E

There should be little reason to tweak this. If in your map you can see visible polygon boundaries ca
used by lighting, you can
try stepping this down to 6 or 4 to improve quality at the expense of lightmap space. If you have an insanely large map and l
ooking for ways to
reduce file size, increasing error up to 16 may help. (Default = 8)

lightlod D

Def
ault = 0. This will double the resolution of lightmaps (cut the
lightprecision

in half) if size of the surface being lit is smaller
than 2^D units. This allows large maps to have pockets of detailed lighting without using a high resolution over everything.

NOTE: if you feel
like using this, test it thoroughly. On medium or small sized detailed maps, this command wastes space, use
lightlod

0.
Lightlod

> 0 is only
useful for huge maps

blurlms N

This variable controls whether to apply a blur filter to the
lightmap after they are generated, as a post
-
pass. For N=0, no blur is
applied. For N=1, a 3x3 blur filter is used. For N=2, a 5x5 blur filter is used. NOTE: this can cause lightmaps to mismatch a
t surface
boundaries in complex scenes.

blurskylight N

T
his variable controls whether to apply a blur filter to the ambient skylight (enabled via the "
skylight
" command) before it is
combined with the other lighting to create the final lightmap. This variable is useful for softening the skylight and making
it a
ppear more
scattered. For N=0, no blur is applied. For N=1, a 3x3 blur filter is used. For N=2, a 5x5 blur filter is used.

dumplms

Dumps all lightmaps to a set of .bmps. Mostly interesting for developers, but mappers may find it interesting too.



Map and Config


map name

Loads up map "name" in the gamemode set previously by "mode". A map given as "blah" refers to "packages/base/blah.ogz",
"mypackage/blah" refers to "packages/mypackage/blah.ogz". The menu
has a set of maps that can be loaded. See also map in the gameplay
docs.

At every map load, "data/default_map_settings.cfg" is loaded which sets up all texture definitions etc. Everything defined in

there can be
overridden per package or per map by creati
ng a "package.cfg" or "mapname.cfg" which contains whatever you want to do differently from the
default. It can also set up triggers scripts per map etc.

When the map finishes it will load the next map when one is defined, otherwise reloads the current ma
p. You can define what map follows a
particular map by making an alias like (in the map script):
alias nextmap_blah1 blah2

(loads "blah2" after "blah1").

sendmap

Saves the current map (without lightmaps) and sends it to the server so other clients may
download it. Only works in coopedit
game mode.

getmap

Gets a map from the server if one is available. Automatically loads the map when done. Only works in coopedit game mode.

savemap name

savecurrentmap

Saves the current m
ap, using the same naming scheme as "map". Makes a versioned backup to
"mapname_N.BAK" if a map by that name already exists, so you can never lose a map. With "savemap", if you leave out the "name
" argument,
it is saved under the current map name. With "sa
vecurrentmap", the map is saved with the name determined by the current game. Where you
store a map depends on the complexity of what you are creating: if its a single map (maybe with its own .cfg) then the "base"

package is the
best place. If its multiple

maps or a map with new media (textures etc.) its better to store it in its own package (a directory under "packages"),
which makes distributing it less messy.

newmap size

Creates a new map of size^2 cubes (on the smallest grid size). 10 is a small map
, 15 is a large map but it goes up to 20.

mapenlarge

Doubles the dimensions of the current map.

maptitle "Title by Author"

sets the map title, which will be displayed when the map loads. Either use the above format, or simply "by
Author" if the map

has no particular title (always displayed after the map load msg).

loadsky NAME [SPIN]

loads the skybox described by NAME, where NAME is a file name relative to the "packages/" directory. The engine
will look for 6 sky box images: NAME_up.jpg, NAME_dn
.jpg, NAME_lf.jpg, NAME_rt.jpg, NAME_ft.jpg, NAME_bk.jpg. These represent
the skybox in the up, down, left, right, front, and back directions, respectively. If a .jpg file is not found, it will attem
pt to search for the files
with a .png extension. SPIN, i
f specified, is floating point value that specifies, in degrees per second, the rate at which to spin/yaw the skybox.
NOTE: This is an alias for the "
skybox
" and "
spinsky
" commands.

texturereset

Sets the texture slot to 0 for the subsequent "texture" c
ommands.

materialreset

Resets the material texture slots for subsequent "texture" commands.

texture TYPE FILENAME ROT X Y SCALE

ARGUMENT

DESCRIPTION

FILENAME

Binds the texture indicated to the current texture slot, then increments the slot number dep
ending on TYPE.

TYPE

Specifying the primary diffuse texture advances to the next texture slot, while secondary types fill additional texture units

in
the order specified in the .cfg file. Allows secondary textures to be specified for a single texture slo
t, for use in shaders and
other features, the combinations of multiple textures into a single texture are performed automatically in the shader renderi
ng
path:



"
c
" or
0

for primary diffuse texture (RGB)



"
u
" or
1

for generic secondary texture



"
d
" for dec
als (RGBA), blended into the diffuse texture if running in fixed
-
function mode. To disable this combining,
specify secondary textures as generic with 1 or "u"



"
n
" for normal maps (XYZ)



"
g
" for glow maps (RGB), blended into the diffuse texture if running
in fixed
-
function mode. To disable this
combining, specify secondary textures as generic with 1 or "u"



"
s
" for specularity maps (grey
-
scale), put in alpha channel of diffuse ("c")



"
z
" for depth maps (Z), put in alpha channel of normal ("n") maps



"
e
" for

environment maps (skybox), uses the same syntax as "loadsky", and set a custom environment map
(overriding the "envmap" entities) to use in environment
-
mapped shaders ("bumpenv*world")

This may also be a material name, in which case it behaves like 0, but

instead associates the slot with a material.

ROT

Specifies preprocessing on the image, currently only rotation and flipping:



0

= none



1

= 90 CW



2

= 180



3

= 270 CW



4

= X flip



5

= Y flip

X and Y

These are the X and Y offset in texels.

SCALE

This w
ill multiply the size of the texture as it appears on world geometry.


autograss FILENAME

Automatically generates grass for the current texture slot on any upward facing surface. The grass texture
FILENAME is used to to textu
re the grass blades.

grassscale N

Sets the scaling of all grass textures to N where N=1..64 (default: 2).

grasscolour R G B

The colour of the grass, specified as R G B values from 0..255 (default: 255 255 255).

grassalpha A

Sets the opacity of
all grass textures to A where floating point value A=0..1 (default: 1).

texscroll X Y

Scrolls the current texture slot at X and Y Hz, along the X and Y axes of the texture respectively.

texrotate N

Rotates the current texture slot by N*90 degrees f
or N=0..3. N=4 flips along the X axis, and N=5 flips along the Y axis.

vrotate N

Rotates all textures in the current selection as if by the "texrotate" command.

texoffset X Y

Offsets the current texture slot by X and Y texels along the X and Y axes

of the texture respectively.

voffset X Y

Offsets all textures in the current selection as if by the "texoffset" command.

texscale N

Scales the current texture slot such that it is N times its normal size.

vscale N

Scales all textures in the cu
rrent selection as if by the "texscale" command.

texalpha F B

Sets the alpha transparency of the front faces to F and back faces to B, where F and B are floating point values in the range

0.0
to 1.0. F defaults to 0.5, and B defaults to 0 (invisible).

valpha F B

Sets the alpha transparency of all textures in the current selection as if by the "texalpha" command.

texcolor R G B

Sets the color multiplier of the current texture slot to the color R G B, where R, G, and B are floating point values in

the
range 0.0 to 1.0. The default is white, i.e. (1.0 1.0 1.0).

vcolor R G B

Sets the color multiplier of all textures in the current selection as if by the "texcolor" command.

Vreset

Resets the texture configuration of all textures in the current

selection to the defaults defined in the map cfg file.

vdelta BODY

Excutes all of the "v*" commands in BODY such that they now only add to the current values for the textures in the current
selection, rather than simply setting them. For example, vdel
ta [vrotate 1] would add 1 to the current rotation value for the textures, rather than
just setting their rotation value to 1. This affects the "vrotate" (adds), "voffset" (adds), "vscale" (multiplies), "vshaderp
aram" (overrides), and
"vcolor" (multiplies)

commands.

fog N

Sets fog distance to N (default: 4000). You can do this for tweaking the visual effect of the fog, or if you are on a slow ma
chine, setting
the fog to a low value can also be a very effective way to increase fps (if you are geometry li
mited). Try out different values on big maps or
maps which give you low fps.

fogcolour R G B

The colour of the fog, specified as R G B values from 0..255 (default: 128 153 179).

waterspec N

This sets the percentage of light water shows as speculari
ty (default: 150).

waterfog N

Sets the distance beneath the surface of water at which it fogs, from 1..10000 (default: 150).

watercolour R G B

Sets the the colour of fog inside the water to the specified R G B value from 0..255 (default: 20 70 80).

Used to give
water some colour. Setting to the values 0 0 0 will cause it to reset to the default watercolour.

waterfallcolour R G B

Sets the the colour used for waterfall turbulence to the specified R G B value from 0..255 (default: 0 0 0). If the
de
fault of 0 0 0 is specified, waterfalls will use the colour supplied via "watercolour" instead.

lavafog N

Sets the distance beneath the surface of lava at which it fogs, from 1..10000 (default: 50).

lavacolour R G B

Sets the the colour of fog insid
e the lava to the specified R G B value from 0..255 (default: 255 64 0). Used to give lava
some colour. Setting to the values 0 0 0 will cause it to reset to the default watercolour.

shader TYPE NAME VS PS

defines a shader NAME with vertex shader VS an
d pixel shader PS (both in ARB OpenGL 1.5 assembly
format). See data/stdshader.cfg for examples. These definitions can be put in map cfg files or anywhere else, and will only b
e compiled once.
TYPE indicates what resources the shader provides, or what back
up method should be used if the graphics card does not support shaders.
TYPE is either 0 for default shader, or 1 for normal
-
mapped world shaders. Requires DX9 / shader 2 class hardware (radeon 9500 or better,
geforce 5200 or better) to run (older hardware

will default to basic rendering).

fastshader NICE FAST N

Associates shader FAST so that it will run in place of shader NICE if shaderdetail is less than or equal to N.

setshader NAME

Sets a previously defined shader as the current shader. Any foll
owing texture slots (see "texture" command) will have this
shader attached to them. Any pixel or vertex parameters are reset to the shader's defaults when this command is used.

setshaderparam NAME X Y Z W

Overrides a uniform parameter for the current s
hader. Any following texture slots will use this pixel
parameter until its value is set/reset by subsequent commands. NAME is the name of a defined parameter of the current shader.

It's value is set
to the vector (X, Y, Z, W). Coordinates that are not spec
ified default to 0.

vshaderparam NAME X Y Z W

Overrides a uniform parameter for the shaders of all textures in the current selection, as if by the
"setshaderparam" command.

setpixelparam INDEX X Y Z W

Overrides a pixel parameter for the current sha
der. Any following texture slots will use this pixel parameter
until its value is set/reset by subsequent commands. INDEX is the index of a program environment parameter (program.env[10+IN
DEX]) to
the pixel program of the current shader. It's value is set
to the vector (X, Y, Z, W). Coordinates that are not specified default to 0.

setvertexparam INDEX X Y Z W

Overrides a vertex parameter for the current shader. Any following texture slots will use this vertex
parameter until its value is set/reset by su
bsequent commands. INDEX is the index of a program environment parameter
(program.env[10+INDEX]) to the vertex program of the current shader. It's value is set to the vector (X, Y, Z, W). Coordinate
s that are not
specified default to 0.

setuniformparam NA
ME X Y Z W

Overrides a uniform parameter for the current shader. Any following texture slots will use this pixel
parameter until its value is set/reset by subsequent commands. NAME is the name of a uniform variable in the current GLSL sha
der. It's value

is set to the vector (X, Y, Z, W). Coordinates that are not specified default to 0.

SHADER

SHADER PARAMS

TEXTURE
SLOTS

DESCRIPTION

stdworld


c

The default lightmapped world shader.

decalworld


c, d

Like stdworld, except alpha blends decal texture on
diffuse
texture.

glowworld



glowcolor
:
Rk
,
Gk
,
Bk

-

multiplies the
glow map color by
the factors
Rk
,
Gk
,
Bk

c, g

Like stdworld, except adds light from glow map.

bumpworld


c, n

Normal
-
mapped shader without specularity (diffuse lighting
only).

bumpglow
world



glowcolor
: Rk, Gk,
Bk
-

multiplies the
glow map color by
the factors
Rk
,
Gk
,
Bk

c, n, g

Normal
-
mapped shader with glow map and without
specularity.

bumpspecworld



specscale
:
Rk
,
Gk
,
Bk

-

multiplies the
specular light color
by the factors
Rk
,
Gk
,
Bk

c, n

Normal
-
mapped shader with constant specularity factor.

bumpspecmapworld

same as above

c, n, s

Normal
-
mapped shader with specularity map.

bumpspecglowworld



glowcolor
:
Rk
,
Gk
,
Bk

-

multiplies the
glow map color by
the factors
Rk
,
Gk
,
Bk




specscale
:

Rk
,
Gk
,
Bk

-

multiplies the
specular light color
by the factors
Rk
,
Gk
,
Bk

c, n, g

Normal
-
mapped shader with constant specularity factor and
glow map.

bumpspecmapglowworld

same as above

c, n, s, g

Normal
-
mapped shader with specularity map and glow map.


bumpparallaxworld



parallaxscale
:
Scale
,
Bias

-

Scales the
heightmap offset

c, n, z

Normal
-
mapped shader with height map and without
specularity.

bumpspecparallaxworld



specscale
:
Rk
,
Gk
,
Bk

-

multiplies the
specular light color
by the factors
Rk
,
Gk
,
B
k




parallaxscale
:
Scale
,
Bias

-

Scales the
heightmap offset

c, n, z

Normal
-
mapped shader with constant specularity factor and
height map.

bumpspecmapparallaxworld

same as above

c, n, s, z

Normal
-
mapped shader with specularity map and height
map.

bumpp
arallaxglowworld



glowcolor
:
Rk
,
Gk
,
Bk

-

multiplies the
glow map color by
the factors
Rk
,
Gk
,
Bk




parallaxscale
:
Scale
,
Bias

-

Scales the
heightmap offset

c, n, z, g

Normal
-
mapped shader with height and glow maps, and
without specularity.

bumpspecparalla
xglowworld



glowcolor
:
Rk
,
Gk
,
Bk

-

multiplies the
glow map color by
the factors
Rk
,
Gk
,
Bk




specscale
:
Rk
,
Gk
,
Bk

-

multiplies the
specular light color
by the factors
Rk
,
Gk
,
Bk




parallaxscale
:
Scale
,
Bias

-

Scales the
heightmap offset

c, n, z, g

Normal
-
ma
pped shader with constant specularity factor, and
height and glow maps.

bumpspecmapparallaxglowworld

same as above

c, n, s, z, g

Normal
-
mapped shader with specularity, height, and glow
maps.

bumpenv*



envscale
:
Rk
,
Gk
,
Bk

-

multiplies the
environment m
ap
color by the factors
Rk
,
Gk
,
Bk


Any of the above bump* shader permutations may replace
"bump" with "bumpenv" (i.e. bumpenvspecmapworld), and
will then reflect the closest
envmap

entity (or the skybox if
necessary). They sup
port all their usual texture slots and
pixel params, in addition to the envmap multiplier pixel
param. If a specmap is present in the given shader, the raw
specmap value will be scaled by the envmap multipliers
(instead of the specmap ones), to determine h
ow much of the
envmap to reflect. A
calclight

(if it has not been done before)
or
recalc

(thereafter) is also needed by this shader to
properly setup its engine state.


music name [ondone]

Plays song "name" (with "packages" as base dir). This command is best used from map cfg files or triggers. Evaluates
ondone when the song is finished, or just keeps looping the song if ondone is missing. Example:
music "songs/music.ogg" [ echo "Song do
ne
playing!" ]


N = registersound name V

Registers sound "name" (see for example data/sounds.cfg). This command returns the sound number N, which is
assigned from 0 onwards, and which can be used with "sound" command below. if the sound was already regi
stered, its existing index is
returned. registersound does not actually load the sound, this is done on first play. V is volume adjustment; if not specifie
d (0), it is the default
100, valid range is 1
-
255.

sound N

Plays sound N, see data/sounds.cfg for

default sounds, and use registersound to register your own. for example,
sound 0

and
sound
(registersound "aard/jump")

both play the standard jump sound.

mapsound name V N

Registers sound "name" as a map
-
specific sounds. These map
-
specific sounds may
currently only be used with
"sound" entities within a map. The first map sound registered in a map has index 0, and increases afterwards (the second soun
d in the config is
1 and the third is 2, and so on). V is volume adjustment; if not specified (0), it i
s the default 100, valid range is 1
-
255. N is the maximum
number instances of this sound that are allowed to play simultaneously; the default is only 1 instance. If N is
-
1, then an unlimited number of
instances may play simultaneously.

mapmodel R H T N SH

mmodel N

NOTE: the mapmodel form is deprecated.. set additional properties of a mapmodel in its cfg.

Registers a mapmodel that can be placed in maps using
newent mapmodel

(see newent). N is the name, R is the square radius, H the

height, T
the texture slot to skin the model with (0 for default skin), and SH toggles whether the it will cast shadows (not given or 1

casts shadows, 0 has
no shadows). The radius R and height H define the collision bounding box of the model (if either i
s 0, players won't collide with the
mapmodel). Name N is the name of a folder inside packages/models folder, e.g. "hudguns/rifle". Loaded from that folder are: t
ris.md2 and
skin.jpg (and if not available, skin.png, or the same from the parent folder to all
ow skin sharing).

Example:
mapmodel 4 32 0 "tree1"


This map model is loaded from packages/models/tree1/. It has a collision box 8x8x32 in size (x=2*R, y=2*R, z=H). It uses the
model's default
skin (texture slot=0). It casts shadows (default).

shadowmapa
mbient N

specifies a colour to use for the ambient light value of shadows created by shadowmapping, where N is a
hexadecimal colour value of the form "0xRRGGBB". Note that any value of 255 or less are treated as gray
-
scale. If N is 0 or unset, this valu
e is
determined by the "ambient" variable and the "skylight" command. (Default: 0)

shadowmapangle N

specifies the angle in degrees at which shadows created by shadowmapping point. If N is 0 or unset, this value is
guessed based on any radius 0 lights i
n the map.

causticscale N

specifies the scale, as a percent, to multiply the size of water caustics by.

causticmillis N

specifies the speed at which water caustics play, in milliseconds per frame.

skybox NAME

loads the skybox described by NAME,

where NAME is a file name relative to the "packages/" directory. The engine will
look for 6 sky box images: NAME_up.jpg, NAME_dn.jpg, NAME_lf.jpg, NAME_rt.jpg, NAME_ft.jpg, NAME_bk.jpg. These represent the
skybox in the up, down, left, right, front, and b
ack directions, respectively. If a .jpg file is not found, it will attempt to search for the files with a
.png extension.

spinsky SPIN

a floating point value that specifies, in degrees per second, the rate at which to spin/yaw the skybox.

yawsky YAW


specifies in degrees a constant yaw rotation to apply to the skybox.

cloudbox NAME

loads the cloudbox described by NAME, similar to the "skybox" command. The cloudbox should have an alpha channel
which is used to blend it over the normal skybox.

spi
nclouds SPIN

a floating point value that specifies, in degrees per second, the rate at which to spin/yaw the cloudbox.

yawclouds YAW

specifies in degrees a constant yaw rotation to apply to the cloudbox.

cloudclip CLIP

specifies a vertical offse
t at which to clip the cloudbox, a floating point value between 0 and 1. This defaults to 0.5, meaning
the bottom half of the cloudbox is clipped away.

cloudlayer NAME

loads the cloud layer described by NAME, where NAME is a file name relative to the "
packages/" directory. The engine
will look for either "packages/NAME.png" or "packages/NAME.jpg". The cloud layer should have an alpha channel which is used t
o blend it
onto the skybox. The cloud layer is mapped onto a horizontal circle that fades into the

edges of the skybox.

cloudscrollx N

specifies the rate, a floating
-
point value in Hz, at which the cloud layer scrolls in the X direction.

cloudscrolly N

specifies the rate, a floating
-
point value in Hz, at which the cloud layer scrolls in the Y d
irection.

cloudscale N

specifies the scale as a floating
-
point value telling how much to multiply the size of the cloud layer. (Default: 1)

cloudheight N

specifies the height of the cloud layer as a floating
-
point value, where
-
1 corresponds to the

bottom of the skybox, 0
corresponds to the middle of the skybox, and 1 corresponds to the top of the skybox. Intermediate values place the cloud laye
r at intermediate
heights of those. (Default: 0.2)

cloudfade N

specifies the offset towards the center

of the cloud layer at which the cloud layer will start fading into the skybox. This is a
floating
-
point value between 0 and 1, where 0 corresponds to the edge of the cloud layer, and 1 corresponds to the center. (Default: 0
.2)

cloudcolour N

specifies
a colour multiplier for the cloud layer, where N is a hexadecimal colour value in the form of "0xRRGGBB".
(Default: 0xFFFFFF, white)

cloudalpha A

specifies an opacity for the cloud layer, where A is a floating
-
point value between 0 and 1. (Default: 1,
solid)

fogdomeheight N

specifies the height of the fog dome as a floating
-
point value, where
-
1 corresponds to the bottom of the skybox, 0
corresponds to the middle of the skybox, and 1 corresponds to the top of the skybox. Intermediate values place th
e fog dome at intermediate
heights of those. (Default:
-
0.5)

fogdomemin A

specifies a minimum opacity for the fog dome, where A is a floating
-
point value between 0 and 1. (Default: 0, invisible)

fogdomemax A

specifies a maximum opacity for the fog
dome, where A is a floating
-
point value between 0 and 1. (Default: 0, invisible)

fogdomecap B

specifies whether the bottom of the fog dome should be capped, where B is 0 or 1 (Default: 1, on).

fogdomeclip Z

specifies whether the top of the fog dome

should be clipped off at a relative size Z, where Z is a floating
-
point value between
0 and 1 (Default: 1, not clipped).

fogdomecolour R G B

The colour of the fog dome, specified as R G B values from 0..255 (default: 0 0 0). If the colour is 0, then t
he value of
fogcolour is used instead of fogdomecolour.

skytexture B

specifies whether or not to enable rendering of sky
-
textured surfaces. If set to 0, sky
-
textured surfaces are not rendered,
allowing sky texture to be used as a "don't render this" su
rface. Disabling this also allows the skybox to be rendered last after the scene, which
yields speedups on some video cards, so disable this if possible in your map, even though it defaults to on. (Default: 1)

importcube N

Imports a cube map (.cgz) and

converts it to the new OCTA (.ogz) map format. N is the name of the map, without the .cgz.
The map file must reside in packages/cube, which is because that folder has a package.cfg that sets the default cube textures
. If the cube map in
question has a cus
tom texture list, it will have to be adapted manually. Currently converts everything relatively faithfully, except heighfield
s
which are converted as best as possible but not always accurately. Slopes tend to work faultlessly, landscape style stuff is
usua
ble, but
curves/arches are problematic, and may have to be redone. All entities are converted though mapmodels may not be present, and

light entities
are useless because of their 2d nature, so probably the first thing to do after converting a map is /clear
ents light, and place some new lights.
Pickups and other items may spawn inside the walls because they have no proper Z value, you may have to correct these manuall
y. The
importcube command does not automatically save the map, you still have to do a /savec
urrentmap which will create packages/cube/N.ogz.
Reload the map to be able to pick up stuff. Waterlevel is also not supported, you will have to add water using the new materi
al system.

writeobj N

Writes out the current map as N.obj and N.mtl, so you co
uld use the engine as a generic modeller with any program/engine that
uses meshes. The meshes aren't very optimal and don't have texture/lighting information.

flipnormalmapy D N

Normalmaps generally come in two kinds, left
-
handed or righ
-
handed coordin
ate systems. If you are trying to use
normalmaps authored for other engines, you may find that the lighting goes the wrong way along one axis, this can be fixed by

flipping the Y
coordinate of the normal. This command loads normalmap N (MUST be 24bit .tga)
, and writes out a flipped normalmap as D (also tga).

mergenormalmaps H N

Normalmaps authored for Quake 4 often come as a base normal map, with seperate height offset file *_h.tga. This
is NOT a height file as used for parallax, instead its detail to b
e blended onto the normals. This command takes normalmap N and a _h file H
(both MUST be 24bit .tga), and outputs a combined normalmap N (it *overwrites* N)



PVS Culling


Cube 2 provides a precomputed visibility culling system as
described in the technical paper "Conservative Volumetric Visibility with Occluder
Fusion" by Schaufler et al (see paper for technical details). Basically, it divides the world into small cube
-
shaped "view cells" of empty space
that the player might possib
ly occupy, and for each of these view cells calculates what other parts of the octree might be visible from it. Since
this is calculated ahead of time, the engine can cheaply look up at runtime whether some part of the octree is possibly visib
le from the p
layer's
current view cell. Once pre
-
calculated, this PVS (potential visibility set) data is stored within your map and saved along with it, so that it may
be reused during gameplay. This data is only valid for a particular map/octree, and if you change you
r map, you must recalculate it or otherwise
expect culling errors. It is recommended you do this only after you are sure you are finished working on your map and ready t
o release it, as it
can take a very long time to compute this data. If you have a multi
-
core processor or multi
-
processor system, it can use multiple threads to
speed up the pre
-
calculation (essentially N processors/cores will calculate N times faster).

The number of pre
-
calculated view cells stored with your map will show up in the edit HU
D stats under the "pvs:" stat. It is recommended you
keep this number to less than 10,000, or otherwise the amount of storage used for the PVS data in your map can become excessi
ve. For very
large SP maps, up to 15,000 view cells is acceptable. The number
of view cells is best controlled by use of the "clip" material, or by setting the
view cell size (default is 32, equal to a gridpower 5 cube). View cell sizes of 64 or 128 are worth trying if your map still
has an excessive
number of view cells, but try to

use the default view cell size of 32 if it stays reasonable. Note that if you have a map with a lot of open space,
there will be a lot of view cells, and so the initial pre
-
calculation may take a long time. You can use the "clip" material, if necessary, t
o mark
empty space the player can't go into, and the PVS calculation will skip computing view cells for these areas. Filling places
the player can't go
with solid cubes/sealing the map will similarly reduce the number of possible view cells.

Visibility fr
om a view cell, to some other part of the octree, is determined by looking for large square or block
-
shaped surfaces and seeing if
they block the view from the view cell to each part of the octree. So surfaces like large walls, ceilings, solid buildings, o
r even mountains and
hills, that have large solid cross
-
sections to them will make the best occluders, and allow the PVS system to cull away large chunks of the
octree that are behind them, with respect to the current view cell. Avoid putting holes running

entirely through these structures, or this will
prevent large cross
-
section of them from being used as an occluder (since the player could possibly see through them). You can use the
"testpvs" command to check how well your occluders are working while bui
lding them. If your map is an open arena
-
style map, then using the
PVS system will have little to no effect, since few things are blocking visibility, and it is not worth using the PVS system
for such maps.

Note that there is already an occlusion culling s
ystem based on hardware occlusion queries, in addition to the PVS system, so the main function
of the PVS system is to provide occlusion culling for older 3D hardware that does not support occlusion queries, and also to
speed up occlusion
queries by reduci
ng the amount of such queries (which can be expensive themselves) even for 3D hardware that supports them. If PVS is used
effectively (a map with lots of good occluders), it should always provide some speed
-
up regardless of whether or not the 3D hardware s
upports
occlusion queries. However, if you are doing open arena
-
style maps for which there are few good occluders, then it is recommended you skip
using the PVS system (as it will just take up memory without providing a speedup) and rely upon the hardware
occlusion queries instead.

pvs N

Toggles PVS culling, where N=1 enables it, and N=0 disables it. This is mostly useful for testing the performance effect of t
he PVS
system and should usually be left on.

pvsthreads N

Sets the number of threads (N) t
hat will be used for calculating PVS info with the "genpvs" command. By default, only 1
thread (N=1) is used. If you have N processor or N processor cores, then set this variable to N to make the pre
-
calculation effectively N times
faster. Setting this var
iable higher than the number of processors/cores will not make it any faster, but setting it lower will not utilize all of
them, so try and set it to the exact number.

genpvs [N]

Pre
-
calculates PVS data for the current version of the map. N is the size

of the view cell used for calculation. If N is not specified
or 0, then the default view cell size of 32 is used. Try to always use the default view cell size where reasonable.

clearpvs

Clears the PVS data for the map. Use this to clear away stale PVS

data if you are editing a map for which PVS data was already pre
-
calculated to avoid culling errors (i.e. stuff being invisible that should otherwise be visible).

lockpvs N

If N=1, this locks the view cell used by the PVS culling to the current view c
ell, even if you happen to move outside of it.
Everything that was occluded/invisible from that view cell will still be so, even if you move outside of it. This is useful f
or seeing all the things
that are being culled from a current vantage point by the P
VS system. If N=0, the view cell is unlocked and PVS will function as normal again.

testpvs [N]

Generates PVS data for only the current view cell you are inside (of size N, or default 32 if not specified) and locks the vi
ew cell
to it as if "lockpvs 1"

were used. This allows you to quickly test the effectiveness of occlusion in your map without generating full PVS data, so
that you can more easily optimize your map for PVS before the actual expensive pre
-
calculation is done. Use "lockpvs 0" to release t
he lock on
the view cell when you are done testing. Note that this will not overwrite any existing PVS data already calculated for the m
ap.

pvsstats

Prints out some useful info about the PVS data stored with the map, such as the number of view cells, t
he total amount of storage
used for all the view cells, and the average amount of storage used for each individual view cell.



Waypoints


Cube 2 provides waypoints to aid bot navigation, and without these bots are not able to calcu
late safe paths from place to place on the map.

Waypoints are entities in a map that tell where it is safe for bots to move to. Each waypoint can link to other waypoints, te
lling a bot how to get
from one waypoint to another. To set up waypoints, first ei
ther add a bot (which causes you to drop waypoints as a side
-
effect) or set the
"
dropwaypoints
" variable to 1. Run around the level through all valid paths, making sure to run through teleporters and touch all items and

playerstarts. Waypoints should be dr
opped at ground level in an even grid across the map, i.e. only jump where it is necesssary to jump. Avoid
any movement tricks like weapon jumping that might confuse the AI.

Set the "
showwaypoints
" variable to 1 so you can see the waypoints you are droppi
ng, and you will see blue lines representing the links
between these waypoints. When you are done, use the "
savewaypoints
" command to save the waypoints for your map; they will be saved to a
file named "yourmap.wpt" for a map named "yourmap" in the same di
rectory as your map. It also helps to add some bots before you save and
make sure there are no bots stuck at playerstarts without waypoints to guide them.

Note waypoints are not loaded until required, i.e. until a "
loadwaypoints
" or "
addbot
" command is is
sued.

showwaypoints 0/1

Toggles showing of waypoints, where 1 enables it, and 0 disables it. This is mostly useful when laying waypoints so as to
see the possible paths and ensure good coverage.

dropwaypoints 0/1

Toggles dropping of waypoints, wher
e 1 enables it, and 0 disables it. By default the player is dropping waypoints whilst
playing against bots, this enables bots to "learn" from the player. Note that if enabled, waypoints will be saved automatical
ly once the map is
changed, and the variable
will then be reset back to 0.

loadwaypoints [filename]

Loads the waypoints for the current map (or specified file).

savewaypoints [filename]

Saves the waypoints for the current map (or specified file), e.g. as "<mapname>.wpt".

clearwaypoints

Re
moves all waypoints.

delselwaypoints

In editing mode this will remove waypoints within the selection region.



Bots


Bots are supported in all multiplayer modes, so long as they have waypoints available to guide them. Bots range in s
kill from 0 to 100, with an
extra skill level 101 making the bots as skilled as possible. You must either be master or playing locally to add or remove b
ots. At the end of a
match, all bots are removed.

addbot [SKILL]

Adds a bot at skill level SKILL if

provided, or defaults to a random skill level between 50 and 100 if not provided. You
must be master or playing locally to use this command. Bots may only be added up to the server specified bot limit unless you

are an admin or
local player. This also cau
ses waypoints to load if any are available for the current map.

delbot

Removes a bot. You must be master or playing locally to use this command.

botlimit N

Sets the bot limit for masters to N. This limit does not effect admins or local players. Onl
y admins or local players can use this
command.

botbalance B

Enables automatic team balancing for bots if B=1 and disables it if B=0. Only masters or local players can use this command.




Demo Recording


You may record ser
ver
-
side demos during multiplayer games. You must have gained "admin" privileges by using the "
setmaster
" command to
enable demo recording for a match. Once enabled, the next map that is played will start recording a demo. Once this map finis
hes, the serve
r
will provide the demo, so that any interested clients can download it. Demo recording is disabled automatically again for the

next map, unless it
is explicitly enabled again. The server will only store a fixed number of demos, and the oldest demo will be

removed to make room for new
ones if it already has the maximum number of demos (currently 5).

Demos may be played back via the special local "demo" mode (mode
-
1), where the map name is the name of the demo to be played.

recorddemo B

Sets whether de
mo recording will be enabled for the next match (B=1 to enable, 0 to disable). Requires admin privileges.

stopdemo

If in multiplayer, this command will finish recording a demo prematurely instead of waiting till the end of a match. Requires

admin privi
leges.

If used during local demo playback, this will stop demo playback.

cleardemos

Clears all demos from the server. Requires admin privileges.

listdemos

This lists all demos available on the server. Any client may use this command.

getdemo [N]


This command retrieves a demo from the server, where N corresponds to the demo number provided by the "listdemos"
command. If no number is specified, this command will get the most recent demo. The demo will be saved locally in the main di
rectory as a
f
ile with the extension ".dmo". Any client may use this command.

demo F

This alias sets the mode to
-
1 (the special demo playback game mode) and map to F, where F is the name of a demo file, but without
the ".dmo" file extension. The "stopdemo" command
may be used to terminate playback early when in this game mode.




Movie Recording


Cube 2 can record movies as uncompressed video and sound to AVI files. These files will grow very large very rapidly and so i
t is strongly
rec
ommended that they are compressed before sharing.

movie [filename]

Providing a filename begins the movie recording, without a filename stops the recording. Small movies are stored as
"<filename>.avi", but when a movie file exceeds 1Gb then the movies a
re stored as multiple files "<filename>XXX.avi", where XXX is
numbered in sequence 000 to 999.

moview W

The width (default is 320) of the movie (0 will use the current window width). The movie will be downsized appropriately.

movieh H

The height (d
efault is 240) of the movie (0 will use the current window height). The movie will be downsized appropriately.

moviefps F

The framerate (default is 24fps) at which to record the movie. Movie recording may prematurely stop if unable to record relia
bly
a
t this framerate.

moviesound 0/1

Enable recording of sound with 1, disable with 0.

movieaccel 0/1

Enable GPU
-
accelerated video encoding with 1, disable with 0. This is enabled by default, but may cause problems on some
video cards. If you notice mo
vie recording displaying strange results, try disabling this and see if it helps.




Capture


This is the most complicated multiplayer mode so some explanation is required. This mode is centered around the idea of captu
ring and holding
bases, and has simi
larities to the game "battlefield 1942" and the "onslaught" mode of unreal 2004: "bases" are placed thru out the map

A base (flag) can be in 2 states: captured or neutral. When captured, it is captured by a certain team. This is shown by the
texture its r
endered
with (red means enemy captured, blue means your team, grey means neutral). When a base is captured, it will produce ammo peri
odically
(every 20 seconds). Your team may take ammo (shown as ammo boxes orbiting the base) by either touching the base, o
r explicitly with the R
key ("repammo" command).

A neutral base can be converted to your team by standing next to it for N seconds (N = 7 or so) within a certain radius. Mult
iple players speed
up the process proportionally. The time accumulated to N is co
unted by the server as soon as the first player enters the radius, and reset to 0
immediately once all players of the initial team leave the radius.

A base of the enemy color can be converted to neutral in exactly the same way. (so often it is a 2 step pr
ocess to take over a base). However, it
takes twice as long to convert an enemy base to neutral, as it does to convert a neutral base to your team.

Current team name and capture status is shown above the base using a text particle.

At the spawn of a map,

all bases are neutral, and all players spawn at normal player spawns, and try to capture whatever they can. Once bases
are captured, players will spawn at spawnpoints close to whichever of their bases is closest to an enemy base. spawning will
be preferre
d at
bases which are not currently being captured by an enemy.

If a player dies, they wait M seconds before they can respawn again (M = 10 or so). If you have no bases left (the enemy has
captured yours, or
at least made em neutral) you will spawn at rand
om spawnpoints.

If all bases are captured by one team, then that team wins the game automatically. Alternatively, if this doesn't happen, at
the time
-
limit the
team that wins is the team that has held the most bases for the most amount of time (1 point pe
r X seconds for every base in your color).

No points are awarded for kills or self
-
deaths. Infact, no individual score is ever displayed, your score is the same as the team's score.

When you spawn, you are given a certain amount of ammo for randomly 2 we
apons out of the 5 main ones, + pistol ammo. You will not be
able to get more ammo unless it is placed in the map, or if given to you by another player. Any other player can replenish yo
ur ammo of types
of ammo he doesn't have. I.e. if you have RL/MG and h
e has GL/MG, you can replenish his GL ammo, and he can give you RL ammo.

A simple HUD shows bases relative to your current position in red or blue (can be a sphere with blips on it, with blips on th
e border for
faraway bases).




Multiplayer Online


Network Code


You will notice that the engine plays and responds better on a high ping connection than most games out there; the reason for

this is that just
about everything is done client
-
side, not ju
st movement (as is common in games today) but also aim (the fat client / thin server model).

The benefits of this are that the effects of lag are minimized, and someone on a 200 ping can compete on an almost even playi
ng field with
someone with a 20 ping,

the disadvantages are mainly in that its harder to combat cheating. Further advantages for server admins are that
servers use virtually no CPU, and very little bandwidth for a lot of clients (you can host a 4 player game on a modem!).

It is impossible to

completely hide lag however, and these are some of the effects that can still show lag if you or someone you play with has a
high ping / bad connection:



if the connection has packetloss. There is no direct indicator of packetloss, instead the "
packet jum
p
" figure is provided on the
hud

(use "
showscores
"). Packet jump says as much as the amount of milliseconds that pass between updates from the indicated player. If it
is extremely variable, or is high(>80) then your gameplay may be hampered (players jumpin
g from place to place). Ideally it is a
steady 40 or lower. A consistent packet jump is more vital to gameplay than ping. There is also player prediction based on
extrapolation using the physics model, in an attempt to be both as up to date as possible in
relation to the game state, and as realistic
with regards to physics. However, under packet loss this model breaks down and player movement becomes choppy.



if ping is high (either yours or someone you play with), some actions may appear lagged. The effect

of ping is generally that the
players in a game are effectively playing more and more seperate games, as someone with a high ping is "playing in the past".

The
local effects of this are masked out by client side movement & aim, but may become noticeable a
cross players:



you may get hit by someone even though you are already out of his view. This is because he is aiming at your movements of a
while ago, and his hits take a while to arrive back at you. You may therefore be hit by gunfire up to his lag + your

lag
milliseconds after you leave his FOV.



item pickup: you may be denied an item if you try to pick it up at virtually the same time as someone else (server decides wh
o
was "first"). Item pickup is server side, only when you hear the sound effect have yo
u actually picked up the item.



players dying appears lagged. This will improve.



if a player is severely lagged (or you are) he temporarily becomes a "ghost" that cannot be hit (if >1sec packet jump).


Cheating


Besides the above ment
ioned client
-
side gameplay, the code is also open source, which makes it too easy to cheat with. Anyone can modify the
source to add cheats, recompile, and join multiplayer games.

There is no real trivial way to combat this:



Moving the gameplay entirely
server
-
side makes things a lot more complicated, hurts smoothness of gameplay, and still doesn't really
solve the cheating problem



Cube 2's predecessor, Cube, had "official binaries" which differed from the Open Source version in a different network proto
col. This
helped combat cheating somewhat, but still not entirely.



A social solution, "
Trusted Communities
" was proposed, that would give players an identity, and only allow you to play on trusted
servers if you were trusted by other players. This system
could work well but requires a lot of infrastructure and organization

Cube and Cube 2 have rather small communities, and the main issue is not necessarily to combat cheating (a lost battle to sta
rt with), but more
to allow non
-
cheaters to have undisturbed
games together. Hence Sauerbraten multiplayer has a very simple solution:

There is no cheat protection at all. Nada.

Servers operate in a so called "
master mode
" which allows people to easily and painlessly have games with people they know, without being

disturbed by cheaters. The way it works is very simple: the first person to enter a server and use the "
setmaster
" command becomes the
"
master
" of that server. The master has 4 commands at his disposal which other players have not:

setmaster B

Attempt
s to set master status to B. 0 gives up master status, 1 claims master status, or the admin password may be specified to
steal master status from the current master. If you specify a password, you are granted "admin" status, which allows you to e
nable serv
er
features that an ordinary master can't.

mastermode N

Sets the server to master mode N. N can be (ranging from very open to very private):



0

(
open
): anyone can enter the server. This is the default mode. It is good for games with random people, if n
o cheaters appear to be
around.



1

(
veto
): as 0, but now the master can force map changes. This is good when playing with new players who may not understand how
to vote for map changes.



2

(
locked
): as 1, but anyone joining after this mode has been set wil
l be forced to be spectator only. This mode is ideal for tournament
play, or games with friends only.



3

(
private
): as 2, but now noone can join the server anymore. Good for games with friends when cheaters are around, cheaters wont
even connect, so wont h
ave the chance to try and screw things up.

kick N

Kick's the player with client number N (displayed in parentheses next to name) off the server, and bans his ip until 4 hours
or the
server is empty. You can't kick yourself. N may also just be the player
's name. This command is useful when you started playing an open game,
and a cheater joins. Additionally you can move to a higher mastermode for additional protection. Don't use this command for a
nything other
than cheaters or people otherwise obstructing
games.

clearbans

Clears all previously set bans, as if the server were empty.

spectator B [N]

Sets whether a player is a spectator (B=1 to enable, 0 to disable). N is specified as for kick. A player can voluntarily make

himself a spectator, but onl
y the current master can make other players spectators.

goto N

If you are a spectator, then this takes you to the location of player N (where N is a client number or the player's name).

pausegame N

Pauses a multiplayer game if N=1, or unpauses it i
f N=0. Requires admin privileges.

The important thing to see about these commands is that they don't prevent cheating, nor are necessarily a fair way of admini
stering a server.
They just make it real easy to have fun games with friends without being distu
rbed by cheaters or people you don't want to play with.

In the event that a cheater is the master, or someone is being abusive with his masters powers, you can simply leave the serv
er and start a game
somewhere else. There are usually more servers than pl
ayers anyway, and more players than cheaters.

If the current master leaves the server, other players may attempt to claim master status.
Mastermode

will be reset to 0 when this happens (also
when the server clears). At any time, all players will see who i
s the master in a game because his name is marked in a different colour on the
scoreboard.



Unknown Commands

clearsleeps

cancels all running loops?


killsendsp



looplist

loops making the var equal to each word in the list. Example:
looplist i
"am not here" [echo $i]
will print "am" then "not" then
"here"


loopfiles

loops making the var equal to each filename in the directory. Note: it will show "." and ".."

Example:
loopfiles f "packages/fanatic" "" []

Signature:
ICOMMAND(loopfiles, "ss
ss", (char *var, char *dir, char *ext, char *body)

Like:
loopfiles f packages/base ogz [ echo I see $f ]



Alphabetical Index

addblendbrush N F

................................
................................
................................
................................
.............................
15

addbot [SKILL]

................................
................................
................................
................................
................................
..
31

addserver NAME PORT [PASSWORD]

................................
................................
................................
...........................

11

adminpass S

................................
................................
................................
................................
................................
.......
12

alias N A

................................
................................
................................
................................
................................
...............
5

allfaces 0/1

................................
................................
................................
................................
................................
.........
14

ambient R [G B]

................................
................................
................................
................................
................................
.
22

at S N
................................
................................
................................
................................
................................
....................
4

attack

................................
................................
................................
................................
................................
....................
5

autograss FILENAME

................................
................................
................................
................................
.......................
24

backward

................................
................................
................................
................................
................................
..............
5

bind K A

................................
................................
................................
................................
................................
...............
5

blendpaintmode N

................................
................................
................................
................................
..............................
16

blood B

................................
................................
................................
................................
................................
...............

11

blurlms N

................................
................................
................................
................................
................................
...........
23

blurskylight N

................................
................................
................................
................................
................................
....
23

botbalance B
................................
................................
................................
................................
................................
.......
31

botlimit N

................................
................................
................................
................................
................................
...........
31

brushvert x y depth
................................
................................
................................
................................
............................
15

brushx

................................
................................
................................
................................
................................
.................
15

brushy

................................
................................
................................
................................
................................
.................
15

calclight Q

................................
................................
................................
................................
................................
..........
22

cancelsel

................................
................................
................................
................................
................................
.............
12

causticmil
lis N

................................
................................
................................
................................
................................
...
28

causticscale N
................................
................................
................................
................................
................................
.....
28

clearbans

................................
................................
................................
................................
................................
............
34

clearblendmap

................................
................................
................................
................................
................................
....
16

clearblendmapsel
................................
................................
................................
................................
................................
16

clearbrush

................................
................................
................................
................................
................................
...........
15

cleardemos

................................
................................
................................
................................
................................
.........
31

clearents type

................................
................................
................................
................................
................................
.....
18

cleargui

................................
................................
................................
................................
................................
.................
8

clearpvs

................................
................................
................................
................................
................................
..............
30

clearservers [N]

................................
................................
................................
................................
................................
.

11

clearwaypoints

................................
................................
................................
................................
................................
...
31

cloudalpha A

................................
................................
................................
................................
................................
......
29

cloudbox NAME

................................
................................
................................
................................
................................
28

cloudclip CLIP

................................
................................
................................
................................
................................
...
28

cloudcolour N
................................
................................
................................
................................
................................
.....
29

clo
udfade N

................................
................................
................................
................................
................................
........
28

cloudheight N

................................
................................
................................
................................
................................
.....
28

cloudlayer NAME

................................
................................
................................
................................
..............................
28

cloudscale N

................................
................................
................................
................................
................................
.......
28

cloudscrollx N

................................
................................
................................
................................
................................
....
28

cloudscrolly N

................................
................................
................................
................................
................................
....
28

Command Line Options

................................
................................
................................
................................
.........................

-
aN

................................
................................
................................
................................
................................
...................
1

-
bN

................................
................................
................................
................................
................................
...................
1

-
cN

................................
................................
................................
................................
................................
...................
2

-
d

................................
................................
................................
................................
................................
.....................
1

-
dN

................................
................................
................................
................................
................................
..................
1

-
f

................................
................................
................................
................................
................................
......................
1

-
fN

................................
................................
................................
................................
................................
...................
1

-
gN

................................
................................
................................
................................
................................
...................
2

-
hN

................................
................................
................................
................................
................................
...................
1

-
iS

................................
................................
................................
................................
................................
....................
2

-
jN

................................
................................
................................
................................
................................
...................
2

-
kS

................................
................................
................................
................................
................................
...................
2

-
lS

................................
................................
................................
................................
................................
....................
2

-
mS

................................
................................
................................
................................
................................
..................
2

-
nN

................................
................................
................................
................................
................................
...................
2

-
oN

................................
................................
................................
................................
................................
...................
2

-
pS

................................
................................
................................
................................
................................
...................
2

-
qS

................................
................................
................................
................................
................................
...................
1

-
r

................................
................................
................................
................................
................................
......................
1

-
rS

................................
................................
................................
................................
................................
....................
1

-
sN

................................
................................
................................
................................
................................
...................
1

-
t

................................
................................
................................
................................
................................
......................
1

-
uN

................................
................................
................................
................................
................................
...................
2

-
vN

................................
................................
................................
................................
................................
...................
1

-
wN

................................
................................
................................
................................
................................
..................
1

-
xS

................................
................................
................................
................................
................................
...................
2

-
yS

................................
................................
................................
................................
................................
...................
2

-
zN

................................
................................
................................
................................
................................
...................
1

concat S...

................................
................................
................................
................................
................................
.............
4

concatword S...

................................
................................
................................
................................
................................
.....
4

connect serverip [port [password]]

................................
................................
................................
................................
......
9

conskip N

................................
................................
................................
................................
................................
.............
9

copy

................................
................................
................................
................................
................................
....................
13

crosshairfx B

................................
................................
................................
................................
................................
........
7

crosshairsize N

................................
................................
................................
................................
................................
.....
7

cycleweapon A B C D E
................................
................................
................................
................................
.....................
10

damageblend B
................................
................................
................................
................................
................................
...

11

damageblendfactor F

................................
................................
................................
................................
..........................

11

damagecompass B

................................
................................
................................
................................
..............................

11

delbot
................................
................................
................................
................................
................................
..................
31

delent

................................
................................
................................
................................
................................
..................
1
6

delselwaypoints

................................
................................
................................
................................
................................
..
31

demo F

................................
................................
................................
................................
................................
...............
32

disconnect

................................
................................
................................
................................
................................
............
9

div A B

................................
................................
................................
................................
................................
.................
3

dragging 0/1

................................
................................
................................
................................
................................
.......
12

dropent

................................
................................
................................
................................
................................
...............
17

dropwaypoints 0/1

................................
................................
................................
................................
..............................
31

dumplms

................................
................................
................................
................................
................................
.............
23

ea N

................................
................................
................................
................................
................................
....................
17

echo text...

................................
................................
................................
................................
................................
............
9

edgetolerance N

................................
................................
................................
................................
................................
.
22

editbind K A

................................
................................
................................
................................
................................
.........
5

editcopy

................................
................................
................................
................................
................................
..............
13

editdrag

................................
................................
................................
................................
................................
..............
12

editface D N

................................
................................
................................
................................
................................
.......
12

editmat MAT [FILTER]

................................
................................
................................
................................
.....................
13

air

................................
................................
................................
................................
................................
...................
13

alpha

................................
................................
................................
................................
................................
..............
13

clip

................................
................................
................................
................................
................................
.................
1
3

death

................................
................................
................................
................................
................................
..............
13

gameclip

................................
................................
................................
................................
................................
........
13

glass

................................
................................
................................
................................
................................
...............
13

lava

................................
................................
................................
................................
................................
................
13

noclip

................................
................................
................................
................................
................................
.............
13

water

................................
................................
................................
................................
................................
..............
13

editmovedrag
................................
................................
................................
................................
................................
......
12

editpaste

................................
................................
................................
................................
................................
.............
13

edittex D

................................
................................
................................
................................
................................
.............
12

edittoggle
................................
................................
................................
................................
................................
............
12

emitfps N

................................
................................
................................
................................
................................
..............
7

entautoview N

................................
................................
................................
................................
................................
....
18

entautoviewdist N

................................
................................
................................
................................
..............................
18

entcancel

................................
................................
................................
................................
................................
............
17

entdrop N

................................
................................
................................
................................
................................
...........
17

entfind type type value1 value2 value3 value4

................................
................................
................................
..................
18

entflip

................................
................................
................................
................................
................................
.................
16

entge
t

................................
................................
................................
................................
................................
..................
17

enthavesel

................................
................................
................................
................................
................................
...........
17

Entity Types

................................
................................
................................
................................
................................
...........

"barrel" [Y] N W H

................................
................................
................................
................................
.......................
20

"base" [ammo [N]]

................................
................................
................................
................................
........................
18

"box" [Y] N W

................................
................................
................................
................................
..............................
20

"bullets"

................................
................................
................................
................................
................................
.........
19

"cartridges"

................................
................................
................................
................................
................................
....
19

"elevator" [Y] N T S

................................
................................
................................
................................
......................
20

"envmap" [radius]

................................
................................
................................
................................
.........................
18

"flag" [Y] T

................................
................................
................................
................................
................................
...
18

"greenarmour"

................................
................................
................................
................................
...............................
19

"grenades"

................................
................................
................................
................................
................................
.....
19

"health"

................................
................................
................................
................................
................................
..........
19

"healthboost"

................................
................................
................................
................................
................................
.
19

"jumppad" Z [
Y] [X]

................................
................................
................................
................................
.....................
19

"light" radius r g b

................................
................................
................................
................................
.........................
18

"mapmodel" [Y] N T R

................................
................................
................................
................................
.................
19

"monster" N [T]

................................
................................
................................
................................
.............................
20

"particles" type value1 value2 value3 value4

................................
................................
................................
...............
21

"platform" [Y] N T S

................................
................................
................................
................................
.....................
20

"playerstart" [Y] [T]

................................
................................
................................
................................
......................
18

"quaddamage"

................................
................................
................................
................................
...............................
19

"respawnpoint"

................................
................................
................................
................................
..............................
21

"riflerounds"

................................
................................
................................
................................
................................
..
19

"rockets"

................................
................................
................................
................................
................................
........
19

"shells"

................................
................................
................................
................................
................................
..........
19

"sound
" N radius [size]

................................
................................
................................
................................
.................
18

"spotlight" radius

................................
................................
................................
................................
...........................
18

"teledest" [Y] N [P]

................................
................................
................................
................................
.......................
19

"teleport" N [M]

................................
................................
................................
................................
............................
19

"yellowarmour"

................................
................................
................................
................................
.............................
19

entitysurf 0/1

................................
................................
................................
................................
................................
......
14

entloop X

................................
................................
................................
................................
................................
............
17

entmoving 0/1/2

................................
................................
................................
................................
................................
.
17

entproperty P A

................................
................................
................................
................................
................................
..
17

entpush D

................................
................................
................................
................................
................................
...........
17

entrotate D

................................
................................
................................
................................
................................
..........
17

entselect X

................................
................................
................................
................................
................................
..........
17

entselradius N
................................
................................
................................
................................
................................
.....
14

entselsnap 0/1

................................
................................
................................
................................
................................
.....
14

ent
set type value1 value2 value3 value4

................................
................................
................................
............................
17

envmapsize N

................................
................................
................................
................................
................................
.......
7

et

................................
................................
................................
................................
................................
.........................
17

exec S

................................
................................
................................
................................
................................
..................
7

fastshader NICE FAST N

................................
................................
................................
................................
...................
25

flarecutoff N

................................
................................
................................
................................
................................
.........
7

flarelights B

................................
................................
................................
................................
................................
..........
7

flaresize N

................................
................................
................................
................................
................................
............
7

flip

................................
................................
................................
................................
................................
......................
13

flipnormalmapy D N

................................
................................
................................
................................
..........................
29

floatspeed N

................................
................................
................................
................................
................................
.........
5

fog N

................................
................................
................................
................................
................................
..................
25

fogcolour R G B

................................
................................
................................
................................
................................
.
25

fogdomecap B

................................
................................
................................
................................
................................
....
29

fogdomeclip Z

................................
................................
................................
................................
................................
....
29

fogdome
colour R G B

................................
................................
................................
................................
........................
29

fogdomeheight N

................................
................................
................................
................................
...............................
29

fogdomemax A

................................
................................
................................
................................
................................
...
29

fogdomemin A

................................
................................
................................
................................
................................
...
29

Font Colors
................................
................................
................................
................................
................................
...........
3

format F V1..Vn

................................
................................
................................
................................
................................
...
4

forward

................................
................................
................................
................................
................................
.................
5

fov N

................................
................................
................................
................................
................................
....................
5

fullbright B

................................
................................
................................
................................
................................
.........
22

gamespeed P
................................
................................
................................
................................
................................
.......
10

gamma N

................................
................................
................................
................................
................................
..............
7

genpvs [N]

................................
................................
................................
................................
................................
..........
30

getdemo [N]

................................
................................
................................
................................
................................
.......
32

getmap

................................
................................
................................
................................
................................
..........

11, 23

gettex

................................
................................
................................
................................
................................
..................
12

goto N
................................
................................
................................
................................
................................
.................
34

gotosel

................................
................................
................................
................................
................................
................
14

grass N

................................
................................
................................
................................
................................
.................
6

grassalpha A

................................
................................
................................
................................
................................
.......
2
4

grasscolour R G B

................................
................................
................................
................................
..............................
24

grassdist N

................................
................................
................................
................................
................................
............
6

grassscale N

................................
................................
................................
................................
................................
.......
24

grassstep N

................................
................................
................................
................................
................................
...........
6

gridpower N

................................
................................
................................
................................
................................
.......
12

gui2d B

................................
................................
................................
................................
................................
.................
8

guialign ALIGN '[' ... ']'

................................
................................
................................
................................
........................
8

guiautotab H

................................
................................
................................
................................
................................
.........
8

guibar

................................
................................
................................
................................
................................
...................
8

guibutton [S] A [I]

................................
................................
................................
................................
................................
8

guicheckbox N V [ON OFF A]

................................
................................
................................
................................
............
8

guiclicktab B

................................
................................
................................
................................
................................
........
8

guifield A N [O [U]]

................................
................................
................................
................................
.............................
9

guiimage P A S [O]

................................
................................
................................
................................
..............................
8

guilist '[' ... ']'

................................
................................
................................
................................
................................
........
8

guiradio N V VAL [A]
................................
................................
................................
................................
..........................
8

guislider V [MIN MAX A]

................................
................................
................................
................................
..................
8

guitab S

................................
................................
................................
................................
................................
................
8

guitext S

................................
................................
................................
................................
................................
...............
8

guitextbox S W [H] [C]

................................
................................
................................
................................
........................
8

guititle S

................................
................................
................................
................................
................................
...............
8

havesel
................................
................................
................................
................................
................................
................
13

hidehud 0/1
................................
................................
................................
................................
................................
.........
14

hidehud B

................................
................................
................................
................................
................................
.............
7

hidestats 0/1

................................
................................
................................
................................
................................
.......
14

hidestats B

................................
................................
................................
................................
................................
............
7

history N
................................
................................
................................
................................
................................
..............
7

hmapcancel

................................
................................
................................
................................
................................
........
15

hmapedit 0/1
................................
................................
................................
................................
................................
.......
15

hmapselect
................................
................................
................................
................................
................................
..........
1
5

hudgun N

................................
................................
................................
................................
................................
..............
6

hudgunsway N

................................
................................
................................
................................
................................
.....
6

if cond true false
................................
................................
................................
................................
................................
...
4

importcube N

................................
................................
................................
................................
................................
.....
29

insel

................................
................................
................................
................................
................................
....................
17

invmouse B

................................
................................
................................
................................
................................
......
5

jump

................................
................................
................................
................................
................................
.....................
5

keepserver NAME PORT [PASSWORD]

................................
................................
................................
.........................

11

keymap K N A

................................
................................
................................
................................
................................
.....
7

kick N

................................
................................
................................
................................
................................
.................
34

lanconnect

................................
................................
................................
................................
................................
............
9

lavacolour R G B

................................
................................
................................
................................
...............................
25

lavafog N

................................
................................
................................
................................
................................
............
25

left

................................
................................
................................
................................
................................
........................
5

lerpangle A

................................
................................
................................
................................
................................
.........
22

lerpsubdiv N

................................
................................
................................
................................
................................
.......
22

lerpsubdivsiz
e N
................................
................................
................................
................................
................................
.
22

lighterror E

................................
................................
................................
................................
................................
.........
23

Lighting Commands
................................
................................
................................
................................
...........................
21

lightlod D

................................
................................
................................
................................
................................
...........
23

lightprecision P

................................
................................
................................
................................
................................
..
22

lightthreads N

................................
................................
................................
................................
................................
.....
22

listclients N

................................
................................
................................
................................
................................
..........
4

listdemos

................................
................................
................................
................................
................................
............
31

listlen L

................................
................................
................................
................................
................................
................
4

lmaa N

................................
................................
................................
................................
................................
................
22

lmshadows N

................................
................................
................................
................................
................................
......
22

loadsky NAME [SPIN]

................................
................................
................................
................................
......................
24

loadwaypoints [filename]

................................
................................
................................
................................
...................
31

lockpvs N

................................
................................
................................
................................
................................
...........
30

loddistance N

................................
................................
................................
................................
................................
.......
6

loop I N body

................................
................................
................................
................................
................................
.......
4

map M

................................
................................
................................
................................
................................
..................
9

map name

................................
................................
................................
................................
................................
...........
23

mapenlarge

................................
................................
................................
................................
................................
.........
23

mapmodel R H T N SH

................................
................................
................................
................................
......................
28

mapsound name V N

................................
................................
................................
................................
..........................
27

maptitle "Title by Author"

................................
................................
................................
................................
..................
23

mastermode N

................................
................................
................................
................................
................................
....
34

mastername S

................................
................................
................................
................................
................................
.....
12

materialreset

................................
................................
................................
................................
................................
.......
24

max A B
................................
................................
................................
................................
................................
...............
4

maxclients N

................................
................................
................................
................................
................................
......
12

maxfps N

................................
................................
................................
................................
................................
..............
5

maxparticledistance N

................................
................................
................................
................................
..........................
7

maxreflect N
................................
................................
................................
................................
................................
.........
7

maxroll N

................................
................................
................................
................................
................................
.............
7

maxtexsi
ze N

................................
................................
................................
................................
................................
........
6

menuautoclose D

................................
................................
................................
................................
................................
..
8

menudistance D

................................
................................
................................
................................
................................
....
8

mergenormalmaps H N

................................
................................
................................
................................
......................
29

min A B

................................
................................
................................
................................
................................
...............
4

mintexcompresssize N

................................
................................
................................
................................
.........................
6

mmodel N
................................
................................
................................
................................
................................
...........
28

mod A B

................................
................................
................................
................................
................................
...............
3

mode N

................................
................................
................................
................................
................................
...............
10

capture

................................
................................
................................
................................
................................
...........
10

coop

................................
................................
................................
................................
................................
...............
10

ctf

................................
................................
................................
................................
................................
...................
10

demo

................................
................................
................................
................................
................................
..............
10

dmsp

................................
................................
................................
................................
................................
..............
10

effic

................................
................................
................................
................................
................................
................
10

efficctf

................................
................................
................................
................................
................................
...........
10

effichold

................................
................................
................................
................................
................................
........
10

efficprotect

................................
................................
................................
................................
................................
....
10

efficteam

................................
................................
................................
................................
................................
........
10

ffa

................................
................................
................................
................................
................................
..................
10

hold

................................
................................
................................
................................
................................
................
10

insta

................................
................................
................................
................................
................................
...............
10

instactf

................................
................................
................................
................................
................................
...........
10

instahold

................................
................................
................................
................................
................................
........
10

instaprotect

................................
................................
................................
................................
................................
....
10

instateam

................................
................................
................................
................................
................................
.......
10

protect

................................
................................
................................
................................
................................
............
10

regencapture

................................
................................
................................
................................
................................
..
10

sp

................................
................................
................................
................................
................................
...................
10

tac

................................
................................
................................
................................
................................
..................
10

tacteam

................................
................................
................................
................................
................................
..........
10

teamplay

................................
................................
................................
................................
................................
........
10

movie [filename]

................................
................................
................................
................................
................................
32

movieaccel 0/1

................................
................................
................................
................................
................................
...
32

moviefps F

................................
................................
................................
................................
................................
.........
32

movieh H

................................
................................
................................
................................
................................
............
32

moviesound 0/1

................................
................................
................................
................................
................................
..
32

moview W

................................
................................
................................
................................
................................
..........
32

moving 0/1

................................
................................
................................
................................
................................
.........
12

music name [ondone]

................................
................................
................................
................................
.........................
27

musi
cvol N

................................
................................
................................
................................
................................
...........
7

N = registersound name V

................................
................................
................................
................................
.................
27

name yourname

................................
................................
................................
................................
................................
....
9

newent type value1 value2 value3 value4

................................
................................
................................
.........................
16

newgui S
................................
................................
................................
................................
................................
...............
8

newmap size

................................
................................
................................
................................
................................
.......
23

nextblendbrush N

................................
................................
................................
................................
...............................
16

nextweapon [N] [F]

................................
................................
................................
................................
............................
10

nummonsters N

................................
................................
................................
................................
................................
....
4

onrelease A

................................
................................
................................
................................
................................
...........
4

optmats B

................................
................................
................................
................................
................................
...........
14

outline B

................................
................................
................................
................................
................................
.............
14

paintblendmap

................................
................................
................................
................................
................................
....
16

particlesize N

................................
................................
................................
................................
................................
.......
7

pa
ssthrough

................................
................................
................................
................................
................................
........
13

paste

................................
................................
................................
................................
................................
...................
13

patchlight Q

................................
................................
................................
................................
................................
........
22

paused B

................................
................................
................................
................................
................................
.............

11

pausegame N

................................
................................
................................
................................
................................
......
34

platform T N

................................
................................
................................
................................
................................
.......
17

pop N

................................
................................
................................
................................
................................
....................
5

publicserver B

................................
................................
................................
................................
................................
....
12

push N A

................................
................................
................................
................................
................................
..............
5

pvs N

................................
................................
................................
................................
................................
..................
30

pvsstats

................................
................................
................................
................................
................................
...............
30

pvsthreads N
................................
................................
................................
................................
................................
.......
30

quit

................................
................................
................................
................................
................................
.......................
5

rate N

................................
................................
................................
................................
................................
....................
9

recalc

................................
................................
................................
................................
................................
..................
13

reconnect [password]

................................
................................
................................
................................
...........................
9

recorddemo B

................................
................................
................................
................................
................................
.....
31

redo

................................
................................
................................
................................
................................
....................
13

reflectdist N

................................
................................
................................
................................
................................
..........
6

reflectmms B

................................
................................
................................
................................
................................
........
7

reflectsize N

................................
................................
................................
................................
................................
.........
6

reorient

................................
................................
................................
................................
................................
...............
13

replace

................................
................................
................................
................................
................................
................
13

replaceents type value1 value2 value3 value4

................................
................................
................................
...................
18

replacesel
................................
................................
................................
................................
................................
............
13

result V

................................
................................
................................
................................
................................
.................
4

right

................................
................................
................................
................................
................................
......................
5

rnd N

................................
................................
................................
................................
................................
...................
4

rotate D
................................
................................
................................
................................
................................
...............
13

rotateblendbrush

................................
................................
................................
................................
................................
.
16

savecurrentmap

................................
................................
................................
................................
................................
..
23

savemap name

................................
................................
................................
................................
................................
....
23

savewaypoints [filename]

................................
................................
................................
................................
..................
31

say text...

................................
................................
................................
................................
................................
..............
9

saycommand P...

................................
................................
................................
................................
................................
...
9

scr_h N

................................
................................
................................
................................
................................
.................
7

scr_w N

................................
................................
................................
................................
................................
................
7

screenres W H

................................
................................
................................
................................
................................
......
7

screenshot

................................
................................
................................
................................
................................
.............
7

selcorners

................................
................................
................................
................................
................................
...........
12

selectbrush D

................................
................................
................................
................................
................................
......
15

selectionsurf 0/1

................................
................................
................................
................................
................................
.
14

selextend

................................
................................
................................
................................
................................
............
13

sendmap

................................
................................
................................
................................
................................
.......

11, 23

sensitivity S

................................
................................
................................
................................
................................
..........
5

sensitivityscale S

................................
................................
................................
................................
................................
..
5

serverbotlimit N

................................
................................
................................
................................
................................
.
12

serverdesc S

................................
................................
................................
................................
................................
.......
12

serverip S

................................
................................
................................
................................
................................
...........

11

servermotd S

................................
................................
................................
................................
................................
......
12

serverpass S

................................
................................
................................
................................
................................
........
12

server
port N

................................
................................
................................
................................
................................
.......
12

setblendbrush N

................................
................................
................................
................................
................................
.
16

setmaster B

................................
................................
................................
................................
................................
.........
33

setpixelparam INDEX X Y Z W

................................
................................
................................
................................
........
26

setpostfx [N [P]]

................................
................................
................................
................................
................................
...
7

setshader NAME

................................
................................
................................
................................
................................
25

setshaderparam NAME X Y Z W

................................
................................
................................
................................
......
25

setuniformparam NAME X Y Z W

................................
................................
................................
................................
....
26

setvertexparam INDEX X Y Z W

................................
................................
................................
................................
......
26

setweapon N [F]

................................
................................
................................
................................
................................
.
10

shader TYPE NAME VS PS

................................
................................
................................
................................
..............
25

sha
derdetail N

................................
................................
................................
................................
................................
......
6

shadowmapambient N

................................
................................
................................
................................
........................
28

shadowmapangle N

................................
................................
................................
................................
............................
28

showblendmap

................................
................................
................................
................................
................................
...
16

showgui N

................................
................................
................................
................................
................................
............
8

showgui servers

................................
................................
................................
................................
................................
..

11

showmat B

................................
................................
................................
................................
................................
.........
14

showscores

................................
................................
................................
................................
................................
...........
9

showsky B

................................
................................
................................
................................
................................
..........
14

showwaypoints 0/1
................................
................................
................................
................................
.............................
31

skill N

................................
................................
................................
................................
................................
.................

11

skybox NAME

................................
................................
................................
................................
................................
...
28

skylight R [G B]

................................
................................
................................
................................
................................
.
22

skytexture B

................................
................................
................................
................................
................................
.......
29

sound N

................................
................................
................................
................................
................................
..............
27

soundbufferlen N

................................
................................
................................
................................
................................
.
7

s
oundvol N

................................
................................
................................
................................
................................
...........
7

specbind K A

................................
................................
................................
................................
................................
........
5

spectator B [N]

................................
................................
................................
................................
................................
...
34

spinclouds SPIN

................................
................................
................................
................................
................................
.
28

spinsky SPIN

................................
................................
................................
................................
................................
......
28

startlistenserver [MASTER]

................................
................................
................................
................................
..............

11

stopdemo

................................
................................
................................
................................
................................
............
31

stoplistenserver

................................
................................
................................
................................
................................
..

11

strcmp A B
................................
................................
................................
................................
................................
............
3

strlen S

................................
................................
................................
................................
................................
................
4

strreplace S A B

................................
................................
................................
................................
................................
....
4

strstr S N

................................
................................
................................
................................
................................
..............
3

substr S A B

................................
................................
................................
................................
................................
..........
4

taunt
................................
................................
................................
................................
................................
......................
5

team teamname

................................
................................
................................
................................
................................
....
9

testpvs [N]

................................
................................
................................
................................
................................
..........
30

te
xalpha F B

................................
................................
................................
................................
................................
.......
25

texcolor R G B

................................
................................
................................
................................
................................
...
25

texlayer N

................................
................................
................................
................................
................................
...........
15

texoffset X Y

................................
................................
................................
................................
................................
......
25

texrotate N

................................
................................
................................
................................
................................
..........
24

texscale N

................................
................................
................................
................................
................................
...........
25

texscroll X Y

................................
................................
................................
................................
................................
......
24

texture TYPE FILENAME ROT X Y SCALE

................................
................................
................................
..................
24

texturereset

................................
................................
................................
................................
................................
.........
24

toggleconsole

................................
................................
................................
................................
................................
.......
9

trigger T N

................................
................................
................................
................................
................................
..........
17

undo
................................
................................
................................
................................
................................
....................
13

undomegs N

................................
................................
................................
................................
................................
.......
14

updatefrommaster

................................
................................
................................
................................
..............................

11

updatemaster B
................................
................................
................................
................................
................................
...
12

v
alpha F B

................................
................................
................................
................................
................................
..........
25

Variables

................................
................................
................................
................................
................................
.................

getalias V

................................
................................
................................
................................
................................
.........
4

getbind B

................................
................................
................................
................................
................................
.........
4

getclientname N

................................
................................
................................
................................
..............................
4

getclientnum N

................................
................................
................................
................................
................................
4

getclientteam N

................................
................................
................................
................................
...............................
4

geteditbind B

................................
................................
................................
................................
................................
...
4

getfps

................................
................................
................................
................................
................................
...............
4

getname

................................
................................
................................
................................
................................
...........
4

getspecbind B

................................
................................
................................
................................
................................
..
4

getteam

................................
................................
................................
................................
................................
............
4

gettex

................................
................................
................................
................................
................................
...............
5

gettexname

................................
................................
................................
................................
................................
......
5

getweapon

................................
................................
................................
................................
................................
.......
4

isconnected N

................................
................................
................................
................................
................................
..
5

isspectator N

................................
................................
................................
................................
................................
....
5

$consize

................................
................................
................................
................................
................................
...........
5

$editing

................................
................................
................................
................................
................................
............
4

$numa
rgs

................................
................................
................................
................................
................................
.........
5

$triggerstate

................................
................................
................................
................................
................................
.....
5

vcolor R G B

................................
................................
................................
................................
................................
......
25

vdelta BODY

................................
................................
................................
................................
................................
.....
25

vlayer N

................................
................................
................................
................................
................................
..............
15

voffset X Y

................................
................................
................................
................................
................................
.........
25

Vreset

................................
................................
................................
................................
................................
.................
25

vrotate N
................................
................................
................................
................................
................................
.............
25

vscale N

................................
................................
................................
................................
................................
..............
25

vshaderparam NAME X Y Z W

................................
................................
................................
................................
.........
26

watercolour R G B

................................
................................
................................
................................
.............................
25

waterenvmap B

................................
................................
................................
................................
................................
....
6

waterfade B

................................
................................
................................
................................
................................
..........
6

waterfallcolour R G B

................................
................................
................................
................................
........................
25

waterfallenv B

................................
................................
................................
................................
................................
......
6

waterfallrefract B

................................
................................
................................
................................
................................
.
6

waterfog N

................................
................................
................................
................................
................................
.........
25

waterlod N

................................
................................
................................
................................
................................
............
6

waterreflect B

................................
................................
................................
................................
................................
.......
6

waterrefract B
................................
................................
................................
................................
................................
.......
6

waterspec N

................................
................................
................................
................................
................................
........
25

watersubdiv N

................................
................................
................................
................................
................................
......
6

weapon a b c
................................
................................
................................
................................
................................
.........
9

while cond body

................................
................................
................................
................................
................................
...
4

wireframe 0/1

................................
................................
................................
................................
................................
.....
14

writeobj N

................................
................................
................................
................................
................................
..........
29

yawclouds YAW

................................
................................
................................
................................
................................
.
28

yawsky YAW

................................
................................
................................
................................
................................
......
28

zoom N

................................
................................
................................
................................
................................
.................
5

zoomautosens B

................................
................................
................................
................................
................................
...
6

zoomfov N

................................
................................
................................
................................
................................
...........
5

zoominvel N

................................
................................
................................
................................
................................
.........
6

zoomoutvel N

................................
................................
................................
................................
................................
.......
6

zoomsens S
................................
................................
................................
................................
................................
...........
6


................................
................................
................................
................................
................................
...........................
27

^ A B
................................
................................
................................
................................
................................
.....................
3

-

A B

................................
................................
................................
................................
................................
.....................
3

! A
................................
................................
................................
................................
................................
.........................
3

* A B

................................
................................
................................
................................
................................
....................
3

&& A B

................................
................................
................................
................................
................................
................
3

+ A B

................................
................................
................................
................................
................................
....................
3

< A B

................................
................................
................................
................................
................................
....................
3

= A B

................................
................................
................................
................................
................................
....................
3

> A B

................................
................................
................................
................................
................................
....................
3

|| A B

................................
................................
................................
................................
................................
.....................
3