CubeScript
This section describes identifiers that are closely related to the CubeScript language.
Performs a negation.
Argument | Description | Values |
---|
A | argument | |
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)
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)
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
Performs a multiplication.
Argument | Description | Values |
---|
A | the multiplicand | |
B | the multiplier | |
Return value: the product
Multiplies an alias by a value.
Argument | Description | Values |
---|
A | the alias to be multiplied | |
B | the multiplier | |
Multiplies an alias by a floating-point value.
Argument | Description | Values |
---|
A | the alias to be multiplied | |
B | the multiplier | |
Performs a floating point multiplication.
Argument | Description | Values |
---|
A | the multiplicand | |
B | the multiplier | |
Return value: the product
Performs an addition.
Argument | Description | Values |
---|
A | the first summand | |
B | the second summand | |
Return value: the sum
Increments an alias by 1.
Argument | Description | Values |
---|
A | the alias name | |
Example:
i = 0; ++ i; echo $iOutput: 1
Increments an alias by 1.
Argument | Description | Values |
---|
A | the alias name | |
Example:
i = 2.14; ++f i; echo $iOutput: 3.14
Adds a value to an alias.
Argument | Description | Values |
---|
A | the alias to add to | |
B | value to be added | |
Adds a floating-point value to an alias.
Argument | Description | Values |
---|
A | the alias to add to | |
B | value to be added | |
Adds up two floating-point numbers.
Argument | Description | Values |
---|
A | the first summand | float |
B | the second summand | float |
Return value: the sum
Performs a subtraction.
Argument | Description | Values |
---|
A | the minuend | |
B | the subtrahend | |
Return value: the difference
Decrements an alias by 1.
Argument | Description | Values |
---|
A | the alias name | |
Example:
i = 0; -- i; echo $iOutput: -1
Decrements an alias by 1.
Argument | Description | Values |
---|
A | the alias name | |
Example:
i = 4.14; --f i; echo $iOutput: 3.14
Subtracts a value from an alias.
Argument | Description | Values |
---|
A | the alias to subtract from | |
B | value to be subtracted | |
Subtracts a floating-point value from an alias.
Argument | Description | Values |
---|
A | the alias to subtract from | |
B | value to be subtracted | |
Subtracts two floating-point numbers.
Argument | Description | Values |
---|
A | the minuend | float |
B | the subtrahend | float |
Return value: the difference
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)
Determines if a values is less than or equal than a second value.
Argument | Description | Values |
---|
A | the first value | |
B | the second value | |
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)
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)
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)
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)
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)
Determines if a values is greater than or equal than a second value.
Argument | Description | Values |
---|
A | the first value | |
B | the second value | |
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)
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)
This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, 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.
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 | |
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!
Injects CubeScript punctuation.
Argument | Description | Values |
---|
S | a string | |
N | type ID | min 0/max 5/default 0 |
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:
echo (addpunct "" 4)
Example:
echo (addpunct "" 5)Output: %
Example:
test = (concat echo (addpunct fov 3)); testOutput: 90.0
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.
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) | |
Grabs a word out of a string.
Argument | Description | Values |
---|
S | the string | |
N | the index of the word | |
Example:
echo (at "zero one two three" 2)output: two
Return value: the word from the specified idex
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
Breaks out of a parsestring loop.
Adds color to a string.
Argument | Description | Values |
---|
N | color id | 0 min, 9 max |
Example:
echo (c 3)Hello (c 0)world!Output: a red "Hello" and a green "world!"
Upper value of a float number
Argument | Description | Values |
---|
F | The float number to get the ceil from | |
Return value: The ceil value (integer)
Defines an alias only if it does not already exist.
Argument | Description | Values |
---|
A | alias name | |
V | alias value | |
Uses check2init on a list of aliases.
Argument | Description | Values |
---|
L | list of alias names | |
V | alias value | |
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
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.
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
Concatenates multiple strings.
Argument | Description | Values |
---|
S | the first string | |
... | collection of strings to concatenate | |
Example:
alias a "Cube"; echo (concatword $a "Script")output: CubeScript
Return value: The newly created string
Set an alias as a constant.
Argument | Description | Values |
---|
N | the name of the alias | string, must not contain '$' |
A | the value (optional) | string |
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
Skip current loop iteration.
Example:
loop i 5 [ if (= $i 2) [ continue ]; echo $i]output: 0 1 3 4
Converts a list of strings to lowercase or uppercase characters.
Argument | Description | Values |
---|
N | 0 - use lowercase, 1 - use uppercase | min 0/max 1 |
... | a list of strings | |
Example:
echo (convertcase 0 ZERO ONE TWO THREE)Output: zero one two three
Example:
echo (convertcase 1 zero one two three)Output: ZERO ONE TWO THREE
Returns the current number of players.
Performs an integer division.
Argument | Description | Values |
---|
A | the dividend | |
B | the divisor | |
Return value: the quotient (integer)
Divides an alias by a value.
Argument | Description | Values |
---|
A | the alias to be divided | |
B | the divisor | |
Divides an alias by a floating-point value.
Argument | Description | Values |
---|
A | the alias to be divided | |
B | the divisor | |
Performs a division with floating-point precision.
Argument | Description | Values |
---|
A | | the dividend |
B | | the divisor |
Return value: the quotient (floating-point)
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
find client number (cn)
Argument | Description | Values |
---|
N | NAME | |
Returns the name of a key via a specified code.
Argument | Description | Values |
---|
I | integer | |
Example:
echo (findkey 8)Output: BACKSPACE
Example:
echo (findkey 280)Output: PAGEUP
Returns the integer code of a key.
Argument | Description | Values |
---|
K | the name of the key | |
Example:
echo (findkeycode BACKSPACE)Output: 8
Example:
echo (findkeycode PAGEUP)Output: 280
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
find player name
Argument | Description | Values |
---|
C | CLIENTNUM | |
Floor value of a float number
Argument | Description | Values |
---|
F | The float number to get the floor from | |
Return value: The floor value (integer)
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
return the value of the alias
Argument | Description | Values |
---|
N | alias name | |
Returns the highest valid client number available.
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 ]
returns whether or not there is an identifier by that name
Argument | Description | Values |
---|
N | identifier name | |
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
Returns the contents of a keybind.
Argument | Description | Values |
---|
K | name of key | |
leading zeros for the number V to make it W chars wide. It may look like 10 - which might be considered a mnemonic - but it's lowercase-L and 0!
Argument | Description | Values |
---|
W | WIDTH | |
V | VALUE | |
Example:
echo (l0 5 1000)Output: 01000
Example:
echo (l0 3 1000)Output: 1000
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
returns the element count of the given list.
Argument | Description | Values |
---|
L | the list | |
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 | |
Example:
loop i 10 [ echo $i ]
Browses a list and executes a body for each element
Argument | Description | Values |
---|
V | the list to browse | |
N | the alias containing the current element value. | |
body | the body to execute on each iteration | |
Example:
looplist "zero one two three" number [ echo $number ]
Performs a modulo operation.
Argument | Description | Values |
---|
A | the dividend | |
B | the divisor | |
Return value: the modulo value
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
The number of arguments passed to the current alias
Description
| Values | Range | Default |
---|
numargs | | 0..25 | 0 |
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 |
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.
Controls whether aliases defined afterwards will be saved (1) or not (0). This option is useful to keep saved.cfg free from unneeded clutter.
Argument | Description | Values |
---|
B | control option | 1...persistent, 0...not persistent |
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.
Resets a previously pushed alias to it's original value.
Argument | Description | Values |
---|
A | alias | |
Example:
pop p; echo $pOutput: 1
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
Temporarily redefines the value of an alias.
Argument | Description | Values |
---|
N | alias name | |
A | action | |
Example:
p = 1; push p 2; echo $pOutput: 2
Resets all current "sleep".
Sets the result value of a CubeScript block.
Argument | Description | Values |
---|
R | the result | |
Sets the result value of a CubeScript block.
Argument | Description | Values |
---|
R | the result | |
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 the given float
Argument | Description | Values |
---|
F | The float number to round | |
Return value: The rounded integer, The precision is 1 unit
Executes a command after specified time period.
Argument | Description | Values |
---|
N | the amount of milliseconds | |
C | the command to execute | |
P | ignore map change (optionnal) | |
Example:
sleep 1000 [ echo foo ]Prints 'foo' to the screen after 1 second.
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".
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)
Returns the length (in characters, including whitespace) of string S.
Argument | Description | Values |
---|
S | STRING | |
Example:
echo (strlen "Hello world!")Output: 12
Returns the position of a substring into another
Argument | Description | Values |
---|
H | haystack string | |
S | needle string | |
N | The occurence of 'needle' to find (optionnal) | |
Example:
echo (strpos "hello world" "world") 6
Example:
echo (strpos "hello world" "l") 2
Example:
echo (strpos "hello world" "l" 2) 9
Return value: The N'th position of 'needle' into 'haystack' (-1 if 'needle' isn't found;)
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
Determines if string B was found in string A.
Argument | Description | Values |
---|
A | the first string | |
B | the second string | |
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: the truth value, 0 (false), 1 (true)
Copies a substring out of the original.
Argument | Description | Values |
---|
S | the original string | |
A | start position | |
L | substring length (optionnal) | |
Example:
echo (substr abcdefgh 2 5) cdefg
Example:
echo (substr abcdefgh -3 2) fg
Example:
echo (substr abcdefgh 2) cdefgh
Return value: the substring
Takes an integer argument to determine what block of code to execute.
Argument | Description | Values |
---|
I | integer | |
C | a variable number of 'case' arguments... | |
Example:
switch 2 [echo case 0] [echo case 1] [echo case 2] [echo case 3] [echo case 4]Output: case 2
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 |
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
Converts a string to all lowercase characters.
Argument | Description | Values |
---|
S | a string | |
Example:
echo (tolower HELLO)Output: hello
Converts a string to all uppercase characters.
Argument | Description | Values |
---|
S | a string | |
Example:
echo (toupper hello)Output: HELLO
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"
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
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 | |
Example:
alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]
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
General
This section describes general identifiers.
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 | |
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 |
Fires the current weapon.
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 |
Automatically get new map revisions from the server.
Token
|
Description
| Values | Range | Default |
---|
N | 0: no, 1: yes | | 0..1 | 0 |
Toggle for taking an automatic screenshot during intermission.
Token
|
Description
| Values | Range | Default |
---|
B | 0=Off, 1=On | | 0..1 | 1 |
Moves the player backward.
Binds a key to a command.
Argument | Description | Values |
---|
K | the key to bind | string |
A | the command | string, usually an alias |
Toggles getting descriptive text from CGZ or DMO files in menudirlist.
Token
|
Description
| Values | Range | Default |
---|
B | | | 0..1 | 1 |
Swaps your player to the enemy team.
Take a "clean" screenshot with no HUD items.
Sets the correction value for clockfix.
Token
|
Description
| Values | Range | Default |
---|
V | correction value | | 990000..1010000 | 1000000 |
Enables correction of the system clock.
Token
|
Description
| Values | Range | Default |
---|
B | enable correction | | 0..1 | 0 |
Indicates if a connection to a server exists.
Token
|
Description
| Values | Range | Default |
---|
B | the connection state | 1 (connected), 0 (disconnected) | 0..1 | 0 |
representation of date
Example:
echo (datestring) "Sat Jun 7 17:08:35 2008"
Enable triangle debug.
Token
|
Description
| Values | Range | Default |
---|
B | triangle debug | | 0..1 | 0 |
Dump all command arguments to STDOUT
Argument | Description | Values |
---|
... | ... | |
Outputs text to the console.
Argument | Description | Values |
---|
L | List of strings | |
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 |
Executes all commands in a specified config file.
Argument | Description | Values |
---|
C | the config file | |
Moves the player forward.
Holds the current game mode. READ ONLY
Example:
echo $gamemodeOutput: 5
Returns a list of values describing the current engine (rendering) state.
Example:
echo (getEngineState)
Returns the 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
Returns the file extension of the client's current screenshottype setting.
Example:
echo (getscrext)Example output: .jpg
Outputs text to the console and heads up display.
Argument | Description | Values |
---|
L | List of strings | |
Sets mouse to "flight sim" mode.
Argument | Description | Values |
---|
B | sets invmouse | 0 (off), else (on) |
Sets the JPEG screenshot image quality.
Token
|
Description
| Values | Range | Default |
---|
N | Compression level | | 10..100 | 70 |
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 | |
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 | | .. | |
save an image of the entire radar-overview of the map.
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 |
Sets the maximum value the display will roll on strafing.
Token
|
Description
| Values | Range | Default |
---|
N | the roll value | | 0..20 | 0 |
Gets the maximum number of supported textures when performing multitexturing.
Description
| Values | Range | Default |
---|
max. number of textures | | 1..0 | 0 |
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 |
Example:
megabind F9 [echo Demo!] [echo Editing or coop!] [echo Connected!] [echo Bots!] [echo Other!]
Returns the number of milliseconds since engine start.
Return value: the milliseconds
Minimal level of detail.
Token
|
Description
| Values | Range | Default |
---|
V | | | 25..250 | 60 |
Toggles use of acronyms instead of full modenames in the serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
B | | | 0..1 | 0 |
Enables output of processed network packets.
Token
|
Description
| Values | Range | Default |
---|
B | enable network debugging | | 0..1 | 0 |
Hold the current number of lines on the console.
Executes a command on the release of a key/button.
Argument | Description | Values |
---|
A | the command | |
Example:
bind CTRL [ echo "key pressed"; onrelease [ echo "key released" ] ]
Toggles physics interpolation.
Token
|
Description
| Values | Range | Default |
---|
B | | | 0..1 | 1 |
Sets the PNG screenshot file compression.
Token
|
Description
| Values | Range | Default |
---|
N | Compression level | | 0..9 | 9 |
Gets an integer representing the game protocol. READ ONLY
Quits the game without asking.
registers a track as music - the first three tracks have special meaning. Track #1 is for "flag grab" the second and third are used as "last minute" tracks.
Argument | Description | Values |
---|
M | music file | |
Resets all binds back to their default values.
Determines if all settings should be reset when the game quits.
Token
|
Description
| Values | Range | Default |
---|
B | enable reset | | 0..1 | 0 |
Clears the list of secured maps.
Executes a config file within /config/
Argument | Description | Values |
---|
N | the file name (without extension) | |
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 |
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 |
Adds a map to the list of secured maps.
Argument | Description | Values |
---|
S | the name of the map | |
Sets the mouse sensitivity.
Argument | Description | Values |
---|
S | the sensitivity | floating-point |
Determines the valid distance when extrapolating a players position.
Token
|
Description
| Values | Range | Default |
---|
V | distance | | 0..16 | 8 |
Determines the speed when extrapolating a players position.
Token
|
Description
| Values | Range | Default |
---|
V | movement speed | | 0..100 | 75 |
Plays all hardcoded sounds in order.
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 |
seconds since the epoch (00:00:00 UTC on January 1, 1970)
Determines how fast network throttling accelerates.
Token
|
Description
| Values | Range | Default |
---|
V | acceleration | | 0..32 | 2 |
Determines how fast network throttling decelerates.
Token
|
Description
| Values | Range | Default |
---|
V | deceleration | | 0..32 | 2 |
Determines the interval of re-evaluating network throttling.
Token
|
Description
| Values | Range | Default |
---|
V | interval | seconds | 0..30 | 5 |
a list of values for current time
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"
the current time in (H)H:MM:SS format
Example:
echo (timestring) "12:34:56"
Example:
echo (timestring) "1:02:03"
Swaps vertices of model triangles.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Contacts the masterserver and adds any new servers to the server list.
Argument | Description | Values |
---|
B | force update | 0 (delayed), 1 (immediate) |
Gets an integer representing the game version. READ ONLY
writes current configuration to config/saved.cfg - automatic on quit
Gameplay
This section describes gameplay related identifiers.
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)]
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)]
Deletes a list of aliases (from saved.cfg) on quit.
Token
|
Description
| Values | Range | Default |
---|
L | the list of aliases to delete | | .. | |
Example:
addListOnQuit "a b c"Deletes aliases a, b, and c from existance and saved.cfg upon quit.
Execute a command or block of code on quit.
Token
|
Description
| Values | Range | Default |
---|
A | the command or block of code to execute | | .. | |
add 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 OR bad |
N | name | name for the bot |
Example:
addbot RVSF medium RobbieWill add a bot named Robbie with a medium skill level to the RVSF team.
will add 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 OR bad |
Example:
addnbot 2 CLA badWill add 2 bots with a bad skill level to the CLA team.
Adds a packages source server where to download custom content from.
Argument | Description | Values |
---|
S | The server address. Trailing slash not needed. | |
Example:
addpckserver http://packages.ac-akimbo.net
If defined, this will be executed after saved.cfg is loaded.
Enables or disables automatic switching to the akimbo upon pickup.
Token
|
Description
| Values | Range | Default |
---|
N | enable or disable | | 0..1 | 1 |
Sets the behavior of weapon switching upon akimbo expiration.
Argument | Description | Values |
---|
| | 0 (switch to knife) |
| | 1 (stay with pistol) |
| | 2 (switch to grenades) |
| | 3 (switch to primary) |
Returns 1 if the local player is alive.
Example:
echo (alive)Output: 1
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 |
Indicates if the weapons should be reloaded automatically.
Token
|
Description
| Values | Range | Default |
---|
B | the autoreload state | on (1), off (0) | 0..1 | 1 |
Move from active team to spectator during match.
changes the skill level for the given bot.
Argument | Description | Values |
---|
N | botname | the name of the bot |
S | botskill | best, good, medium, worse OR bad |
Example:
botskill Robbie bestChanges the previous bot skill level of the bot named Robbie to a 'best' skill level.
changes the skill level for all bots.
Argument | Description | Values |
---|
S | botskill | best, good, medium, worse OR bad |
Example:
botskillall worseChanges the previous bot skill level for all bots to a 'worse' skill level.
Enables or disables the ability of the bots to fire their weapons
Argument | Description | Values |
---|
T | shooting bots? | 0||1 |
Example:
botsshoot 0Bots won't shoot.
Argument | Description | Values |
---|
D | delta | how many players to shift +/- |
Smoothly changes your gamespeed to the specified value.
Argument | Description | Values |
---|
S | the gamespeed to change to | |
M | milliseconds between gamespeed changes | |
Example:
changespeed 1000 30Every 30 milliseconds your gamespeed is changed by 1 until it reaches its goal of gamespeed 1000.
Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve)
Argument | Description | Values |
---|
N | the weapon number | |
Clear list of ignored players.
Argument | Description | Values |
---|
A | client number, or -1 to clear the whole list | |
Clear list of muted players.
Argument | Description | Values |
---|
A | client number, or -1 to clear the whole list | |
Argument | Description | Values |
---|
C | command | any command or alias |
P | path | path to search |
E | extension | extension to match |
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")
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) | |
Example:
connect 127.0.0.1 555 myServerPassword
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 | |
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".
Returns the server's current autoteam state.
Returns the current map being played.
Argument | Description | Values |
---|
I | clean | 0, 1 |
Example:
echo playing: (curmap) vote for: (curmap 1)output: playing maps/ac_complex vote for: ac_complex
Current map revision number.
Description
| Values | Range | Default |
---|
- | | 1..0 | 1 |
Returns the server's current mastermode state.
Returns the mode number for the current game.
Checks the current game mode for certain attributes.
Argument | Description | Values |
---|
A | attribute name | |
Returns the weapon-index the local player currently has selected as primary.
Returns 1 if the local player has admin privileges, 0 otherwise.
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 |
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.
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 the weapon-index the local player is currently holding.
Plays a recorded demo.
Argument | Description | Values |
---|
S | the demo name | |
Downloads and loads the specified map from an available packages source server.
Argument | Description | Values |
---|
S | the name of the map | |
Draws a shooting line in the direction of all available bots.
Argument | Description | Values |
---|
| this command does not take any arguments | none |
Draws a zone marker with the specified color and dimensions on the minimap/radar. This is primarily intended for the survival mode.
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) |
Sets the gamespeed in percent.
Token
|
Description
| Values | Range | Default |
---|
N | the game speed | | 10..1000 | 100 |
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
]
]
Returns the maximum time (in milliseconds) of the currently played game. READ ONLY
Returns the time (in milliseconds) when the last map was loaded.
Returns the current game mode number.
Argument | Description | Values |
---|
X | number in list | |
P | subpath (optional) | |
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) | |
Toggles between your primary weapon and grenades. (must be binded to a key)
Switches to grenades. (if available) (must be binded to a key)
Determines if the local player (you) are currently carrying a primary weapon.
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.
Token
|
Description
| Values | Range | Default |
---|
B | | | 0..1 | 0 |
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 |
Enables or disables the processing of the bots artificial intelligence
Argument | Description | Values |
---|
T | off OR on | 0||1 |
Example:
idlebots 1Will make the bots stand still.
Example:
idlebots 0Will enable the bots to move and shoot.
Ignore a player.
Argument | Description | Values |
---|
A | client number | |
Ignores all clients currently on the server. (only works in multiplayer)
Ignores all clients on the enemy team.
Ignores all clients on the specified team.
Argument | Description | Values |
---|
T | the team to ignore | 0 or 1 || cla or rvsf |
Determines if the local player is standing in water or submerged.
Argument | Description | Values |
---|
T | check if submerged instead? | min 0/max 1/default 0 |
Example:
if (inWater) [echo in water] [echo not in water]Example output: in water
Example:
if (inWater 1) [echo submerged] [echo not submerged]Example output: not submerged
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
Kicks all bots out of the current game.
Argument | Description | Values |
---|
| this command does not take any arguments | none |
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.
Toggles between your primary weapon and your knife. (must be binded to a key)
Returns the last time (in milliseconds) the gametime was updated. READ ONLY
Returns the name of the last player you aimed at.
Get the game demos listing from the server we are currently connected.
Print a list of all players that you are currently ignoring.
Print a list of all players that you have muted.
Loads a crosshair for argument T.
Argument | Description | Values |
---|
I | image | |
T | type | all, scope, teammate, knife, pistol, carbine, shotgun, smg, sniper, ar, cpistol, grenades, akimbo |
Example:
loadcrosshair red_dot.pngLoads the red_dot.png crosshair for all weapons.
Example:
loadcrosshair red_dot.png allSame as above. Loads the red_dot.png crosshair for all weapons.
Example:
loadcrosshair red_dot.png knifeLoads the red_dot.png crosshair for your knife only.
Example:
loadcrosshair red_dot.png arLoads the red_dot.png crosshair for your assault rifle only.
Example:
loadcrosshair red_dot.png scopeLoads the red_dot.png crosshair for your sniper rifle scope only.
Returns contents of current magazine.
Argument | Description | Values |
---|
N | the weapon number | |
Returns contents of magazine reserve.
Argument | Description | Values |
---|
N | the weapon number | |
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 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.
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.
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..32 | 2 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..32 | 1 |
Action chat message.
Argument | Description | Values |
---|
... | ... | |
Switches to your knife. (must be binded to a key)
Returns the remaining minutes of the currently played game. READ ONLY
Connect to a modded server.
Argument | Description | Values |
---|
A | IP | |
B | port | |
C | password | |
Connect to a modded server and claim admin.
Argument | Description | Values |
---|
A | IP | |
B | port | |
C | admin password | |
Returns the mode number for a specified mode acronym.
Argument | Description | Values |
---|
M | the mode acronym | |
Example:
echo (modenum ctf)Output: 5
Example:
echo (modenum btosok)Output: 21
Connect to a modified LAN server.
change name of directory used for bounce model number N
Example:
modmdlbounce0 = misc/my_gib1This will make the gib 1 model use the data inside packages/models/misc/my_gib1
Example:
modmdlbounce1 = misc/my_gib2This will make the gib 2 model use the data inside packages/models/misc/my_gib2
Example:
modmdlbounce2 = misc/my_gib3This will make the gib 3 model use the data inside packages/models/misc/my_gib3
Example:
modmdlbounce3 = weapons/grenade2/staticThis will make the grenade static model use the data inside packages/models/weapons/grenade2/static
change name of directory used for pickup model number N
Example:
modmdlpickup3 = health2This will make the health pickup model use the data inside packages/models/pickups/health2
Example:
modmdlpickup1 = my_ammoboxThis will make the ammobox pickup model use the data inside packages/models/pickups/my_ammobox
change name of directory used for weapon model (viewable/world) number N
change name of directory used for weapon model (hudgun) number N
Example:
modmdlweap4 = my_subgun
This will make the subgun hudgun model use the data inside packages/models/weapon/my_subgun
Mute a player
Argument | Description | Values |
---|
A | client number | |
Sets the nick name for the local player.
Argument | Description | Values |
---|
N | the name | |
Returns the primary weapon on next respawn.
Argument | Description | Values |
---|
A | weapon id | value |
adds a command to complete nicknames on
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.
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 | |
If this alias exists it will be run every time a vote is called.
If this alias exists it will be run every time a vote is changed.
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) |
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) |
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) |
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) |
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) |
If this alias exists, it will be automatically executed on the last minute remaining mark.
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 connected | integer |
new name | The new name of the client | string |
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 | |
If defined, this will be executed each time you reload a weapon.
Argument | Description | Values |
---|
B | was autoreload? | 0 (false), 1 (true) |
If defined, this will be executed each time a player spawns.
Argument | Description | Values |
---|
player | The client number of the player who spawned | integer |
If this alias exists it will be run every time a vote passes or fails.
If defined, this will be executed each time you switch to a different weapon.
Argument | Description | Values |
---|
w | The weapon ID that you switched to | |
Determines if the game should be paused.
Token
|
Description
| Values | Range | Default |
---|
B | pause game | | 0..1 | 0 |
Sends a private message to a specified client.
Argument | Description | Values |
---|
C | Client number | |
L | List of strings | |
Returns the weapon-index the local player was previously holding.
Switches to your current primary weapon. (must be binded to a key)
Returns the score statistics for the player with the given clientnumber.
Argument | Description | Values |
---|
C | client | 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.
Returns the shot statistics for the player with the given clientnumber.
Argument | Description | Values |
---|
C | client | 0..N |
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.
Easily respond the the last client who sent you a private message.
Disconnects then reconnects you to the current server.
Argument | Description | Values |
---|
P | the server password (optional) | |
Reloads the weapon.
Argument | Description | Values |
---|
A | | value |
Resets the list of packages source servers where to download custom content from.
Rewind the current demo to S seconds ago.
Argument | Description | Values |
---|
S | the number of seconds to rewind | |
Outputs text to other players.
Argument | Description | Values |
---|
S... | the text | |
Puts a prompt on screen.
Argument | Description | Values |
---|
S... | the text to display in the prompt (optional) | |
default keys:
T - opens empty prompt
` - opens a command prompt /
TAB - autocompletes commands/variables/aliases
UP - browse command history forwards
DOWN - browse command history backwards
Determines the FOV when scoping.
Token
|
Description
| Values | Range | Default |
---|
V | | | 5..60 | 50 |
Switches to your secondary weapon. (must be binded to a key)
Argument | Description | Values |
---|
C | clientnum | which player to follow |
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 | |
will display a scope for the sniper-rifle. used in the zoom-script (config/scripts.cfg [l. 92ff "alias zoom"]
Argument | Description | Values |
---|
Y | scope on? | 0||1 |
shifts your selected weapon by a given delta. By default the mouse-wheel shifts one up or down according to your scroll direction.
Argument | Description | Values |
---|
D | delta | -N..-1,+1..N |
default keys:
MOUSE4 - cycle one up
MOUSE5 - cycle one down
Determines if the mini-map should be shown on screen.
Token
|
Description
| Values | Range | Default |
---|
B | show mini-map | | 0..1 | 0 |
change wether 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 |
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 |
Shows or hides the scores.
Determines if scores should be shown on death.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Determines the skin of the current player.
Argument | Description | Values |
---|
N | skin id | value |
Choose skin when playing for team CLA.
Argument | Description | Values |
---|
N | skin id | |
Choose skin when playing for team RVSF.
Argument | Description | Values |
---|
N | skin id | |
Toggles between your primary weapon and your secondary weapon. (must be binded to a key)
Sorts the available packages source servers by ascendant ping. The fastest to reach is then used by default.
Sets the desired spectating mode.
Argument | Description | Values |
---|
M | the mode | 2 (1st-person), 3 (3rd-person), 4 (3rd-person transparent), 5 (free flying), 6 (overview) |
default key: SPACE - switch spectator mode
If this alias exists it will be run when the game reaches intermission.
Example:
start_intermission = [
echo "INTERMISSION - STATISTICS TIME"
loop p 255 [
pn = (findpn $p)
if (strcmp $pn "") [ ] [
echo (concatword Player $p ":") (pstat_score $p) ":" (pstat_weap $p)
]
]
echo "------------------------------"
]
This will output the full statistics line for all players.
Stops any demo recording or playback.
Kills your player. You will lose 1 frag point and receive 1 death point when using this command.
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 |
Sets the team for the local player.
Argument | Description | Values |
---|
S | the team name | either CLA or RVSF or SPECTATOR |
cycles through all available spectator modes. Follow-1stPerson, Follow-3rdPerson, Follow-3rdPerson-transparent and Fly.
default key: SPACE - cycle spectator modes
Unignores all clients currently on the server. (only works in multiplayer)
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
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) |
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
Sets the next gamemode then calls a vote for a map.
Argument | Description | Values |
---|
I | mode id | |
M | map name | |
Determines if there is a vote pending or not.
Example:
echo $votependingOutput: if there is currently a vote pending, returns 1, else returns 0.
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
Changes the weapon.
Argument | Description | Values |
---|
N | the weapon number | 0 (knife), 1 (pistol), 2 (shotgun), 3 (sub), 4 (sniper), 5 (assault), 6 (grenades) |
get the IP address of a given clientnumber - only admins get shown the last octet
Argument | Description | Values |
---|
C | clientnum | |
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 |
Visuals
This section describes identifiers to configure the visuals.
Sets the size/resolution of the dynamic shadow data.
Token
|
Description
| Values | Range | Default |
---|
| the size | | 0..3 | 2 |
Sets the size for the icon shown above a player using comunications voices.
Token
|
Description
| Values | Range | Default |
---|
V | Icon size | | 0..1000 | 50 |
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 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Turn on and off the display of blood.
Token
|
Description
| Values | Range | Default |
---|
V | Enable/Disable blood | | 0..1 | 1 |
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 |
Turns on/off the display of bullet holes
Token
|
Description
| Values | Range | Default |
---|
V | Enable/Disable bullet holes | | 0..1 | 1 |
Specifies how long (in milliseconds) to display bullet holes.
Token
|
Description
| Values | Range | Default |
---|
V | Bullethole display time | | 0..30000 | 10000 |
Smoothly changes your gamma to the specified value.
Argument | Description | Values |
---|
G | the gamma to change to | |
M | milliseconds between gamma changes | |
Example:
changegamma 300 30Every 30 milliseconds your gamma is changed by 1 until it reaches its goal of gamma 300.
Sets the bits per pixel value.
Token
|
Description
| Values | Range | Default |
---|
| bits per pixel | | 0..32 | 0 |
show the blood-spat overlay when receiving damage?
Token
|
Description
| Values | Range | Default |
---|
N | damagescreen | 0 (false), 1 (true) | 0..1 | 1 |
if overlay of blood-spat, at what blending (transparency) level?
Token
|
Description
| Values | Range | Default |
---|
N | damagescreen transparency | | 1..100 | 45 |
if overlay of blood-spat, use which factor?
Token
|
Description
| Values | Range | Default |
---|
N | damagescreen factor | | 1..100 | 7 |
if overlay of blood-spat, at what speed does it fade?
Token
|
Description
| Values | Range | Default |
---|
N | damagescreen fade | | 0..1000 | 125 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
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 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..2 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
Sets the bits for the depth buffer.
Token
|
Description
| Values | Range | Default |
---|
| depth pixels | | 0..32 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | .. | 0.005f |
Enables or disables the per official map dynamic gamma system.
Example:
dyngamma = 0Output: disables the system
Example:
dyngamma = 1Output: enables the system
Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.
Token
|
Description
| Values | Range | Default |
---|
R | the radius of a dynamic light | | 0..32 | 16 |
Sets the alpha value (transparency) for dynamic shadows.
Token
|
Description
| Values | Range | Default |
---|
| the alpha value | | 0..100 | 40 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..3000 | 1000 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
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). | |
Specify 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. | |
Sets the field of view (fov).
Token
|
Description
| Values | Range | Default |
---|
N | the FOV value | | 75..120 | 90 |
Sets the field of view (fov) based on the rules of AC v0.93
Argument | Description | Values |
---|
A | FOV degree | |
(descripton unavailable)
Argument | Description | Values |
---|
A | min | |
B | max | |
set the frag message corresponding to a weapon (appearing on the hud or in server logs)
Argument | Description | Values |
---|
G | the integer of the gun | 0 = knife, etc. |
M | the message you want to appear | ex : sniped |
Example:
fragmessage 5 sniped // set "sniped" message for frags with sniper.
It will display "you sniped unarmed" on the hud when you frag unarmed with sniper.
In server logs you will get "[127.0.0.1] killer sniped unarmed".
Sets the level of fullscreen antialiasing (FSAA).
Token
|
Description
| Values | Range | Default |
---|
| fsaa | | 0..16 | 0 |
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 |
Enables or disables fullscreen.
Token
|
Description
| Values | Range | Default |
---|
| fullscreen | | 0..1 | 1 |
Sets the hardware gamma value.
Token
|
Description
| Values | Range | Default |
---|
N | the gamma value | | 30..300 | 100 |
Enables or disables the gib animation entirely.
Token
|
Description
| Values | Range | Default |
---|
B | off OR on | 0 (false), 1 (true) | 0..1 | 1 |
set the gib message corresponding to a weapon (appearing on the hud or in server logs)
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 |
Adjusts gib/gibnum/gibspeed/gibttl variables collectively.
Argument | Description | Values |
---|
| | 0 - Off |
| | 1 - Default/Normal values |
| | 2 - Good |
| | 3 - Messy |
| | 4 - Unrealistic |
Sets the velocity at which gibs will fly from a victim.
Token
|
Description
| Values | Range | Default |
---|
N | velocity | | 1..100 | 30 |
Sets the time for gibs to live (in milliseconds), after which they will disappear.
Token
|
Description
| Values | Range | Default |
---|
N | time to live | | 0..15000 | 5000 |
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]
Defines the health level at or below which a heartbeat sound will be played. A value of 0 (which is the default) disables this feature.
Token
|
Description
| Values | Range | Default |
---|
H | health value | | 0..99 | 0 |
Controls whether textures with a scale higher than 1.0 will be scaled down while loading to increase performance (0) or stay at higher resolution (1).
Token
|
Description
| Values | Range | Default |
---|
S | scale down? | | 0..1 | 1 |
The maximum texture size (in pixels) supported by the graphics hardware.
Token
|
Description
| Values | Range | Default |
---|
V | max. hardware texture size | | 1..0 | 0 |
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 | 8 |
change at what position to truncate the map title string
Token
|
Description
| Values | Range | Default |
---|
N | chars | | 0..255 | 46 |
The maximum texture (if less than hwtexsize) that will actually be used by the engine, larger textures will be scaled down. 0 removes this limit.
Token
|
Description
| Values | Range | Default |
---|
V | max. texture size | | 0..4096 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Scales all particles.
Token
|
Description
| Values | Range | Default |
---|
P | the scale percentage | | 20..500 | 100 |
Token
|
Description
| Values | Range | Default |
---|
V | | | .. | -3.0f |
Token
|
Description
| Values | Range | Default |
---|
V | | | .. | -3.0f |
make 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 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 3 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 6..10 | 8 |
Resets the OpenGL rendering settings
Sets if dynamic shadows should be saved to disk.
Token
|
Description
| Values | Range | Default |
---|
| auto save | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..30000 | 10000 |
Whether a special monospace font should be used to render the text on the scoreboard.
Token
|
Description
| Values | Range | Default |
---|
M | normal (0) or monospace (1) | | 0..1 | 0 |
Sets the screen height.
Token
|
Description
| Values | Range | Default |
---|
| the screen height | | 0..768 | 10000 |
Sets the screen width.
Token
|
Description
| Values | Range | Default |
---|
| the screen width | | 0..1024 | 10000 |
Changes the screen resolution
Argument | Description | Values |
---|
W | width | |
H | height | |
Changes the current font.
Argument | Description | Values |
---|
N | Font name | name of the font |
Sets the current map's default dynamic gamma.
Argument | Description | Values |
---|
G | the gamma value | |
Example:
checkinit afterinit [ofc_gamma_list = [175 225 150 120 ...]]
Sets your custom gamma values for the per official map dynamic gamma system. If you are going to use this method,
you MUST include values for every existing official map. The list must be alphabetical and be the exact length of
the number of currrent official maps. Hint: use "echo $defaultmaps" and "echo (listlen $defaultmaps)".
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..0 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..10000 | 75 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Specifies the Field Of View when in spectating/ghost mode.
Token
|
Description
| Values | Range | Default |
---|
V | Spectate FOV size | | 5..120 | 110 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..32 | 0 |
Sets the transparency/opacity level of stencil shadows.
Token
|
Description
| Values | Range | Default |
---|
V | Alpha level | | 0..100 | 40 |
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 |
Reduces the size of all texture by the selected factor:
Token
|
Description
| Values | Range | Default |
---|
S | scale selection | | -1..3 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Enables or disables vsync.
Token
|
Description
| Values | Range | Default |
---|
| vsync | | -1..1 | -1 |
Turns on/off the reflections in the water surface.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable water reflections | | 0..1 | 1 |
Turns on/off water refractions.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable water refractions | | 0..1 | 0 |
Determines the subdivision of the water surface in maps.
Token
|
Description
| Values | Range | Default |
---|
N | the subdivisioin value | | 1..64 | 4 |
Heads-Up Display
This section describes the identifiers to configure the head-up display (HUD).
Time in milliseconds before the abovehead icon dissapears.
Token
|
Description
| Values | Range | Default |
---|
V | abovehead icon display time | | 1..10000 | 2000 |
Sets the number of text lines on an alternate F11 history display.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 0 |
Recreates the minimap for the current map.
Sets the display mode for the HUD clock.
Token
|
Description
| Values | Range | Default |
---|
D | display mode | | 0..2 | 0 |
colour of CN column in scoreboard
Argument | Description | Values |
---|
| | 0 (green) |
| | 1 (blue) |
| | 2 (yellow) |
| | 3 (red) |
| | 4 (gray) |
| | 5 (white, default) |
| | 6 (dark brown) |
| | 7 (dark red) |
| | 8 (purple) |
| | 9 (orange) |
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 |
Sets how many lines of text the console displays.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 6 |
Allows to browse through the console history by offsetting the console output.
Argument | Description | Values |
---|
N | the offset | |
default keys:
- on the keypad - scrolls into the history (conskip 1)
+ on the keypad - resets the history (conskip -1000)
Turns on or off crosshair effects.
Token
|
Description
| Values | Range | Default |
---|
B | Turns the effects on (1) or off (0) | | 0..1 | 1 |
Sets the size of your crosshair.
Token
|
Description
| Values | Range | Default |
---|
N | the crosshair size | | 0..50 | 15 |
Turns on/off display of team warning crosshair.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable warning crosshair | | 0..1 | 1 |
Set the level of transparency of the damage indicator, 0 = is fully transparent, 100 = totaly solid.
Token
|
Description
| Values | Range | Default |
---|
V | damage indicator alpha value | | 1..100 | 50 |
Sets the separation of the arrows in the damage indicator.
Token
|
Description
| Values | Range | Default |
---|
V | damage indicator separation size | | 0..10000 | 500 |
Sets the size of the damage indicator.
Token
|
Description
| Values | Range | Default |
---|
V | damage indicator icon size | | 0..10000 | 200 |
Sets how long the damage indicator stays on screen.
Token
|
Description
| Values | Range | Default |
---|
V | damage indicator display time | | 1..10000 | 1000 |
Stores your current HUD configuration in a buffer and disables it entirely.
Restores your HUD configuration after using disablehud.
Sets the number of text lines on the F11 history display.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 40 |
Turns on/off the radar compass
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable radar compass | | 0..1 | 0 |
Turns on or off the display of console text.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable console text | | 0..1 | 0 |
Turns on or off the display of flag icons.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable flag icons | | 0..1 | 0 |
Turns on/off the damage indicator
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable damage indicator | | 0..1 | 0 |
Turns on or off the display of equipement icons.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable equipement icons | | 0..1 | 0 |
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 |
Turns on or off the display of the on-screen radar.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable radar | | 0..1 | 0 |
Turns on or off the display of spectator staus.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable spectator status | | 0..1 | 0 |
Turns on or off the display of local player team icons.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable team icons | | 0..1 | 0 |
Turns on or off the display of vote icons.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable vote info | | 0..2 | 0 |
Executes the specified command in the command line history.
Argument | Description | Values |
---|
N | the N'th command from the history | |
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 |
Sets the total number of text lines from the console to store as history.
Token
|
Description
| Values | Range | Default |
---|
V | | | 10..1000 | 200 |
Sets how many typed console commands to store.
Token
|
Description
| Values | Range | Default |
---|
N | Total of stored commands | | 0..10000 | 1000 |
.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1000 | 1000 |
Sets the resolution for the minimap.
Token
|
Description
| Values | Range | Default |
---|
N | the resolution | | 7..10 | 9 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
Shows ammo statistics like version 1.0
Token
|
Description
| Values | Range | Default |
---|
N | 0: new, 1: old | | 0..1 | 0 |
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 |
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 |
change at what height you are floating in the radar-view
Token
|
Description
| Values | Range | Default |
---|
H | height | | 5..500 | 150 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1000 | 100 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1000 | 40 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..10 | 2 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
Choose 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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Enables or disables showing the player's horizontal speed.
Token
|
Description
| Values | Range | Default |
---|
N | 0 off, 1 on | | 0..1 | 0 |
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 |
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 |
Turns on/off the display of the hudgun while spectating a player in first-person view. Works in demo mode as well.
Token
|
Description
| Values | Range | Default |
---|
V | show/hide hudgun when spectating | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..1000 | 200 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..1000 | 105 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..1000 | 200 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..1000 | 105 |
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.
Adds a new category in the serverbrowser favourites.
Argument | Description | Values |
---|
A | reference designator (keep short and unique) | |
Sets automated team assignment.
Argument | Description | Values |
---|
B | Enables or disables auto team. | 1 (On), 0 (Off) |
Temporary ban of the specified player from the server.
Argument | Description | Values |
---|
CN | The player to ban | Client number |
Calls a vote on the server.
Argument | Description | Values |
---|
T | Vote type | value |
A | First argument | |
B | Second argument | |
Clears all demos currently in memory on the server.
Deletes a map from the current server.
Argument | Description | Values |
---|
A | map name | |
Calls a vote to forceteam yourself to the specified team.
Argument | Description | Values |
---|
T | the team to force yourself to (optional) | 0-4 |
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 |
Gives admin state to the specified player.
Argument | Description | Values |
---|
CN | The player to become admin | Client number |
Hide favourites icons in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | 0: show, 1: hide | | 0..1 | 0 |
Kicks the specified player from the server.
Argument | Description | Values |
---|
CN | The player to kick | Client number |
List all registered serverbrowser favourites categories
Sets the mastermode for the server.
Argument | Description | Values |
---|
N | The master mode | 0 (Open), 1 (Private), 2 (Match) |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..24*60*60 | 60*60 |
Sets the number of servers to be pinged at once.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1000 | 10 |
Removes all temporary bans from the server. Temporary bans are normally automatically removed after 20 minutes.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..2 | 1 |
Search a nickname (or -part) on all servers.
Argument | Description | Values |
---|
N | nickname to search | |
Sends a map to the server.
Argument | Description | Values |
---|
M | map to send (optional) | |
Hide favourites tag column in serverbrowser
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..2 | 1 |
Hide server IP and port in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..2 | 2 |
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.
Argument | Description | Values |
---|
D | description | |
Modded servers announcement of features. See source/src/server.cpp [Line 2926ff. "case SV_EXTENSION:"]
Argument | Description | Values |
---|
E | extension | |
D | description | |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..NUMSERVSORT-1 | 0 |
Select ascending of descending sort order in serverbrowser.
Sort official maps over custom maps in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1000..60000 | 5000 |
Claims or drops admin status.
Argument | Description | Values |
---|
B | Status | 1 (Claim), 0 (Drop) |
PASS | Password | case sensitive |
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 |
Show 'minutes remaining' in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | | | 0..1 | 0 |
Show player names in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 0 |
Show only servers of one favourites category in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | category index | | 0..100 | 0 |
Show only servers with the correct protocol in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 0 |
Show 'weights' in serverbrowser.
Token
|
Description
| Values | Range | Default |
---|
N | | | 0..1 | 0 |
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.
Editing
A variable indicating if the game is in editmode.
Description
| Values | Range | Default |
---|
editmode | 1 (true), 0 (false) | 0..1 | 0 |
Select the given area, as if dragged with the mouse holding CTRL.
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 | |
Adds a bot waypoint at the current position.
Argument | Description | Values |
---|
A | connect automatically | 0 or 1 |
Select the increment of the map revision number for the next 'savemap'.
Token
|
Description
| Values | Range | Default |
---|
N | increment | | 1..100 | 1 |
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 |
Deletes the entity closest to the player
During map editing, drop all mapsounds so they can be re-added.
Makes an arch out of the current selection.
Argument | Description | Values |
---|
S | side delta (optional) | |
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 |
Automatically place waypoints.
Deletes all entities of said type.
Argument | Description | Values |
---|
T | the entity type, see command 'newent' | string |
Restrict 'closest entity' display to one entity type.
Argument | Description | Values |
---|
A | entity type | |
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.
Copies the current selection into a buffer.
Copies the current closest entity into a buffer.
Makes the current selection into a "corner".
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)
Deletes the entity closest to the player
Deletes the selected waypoint.
Contains the main axis of the player orientation.
Token
|
Description
| Values | Range | Default |
---|
N | 11: X, 12: Y, 13: Z | | 0..13 | 0 |
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) |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..0 | 0 |
Argument | Description | Values |
---|
T | tag | integer value |
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) |
switches between map edit mode and normal.
Changes property of the closest entity.
Argument | Description | Values |
---|
P | the property to change | 0..3 |
A | amount by wich the property is increased | integer |
entset type value1 value2 value3 value4
Edits the closest entity.
Argument | Description | Values |
---|
type | the entity type | light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet |
value1 | see newent 'type' | |
value2 | see newent 'type' | |
value3 | see newent 'type' | |
value4 | see newent 'type' | |
Print some map entity statistics to the console.
Levels the floor/ceiling of the selection.
Argument | Description | Values |
---|
T | an integer denoting the type | 0 (floor), 2 (ceiling) |
Increases the size of the current selection by N cubes on all sides.
Argument | Description | Values |
---|
N | number of cubes | integer |
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 |
Determines by how much to multiply the fly speeds by.
Token
|
Description
| Values | Range | Default |
---|
N | the multiplier | | 1.0..5.0 | 2.0 |
Sets all light values to fullbright.
Argument | Description | Values |
---|
B | sets fullbright on or off | 0 (off), 1 (on) |
Returns the map message of the current map.
Enables or disables a special set of default textures while editing.
Marks the current selection as a heightfield.
Argument | Description | Values |
---|
T | an integer denoting the type | 0 (floor), 2 (ceiling) |
Used to finetune the "overbright lighting" rendering feature when enabled.
Token
|
Description
| Values | Range | Default |
---|
N | the brightness of the scene | | 1..100 | 4 |
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 |
Enlarges the current map.
Sets the map message, which will be displayed when the map loads.
Argument | Description | Values |
---|
M | The map message | String |
Reduces the world size by 1.
Move the whole map (including all entities) in the specified direction.
Argument | Description | Values |
---|
dX | x-offset | |
dY | y-offset | |
dZ | z-offset | |
newent type value1 value2 value3 value4
Adds a new entity
Argument | Description | Values |
---|
type | the entity type | light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet |
value1 | see newent 'type' | |
value2 | see newent 'type' | |
value3 | see newent 'type' | |
value4 | see newent 'type' | |
Adds a new ammo box item.
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 |
Adds a CTF flag entity.
Argument | Description | Values |
---|
T | denotes the flag's team | 0 (CLA), 1 (RVSF) |
Adds a new grenades item.
Adds a ladder entity.
Argument | Description | Values |
---|
H | the height of the ladder | integer |
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 |
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 |
Adds a pistol magazine item.
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 |
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 |
Creates a new map.
Argument | Description | Values |
---|
S | the size of the new map | 6..9 |
Binds a list of keys to be used to create new (multiple) selections in editmode.
Example:
newselkeys = [LCTRL RCTRL LALT RALT]Makes all 4 keys create new (multiple) selections in editmode.
Choose another 'closest ent'.
Visit next player spawn entity.
Argument | Description | Values |
---|
TYPE | 0|1|100 | |
Enables or disables the old editing binds.
Example:
old_editbinds = 0disables the old editing binds
Example:
old_editbinds = 1enables the old editing binds
Enables or disables using triangles to render the editing grid/current selection instead of squares.
Token
|
Description
| Values | Range | Default |
---|
N | 0 off, 1 on | | 0..1 | 1 |
If this alias exists, it will be automatically executed when you start a new map.
Pastes a previously copied selection.
Pastes a previously copied entity.
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) | |
Recomputes all there is to recompute about a map, currently only lighting.
Registers a sound.
Argument | Description | Values |
---|
N | sound name | string, see config/sounds.cfg |
Repeats the last texture edit throughout the map.
Resets all current selections.
Saves the current map.
Argument | Description | Values |
---|
M | file name of the map, see command 'map' for the naming scheme | string |
Scales all lights in the map.
Argument | Description | Values |
---|
S | size change (percentage) | |
I | intensity change (percentage) | |
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 | |
Flip the selected part of the map at an axis.
Argument | Description | Values |
---|
AXIS | X or Y | |
Rotate the selected part of the map in 90 degree steps.
Argument | Description | Values |
---|
D | steps | |
Return a list containg the x-coordinate of each selection
Return a list containg the x-span of each selection
Return a list containg the y-coordinate of each selection
Return a list containg the y-span of each selection
Set 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) |
takes the current player yaw for the current waypoint
Show clips/plclips/mapmodel clips in edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 1 |
Show editing cursor grid.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 1 |
Toggles between showing what parts of the scenery are rendered.
Show mapmodel clipping during edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 0 |
Decreases the size of the current selection by N cubes on all sides.
Argument | Description | Values |
---|
N | number of cubes | integer |
Makes a slope out of the current selection.
Argument | Description | Values |
---|
X | x delta step | integer |
Y | y delta step | integer |
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) |
teletransports the bot with the lowest connection number to you current position.
Argument | Description | Values |
---|
| this command does not take any arguments | none |
Argument | Description | Values |
---|
D | direction | 0..5 for Forward, Backward, Left, Right, Up AND Down |
When used you will see what the bot sees. Type it again (with or without name) to return to the game(you will respawn).
Argument | Description | Values |
---|
N | botname | the name of the bot |
Will toggle the focus of the mouse in game. Normally you can use your mouse to look around, when you type this command your mouse cursor is visible and can be used as normally. This is only useful when you run cube windowed.
Turns occlusion culling on and off.
Multi-level undo of any of the changes caused by editing operations
Sets the number of megabytes used for the undo buffer.
Argument | Description | Values |
---|
N | number of megabytes, default is 1 | integer |
changes the vdelta value of the current selection
Argument | Description | Values |
---|
N | vdelta value | |
Sets the global water level for the map.
Argument | Description | Values |
---|
H | the water level | integer |
makes waypoints visible and either turns on or off the waypoint information display.
Argument | Description | Values |
---|
Y | show info? | 0||1 |
Argument | Description | Values |
---|
V | visible | 0||1 |