AssaultCube Documentation
Go to documentation index ↵
↑ Top of the page?

## CubeScript

CubeScript is the scripting language of AssaultCube and it is similar to scripting languages of other games, except that its a bit more powerful because it is almost a full programming language.

CubeScript consists of the command itself, followed by any number of arguments separated by whitespace. You can:

- Use "" to quote strings that have whitespace within them.
  - Input example: alias grass "is greener"
- Use $ to capture the value of a variable/alias/bracketed-string as an argument for a command.
  - Input example: echo "The grass" $grass
  - Output: The grass is greener
  - Input example: echo "Your FOV is" $fov
  - Output: Your FOV is 90.0
- Use ; to sequence multiple commands into one.
  - Input example: alias grass "is yellow"; echo "The grass" $grass
  - Output: The grass is yellow
- You can also use () or [] to quote strings (i.e. instead of ""). These can be nested infinitely and may contain linefeeds. The normal brackets () are special, as they evaluate commands contained within them, before evaluating the surrounding command.
  - Input example: alias 4x2 (* 2 (+ 1 3))
  - Input command: echo $4x2
  - Output: 8
  - Input example: alias grass [ is greener ]
- Lastly, you can use the automatically-set aliases of $arg1 (.. and $arg2, $arg3, etc) in your scripts.
  - Input example: alias grass [ if (= $arg1 1) [ echo "The grass is green" ] [ if (= $arg1 2) [ echo "The grass is yellow" ] ] ]
  - Input command: grass 1
  - Output: The grass is green
  - Input command: grass 2
  - Output: The grass is brown

It is recommended to read examples of this in your ./config/ folder to understand them better. The documentation below contains a reference of ALL of the CubeScript commands at your disposal. Have fun!

### CATEGORIES:

- CubeScript
- General
- Gameplay
- Game modes
- Keyboard and mouse
- Visuals
- Heads-Up Display
- Sound
- Serverbrowser
- Server commands
- Authentication
- Editing
- Editing configs
- Menus
- Ingame reference
- Bot mode
- Optional
- TODO

### CubeScript

This section describes identifiers that are closely related to the CubeScript language.

- A B
Performs a subtraction.

Argument | Description | Values
--- | --- | ---
A | the minuend |
B | the subtrahend |

Return value: the difference

-= A B
Subtracts a value from an alias.

Argument | Description | Values
--- | --- | ---
A | the alias to subtract from |
B | value to be subtracted |

Example: -= foo 1337
-=f A B
Subtracts a floating-point value from an alias.

Argument | Description | Values
--- | --- | ---
A | the alias to subtract from |
B | value to be subtracted |

Example: -=f foo 13.37
-f A B
Subtracts two floating-point numbers.

Argument | Description | Values
--- | --- | ---
A | the minuend | float
B | the subtrahend | float

Return value: the difference

! A
Performs a negation.

Argument | Description | Values
--- | --- | ---
A | argument |

!= A B
Determines if two values are not equal.

Argument | Description | Values
--- | --- | ---
A | first value |
B | second value |

Return value: the inequality, 1 (not equal) or 0 (equal)

!=f A B
Determines if the first floating-point value is not equal to the second floating-point value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

Return value: (true)1||0(false)

!b A
Performs the operation NOT using binary arithmetic on integer values (32-bit signed).

Argument | Description | Values
--- | --- | ---
A | argument |

Integer values are 32-bit signed values, so for example "echo (!b 1)" returns "-2".
See also: &b, |b, ^b
* A B
Performs a multiplication 2 or more numbers.

Argument | Description | Values
--- | --- | ---
A | the multiplicand |
B | the multiplier(s) |

Return value: the product

*= A B
Multiplies an alias by a value.

Argument | Description | Values
--- | --- | ---
A | the alias to be multiplied |
B | the multiplier |

Example: *= foo 1337
*=f A B
Multiplies an alias by a floating-point value.

Argument | Description | Values
--- | --- | ---
A | the alias to be multiplied |
B | the multiplier |

Example: *=f foo 13.37
*f A B
Performs a floating point multiplication 2 or more numbers.

Argument | Description | Values
--- | --- | ---
A | the multiplicand |
B | the multiplier(s) |

Return value: the product

\f N
Adds color to a string.

Argument | Description | Values
--- | --- | ---
N | color id | 0-9, A-Z

The whole string has to be included in quotes.

Example: echo "\f3Hello \f0world!"Output: a red "Hello" and a green "world!"

See also: cncolumncolor
&& A B
Logical AND.

Argument | Description | Values
--- | --- | ---
A | first value |
B | second value |

Example: echo (&& 1 1)Output: 1

Example: echo (&& 1 0)Output: 0

Return value: A AND B

&b A B
Performs the operation AND using binary arithmetic on integer values (32-bit signed).

Argument | Description | Values
--- | --- | ---
A | the first argument |
B | the second argument |

See also: |b, ^b, !b
^b A B
Performs the operation XOR using binary arithmetic on integer values (32-bit signed).

Argument | Description | Values
--- | --- | ---
A | the first argument |
B | the second argument |

See also: &b, |b, !b
+ A B
Performs an addition 2 or more numbers.

Argument | Description | Values
--- | --- | ---
A | the first summand |
B | the summand(s) |

Example: echo the sum of x and y is (+ $x $y)

Return value: the sum

+= A B
Adds a value to an alias.

Argument | Description | Values
--- | --- | ---
A | the alias to add to |
B | value to be added |

Example: += foo 1337
+=f A B
Adds a floating-point value to an alias.

Argument | Description | Values
--- | --- | ---
A | the alias to add to |
B | value to be added |

Example: +=f foo 13.37
+f A B
Adds up two or more floating-point numbers.

Argument | Description | Values
--- | --- | ---
A | the first summand | float
B | the summand(s) | float

Return value: the sum

< A B
Determines if a value is smaller than a second value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

Return value: the comparison, 1 (smaller) or 0 (not smaller)

<= A B
Determines if a values is less than or equal to a second value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

<=f A B
Compares if a particular floating-point value is less than or equal to another floating-point value.

Argument | Description | Values
--- | --- | ---
A | The first value. |
B | The second value. |

Return value: (true)1||0(false)

<f A B
Compares if a particular floating-point value is smaller than another floating-point value.

Argument | Description | Values
--- | --- | ---
A | The first value. |
B | The second value. |

Return value: (true)1||0(false)

= A B
Determines if two values are equal.

Argument | Description | Values
--- | --- | ---
A | first value |
B | second value |

Example: echo there are only (concatword (= 1 1) (= 1 0)) types of people in the worldOutput: there are only 10 types of people in the world

Return value: the equality, 1 (equal) or 0 (not equal)

=f A B
Compares if a particular floating-point value is equal to another floating-point value.

Argument | Description | Values
--- | --- | ---
A | The first value. |
B | The second value. |

Return value: (true)1||0(false)

> A B
Determines if a value is bigger than a second value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

Return value: the comparison, 1 (bigger) or 0 (not bigger)

>= A B
Determines if a values is greater than or equal to a second value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

>=f A B
Determines if the first floating-point value is greater than or equal to the second floating-point value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

Return value: (true)1||0(false)

>f A B
Determines if the first floating-point value is greater than the second floating-point value.

Argument | Description | Values
--- | --- | ---
A | the first value |
B | the second value |

Return value: (true)1||0(false)

|| A B
Logical OR.

Argument | Description | Values
--- | --- | ---
A | first value |
B | second value |

Example: echo (|| 1 0)output: 1

Example: echo (|| 0 0)output: 0

Return value: A OR B

|b A B
Performs the operation OR using binary arithmetic on integer values (32-bit signed).

Argument | Description | Values
--- | --- | ---
A | the first argument |
B | the second argument |

See also: &b, ^b, !b
add2alias A E
This will append the passed 2nd argument to any existing content of the alias named in the 1st argument.

Argument | Description | Values
--- | --- | ---
A | the alias to add to |
E | the new element to add |

Several popular aliases have predefined shortcuts using this scriptalias: addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.

Example: foo = "one" add2alias foo two echo foo Output: one twoThis will output the string and override any other actions that might've been defined.

See also: add2bind, add2list
add2list A E
Appends a new element to a list.

Argument | Description | Values
--- | --- | ---
A | the alias (list) to add to |
E | the new element to add |

Example: tmp_list = []; add2list tmp_list Hello; add2list tmp_list world!; echo $tmp_listOutput: Hello world!

See also: add2alias, add2bind
addpunct S N
Injects cubescript punctuation.

Argument | Description | Values
--- | --- | ---
S | a string |
N | ID or name | 0 (quotes), 1 (brackets), 2 (parenthesis), 3 (_$_), 4 (quote), 5 (percent)

Example: echo (addpunct hello)Output: "hello"

Example: echo (addpunct hello 1)Output: [hello]

Example: echo (addpunct hello 2)Output: (hello)

Example: echo (addpunct hello 3)Output: $hello

Example: test = (concat echo (addpunct fov 3)); testOutput: 90.0

alias N A
Binds a name to commands.

Argument | Description | Values
--- | --- | ---
N | the name of the alias | string, must not contain '$'
A | the commands | string

Example: alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ]It is possible to re-bind an alias, even during its evaluation.

Example: test = [ echo "successful" ]There is also the shorthand version of defining an alias via the "=" sign.

See also: const, tempalias, isconst, checkalias, persistidents
aliasinit L B
Initializes a group of aliases using checkinit.

Argument | Description | Values
--- | --- | ---
L | the list of aliases to check for |
B | the block of code to ensure the aliases contain (optional) |

See also: checkalias, checkinit, check2init, check2initlist
at S N
Grabs a word out of a string.

Argument | Description | Values
--- | --- | ---
S | the string |
N | the index of the word |

Negative index number returns "".

Example: echo (at "zero one two three" 2)output: two

Return value: the word from the specified idex

break
Aborts a loop created with a 'loop', 'looplist' or 'while' command.

Example: loop i 10 [ if (= $i 4) [ break ]; echo $i]output: 0 1 2 3

See also: continue, loop, while
ceil F
Upper value of a float number.

Argument | Description | Values
--- | --- | ---
F | the float number to get the ceil from |

Return value: the ceil value (integer)

check2init A V
Defines an alias only if it does not already exist.

Argument | Description | Values
--- | --- | ---
A | alias name |
V | alias value |

See also: check2initlist, checkalias, checkinit, aliasinit
check2initlist L V
Uses check2init on a list of aliases.

Argument | Description | Values
--- | --- | ---
L | list of alias names |
V | alias value |

See also: checkalias, checkinit, aliasinit, check2init
checkalias A
Determines if the argument given is an existing alias or not.

Argument | Description | Values
--- | --- | ---
A | the alias to check for |

Example: hello = ""; echo (checkalias hello)Output: 1

Example: echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)Output: 0

See also: checkinit, aliasinit
checkinit A B
Ensures the initialization of an alias.

Argument | Description | Values
--- | --- | ---
A | the alias to check for |
B | the block of code to ensure that the alias contains (optional) |

Example: checkinit mapstartalwaysOutput: if alias mapstartalways does not exist, this command initializes it.

Example: checkinit mapstartalways [ echo New map, good luck! ]Output: if alias mapstartalways does not exist, it is initialized, and if the block of code "[ echo New map, good luck! ]" does not exist within the aliases contents, this command adds it.

See also: checkalias, aliasinit, check2init, check2initlist
concat S ...
Concatenates multiple strings with spaces inbetween.

Argument | Description | Values
--- | --- | ---
S | the first string |
... | collection of strings to concatenate |

Example: alias a "hello"; echo (concat $a "world")output: hello world

Return value: The newly created string

concatword S ...
Concatenates multiple strings.

Argument | Description | Values
--- | --- | ---
S | the first string |
... | collection of strings to concatenate |

The newly created string is saved to the alias 's'.

Example: alias a "Cube"; echo (concatword $a "Script")output: CubeScript

Return value: The newly created string

const N A
Set an alias as a constant.

Argument | Description | Values
--- | --- | ---
N | the name of the alias | string, must not contain '$'
A | the value (optional) | string

A constant cannot be redefined in the same AC session: its value cannot be changed. To get rid of a constant, use "delalias".
Constant alias is temporary that will not be written to saved.cfg, and thus will not persist after quitting.

Example: myalias = myvalue; const myalias;Set "myalias" value to "myvalue" then "lock" it as a constant.

Example: const myalias myvalue;You can directly set a value for your alias when you define it as a constant.

Example: const myalias myvalue; myalias = anothervalue;Assigning a value to a const will throw you an error. Output: myalias is already defined as a constant

See also: alias, tempalias, isconst
continue
Skip current loop iteration.

Example: loop i 5 [ if (= $i 2) [ continue ]; echo $i]output: 0 1 3 4

See also: break, loop, while
delalias N
Deletes the passed alias.

Argument | Description | Values
--- | --- | ---
N | the name of the alias | string, must not contain '$'

div A B
Performs an integer division.

Argument | Description | Values
--- | --- | ---
A | the dividend |
B | the divisor |

Return value: the quotient (integer)

div= A B
Divides an alias by a value.

Argument | Description | Values
--- | --- | ---
A | the alias to be divided |
B | the divisor |

Example: div= foo 1337
div=f A B
Divides an alias by a floating-point value.

Argument | Description | Values
--- | --- | ---
A | the alias to be divided |
B | the divisor |

Example: div=f foo 13.37
divf A B
Performs a division with floating-point precision.

Argument | Description | Values
--- | --- | ---
A |  | the dividend
B |  | the divisor

Return value: the quotient (floating-point)

editalias A
Interactively edits an alias in the console buffer.

Argument | Description | Values
--- | --- | ---
A | alias to edit | the alias name, without $

This takes the current value of the alias, and inserts it into the command line / text entry box.
If the alias doesn't exist, it is created.

Example: alias test "Hello World"; editalias testResult: edit test: Hello World

See also: editsvar, inputcommand
editsvar A
Interactively edits an existing alias in the console buffer.

Argument | Description | Values
--- | --- | ---
A | alias to edit | the alias name, without $

This takes the current value of the existing alias, and inserts it into the command line / text entry box.

Example: alias test "Hello World"; editsvar testResult: edit test: Hello World

See also: editalias, inputcommand
enumalias
Lists all persistent aliases that start with prefix.
Returns a table with two entries per alias: 1) full name and 2) name without prefix.
See also: alias
escape S
Replaces control characters in a string with escaped sequences.

Argument | Description | Values
--- | --- | ---
S | string to escape |

Example: echo (escape (concat (c 3) "Hello World"))Output: "\f3Hello World"

execute S
Executes the specified string as cubescript.

Argument | Description | Values
--- | --- | ---
S | the string to execute |

Example: execute (concat echo (addpunct fov 3))Example output: 90.0

findlist L I
Searches a list for a specified value.

Argument | Description | Values
--- | --- | ---
L | the list |
I | the item to find |

Return value: the index of the item in the list

floor F
Floor value of a float number.

Argument | Description | Values
--- | --- | ---
F | the float number to get the floor from |

Return value: The floor value (integer)

forceinit L V
Forcibly sets a list of aliases to a specified value.

Argument | Description | Values
--- | --- | ---
L | list of alias names |
V | alias value |

Example: alias1 = 0; alias2 = 0; alias3 = 0; alias4 = 0; alias 5 = 0Can be written as:

Example: forceinit [alias1 alias2 alias3 alias4 alias5] 0

format F V
Replaces "%" format specifiers in the string by the values specified in subsequent arguments.

Argument | Description | Values
--- | --- | ---
F | format | use %1..%9 for the values
V | value(s) |

In addition, it allows access to more than nine parameters. Parameter numbers of 10 and higher have to be prefixed with an additional zero. For example "%010" accesses parameter number ten.

Example: echo (format "%1 bottles of %2 on the %3, %1 bottles of %2!" 99 beer wall)output: 99 bottles of beer on the wall, 99 bottles of beer!

See also: format2
format2 F V
Replaces "%" format specifiers in the string by the values specified in subsequent arguments.

Argument | Description | Values
--- | --- | ---
F | format | use %1..%9 for the values
V | value(s) |

Like "format" command, but all parameters are treated as lists and are exploded first.
In addition, it allows access to more than nine parameters. Parameter numbers of 10 and higher have to be prefixed with an additional zero. For example "%010" accesses parameter number ten.

Example: echo (format "_%1_%2_%3_%4_%5_" "A B C" D E F)output: _A B C_D_E_F__

Example: echo (format2 "_%1_%2_%3_%4_%5_" "A B C" D E F)output: _A_B_C_D_E_

See also: format
getalias N
Returns the value of the alias.

Argument | Description | Values
--- | --- | ---
N | alias name |

See also: storesets, getvarrange
getvarrange W N
Gets range attribute for builtin variable.

Argument | Description | Values
--- | --- | ---
W | what | min, max, default
N | the name of any builtin variable (integer or float) |

See also: getalias
h0 P V
Returns value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision).

Argument | Description | Values
--- | --- | ---
P | precision |
V | value |

Example: echo (h0 2 1024)Output: 400

Example: echo (h0 4 1024)Output: 0400

Example: echo (h0 6 1024)Output: 000400

Example: echo (h0 0 (&b 0xe 0x3))Output: 2

Example: echo (h0 0 (|b 0xe 0x3))Output: f

Example: echo (h0 0 (^b 0xe 0x3))Output: d

Example: echo (h0 0 (!b 0xe))Output: fffffff1

Example: echo (h0 0 (* -1 0xe))Output: fffffff2

See also: l0
if cond true false
Controls the script flow based on a boolean expression.

Argument | Description | Values
--- | --- | ---
cond | the condition | 0 (false) or anything else (true)
true | the body to execute if the condition is true |
false | the body to execute if the condition is false |

Example: if (> $x 10) [ echo x is bigger than 10 ] [ echo x too small ]

inputcommand I C P N
Makes an input perform a certain command.

Argument | Description | Values
--- | --- | ---
I | input |
C | command |
P | prompt |
N | nopersist |

It opens a custom console buffer with custom prompt, initial buffer text and execution script (which gets the input buffer content in alias cmdbuf). If "nopersist" is not zero, the command will not be stored in console history.
See also: complete, listcomplete, saycommand
isconst A
Determines if the argument given is a constant or not.

Argument | Description | Values
--- | --- | ---
A | the alias to check for |

Example: const hello ""; echo (isconst hello)Output: 1

Example: hello = value; echo (isconst hello)Output: 0

See also: const
isIdent N
Returns whether or not there is an identifier by that name.

Argument | Description | Values
--- | --- | ---
N | identifier name |

isolatecontext C
Isolates the given context.

Argument | Description | Values
--- | --- | ---
C | context (integer or name) | CORE (0), CFG (1), PROMPT (2), MAPCFG (3), MDLCFG(4)

This disables access from this context to identifiers located in other contexts, also it removes all aliases created in this context once the running context changes.
See also: scriptcontext, sealcontexts
l0 W V
Leading zeros for the number V to make it W chars wide.

Argument | Description | Values
--- | --- | ---
W | width |
V | value |

It may look like 10 - which might be considered a mnemonic - but it's lowercase-L and 0!

Example: echo (l0 5 1000)Output: 01000

Example: echo (l0 3 1000)Output: 1000

See also: h0
listaverage L
Returns the average of a list of numbers.

Argument | Description | Values
--- | --- | ---
L | the list of numbers | supports ints and floats

Example: echo (listaverage "2 5 5")Output: 4.0

listlen L
returns the element count of the given list.

Argument | Description | Values
--- | --- | ---
L | the list |

listoptions
Lists the argument options for several argument types.

Example: echo (listoptions) Output: "entities ents weapons teamnames teamnames-abbrv punctuations crosshairnames menufilesortorders texturestacktypes cubetypes"

Example: echo (listoptions teamnames)Output: "CLA RVSF CLA-SPECT RVSF-SPECT SPECTATOR"

loop V N body
Loops the specified body.

Argument | Description | Values
--- | --- | ---
V | the alias used as counter |
N | the amount of loops |
body | the body to execute on each iteration |

This command sets the alias you choose, as first argument, from 0 to N-1 for every iteration.

Example: loop i 10 [ echo $i ]

See also: break, continue, while, looplist
looplist V N body
Browses a list and executes a body for each element.

Argument | Description | Values
--- | --- | ---
V | the list to browse |
N | the alias(es) containing the current element value |
body | the body to execute on each iteration |

It works optionally with several variables.

Example: looplist "zero one two three" number [echo $number]

Example: looplist [0 "is knife" 1 "is pistol"] [n w] [echo weapon $n $w]

See also: break, continue, loop, looplisti
looplisti V N body
Browses a list and executes a body for each element.

Argument | Description | Values
--- | --- | ---
V | the list to browse |
N | the alias(es) containing the current element value |
body | the body to execute on each iteration |

The same as looplist, but it automatically counts the loops in "i", starting with 0. It works optionally with several variables.

Example: a = [u v w]; b = [x y z]; looplisti $a m [echo $m (at $b $i) $i]Output: u x 0 , v y 1 , w z 2

See also: break, continue, loop, looplist
mod A B
Performs a modulo operation.

Argument | Description | Values
--- | --- | ---
A | the dividend |
B | the divisor |

Return value: the modulo value

modf A B
Performs a floating-point modulo operation.

Argument | Description | Values
--- | --- | ---
A | the dividend |
B | the divisor |

Example: echo (modf 7.5 12.5)Output: 7.5

Example: echo (modf 17.5 12.5)Output: 5.0

Return value: the modulo value

numargs
The number of arguments passed to the current alias.

Description | Values | Range | Default
--- | --- | --- | ---
numargs |  | 0..24 | 0

persistidents B
Controls whether aliases defined afterwards will be saved (1) or not (0).

Argument | Description | Values
--- | --- | ---
B | control option | 1: persistent, 0: not persistent

Rules:
* aliases created by "const" and "tempalias" are never persistent;
* aliases created or altered by "alias" or "=" become persistent, if the "persistidents" flag is set during that operation;
* "persistidents" is false during the execution of almost all config files during game start - those files can create aliases with default values which will not be persistent (until changed later while the flag is set);
* before saved.cfg is executed, the flag is set and stays set all throughout the game - which means, that all changes (for example from menus or in console) will change the altered alias to "persistent";
* exceptions for map or model config files are unnecessary, since those run restricted and can't create aliases anyway;
* exceptions are necessary for "late run" config files like those in config/opt/ folder.
This command may be used to manually set or clear the flag. It also returns the current state of the flag. If used in a config file, the flag is restored to its original value when the file ends execution.
In short: only late-run config files (meaning: run after saved.cfg was restored) may need to manually set/reset the flag. Use "const" and "tempalias" where appropriate and clear "persistidents" before creating an alias with a not-to-save default value that may be changed and made persistent later.

Example: persistidents 0; foo = [ echo "bar"]foo will not be saved and has to be redefined when restarting AC.

Example: persistidents 1; bar = [ echo "foo"]bar will be saved and persistent across sessions.

See also: alias
pop A
Resets a previously pushed alias to it's original value.

Argument | Description | Values
--- | --- | ---
A | alias |

It is allowed to use multiple arguments for "pop". So instead of "pop var_a ; pop var_b" you can write "pop var_a var_b". Also, "pop" will now give back the removed value of the first alias from the argument list. This allows using the pop'd value one last time.

Example: p = 1; push p 2; pop p; echo $pOutput: 1

See also: push
powf A B
Returns A raised to the power of B (floating-point).

Argument | Description | Values
--- | --- | ---
A | the mantissa |
B | the exponent |

Return value: A raised to the power of B

push N A
Temporarily redefines the value of an alias.

Argument | Description | Values
--- | --- | ---
N | alias name |
A | action |

Example: p = 1; push p 2; echo $pOutput: 2

See also: pop
resetsleeps
Resets all current "sleep".
result R
Sets the result value of a cubescript block.

Argument | Description | Values
--- | --- | ---
R | the result |

See also: execute
rnd A
Random value.

Argument | Description | Values
--- | --- | ---
A | the upper limit of the random value |

Return value: the random value, larger or equal 0 and smaller than A

round F
Rounds the given float.

Argument | Description | Values
--- | --- | ---
F | the float number to round |

Return value: the rounded integer, the precision is 1 unit

scriptcontext C N

Argument | Description | Values
--- | --- | ---
C | context (integer or name) | CORE (0), CFG (1), PROMPT (2), MAPCFG (3), MDLCFG(4)
N | id name |

See also: isolatecontext, sealcontexts
sealcontexts
Secures this configuration for the rest of the game.
See also: scriptcontext, isolatecontext
sleep N C P
Executes a command after specified time period.

Argument | Description | Values
--- | --- | ---
N | the amount of milliseconds |
C | the command to execute |
P | ignore map change (optional) |

Example: sleep 1000 [ echo foo ]Prints 'foo' to the screen after 1 second.

sortlist L
Returns a sorted version of a list.

Argument | Description | Values
--- | --- | ---
L | list to sort |

Example: echo (sortlist [1 3 2])Output: 1 2 3

storesets L A
Generates an alias (list) of the current values for the given aliases/CVARs.

Argument | Description | Values
--- | --- | ---
L | the list of aliases/CVARs |
A | the alias to store them in |

Example: storesets "sensitivity hudgun fov" tmpExample result: stores "3.000 1 120" into alias "tmp".

See also: getalias
strcmp A B
Determines if two strings are equal.

Argument | Description | Values
--- | --- | ---
A | the first string |
B | the second string |

Example: if (strcmp yes yes) [echo the two strings are equal] [echo the two strings are not equal]Output: the two strings are equal

Return value: the equality, 1 (equal) or 0 (unequal)

See also: strstr
strlen S
Returns the length (in characters, including whitespace) of string S.

Argument | Description | Values
--- | --- | ---
S | string |

Example: echo (strlen "Hello world!")Output: 12

See also: substr
strreplace S T N
Returns a string, with a portion of it replaced with a new sub-string.

Argument | Description | Values
--- | --- | ---
S | the original string to modify |
T | the target sub-string to replace |
N | the new sub-string to replace the target |

Example: echo (strreplace "Hello cruel world" cruel "")Output: Hello world

See also: substr
strstr A B
Determines if string B was found in string A.

Argument | Description | Values
--- | --- | ---
A | the first string |
B | the second string |

It returns position of string B in string A (counting from 1) or zero, if not found.

Example: if (strstr "Hello world!" Hello) [echo found Hello in Hello world!] [echo did not find Hello in Hello world!]Output: found Hello in Hello world!

Return value: integer, 0 (not found) or position (if found)

See also: strcmp
substr S A L
Copies a substring out of the original.

Argument | Description | Values
--- | --- | ---
S | the original string |
A | start position |
L | substring length (optional) |

Character indexes begins at 0. If "start position" is negative, the reference is the end of the string. It also counts negative length from total length, if "substring length" parameter is negative.

Example: echo (substr abcdefgh 2 5)Output: cdefg

Example: echo (substr abcdefgh -3 2)Output: fg

Example: echo (substr abcdefgh 2)Output: cdefgh

Example: echo (substr abcdefgh 1 -2)Output: bcdefg

Return value: the substring

See also: strlen, strreplace, parsestring
switch I C
Takes an integer argument to determine what block of code to execute.

Argument | Description | Values
--- | --- | ---
I | integer |
C | a variable number of 'case' arguments... |

This command can only handle up to 23 'cases' (because of cubescript's 24 argument limit).

Example: switch 2 [echo case 0] [echo case 1] [echo case 2] [echo case 3] [echo case 4]Output: case 2

tempalias N C
Creates a temporary alias that will not be written to saved.cfg, and thus will not persist after quitting.

Argument | Description | Values
--- | --- | ---
N | temporary alias name |
C | cubescript command(s) |

See also: alias, const
testchar C N
Tests a character argument for various things.

Argument | Description | Values
--- | --- | ---
C | the character to test |
N | type of test to run | min 0/max 7/default 0

See the following c++ functions for more information about the usage of this command:
isalpha(), isalnum(), isdigit(), islower(), isprint(), ispunct(), isupper(), and isspace()

Example: echo (testchar 1)Output: 1 // It is a 0-9 digit

Example: echo (testchar a 1)Output: 1 // It is a a-z or A-Z character

Example: echo (testchar z 2)Output: 1 // It is a a-z or A-Z character or 0-9 digit

Example: echo (testchar b 3)Output: 1 // It is a lowercase a-z character

Example: echo (testchar B 4)Output: 1 // It is a uppercase A-Z character

Example: echo (testchar , 5)Output: 1 // It is a printable character

Example: echo (testchar . 6)Output: 1 // It is a punctuation character

Example: echo (testchar " " 7)Output: 1 // It is a whitespace character

tolower S
Converts a string to all lowercase characters.

Argument | Description | Values
--- | --- | ---
S | a string |

Example: echo (tolower HELLO)Output: hello

See also: toupper
toupper S
Converts a string to all uppercase characters.

Argument | Description | Values
--- | --- | ---
S | a string |

Example: echo (toupper hello)Output: HELLO

See also: tolower
while cond body
Loops the specified body while the condition evaluates to true.

Argument | Description | Values
--- | --- | ---
cond | the condition | the code evaluated before each iteration
body | the body to execute on each iteration |

This command sets the alias "i" from 0 to N-1 for every iteration. Note that the condition here has to have [], otherwise it would only be evaluated once.

Example: alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]

See also: break, continue, loop

### General

This section describes general identifiers.

addpckserver S P
Adds a packages source server where to download custom content from.

Argument | Description | Values
--- | --- | ---
S | The server address. Trailing slash not needed. |
P | priority of the server |

Only add servers you trust.
The list of servers is saved into config/pcksources.cfg on game quit.
If a priority is given, it influences the sorting of servers. Servers with higher priority are queried first. If servers have the same priority, they are sorted by ping. Default priority is zero.

Example: addpckserver http://packages.ac-akimbo.net

See also: resetpckservers, autodownload, getpckserver
addzipmod N
Add the zip package file "mods/zipname.zip" to the virtual file system.

Argument | Description | Values
--- | --- | ---
N | the name of the zip mod |

Add the zip package file "mods/zipname.zip" to the virtual file system. Only files below the path "packages/" are added (and also files below "config/", if zipname starts with "###"). If the size of the zip file is below "zipcachemaxsize", the whole zip file is cached in memory. (Un-cached zip files are kept open at all time, so caching keeps the number of simultaneously opened files lower.)
See also: getmod, zipcachemaxsize, zipmodremove, zipmodclear, zipmodlist, zipmodgetdesc, zipmodgetfiles, zipmodgetrevision
afterinit
If defined, this will be executed after saved.cfg is loaded.
allowhudechos N
Enables or disables the ability of hudecho to output text to the heads up display.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0 off, 1 on |  | 0..1 | 1

See also: hudecho
applydialog N
Toggles the showing of the "Apply changes now?" menu when changing certain graphical settings.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 1 = show, 0 = don't show |  | 0..1 | 1

autodownload V
Determines if the game should try to download missing packages such as textures or mapmodels on the fly.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Note: This is turned on by default |  | 0..1 | 1

autodownloaddebug V
When the variable autodownloaddebug is set to 1 and/or in debug binaries, more debug output is produced.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Add debug info to autodownload |  | 0..1 | 0

autoexec
If defined, this will be executed after autoexec.cfg is loaded.
autogetmap B
Determines if the current played map should be automatically downloaded if it is not available locally.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable auto map download |  | 0..1 | 1

autogetnewmaprevisions N
Automatically get new map revisions from the server.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: no, 1: yes |  | 0..1 | 0

autoscreenshot B
Toggle for taking an automatic screenshot during intermission.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | 0=Off, 1=On |  | 0..1 | 1

cleanshot
Takes a "clean" screenshot with no HUD items.
Your current HUD configuration is stored into a buffer, and is re-enabled afterwards.
See also: screenshot, blankouthud
clockerror V
Sets the correction value for clockfix.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | correction value |  | 990000..1010000 | 1000000

Engine source-code snippet (main.cpp): if(clockfix) millis = int(millis*(double(clockerror)/1000000));
See also: clockfix
clockfix B
Enables correction of the system clock.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable correction |  | 0..1 | 0

See also: clockerror
complete C P E

Argument | Description | Values
--- | --- | ---
C | command | any command or alias
P | path | path to search
E | extension | extension to match

The completion will work on the first word of your console input.

Example: complete demo "demos" dmoIf you enter "/demo " and press TAB you will cycle through all available demos.

Example: alias mapcomplete [complete $arg1 "packages/maps" cgz]Helper alias for quickly adding complete-definitions for all gamemodes - see config/script.cfg (below "Auto-completions").

See also: saycommand, listcomplete
conline
Returns text from the last line in the console.
connected
Indicates if a connection to a server exists.

Description | Values | Range | Default
--- | --- | --- | ---
the connection state | 1 (connected), 0 (disconnected) | 0..1 | 0

conopen
Indicates the state of the console.

Description | Values | Range | Default
--- | --- | --- | ---
console state | 0: closed, 1: open in an alternate size, 2: open regularly | 0..2 | 0

See also: altconsize, toggleconsole
conskip N
Allows to browse through the console history by offsetting the console output.

Argument | Description | Values
--- | --- | ---
N | the offset |

default keys:
- on the keypad - scrolls backwards the console (conskip 5)
+ on the keypad - scrolls forwards the console (conskip -5)
* on the keypad - resets the console (conskip -1000)
'# or \' + mouse scroll - scrolls the console
current_version s
Compare given version to current version.

Argument | Description | Values
--- | --- | ---
s | newest available version |

Will show update notifications if the given version is higher than the running one.
datestring
Representation of date.
Format: Www Mmm dd hh:mm:ss yyyy
Use timestamp to create your own formatting.

Example: echo (datestring) "Sat Jun 7 17:08:35 2008"

dbgzip B
Output statistics and errors when handling zip compressed data.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:yes | 0..1 | 0

Advanced usage: may be helpful in debugging map files not loading.
debugargs ...
Dumps all command arguments to STDOUT.

Argument | Description | Values
--- | --- | ---
... | ... |

debugevents T
Whether or not to output input events.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | threshhold | 0:off,1/2:on | 0..2 | 0

If set to at least 1 all events will output their type number. Window events and mouse button/wheel events will output status information.
If set to 2 the KEYUP, TEXTINPUT and MOUSEMOVE events will trigger status output too.
See also:
demonameformat S
Sets the formatstring for demo filenames.

Argument | Description | Values
--- | --- | ---
S | string |

we use the following internal mapping of formatchars:
%g : gamemode (int) ; %G : gamemode (chr) ; %F : gamemode (full) ;
%m : minutes remaining ; %M : minutes played ;
%s : seconds remaining ; %S : seconds played ;
%h : IP of server ; %H : hostname of server (client only) ;
%n : mapname ;
%w : timestamp "when" (formatted by demotimeformat) .
See also: demotimeformat
demotimeformat S
Sets the formatstring for demo timestamp.

Argument | Description | Values
--- | --- | ---
S | string | strftime format

If the string starts with 'U', UTC is used - otherwise local time.
The same format options as in strftime().
See also: demonameformat, strftime() C++-Reference
disconnectonmaperror B
Disconnect from a server making us load an incompatible map.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:yes | 0..1 | 1

Maps that have not been converted to the new entity attribute scaling map format can cause this.
Edit it offline and make use of the config/opt/convmap.cfg.
echo L
Outputs text to the console.

Argument | Description | Values
--- | --- | ---
L | List of strings |

See also: hudecho
enumfiles P E
Lists files in a directory.

Argument | Description | Values
--- | --- | ---
P | path to directory |
E | extension |

If extension is specified, only files of that extension are listed.
If the extension is "dir", only directories are listed.
exec C
Executes all commands in a specified config file.

Argument | Description | Values
--- | --- | ---
C | the config file |

It also allows to pass arguments to and deliver results from script files - when a script file is executed, any additional arguments are passed as execarg1..execargX to the script. The number of arguments is in execnumargs and if the script in the file sets the value of execresult, the exec command returns that value.
Example:
if there is a file testscript.cfg with this content: execresult = (* $execarg1 $execarg2)
then the command: "echo (exec testscript.cfg 6 7)" will output "42".
execdir s
Executes all commands in all config files in the specified directory.

Argument | Description | Values
--- | --- | ---
s | the directory path from the assaultcube root |

Example: execdir scripts

See also: exec
getEngineState
Returns a list of values describing the current engine (rendering) state.
It will only be filled after the first frame was drawn.
The list is: FPS LOD WQD WVT EVT
FPS = Frames Per Second
LOD = Level Of Detail
WQD = World QuaD Count
WVT = World VerTex Count
EVT = Extra VerTex Count (HUD & menu)

Example: echo (getEngineState)

getpckserver
Returns a table with four columns of all configured package servers.
The columns are: host name, priority, ping and resolved. "resolved" is a flag, indicating, if the server answered the ping during game start.
See also: addpckserver, autodownload, resetpckservers
getscrext
Returns the file extension of the client's current screenshottype setting.

Example: echo (getscrext)Example output: .jpg

See also: screenshottype
groupvariables N
Controls how many variables (with similar names) are grouped together on one line in saved.cfg.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Variables per line |  | 0..10 | 4

This only pertains to commented variables in saved.cfg caused by omitunchangeddefaults being 0.
See also: omitunchangeddefaults
history N
Executes the specified command in the command line history.

Argument | Description | Values
--- | --- | ---
N | the N'th command from the history |

For example, binding "history 1" to a key allows you to quickly repeat the last command typed in (useful for placing many identical entities etc.)
hudecho L
Outputs text to the console and heads up display.

Argument | Description | Values
--- | --- | ---
L | List of strings |

See also: allowhudechos, echo
jpegquality N
Sets the JPEG screenshot image quality.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Compression level |  | 10..100 | 70

The image quality is set by it's compression level, a value of 10 sets maximum compression and a small file size but results in a bad quality image
while a value of 100 results in a large file but gives the best quality image.
lang L
Sets the language for which a translated server MOTD will be fetched, if the server has one for this language.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
L | the language code |  | .. |

This is always a two-letter language code as defined in the ISO 639 standard, three-letter codes are currently not allowed.
If lang is not set, or if the server does not have a matching MOTD file, it will fall back to English.
Note: this does not affect the client language, which is derived from the system settings (e.g. on many *nix systems, it may be changed via the "LANG" environment variable).

Example: en, de, fr, ...

listcomplete
See also: saycommand, complete
mapshot
Saves an image of the entire radar-overview of the map.
maxcon V
Sets the total number of text lines from the console to store as history.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 10..1000 | 200

maxhistory N
Sets how many typed console commands to store.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Total of stored commands |  | 0..10000 | 1000

This value sets how many command lines to store in memory, everytime a command is entered it gets store so it can be recalled using the "/" key along with the arrow keys to scroll back and forth through the list.
millis
Returns the number of milliseconds since engine start.

Example: echo (millis)

Return value: the milliseconds

networkdebug B
Enables output of processed network packets.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable network debugging |  | 0..1 | 0

This variable only has an effect if the client binary is compiled in debug mode.
numconlines
Hold the current number of lines on the console.
omitunchangeddefaultbinds N
Omit unchanged default binds from saved.cfg.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0 = print; 1 = print, but commented out; 2 = omit |  | 0..2 | 1

See also: omitunchangeddefaults
omitunchangeddefaults N
Omit variables with unchanged default values from saved.cfg.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0 = print, but commented out; 1 = omit |  | 0..1 | 1

If this value is 1, variables that are at their default values are omitted from saved.cfg. If 0, the variables are written to saved.cfg, but commented out.
See also: groupvariables, omitunchangeddefaultbinds
physinterp B
Toggles physics interpolation.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B |  |  | 0..1 | 1

pngcompress N
Sets the PNG screenshot file compression.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Compression level |  | 0..9 | 9

A value of 9 sets maximum data compression and a smaller file size while a value of 0 results in a large file image, quality is always the same since PNG its a loosless format.
protocol
Gets an integer representing the game protocol. READ ONLY
As example, the protocol of version 1.2.0.2 is represented as value 1201.
quit
Quits the game without asking.
resetcfg B
Determines if all settings should be reset when the game quits.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable reset |  | 0..1 | 0

It is recommended to quit the game immediately after enabling this setting. Note that the reset happens only once as the value of this variable is reset as well.
See also: resetbinds, quit
resetpckservers
Resets the list of packages source servers where to download custom content from.
Restart AssaultCube to take the effect.
See also: addpckserver, autodownload, getpckserver
resetsecuremaps
Clears the list of secured maps.
See also: securemap
run N
Executes a config file within "config" folder.

Argument | Description | Values
--- | --- | ---
N | the file name (without extension) |

saycommand S...
Puts a prompt on screen.

Argument | Description | Values
--- | --- | ---
S... | the text to display in the prompt (optional) |

This puts a prompt on screen that you can type into, and will capture all keystrokes until you press return (or ESC to cancel). If what you typed started with a "/", the rest of it will be executed as a command, otherwise its something you "say" to all players.
default keys:
T - opens empty prompt
` or / or ^ - opens a command prompt /
Y - opens a command prompt % (for team chat)
Tab - autocompletes forwards commands/variables/aliases
left Shift + Tab - autocompletes backwards commands/variables/aliases
left Shift + Esc - resets the commandline to the state before using TAB-completion
Up Arrow - browse forwards command history
Down Arrow - browse backwards command history
See also: complete, listcomplete, inputcommand
screenshot
Takes a screenshot.
Screenshots are saved to "screenshots/[date]_[time]_[map]_[mode].[ext]", where [ext] is the image type selected.
default key: F12
See also: cleanshot
screenshotscale S
Scales screenshots by the given factor before saving. 1 = original size, 0.5 = half size, etc.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
S | Scale |  | 0.1..1 | 1

screenshottype T
Toggle format of screenshot image. Your choice is for BMP (0), JPEG (1) or PNG (2).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | 0=BMP, 1=JPEG, 2=PNG |  | 0..2 | 1

See also: getscrext
securemap S
Adds a map to the list of secured maps.

Argument | Description | Values
--- | --- | ---
S | the name of the map |

Secured maps can not be overwritten by the commands sendmap and getmap.
See also: resetsecuremaps, sendmap, getmap
setclipboardtext T

Argument | Description | Values
--- | --- | ---
T | Text to put in the clipboard. |

systime
Seconds since the epoch (00:00:00 UTC on January 1, 1970).

Example: echo (systime)

throttle_accel V
Determines how fast network throttling accelerates.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | acceleration |  | 0..32 | 2

See also: throttle_interval, throttle_decel
throttle_decel V
Determines how fast network throttling decelerates.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | deceleration |  | 0..32 | 2

See also: throttle_accel, throttle_interval
throttle_interval V
Determines the interval of re-evaluating network throttling.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | interval | seconds | 0..30 | 5

See also: throttle_accel, throttle_decel
timestamp
A list of values for current time.
Format: YYYY mm dd HH MM SS

Example: echo (timestamp) "2008 08 08 08 08 08"

Example: echo (timestamp) "2063 04 05 12 00 00"

Example: echo (at (timestamp) 0) (at (timestamp) 2) (at (timestamp) 1) "2063 05 04"

timestring
The current time in (H)H:MM:SS format.

Example: echo (timestring) "12:34:56"

Example: echo (timestring) "1:02:03"

version
Gets an integer representing the game version. READ ONLY
As example, version 1.2.0.2 is represented as value 1202.
See also: current_version
writecfg
Writes current configuration to config/saved.cfg - automatic on quit.
zipcachemaxsize S
Maximal size of the file, which is cached in memory.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
S | size [kB] |  | 0..1024 | 512

If the size of the zip file is below "zipcachemaxsize", then during loading the whole zip file is cached in memory. When the size is greater, then zip is just opened as a file and read from disk.
See also: addzipmod
zipmodclear
Removes all zip files from the virtual file system.
See also: addzipmod, zipmodremove
zipmodgetdesc N
Reads and returns the first 11 lines from the file "desc.txt" in the named zip file.

Argument | Description | Values
--- | --- | ---
N | the name of the zip mod |

The first line is supposed to contain a descriptive title for the zip (for use in menus) and the next 10 lines should contain a more detailed description (also for use in menus). The command also unpacks "preview.jpg" from the zip and mounts it as a temporary file under the name "packages/modpreviews/zipname.jpg".
See also: getmod, addzipmod, zipmodlist, zipmodgetfiles, zipmodgetrevision
zipmodgetfiles N
Returns the list of files contained in a zip file.

Argument | Description | Values
--- | --- | ---
N | the name of the zip mod |

See also: getmod, addzipmod, zipmodlist, zipmodgetdesc, zipmodgetrevision
zipmodgetrevision N
Returns the revision number of the zip file.

Argument | Description | Values
--- | --- | ---
N | the name of the zip mod |

The number is supposed to be part of a filename: "revision_n". If no such file is found in the zip file, the return value is zero. The content of the revision file is not relevant and a file size of zero is recommended.
See also: getmod, addzipmod, zipmodlist, zipmodgetdesc, zipmodgetfiles
zipmodlist W
Lists zip files in "mods/".

Argument | Description | Values
--- | --- | ---
W | what | all, active, inactive

By default or if "what" is "all", all zips are listed. If "what" is "active", only those zips, that are already in use, are listed. If "what" is "inactive", only the unused zip files are listed.
See also: getmod, addzipmod, zipmodgetdesc, zipmodgetfiles, zipmodgetrevision
zipmodremove N
Removes one zip file from the virtual file system.

Argument | Description | Values
--- | --- | ---
N | the name of the zip mod |

See also: addzipmod, zipmodclear

### Gameplay

This section describes gameplay related identifiers.

akimboautoswitch B
Whether or not to automatically switch to akimbo upon pickup.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:yes | 0..1 | 1

If you are brandishing your pistol while walking over the pickup you will switch to akimbo every time.
akimboendaction
Sets the behavior of weapon switching upon akimbo expiration.

Argument | Description | Values
--- | --- | ---
| switch to knife | 0
| stay with pistol | 1
| switch to grenades | 2
| switch to primary | 3

If no ammunition is detected for the target weapon, it will fallback to the previous weapon until it finds a weapon with ammunition to use.
attack
Fires the current weapon.
default key: left mouse button
autoreload B
Indicates if the weapons should be reloaded automatically.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | the autoreload state | 0: off, 1: on | 0..1 | 1

See also: reload
backward
Moves the player backward.
default key: S or Down Arrow
benchme
Moves from active team to spectator during match.
burstshots N S
Sets the firing mode of automatic weapons between full auto mode and burst fire mode.

Argument | Description | Values
--- | --- | ---
N | the weapon number or name | 4 (subgun), 6 (assault), 8 (akimbo)
S | shots per burst | Special values: 0: set weapon to full auto, -1: don't set, instead check and return shots per burst

changefollowplayer D

Argument | Description | Values
--- | --- | ---
D | delta | how many players to shift +/-

See also: setfollowplayer
changeteam
Swaps your player to the enemy team.
See also: team
checkmag N
Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve)

Argument | Description | Values
--- | --- | ---
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)

See also: magcontent, magreserve
clearignored A
Clear list of ignored players.

Argument | Description | Values
--- | --- | ---
A | client number, or -1 to clear the whole list |

Omit the client number to clear the whole list.
clearmuted A
Clears a list of muted players.

Argument | Description | Values
--- | --- | ---
A | client number, or -1 to clear the whole list |

Omit the client number to clear the whole list.
connect N O P
Connects to a server.

Argument | Description | Values
--- | --- | ---
N | the address of the server (hostname or IP) (optional) |
O | the port (optional) |
P | the server password (optional) |

If the server name is omitted, the client will try to connect to an available server in the LAN. If the port is omitted or set to 0, the default port will be used.

Example: connect 127.0.0.1 555 myServerPassword

See also: connectadmin, disconnect, reconnect
connectadmin N O P
Connects to a server and tries to claim admin state.

Argument | Description | Values
--- | --- | ---
N | the address of the server (hostname or IP) (optional) |
O | the port (optional) |
P | the admin password |

This command will connect to a server just like the command 'connect' and try to claim admin state. If the specified password is correct, the admin will be able to connect even if he is locked out by ban, private master mode or taken client slots. If successfully connected, bans assigned to the admin's host will be removed automatically. If all client slots are taken a random client will be kicked to let the admin in.
If the server name ist omitted, the client will try to connect to an available server in the LAN. If the port is omitted or set to 0, the default port will be used.

Example: connectadmin 127.0.0.1 777 myAdminPasswordconnect as admin on port 777 of localhost

Example: connectadmin "" 0 myAdminPasswordwill try to connect to a LAN server on the default port as admin with the given password of "myAdminPassword".

See also: connect, disconnect, reconnect
crouch
Triggers a crouch.
default key: left Shift
curautoteam
Returns the server's current autoteam state.
curdemofile
Returns the name of played demo.
See also: demo
curmap
Returns the current map being played.
See also: gamemode, map, mode
curmaprevision
Current map revision number.
curmastermode
Returns the server's current mastermode state.
curname
Returns the nick name of the local player.
See also: name
curpausemode
Returns the server's current pause state (1=paused, 0=resumed).
curplayers
Returns the size of the players vector.
The return value includes the local player "(you)" and works in both singleplayer and multiplayer scenarios. It can be used, for example, in a loop to find all valid clients (players) on server. Note: it DOESN'T return current number of players.
See also: isclient
currentprimary
Returns the weapon-index the local player currently has selected as primary.
This is not the same as curweapon - which could be a grenade or the knife.
See also: nextprimary, curweapon, prevweapon, weapon, magcontent, magreserve, hasprimary
curserver I
Returns information on the current server - if you're connected to one.

Argument | Description | Values
--- | --- | ---
I | info | 0, 1, 2, 3, 4, 5, 6, 7, 8

If I is 0 (omitted or any other value than the ones below) you will get a string with 'IP PORT'
If I is 1,2 or 3 you will get the IP, HostName or port respectively.
If I is 4 you get a string representing the current state of the peer - usually this should be 'connected'.
If I is 5 you will get a server name.
If I is 6 or 7 you will get a server description.
If I is 8, you will get a serverbrowser-line with the server - this is handled with caution, sometimes empty, #8 will be outdated w/o serverbrowser open.

Example: echo [I am (curserver 4) to (curserver 2)]Output: I am connected to ctf-only.assault-servers.net

Example: last_server = "" remember_server = [ if (strcmp (curserver 4) "connected") [ last_server = (curserver 0) echo "I'm remembering:" $last_server ] [ echo "you are not 'connected' - you" (concatword "are '" (curserver 4) "' !") ] ] bind PRINT [ if (strcmp $last_server "") [ remember_server ] [ say (concat "^L2I was just ^Lfon^L3" $last_server) last_server = "" ] ]This will either remember or retrieve the last server you pressed the PrintScreen-key on.

curweapon
Returns the weapon-index the local player is currently holding.
See also: currentprimary, nextprimary, prevweapon, weapon, magcontent, magreserve, hasprimary
demo S
Plays a recorded demo.

Argument | Description | Values
--- | --- | ---
S | the demo name |

Playback is interpolated for the player whose perspective you view.
See also: setmr, rewind, curdemofile
disconnect
Leaves a server.
See also: reconnect, connect, connectadmin
dlmap S
Downloads and loads the specified map from an available packages source server.

Argument | Description | Values
--- | --- | ---
S | the name of the map |

See also: getmap, sendmap
drawzone X1 X2 Y1 Y2 C
Draws a zone marker with the specified color and dimensions on the minimap/radar.

Argument | Description | Values
--- | --- | ---
X1 | X-coordinate - top-left corner |
X2 | X-coordinate - bottom-right corner |
Y1 | Y-coordinate - top-left corner |
Y2 | Y-coordinate - bottom-right corner |
C | a color for the zone, in hexadecimal notation | default: 0x00FF00 (green)

This is primarily intended for the survival mode.
You can draw a few zones at a time. They will be reset (i.e. removed) once a new game starts.
Note that the coordinates must be specified as integers, not as floating-point values.
See also: resetzones, survival
dropflag
Drops the taken flag.
default key: Backspace
findcn N
Finds client number (cn) of player with given name.

Argument | Description | Values
--- | --- | ---
N | player name |

flyspeed N
Determines by how much to multiply the fly speeds by.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the multiplier |  | 1.0..5.0 | 2.0

forward
Moves the player forward.
default key: W or Up Arrow
fragmessage N M
Sets the frag message corresponding to a weapon (appearing on the hud).

Argument | Description | Values
--- | --- | ---
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)
M | the message you want to appear | example: sniped

Example: fragmessage sniper snipedIt will display "you sniped unarmed" on the hud when you frag unarmed with sniper.

See also: gibmessage, weapon
gamespeed N
Sets the gamespeed in percent.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the game speed |  | 10..1000 | 100

This does not work in multiplayer.
gametimecurrent
Returns the time (in milliseconds) of the currently played game. READ ONLY

Example: showtime = [ if (> $lastgametimeupdate 0) [ gmr = (- $gametimemaximum (+ $gametimecurrent (- (millis) $lastgametimeupdate))) gsr = (div $gmr 1000) gts = (mod $gsr 60) if (< $gts 10) [ gts = (concatword 0 $gts) ] [ ] gtm = (div $gsr 60) if (< $gtm 10) [ gtm = (concatword 0 $gtm) ] [ ] echo (concatword $gtm : $gts) remaining ] [ echo gametime not updated yet ] ]

See also: minutesremaining, gametimemaximum, lastgametimeupdate, millis
gametimemaximum
Returns the maximum time (in milliseconds) of the currently played game. READ ONLY
See also: minutesremaining, gametimecurrent, lastgametimeupdate, millis
gametimestart
Returns the time (in milliseconds) when the last map was loaded.
See also: minutesremaining, gametimecurrent, lastgametimeupdate, millis
getdemo X P
Gets the recorded demo from a game on the server.

Argument | Description | Values
--- | --- | ---
X | number in list |
P | subpath (optional) |

If F10 is pressed earlier than two minutes into the game, the last game will be downloaded.
If F10 is pressed later than two minutes into the game, the current game is scheduled to be automatically downloaded when it ends.
See also: listdemos
getmap S C
Retrieves the last map that was sent to the server using 'sendmap'.

Argument | Description | Values
--- | --- | ---
S | the name of the map |
C | cubescript to execute once map is installed (optional) |

If the command is passed an argument, different than the map being played, the game tries to download the specified map from an available packages source server.
See also: sendmap, dlmap
getmod N
Try to download mods/modname.zip from all configured package servers.

Argument | Description | Values
--- | --- | ---
N | the name of the mod |

Does not automatically activate the mod.
See also: addzipmod
gibmessage N M
Sets the gib message corresponding to a weapon (appearing on the hud).

Argument | Description | Values
--- | --- | ---
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)
M | the message you want to appear | example: slashed

This command is identical to fragmessage, please see it.
See also: fragmessage, weapon
gndtoggle
Toggles between your primary weapon and grenades (must be bound to a key).
See also: sndtoggle, knftoggle
gonext M
Go to the next match in the servers rotation for the desired gamemode.

Argument | Description | Values
--- | --- | ---
M | gamemode | 0:TDM,5:CTF,10:OSOK

TODO: elaborate
grenades
Switches to grenades, if available (must be bound to a key).
See also "quicknadethrow" command.
default key: 3 - switches to grenades
See also: primary, secondary, melee, quicknadethrow
hasprimary
Determines if the local player (you) are currently carrying a primary weapon.
Returns 0 (false) or 1 (true).

Example: add2bind MOUSE1 [ if (hasprimary) [ echo you attacked with a primary weapon ] ]Everytime you press the left mouse button, assuming you are carrying your primary weapon, the above echo will be executed.

See also: currentprimary, curweapon, checkmag
highestcn
Returns the highest valid client number available.
ignore A
Ignore a player.

Argument | Description | Values
--- | --- | ---
A | client number |

You won't see any further game chat or hear any more voice com messages from that player.
ignoreall
Ignore all clients currently on the server.
See also: unignoreall, ignoreteam, ignoreenemy
ignoreenemy
Ignore all clients on the enemy team.
See also: ignoreall, unignoreall, ignoreteam
ignoreteam T
Ignore all clients on the specified team.

Argument | Description | Values
--- | --- | ---
T | the team to ignore | 0 or 1 || cla or rvsf

See also: ignoreall, unignoreall, ignoreenemy
isclient C
Determines if the client number given is a valid client (player).

Argument | Description | Values
--- | --- | ---
C | client number |

Example: echo (isclient 0)Example output: 1

Example: echo (isclient 32)Example output: 0

See also: curplayers
jump
Triggers a jump.
default key: Space or right Ctrl
knftoggle
Toggles between your primary weapon and knife (must be bound to a key).
See also: sndtoggle, gndtoggle
lanconnect
Tries to connect to a LAN server.
lastgametimeupdate
Returns the last time (in milliseconds) the gametime was updated. READ ONLY
See also: minutesremaining, gametimecurrent, gametimemaximum, millis
lastpm
Holds the CN of the last client who sent you a private message.
If you haven't recieved any private messages, 'lastpm' is -1
See also: pm, quickanswer
left
Moves the player left.
default key: A or Left Arrow
listdemos
Get the game demos listing from the server we are currently connected.
See also: getdemo, cleardemo
listignored
Print a list of all players that you are currently ignoring.
listmuted
Prints a list of all players that you have muted.
loadcrosshair T I
Loads a crosshair for given type.

Argument | Description | Values
--- | --- | ---
T | type | default, teammate, scope, edit, knife, pistol, carbine, shotgun, subgun, sniper, assault, grenade, akimbo, reset
I | image |

Example: loadcrosshair red_dot.pngLoads the red_dot.png crosshair for all weapons.

Example: loadcrosshair default red_dot.pngSame as above. Loads the red_dot.png crosshair for all weapons.

Example: loadcrosshair knife red_dot.pngLoads the red_dot.png crosshair for your knife only.

Example: loadcrosshair assault red_dot.pngLoads the red_dot.png crosshair for your assault rifle only.

Example: loadcrosshair scope red_dot.pngLoads the red_dot.png crosshair for your sniper rifle scope only.

Example: loadcrosshair resetLoads all default crosshairs (including teammate and scope).

loadmap M
Loads a map directly in the current gamemode (singleplayer only).

Argument | Description | Values
--- | --- | ---
M | map name |

See also: map, votemap, mode
magcontent N
Returns contents of current magazine.

Argument | Description | Values
--- | --- | ---
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)

A knife will always return 1.
Weapons that aren't available will return -1.
See also: curweapon, currentprimary, nextprimary, prevweapon, weapon, magreserve
magreserve N
Returns contents of magazine reserve.

Argument | Description | Values
--- | --- | ---
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)

See also: curweapon, currentprimary, nextprimary, prevweapon, weapon, magcontent
map M
Loads up a map in the gamemode set previously by the 'mode' command.

Argument | Description | Values
--- | --- | ---
M | Name of the map to load | string

If connected to a multiplayer server, it votes to load the map (others will have to type "map M" as well to agree with loading this map). To vote for a map with a specific mode, set the mode before you issue the map command.
A map given as "blah" refers to "packages/maps/blah.cgz", "mypackage/blah" refers to "packages/mypackage/blah.cgz". At every map load, "config/default_map_settings.cfg" is loaded which sets up all texture definitions, etc. Everything defined there can be overridden per package or per map by creating a "mapname.cfg" which contains whatever you want to do differently from the default.
When the map finishes it will load the next map when one is defined, otherwise it reloads the current map. 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").
See also: votemap, loadmap, mode
mapstartalways
If this alias exists it will be run every time the game starts a new map.

Example: mapstartalways = [ echo "------------------------------" ] This will output the string and override any other actions that might've been defined.

Example: addOnLoadAlways [ echo "------------------------------" ] This will output the string after any previously defined actions have run.

See also: add2alias, mapstartonce, onNewMap
mapstartonce
If this alias exists it will be run when the game starts a new map, then it is deleted.

Example: mapstartonce = [ echo "------------------------------" ] This will output the string and override any other actions that might've been defined.

Example: addOnLoadOnce [ echo "------------------------------" ] This will output the string after any previously defined actions have run.

See also: add2alias, mapstartalways, onNewMap
me ...
Action chat message.

Argument | Description | Values
--- | --- | ---
... | ... |

melee
Switches to knife (must be bound to a key).
default keys:
4 - switches to knife
middle mouse button - switches to knife and attacks (if the key is held)
See also: primary, secondary, grenades
minutesremaining
Returns the remaining minutes of the currently played game. READ ONLY
See also: gametimecurrent, gametimemaximum, lastgametimeupdate, millis
modconnect A B C
Connects to a modded server.

Argument | Description | Values
--- | --- | ---
A | IP |
B | port |
C | password |

The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server.
modconnectadmin A B C
Connects to a modded server and tries to claim admin state.

Argument | Description | Values
--- | --- | ---
A | IP |
B | port |
C | admin password |

The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server.
modlanconnect
Tries to connect to a modified LAN server.
The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server.
muteplayer A
Mutes a player.

Argument | Description | Values
--- | --- | ---
A | client number |

You won't hear any further voice com messages from that player.
name N
Sets the nick name for the local player.

Argument | Description | Values
--- | --- | ---
N | the name |

See also: curname
nextprimary A
Sets the primary weapon on next respawn.

Argument | Description | Values
--- | --- | ---
A | the weapon number or name | 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault)

nickcomplete
Adds a command to complete nicknames on.
Your own nick will be ignored.

Example: nickgreet = [ say (concat "Hello," (concatword $arg1 "!")) ]; nickcomplete nickgreetwith this you can enter "/nickgreet " and cycle via TAB to the nickname you want to greet.

See also: complete
onAttack weapon
If defined, this will be executed each time you shot a bullet, throw a grenade or use your knife.

Argument | Description | Values
--- | --- | ---
weapon | The weapon that was used |

Remark: it works only in singleplayer.
onCallVote
If this alias exists it will be run every time a vote is called.
See also: onChangeVote, onVoteEnd
onChangeVote
If this alias exists it will be run every time a vote is changed.
See also: onCallVote, onVoteEnd
onConnect player
If defined, this will be executed when you or another player join(s) a server.

Argument | Description | Values
--- | --- | ---
player | The client number of the player who connected | integer (-1 for local player)

onDisconnect player
If defined, this will be executed when you or another player disconnect(s) from a server.

Argument | Description | Values
--- | --- | ---
player | The client number of the player who disconnected | integer (-1 for local player)

onFlag action actor flag
If defined, this will be executed each time a flag action occurs.

Argument | Description | Values
--- | --- | ---
action | The action that occured | integer (0 = stolen, 1 = dropped, 2 = lost, 3 = returned, 4 = scored, 5 = ktfscore, 6 = failed to score, 7 = reset)
actor | The client number of the actor | integer
flag | The flag owner team | integer (0 = CLA, 1 = RVSF)

Remark: it works only in singleplayer.
onHit actor target damage gun gib
If it's defined, this alias will be executed each time a damage is done.

Argument | Description | Values
--- | --- | ---
actor | The client number of the actor | integer
target | The client number of the target | integer
damage | The damage done | integer
gun | The number of the gun used | integer
gib | Is it a gib or a normal frag | integer (0 or 1)

Remark: it works only in singleplayer.
onKill actor target gun gib
If it exists, this alias will be executing when any player get killed, receiving a few arguments.

Argument | Description | Values
--- | --- | ---
actor | The client number of the actor | integer
target | The client number of the target | integer
gun | The number of the gun used | integer
gib | Is it a gib or a normal frag | integer (0 or 1)

Remark: it works only in singleplayer.
onLastMin
If this alias exists, it will be automatically executed on the last minute remaining mark.
onNameChange player new name
If defined, this will be executed when you or another player change(s) his name.

Argument | Description | Values
--- | --- | ---
player | The client number of the player who changed name | integer
new name | The new name of the client | string

The alias is executed before the name is effectively changed, so you can still get the previous name of the client from this alias.
Remark: it works only in singleplayer.
onPickup item q
If defined, this will be executed each time you pick up an item.

Argument | Description | Values
--- | --- | ---
item | The item that was picked up | integer (0 = pistol clips, 1 = ammo box, 2 = grenade, 3 = health, 4 = helmet, 5 = armour, 6 = akimbo)
q | The quantity that was received |

Remark: it works only in singleplayer.
onPM player message
If defined, this will be executed when another player sent you private message.

Argument | Description | Values
--- | --- | ---
player | The client number who sent you private message | integer
message | The private message | string

onReload B
If defined, this will be executed each time you reload a weapon.

Argument | Description | Values
--- | --- | ---
B | was autoreload? | 0 (false), 1 (true)

Remark: it works only in singleplayer.
onSpawn player
If defined, this will be executed each time a player spawns.

Argument | Description | Values
--- | --- | ---
player | The client number of the player who spawned | integer

Remark: it works only in singleplayer.
onVoteEnd
If this alias exists it will be run every time a vote passes or fails.
See also: onCallVote, onChangeVote
onWeaponSwitch W
If defined, this will be executed each time you switch to a different weapon.

Argument | Description | Values
--- | --- | ---
W | The weapon number that you switched to |

Remark: it works only in singleplayer.
pause P
Vote to pause or resume the match.

Argument | Description | Values
--- | --- | ---
P | pause or resume | 1 (pause) or 0 (resume)

This command is only supported on servers that are in 'match' mastermode.
You can use the alias 'togglepause' to switch between pause and resume.
See also: mastermode
paused B
Determines if the singleplayer game should be paused.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | pause game |  | 0..1 | 0

default key: Pause
player C A
Retrieve an attribute of a player identified by clientnum.

Argument | Description | Values
--- | --- | ---
C | clientnum | 1,2,3,..
A | attribute | magcontent, ammo, primary, ..

If the clientnum does not match a valid player the result will be empty, just as without an attribute passed.
The following attributes can be retrieved: magcontent, ammo, primary, curweapon, nextprimary, health, armour, attacking, scoping, x, y, z, name, team, ping, pj, state, role, frags, flags, deaths, tks, alive, spect, cn, skin_cla, skin_rvsf, skin, ip
See also: player1
player1 A
Retrieve an attribute of yourself.

Argument | Description | Values
--- | --- | ---
A | attribute | magcontent, ammo, primary, ..

See player for all retrievable attributes.
See also: player
pm C L
Sends a private message to a specified client.

Argument | Description | Values
--- | --- | ---
C | Client number |
L | List of strings |

See also: say, quickanswer, lastpm
prevweapon
Returns the weapon-index the local player was previously holding.
See also: currentprimary, nextprimary, curweapon, weapon, magcontent, magreserve
primary
Switches to your current primary weapon (must be bound to a key).
default key: 1
See also: secondary, melee, grenades
pstat_weap C
Returns the shot statistics for the player with the given clientnumber.

Argument | Description | Values
--- | --- | ---
C | client | 0..N

The list is:
knife/atk dmg pistol/atk dmg carbine/atk dmg shotgun/atk dmg smg/atk dmg sniper/atk dmg assault/atk dmg nade/atk dmg akimbo/atk dmg

Example: echo (pstat_weap 0) Output: 0 0 0 0 0 0 0 0 0 0 1 240 15 312 0 0 3 112 0 0The output is a list of tuples for all weapons, SHOTS-FIRED and DAMAGE-DEALT for each.

See also: start_intermission, pstat_score, weapon
quickanswer
Easily respond the last client who sent you a private message.
default key: N
See also: pm, lastpm
quicknadethrow
Switches to grenades, if available (must be bound to a key).
If grenades are already selected or the key is held, it throws a grenade and switches back to previous weapon.
default keys:
G - for all weapons
right mouse button - for all weapons except sniper rifle
See also: grenades
reconnect P
Disconnects then reconnects you to the current server.

Argument | Description | Values
--- | --- | ---
P | the server password (optional) |

See also: disconnect, connect, connectadmin
reload A
Reloads the weapon.

Argument | Description | Values
--- | --- | ---
A |  | value

default key: R
See also: autoreload
resetzones
Reset all drawn zones.
See also: drawzone, survival
rewind S
Rewind the current demo to S seconds ago.

Argument | Description | Values
--- | --- | ---
S | the number of seconds to rewind |

Note: you can use a negative value to forward.
See also: demo, setmr
right
Moves the player right.
default key: D or Right Arrow
say S...
Outputs text to other players.

Argument | Description | Values
--- | --- | ---
S... | the text |

If the text begins with a percent character (%), only team mates will receive the message.
scopefov V
Determines the FOV when scoping.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 5..60 | 50

See also: fov
secondary
Switches to your secondary weapon (must be bound to a key).
default key: 2
See also: primary, melee, grenades
setfollowplayer C

Argument | Description | Values
--- | --- | ---
C | clientnum | which player to follow

See also: changefollowplayer, spectatecn
setmr M
Go to a predefined number of minutes before the end of the game while watching a demo.

Argument | Description | Values
--- | --- | ---
M | the minutes remaining to skip to |

See also: demo, rewind
setnext G M
Call a vote for mode and map.

Argument | Description | Values
--- | --- | ---
G | gamemode | 0:TDM,5:CTF,10:OSOK
M | map | ac_mines,ac_douze,megamap

TODO: elaborate
setscope Y
Displays a scope for the sniper-rifle.

Argument | Description | Values
--- | --- | ---
Y | scope on? | 0 or 1

It is used in the zoom-script (config/scripts.cfg: "const zoom").
default key: right mouse button
shiftweapon D
Shifts your selected weapon by a given delta.

Argument | Description | Values
--- | --- | ---
D | delta | -N..-1,+1..N

By default the mouse-wheel shifts one up or down according to your scroll direction.
default keys:
MOUSE4 - cycle one up
MOUSE5 - cycle one down
sndtoggle
Toggles between your primary weapon and secondary weapon (must be bound to a key).
See also: knftoggle, gndtoggle
spectate
Toggles spectator mode.
See also: spectatemode, spectatepersistent
spectatecn
Returns client number of spectated player.
See also: setfollowplayer
spectatemode M
Sets the desired spectating mode.

Argument | Description | Values
--- | --- | ---
M | the mode | 2 (1st-person), 3 (3rd-person), 4 (3rd-person transparent), 5 (free flying)

default key: SPACE - switch spectator mode
See also: spectate
spectatepersistent N
Enables persistent spectating concrete player.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: enabled in non-arena modes, 1: always enabled |  | 0..1 | 1

For "spectatepersistent" = 1 persistent spectating is enabled in all game modes in multiplayer (that means, that spectated player isn't changed after his death), for "0" it is enabled only in non-arena modes.
See also: spectate
start_intermission
If this alias exists it will be run when the game reaches intermission.

Example: start_intermission = [ echo "INTERMISSION - STATISTICS TIME" loop p 255 [ pn = (player $p name) if (strcmp $pn "") [ ] [ echo (concatword Player $p ":") (pstat_score $p) ":" (pstat_weap $p) ] ] echo "------------------------------" ] This will output the full statistics line for all players.

See also: pstat_score, pstat_weap
stopdemo
Stops demo playback.
suicide
Kills your player. You will lose 1 frag point and receive 1 death point when using this command.
team N
Sets the team for the local player.

Argument | Description | Values
--- | --- | ---
N | the team number or name | 0 (CLA), 1 (RVSF), 2 (CLA-SPECT), 3 (RVSF-SPECT), 4 (SPECTATOR)

Example: team CLA

See also: changeteam
teaminfo T A
Returns attributes of a team.

Argument | Description | Values
--- | --- | ---
T | Team | cla, rvsf, 0, 1
A | Attribute | Valid attributes: flags, frags, deaths, points, name, players

togglespect
Cycles through all available spectator modes.
These modes are: Follow-1stPerson, Follow-3rdPerson, Follow-3rdPerson-transparent and Fly.
default key: SPACE - cycle spectator modes
unignoreall
Unignore all clients currently on the server.
See also: ignoreall, ignoreteam, ignoreenemy
voicecom S T

Argument | Description | Values
--- | --- | ---
S | sound | must be a registered voicecom-sound
T | text |

default key: V - opens the voicecom menu, use number keys for your choice
voicecomsounds
Enables or disables voicecom audio.

Argument | Description | Values
--- | --- | ---
|  | 0 (off)
|  | 1 (always play voicecom audio)
|  | 2 (only play voicecom audio from you and your teammates)

vote V
Agree or disagree to the currently running vote.

Argument | Description | Values
--- | --- | ---
V | vote value | 1 (yes) OR 2 (no)

default keys:
F1 - votes YES
F2 - votes NO
votemap I M
Sets the next gamemode then calls a vote for a map.

Argument | Description | Values
--- | --- | ---
I | mode id |
M | map name |

See also: map, loadmap, mode
votepending
Determines if there is a vote pending or not.

Example: echo $votependingOutput: if there is currently a vote pending, returns 1, else returns 0.

watchingdemo
Returns 1 when the current game is being played from a demo, else 0.

Example: echo I am (at [not now] (watchingdemo)) watching a demo. "so, are you?"

Return value: truth value

weapon N
Changes the weapon (must be bound to a key).

Argument | Description | Values
--- | --- | ---
N | the number/name of available weapon | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)

whereami
Prints the local client's (x,y) coordinates.
whois C
Get the IP address of a given clientnumber - only admins get shown the last octet.

Argument | Description | Values
--- | --- | ---
C | clientnum |

winners
Returns the team number with the highest score, or if in a non-team mode, returns the CN of the player with the highest score.

### Game modes

bdm M T
Starts a map with the mode "Bot Deathmatch".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: bdm ac_complex

blss M T
Starts a map with the mode "Bot Last Swiss Standing".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: blss ac_complex

bosok M T
Starts a map with the mode "Bot One Shot, One Kill".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: bosok ac_complex

bpf M T
Starts a map with the mode "Bot Pistol Frenzy".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: bpf ac_complex

btdm M T
Starts a map with the mode "Bot Team Deathmatch".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: btdm ac_complex

btosok M T
Starts a map with the mode "Bot Team One Shot, One Kill".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: btosok ac_complex

btsurv M T
Starts a map with the mode "Bot Team Survivor".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: btsurv ac_complex

coop M
Starts a map with the mode "Co-operative Editing".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to edit |

See the "Co-operative map editing" section on the "Tips, tricks and advice" chapter of the map editing guide for more information.

Example: coop ac_newmap

ctf M T
Starts a map with the mode "Capture the Flag".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: ctf ac_mines

curmodeattr A
Checks the current game mode for certain attributes.

Argument | Description | Values
--- | --- | ---
A | attribute name |

Possible attributes are: team, arena, flag and bot.
See also: mode, gamemode, getmode
dm M T
Starts a map with the mode "Deathmatch".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: dm ac_complex

gamemode
Returns the number of current game mode.

Example: echo $gamemodeOutput: 5

See also: mode, getmode, curmodeattr
gamemodedesc M D

Argument | Description | Values
--- | --- | ---
M | mode | integer
D | description | string

See also: mode, showmodedescriptions
getmode N
Returns the name of current game mode.

Argument | Description | Values
--- | --- | ---
N | 0 = full mode name, 1 = mode acronym | min 0/max 1/default 0

Example: echo (getmode)Example output: capture the flag

Example: echo (getmode 1)Example output: CTF

See also: mode, modeacronyms, gamemode, curmodeattr
htf M T
Starts a map with the mode "Hunt the Flag".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: htf ac_mines

ktf M T
Starts a map with the mode "Keep the Flag".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: ktf ac_mines

lms M T
Starts a map with the mode "Survivor". Some players prefer the name "Last Man Standing" for this mode.

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: lms ac_complex

lss M T
Starts a map with the mode "Last Swiss Standing".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: lss ac_complex

mode N
Sets the gameplay mode to N for the next map loaded.

Argument | Description | Values
--- | --- | ---
N | Team Deathmatch | 0
| Co-op edit | 1
| Deathmatch | 2
| Survivor | 3
| Team Survivor | 4
| Capture the Flag | 5
| Pistol Frenzy | 6
| Bot Team Deathmatch | 7
| Bot Deathmatch | 8
| Last Swiss Standing | 9
| One Shot, One Kill | 10
| Team One Shot, One Kill | 11
| Bot One Shot, One Kill | 12
| Hunt the Flag | 13
| Team Keep the Flag | 14
| Keep the Flag | 15
| Team Pistol Frenzy | 16
| Team Last Swiss Standing | 17
| Bot Pistol Frenzy | 18
| Bot Last Swiss Standing | 19
| Bot Team Survivor | 20
| Bot Team One Shot, One Kill | 21

You will need to define mode before loading the map or it will stay as the last mode played.
There are many aliases for you to use instead of remembering the numeric mapping.

Example: mode 7; map ac_complex; echo "Bot Team Deathmatch on ac_complex"

Example: mode 8; map ac_mines 4; echo "Bot Deathmatch on ac_mines for 4 minutes"

Example: mode 5; map ac_shine; echo "CTF @ ac_shine"

See also: map, gamemode, getmode, curmodeattr, modeacronyms, modenum, tdm, coop, dm, surv, tsurv, ctf, tpf, pf, tlss, lss, osok, tosok, htf, tktf, ktf, btdm, bdm, bpf, blss, btsurv, bosok, btosok, Gamemodes
modeacronyms B
Toggles use of acronyms instead of full modenames in the serverbrowser, scoreboard, voting info.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B |  |  | 0..1 | 0

See also: mode, getmode, modenum
modenum M
Returns the mode number for a specified mode acronym.

Argument | Description | Values
--- | --- | ---
M | the mode acronym |

Returns -1 if not found.

Example: echo (modenum ctf)Output: 5

Example: echo (modenum btosok)Output: 21

See also: mode, modeacronyms
osok M T
Starts a map with the mode "One Shot, One Kill".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: osok ac_complex

pf M T
Starts a map with the mode "Pistol Frenzy".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: pf ac_complex

showmodedescriptions B
Enables or disables the showing of game mode descriptions on the console after map starts.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | 0 off, 1 on |  | 0..1 | 1

See also: mode, gamemodedesc
surv M T
Starts a map with the mode "Survivor".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60

Example: surv ac_complex

tdm M T
Starts a map with the mode "Team Deathmatch".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: tdm ac_complex

tktf M T
Starts a map with the mode "Team Keep the Flag".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: tktf ac_mines

tlss M T
Starts a map with the mode "Team Last Swiss Standing".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: tlss ac_complex

tosok M T
Starts a map with the mode "Team One Shot, One Kill".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: tosok ac_complex

tpf M T
Starts a map with the mode "Team Pistol Frenzy".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: tpf ac_complex

tsurv M T
Starts a map with the mode "Team Survivor".

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: tsurv ac_complex

vip M T
Starts a map with the mode "Hunt the Flag". Some players prefer the name "VIP" for this mode.

Argument | Description | Values
--- | --- | ---
M | The name of the map you wish to play |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60

Example: vip ac_mines

### Keyboard and mouse

This section describes keyboard and mouse related identifiers.

_defaultbinds B
Whether or not the next call to _resetallbinds will remove any and all binds; cleaning up before setting the default bindings.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:yes | 0..1 | 0

Internal – used in config/resetbinds.cfg
See also: _resetallbinds
_resetallbinds
Clears all binds for all keys and all modes, including self-assigned ones.
Do not use the command manually.
See also: resetbinds, _defaultbinds
add2bind K C
Adds a block of code, if it does not already exist, to a keybind.

Argument | Description | Values
--- | --- | ---
K | the key to add to |
C | the code to add |

See also: add2alias, add2list
autoscopesens N
Switches between scopesensscale and autoscopesensscale.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | auto on/off |  | 0 (scopesensscale)..1 (autoscopesens) | 0

Determines how to calculate scoped sensitivity if scopesens is zero. If enabled, derives scoped sensitivity from scopefov and fov.
See also: sensitivity, sensitivityscale, scopesens, scopesensscale
bind K A
Binds a key to a command.

Argument | Description | Values
--- | --- | ---
K | the key to bind | string
A | the command | string, usually an alias

To find out what key names and their default bindings are, look at config/keymap.cfg, then add bind commands to your autoexec.cfg.
See also: editbind, specbind, megabind, onrelease
editbind K A
Similar to bind, but is only active while editing, where it overrides the regular bind for the specified key.

Argument | Description | Values
--- | --- | ---
K | the key to bind | string
A | the command | string, usually an alias

See also: bind, specbind
findkey I
Returns the name of a key via a specified code.

Argument | Description | Values
--- | --- | ---
I | integer |

Returns -255 if the key does not exist.
See /config/keymap.cfg for a full list of valid key codes.

Example: echo (findkey 8)Output: BACKSPACE

Example: echo (findkey 280)Output: PAGEUP

See also: keybind, findkeycode
findkeycode K
Returns the integer code of a key.

Argument | Description | Values
--- | --- | ---
K | the name of the key |

Returns -255 if the key does not exist.
See /config/keymap.cfg for a full list of valid key names.

Example: echo (findkeycode BACKSPACE)Output: 8

Example: echo (findkeycode PAGEUP)Output: 280

See also: keybind, findkey
invmouse B
Sets mouse to "flight sim" mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | sets invmouse | 1:inverted Y-axis | 0..1 | 0

Inverts movement on the y-axis.
keybind K
Returns the contents of a keybind, bound with 'bind'.

Argument | Description | Values
--- | --- | ---
K | name of key |

See also: bind, findkey, findkeycode, keyeditbind, keyspecbind
keyeditbind K
Returns the contents of a keybind, bound with 'editbind'.

Argument | Description | Values
--- | --- | ---
K | name of key |

See also: editbind, keybind, keyspecbind
keymap K N A
Sets up the keymap for the specified key.

Argument | Description | Values
--- | --- | ---
K | the key to map |
N | the name for the key |
A | the default action |

You should never have to use this command manually, use "bind" instead.
See also: bind
KEYPRESS I
If defined, this will be executed every time you press a key.

Argument | Description | Values
--- | --- | ---
I | integer key code |

Example: checkinit KEYPRESS [echo You pressed key: (findkey $arg1)]

See also: KEYRELEASE, findkey
KEYRELEASE I
If defined, this will be executed every time you release a key.

Argument | Description | Values
--- | --- | ---
I | integer key code |

Example: checkinit KEYRELEASE [echo You released key: (findkey $arg1)]

See also: KEYPRESS, findkey
keyspecbind K
Returns the contents of a keybind, bound with 'specbind'.

Argument | Description | Values
--- | --- | ---
K | name of key |

See also: keybind, keyeditbind, specbind
megabind K D E C B O
Binds a key to many different actions depending on the current game state.

Argument | Description | Values
--- | --- | ---
K | the key to bind | string
D | body of code to execute if watching a demo | a body of code
E | body of code to execute if editing or in coop-edit mode | a body of code
C | body of code to execute if connected to a server | a body of code
B | body of code to execute if in a bot mode | a body of code
O | body of code to execute if none of the other arguments have been met | a body of code

This command requires 6 arguments, no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing".

Example: megabind F9 [echo Demo!] [echo Editing or coop!] [echo Connected!] [echo Bots!] [echo Other!]

See also: bind, onrelease
mfilter N
Sets the degree of mouse filtering (0.0 being no filtering).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Amount of mouse filtration |  | 0.0..6.0 | 0.0

modkeypressed
Indicates if a CTRL key is pressed.

Description | Values | Range | Default
--- | --- | --- | ---
state of the CTRL key | 0: unpressed, 1: pressed | 0..1 | 0

modkeypressed
Is the CTRL currently key pressed?
Can be used to change the behaviour of keybinds, like the F12 keybind in spectator mode uses it.
See also: screenshot
mouseaccel N
Sets the mouse acceleration.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | acceleration factor |  | 0.0..1000.0 | 0.0

See also: sensitivity
onrelease A
Executes a command on the release of a key/button.

Argument | Description | Values
--- | --- | ---
A | the command |

This command must be placed in an action in a bind or in an alias in a bind.

Example: bind CTRL [ echo "key pressed"; onrelease [ echo "key released" ] ]

See also: bind, megabind
relativemouse B
The way the mouse movement is handled.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 0:warped, 1:relative | 0..1 | 1

On Windows this is forced to 1 due to erratic behaviour of SDL_WarpMouseInWindow.
If set to 0 the mouse will be warped to center of the screen if appropriate.
See also: sdl_xgrab_bug
resetbinds
Resets all binds back to their default values.
This command executes the file /config/resetbinds.cfg which will bind all keys to the values specified in that file, thus resetting the binds to their default values.
See also: resetcfg, _resetallbinds
scopesens N
Mouse sensitivity while scoped.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | scoped sensitivity |  | 0..1000 | 0

If zero, autoscopesens determines, how sensitivity is changed during scoping.
See also: sensitivity, sensitivityscale, autoscopesens, scopesensscale
scopesensscale N
Change sensitivity when scoping.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | factor to change sensitivity while scoped |  | 0.001..1000.0 | 0.5

If used, scoped sens = sensitivity * scopesensscale (roughly). Ignored, if autoscopesens is set.
See also: sensitivity, sensitivityscale, scopesens, autoscopesens
sdl_xgrab_bug B
Enable a workaround for buggy SDL X11 pointer grabbing.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:use workaround | 0..1 | 0

On Windows this is variable is not available. X11 is a *nix windowing system.
If set to 1 and relativemouse is on too, the workaround using XGrabPointer will be used.
See also: relativemouse
searchbinds S
Searches keybinds (bound with 'bind'), returns keys with matching contents.

Argument | Description | Values
--- | --- | ---
S | search string |

This is the inverse of 'keybind'

Example: echo (searchbinds "reload")Output: R

See also: bind, keybind
searcheditbinds s
Searches keybinds (bound with 'editbind'), returns keys with matching contents.

Argument | Description | Values
--- | --- | ---
s | search string |

This is the inverse of 'keyeditbind'

Example: echo (searcheditbinds "toggleocull")Output: F5

See also: editbind, keyeditbind
searchspecbinds s
Searches keybinds (bound with 'specbind'), returns keys with matching contents.

Argument | Description | Values
--- | --- | ---
s | search string |

This is the inverse of 'keyspecbind'
See also: specbind, keyspecbind
sensitivity S
Sets the mouse sensitivity.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
S | the sensitivity | floating-point | 0.001..1000 | 3.0

See also: sensitivityscale, scopesens, autoscopesens, scopesensscale
sensitivityscale N
Scales all mouse sensitivity values.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the sensitivity scale |  | 0.001..1000.0 | 1.0

Changes all sensitivity values. If unsure, keep this at "1".
See also: sensitivity, scopesens, autoscopesens, scopesensscale
specbind K A
Similar to bind, but is only active while spectating, where it overrides the regular bind for the specified key.

Argument | Description | Values
--- | --- | ---
K | the key to bind | string
A | the command | string, usually an alias

See also: bind, editbind
togglegrab
Toggles grabbing of mouse and keyboard input in a game.
Grabbing means that the mouse is confined to the AC, and nearly all keyboard input is passed directly to AC, and not interpreted by a window manager, if any. This is only useful when you run AC windowed.

### Visuals

This section describes identifiers to configure the visuals.

aadynshadow
Sets the size/resolution of the dynamic shadow data.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| the size |  | 0..3 | 2

aboveheadiconfadetime V
Time in milliseconds before the abovehead icon dissapears.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | abovehead icon display time |  | 1..10000 | 2000

aboveheadiconsize V
Sets the size for the icon shown above a player using comunications voices.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Icon size |  | 0..1000 | 50

allowblinkingtext T
For toggling on the ability for any text to have the blinking bit set.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | 0 = Off, 1 = On |  | 0..1 | 0

See also: menucanblink
animationinterpolationtime N
Sets the time available for interpolation between model animations.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the amount of milliseconds for the interpolation |  | 0..1000 | 100

aniso V
Sets the level of anisotropic filtering.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | anisotropic filtering |  | 0..16 | 0

See also: hwmaxaniso
ati_mda_bug V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 0

bilinear V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

blood V
Turns on and off the display of blood.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Enable/Disable blood |  | 0..1 | 1

bloodttl V
Sets the amount of time in milliseconds that blood is displayed on the ground.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Blood display time |  | 0..30000 | 10000

bullethole V
Turns on/off the display of bullet holes.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Enable/Disable bullet holes |  | 0..1 | 1

bulletholettl V
Specifies how long (in milliseconds) to display bullet holes.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Bullethole display time |  | 0..30000 | 10000

curfont S
Returns a name of the current font.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
S | name of font | <empty>, default, mono, serif | .. |

See also: font, setfont
depthbits
Sets the bits for the depth buffer.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| depth pixels |  | 0..32 | 0

depthoffset V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | .. | 0.005f

desktoph
Returns a height of the desktop resolution (or zero, if not available).
See also: desktopw, screenres
desktopw
Returns a width of the desktop resolution (or zero, if not available).
See also: desktoph, screenres
dynlight R
Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
R | 0 off, 1 on |  | 0..1 | 1

dynshadow
Sets the alpha value (transparency) for dynamic shadows.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| the alpha value |  | 0..100 | 40

dynshadowdecay V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..3000 | 1000

dynshadowquad V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 0

dynshadowsize
Sets the display size of the dynamic shadows.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| the size |  | 4..8 | 5

font NAME PATH A B C D E F
Loads a font texture to use as text within AssaultCube.

Argument | Description | Values
--- | --- | ---
NAME | the font name |
PATH | the path to the font texture |
A | the default width |
B | the default height |
C | offset (co-ordinate X) |
D | offset (co-ordinate Y) |
E | offset (width) |
F | offset (height) |

See also: fontchar, fontskip, setfont, menufont, menuitemaltfont
fontchar A B C D
Specifies a region of an image to be used as a font character.

Argument | Description | Values
--- | --- | ---
A | X co-ordinates (from top-left corner) |
B | Y co-ordinates (from top-left corner) |
C | width |
D | height |

See also: font, fontskip
fontskip A
Specifies, at what char the font definition proceeds.

Argument | Description | Values
--- | --- | ---
A | the ascii code of the first char |

For example "fontskip 48" means the ascii code of the first char in defined font will be "48", which is '0'; "fontskip 65" would start at 'A'.
See also: font, fontchar
fov N
Sets the field of view (fov).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the FOV value |  | 75..120 | 90

See also: scopefov, spectfov, spectfovremote
fpsrange A B
Sets the range of FPS (AC will adjust LOD to achieve it).

Argument | Description | Values
--- | --- | ---
A | min |
B | max |

See also: maxfps
fsaa V
Sets the level of full-scene antialiasing (FSAA).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | full-scene antialiasing |  | -1..16 | 0

-1 uses the default settings obtained from the system. 0 disables, 1..16 enables FSAA.
fullscreen
Enables or disables fullscreen.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| fullscreen |  | 0..1 | 1

See also: fullscreentoggle, fullscreendesktop
fullscreendesktop V
Enables using always desktop resolution in fullscreen mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Use desktop resolution for fullscreen |  | 0..1 | 1

See also: fullscreen
fullscreentoggle
Toggles fullscreen on or off.
See also: fullscreen
gamma N
Sets the temporary (to next map start) hardware gamma value.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the gamma value |  | 30..300 | 100

May not work if your card/driver doesn't support it.
getdisplayresolutions
Returns a list of available screen resolutions.
See also: screenres
getigraph M
Returns an encoded string to display an inlined image outside the console.

Argument | Description | Values
--- | --- | ---
M | mnemonic |

Images are stored in packages/misc/igraph/*.png and loaded during game start. Filenames consist of the image shorthand (mnemonic) and optional frame times, separated by "_". Media file names may only contain letters, digits and "_-.()".
All texts displayed in the game console are scanned for mnemonics prefixed with ":". All found matches are replaced by the image.
The images are displayed as squares with width and height the same as the regular font height. To create animations, put several square images side by side into the file. For example, a 128x32 image is interpreted as four frames. Frame duration is encoded in the filename, so, for example the file "nop_1000_200_100.png" shows the first frame for 1000 milliseconds, the second frame for 200 msec and the third (as the rest) for 100 msec.
Igraphs "1" to "9" are hardcoded and can be manually encoded in menu texts. Use the new escape code "\i" plus the number of the image: "\i\1".."\i\9". Other images can be used in menus as well, but the codes have to be fetched by "getigraph".
If the mnemonic was not found, then "getigraph" returns an empty string.
See also: updateigraphs, igraphsize, igraphsizehardcoded, igraphanimate, igraphdefaultframetime, hideigraphs
gib B
Enables or disables the gib animation entirely.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | off OR on | 0 (false), 1 (true) | 0..1 | 1

See also: gibnum, gibspeed, gibsgore, gibttl, popdeadplayers
gibnum N
Sets the number of gibs to display when performing a "messy" kill (grenade, knife, sniper headshot).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | number of gibs |  | 0..1000 | 6

Larger values are more spectacular, but can slow down less powerful machines. Reducing gibttl may help in this case.
See also: gibttl, gibspeed
gibsgore
Adjusts gib/gibnum/gibspeed/gibttl variables collectively.

Argument | Description | Values
--- | --- | ---
|  | 0 - Off
|  | 1 - Default/Normal values
|  | 2 - Good
|  | 3 - Messy
|  | 4 - Unrealistic

gibspeed N
Sets the velocity at which gibs will fly from a victim.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | velocity |  | 1..100 | 30

See also: gibnum, gibttl
gibttl N
Sets the time for gibs to live (in milliseconds), after which they will disappear.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | time to live |  | 0..60000 | 7000

See also: gibnum, gibspeed
glext E
Checks for the searchstring in all loaded extensions.

Argument | Description | Values
--- | --- | ---
E | extension |

Example: if (glext shadow_funcs) [echo you have shadow functionality] [echo no shadows for you]

hidecustomskins B

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B |  |  | 0..1 | 0

hideigraphs N
Hides inlined images in the console.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: show, 1: hide |  | 0..1 | 0

See also: getigraph
hirestextures S
Controls whether textures with a scale higher than 1.0 will be scaled down while loading (0) or not (1).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
S | scale down? |  | 0..1 | 1

See also: texture
hwmaxaniso
Shows the maximum level of anisotropic filtering supported by the graphics hardware.
See also: aniso
hwtexsize
Shows the maximum texture size (in pixels) supported by the graphics hardware.
See also: maxtexsize
ignoreoverride_limitwaveheight B
Ignores per-map overrides to limit waveheight on the client.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:ignore | .. | 0

Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is used unchanged.
See also: mapoverride_limitwaveheight, ignoreoverride_nowaterreflect, ignoreoverride_nostencilshadows
ignoreoverride_nostencilshadows B
Ignores per-map overrides to disable stencil shadows on the client.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:ignore | .. | 0

Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_nostencilshadows is ignored.
See also: mapoverride_nostencilshadows, ignoreoverride_nowaterreflect, ignoreoverride_limitwaveheight
ignoreoverride_nowaterreflect B
Ignores per-map overrides to disable water reflection on the client.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:ignore | .. | 0

Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_nowaterreflect is ignored and regular client settings are used.
See also: mapoverride_nowaterreflect, ignoreoverride_limitwaveheight, ignoreoverride_nostencilshadows
igraphanimate N
Enables animation of inlined images with multiple frames.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: display only first frame, 1: enable animation |  | 0..1 | 1

See also: getigraph, igraphdefaultframetime, igraphsize
igraphdefaultframetime N
Default frame time for inlined images with multiple frames.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | frame time for images |  | 5..2000 | 200

Used for images with no frame duration specified in the filename.
See also: getigraph, igraphanimate, igraphsize
igraphsize N
Scales inlined images (in percent).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | size of images (in percent) |  | 80..300 | 120

See also: getigraph, igraphsizehardcoded
igraphsizehardcoded N
Scales the hardcoded inlined images: "1".."9" (in percent).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | size of images (in percent) |  | 80..160 | 106

See also: getigraph, igraphsize
lighterror E
Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
E | the error value, 1 being the best quality |  | 1..100 | 4

If this variable is changed this during play, a "recalc" is needed to see the effect.
See also: recalc
lightscale D
Scaling factor for all light in the game.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
D | divisor | values will be divided by this | 1..100 | 4

Any change will not take effect until a new world is loaded.
mapoverride_limitwaveheight B
Per-map override to limit waveheight on the client.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:ignore | .. | 0

Set by the mapper, for his map only. The overrides are stored in the map header.
If "1", waveheight is capped at 0.1 max. Useful for small water areas (like puddles), where higher waves would look weird.
See also: mapoverride_nowaterreflect, mapoverride_nostencilshadows, ignoreoverride_limitwaveheight
mapoverride_nostencilshadows B
Per-map override to disable stencil shadows on the client.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:ignore | .. | 0

Set by the mapper, for his map only. The overrides are stored in the map header.
If "1", stencil shadows are disabled. On clients, where stencil shadows are otherwise enabled, blob shadows are used instead. If shadows are disabled anyway, they stay disabled. Useful for dim maps, where hard shadows make no sense.
See also: mapoverride_nowaterreflect, mapoverride_limitwaveheight, ignoreoverride_nostencilshadows
mapoverride_nowaterreflect B
Per-map override to disable water reflection on the client.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:ignore | .. | 0

Set by the mapper, for his map only. The overrides are stored in the map header.
If "1", water reflection is disabled. Useful, when odd water colours are used to emulate other liquids that are not supposed to be that reflective.
See also: mapoverride_limitwaveheight, mapoverride_nostencilshadows, ignoreoverride_nowaterreflect
maxfps V
Limits the FPS (frames per second) of AssaultCube's video output.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | maximum FPS | 0 disables maxfps | 25 or 0..1000 | 200

Remark: limit to '200' is optimal.
See also: fpsrange
maxroll N
Sets the maximum value the display will roll on strafing.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the roll value |  | 0..20 | 0

See also: maxrolleffect, maxrollremote
maxrolleffect N
Sets the maximum value the display will roll when you get damages.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the roll value |  | 0..30 | 10

See also: maxrolleffect, maxrollremote
maxrollremote N
Limits the maximum value the display will roll on strafing or if player gets damages, when spectating other players.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | The roll value |  | 0..50 | 10

See also: maxroll, maxrolleffect
maxtexsize V
The maximum texture size that will be used by the engine, larger textures will be scaled down.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | maximum texture size |  | 0..4096 | 0

If this value is zero, hwtexsize will be used.
See also: hwtexsize
maxtmus
Gets the maximum number of supported textures when performing multitexturing.
maxtrail N
Maximum number of smoke particles along shotline of sniper rifle.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | maximum number of smoke particles |  | 1..10000 | 500

mdldlist N

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N |  |  | 0..1 | 1

mdldyncache V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..32 | 2

mdlstatcache V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..32 | 1

mergestrips V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

minlod V
Minimal level of detail.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 25..250 | 60

mtexplosion V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

mtwater V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

nosway V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 0

particlesize P
Scales all particles.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
P | the scale percentage |  | 20..500 | 100

polygonoffsetfactor V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | .. | -3.0f

polygonoffsetunits V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | .. | -3.0f

popdeadplayers B
Makes dead players instantly pop out of existence, instead of falling over and sinking into the ground.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | BOOL |  | 0..1 | 0

See also: gib
reflectclip V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..100 | 1

reflectscissor V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

reflectsize V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 6..10 | 8

resetgl
Resets the OpenGL rendering settings.
righthanded N
Chooses whether the players hand carrying the weapon appears as right or left handed.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: lefty, 1: righty |  | 0..1 | 1

saveshadows
Sets if dynamic shadows should be saved to disk.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| auto save |  | 0..1 | 1

scorch V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

scorchttl V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..30000 | 10000

scr_h H
Sets the screen height.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
H | the screen height |  | 200..10000 | 768

scr_w W
Sets the screen width.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
W | the screen width |  | 320..10000 | 1024

screenh
Returns the actual height of the screen/window.

Description | Values | Range | Default
--- | --- | --- | ---
the screen/window height |  | .. |

screenres W H
Changes the screen resolution.

Argument | Description | Values
--- | --- | ---
W | width |
H | height |

See also: desktopw, desktoph, getdisplayresolutions
screenw
Returns the actual width of the screen/window.

Description | Values | Range | Default
--- | --- | --- | ---
the screen/window width |  | .. |

setfont N
Changes the current font.

Argument | Description | Values
--- | --- | ---
N | font name | default, mono, serif

See also: font, curfont
setgamma G
Sets a persistent gamma value for a map.

Argument | Description | Values
--- | --- | ---
G | the gamma value | 30..300, default 100

See also: gamma
shadowcasters
shadowclip V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

shadowtile V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

shotline V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

shotlinettl V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..10000 | 75

skin N
Determines the skin of the current player.

Argument | Description | Values
--- | --- | ---
N | skin id | value

See the player model folder for the according skin-id.
skin_cla N
Chooses skin when playing for team CLA.

Argument | Description | Values
--- | --- | ---
N | skin id |

skin_rvsf N
Chooses skin when playing for team RVSF.

Argument | Description | Values
--- | --- | ---
N | skin id |

skyclip V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

smoothdist V
Determines the valid distance when extrapolating a players position.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | distance |  | 0..16 | 8

smoothmove V
Determines the speed when extrapolating a players position.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | movement speed |  | 0..100 | 75

spectfov V
Specifies the Field Of View when in spectating/ghost mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Spectate FOV size |  | 5..120 | 110

See also: fov, spectfovremote
spectfovremote V
Chooses between local or remote player's FOV when spectating.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | 0: uses 'spectfov' and the local 'scopefov', 1: uses 'fov' and 'scopefov' of the spectated player |  | 0..1 | 0

See also: fov, spectfov, scopefov
stencilbits V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..32 | 0

stencilshadow V
Sets the transparency/opacity level of stencil shadows.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Alpha level |  | 0..100 | 40

swaymovediv V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..1000 | 200

swayspeeddiv V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..1000 | 105

swayupmovediv V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..1000 | 200

swayupspeeddiv V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..1000 | 105

teamdisplaymode N
Sets the team display mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the team display mode | 0 (none), 1 (color vests), 2 (color skins) | 0..2 | 1

In mode 0 team display is disabled In mode 1 players will be rendered with a colored vest to make the teams distinguishable. In mode 2 almost the whole suit of the players will be colored. These display modes are only applied in team gameodes.
texreduce S
Reduces the size of all texture by the selected factor:

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
S | scale selection |  | -1..3 | 0

trilinear V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

tsswap V
Swaps vertices of model triangles.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

updateigraphs
Checks for new files in packages/misc/igraph/ folder.
Only necessary, if new files are added during the game - for example, by mod package download.
See also: getigraph
vsync V
Enables or disables vsync.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | vsync |  | -1..1 | -1

-1 uses the default settings obtained from the system. 0 disables, 1 enables vsync.
waterreflect V
Turns on/off the reflections in the water surface.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable water reflections |  | 0..1 | 1

waterrefract V
Turns on/off water refractions.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable water refractions |  | 0..1 | 0

watersubdiv N
Determines the subdivision of the water surface in maps.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the subdivisioin value |  | 1..64 | 4

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 "waterlevel" (edit reference) on how to add water to your own levels.
See also: waterlevel
waveheight F
Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
F | wave height (floating-point value) |  | 0..1 | 0.3

### Heads-Up Display

This section describes the identifiers to configure the head-up display (HUD).

accuracy N
Sets whether or not to display the accuracy information window.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 1: on, 0: off |  | 0..1 | 0

Accuracy is displayed for current weapon and only then, if scoreboard is turned on.
See also: accuracyinfo, accuracyreset
accuracyinfo
Shows in the console accuracy of all used weapons.
See also: accuracy
accuracyreset
Resets accuracy counters.
See also: accuracy
altconsize V
Sets the percent of screen height for text lines on an alternate F11 history display.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..100 | 0

See also: consize, fullconsize
blankouthud X
Hides most of elements on the HUD for X frames.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
X | blank out the HUD |  | 0..10000 | 0

Used for "clean" screenshot. The parameter is "frames", so for example 1000 will take 20 seconds at 50 fps or second at 1000 fps.
See also: cleanshot
clearminimap
Recreates the minimap for the current map.
See also: minimapres
cncolumncolor C
Colour of CN column in scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
C | color | 0 (green), 1 (blue), 2 (yellow), 3 (red), 4 (gray), 5 (white), 6 (dark brown), 7 (dark red), 8 (purple), 9 (orange) | 0..9 | 5

conalpha N
Sets the transparency of the console.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Alpha value |  | 0..255 | 255

confade V
Sets how many seconds before the console text rolls (disappears) up the screen.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | time before the text rolls up |  | 0..60 | 20

consize V
Sets how many lines of text the console displays.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..100 | 6

See also: altconsize, fullconsize
crosshairfx V
Turns on or off crosshair effects.

Argument | Description | Values
--- | --- | ---
V | turn off all effects | 0
| turn on all effects (color and size change) | 1 (default)
| turn on color change/turn off size change | 2
| turn off color change/turn on size change | 3

When on, the crosshair will go orange when health is 50 or red when is 25. Size change of crosshair occurs when player holds assault rifle and has more than 3 shots in a row.
crosshairsize N
Sets the size of your crosshair.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the crosshair size |  | 0..50 | 15

The crosshair is turned off entirely if the size is set to 0.
crosshairteamsign V
Turns on/off display of team warning crosshair.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable warning crosshair |  | 0..1 | 1

damageindicatoralpha V
Sets the level of transparency of the damage indicator, 100 = totally solid.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | damage indicator alpha value |  | 1..100 | 50

damageindicatordist V
Sets the separation of the arrows in the damage indicator.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | damage indicator separation size |  | 0..10000 | 500

damageindicatorsize V
Sets the size of the damage indicator.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | damage indicator icon size |  | 0..10000 | 200

damageindicatortime V
Sets how long the damage indicator stays on screen.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | damage indicator display time |  | 1..10000 | 1000

damagescreen N
Show the blood-spat overlay when receiving damage?

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | damagescreen | 0 (false), 1 (true) | 0..1 | 1

damagescreenalpha N
If overlay of blood-spat, at what blending (transparency) level?

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | damagescreen transparency |  | 1..100 | 45

damagescreenfactor N
If overlay of blood-spat, use which factor?

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | damagescreen factor |  | 1..100 | 7

damagescreenfade N
If overlay of blood-spat, at what speed does it fade?

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | damagescreen fade |  | 0..1000 | 125

dbgpos V
Displays local player's current x,y,z position in map, showstats 1 must be enabled.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | display current position |  | 0..1 | 0

See also: showstats
flagscorehudtransparency V
Options for flag score hud transparency.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | flag score hud transparency | 0: no transparency, icon set 'flag gone'; 1: transparency, icon set 'flag gone'; 2: transparency, classic icon set | 0..2 | 2

fullconsize V
Sets the percent of screen height for text lines on the F11 history display.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..100 | 40

See also: consize, altconsize
gametimedisplay D
Show the game-time clock on the HUD.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
D | off (0), count backward (1), count forward (2) |  | 0..2 | 1

The clock can count backward (from time limit to 0s) or forward (from 0s to time limit).
See also: wallclockformat
hidecompass V
Turns on/off the radar compass.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable radar compass |  | 0..1 | 0

hideconsole V
Turns on or off the display of console text.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable console text |  | 0..1 | 0

hidedamageindicator V
Turns on/off the damage indicator.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable damage indicator |  | 0..1 | 0

hidehudequipment V
Turns on or off the display of equipment icons.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable equipment icons |  | 0..1 | 0

hidehudmsgs V
Turns on or off the display of messages at the bottom of the screen.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable messages |  | 0..1 | 0

hidektfindicator V
Turns on or off the display of ktf flag direction indicator.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable ktf indicator |  | 0..1 | 0

See also: ktfindicatoralpha
hideradar V
Turns on or off the display of the on-screen radar.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable radar |  | 0..1 | 0

hidespecthud V
Turns on or off the display of spectator status.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable spectator status |  | 0..1 | 0

hideteam V
Turns on or off the display of local player team icons.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable team icons |  | 0..1 | 0

hideteamscorehud V
Turns on or off the display of team score icons.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | enable/disable team score icons |  | 0..1 | 0

hidevote V
Turns on or off the display of vote icons.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | 0=on; 1=on, but hide after own vote; 2=off |  | 0..2 | 0

hudgun V
Turns on or off the display of the current selected gun.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | show/hide guns 3D models |  | 0..1 | 1

ktfindicatoralpha V
Sets the level of transparency of ktf flag direction indicator, 100 = totally solid.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | ktf indicator alpha value |  | 1..100 | 70

See also: hidektfindicator
minimapres N
Sets the resolution for the minimap.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the resolution |  | 7..10 | 9

See also: clearminimap
oldfashionedgunstats N
Shows ammo statistics like in version 1.0.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: new, 1: old |  | 0..1 | 0

overviewflags
Rendering options for the flags in the overview spectator mode.

Argument | Description | Values
--- | --- | ---
| real | 0
| askew | 1
| radar | 2

Viewed from directly above the pole is barely visible and the undulating canvas never comes out of perfect alignment so is invisible. To compensate for the realistic rendering there are two variations on rendering flags when in the overview - either we rotate the models a bit so they become visible or we use the radar display of bases and flags instead.
radarentsize V
Sets the icon size of the players shown in the radar and the minimap.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | size of icons inside radar |  | 4..64 | 12

radarheight H
Changes at what height you are floating in the radar-view.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
H | height |  | 5..500 | 150

sc_clientnum V
Sets the order priority for the column cn on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | low priority: left, high priority: right |  | 0..100 | 6

sc_deaths V
Sets the order priority for the column deaths or disables it on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | -1: disable, low priority: left, high priority: right |  | -1..100 | 2

sc_flags V
Sets the order priority for the column flags on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | low priority: left, high priority: right |  | 0..100 | 0

sc_frags V
Sets the order priority for the column frags on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | low priority: left, high priority: right |  | 0..100 | 1

sc_lag V
Sets the order priority for the column pj/ping or disables it on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | -1: disable, low priority: left, high priority: right |  | -1..100 | 5

sc_name V
Sets the order priority for the column name on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | low priority: left, high priority: right |  | 0..100 | 7

sc_ratio V
Sets the order priority for the column ratio or disables it on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | -1: disable, low priority: left, high priority: right |  | -1..100 | -1

sc_score V
Sets the order priority for the column score or disables it on the scoreboard.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | -1: disable, low priority: left, high priority: right |  | -1..100 | 4

showmap B
Determines if the mini-map should be shown on screen.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | show mini-map |  | 0..1 | 0

default key: left Alt - toggles minimap
showmapbackdrop B
Determines whether to have a see-through map overview (0), or render it on a black backdrop (1) or a combination of both (2).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | backdrop-style |  | 0..2 | 0

showmapbackdroptransparency T
Transparency of the black map backdrop (in percent) rendered if showmapbackdrop is set to 2.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | transparency |  | 0..100 | 75

See also: showmapbackdrop
showscores
Shows or hides the scores.
default key: TAB
See also: showscoresondeath
showscoresondeath V
Determines if scores should be shown on death.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

See also: showscores
showspeed N
Enables or disables showing the player's horizontal speed (vector).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: off, 1: on |  | 0..1 | 0

showstats N
Turns on/off display of FPS/rendering statistics on the HUD.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: Show no stats, 1: Only show FPS stats, 2: Show all stats |  | 0..2 | 1

showtargetname N
Enables or disables showing the player name on the HUD when in your crosshair.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: off, 1: on |  | 0..1 | 1

specthudgun V
Turns on/off the display of the hudgun while spectating a player in first-person view.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | show/hide hudgun when spectating |  | 0..1 | 1

Works in demo mode as well.
toggleconsole
Toggles the console.
default key: F11
votealpha N
Sets the transparency of the vote display.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | Alpha value |  | 0..255 | 255

wallclockformat
Show the wall clock with time (usually local, not game-time) on the HUD.
"wallclockformat" alias should contain string in strftime format to show the clock with proper time. If the alias is empty, the wall clock is hidden.
See also: gametimedisplay

### Sound

This section describes all identifiers related to music and sound effects.

al_referencedistance V
The distance from the source emitting the sound to the listener.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000000 | 400

al_rollofffactor V
This value indicates the relative "strength" of a sound (how far away the sound can be heard).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000000 | 100

audio B
Enables or disables the audio subsystem in AC.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable |  | 0..1 | 1

audiodebug B
Enables verbose output for debugging purposes.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable audio debug |  | 0..1 | 0

bulletairsound V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

bulletairsounddestrad V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 8

bulletairsoundrad V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 15

bulletairsoundsourcerad V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 8

bulletbouncesound V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

bulletbouncesoundrad V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 15

enumsounds C
Lists sound index numbers and short descriptions for all sounds of one or more categories.

Argument | Description | Values
--- | --- | ---
C | list of sound categories (flags) | PAIN, OWNPAIN, WEAPON, PICKUP, MOVEMENT, BULLET, OTHER, VOICECOM, TEAM, PUBLIC, FFA, FLAGONLY

All sounds with at least one of the flags will be listed. Flag names prefixed with "!" will exclude all matching sound from the list. If no such entities exist or the entity type could not be recognised, the list is empty.

Example: echo (enumsounds "VOICECOM !PUBLIC")It will list all voicecom sounds that are for teams only

Example: echo (enumsounds (listoptions soundcategories))It will list all sounds

See also: sound, registersound
footsteps B
Indicates if the footsteps sound should be played.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable footsteps | 1 (true), 0 (false) | 0..1 | 1

See also: localfootsteps
gainscale N
Each subsequent played sound's gain-value is scaled by this percentage.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | percentage |  | 0..100 | 100

This lowers the gain of the sounds before they are mixed, this might be useful in cases when the mixer has problems with too high gain values.
heartbeat H
Defines the health level at or below which a heartbeat sound will be played.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
H | health value |  | 0..99 | 0

hitsound B
Plays a sound upon every successful hit if enabled.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | off OR on | 0 (disabled), 1 (server), 2 (local) | 0..2 | 0

If hitsound is set to 2, the sound will be played instantly rather than after server acknowledgment.
localfootsteps B
Indicates if the footsteps sound for the local player should be played.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | enable footsteps | 1 (true), 0 (false) | 0..1 | 1

See also: footsteps
mapsoundrefresh N
Specifies the interval for checking mapsounds.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | interval in milliseconds |  | 0..1000 | 10

If set to value 0, the map sounds will be checked in every frame without any interval limitation.
See also: mapsound, newent sound
maxsoundsatonce V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..100 | 32

music A B C
Plays music in the background.

Argument | Description | Values
--- | --- | ---
A | music file name |
B | playtime |
C | command to be executed, when music is done |

musicpreload N
Preloads the sound track.

Argument | Description | Values
--- | --- | ---
N | soundtrack number | 0 (flag grab), 1 (last minute #1), 2 (last minute #2)

Can be helpful if you experience a delay, e.g. when picking up a flag.
musicvol N
Sets the music volume.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the volume |  | 0..255 | 128

See also: soundvol
mutesound N A
Mutes a specific game sound.

Argument | Description | Values
--- | --- | ---
N | ID of the sound to mute | see 'enumsounds', starting at ID 0
A | audible? | (mute) 0 or 1 (unmute)

See also: soundmuted, unmuteallsounds, enumsounds
registermusic M
Registers a track as music.

Argument | Description | Values
--- | --- | ---
M | music file |

The first three tracks have special meaning: Track #1 is for "flag grab" the second and third are used as "last minute" tracks.
registersound N V L R
Registers a sound.

Argument | Description | Values
--- | --- | ---
N | sound name | path below packages/audio/, without file extension
V | volume (optional) | 0..255
L | loop (optional) | 0 (off), 1 (on)
R | audible radius (optional) |

This command returns the sound number, which is assigned from 0 onwards, and which can be used with "sound" command. If the sound was already registered, its existing index is returned. "registersound" does not actually load the sound, this is done on first play.

Example: registersound "player/jump" 80It registers packages/audio/player/jump.ogg sound with volume 80

See also: sound
sound N
Plays the specified sound.

Argument | Description | Values
--- | --- | ---
N | number of the sound to play | integer

See source/src/server.h file or use "enumsounds" command for default sounds, and use "registersound" to register your own. For example, 'sound 0' and 'sound (registersound "player/jump")' both play the standard jump sound.
See also: enumsounds, registersound
soundchannels
Sets the desired amount of allocated sound channels.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
| number of channels |  | 4..1024 | 128

AC will try to allocate that number of channels but it is not guaranteed to succeed.
soundmuted N
Returns 1 if sound N is muted, else 0.

Argument | Description | Values
--- | --- | ---
N | sound ID | see 'enumsounds' for valid sound ID

Example: mutesound 5; if (soundmuted 5) [echo Sound 5 is muted!] [echo Sound 5 is not muted!]Output: Sound 5 is muted!

See also: mutesound, unmuteallsounds, enumsounds
soundscheddistancescore V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 5

soundschedoldbonus V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 100

soundschedpriorityscore V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 100

soundschedreserve V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..100 | 2

soundtest
Plays all hardcoded sounds in order.
soundvol N
Sets the sound volume for all sounds.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the volume |  | 0..255 | 128

unmuteallsounds
Unmutes all previously muted sounds.
See also: mutesound

### Serverbrowser

This section describes all identifiers related to the serverbrowser.

addfavcategory A
Adds a new category in the serverbrowser favourites.

Argument | Description | Values
--- | --- | ---
A | reference designator (keep short and unique) |

Add new categories to your autoexec.cfg, check favourites.cfg for examples.
addserver S P
Adds a server to the list of server to query in the server list menu.

Argument | Description | Values
--- | --- | ---
S | the address of the server (hostname or IP) |
P | the port |

clearservers
Clears the server list.
hidefavicons N
Hides favourites icons in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: show, 1: hide |  | 0..1 | 0

listfavcats
Lists all registered serverbrowser favourites categories.
mastertype V
Sets the method which client will use to contact the masterserver.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | 0: direct TCP connection, 1: HTTP connection (via proxy) |  | 0..1 | 1

See also: updatefrommaster
masterupdatefrequency V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1..24*60*60 | 60*60

See also: updatefrommaster
maxservpings V
Sets the number of servers to be pinged at once.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1000 | 10

searchlan V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..2 | 1

searchnickname N
Search a nickname (or -part) on all servers.

Argument | Description | Values
--- | --- | ---
N | nickname to search |

serverbrowserhidefavtag N
Hides favourites tag column in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..2 | 1

serverbrowserhideip N
Hides server IP and port in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..2 | 2

serversort V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..NUMSERVSORT-1 | 0

serversortdir
Selects ascending of descending sort order in serverbrowser.
serversortpreferofficial N
Sort official maps over custom maps in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 1

servpingrate V

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 1000..60000 | 5000

showallplayersnumber N
Shows on serverbrowser number of all players on the all servers.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N |  |  | 0..1 | 0

showallservers V
Whether servers that have not yet responded to a ping should be shown in the server list.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V |  |  | 0..1 | 1

showminremain N
Show 'minutes remaining' in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N |  |  | 0..1 | 1

shownamesinbrowser N
Show player names in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 0

showonlyfavourites N
Show only servers of one favourites category in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | category index |  | 0..100 | 0

showonlygoodservers N
Show only servers with the correct protocol in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 0

showweights N
Show 'weights' in serverbrowser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N |  |  | 0..1 | 1

'weights' are the sort criteria with the highest priority. Favourites categories can change the weights. Use 'showweights' to debug problems with serverbrowser sorting.
updatefrommaster B
Contacts the masterserver and adds any new servers to the server list.

Argument | Description | Values
--- | --- | ---
B | force update | 0 (delayed), 1 (immediate)

The servers are written to the config/servers.cfg file. This menu can be reached through the Multiplayer menu.
See also: mastertype, masterupdatefrequency

### Server commands

This section lists commands used by the client that communicate to the server. Most are used for server administration. Also see the "mode" section and the "map" command which also communicate to the server.

autoteam B
Sets automated team assignment.

Argument | Description | Values
--- | --- | ---
B | Enables or disables auto team | 1 (On), 0 (Off)

See also: setadmin
ban C R
Temporary ban of the specified player from the server.

Argument | Description | Values
--- | --- | ---
C | The player to ban | client number
R | The reason | at least 4 characters

Temporary ban duration is fixed at 20 minutes.
See also: removebans, setadmin
callvote T A B
Calls a vote on the server.

Argument | Description | Values
--- | --- | ---
T | Vote type | value
A | First argument |
B | Second argument |

This command is wrapped by aliases for better usability and is used to action votes such as ban, kick, etc. See config/admin.cfg for actual uses.
cleardemo X
Clears specific demo currently in memory on the server.

Argument | Description | Values
--- | --- | ---
X | number in list | 0 (all), 1..

See also: listdemos, cleardemos
cleardemos
Clears all demos currently in memory on the server.
See also: cleardemo
deleteservermap A
Deletes a map from the current server.

Argument | Description | Values
--- | --- | ---
A | map name |

forceme T
Calls a vote to forceteam yourself to the specified team.

Argument | Description | Values
--- | --- | ---
T | the team to force yourself to (optional) | 0-4

By default, if you are on team CLA or RVSF, this command will force you to the enemy team, no arguments necessary.
See also: forceteam
forceteam C T
Calls a vote to force the specified player to switch to the specified team.

Argument | Description | Values
--- | --- | ---
C | client number of player | integer
T | the team to force to | 0-4

See also: forceme, setadmin
getvita C
Get vita for a client.

Argument | Description | Values
--- | --- | ---
C | client number |

TODO: elaborate
giveadmin C
Gives admin state to the specified player.

Argument | Description | Values
--- | --- | ---
C | The player to become admin | client number

Requires admin state. The admin will lose his admin state after successfully issuing this command.
See also: setadmin
kick C R
Kicks the specified player from the server.

Argument | Description | Values
--- | --- | ---
C | The player to kick | client number
R | The reason | at least 4 characters

See also: setadmin
mastermode N
Sets the mastermode for the server.

Argument | Description | Values
--- | --- | ---
N | The master mode | 0 (Open), 1 (Private), 2 (Match)

If the mastermode is set to 'private', no more clients can join the server. Default is 'open' which allows anyone to join the server.
See also: setadmin
removebans
Removes all temporary bans from the server.
Temporary bans are normally automatically removed after 20 minutes.
See also: ban, setadmin
sendmap M
Sends a map to the server.

Argument | Description | Values
--- | --- | ---
M | map to send (optional) |

During coop edit, the current map gets saved to file and sent to the server. Other players can use 'getmap' to download it.
When not in edit mode, the map will not be saved. The new map will be used, when the next game on that map starts on the server.
See also: getmap, dlmap
serverdebug B
Whether or not to output debugging information.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:debug output | 0..1 | 0

Only applies if you're running a client, the standalone server has DEBUGCOND(true) already set.
serverdesc D
Sets user-define server description.

Argument | Description | Values
--- | --- | ---
D | description |

If the server was run with -n1 and -n2 arguments (prefix and suffix of descriptive title) a serveradmin can set a user-defined server description with this command, if it wasn't this command results in "invalid vote". This title will only stay until the next map is loaded.
If, for example, the server was run with -n"Fred's Server" -n1"Fred's " -n2" Server", then you could call "/serverdesc [pWn4g3 TOSOK]" and it would show up as "Fred's pWn4g3 TOSOK Server" in the serverbrowser.
serverextension E A
Sends the extension name and argument string to the server, which can use it for custom action.

Argument | Description | Values
--- | --- | ---
E | extension name |
A | argument |

See source/src/server.cpp ["case SV_EXTENSION:"].
setadmin B PASS
Claims or drops admin status.

Argument | Description | Values
--- | --- | ---
B | Status | 1 (Claim), 0 (Drop)
PASS | Password | case sensitive

Failed logins result in an auto kick. The admin is granted the right to kick, ban, remove bans, set autoteam, set shuffleteam, change server description (if enabled), change map, change mastermode, force team, change mode, record demos, stop demos and clear demo(s) - All without needing votes from other users. If the admin votes on any (other players) call, his vote is final. In the scoreboard, the admin will be shown as a red colour.
See also: kick, autoteam, mastermode, ban, removebans
shuffleteams
Shuffles the teams.
The server will attempt to restore balance, but the result may be less that optimal, and there are certainly better ways to keep teams balanced.
See also: forceteam, forceme

### Authentication

This section describes identifiers related to player authentication.

authkey P
Manages a list of keys other than the game key (which is managed by authsetup).

Argument | Description | Values
--- | --- | ---
P | parameter | clear, list, delete keyname, new keyname, add keyname privkey, selfcert keyname [comment]

For example, this can be server owner keys or clan boss keys. Options:
"authkey clear" - empties the list and comments out all lines in config/authkeys.cfg.
"authkey list" - lists all authkeys that are currently in memory.
"authkey delete keyname" - deletes the key "keyname" from memory.
"authkey new keyname" - generates a new key with the name "keyname". If a key of that name already exists, it is deleted. The key is added to the list in memory and also written to the file config/authkeys.cfg.
"authkey add keyname privkey" - adds a key with the name "keyname" to the list in memory. The privkey is a 32-byte hexadecimal string, preferrably generated by authkey new. The matching public key is generated automatically from the private key.
"authkey selfcert keyname [comment]" - generates a self-signed certificate for the key "keyname". Being able to create such a cert is proof, that you own the private key of a certain public key.
See also: authsetup
authmaxtime N
Sets an amount of time (in ms), new password hashes are created with this fixed amount of time.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | amount of time [ms] |  | 1<<9..1<<16 | 1<<12

See also: authsetup, authmemusage, authrounds
authmemusage N
Sets a number of megabytes of RAM that are used for the password hash calculation (when new passwords are created).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | number of RAM [MB] |  | 2..(1<<10)-1 | 24

See also: authsetup, authrounds, authmaxtime
authrounds N
Sets a number of rounds, if greater than 0, then new password hashes are created with this fixed number of rounds.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | number of rounds |  | 0..2^31-1 | 0

See also: authsetup, authmemusage, authmaxtime
authsetup P
Manages player authentication.

Argument | Description | Values
--- | --- | ---
P | parameter | [empty], pre preprivhex [psalthex pwdcfg], priv privhex [salthex pwdcfg], pub pubhex, ppass preprivpass, pass privpass, passd privpass [commandwhendone], needpass, genpre [prelen], genpriv, genpub, newppass preprivpass [preprivfilename], newpass privpass [privatefilename], unarmed

"authsetup" contains all the funtionality needed to generate, load and save private and public keys, and to lock and unlock the private key with a password.
Private and public keys are used to authenticate the player to servers, and are loaded from private/authprivate.cfg. Private keys can be stored in an "encrypted with password" version - in which case the player has to enter the password after game start. To prevent brute-force cracking of the password, the key-derivation function uses a constant time to encode (usually several seconds). Because of that, the decoding at game start can be done in the background.
The private key is actually itself a public key generated from the prepriv key. The prepriv key should be kept away from the computer, either as hardcopy or on a thumbdrive. The prepriv key is not required to play the game. It can be used to prove ownership of the private key, in case the private key gets stolen. It can also be used to regenerate private and public keys, in case they are lost. The prepriv key can also be encrypted by its own password.
----------
Options:
"authsetup" - checks private and public key and returns "1", if they match.
"authsetup pre preprivhex [psalthex pwdcfg]" - loads prepriv key into memory. Optionally supports encrypted keys.
"authsetup priv privhex [salthex pwdcfg]" - loads private key into memory. Optionally supports encrypted keys.
"authsetup pub pubhex" - loads public key into memory.
"authsetup ppass preprivpass" - decrypts prepriv key with password.
"authsetup pass privpass" - decrypts private key with password.
"authsetup passd privpass [commandwhendone]" - decrypts private key with password in background. Optionally executes cubescript command when done.
"authsetup needpass" - returns "1", if the private key needs decryption.
"authsetup genpre [prelen]" - generates new prepriv key.
"authsetup genpriv" - generates private key from prepriv key.
"authsetup genpub" - generates public key from private key.
"authsetup savepre [preprivfilename]" - saves the prepriv key. The default filename is private/authpreprivate.cfg
"authsetup savepre [privatefilename]" - saves the private key. The default filename is private/authprivate.cfg
"authsetup newppass preprivpass [preprivfilename]" - encrypts prepriv key with new password and saves the result to file. The default filename is private/authpreprivate.cfg and an existing file gets overwritten - but the former file content is kept and also written, each line commented out.
"authsetup newpass privpass [privatefilename]" - encrypts private key with new password and saves the encrypted private key and the public key to file. The default filename is private/authprivate.cfg and an existing file gets overwritten - but the former file content is kept and also written, each line commented out.
"authsetup unarmed" - sets private and public keys to a fixed value. For testing only. Can be used to "log out". Only available in development versions of the game
----------
"authmemusage", "authrounds", "authmaxtime" are only used, when new passwords are created (authsetup new[p]pass). "authmemusage" is the number of megabytes of RAM that are used for the password hash calculation. If "authrounds" is zero (as is default), then the hash algorithm calculates as many rounds as possible in the number of milliseconds specified in "authmaxtime". If "authrounds" is a positive number, then that is the number of rounds to be done, regardless the required time. Note that, since the password hash algorithm is not endianness-aware, it is not possible to move an encrypted password to a machine with different endianness. Moving between 32- and 64-bit machines should be no problem.
See also: authmemusage, authrounds, authmaxtime, authkey, mypubkey, cryptodebug
cryptodebug N
Enables some debug messages in crypto.cpp file.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | enable debugging |  | 0..1 | 1

See also: authsetup
listcerts
List all certificates.
TODO: elaborate
mypubkey
Returns a public key of game account.
It returns empty string, if no account exists or it is unusable (due to missing password, for example).
See also: authsetup
newcert X A B C
Create and sign certificates from Cubescript.

Argument | Description | Values
--- | --- | ---
X | command | clear, start, line, sign
A | linename or pubkey | X:line => pubkey or name; X:sign => actual privkey
B | value or comment | X:line => actual pubkey, actual privkey or actual name, X:sign => a descriptive comment
C | comment | newcert line name KEY => a descriptive comment

TODO: elaborate

### Editing

_ignoreillegalpaths B
Whether or not texture paths are scrutinized.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:yes=>ignore | 0..1 | 0

If during mapload textureslots can't be filled and this is not set to 1 a "missing media" error is raised.
It is used in the optional cubescript config/opt/convmap.cfg
See also: loadnotexture
_nextentityispasted B
Set to 1 just before calling a newent command where all attributes are meant to be kept.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:yes=>keep attribute values | 0..1 | 0

It is used in the pasteent scripting.
When creating a new entity of type mapmodel, playerstart or CTF flag the orientation is taken from your current viewing angle. To disable this behaviour for one call only you set the value to of this to 1 and then issue your newentity call with all attributes given.
See also: loadnotexture
addentity E
Adds an entity of the specified type at the current camera position.

Argument | Description | Values
--- | --- | ---
E | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)

It also returns the index number of the new entity, so that the other attributes can be set by editentity.
See also: enumentities, editentity, deleteentity
addselection X Y XS XY
Selects the given area, as if dragged with the mouse holding editmeta.

Argument | Description | Values
--- | --- | ---
X | the X coordinate |
Y | the Y coordinate |
XS | the length along the X axis |
XY | the length along the Y axis |

This command is useful for making complex geometry-generating scripts. It adds a selection to the current list of selections. The dimensions of the current selections can be accessed by the commands selx, sely, selxs and selys. These commands return the list of coordinates corresponding to each selection.
Coordinates are as follows: after a "newmap 6" the top-left corner (the one where the red dot points) are (8,8), the opposite corner is (56,56) (or (120,120) on a "newmap 7" etc.).
See also: select, selectall, resetselections, expandselection, shrinkselection, enlargevdeltaselections, selx, sely, selxs, selys, selectionwalk, pushselections, editmeta
addtodoentity I C
Adds the entity #index to the TODO list.

Argument | Description | Values
--- | --- | ---
I | index |
C | comment (optional) |

Entity errors during map load are automatically added to the list. The list is saved and restored with xmaps.
See also: cleartodoentities, enumtodoentities
advancemaprevision N
Selects the increment of the map revision number for the next 'savemap'.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | increment |  | 1..100 | 1

ambient N
Controls the ambient lighting of the map, i.e. how bright areas not affected by any light entities will appear.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | the ambient color |  | 0x000000..0xFFFFFF | 0

applymapsoundchanges
During map editing, drop all mapsounds so they can be re-added.
arch S
Makes an arch out of the current selection.

Argument | Description | Values
--- | --- | ---
S | side delta (optional) |

The selection must be a heightfield before this command can be used. Will make the arch in the long direction, i.e when you have 6x2 cubes selected, the arch will span 7 vertices. Optionally, sidedelta specifies the delta to add to the outer rows of vertices in the other direction, i.e. give the impression of an arch that bends 2 ways (try "arch 2" on an selection of at least 2 thick to see the effect). Not all arch sizes are necessarily available, see config/prefabs.cfg.
See also: archvertex, enlargearchslopeselections
archvertex S V D
Defines a vertex delta for a specific arch span prefab, used by the 'arch' command.

Argument | Description | Values
--- | --- | ---
S | span value | integer
V | vertex value | integer
D | delta value | integer

It returns the old value of the vertex, and if the vertex argument is omitted, doesn't change it.
See config/prefabs.cfg for an example on usage.
automapconfig
Enables the "automatic embedded map config data" feature.
With the next map save the map config file will get renamed and the map config data stored inside the map file.
See also: getautomapconfig, embedconfigfile, extractconfigfile, listheaderextras
calcmipstats
Counts all the mips in the current map and prints their numbers as 1x1/2x2/4x4/8x8/16x16/32x32/64x64.
See also: showmip
cleanedit V
Turns on/off clean edit mode.

Argument | Description | Values
--- | --- | ---
V | sets cleanedit on/off | 0 (off), 1 (on)

While editing in clean edit mode, objects/guides not normally visible remain invisible.
i.e. The grid guidelines, selection borders, entity sparkles, clips, playerstart arrows are hidden
See also: togglecleanedit
clearents T
Deletes all entities of said type.

Argument | Description | Values
--- | --- | ---
T | the entity type, see command 'newent' | string

See also: delent, deleteentity
cleartodoentities I
Clears list of TODO entities.

Argument | Description | Values
--- | --- | ---
I | index (optional) |

The list is also deleted, when a new map is loaded.
If an entity number is given as an argument, only entries for this entity are cleared.
See also: addtodoentity, enumtodoentities
clearvantagepoint
Clears a set parameters of vantage point.
See also: setvantagepoint, getvantagepoint, gotovantagepoint
closestenttype A
Restricts 'closest entity' display to one entity type.

Argument | Description | Values
--- | --- | ---
A | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)

It returns the current value and not change the value if the argument is "-".
convertclips
Converts the nearest entity (if its a clip or plclip) to its opposite type.

Example: convertclipsAssuming the nearest entity is a clip, it will be converted to a plclip.

Example: convertclipsAssuming the nearest entity is a plclip, it will be converted to a clip.

copy
Copies the current selection into a buffer.
default key: C
See also: paste, copyent
copyent
Copies the current closest entity into a buffer.
It also works with the menu list of copied entities. It works only while in edit mode.
default key: - (minus)
See also: pasteent, copy
corner
Makes the current selection into a "corner".
Currently there is only one type of corner (a 45 degree one), only works on a single unit (cube) at a time. It can be positioned either next to 2 solid walls or in the middle of 2 higher floorlevels and 2 lower ones forming a diagonal (and similar with ceiling).
In both cases, the corner will orient itself automatically depending on its neighbours, behaviour with other configurations than the 2 above is unspecified. Since the latter configuration generates possibly 2 floor and 2 ceiling levels, up to 4 textures are used: for example for the 2 floors the higher one will of the cube itself, and the lower one of a neighbouring low cube. You can make bigger corners at once by issuing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them.
default key: K
countwalls T
Returns the number of solid walls contained into the current selection.

Argument | Description | Values
--- | --- | ---
T | the integer of type of the walls you want to count | 0 (solid), 1 (corner), 2 (floor heightfield), 3 (ceil heightfield), 4 (empty cube), 5 (semi solid)

Example: echo (concat "The selection contains " (countwalls 0) "solid wall(s)")Output: The selection contains 3 solid wall(s)

delent
Deletes the entity closest to the player.
default key: BACKSPACE
See also: undelent, deleteentity, clearents
deleteentity N
Deletes a map entity.

Argument | Description | Values
--- | --- | ---
N | entity index/number |

Note: deleting an entity only marks it as unused. It will be completely removed after saving and loading the map.
See also: delent, clearents, enumentities, addentity, editentity, undelent, getdeletedentities, unlistdeletedentity
deletemapmodelslot N P
Deletes an unused mapmodel slot.

Argument | Description | Values
--- | --- | ---
N | mapmodel slot number |
P | purge |

If "purge" is specified as second argument, it also deletes an used slot (including all map entities which use that mapmodel).
Also it enables automapconfig.
See also: mapmodel, mapmodelslotname, mapmodelslotbyname, mapmodelslotusage, editmapmodelslot, mapmodelchanged
deletemapsoundslot N P
Deletes an unused map sound slot.

Argument | Description | Values
--- | --- | ---
N | map sound slot number |
P | purge |

If "purge" is specified as second argument, it also deletes an used slot (including all map entities which use that sound).
Also it enables automapconfig.
See also: mapsound, mapsoundslotbyname, mapsoundslotusage, editmapsoundslot, mapsoundchanged
deletetextureslot N P R
Deletes an unused texture slot.

Argument | Description | Values
--- | --- | ---
N | texture slot number | 0..255
P | delete used slot? | purge
R | replacement slot | 0..255

If "purge" word is put as second argument, it also deletes an used slot. All mapmodels that use that texture as skin are changed to default skin. All world geometry, which uses the texture, is instead set to use slot #255 or a specified replacement slot. Slots below #5 always require "purge", no matter if they are in use (default slots).
Also enables automapconfig.
See also: texture, textureslotusage, textureslotusagelist, textureslotbyname, edittextureslot, edittexturestack
editaxis
Returns a value for the main axis of player orientation.

Description | Values | Range | Default
--- | --- | --- | ---
main axis of player orientation | 11 (X), 12 (Y), 13 (Z), 111 (-X), 112 (-Y), 113 (-Z) | 0..113 | 0

"100" is added if the player is looking in the negative direction of the axis.
editentity N A
Edits a map entity.

Argument | Description | Values
--- | --- | ---
N | entity index/number |
A | list of attributes (optional) |

It edits only parameters given a non-empty value. Returns the type and the values of all attributes (x, y, z, attr1 - attr7). It uses float values for some attributes, return values also may be float.

Example: echo (editentity 33)Prints all attributes of map entity number 33, for example "light 174 172 12 20 255 200 200 0 0 0"

Example: editentity 33 "" 173Changes the y-position of entity 33 to 173

See also: entset, enumentities, addentity, deleteentity
editheight T D
Changes the height of the current selection.

Argument | Description | Values
--- | --- | ---
T | an integer denoting the type | 0 (floor), 2 (ceiling)
D | the delta value to move it in | 1 (forwards), -1 (backwards)

default keys:
[ - moves downwards the selection in the floor
] - moves upwards the selection in the floor
O - moves downwards the selection in the ceiling
P - moves upwards the selection in the ceiling
edithideentmask
Integer variable containing a bitmask of hidden entity types.
editinfopanelmillis N
Update the edit info panel every N milliseconds.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | milliseconds | integer | 5..2000 | 80

See also: updateeditinfopanel, hideeditinfopanel
editing
A variable indicating if the game is in editmode.

Description | Values | Range | Default
--- | --- | --- | ---
editmode in singleplayer | 1 (true), 0 (false) | 0..1 | 0

See also: editing_sp
editing_sp
A variable indicating if the game is in singleplayer editmode.

Description | Values | Range | Default
--- | --- | --- | ---
editmode | 1 (true), 0 (false) | 0..1 | 0

See also: editing
editingsettingsvisibletime T
How long the temporary bits of showeditingsettings are displayed.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | time | time in milliseconds | 750..75000 | 7500

Slide in/out the boxes and/or text of the showeditingsettings display.
See also: showeditingsettings
editmapmodelslot N R H Z 0 P
Edits the parameters of a mapmodel slot.

Argument | Description | Values
--- | --- | ---
N | mapmodel slot number | integer
R | radius | integer
H | height | integer
Z | z-offset | integer
0 | redundant, leave it at zero so you don't break the command | 0
P | mapmodel path | string

Edits the parameters of a mapmodel slot. Only non-empty parameters actually change something.
The command returns the resulting data of the mapmodel slot. If only the mapmodel slot number is specified, no changes are made, but the current data is returned (also in non-edit mode). Therefore the command can be used to get and set parameters.
If anything is changed, automapconfig is enabled.

Example: editmapmodelslot 33 "" "" -5sets the z-offset of slot #33 to -5 without affecting other parameters

Example: echo (editmapmodelslot 33)prints the current parameters of mapmodel slot #33 , for example: 0 0 0 0 "makke/lightbulb"

See also: mapmodel, mapmodelslotname, mapmodelslotbyname, mapmodelslotusage, deletemapmodelslot, mapmodelchanged
editmapmsg
Allows to edit the map message.
See also: mapmsg
editmapsoundslot N P M
Edits path/name and maxuses parameters of a mapsound slot.

Argument | Description | Values
--- | --- | ---
N | map sound slot number |
P | map sound path |
M | maxuses |

Only non-empty parameters actually change something. The command returns the resulting data of the map sound slot. If only the map sound slot number is specified, no changes are made, but the current data is returned (also in non-edit mode). Therefore the command can be used to get and set parameters.
If anything is changed, automapconfig is enabled.
See also: mapsound, mapsoundslotbyname, mapsoundslotusage, deletemapsoundslot, mapsoundchanged
editmeta
First modifier key for editing mode.
Go to references mentioned below to see the use.
default key: left Ctrl
See also: addselection, entproperty, undelent, pasteent, editmetakeydown, editmeta2
editmeta2
Second modifier key for editing mode.
Go to references mentioned below to see the use.
default key: left Shift
See also: entproperty, undelent, editmeta2down, editmeta
editmeta2down
Indicates if second editmeta key is pressed.

Description | Values | Range | Default
--- | --- | --- | ---
state of the second editmeta key | 0: unpressed, 1: pressed | 0..1 | 0

See also: editmeta2
editmetakeydown
Indicates if editmeta key is pressed.

Description | Values | Range | Default
--- | --- | --- | ---
state of the first editmeta key | 0: unpressed, 1: pressed | 0..1 | 0

See also: editmeta
edittag T

Argument | Description | Values
--- | --- | ---
T | tag | integer value

edittagclip T
Sets tag clip type of all selected cubes.

Argument | Description | Values
--- | --- | ---
T | type | 0 (none), 64 (clip), 128 (plclip)

Type can be numeric or a keyword.
default keys:
1 on the keypad - sets a tag clip: none
2 on the keypad - sets a tag clip: clip
3 on the keypad - sets a tag clip: plclip
See also: transformclipentities
edittex T D
Changes the texture on current selection by browsing through a list of textures directly shown on the cubes.

Argument | Description | Values
--- | --- | ---
T | an integer denoting the type | 0 (floor), 1 (lower or wall), 2 (ceiling), 3 (upper wall)
D | the direction you want to cycle the textures in | 1 (forwards), -1 (backwards)

Default keys are the six keys above the cursor keys, which each 2 of them cycle one type (and numpad 7/4 for upper-wall).
The way this works is slightly strange at first, but allows for very fast texture assignment. All textures are in 3 individual lists for each type (both wall kinds treated the same), and each time a texture is used, it is moved to the top of the list. So after a bit of editing, all your most frequently used textures will come first when pressing these keys, and the most recently used texture is set immediately when you press the forward key for the type. These lists are saved with the map. Make a selection (including wall bits) and press these keys to get a feel for what they do.
default keys:
Insert - browses forward through floor textures
Delete - browses backward through floor textures
Home - browses forward through wall textures
End - browses backward through wall textures
Page Up - browses forward through ceiling textures
Page Down - browses backward through ceiling textures
7 on the keypad - browses forward through upper-wall textures
4 on the keypad - browses backward through upper-wall textures
X + mouse scroll - scrolls wall and upper-wall textures
Z + mouse scroll - scrolls floor or ceiling textures
See also: hudtexttl
edittextureslot N S P
Edits the parameters of a texture slot.

Argument | Description | Values
--- | --- | ---
N | texture slot number | 0..255
S | scale |
P | path |

Only non-empty parameters actually change something. The command returns the resulting data of the texture slot. If only the texture slot number is specified, no changes are made, but the current data is returned (also in non-edit mode). Therefore the command can be used to get and set parameters.
If anything is changed, automapconfig is enabled.

Example: edittextureslot 33 "" "arcitool/rohbaubims.jpg"Sets texture name of slot #33

Example: echo (edittextureslot 33)Prints the current parameters of texture slot #33, for example: 0 "zastrow/3wood_crate_10.jpg"

See also: texture, textureslotusage, textureslotusagelist, textureslotbyname, deletetextureslot, edittexturestack
edittexturestack S N
Puts a texture slot in a "last used" list up front.

Argument | Description | Values
--- | --- | ---
S | surface | floor, wall or ceiling
N | texture slot number | 0..255

The first parameter picks the list, the second parameter is the texture slot number to be used for the next edit.
See also: texture, textureslotusage, textureslotusagelist, textureslotbyname, deletetextureslot, edittextureslot
edittoggle
Switches between map edit mode and normal.
In map edit mode you can select bits of the map by clicking or dragging your crosshair on the floor or ceiling (using the "attack" identifier, normally MOUSE1), then use the identifiers below to modify the selection. While in edit mode, normal physics and collision don't apply (clips), and key repeat is ON. Note that if you fly outside the map, cube still renders the world as if you were standing on the floor directly below the camera.
default key: E
See also: select, Coopedit
embedconfigfile
Loads the map config file, includes it in the map header and renames the original config file.
Embedded config files take precedence over regular config files.
See also: automapconfig, extractconfigfile, listheaderextras
enlargearchslopeselections N
Automatically enlarge selections after placing arches or slopes.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: don't enlarge selection, 1: enlarge selection |  | 0..1 | 0

If the variable is set to 1, after placing an arch or a slope, the selection is enlarged, so that the arch or slope can be changed by vdelta increments (for example, to raise an arch in 1/4 cube increments).
If the variable is set to 0 (which is default), the selection remains unchanged. This way, for example, the arch can be raised or lowered by regular cube increments.
See also: arch, slope
enlargevdeltaselections I
Enlarges all selections by one cube in x- and y- direction, to change a selection from the "cube area" to the "vdelta area".

Argument | Description | Values
--- | --- | ---
I | incremente (optional) |

If an argument is given, it is used as increment value, so, for example "enlargevdeltaselections -1" undoes a previous enlargement.
See also: select, addselection
entproperty A I U
Changes property (attributes) of the closest entity.

Argument | Description | Values
--- | --- | ---
A | attribute index | 0..6 (atrr1 - attr7), 11..13 (x, y, z)
I | attribute increment |
U | unscaled flag (optional) | 0 or 1

For example 'entproperty 0 2' when executed near a lightsource would increase its radius by 2.
Keys 1..7, in combination with the scrollwheel, can be used to alter the new entity attributes (attr1 - attr7). Key "M", in combination with the scrollwheel, can be used to move the entity. Pressing editmeta speeds up the scrolling. Pressing editmeta2 enables unscaled editing of entity attributes.
Increment is a float for some attributes. If "unscaled" flag is "1", increment is applied as unscaled integer, which means, it will change float attributes at their highest resolution.
If 100 is added to the attribute index parameter, the sign of the increment value is changed.
See also: getclosestent, getentattr, getenttype, editmeta, editmeta2
entset E attr1 attr2 attr3 attr4 attr5 attr6 attr7
Edits the closest entity.

Argument | Description | Values
--- | --- | ---
E | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)
attr1 | see newent 'type' |
attr2 | see newent 'type' |
attr3 | see newent 'type' |
attr4 | see newent 'type' |
attr5 | see newent 'type' |
attr6 | see newent 'type' |
attr7 | see newent 'type' |

Overwrites the closest entity with the specified attributes. Some attributes may be specified as floats.
See also: editentity
entstats
Prints some map entity statistics to the console.
enumentities type
Returns a list of the numbers of all entities of that type.

Argument | Description | Values
--- | --- | ---
type | the entity type | light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet

If no such entities exist or the entity type could not be recognised, the list is empty.
See also: gotoentity, addentity, editentity, deleteentity
enumtodoentities
Returns a list of TODO entities.
Returns entity index number and comment for every entry.
See also: addtodoentity, cleartodoentities, xmap_list
equalize T
Levels the floor/ceiling of the selection.

Argument | Description | Values
--- | --- | ---
T | an integer denoting the type | 0 (floor), 2 (ceiling)

default keys:
, - equalizes the selection on the floor
. - equalizes the selection on the ceiling
expandselection N
Increases the size of the current selection by N cubes on all sides.

Argument | Description | Values
--- | --- | ---
N | number of cubes | integer

Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel.
It works also with multiple selections.
See also: select, addselection, shrinkselection
extractconfigfile
Writes an embedded config file to a separate file and removes it from the map header.
See also: automapconfig, embedconfigfile
flrceil
A variable indicating if the player looks at the floor or at the ceiling.

Description | Values | Range | Default
--- | --- | --- | ---
flrceil | 0 (floor), 2 (ceiling) | 0..2 | 0

fullbright B
Sets all light values to fullbright.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | sets fullbright on or off | 0 (off), 1 (on) | .. |

Will be reset when you issue a 'recalc'. Only works in edit mode.
default key: F7 - toggles fullbright
fullbrightlevel V
Sets the level of brightness to use when using the command "/fullbright 1".

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Light intensity level |  | 0..255 | 176

getautomapconfig
Returns "1" if automapconfig is already enabled, "0" otherwise.
See also: automapconfig
getclosestent
Returns the entity index number of the closest entity (or of the pinned entity, if one exists).
Returns -1, if no entities are on the map.
Returns always exactly the entity, that edit commands like delent will use next.
See also: toggleclosestentpin, entproperty, getentattr, getenttype
getdeletedentities
Returns a list of deleted entities.
Each line contains the entity type, the position and all seven attributes.
See also: undelent, unlistdeletedentity, deleteentity
getentattr A U
Returns the value of the selected attribute of the nearest entity.

Argument | Description | Values
--- | --- | ---
A | attribute index | 0..6
U | unscaled flag (optional) | 0 or 1

It returns float values for some attributes. If "unscaled" flag is "1", raw integer values (representing the highest resolution) are returned.
See also: entproperty, getenttype
getenttype
Returns the entity type of the nearest entity.
See also: entproperty, getentattr
getmapmodelattributes P N
Returns values for all attributes to a specific mapmodel.

Argument | Description | Values
--- | --- | ---
P | model path |
N | attribute name (optional) | keywords, desc, defaults, usage, author, license, distribution, version

If modelpath is a number, it is interpreted as index for the list of models in the current map config. If no attribute name is specified, all attributes are printed to the console instead.
See also: mapmodel, listallmapmodelattributes, mapmodelregister, mdlattribute
getmapsoundlist
Returns a list of all *.wav and *.ogg files below packages/audio/ambience.
See also: mapsound, getmapsoundorigin
getmapsoundorigin N
Returns the location where the map sound file actually can be found.

Argument | Description | Values
--- | --- | ---
N | filename or partial path with filename |

The possibilities are:
"official": mapsound file was found in the working directory, which indicates an official mapsound.
"custom": mapsound file was found in the profile directory, which means, the mapsound is either manually installed or downloaded.
"package dir #x": mapsound file was found in a mod directory.
"<file not found>"
See also: mapsound, getmapsoundlist
getmaptimestamp fmt
Returns the "last written" timestamp of the current map in the requested format.

Argument | Description | Values
--- | --- | ---
fmt | format | strftime format

If "fmt" starts with "U", the time is given as UTC, otherwise as local time. If "fmt" is empty, or not given or just the "U", the format defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer.
The same format options as in strftime().
gettexturelist includes excludes extensions
Returns a table of all texture files fitting a certain description.

Argument | Description | Values
--- | --- | ---
includes | Optional list of path prefixes to include in the table. |
excludes | Optional list of path prefixes to exclude from the table. |
extensions | Optional list of filename extensions to include in the table. |

All files found under packages/textures are examined.
By default, the command returns a list with two columns: path and filename. If "excludes" is exactly one path prefix to exclude, the table gets a third column with path names without that prefix. If "extensions" is exactly one extension which does not start with the character '.', the table gets an additional (third or fourth) column containing file names without that extension.

Example: echo (gettexturelist)Outputs two columns like "noctua/wall" "wall02.jpg"

Example: echo (gettexturelist "" "map_editor skymaps")Outputs two columns like "noctua/wall" "wall02.jpg", but omits skymaps and special textures for the editor

Example: echo (gettexturelist makke)Outputs only textures by makke and adds a third column like "makke/rattrap" "rb_box_03.jpg" "/rattrap"

Example: echo (gettexturelist "skymaps/" "" "_ft.jpg") Outputs four columns like "skymaps/egypt" "egypt_ft.jpg" "egypt" "egypt", "skymaps/humus" "meadow_ft.jpg" "humus" "meadow"

See also: texture, gettextureorigin
gettextureorigin N
Returns the location where the texture file actually can be found.

Argument | Description | Values
--- | --- | ---
N | filename or partial path with filename |

The possibilities are:
"official": texture file was found in the working directory, which indicates an official texture.
"custom": texture file was found in the profile directory, which means, the texture is either manually installed or downloaded.
"package dir #x": texture file was found in a mod directory.
"<file not found>"
See also: texture, gettexturelist
getvantagepoint
Returns string with coordinates of vantage point or empty string, if none is set.
See also: setvantagepoint, gotovantagepoint, clearvantagepoint
getwatercolour
Returns a string with the four components of the water colour: red, green, blue and alpha.

Example: echo (getwatercolor)Output: 20 25 20 178

See also: watercolour, setwatercolour
getxmaplist w
Returns a list of all regular xmaps in memory, or, if 'what' is "bak", the details of a stored backup xmap.

Argument | Description | Values
--- | --- | ---
w | what (optional) | bak

Each xmap is listed with nickname and description.
See also: xmap_list
gonextplayerstart N
Visit next or previous player spawn entity.

Argument | Description | Values
--- | --- | ---
N | direction | none or 1: next, -1: previous

See also: nextplayerstart
gotoentity N
Jump to the location of a map entity.

Argument | Description | Values
--- | --- | ---
N | the entity number |

You can get the entity number with use "enumentities" command.
See also: enumentities
gotoposition x y z yaw pitch
Only in edit mode: gets and sets camera position.

Argument | Description | Values
--- | --- | ---
x | X coordinate | float
y | Y coordinate | float
z | Z coordinate | float
yaw | yaw | integer
pitch | pitch | integer

Returns x, y, z, yaw and pitch. Sets x, y, z, yaw and pitch, if the parameter is not an empty string.

Example: echo (gotoposition)Output: 67.7 78.6 5.5 8 0

Example: gotoposition "" "" "" 180 0Change yaw and pitch to look straight in +y direction.

gotovantagepoint
Sets camera position in vantage point.
It returns 1, if the map actually has a vantage point set.
See also: setvantagepoint, getvantagepoint, clearvantagepoint
guidetoggle
Enables or disables a special set of default textures while editing.
The textures in "packages/textures/map_editor" are used.
heightfield T
Marks the current selection as a heightfield.

Argument | Description | Values
--- | --- | ---
T | an integer denoting the type | 0 (floor), 2 (ceiling)

It marks the current selection as a heightfield, with T being floor or ceiling, as above. A surface marked as heightfield will use the vdelta values (see below) of its 4 corners to create a sloped surface. To mark a heightfield as normal again (ignoring vdelta values, set or not) use "solid 0".
Heightfields should be made the exact size that is needed, not more not less. The most important reason for this is that cube automatically generates "caps" (side-faces for heightfields) only on the borders of the heightfield. This also means if you have 2 independent heightfields accidentally touch each other, you will not get correct caps. Also, a heightfield is slightly slower to render than a non-heightfield floor or ceiling. Last but not least, a heightfield should have all the same baseheight (i.e. the height determined by a normal editheight operation) to get correct results.
default keys:
H - makes the selection on the floor a heightfield
I - makes the selection on the ceiling a heightfield
See also: vdelta
hideeditinfopanel N
Hide the edit info panel.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: show, 1: hide |  | 0..1 | 0

See also: updateeditinfopanel, editinfopanelmillis
hideeditslotinfo N
Hide the closest entity filename info.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: show info always, 1: only show "unassigned slot" if necessary, 2: never show info |  | 0..2 | 0

hudtexttl T
Show preview of textures during editing.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | time to show texture preview [ms] |  | 0..10000 | 2500

When textures of the map geometry are changed, five textures around the current pick from the "last used" stack are shown.
The texture assigned to the "sky" slot is not shown. Instead, a plain blue rectangle is used.
See also: edittex
listallmapmodelattributes N
Returns a table of all known mapmodels.

Argument | Description | Values
--- | --- | ---
N | list of attribute names | explodekeywords, sortby: keywords, desc, defaults, usage, author, license, distribution, version

Each model is listed with the modelpath and the values for the requested attributes. To be used instead of a fixed table in menu_edit.cfg.
In addition to attribute names, the function also allows the keywords "explodekeywords" and "sortby:" as arguments. If "explodekeywords" is given, all mapmodels with more than one keyword are listed multiple times, once for each keyword. If an attribute name is preceeded by "sortby:" the list will be sorted by this table column. If "sortby:" is used several times, this first sort will have highest priority. The list is always sorted by path by default.

Example: listallmapmodelattributes sortby: author sortby: desc explodekeywords

See also: mapmodel, getmapmodelattributes, mapmodelregister, mdlattribute
listheaderextras
Returns a list with additional data ("header extras") from current map header.
The header extras can be permanent, like the embedded config file, or can be used only once after map load, like the undo/redo data. Additional extra data can be easily added and will not break backward compatibility.
See also: automapconfig, embedconfigfile
loadallmapmodels
Tries to load mapmodels from all paths below packages/models/mapmodels.
It will throw a lot of error messages, because not all directories contain models to load. This command can be used to build or rebuild the complete list of all available mapmodels. It is only necessary, if models are added manually to the directories, since every mapmodel gets added to the list when it is loaded - which takes care of all automatically downloaded models.
See also: mapmodel, mapmodelregistryclear
mapareacheck W
Calculates some key values to determine map geometry viability.

Argument | Description | Values
--- | --- | ---
W | what | vdelta, steepest, total, pprest, pp (default)

It returns different sets of statistics, depending on the keyword "what":
"vdelta" - returns table of numbers of cubes within a certain range of vdelta differences (steepness). First entry is "0..2 cubes steep", next is "2..4" and so on.
"steepest" - returns the coordinates of the steepest heightfield cube.
"total" - returns the number of non-solid cubes on the map.
"pprest" - returns the number of cubes _not_ visible from one of the probe positions.
"pp" (default) - returns a table of all (currently 64) probe points of the map. Each probe point is listed with: x-coordinate, y-coordinate, floor height, area visible, volume of visible area, average height in visible area.
mapartist N
Adds artist info to a map.

Argument | Description | Values
--- | --- | ---
N | Prints the map artist player ID | print
| Sets the map artist player ID to the player currently logged in | set
| Returns the current map artist player ID | get
| Erases an existing map artist record in the current map | clear

See also: modeinfo
mapbackupsonsave N
Determines if map backups (.bak) should be created when a map is saved.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0 off, 1 on |  | 0..1 | 1

mapenlarge
Enlarges the current map.
This command will make the current map 1 power of two bigger. So a size 6 map (64x64 units) will become a size 7 map (128x128), with the old map in the middle (from 32-96) and the new areas solid.
See also: newmap, mapsize, mapshrink
mapinfo_comment C
Sets the map comment string.

Argument | Description | Values
--- | --- | ---
C | comment | string

The variable is stored withing the header of a map file. The comment string is ignored, as long as no map license string is set.
You can get the comment string with the $mapinfo_comment variable.
See also: mapinfo_license
mapinfo_license L
Sets the map license.

Argument | Description | Values
--- | --- | ---
L | type of license | string

The name of license is stored withing the header of a map file. The license string is meant to hold an abbreviated name of the license, picked from a list of known map licenses.
You can get the type of map license with the $mapinfo_license variable.
See also: mapinfo_comment
mapmodelchanged N
Set to "1" with every command that changes mapmodel slots.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: not changed, 1: changed |  | 0..1 | 0

Should be used to trigger a rebuild of mapmodel menus.
See also: mapmodel, editmapmodelslot, deletemapmodelslot
mapmodelregister P V
Adds values for all attributes to a specific mapmodel.

Argument | Description | Values
--- | --- | ---
P | model path |
V | list of all attribute values |

This is used to restore the cached values from config/mapmodelattributes.cfg during game start. It does not actually verify of load the model.
See also: mapmodel, getmapmodelattributes, listallmapmodelattributes, mdlattribute, mapmodelregisterclear
mapmodelregistryclear
Deletes all loaded mapmodel attributes.
See also: mapmodel, mapmodelregister, getmapmodelattributes, listallmapmodelattributes, mdlattribute, loadallmapmodels
mapmodelslotbyname M
Returns the slot number registered in the map config file of the model with the given name.

Argument | Description | Values
--- | --- | ---
M | mapmodel name (with path) |

Example: echo (mapmodelslotbyname "mapmodels/makke/platform_bridge")Output: 5

See also: mapmodel, mapmodelslotname, mapmodelslotusage, editmapmodelslot, deletemapmodelslot
mapmodelslotname N
Returns the map model name (and path) of the mapmodel registered in the given slot number in the map config file.

Argument | Description | Values
--- | --- | ---
N | mapmodel slot number |

See also: mapmodel, mapmodelslotbyname, mapmodelslotusage, editmapmodelslot, deletemapmodelslot
mapmodelslotusage N
Returns a list of map entity indices which use a certain mapmodel slot.

Argument | Description | Values
--- | --- | ---
N | mapmodel slot number |

If the mapmodel is unused, it returns an empty string.
It returns a single space, if the model slot is not used by any map entity, but is required by another model (with entities).
See also: mapmodel, mapmodelslotname, mapmodelslotbyname, editmapmodelslot, deletemapmodelslot
mapmodelzoff N
Allows negative z-offsets for mapmodels.

Argument | Description | Values
--- | --- | ---
N | mapmodel slot number |

A mapmodel entity is placed at a z-coordinate that is based on the floor height of map geometry and a z-offset. The z-offset is a sum of the entity attribute 3 and the third mapmodel slot parameter. The entity z-offset can range from 0 to 255 while the mapmodel slot parameter can be any integer including negative numbers. So, to place a mapmodel below floor height, the mapmodel slot parameter has to be negative.
"mapmodelzoff" script decreases the mapmodel slot parameter by one and increases the z-offset of every mapmodel which uses that slot also by one. This means, that all mapmodel are exact in the same place afterwards - but the entity z-offset now has room to lower the mapmodel by one more cube.
If you need more z-offset available, run the script several times.
mapmrproper
Cleanups hidden map attributes.
"mapmrproper" tries to optimize hidden attributes of maps in a way, that the map can be handled in bigger chunks by the renderer.
The mipmapping routine does not take into account, if certain textures of a cube are visible at all, when it collects otherwise identical cubes to be handled en-bloc. "mapmrproper" changes invisible textures in a way, that the cubes are in fact identical - so, that the mipmapper is satisfied. The optimizer does not change any map properties that are visible in any way.
Before any changes are made, mapmrproper creates a backup, which can be restored by "undo" command. Enable mipstats ("showmip" command), to see, what has been done.
See also: showmip
mapmsg M
Sets the map message, which will be displayed when the map loads.

Argument | Description | Values
--- | --- | ---
M | The map message | string

You will need to use quote marks around the message, otherwise it save the message correctly.
For example: /mapmsg "Map By Author"
You can get the current map message with the $mapmsg variable.
See also: editmapmsg
mapshrink
Reduces the world size by 1.
This command will make the current map 1 power of two smaller. So a size 7 map (128x128) will become a 6 size map (64x64 units), by removing 32 cubes from each side. The area to be removed needs to be empty (= all solid).
See also: newmap, mapsize, mapenlarge
mapsize
Outputs the mapsize.
See also: newmap, mapenlarge, mapshrink
mapsoundchanged N
Set to "1" with every command that changes mapsound slots.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: not changed, 1: changed |  | 0..1 | 0

Should be used to trigger a rebuild of mapsound menus.
See also: mapsound, editmapsoundslot, deletemapsoundslot
mapsoundslotbyname N
Returns the list of numbers of all mapsound slots which use that sound file.

Argument | Description | Values
--- | --- | ---
N | map sound filename |

See also: mapsound, mapsoundslotusage, editmapsoundslot, deletemapsoundslot
mapsoundslotusage N
Returns a list of map entity indices which use a certain map sound slot.

Argument | Description | Values
--- | --- | ---
N | map sound slot number |

If the sound is unused, it returns an empty string.
See also: mapsound, mapsoundslotbyname, editmapsoundslot, deletemapsoundslot
modeinfo N
Adds modeinfo info to a map.

Argument | Description | Values
--- | --- | ---
N | Lists current modeinfo entries | list
| Returns list of current modeinfo entries | get
| Erases current list of modeinfo entries | clear
| Specifies flags for a list of modes | <modelist> <modeflags>

See possibilities of mode list and flags (keywords) in config/maprot.cfg file. To use flags for all modes you can use "all" value instead of mode list.
See also: mapartist
movemap dX dY dZ
Moves the whole map (including all entities) in the specified direction.

Argument | Description | Values
--- | --- | ---
dX | x-offset |
dY | y-offset |
dZ | z-offset |

newent E attr1 attr2 attr3 attr4 attr5 attr6 attr7
Adds a new entity.

Argument | Description | Values
--- | --- | ---
E | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)
attr1 | see newent 'type' |
attr2 | see newent 'type' |
attr3 | see newent 'type' |
attr4 | see newent 'type' |
attr5 | see newent 'type' |
attr6 | see newent 'type' |
attr7 | see newent 'type' |

(x,y) is determined by the current selection (the red dot corner) and z by the camera height, of said type. The type of entity may optionally take attributes (depending on the entity).
newent akimbo
Adds a new akimbo item.
newent ammobox
Adds a new ammo box item.
newent armour
Adds a new armour item.
newent clip Z X Y H
Adds a clip entity.

Argument | Description | Values
--- | --- | ---
Z | elevation above the ground | integer
X | X radius around the box center | integer
Y | Y radius around the box center | integer
H | height of the box | integer

Defines a clipping box against which the player will collide.
Use this clip type to clip visible obstacles like fences or the gas tank. If you only want to prevent a player from entering an area, use plclip instead.
newent ctf-flag T
Adds a CTF flag entity.

Argument | Description | Values
--- | --- | ---
T | denotes the flag's team | 0 (CLA), 1 (RVSF)

Note that outside of edit mode, this entity is only rendered as flag if the current game mode is CTF.
newent grenades
Adds a new grenades item.
newent health
Adds a new health item.
newent helmet
Adds a new helmet item.
newent ladder H
Adds a ladder entity.

Argument | Description | Values
--- | --- | ---
H | the height of the ladder | integer

Note that this entity is used for physics only, to create a visual ladder you will need to add a mapmodel entity too.
See also: newent mapmodel
newent light radius R G B
Adds a new light entity.

Argument | Description | Values
--- | --- | ---
radius | the light radius | 1..32
R | red colour component, see remarks below | 1..255
G | green colour component | 1..255
B | blue colour component | 1..255

if only argument R is specified, it is interpreted as brightness for white light.
newent mapmodel N Z T
Adds a map model to the map (i.e. a rendered md2/md3 model which you collide against but has no behaviour or movement).

Argument | Description | Values
--- | --- | ---
N | The mapmodel identifier | integer
Z | Extra elevation above ground (optional) | integer
T | The map texture to use (optional) | integer

The mapmodel identifier is the desired map model which is defined by the 'mapmodel' command. The order in which the mapmodel is placed in the map config file defines the mapmodel identifier. The map texture refers to a texture which is defined by the 'texture' command, if omitted the models default skin will be used. The 'mapmodel' and 'texture' commands are placed in the map config normally. Mapmodels are more expensive than normal map geometry, so do not use insane amounts of them to replace normal geometry.
newent pistol
Adds a pistol magazine item.
newent playerstart
Adds a new spawn spot.
The yaw is taken from the current camera yaw.
newent plclip Z X Y H
Adds a player clip entity.

Argument | Description | Values
--- | --- | ---
Z | elevation above the ground | integer
X | X radius around the box center | integer
Y | Y radius around the box center | integer
H | height of the box | integer

Defines a clipping box against which (only) the player will collide.
Use this clip type to define no-go areas for players without visible obstacles, for example to prevent players from walking on a wall.
Nades will not be affected by this clip type.
newent sound N R S V
Adds a sound entity.

Argument | Description | Values
--- | --- | ---
N | the sound to play | integer
R | the radius |
S | the size (optional) | default 0
V | the volume (optional) | default 255

Will play map-specific sound so long as the player is within the radius. However, only up to the maxuses 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 the radius. If size is specified, the volume is maximal within the specified size, and only starts tapering once outside this distance. Radius is always defined 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.
A sound entity can be either ambient or non-ambient. Ambient sounds have no specific direction, they are 'just there'. Non-ambient sounds however appear to come from a specific direction (stereo panning). If S is set to 0, the sound is a single point and will therefore be non-ambient. However if S is greater than 0, the sound will be ambient as it covers a specified area instead of being a single point.
See also: mapsound
newmap S
Creates a new map.

Argument | Description | Values
--- | --- | ---
S | the size of the new map | 6..9

The new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large.
See also: mapsize, mapenlarge, mapshrink
nextclosestent
Chooses another 'closest ent'.
Use this, when two entities are placed in exactly the same location.
nextplayerstart N
Visit next player spawn entity.

Argument | Description | Values
--- | --- | ---
N | team number | 0: CLA, 1: RVSF, 100: FFA

See also: gonextplayerstart
oldselstyle N
Enables or disables using squares to render the editing grid/current selection instead of triangles.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0 off, 1 on |  | 0..1 | 1

onNewMap
This alias will automatically be executed when a new map is created via the "newmap" command.
Does not affect the loading of an existing map.
See also: newmap, mapstartonce, mapstartalways
paste
Pastes a previously copied selection.
To paste a selection back requires a same size selection at the destination location. If it is not the same size the selection will be resized automatically prior to the paste operation (with the red dot as anchor), which is easier for large selections.
default key: V
See also: copy
pasteent
Pastes a previously copied entity.
It also works with the menu list of copied entities. It works only while in edit mode.
Pressing "editmeta" while using "pasteent" opens the menu with a list of copied entities.
See also: copyent, editmeta
perlin S E C
Generates a perlin noise landscape in the current selection.

Argument | Description | Values
--- | --- | ---
S | the scale, frequency of the features | default is 10
E | the random seed | integer
C | cube size, how many cubes to generate a surface for at once (unused) |

Keep the seed the same to create multiple perlin areas which fit with each other, or use different numbers if to create alternative random generations.
pointatent B
Enables or disables pointing at entity sparklies.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 0: nearest, 1: pointed at | 0..1 | 0

If an entity is pointed at during disabling, it is pinned.
See also: pointatentmaxangle, toggleclosestentpin
pointatentmaxangle N
Specifies the required precision for pointing at entities sparklies.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: not changed, 1: changed | float | 0.01..180.0 | 2.0

See also: pointatent
preserveundosonsave N
Determines if undo data should be preserved on using "savemap" command.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: don't preserve undos, 1: preserve undos |  | 0..1 | 0

Undo data can be saved only in edit mode.
See also: savemap
pushselections
Stores the positions of all current selections.
Can be used repeatedly. To restore the selections, type "popselections".
See also: select, addselection
recalc
Recomputes all there is to recompute about a map, currently only lighting.
redo
Redoes editing operations undone by 'undo'.
With editmeta pressed it also restores player position and selects the affected area.
default key: R
See also: undo, editmeta
replace
Repeats the last texture edit throughout the map.
The way it works is intuitive: simply edit any texture anywhere, then using "replace" will replace all textures throughout the map in the same way (taking into account whether it was a floor/wall/ceil/upper too). If the there was more than one "old" texture in your selection, the one nearest to the red dot is used. This operation can't be undone.
rereadsoundlists N
Variable, which is set to "1" when a sound is downloaded.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | is sound downloaded? | 0: no, 1: yes | 0..1 | 1

Used to trigger menu rebuilds.
See also: rereadtexturelists
rereadtexturelists N
Variable, which is set to "1" when a texture is downloaded.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | is texture downloaded? | 0: no, 1: yes | 0..1 | 1

Used to trigger menu rebuilds.
See also: rereadsoundlists
resetselections
Resets all current selections.
See also: select, selectall, addselection
savemap M
Saves the current map.

Argument | Description | Values
--- | --- | ---
M | file name of the map, see command 'map' for the naming scheme | string

It makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name.
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.
For "savemap" to save different maps during editing with undo data, the variable "preserveundosonsave" has to be "1". It is "0" by default. "savemap" when not editing saves optimised map, with no undo data.
See also: map, savemapoptimised, preserveundosonsave
savemap9
Saves a map in old map format 9 (may lose some map details that are not possible with format 9).
savemapoptimised M
Saves optimised the current map, with no undo data.

Argument | Description | Values
--- | --- | ---
M | file name of the map, see command 'map' for the naming scheme | string

It makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name.
See also: map, savemap
scalelights S I
Scales all lights in the map.

Argument | Description | Values
--- | --- | ---
S | size change (percentage) |
I | intensity change (percentage) |

This command is useful if a map is too dark or bright but you want to keep the light entities where they are.
select X Y XS XY
Resets all current selections and selects the given area, as if dragged with the mouse.

Argument | Description | Values
--- | --- | ---
X | the X coordinate |
Y | the Y coordinate |
XS | the length along the X axis |
XY | the length along the Y axis |

This command is similar to addselection although "select" resets all selections.
See also: addselection, selectall, resetselections, expandselection, shrinkselection, enlargevdeltaselections, selx, sely, selxs, selys, selectionwalk, pushselections
selectall
Selects the whole map (minus the two cubes wide border).
See also: select, addselection, resetselections
selectionflip AXIS
Flips the selected part of the map at an axis.

Argument | Description | Values
--- | --- | ---
AXIS | X or Y |

selectionrotate D
Rotates the selected part of the map in 90 degree steps.

Argument | Description | Values
--- | --- | ---
D | steps |

To rotate clockwise, use a positive number of steps. Note, that only quadratic selections can be rotated by 90 degrees.
selectionwalk action beginsel endsel
Iterates over all cubes in all selections and executes "action" for each cube.

Argument | Description | Values
--- | --- | ---
action | action |
beginsel | begin action before cubes action of each selection (optional) |
endsel | end action before cubes action of each selection (optional) |

The cubes of every selection are framed by executions of "beginsel" and "endsel", i.e. for each new selection, before executing "action" for the cubes of that selection, "beginsel" is executed, and then, after actions for all cubes of that selection, "endsel" is executed. The action script is allowed to make changes to cube attributes, and if it does, an undo point is automatically added. "beginsel" and "endsel" are optional.
While the scripts are executed, several aliases provide further info:
"sw_cursel" - position and size of the current selection. Valid in all three scripts. Holds four integer values for x, y, xs, ys. See "select" command for details.
(all following aliases are only valid during the execution of the action script and provide the attributes of one cube of the map)
"sw_abs_x", "sw_abs_y", "sw_rel_x", "sw_rel_y" - absolute and relative (within the current selection) coordinates of the current cube. Read-only values.
"sw_type" - type of the current cube. Can be 0..4 for SOLID, CORNER, FHF, CHF and SPACE. May be changed to other numerical value or keyword.
"sw_floor", "sw_ceil" - floor and ceiling heights of the current cube. Range -128..127.
"sw_wtex", "sw_ftex", "sw_ctex", "sw_utex" - texture slot indices for wall, floor, ceiling and upper wall of the current cube.
"sw_vdelta", "sw_tag" - vdelta and tag values of current cube.
"sw_r", "sw_g", "sw_b" - current light values of current cube. Can be edited, but only with temporary effect. Will be reset with the next light recalc.
The command is mostly useful for statistics scripts (like counting cubes with certain attributes), but is can also be used for scripted editing, as the following (useless) example shows: selectionwalk [ += sw_floor (rnd 2) ]
See also: select, addselection
selx
Returns the x-coordinate of the westernmost (towards negative x) cube(s) in the current selection.
See also: select, sely, selxs, selys
selxs
Returns the x-span (size on the x-axis) of the current selection.
See also: select, selx, sely, selys
sely
Returns the y-coordinate of the northernmost (towards negative y) cube(s) in the current selection.
See also: select, selx, selxs, selys
selys
Returns the y-span (size on the y-axis) of the current selection.
See also: select, selx, sely, selxs
settex T t
Sets a texture for the current selection.

Argument | Description | Values
--- | --- | ---
T | position of the texture to set in map cfg | integer
t | the type of the texture | 0 (floor), 1 (wall), 2 (ceil), 3 (upper wall)

setvantagepoint
Sets vantage point in current camera position.
The vantage point is supposed to be a distinctive view on a map - like the angle from which the preview picture was taken. It is allowed to use when editing offline or spectating offline.
A map can only have one vantage point.
See also: gotovantagepoint, getvantagepoint, clearvantagepoint
setwatercolour W V
Allows setting the components of the water colour independently.

Argument | Description | Values
--- | --- | ---
W | what | red (0), green (1), blue (2), alpha (3)
V | value | (0)1..255

"what" is either a keyword "red|green|blue|alpha" or the index number 0..3 and determines, which component is set to value.

Example: setwatercolour red 200- sets the red component to 200

See also: watercolour, getwatercolour
shadowyaw D
Shadow yaw specifies the angle at which shadow stencils are drawn on a map.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
D | degrees | The angle in degrees to rotate the stencil shadows | 0..360 | 45

When specifying shadowyaw, remember that the default angle is 45 degrees. The example below would make the shadows appear at 90 degrees (45 degrees more to the left).

Example: shadowyaw 90

showclips N
Show clips/plclips/mapmodel clips in edit mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 1

showeditingsettings P
A visual representation of hidden/shown entities. (may be used for more editing ephemerals later)

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
P | persistence | 0:off(*),1:short,2:text-short,3:permanent | 0..3 | 0

If the value of edithideentmask is not 0 (meaning all entities shown) then even if showeditingsettings is 0 the display will show up on the first toggle into editmode.
The values 1, 2 and 3 will make the display show up for every time you start editing. With 3 it will stay for ever.
For 2 the text will disappear after a time but the boxes will stay for ever. For 1 everything is hidden after the duration of editingsettingsvisibletime.
See also: edithideentmask, editingsettingsvisibletime
showfocuscubedetails
Shows detailed geometry data of the cube inside editing focus.
It shows on the HUD cube type, floor and ceiling heights, vdelta and all textures.
default key: F8
See also: showmip
showgrid N
Show editing cursor grid.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 1

showladderentities N
Show ladder entities (as blue wireframes) in edit mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 0

showmapdims
Prints map dimensions.
showmapstats
Prints some map statistics.
showmip
Toggles between showing what parts of the scenery are rendered.
Shows what parts of the scenery are rendered using what size cubes and outputs some statistics about it. This can give map editors hints as to what architecture to align, textures to change, etc.
If "showfocuscubedetails" is enabled, "showmip" stats on the HUD are hidden.
default key: F6
See also: calcmipstats, showfocuscubedetails
showmodelclipping N
Show mapmodel clipping during edit mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 0

showplayerstarts N
Show all playerstarts in edit mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: hide, 1: show |  | 0..1 | 0

Set showplayerstarts to "1" to see a playermodel rendered at all playerstart entities.
showtagclipfocus B
Show the volume of a focused clip entity as a cloud of sparklies.

Argument | Description | Values
--- | --- | ---
B | on/off | 0:off,1:on

To see the volume rather than the boundaries of a clip entity you can hold the B key in editing mode while pointing at it.
default key: B - while pressed clips are clouds of sparklies
showtagclips N
Show tagclips/tagplclips in edit mode.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | - |  | 0..1 | 1

See also: showtagclipfocus, taglife, tagnum, tagnumfull
shrinkselection N
Decreases the size of the current selection by N cubes on all sides.

Argument | Description | Values
--- | --- | ---
N | number of cubes | integer

Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel.
It works also with multiple selections.
See also: select, addselection, expandselection
slope X Y
Makes a slope out of the current selection.

Argument | Description | Values
--- | --- | ---
X | x delta step | integer
Y | y delta step | integer

The selection must be a heightfield before this command can be used. The steps specify the slope with the red vertex as left-top, i.e. "slope 1 2" will make a slope that increases just 1 step from left to right, and is slightly steeper from top to bottom. "slope -6 0" decreases steeply from left to right, and does not slope at all from top to bottom. Note that like the vdelta command, an increasing vdelta goes further away from the player, regardless of floor or ceiling.
See also: enlargearchslopeselections
solid B
Makes the current selection all solid (i.e. wall) or all non-solid.

Argument | Description | Values
--- | --- | ---
B | an integer denoting the solid-ness | 0 (non-solid), 1..* (solid)

This operation retains floor/ceiling heights/textures while swapping between the two.
default keys:
F - makes the selection a solid
G - makes the selection a space/non-heightfield
sortmapmodelslots nosort nomerge mergeused
Sorts all mapmoodel slots alphabetically and merges identical slots.

Argument | Description | Values
--- | --- | ---
nosort | do not sort the list alphabetically (optional) |
nomerge | do not merge any slots (optional) |
mergeused | merge used and unused (identical) slots freely (optional) |

By default, the list is sorted and only unused identical (with the same model and parameters) slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".

Example: sortmapmodelslots - sorts the mapmodel slot list alphabetically and merge unused identical slots. Merging an unused slot is pretty much the same as deleting it, so this command sorts the list and removes unneeded double entries

Example: sortmapmodelslots nosort- merges (deletes) unused double entries in the mapmodel slot list

Example: sortmapmodelslots nosort mergeused - merges double entries in the mapmodel slot list. If two identical entries are used in the map, all uses are mapped to the new combined slot. This leaves no visual changes on the map. Should be avoided, if mapmodel slots have been renamed manually - and the renaming isn't finished yet

Example: sortmapmodelslots mergeused- sorts the mapmodel slot list and merges all double entries

See also: mapmodel, sorttextureslots, sortmapsoundslots
sortmapsoundslots nosort nomerge mergeused
Sorts all mapsound slots alphabetically and merges identical slots.

Argument | Description | Values
--- | --- | ---
nosort | do not sort the list alphabetically (optional) |
nomerge | do not merge any slots (optional) |
mergeused | merge used and unused (identical) slots freely (optional) |

By default, the list is sorted and only unused identical slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".
See examples in the "sortmapmodelslots" reference.
See also: mapsound, sortmapmodelslots, sorttextureslots
sorttextureslots nosort nomerge mergeused
Sorts all texture slots alphabetically and merges identical slots.

Argument | Description | Values
--- | --- | ---
nosort | do not sort the list alphabetically (optional) |
nomerge | do not merge any slots (optional) |
mergeused | merge used and unused (identical) slots freely (optional) |

By default, the list is sorted (except the first five) and only unused identical (with the same texture and scale factor) slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".
It allows to manually sort also the first few slots by adding the slot number to move to the slots #1, #2, #3, #4 (for example "sorttextureslots 11 12 13 14" will move slot #11 to slot #1, #12 to #2, #13 to #3 and #14 to #4, and sort the rest texture slots).
See examples in the "sortmapmodelslots" reference.
See also: texture, sortmapmodelslots, sortmapsoundslots
stairs xs ys
Places stairs in all selections.

Argument | Description | Values
--- | --- | ---
xs | step width in x-direction |
ys | step width in y-direction |

"xs" and "ys" determine the step width in x- and y-direction.
tagcliplinewidth W
The width of the tagclip lines.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
W | width |  | 0.2..3 | 1

See also: showtagclips, showtagclipfocus
taglife T
Fading time of sparklies in focused on tagclip volume

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
T | time | milliseconds | 1..1000 | 30

source comments suggest this may become hardwired in the future
See also: showtagclips, showtagclipfocus, tagnum
tagnum C
Number of particles in the focused on tagclip volume.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
C | count | particle count | 1..100 | 14

source comments suggest this may become hardwired in the future
See also: showtagclips, tagnum, tagnumfull
tagnumfull C
Number of particles in any tagclip volume - if showtagclipfocus is not 1.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
C | count | particle count | 1..100 | 0

source comments suggest this may become hardwired in the future
See also: showtagclips, showtagclipfocus
textureslotbyname N
Returns the list of numbers of all texture slots which use that texture file.

Argument | Description | Values
--- | --- | ---
N | texture filename |

See also: texture, textureslotusage, textureslotusagelist, edittextureslot, deletetextureslot, edittexturestack
textureslotusage N
Returns a list of mapmodels who use that texture as skin.

Argument | Description | Values
--- | --- | ---
N | texture slot number | 0..255

If no mapmodel uses the texture, but world geometry does, a string of whitespace is returned. If the mapmodel is unused, an empty string is returned.
See also: texture, textureslotusagelist, textureslotbyname, edittextureslot, deletetextureslot, edittexturestack
textureslotusagelist W
Returns a list of 256 numbers representing the number of uses for every texture slot.

Argument | Description | Values
--- | --- | ---
W | what | onlygeometry, onlymodels, onlymostvisible

If "what" is "onlygeometry", the uses as map model skin do not count.
If "what" is "onlymodels", the uses in map geometry do not count.
It returns two values per slot: usage and visibility.
If "what" is "onlymostvisible", instead of the regular list, a list of only the most used wall, floor, ceiling and upper wall textures (alternating with the keywords) is returned.

Example: echo (textureslotusagelist onlymostvisible)Output: wall 211 floor 45 ceiling 0 "upper wall" 79

See also: texture, textureslotusage, textureslotbyname, edittextureslot, deletetextureslot, edittexturestack
togglecleanedit
Inverses the on/off state of cleanedit
See also: cleanedit
toggleclosestentpin
Toggles the pin on the "closest entity" selector.
The HUD will indicate the lock by showing "pinned" instead of "closest" entity. All actions, that would otherwise affect the closest entity, will affect the pinned entity instead. Deleting the locked entity will unlock it.
default key: middle mouse button
See also: getclosestent
toggleocull
Turns occlusion culling on and off.
The reason one may want to turn it off is to get an overview of the map from above, without having all occluded bits stripped out.
default key: F5
transformclipentities
Transforms all full height clip entities to tag clips.
See also: edittagclip
undelent I
Restores deleted entity.

Argument | Description | Values
--- | --- | ---
I | index |

If no index is specified, the last deleted entity is restored. If an index is given, the specified entity from the list of deleted entities is restored.
BACKSPACE in combination with editmeta undeletes the last deleted entity.
BACKSPACE in combination with editmeta2 brings up the menu "deleted entities".
See also: getdeletedentities, unlistdeletedentity, deleteentity, editmeta, editmeta2
undo
Multi-level undo of any of the changes caused by editing operations.
With editmeta pressed it also restores player position and selects the affected area.
default key: U
See also: redo, undolevel, undomegs, editmeta
undolevel L
Returns the number of undo steps that can be undone.

Argument | Description | Values
--- | --- | ---
L | level | integer

If argument "level" is given, as many steps are undone, until "level" steps remain.
Unless memory limits delete states, undolevel commands can be undone with "redo".

Example: echo (undolevel) - prints number of previous editing steps, for example "55". Do some editing and:

Example: undolevel 55 - undoes all changes to restore the previous state (if that state is still in memory)

See also: undo, redo, undomegs
undomegs N
Sets the number of megabytes used for the undo buffer.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | number of megabytes | integer | 0..50 | 5

Undo's work for any size areas, so the amount of undo steps per megabyte is more for small areas than for big ones (a megabyte fits 280 undo steps on a 16x16 area, but only 4 steps on a 128x128 area).
See also: undo, undolevel
unlistdeletedentity W
Removes entities from the list of deleted entities.

Argument | Description | Values
--- | --- | ---
W | which | [a number], all or last

If <which> is a number, the specified entry from the list of deleted entities gets removed.
If <which> is "all", the whole list of deleted entities gets deleted.
If <which> is "last" the last deleted entity is removed from the list of deleted entities.
Returns the number of entities on the list of deleted entities (even if the parameter <which> was unknown or not specified).
See also: getdeletedentities, undelent, deleteentity
unsavededits
Holds the number of unsaved edits.
updateeditinfopanel
A cubescript hook to provide additional information about the current edit situation.
For example it provides additional information about the closest entity.
The returned text is rendered on the right side of the screen.
Default for "updateeditinfopanel" is "explainclosestentity" script which provides detailed info about the closest entity.
See also: editinfopanelmillis, hideeditinfopanel
updatemapmodeldependencies
Update map config with any mapmodels required by those in use.
vdelta N
Changes the vdelta value of the current selection.

Argument | Description | Values
--- | --- | ---
N | vdelta value |

Note that unlike all other editing functions, this function doesn't affect a cube, but its top-left vertex (market by the dot in the editing cursor). So to edit a N * M heightfield, you will likely have to edit the vdelta of (N+1) * (M+1) cubes, i.e. you have to select 1 row and 1 column more in the opposite direction of the red dot to affect all the vertices of a heightfield of a given size (try it, it makes sense :).
A floor delta offsets vertices to beneath the level set by editheight (and a ceil delta to above). Delta offsets have a precision of a quarter of a unit, however you should use non-unitsize vertices only to touch other such vertices.
This only works if the cube is a heightfield.
default keys:
8 - manipulates downwards the corner of the current selection
9 - manipulates upwards the corner of the current selection
See also: heightfield
waterlevel H
Sets the global water level for the map.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
H | the water level | float, -10000="no water" | -128..127 | -10000

Every cube that has a lower floor than the water level will be rendered with a nice wavy water alpha texture. Water physics will be applied to any entity located below it.
Performance notes: water is rendered for a whole square encapsulating all visible water areas in the map (try flying above the map in edit mode to see how). So the most efficient water is a single body of water, or multiple water areas that are mostly not visible from each other. Players can influence how accurate the water is rendered using the "watersubdiv" command (map config).
See also: watersubdiv
worldiodebug B
Whether or not to output debugging information while loading/saving maps.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:debug output | 0..1 | 0

xmap_delete N
Deletes the named snapshot.

Argument | Description | Values
--- | --- | ---
N | nickname |

See also: xmap_list
xmap_delete_backup
Deletes the backup xmap.
See also: xmap_list
xmap_keep_backup N
Moves the backup xmap to a regular named spot.

Argument | Description | Values
--- | --- | ---
N | nickname |

See also: xmap_list
xmap_list
Lists all xmaps currently in memory.
See also: xmap_store, xmap_restore, xmap_delete, xmap_delete_backup, xmap_keep_backup, xmap_rename, getxmaplist, enumtodoentities
xmap_rename O N
Changes the nickname of the xmap.

Argument | Description | Values
--- | --- | ---
O | old nickname |
N | new nickname |

See also: xmap_list
xmap_restore N
Restores the xmap snapshot.

Argument | Description | Values
--- | --- | ---
N | nickname |

1. If nickname is not given, it restores the last automatic backup snapshot. Automatic snapshots are taken:
a) before a snapshot is restored,
b) before a new map is loaded (if there were unsaved edits on the map) and
c) when the game ends (if there were unsaved edits).
2. If nickname is given, the command restores the named snapshot, it also creates a backup snapshot of the current editing data.
See also: xmap_list, xmap_store
xmap_store N
Creates a snapshot and stores it under the given nickname.

Argument | Description | Values
--- | --- | ---
N | nickname |

Nicknames have to qualify as valid filenames.
See also: xmap_list, xmap_restore

### Editing configs

All the below commands are used specifically in map configuration files. Some of these commands can also be used without the need of a map configuration file.

fog N
Sets the fog distance.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | The fog distance | distance in cubes | 64..1024 | 180

You can do this for tweaking the visual effect of the fog, or if you are on a slow machine, setting the fog to a low value can also be a very effective way to increase fps (if you are geometry limited). Try out different values on big maps / maps which give you low fps. It is also good for aesthetic features of maps especially when combined with "fogcolour".
See also: fogcolour
fogcolour C
Sets the fog and clearing colour.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
C | The colour | Hexadecimal colour | 0..16777215 | 0x8099B3

See also: fog
getnotexture
Returns the current "notexture" path (set by loadnotexture).

Example: echo (getnotexture)

See also: loadnotexture
hexbinchunk C
Part of a map file

Argument | Description | Values
--- | --- | ---
C | chunk of mapdata | up to 24 bytes in hex

Internal – for XMAP – not intended for manual use
See also: restorexmap
loadnotexture F
Binds a texture to be used if a slot couldn't be loaded with a given textures path.

Argument | Description | Values
--- | --- | ---
F | file name of the texture to bind | string

Binds the texture indicated in the filename to the texture slot of any textures that aren't found. The path is given exactly as with the texture-command, if it is omitted (or can't be loaded) the default is used. The default is located in packages/misc/notexture.jpg (not in packages/textures - where custom ones must reside!)

Example: loadnotexture // Reset to default

Example: loadnotexture "makke/black.jpg" // Any missing texture will show up black

See also: texture, texturereset, getnotexture
loadsky P
Loads a skymap for a map.

Argument | Description | Values
--- | --- | ---
P | path to skymap textures | string

The available skymaps reside in packages/textures/skymaps/..
The skymap name in the argument is required to start with "textures/skymaps/", but that part of the path can be omitted, and it should be used only up to the underscore "_" in the filename.
You can get the current skymap name with the $loadsky variable.

Example: loadsky makke/mountain

Example: loadsky textures/skymaps/makke/mountain

mapmodel R H Z 0 N F
Registers a mapmodel that can be placed in maps.

Argument | Description | Values
--- | --- | ---
R | The square radius of the bounding box. | integer
H | The height of the bounding box. | integer
Z | The initial height offset from the ground. | integer
0 | This integer is redundant. Leave it at zero so you don't break the command. | 0
N | The name of the map model | string
F | If '1', the model is preloaded, even if no entities use it (optional) | 1

A mapmodel registered with this command can be placed in a map using the 'newent mapmodel' command. The bounding box is an invisible force surrounding the model, allowing players to collide against it, instead of walking through the mapmodel. For more information about this command, read mapediting5.xml.
Example: mapmodel 4 2 4 0 "modelname"
This mapmodel has a bounding box of 8x8x2 in size (X/Y/Z) and by default hovers 4 units above ground.
It also returns the number of the created slot, example: echo (mapmodel ...)
See also: newent mapmodel, mapmodelreset, loadallmapmodels, mapmodelslotname, mapmodelslotbyname, mapmodelslotusage, editmapmodelslot, deletemapmodelslot, sortmapmodelslots, mapmodelchanged, listallmapmodelattributes, getmapmodelattributes
mapmodelreset
Resets the mapmodel slots/indices to 0 for the subsequent "mapmodel" commands.
Each subsequent mapmodel command increases it again. See config/default_map_settings.cfg for an example.
See also: mapmodel, newent mapmodel
mapsound P M
Defines a mapsound.

Argument | Description | Values
--- | --- | ---
P | Path to the sound file |
M | Maximum simultaneous sounds/maxuses (optional) | default -1 (unlimited)

Registers the sound as a map-specific sound. These map-specific sounds may currently only be used with "sound" entities within a map. The first map sound registered in a map has slot/index number 0 and increases afterwards.
It also returns the number of the created slot, example: echo (mapsound ...)
See also: newent sound, mapsoundreset, getmapsoundlist, getmapsoundorigin, mapsoundslotbyname, mapsoundslotusage, editmapsoundslot, deletemapsoundslot, sortmapsoundslots, mapsoundchanged
mapsoundreset
Resets the mapsound slots/indices to 0 for the subsequent "mapsound" commands.
Each subsequent mapsound command increases it again. See config/default_map_settings.cfg for an example.
See also: newent sound, mapsound
md2anim A F R S

Argument | Description | Values
--- | --- | ---
A | anim |
F | frame |
R | range |
S | speed |

md2emit T Y A B

Argument | Description | Values
--- | --- | ---
T | tag name |
Y | particle type (integer or name) | SPARK (0), SMOKE (1), ECLOSEST (2), BLOOD (3), DEMOTRACK (4), FIREBALL (5), SHOTLINE (6), BULLETHOLE (7), BLOODSTAIN (8), SCORCH (9), HUDMUZZLEFLASH (10), MUZZLEFLASH (11), ELIGHT (12), ESPAWN (13), EAMMO (14), EPICKUP (15), EMODEL (16), ECARROT (17), ELADDER (18), EFLAG (19)
A | attribute 1 |
B | attribute 2 |

md2tag N A B C D

Argument | Description | Values
--- | --- | ---
N | name |
A | vert1 |
B | vert2 |
C | vert3 |
D | vert4 |

md3anim A S R V

Argument | Description | Values
--- | --- | ---
A | anim |
S | startframe |
R | range |
V | speed |

md3emit T Y A B

Argument | Description | Values
--- | --- | ---
T | tag name |
Y | particle type (integer or name) | SPARK (0), SMOKE (1), ECLOSEST (2), BLOOD (3), DEMOTRACK (4), FIREBALL (5), SHOTLINE (6), BULLETHOLE (7), BLOODSTAIN (8), SCORCH (9), HUDMUZZLEFLASH (10), MUZZLEFLASH (11), ELIGHT (12), ESPAWN (13), EAMMO (14), EPICKUP (15), EMODEL (16), ECARROT (17), ELADDER (18), EFLAG (19)
A | attribute 1 |
B | attribute 2 |

md3link P C T

Argument | Description | Values
--- | --- | ---
P | parentno |
C | childno |
T | tag name |

md3load M

Argument | Description | Values
--- | --- | ---
M | model |

md3skin N S

Argument | Description | Values
--- | --- | ---
N | object name |
S | skin texture |

mdlalphablend A

Argument | Description | Values
--- | --- | ---
A | alphablend |

mdlalphatest A

Argument | Description | Values
--- | --- | ---
A | alphatest |

mdlattribute A V
Adds a value for a specified attribute to the model.

Argument | Description | Values
--- | --- | ---
A | attribute | keywords, desc, defaults, usage, author, license, distribution, version, requires
V | value |

If used, specifies that the current model depends on parts of another custom model (which therefore also has to be downloaded) can only be used once per model config.
Example: 'mdlattribute' requires 'makke/signs/exit' could be used in 'signs/loading-dock/md2.cfg' to reuse 'makke/signs/exit/tris.md2' .
See also: getmapmodelattributes, listallmapmodelattributes, mapmodelregister
mdlcachelimit L

Argument | Description | Values
--- | --- | ---
L | cachelimit |

mdlcullface C

Argument | Description | Values
--- | --- | ---
C | cullface | 0 or 1

mdlscale P

Argument | Description | Values
--- | --- | ---
P | percent | 0..100..N*100

mdlshadowdist D

Argument | Description | Values
--- | --- | ---
D | shadow distance |

mdltrans X Y Z
Translates (= moves) the model.

Argument | Description | Values
--- | --- | ---
X |  |
Y |  |
Z |  |

mdltranslucent T

Argument | Description | Values
--- | --- | ---
T | translucency | 0..100..N*100

mdlvertexlight V

Argument | Description | Values
--- | --- | ---
V | vertexligh | 0 or 1

persistentxmaps B
Whether or not to save all xmaps on exist and restore them at game start.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B | boolean | 1:persistent | 0..1 | 1

XMAP allows for visual comparison between maps.
TODO: elaborate
See also: xmap_list
restorexmap *
Declaration of map parts.

Argument | Description | Values
--- | --- | ---
* | many combinations | read the source

Internal – for XMAP – not intended for manual use
See also: hexbinchunk
texture S F
Binds a texture to the current texture slot.

Argument | Description | Values
--- | --- | ---
S | Scale of the texture to load (should be a power of two). | Float
F | File name of the texture to bind | string

Binds the texture indicated in the filename to the current texture slot and increments the slot number.
The texture is rendered at the given scale. At scale 1.0 (or if scale is 0), 32x32 texels cover one cube. At scale 2.0, which is the current maximum, it's 64x64.
It also returns the number of the created slot, example: echo (texture ...)
See also: loadnotexture, texturereset, hirestextures, gettexturelist, gettextureorigin, textureslotusage, textureslotusagelist, textureslotbyname, deletetextureslot, edittextureslot, edittexturestack, sorttextureslots
texturereset
Sets the texture slots/indicies to 0 for the subsequent "texture" commands.
Each subsequent texture command increases it again. See config/default_map_settings.cfg for an example.
See also: texture
watercolour R G B A
Determines the water colour in a map.

Argument | Description | Values
--- | --- | ---
R | red colour intensity | 1..255
G | green colour intensity | 1..255
B | blue colour intensity | 1..255
A | alpha value (transparency) | 0..255 (default 178)

You must define at least 3 first values, otherwise this command may not work correctly (use "1" as a placeholder if needed).
See also: getwatercolour, setwatercolour, waterlevel

### Menus

This section describes identifiers related to the menu gui.

browsefiledesc B
Toggles getting descriptive text from CGZ or DMO files in menudirlist.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
B |  |  | 0..1 | 1

See also: menudirlist
chmenutexture N P T
Displays a texture on the right side of a menu.

Argument | Description | Values
--- | --- | ---
N | the name of the menu |
P | the path to the texture |
T | the title of the picture |

By specifying a title string in the third argument to chmenutexture, a picture is rendered instead of a texture. The title string is displayed instead of the texture resolution. The variable "menupicturesize" holds a size modifier for pictures, similar to "menutexturesize".
See also: menutexturesize, menupicturesize
closecurmenu
Closes the currently open menu.
If more than one menu is open, only closes the topmost menu on the stack.
See also: curmenu, refreshcurmenu, refreshcurmenudelayed
closemenu N
Closes the specified menu if it is open.

Argument | Description | Values
--- | --- | ---
N | the name of a previously defined menu |

If it is open multiple times in the stack only the topmost instance will be closed!
See also: newmenu, showmenu, delmenu, closecurmenu
curmenu
Returns the name of the currently open menu.
If more than one menu is open, only the name of the topmost menu on the stack is returned.
See also: closecurmenu, refreshcurmenu, refreshcurmenudelayed
delmenu N
Deletes the entire contents (all menu items) of the given menu.

Argument | Description | Values
--- | --- | ---
N | the name of a previously defined menu |

See also: newmenu, showmenu, closemenu
hidebigmenuimages N
Hide big images in menus.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0: show, 1: hide |  | 0..1 | 0

menucanblink T
Toggles the ability for menutext to have the blinking bit set.

Argument | Description | Values
--- | --- | ---
T | 0 = Off, any other integer = On | Any integer is valid, positive or negative

The global setting of 'allowblinkingtext' overrides this.
See also: allowblinkingtext
menudirlist P E A I S
Creates a menu listing of files from a path and perform an action on them when clicked.

Argument | Description | Values
--- | --- | ---
P | the directory path from the assaultcube root |
E | file extension |
A | action |
I | show image from a file | 0 or 1
S | string - search it in map/demo filenames and descriptions and show only matched files (case insensitive) |

Use this inside menu definitions, almost always as the only command of that menu.
Compare the usage inside config/menus.cfg

Example: menudirlist "packages/maps" "cgz" "map $arg1"will create a list of maps and load them when clicked

See also: newmenu, menudirlistsub, browsefiledesc
menudirlistsub A D
Adds subdirectory entries to a menu with a files list.

Argument | Description | Values
--- | --- | ---
A | action, executed, when the menu entry is chosen |
D | if it is 1, an entry '..' is added (parent directory) (optional) |

It has to come after the menudirlist command.
See also: menudirlist
menufont N F
Sets the font for a specific menu.

Argument | Description | Values
--- | --- | ---
N | menu name |
F | font | default, mono, serif

If menu is "", the currently initialised menu is used.

Example: menufont score monosets the font on the scoreboard

See also: font
menuheader H F
Adds header and/or footer to the menu.

Argument | Description | Values
--- | --- | ---
H | header |
F | footer |

menuinit C
Specifies commands to be executed when a menu opens.

Argument | Description | Values
--- | --- | ---
C | the code to execute on init |

This command should be placed after newmenu.
See also: newmenu
menuinitselection A
Defines the initial selection for a menu.

Argument | Description | Values
--- | --- | ---
A | line number |

menuitem T A H D
Creates a new menuitem.

Argument | Description | Values
--- | --- | ---
T | the text content in menu line |
A | the command to execute on selection of the menuitem (optional) |
H | the command to execute upon rolling over the menuitem (optional) |
D | the description of menu item, which is displayed on the menu footer (optional) |

Upon activating the menuitem, the associated command will be executed (See config/menus.cfg for examples). If the command argument is omitted, then it will be set to the same value as the description. If -1 is specified instead of the command to execute, then no command is executed when activating the item. If the rollover option is used, the menuitem will execute that command when selecting (but not activating) the menuitem.
'\n' in menuitem synchronizes further text with slider width (tab-like function).
(Note: to activate the menu item, select it, and either: Click, press SPACE or press ENTER/Return).
See also: newmenu, getigraph
menuitemaltfont N T A H D
Displays a menu line with a text which may contain chars from an alternate font.

Argument | Description | Values
--- | --- | ---
N | the name of the alternate font | default, mono, serif, huddigits, serverquality, bargraphs, radaricons
T | text content in menu line |
A | action (optional) |
H | hoveraction (optional) |
D | description displayed on menu footer (optional) |

Chars from the alternate font have to be marked with "\a". Alternate font chars have no width and are just rendered above the following text. Use spaces to counter that.
See also: font
menuitemcheckbox T V A P
Creates a checkbox menu item.

Argument | Description | Values
--- | --- | ---
T | text |
V | value |
A | action |
P | position (optional) | 0..100

Optional fourth parameter "position" in the range from 0 o 100, default 0, which moves the position of the checkbox over the width of a text input or slider, with 100 being left and 0 being right.
menuitemeditkeyinput T B
Menuitem which displays "text" and all keys, that bind "bindcmd" - in edit mode.

Argument | Description | Values
--- | --- | ---
T | text |
B | bind command |

See also: menuitemkeyinput, menuitemspectkeyinput
menuitemgreyedout V
Menu items added after this command are greyed out (1) or not (0).

Argument | Description | Values
--- | --- | ---
V | value | 0: off 1: on

Greyed out menu items are grey and can't be operated.
menuitemimage N T A H

Argument | Description | Values
--- | --- | ---
N | image filename |
T | text |
A | action |
H | hoveraction |

menuitemkeyinput T B
Menuitem which displays "text" and all keys, that bind "bindcmd" - in game mode.

Argument | Description | Values
--- | --- | ---
T | text |
B | bind command |

See also: menuitemeditkeyinput, menuitemspectkeyinput
menuitemmapload M A H D
Menuitem that loads a map, displays the title and the preview or a default image.

Argument | Description | Values
--- | --- | ---
M | map |
A | action (optional) |
H | hoveraction (optional) |
D | description displayed on menu footer (optional) |

See also: screenshotpreview
menuitemradio T L U V D A

Argument | Description | Values
--- | --- | ---
T | text | menu item text
L | min | min value
U | max | max value (or optionally -1 and set by display string length)
V | value | initial value
D | display | list of value descriptions or value step size
A | action | executed on value changes (new value in arg1)

menuitemslider T L U V D A W

Argument | Description | Values
--- | --- | ---
T | text | menu item text
L | min | min value
U | max | max value (or optionally -1 and set by display string length)
V | value | initial value
D | display | list of value descriptions or value step size
A | action | executed on value changes (new value in arg1)
W | wrap | if 1, wrap slider around

menuitemspectkeyinput T B
Menuitem which displays "text" and all keys, that bind "bindcmd" - in spectate mode.

Argument | Description | Values
--- | --- | ---
T | text |
B | bind command |

See also: menuitemkeyinput, menuitemeditkeyinput
menuitemtextinput T V A H M
Creates a new menuitem with text input field.

Argument | Description | Values
--- | --- | ---
T | text |
V | value |
A | action |
H | hoveraction |
M | maxchars |

If the last line of a menu is a text input item, pressing enter in that line will not only execute the assigned command, but also close the menu.
menumdl N M A R S
Specifies a model to render while displaying the specified menu.

Argument | Description | Values
--- | --- | ---
N | the name of the menu |
M | the model |
A | the animation to play |
R | the rotation speed |
S | the scale |

If menu is "", the currently initialised menu is used.
It specifies, which model to render and how. If only menu is specified, no model is rendered.
menupicturesize N
Changes the size of pictures displayed in menus.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | size factor |  | 0.1f..5.0f | 1.6f

See also: chmenutexture, menutexturesize
menurenderoffset X Y
Moves a menu away from the middle of the screen.

Argument | Description | Values
--- | --- | ---
X | x-offset |
Y | y-offset |

Values of "0" represent half the screen width and height.
menuselection A B
Selects a line in a menu.

Argument | Description | Values
--- | --- | ---
A | menu name |
B | line number |

menuselectionbgcolor R G B A
Defines the background color for the menu selection bar.

Argument | Description | Values
--- | --- | ---
R | red | 0..100
G | green | 0..100
B | blue | 0..100
A | alpha | 0..100

menuselectiondescbgcolor R G B A
Defines the background color for the description of selected active menu items (checkbox, slider, text input).

Argument | Description | Values
--- | --- | ---
R | red | 0..100
G | green | 0..100
B | blue | 0..100
A | alpha | 0..100

menuselectionpersistent
Enables persistent selections for the currently displayed menu.
When enabled, it restores a previously saved selection.
Probably most efficient inside "menuinit". The position is restored during execution of this command, so the menu entry has to already exist and the alias with the last position has to be read from saved.cfg. In automatically created menus it may be necessary to execute the command with a short delay.
menusynctabstops V
Synchronizes tabs in menus.

Argument | Description | Values
--- | --- | ---
V | value | 0: off (default), 1: on

If enabled (1), tab positions in a menu are synchronised. It affects menu title, header and items, but not footer or descriptions.
menutexturesize N
Changes the size of textures displayed in menus (mostly for testing purposes).

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | size factor |  | 0.1f..5.0f | 1.0f

See also: chmenutexture, menupicturesize
menutitle N
Make a different title show up than the menu's internal name.

Argument | Description | Values
--- | --- | ---
N | name | human friendly title

Intended to pretty up the menus with more readable titles than the sometimes short but technical values that make the scripting easier!
See also: newmenu, curmenu
newmenu N
Creates a new menu.

Argument | Description | Values
--- | --- | ---
N | the name of the menu |

All menu commands placed after newmenu (i.e. menuitem, menuitemcheckbox, etc.) are added into the menu until another "newmenu" command is specified.
See also: menuitem
refreshcurmenu
Refreshes (closes and opens again) the current menu.
See also: curmenu, refreshcurmenudelayed, closecurmenu
refreshcurmenudelayed
Refreshes (closes and opens again, after very short delay) the current menu.
See also: curmenu, refreshcurmenu, closecurmenu
screenshotpreview N
Creates a screenshot cropped to 4:3 with a given number of lines and jpeg quality 80.

Argument | Description | Values
--- | --- | ---
N | number of lines | 144..480, default 240 or last given value

Pressing CTRL+F12 during spectating creates a clean screenshot and saves it as map preview picture.
default key: Ctrl+F12 - creates map preview pictures during spectating
See also: menuitemmapload
showmenu N
Displays the specified menu.

Argument | Description | Values
--- | --- | ---
N | the name of a previously defined menu |

The menu allows the user to pick an item with the cursor keys. Upon pressing return, the associated action will be executed. Pressing ESC will cancel the menu.
See also: newmenu, closemenu, delmenu
wrapslider N
If wrapslider is set the menuitemslider will toggle to the min/max value if at end of the range.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | 0 off, 1 on |  | 0..1 | 0

### Ingame reference

This section describes all identifiers related to the ingame documentation reference.

docargument T D V I
Adds a new argument documentation to the last added identifier.

Argument | Description | Values
--- | --- | ---
T | the token |
D | the description |
V | the value notes |
I | flags this argument as variable-length (optional) | 1 (true), 0 (false)

An argument represents either a command argument or a variable value.
The last argument of an identifier can be flagged as variable-length to indicate that it represents an unknown number of arguments.
See also: docident
docexample C E
Adds an example to the last added identifier.

Argument | Description | Values
--- | --- | ---
C | the example code |
E | the explanation (optional) |

docfind P S
Searches for pattern in all ingame identifier documentations (reference) entries.

Argument | Description | Values
--- | --- | ---
P | the pattern |
S | silent? |

If "silent" is zero or omitted, all found references are listed.
A table of all found entries is returned as result. For each entry, the index of the doc entry string that contains the pattern is listed.
See also: docident, docundone, docinvalid, getdoc
docident N D
Adds a new identifier documentation to the last added section.

Argument | Description | Values
--- | --- | ---
N | name of the identifier |
D | the description |

An identifier represents a command or variable.
The name may contain spaces to create a "multipart" identifier documentation that can be used to describe a complex argument as a single pseudo identifier, look at the examples.

Example: docident fov "Sets the field of view."

Example: docident "newent light" "Adds a new light entity."

See also: docsection, docargument, docremark, docref, docundone, docinvalid, docfind, docwritebaseref, docvisible, docidentverbose
docidentverbose V
Enables identifier details or statement analyser.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | level of displaying the additional informations |  | 0..3 | 1

See also: docident, docvisible, docrefvisible
docinvalid
Outputs a list of identifier documentations that do not match any existing identifier.
Multipart identifiers are not included in this list, see 'docident'.
See also: docident, docundone, docfind
dockey A
Adds a new default key to an identifier.

Argument | Description | Values
--- | --- | ---
A |  | value

docref N I U
Adds a new documentation reference to an identifier.

Argument | Description | Values
--- | --- | ---
N | the display name |
I | the identifier to refer to (optional) |
U | the URL to refer to (optional) |

The new reference is added to the last added identifier documentation.
See also: docident
docrefvisible V
Render documentation references (docrefs) of the identifiers.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | 0: hide, 1: render |  | 0..1 | 1

See also: docref, docvisible, docidentverbose
docremark S
Adds a new documentation remark to the last added identifier.

Argument | Description | Values
--- | --- | ---
S | the remark |

See also: docident
docsection S
Adds a new section to the ingame documentation.

Argument | Description | Values
--- | --- | ---
S | the section name |

See also: docident
docskip V
Allows to scroll through the rendered identifier documentation.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | offset (number of lines) |  | 0..1000 | 0

docundone A
Outputs a list of yet undocumented identifiers (commands, variables, etc.).

Argument | Description | Values
--- | --- | ---
A | output all identifiers (optional) | 1 (true), 0 (false)

If the one argument is omitted, only the builtin identifiers will be listed. Therefore specify the argument other identifiers like aliases should be included too.
Note that the list also includes identifiers that contain the substrings "TODO" or "UNDONE" in their documentation.
See also: docident, docinvalid, docfind
docvisible V
Render identifier documentation for the typed command in the console.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | 0: hide, 1: render |  | 0..1 | 1

See also: docident, docidentverbose, docrefvisible
docwritebaseref R S T
Writes out a base XML documentation reference containing templates for the builtin identifiers.

Argument | Description | Values
--- | --- | ---
R | the reference name (optional) |
S | the XML schema location string (optional) |
T | XML stylesheet to use (optional) |

The generated reference is written to "docs/autogenerated_base_reference.xml" by default. The three arguments can be changed later on in the generated XML document.
See also: docident, docundone, docinvalid, docfind
docwritetodoref I
Writes out an XML documentation reference file containing undocumented identifiers or identifiers marked with "TODO".

Argument | Description | Values
--- | --- | ---
I | Also include aliases? (optional) | 0: don't include aliases (default), 1: include aliases

getdoc N I
Returns a string of the specified identifier documentation (reference) entry.

Argument | Description | Values
--- | --- | ---
N | name of the identifier |
I | the string index number of entry | 0: name, 1: description, 2: remarks

String index numbers match with the result of "docfind".
See also: docident, docfind

### Bot mode

This section describes bot mode related identifiers. See also "docs/cube_bot-readme.txt".

addbot T S N
Adds a bot for a given team with a given skill calling him a given name.

Argument | Description | Values
--- | --- | ---
T | team | RVSF or CLA
S | skill | best, good, medium, worse, bad
N | name | name for the bot

This command only works for single player modes.

Example: addbot RVSF medium RobbieWill add a bot named Robbie with a medium skill level to the RVSF team.

addnbot C T S
Adds a given count of bots for the given team with the given skill and select random names for them.

Argument | Description | Values
--- | --- | ---
C | count | how many bots to add
T | team | RVSF or CLA
S | skill | best, good, medium, worse, bad

This command only works for single player modes.
The name of the bots will be selected randomly.

Example: addnbot 2 CLA badWill add 2 bots with a bad skill level to the CLA team.

addpath1way1
addpath1way2
addpath2way1
addpath2way2
addwp A
Adds a bot waypoint at the current position.

Argument | Description | Values
--- | --- | ---
A | connect automatically | 0 or 1

autowp
Automatically places waypoints.
botskill N S
Changes the skill level for the given bot.

Argument | Description | Values
--- | --- | ---
N | botname | the name of the bot
S | botskill | best, good, medium, worse, bad

Example: botskill Robbie bestChanges the previous bot skill level of the bot named Robbie to a 'best' skill level.

botskillall S
Changes the skill level for all bots.

Argument | Description | Values
--- | --- | ---
S | botskill | best, good, medium, worse, bad

Example: botskillall worseChanges the previous bot skill level for all bots to a 'worse' skill level.

botsshoot T
Enables or disables the ability of the bots to fire their weapons.

Argument | Description | Values
--- | --- | ---
T | shooting bots? | 0 or 1

Example: botsshoot 0Bots won't shoot.

delpath1way1
delpath1way2
delpath2way1
delpath2way2
delwp
Deletes the selected waypoint.
idlebots T
Enables or disables the processing of the bots artificial intelligence.

Argument | Description | Values
--- | --- | ---
T | off OR on | 0 or 1

Example: idlebots 1Will make the bots stand still.

Example: idlebots 0Will enable the bots to move and shoot.

kickallbots
Kicks all bots out of the current game.
kickbot N
Kicks the bot with the given name out of the current game.

Argument | Description | Values
--- | --- | ---
N | botname | name of the bot to kick.

Example: kickbot RobbieWill make the bot named "Robbie" dissapear from the current game.

setjumpwp
See also: unsetjumpwp
setwptriggernr N
Assigns a number to the nearest waypoint.

Argument | Description | Values
--- | --- | ---
N | number |

This is only used for trigger waypoints, so that the bots go to triggers in the right order. If you don't do this bots will search for every trigger, even when they are not reachable yet.
setwpyaw
Takes the current player yaw for the current waypoint.
togglebotview N
When used you will see what the bot sees.

Argument | Description | Values
--- | --- | ---
N | botname | the name of the bot

Type it again (with or without name) to return to the game (you will respawn).
unsetjumpwp
See also: setjumpwp
wpclear
wpflood
wpinfo Y
Makes waypoints visible and either turns on or off the waypoint information display.

Argument | Description | Values
--- | --- | ---
Y | show info? | 0 or 1

wpload
wpsave
wpvisible V

Argument | Description | Values
--- | --- | ---
V | visible | 0 or 1

xhairwpsel V
Determines if bot waypoints should be selected/placed using the crosshair or by the nearest location to your player.

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
V | Note: This is turned on by default. |  | 0..1 | 1

### Optional

This section describes optional identifiers from the files in config/opt/ folder and commands, which enable them.

-- A
Decrements an alias by 1.

Argument | Description | Values
--- | --- | ---
A | the alias name |

Example: i = 0; -- i; echo $iOutput: -1

See also: ++, --f, ++f
--f A
Decrements an alias by floating-point 1.

Argument | Description | Values
--- | --- | ---
A | the alias name |

Example: i = 4.14; --f i; echo $iOutput: 3.14

See also: ++f, --, ++
++ A
Increments an alias by 1.

Argument | Description | Values
--- | --- | ---
A | the alias name |

Example: i = 0; ++ i; echo $iOutput: 1

See also: --, ++f, --f
++f A
Increments an alias by floating-point 1.

Argument | Description | Values
--- | --- | ---
A | the alias name |

Example: i = 2.14; ++f i; echo $iOutput: 3.14

See also: --f, ++, --
alive
Returns 1 if the local player is alive.

Example: echo (alive)Output: 1

See also: load_compatibility
breakparse
Breaks out of a parsestring loop.
Important: this command should only be used within the 3rd argument (the cubescript to execute) of parsestring.
See also: load_parsestring, parsestring
changegamma G M
Smoothly changes your gamma to the specified value.

Argument | Description | Values
--- | --- | ---
G | the gamma to change to |
M | milliseconds between gamma changes |

Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu.

Example: changegamma 300 30Every 30 milliseconds your gamma is changed by 1 until it reaches its goal of gamma 300.

See also: load_survival, gamma, changespeed
changespeed S M
Smoothly changes your gamespeed to the specified value.

Argument | Description | Values
--- | --- | ---
S | the gamespeed to change to |
M | milliseconds between gamespeed changes |

Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu.

Example: changespeed 1000 30Every 30 milliseconds your gamespeed is changed by 1 until it reaches its goal of gamespeed 1000.

See also: load_survival, gamespeed, changegamma
curmode
Returns the mode number for the current game.
See also: load_compatibility, gamemode, curmap, map, mode
currole
Returns 1 if the local player has admin privileges, 0 otherwise.
See also: load_compatibility, setadmin, connectadmin
curteam C
Returns an integer indicating what team a client is currently on.

Argument | Description | Values
--- | --- | ---
C | client number (optional) | returns the specified client's team instead

Returns 0 for CLA, 1 for RVSF.
Returns 2 for CLA-spectator, 3 for RVSF-spectator.
Returns 4 for spectator.
By default this command returns what team *you* (player1) are currently on.
See also: load_compatibility, team, forceteam, skin
findpn CN
Finds player name with this client number.

Argument | Description | Values
--- | --- | ---
CN | client number |

See also: load_compatibility
getclientmode
Returns the current game mode number.
See also: load_compatibility
load_autosave
Loads optional obsolete autosave settings.
To see the obsolete autosave settings, look at config/opt/autosave.cfg file.
load_compatibility
Loads optional compatibility settings for old scripts.
To see the compatibility settings, look at config/opt/compatibility.cfg file.
load_convmap
Loads batch map conversion tools.
To see the map conversion tools, look at config/opt/convmap.cfg file.
load_faq
Loads optional FAQ settings.
To see the FAQ settings, look at config/opt/faq.cfg file.
The settings are loaded, when FAQ is open in menu.
load_mapeditscripts
Loads extra map editing scripts.
To see the map editing scripts, look at config/opt/mapeditscripts.cfg file.
load_parsestring
Loads optional settings for string parsing.
To see the string parsing settings, look at config/opt/parsestring.cfg file.
load_survival
Loads optional settings for bot survival mode.
To see the settings for survival, look at config/opt/survival.cfg file.
The settings are loaded, when bot survival mode is started via menu.
orderscorecolumns N
Show the client number column on the scoreboard first?

Token | Description | Values | Range | Default
--- | --- | --- | --- | ---
N | CN column order | 0 (false), 1 (true) | 0..1 | 0

See also: load_compatibility
parsestring S A C B
Loops through every character in the given string and executes the given block of cubescript on each iteration.

Argument | Description | Values
--- | --- | ---
S | string | string to parse
A | string | name of alias to use as iterator
C | string | cubescript to execute on each iteration
B | integer (optional) | non-zero to force backwards parse

Important: A secondary iterator alias (prefixed with a double underscore "__") is automatically created before each iteration that contains the character position data.

Example: parsestring "Hello world" iter [echo $iter]Uses echo on every character in the string: "Hello world"

Example: parsestring "Hello world" iter [echo (concatword "Char #" $__iter ": " $iter)]Uses echo on every character in the string: "Hello world" --- Also outputs the position of each character in the string.

Example: backwardsstring = []; parsestring "This will look interesting backwards." iter [backwardsstring = (concatword $backwardsstring $iter); if (= $__iter 0) [echo $backwardsstring]] 1Outputs: ".sdrawkcab gnitseretni kool lliw sihT"

Example: parsestring "abcdefghijklmnopqrstuvwxyz" iter [if (> $__iter 4) breakparse [echo $iter]]Example usage of the breakparse command. Uses echo on characters a through e, then breaks out of the parse.

See also: load_parsestring, breakparse, substr, trimAllWhitespace, trimAllUnnecessaryWhitespace
pstat_score CN
Returns the score statistics for the player with the given client number.

Argument | Description | Values
--- | --- | ---
CN | client number | 0..N

Example: echo (pstat_score 0) Output: 0 5 3 43 1 1 unarmedThe output is a list of FLAGS, FRAGS, DEATHS, POINTS, TEAM, TEAMKILLS, and NAME.

See also: load_compatibility, start_intermission, pstat_weap
setedithide L
Hides the list of entity types you set.

Argument | Description | Values
--- | --- | ---
L | list of entity types to hide | light, playerstart, pistol, ammobox, grenades, health, helmet, armour, akimbo, mapmodel, ladder, ctf-flag, sound, clip, plclip

Call "setedithide [lights mapmodels]" to just hide all lights and mapmodels.
Only shown entity types are potential 'closest entity'.
"setedithide" without any arguments restores visibility of all entities.
See also: seteditshow, showedithide
seteditshow T
Hides all but the single entity type you give.

Argument | Description | Values
--- | --- | ---
T | the entity type to show exclusively | light, playerstart, pistol, ammobox, grenades, health, helmet, armour, akimbo, mapmodel, ladder, ctf-flag, sound, clip, plclip

Just run "seteditshow mapmodel" and see just the mapmodel entities.
The other entity types are ignored as closestentity too.
"seteditshow" without any argument hides all entities.
See also: setedithide, showedithide
showedithide
Shows the settings for hidden entities (sparklies).
See also: setedithide, seteditshow
survival M D
Prepares a round of bot survival mode on the specified map.

Argument | Description | Values
--- | --- | ---
M | the map to use |
D | the difficulty (optional) | 0 = easy, 1 = intermediate, 2 = hard, 3 = impossible

All official maps are compatible with survival, if you want to play survival on a custom map, prior edits/additions to the script are necessary, such as adding a zone for that specific map.
See also: load_survival
trimAllUnnecessaryWhitespace S
Removes all unnecessary leading and trailing whitespace characters from the given string.

Argument | Description | Values
--- | --- | ---
S | string | string to modify

Example: echo (trimAllUnnecessaryWhitespace " H e ll o w o r l d ")Outputs: "H e ll o w o r l d"

See also: load_parsestring, trimAllWhitespace, parsestring
trimAllWhitespace S
Removes all whitespace characters from the given string.

Argument | Description | Values
--- | --- | ---
S | string | string to modify

Example: echo (trimAllWhitespace " H e ll o w o r l d ")Outputs: Helloworld

See also: load_parsestring, trimAllUnnecessaryWhitespace, parsestring

### TODO

This section describes identifiers that are not documented yet, but you may try to help us there.

CubeScript command & variable list
CubeScript

- -
- -=
- -=f
- -f
- !
- !=
- !=f
- !b
- *
- *=
- *=f
- *f
- \f
- &&
- &b
- ^b
- +
- +=
- +=f
- +f
- <
- <=
- <=f
- <f
- =
- =f
- >
- >=
- >=f
- >f
- ||
- |b
- add2alias
- add2list
- addpunct
- alias
- aliasinit
- at
- break
- ceil
- check2init
- check2initlist
- checkalias
- checkinit
- concat
- concatword
- const
- continue
- delalias
- div
- div=
- div=f
- divf
- editalias
- editsvar
- enumalias
- escape
- execute
- findlist
- floor
- forceinit
- format
- format2
- getalias
- getvarrange
- h0
- if
- inputcommand
- isconst
- isIdent
- isolatecontext
- l0
- listaverage
- listlen
- listoptions
- loop
- looplist
- looplisti
- mod
- modf
- numargs
- persistidents
- pop
- powf
- push
- resetsleeps
- result
- rnd
- round
- scriptcontext
- sealcontexts
- sleep
- sortlist
- storesets
- strcmp
- strlen
- strreplace
- strstr
- substr
- switch
- tempalias
- testchar
- tolower
- toupper
- while

General

- addpckserver
- addzipmod
- afterinit
- allowhudechos
- applydialog
- autodownload
- autodownloaddebug
- autoexec
- autogetmap
- autogetnewmaprevisions
- autoscreenshot
- cleanshot
- clockerror
- clockfix
- complete
- conline
- connected
- conopen
- conskip
- current_version
- datestring
- dbgzip
- debugargs
- debugevents
- demonameformat
- demotimeformat
- disconnectonmaperror
- echo
- enumfiles
- exec
- execdir
- getEngineState
- getpckserver
- getscrext
- groupvariables
- history
- hudecho
- jpegquality
- lang
- listcomplete
- mapshot
- maxcon
- maxhistory
- millis
- networkdebug
- numconlines
- omitunchangeddefaultbinds
- omitunchangeddefaults
- physinterp
- pngcompress
- protocol
- quit
- resetcfg
- resetpckservers
- resetsecuremaps
- run
- saycommand
- screenshot
- screenshotscale
- screenshottype
- securemap
- setclipboardtext
- systime
- throttle_accel
- throttle_decel
- throttle_interval
- timestamp
- timestring
- version
- writecfg
- zipcachemaxsize
- zipmodclear
- zipmodgetdesc
- zipmodgetfiles
- zipmodgetrevision
- zipmodlist
- zipmodremove

Gameplay

- akimboautoswitch
- akimboendaction
- attack
- autoreload
- backward
- benchme
- burstshots
- changefollowplayer
- changeteam
- checkmag
- clearignored
- clearmuted
- connect
- connectadmin
- crouch
- curautoteam
- curdemofile
- curmap
- curmaprevision
- curmastermode
- curname
- curpausemode
- curplayers
- currentprimary
- curserver
- curweapon
- demo
- disconnect
- dlmap
- drawzone
- dropflag
- findcn
- flyspeed
- forward
- fragmessage
- gamespeed
- gametimecurrent
- gametimemaximum
- gametimestart
- getdemo
- getmap
- getmod
- gibmessage
- gndtoggle
- gonext
- grenades
- hasprimary
- highestcn
- ignore
- ignoreall
- ignoreenemy
- ignoreteam
- isclient
- jump
- knftoggle
- lanconnect
- lastgametimeupdate
- lastpm
- left
- listdemos
- listignored
- listmuted
- loadcrosshair
- loadmap
- magcontent
- magreserve
- map
- mapstartalways
- mapstartonce
- me
- melee
- minutesremaining
- modconnect
- modconnectadmin
- modlanconnect
- muteplayer
- name
- nextprimary
- nickcomplete
- onAttack
- onCallVote
- onChangeVote
- onConnect
- onDisconnect
- onFlag
- onHit
- onKill
- onLastMin
- onNameChange
- onPickup
- onPM
- onReload
- onSpawn
- onVoteEnd
- onWeaponSwitch
- pause
- paused
- player
- player1
- pm
- prevweapon
- primary
- pstat_weap
- quickanswer
- quicknadethrow
- reconnect
- reload
- resetzones
- rewind
- right
- say
- scopefov
- secondary
- setfollowplayer
- setmr
- setnext
- setscope
- shiftweapon
- sndtoggle
- spectate
- spectatecn
- spectatemode
- spectatepersistent
- start_intermission
- stopdemo
- suicide
- team
- teaminfo
- togglespect
- unignoreall
- voicecom
- voicecomsounds
- vote
- votemap
- votepending
- watchingdemo
- weapon
- whereami
- whois
- winners

Game modes

- bdm
- blss
- bosok
- bpf
- btdm
- btosok
- btsurv
- coop
- ctf
- curmodeattr
- dm
- gamemode
- gamemodedesc
- getmode
- htf
- ktf
- lms
- lss
- mode
- modeacronyms
- modenum
- osok
- pf
- showmodedescriptions
- surv
- tdm
- tktf
- tlss
- tosok
- tpf
- tsurv
- vip

Keyboard and mouse

- _defaultbinds
- _resetallbinds
- add2bind
- autoscopesens
- bind
- editbind
- findkey
- findkeycode
- invmouse
- keybind
- keyeditbind
- keymap
- KEYPRESS
- KEYRELEASE
- keyspecbind
- megabind
- mfilter
- modkeypressed
- modkeypressed
- mouseaccel
- onrelease
- relativemouse
- resetbinds
- scopesens
- scopesensscale
- sdl_xgrab_bug
- searchbinds
- searcheditbinds
- searchspecbinds
- sensitivity
- sensitivityscale
- specbind
- togglegrab

Visuals

- aadynshadow
- aboveheadiconfadetime
- aboveheadiconsize
- allowblinkingtext
- animationinterpolationtime
- aniso
- ati_mda_bug
- bilinear
- blood
- bloodttl
- bullethole
- bulletholettl
- curfont
- depthbits
- depthoffset
- desktoph
- desktopw
- dynlight
- dynshadow
- dynshadowdecay
- dynshadowquad
- dynshadowsize
- font
- fontchar
- fontskip
- fov
- fpsrange
- fsaa
- fullscreen
- fullscreendesktop
- fullscreentoggle
- gamma
- getdisplayresolutions
- getigraph
- gib
- gibnum
- gibsgore
- gibspeed
- gibttl
- glext
- hidecustomskins
- hideigraphs
- hirestextures
- hwmaxaniso
- hwtexsize
- ignoreoverride_limitwaveheight
- ignoreoverride_nostencilshadows
- ignoreoverride_nowaterreflect
- igraphanimate
- igraphdefaultframetime
- igraphsize
- igraphsizehardcoded
- lighterror
- lightscale
- mapoverride_limitwaveheight
- mapoverride_nostencilshadows
- mapoverride_nowaterreflect
- maxfps
- maxroll
- maxrolleffect
- maxrollremote
- maxtexsize
- maxtmus
- maxtrail
- mdldlist
- mdldyncache
- mdlstatcache
- mergestrips
- minlod
- mtexplosion
- mtwater
- nosway
- particlesize
- polygonoffsetfactor
- polygonoffsetunits
- popdeadplayers
- reflectclip
- reflectscissor
- reflectsize
- resetgl
- righthanded
- saveshadows
- scorch
- scorchttl
- scr_h
- scr_w
- screenh
- screenres
- screenw
- setfont
- setgamma
- shadowcasters
- shadowclip
- shadowtile
- shotline
- shotlinettl
- skin
- skin_cla
- skin_rvsf
- skyclip
- smoothdist
- smoothmove
- spectfov
- spectfovremote
- stencilbits
- stencilshadow
- swaymovediv
- swayspeeddiv
- swayupmovediv
- swayupspeeddiv
- teamdisplaymode
- texreduce
- trilinear
- tsswap
- updateigraphs
- vsync
- waterreflect
- waterrefract
- watersubdiv
- waveheight

Heads-Up Display

- accuracy
- accuracyinfo
- accuracyreset
- altconsize
- blankouthud
- clearminimap
- cncolumncolor
- conalpha
- confade
- consize
- crosshairfx
- crosshairsize
- crosshairteamsign
- damageindicatoralpha
- damageindicatordist
- damageindicatorsize
- damageindicatortime
- damagescreen
- damagescreenalpha
- damagescreenfactor
- damagescreenfade
- dbgpos
- flagscorehudtransparency
- fullconsize
- gametimedisplay
- hidecompass
- hideconsole
- hidedamageindicator
- hidehudequipment
- hidehudmsgs
- hidektfindicator
- hideradar
- hidespecthud
- hideteam
- hideteamscorehud
- hidevote
- hudgun
- ktfindicatoralpha
- minimapres
- oldfashionedgunstats
- overviewflags
- radarentsize
- radarheight
- sc_clientnum
- sc_deaths
- sc_flags
- sc_frags
- sc_lag
- sc_name
- sc_ratio
- sc_score
- showmap
- showmapbackdrop
- showmapbackdroptransparency
- showscores
- showscoresondeath
- showspeed
- showstats
- showtargetname
- specthudgun
- toggleconsole
- votealpha
- wallclockformat

Sound

- al_referencedistance
- al_rollofffactor
- audio
- audiodebug
- bulletairsound
- bulletairsounddestrad
- bulletairsoundrad
- bulletairsoundsourcerad
- bulletbouncesound
- bulletbouncesoundrad
- enumsounds
- footsteps
- gainscale
- heartbeat
- hitsound
- localfootsteps
- mapsoundrefresh
- maxsoundsatonce
- music
- musicpreload
- musicvol
- mutesound
- registermusic
- registersound
- sound
- soundchannels
- soundmuted
- soundscheddistancescore
- soundschedoldbonus
- soundschedpriorityscore
- soundschedreserve
- soundtest
- soundvol
- unmuteallsounds

Serverbrowser

- addfavcategory
- addserver
- clearservers
- hidefavicons
- listfavcats
- mastertype
- masterupdatefrequency
- maxservpings
- searchlan
- searchnickname
- serverbrowserhidefavtag
- serverbrowserhideip
- serversort
- serversortdir
- serversortpreferofficial
- servpingrate
- showallplayersnumber
- showallservers
- showminremain
- shownamesinbrowser
- showonlyfavourites
- showonlygoodservers
- showweights
- updatefrommaster

Server commands

- autoteam
- ban
- callvote
- cleardemo
- cleardemos
- deleteservermap
- forceme
- forceteam
- getvita
- giveadmin
- kick
- mastermode
- removebans
- sendmap
- serverdebug
- serverdesc
- serverextension
- setadmin
- shuffleteams

Authentication

- authkey
- authmaxtime
- authmemusage
- authrounds
- authsetup
- cryptodebug
- listcerts
- mypubkey
- newcert

Editing

- _ignoreillegalpaths
- _nextentityispasted
- addentity
- addselection
- addtodoentity
- advancemaprevision
- ambient
- applymapsoundchanges
- arch
- archvertex
- automapconfig
- calcmipstats
- cleanedit
- clearents
- cleartodoentities
- clearvantagepoint
- closestenttype
- convertclips
- copy
- copyent
- corner
- countwalls
- delent
- deleteentity
- deletemapmodelslot
- deletemapsoundslot
- deletetextureslot
- editaxis
- editentity
- editheight
- edithideentmask
- editinfopanelmillis
- editing
- editing_sp
- editingsettingsvisibletime
- editmapmodelslot
- editmapmsg
- editmapsoundslot
- editmeta
- editmeta2
- editmeta2down
- editmetakeydown
- edittag
- edittagclip
- edittex
- edittextureslot
- edittexturestack
- edittoggle
- embedconfigfile
- enlargearchslopeselections
- enlargevdeltaselections
- entproperty
- entset
- entstats
- enumentities
- enumtodoentities
- equalize
- expandselection
- extractconfigfile
- flrceil
- fullbright
- fullbrightlevel
- getautomapconfig
- getclosestent
- getdeletedentities
- getentattr
- getenttype
- getmapmodelattributes
- getmapsoundlist
- getmapsoundorigin
- getmaptimestamp
- gettexturelist
- gettextureorigin
- getvantagepoint
- getwatercolour
- getxmaplist
- gonextplayerstart
- gotoentity
- gotoposition
- gotovantagepoint
- guidetoggle
- heightfield
- hideeditinfopanel
- hideeditslotinfo
- hudtexttl
- listallmapmodelattributes
- listheaderextras
- loadallmapmodels
- mapareacheck
- mapartist
- mapbackupsonsave
- mapenlarge
- mapinfo_comment
- mapinfo_license
- mapmodelchanged
- mapmodelregister
- mapmodelregistryclear
- mapmodelslotbyname
- mapmodelslotname
- mapmodelslotusage
- mapmodelzoff
- mapmrproper
- mapmsg
- mapshrink
- mapsize
- mapsoundchanged
- mapsoundslotbyname
- mapsoundslotusage
- modeinfo
- movemap
- newent
- newent akimbo
- newent ammobox
- newent armour
- newent clip
- newent ctf-flag
- newent grenades
- newent health
- newent helmet
- newent ladder
- newent light
- newent mapmodel
- newent pistol
- newent playerstart
- newent plclip
- newent sound
- newmap
- nextclosestent
- nextplayerstart
- oldselstyle
- onNewMap
- paste
- pasteent
- perlin
- pointatent
- pointatentmaxangle
- preserveundosonsave
- pushselections
- recalc
- redo
- replace
- rereadsoundlists
- rereadtexturelists
- resetselections
- savemap
- savemap9
- savemapoptimised
- scalelights
- select
- selectall
- selectionflip
- selectionrotate
- selectionwalk
- selx
- selxs
- sely
- selys
- settex
- setvantagepoint
- setwatercolour
- shadowyaw
- showclips
- showeditingsettings
- showfocuscubedetails
- showgrid
- showladderentities
- showmapdims
- showmapstats
- showmip
- showmodelclipping
- showplayerstarts
- showtagclipfocus
- showtagclips
- shrinkselection
- slope
- solid
- sortmapmodelslots
- sortmapsoundslots
- sorttextureslots
- stairs
- tagcliplinewidth
- taglife
- tagnum
- tagnumfull
- textureslotbyname
- textureslotusage
- textureslotusagelist
- togglecleanedit
- toggleclosestentpin
- toggleocull
- transformclipentities
- undelent
- undo
- undolevel
- undomegs
- unlistdeletedentity
- unsavededits
- updateeditinfopanel
- updatemapmodeldependencies
- vdelta
- waterlevel
- worldiodebug
- xmap_delete
- xmap_delete_backup
- xmap_keep_backup
- xmap_list
- xmap_rename
- xmap_restore
- xmap_store

Editing configs

- fog
- fogcolour
- getnotexture
- hexbinchunk
- loadnotexture
- loadsky
- mapmodel
- mapmodelreset
- mapsound
- mapsoundreset
- md2anim
- md2emit
- md2tag
- md3anim
- md3emit
- md3link
- md3load
- md3skin
- mdlalphablend
- mdlalphatest
- mdlattribute
- mdlcachelimit
- mdlcullface
- mdlscale
- mdlshadowdist
- mdltrans
- mdltranslucent
- mdlvertexlight
- persistentxmaps
- restorexmap
- texture
- texturereset
- watercolour

Menus

- browsefiledesc
- chmenutexture
- closecurmenu
- closemenu
- curmenu
- delmenu
- hidebigmenuimages
- menucanblink
- menudirlist
- menudirlistsub
- menufont
- menuheader
- menuinit
- menuinitselection
- menuitem
- menuitemaltfont
- menuitemcheckbox
- menuitemeditkeyinput
- menuitemgreyedout
- menuitemimage
- menuitemkeyinput
- menuitemmapload
- menuitemradio
- menuitemslider
- menuitemspectkeyinput
- menuitemtextinput
- menumdl
- menupicturesize
- menurenderoffset
- menuselection
- menuselectionbgcolor
- menuselectiondescbgcolor
- menuselectionpersistent
- menusynctabstops
- menutexturesize
- menutitle
- newmenu
- refreshcurmenu
- refreshcurmenudelayed
- screenshotpreview
- showmenu
- wrapslider

Ingame reference

- docargument
- docexample
- docfind
- docident
- docidentverbose
- docinvalid
- dockey
- docref
- docrefvisible
- docremark
- docsection
- docskip
- docundone
- docvisible
- docwritebaseref
- docwritetodoref
- getdoc

Bot mode

- addbot
- addnbot
- addpath1way1
- addpath1way2
- addpath2way1
- addpath2way2
- addwp
- autowp
- botskill
- botskillall
- botsshoot
- delpath1way1
- delpath1way2
- delpath2way1
- delpath2way2
- delwp
- idlebots
- kickallbots
- kickbot
- setjumpwp
- setwptriggernr
- setwpyaw
- togglebotview
- unsetjumpwp
- wpclear
- wpflood
- wpinfo
- wpload
- wpsave
- wpvisible
- xhairwpsel

Optional

- --
- --f
- ++
- ++f
- alive
- breakparse
- changegamma
- changespeed
- curmode
- currole
- curteam
- findpn
- getclientmode
- load_autosave
- load_compatibility
- load_convmap
- load_faq
- load_mapeditscripts
- load_parsestring
- load_survival
- orderscorecolumns
- parsestring
- pstat_score
- setedithide
- seteditshow
- showedithide
- survival
- trimAllUnnecessaryWhitespace
- trimAllWhitespace

TODO