CubeScript
This section describes identifiers that are closely related to the CubeScript language.
Performs a subtraction.
Argument | Description | Values |
---|
A | the minuend | |
B | the subtrahend | |
Return value: the difference
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
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)
Performs the operation NOT using binary arithmetic on integer values (32-bit signed).
Argument | Description | Values |
---|
A | argument | |
Performs a multiplication 2 or more numbers.
Argument | Description | Values |
---|
A | the multiplicand | |
B | the multiplier(s) | |
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 2 or more numbers.
Argument | Description | Values |
---|
A | the multiplicand | |
B | the multiplier(s) | |
Return value: the product
Adds color to a string.
Argument | Description | Values |
---|
N | color id | 0-9, A-Z |
Example:
echo "\f3Hello \f0world!"Output: a red "Hello" and a green "world!"
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 the operation AND using binary arithmetic on integer values (32-bit signed).
Argument | Description | Values |
---|
A | the first argument | |
B | the second argument | |
Performs the operation XOR using binary arithmetic on integer values (32-bit signed).
Argument | Description | Values |
---|
A | the first argument | |
B | the second argument | |
Performs an addition 2 or more numbers.
Argument | Description | Values |
---|
A | the first summand | |
B | the summand(s) | |
Return value: the sum
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 or more floating-point numbers.
Argument | Description | Values |
---|
A | the first summand | float |
B | the summand(s) | float |
Return value: the sum
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 to 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 to 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)
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
Performs the operation OR using binary arithmetic on integer values (32-bit signed).
Argument | Description | Values |
---|
A | the first argument | |
B | the second argument | |
This will append the passed 2nd argument to any existing content of the alias named in the 1st argument.
Argument | Description | Values |
---|
A | the alias to add to | |
E | the new element to add | |
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.
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 | ID or name | 0 (quotes), 1 (brackets), 2 (parenthesis), 3 (_$_), 4 (quote), 5 (percent) |
Example:
echo (addpunct hello)Output: "hello"
Example:
echo (addpunct hello 1)Output: [hello]
Example:
echo (addpunct hello 2)Output: (hello)
Example:
echo (addpunct hello 3)Output: $hello
Example:
test = (concat echo (addpunct fov 3)); testOutput: 90.0
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
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
Deletes the passed alias.
Argument | Description | Values |
---|
N | the name of the alias | string, must not contain '$' |
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)
Interactively edits an alias in the console buffer.
Argument | Description | Values |
---|
A | alias to edit | the alias name, without $ |
Example:
alias test "Hello World"; editalias testResult: edit test: Hello World
Interactively edits an existing alias in the console buffer.
Argument | Description | Values |
---|
A | alias to edit | the alias name, without $ |
Example:
alias test "Hello World"; editsvar testResult: edit test: Hello World
Lists all persistent aliases that start with prefix.
Replaces control characters in a string with escaped sequences.
Argument | Description | Values |
---|
S | string to escape | |
Example:
echo (escape (concat (c 3) "Hello World"))Output: "\f3Hello World"
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
Searches a list for a specified value.
Argument | Description | Values |
---|
L | the list | |
I | the item to find | |
Return value: the index of the item in the list
Floor 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
Returns the value of the alias.
Argument | Description | Values |
---|
N | alias name | |
Gets range attribute for builtin variable.
Argument | Description | Values |
---|
W | what | min, max, default |
N | the name of any builtin variable (integer or float) | |
Returns value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision).
Argument | Description | Values |
---|
P | precision | |
V | value | |
Example:
echo (h0 2 1024)Output: 400
Example:
echo (h0 4 1024)Output: 0400
Example:
echo (h0 6 1024)Output: 000400
Example:
echo (h0 0 (&b 0xe 0x3))Output: 2
Example:
echo (h0 0 (|b 0xe 0x3))Output: f
Example:
echo (h0 0 (^b 0xe 0x3))Output: d
Example:
echo (h0 0 (!b 0xe))Output: fffffff1
Example:
echo (h0 0 (* -1 0xe))Output: fffffff2
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 ]
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 whether or not there is an identifier by that name.
Argument | Description | Values |
---|
N | identifier name | |
Isolates the given context.
Argument | Description | Values |
---|
C | context (integer or name) | CORE (0), CFG (1), PROMPT (2), MAPCFG (3), MDLCFG(4) |
Leading zeros for the number V to make it W chars wide.
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 | |
Lists the argument options for several argument types.
Example:
echo (listoptions)
Output: "entities ents weapons teamnames teamnames-abbrv punctuations crosshairnames
menufilesortorders texturestacktypes cubetypes"
Example:
echo (listoptions teamnames)Output: "CLA RVSF CLA-SPECT RVSF-SPECT SPECTATOR"
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(es) containing the current element value | |
body | the body to execute on each iteration | |
Example:
looplist "zero one two three" number [echo $number]
Example:
looplist [0 "is knife" 1 "is pistol"] [n w] [echo weapon $n $w]
Browses a list and executes a body for each element.
Argument | Description | Values |
---|
V | the list to browse | |
N | the alias(es) containing the current element value | |
body | the body to execute on each iteration | |
Example:
a = [u v w]; b = [x y z]; looplisti $a m [echo $m (at $b $i) $i]Output: u x 0 , v y 1 , w z 2
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..24 | 0 |
Controls whether aliases defined afterwards will be saved (1) or not (0).
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:
p = 1; push p 2; 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 | |
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
Rounds the given float.
Argument | Description | Values |
---|
F | the float number to round | |
Return value: the rounded integer, the precision is 1 unit
Argument | Description | Values |
---|
C | context (integer or name) | CORE (0), CFG (1), PROMPT (2), MAPCFG (3), MDLCFG(4) |
N | id name | |
Secures this configuration for the rest of the game.
Executes a command after specified time period.
Argument | Description | Values |
---|
N | the amount of milliseconds | |
C | the command to execute | |
P | ignore map change (optional) | |
Example:
sleep 1000 [ echo foo ]Prints 'foo' to the screen after 1 second.
Returns a sorted version of a list.
Argument | Description | Values |
---|
L | list to sort | |
Example:
echo (sortlist [1 3 2])Output: 1 2 3
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 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: integer, 0 (not found) or position (if found)
Copies a substring out of the original.
Argument | Description | Values |
---|
S | the original string | |
A | start position | |
L | substring length (optional) | |
Example:
echo (substr abcdefgh 2 5)Output: cdefg
Example:
echo (substr abcdefgh -3 2)Output: fg
Example:
echo (substr abcdefgh 2)Output: cdefgh
Example:
echo (substr abcdefgh 1 -2)Output: bcdefg
Return value: the substring
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
Creates a temporary alias that will not be written to saved.cfg, and thus will not persist after quitting.
Argument | Description | Values |
---|
N | temporary alias name | |
C | cubescript command(s) | |
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
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) ]
General
This section describes general identifiers.
Adds a packages source server where to download custom content from.
Argument | Description | Values |
---|
S | The server address. Trailing slash not needed. | |
P | priority of the server | |
Example:
addpckserver http://packages.ac-akimbo.net
Add the zip package file "mods/zipname.zip" to the virtual file system.
Argument | Description | Values |
---|
N | the name of the zip mod | |
If defined, this will be executed after saved.cfg is loaded.
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 |
Toggles the showing of the "Apply changes now?" menu when changing certain graphical settings.
Token
|
Description
| Values | Range | Default |
---|
N | 1 = show, 0 = don't show | | 0..1 | 1 |
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 |
When the variable autodownloaddebug is set to 1 and/or in debug binaries, more debug output is produced.
Token
|
Description
| Values | Range | Default |
---|
V | Add debug info to autodownload | | 0..1 | 0 |
If defined, this will be executed after autoexec.cfg is loaded.
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 |
Takes 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 |
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").
Returns text from the last line in the console.
Indicates if a connection to a server exists.
Description
| Values | Range | Default |
---|
the connection state | 1 (connected), 0 (disconnected) | 0..1 | 0 |
Indicates the state of the console.
Description
| Values | Range | Default |
---|
console state | 0: closed, 1: open in an alternate size, 2: open regularly | 0..2 | 0 |
Allows to browse through the console history by offsetting the console output.
Argument | Description | Values |
---|
N | the offset | |
default keys:
- on the keypad - scrolls backwards the console (conskip 5)
+ on the keypad - scrolls forwards the console (conskip -5)
* on the keypad - resets the console (conskip -1000)
'# or \' + mouse scroll - scrolls the console
Compare given version to current version.
Argument | Description | Values |
---|
s | newest available version | |
Representation of date.
Example:
echo (datestring) "Sat Jun 7 17:08:35 2008"
Output statistics and errors when handling zip compressed data.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:yes | 0..1 | 0 |
Dumps all command arguments to STDOUT.
Argument | Description | Values |
---|
... | ... | |
Whether or not to output input events.
Token
|
Description
| Values | Range | Default |
---|
T | threshhold | 0:off,1/2:on | 0..2 | 0 |
Disconnect from a server making us load an incompatible map.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:yes | 0..1 | 1 |
Outputs text to the console.
Argument | Description | Values |
---|
L | List of strings | |
Lists files in a directory.
Argument | Description | Values |
---|
P | path to directory | |
E | extension | |
Executes all commands in a specified config file.
Argument | Description | Values |
---|
C | the config file | |
Executes all commands in all config files in the specified directory.
Argument | Description | Values |
---|
s | the directory path from the assaultcube root | |
Returns a list of values describing the current engine (rendering) state.
Example:
echo (getEngineState)
Returns a table with four columns of all configured package servers.
Returns the file extension of the client's current screenshottype setting.
Example:
echo (getscrext)Example output: .jpg
Controls how many variables (with similar names) are grouped together on one line in saved.cfg.
Token
|
Description
| Values | Range | Default |
---|
N | Variables per line | | 0..10 | 4 |
Executes the specified command in the command line history.
Argument | Description | Values |
---|
N | the N'th command from the history | |
Outputs text to the console and heads up display.
Argument | Description | Values |
---|
L | List of strings | |
Sets the JPEG screenshot image quality.
Token
|
Description
| Values | Range | Default |
---|
N | Compression level | | 10..100 | 70 |
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 | | .. | |
Saves an image of the entire radar-overview of the map.
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 |
Returns the number of milliseconds since engine start.
Return value: the milliseconds
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.
Omit unchanged default binds from saved.cfg.
Token
|
Description
| Values | Range | Default |
---|
N | 0 = print; 1 = print, but commented out; 2 = omit | | 0..2 | 1 |
Omit variables with unchanged default values from saved.cfg.
Token
|
Description
| Values | Range | Default |
---|
N | 0 = print, but commented out; 1 = omit | | 0..1 | 1 |
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.
Determines if all settings should be reset when the game quits.
Token
|
Description
| Values | Range | Default |
---|
B | enable reset | | 0..1 | 0 |
Resets the list of packages source servers where to download custom content from.
Clears the list of secured maps.
Executes a config file within "config" folder.
Argument | Description | Values |
---|
N | the file name (without extension) | |
Puts a prompt on screen.
Argument | Description | Values |
---|
S... | the text to display in the prompt (optional) | |
default keys:
T - opens empty prompt
` or / or ^ - opens a command prompt /
Y - opens a command prompt % (for team chat)
Tab - autocompletes forwards commands/variables/aliases
left Shift + Tab - autocompletes backwards commands/variables/aliases
left Shift + Esc - resets the commandline to the state before using TAB-completion
Up Arrow - browse forwards command history
Down Arrow - browse backwards command history
Takes a screenshot.
default key: F12
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 | |
Argument | Description | Values |
---|
T | Text to put in the clipboard. | |
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"
Gets an integer representing the game version. READ ONLY
Writes current configuration to config/saved.cfg - automatic on quit.
Maximal size of the file, which is cached in memory.
Token
|
Description
| Values | Range | Default |
---|
S | size [kB] | | 0..1024 | 512 |
Removes all zip files from the virtual file system.
Reads and returns the first 11 lines from the file "desc.txt" in the named zip file.
Argument | Description | Values |
---|
N | the name of the zip mod | |
Returns the list of files contained in a zip file.
Argument | Description | Values |
---|
N | the name of the zip mod | |
Returns the revision number of the zip file.
Argument | Description | Values |
---|
N | the name of the zip mod | |
Lists zip files in "mods/".
Argument | Description | Values |
---|
W | what | all, active, inactive |
Removes one zip file from the virtual file system.
Argument | Description | Values |
---|
N | the name of the zip mod | |
Gameplay
This section describes gameplay related identifiers.
Whether or not to automatically switch to akimbo upon pickup.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:yes | 0..1 | 1 |
Sets the behavior of weapon switching upon akimbo expiration.
Argument | Description | Values |
---|
| switch to knife | 0 |
| stay with pistol | 1 |
| switch to grenades | 2 |
| switch to primary | 3 |
Fires the current weapon.
default key: left mouse button
Indicates if the weapons should be reloaded automatically.
Token
|
Description
| Values | Range | Default |
---|
B | the autoreload state | 0: off, 1: on | 0..1 | 1 |
Moves the player backward.
default key: S or Down Arrow
Moves from active team to spectator during match.
Sets the firing mode of automatic weapons between full auto mode and burst fire mode.
Argument | Description | Values |
---|
N | the weapon number or name | 4 (subgun), 6 (assault), 8 (akimbo) |
S | shots per burst | Special values: 0: set weapon to full auto, -1: don't set, instead check and return shots per burst |
Argument | Description | Values |
---|
D | delta | how many players to shift +/- |
Swaps your player to the enemy team.
Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve)
Argument | Description | Values |
---|
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo) |
Clear list of ignored players.
Argument | Description | Values |
---|
A | client number, or -1 to clear the whole list | |
Clears a list of muted players.
Argument | Description | Values |
---|
A | client number, or -1 to clear the whole list | |
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".
Triggers a crouch.
default key: left Shift
Returns the server's current autoteam state.
Returns the name of played demo.
Returns the current map being played.
Current map revision number.
Returns the server's current mastermode state.
Returns the nick name of the local player.
Returns the server's current pause state (1=paused, 0=resumed).
Returns the size of the players vector.
Returns the weapon-index the local player currently has selected as primary.
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 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 zone marker with the specified color and dimensions on the minimap/radar.
Argument | Description | Values |
---|
X1 | X-coordinate - top-left corner | |
X2 | X-coordinate - bottom-right corner | |
Y1 | Y-coordinate - top-left corner | |
Y2 | Y-coordinate - bottom-right corner | |
C | a color for the zone, in hexadecimal notation | default: 0x00FF00 (green) |
Drops the taken flag.
default key: Backspace
Finds client number (cn) of player with given name.
Argument | Description | Values |
---|
N | player name | |
Determines by how much to multiply the fly speeds by.
Token
|
Description
| Values | Range | Default |
---|
N | the multiplier | | 1.0..5.0 | 2.0 |
Moves the player forward.
default key: W or Up Arrow
Sets the frag message corresponding to a weapon (appearing on the hud).
Argument | Description | Values |
---|
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo) |
M | the message you want to appear | example: sniped |
Example:
fragmessage sniper snipedIt will display "you sniped unarmed" on the hud when you frag unarmed with sniper.
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.
Gets the recorded demo from a game on the server.
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) | |
Try to download mods/modname.zip from all configured package servers.
Argument | Description | Values |
---|
N | the name of the mod | |
Sets the gib message corresponding to a weapon (appearing on the hud).
Argument | Description | Values |
---|
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo) |
M | the message you want to appear | example: slashed |
Toggles between your primary weapon and grenades (must be bound to a key).
Go to the next match in the servers rotation for the desired gamemode.
Argument | Description | Values |
---|
M | gamemode | 0:TDM,5:CTF,10:OSOK |
Switches to grenades, if available (must be bound to a key).
default key: 3 - switches to grenades
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.
Returns the highest valid client number available.
Ignore a player.
Argument | Description | Values |
---|
A | client number | |
Ignore all clients currently on the server.
Ignore all clients on the enemy team.
Ignore all clients on the specified team.
Argument | Description | Values |
---|
T | the team to ignore | 0 or 1 || cla or rvsf |
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
Triggers a jump.
default key: Space or right Ctrl
Toggles between your primary weapon and knife (must be bound to a key).
Tries to connect to a LAN server.
Returns the last time (in milliseconds) the gametime was updated. READ ONLY
Holds the CN of the last client who sent you a private message.
Moves the player left.
default key: A or Left Arrow
Get the game demos listing from the server we are currently connected.
Print a list of all players that you are currently ignoring.
Prints a list of all players that you have muted.
Loads a crosshair for given type.
Argument | Description | Values |
---|
T | type | default, teammate, scope, edit, knife, pistol, carbine, shotgun, subgun, sniper, assault, grenade, akimbo, reset |
I | image | |
Example:
loadcrosshair red_dot.pngLoads the red_dot.png crosshair for all weapons.
Example:
loadcrosshair default red_dot.pngSame as above. Loads the red_dot.png crosshair for all weapons.
Example:
loadcrosshair knife red_dot.pngLoads the red_dot.png crosshair for your knife only.
Example:
loadcrosshair assault red_dot.pngLoads the red_dot.png crosshair for your assault rifle only.
Example:
loadcrosshair scope red_dot.pngLoads the red_dot.png crosshair for your sniper rifle scope only.
Example:
loadcrosshair resetLoads all default crosshairs (including teammate and scope).
Loads a map directly in the current gamemode (singleplayer only).
Argument | Description | Values |
---|
M | map name | |
Returns contents of current magazine.
Argument | Description | Values |
---|
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo) |
Returns contents of magazine reserve.
Argument | Description | Values |
---|
N | the weapon number or name | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo) |
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.
Action chat message.
Argument | Description | Values |
---|
... | ... | |
Switches to knife (must be bound to a key).
default keys:
4 - switches to knife
middle mouse button - switches to knife and attacks (if the key is held)
Returns the remaining minutes of the currently played game. READ ONLY
Connects to a modded server.
Argument | Description | Values |
---|
A | IP | |
B | port | |
C | password | |
Connects to a modded server and tries to claim admin state.
Argument | Description | Values |
---|
A | IP | |
B | port | |
C | admin password | |
Tries to connect to a modified LAN server.
Mutes a player.
Argument | Description | Values |
---|
A | client number | |
Sets the nick name for the local player.
Argument | Description | Values |
---|
N | the name | |
Sets the primary weapon on next respawn.
Argument | Description | Values |
---|
A | the weapon number or name | 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault) |
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 changed name | 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 when another player sent you private message.
Argument | Description | Values |
---|
player | The client number who sent you private message | integer |
message | The private message | string |
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 number that you switched to | |
Vote to pause or resume the match.
Argument | Description | Values |
---|
P | pause or resume | 1 (pause) or 0 (resume) |
Determines if the singleplayer game should be paused.
Token
|
Description
| Values | Range | Default |
---|
B | pause game | | 0..1 | 0 |
default key: Pause
Retrieve an attribute of a player identified by clientnum.
Argument | Description | Values |
---|
C | clientnum | 1,2,3,.. |
A | attribute | magcontent, ammo, primary, .. |
Retrieve an attribute of yourself.
Argument | Description | Values |
---|
A | attribute | magcontent, ammo, primary, .. |
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 bound to a key).
default key: 1
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 last client who sent you a private message.
default key: N
Switches to grenades, if available (must be bound to a key).
default keys:
G - for all weapons
right mouse button - for all weapons except sniper rifle
Disconnects then reconnects you to the current server.
Argument | Description | Values |
---|
P | the server password (optional) | |
Reloads the weapon.
Argument | Description | Values |
---|
A | | value |
default key: R
Rewind the current demo to S seconds ago.
Argument | Description | Values |
---|
S | the number of seconds to rewind | |
Moves the player right.
default key: D or Right Arrow
Outputs text to other players.
Argument | Description | Values |
---|
S... | the text | |
Determines the FOV when scoping.
Token
|
Description
| Values | Range | Default |
---|
V | | | 5..60 | 50 |
Switches to your secondary weapon (must be bound to a key).
default key: 2
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 | |
Call a vote for mode and map.
Argument | Description | Values |
---|
G | gamemode | 0:TDM,5:CTF,10:OSOK |
M | map | ac_mines,ac_douze,megamap |
Displays a scope for the sniper-rifle.
Argument | Description | Values |
---|
Y | scope on? | 0 or 1 |
default key: right mouse button
Shifts your selected weapon by a given delta.
Argument | Description | Values |
---|
D | delta | -N..-1,+1..N |
default keys:
MOUSE4 - cycle one up
MOUSE5 - cycle one down
Toggles between your primary weapon and secondary weapon (must be bound to a key).
Returns client number of spectated player.
Sets the desired spectating mode.
Argument | Description | Values |
---|
M | the mode | 2 (1st-person), 3 (3rd-person), 4 (3rd-person transparent), 5 (free flying) |
default key: SPACE - switch spectator mode
Enables persistent spectating concrete player.
Token
|
Description
| Values | Range | Default |
---|
N | 0: enabled in non-arena modes, 1: always enabled | | 0..1 | 1 |
If this alias exists it will be run when the game reaches intermission.
Example:
start_intermission = [
echo "INTERMISSION - STATISTICS TIME"
loop p 255 [
pn = (player $p name)
if (strcmp $pn "") [ ] [
echo (concatword Player $p ":") (pstat_score $p) ":" (pstat_weap $p)
]
]
echo "------------------------------"
]
This will output the full statistics line for all players.
Kills your player. You will lose 1 frag point and receive 1 death point when using this command.
Sets the team for the local player.
Argument | Description | Values |
---|
N | the team number or name | 0 (CLA), 1 (RVSF), 2 (CLA-SPECT), 3 (RVSF-SPECT), 4 (SPECTATOR) |
Returns attributes of a team.
Argument | Description | Values |
---|
T | Team | cla, rvsf, 0, 1 |
A | Attribute | Valid attributes: flags, frags, deaths, points, name, players |
Cycles through all available spectator modes.
default key: SPACE - cycle spectator modes
Unignore all clients currently on the server.
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 (must be bound to a key).
Argument | Description | Values |
---|
N | the number/name of available weapon | 0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo) |
Prints the local client's (x,y) coordinates.
Get the IP address of a given clientnumber - only admins get shown the last octet.
Argument | Description | Values |
---|
C | clientnum | |
Returns the team number with the highest score, or if in a non-team mode, returns the CN of the player with the highest score.
Game modes
Starts a map with the mode "Bot Deathmatch".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Bot Last Swiss Standing".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Bot One Shot, One Kill".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Example:
bosok ac_complex
Starts a map with the mode "Bot Pistol Frenzy".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Bot Team Deathmatch".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Bot Team One Shot, One Kill".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Example:
btosok ac_complex
Starts a map with the mode "Bot Team Survivor".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Example:
btsurv ac_complex
Starts a map with the mode "Co-operative Editing".
Argument | Description | Values |
---|
M | The name of the map you wish to edit | |
Starts a map with the mode "Capture the Flag".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Checks the current game mode for certain attributes.
Argument | Description | Values |
---|
A | attribute name | |
Starts a map with the mode "Deathmatch".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Returns the number of current game mode.
Example:
echo $gamemodeOutput: 5
Argument | Description | Values |
---|
M | mode | integer |
D | description | string |
Returns the name of current game mode.
Argument | Description | Values |
---|
N | 0 = full mode name, 1 = mode acronym | min 0/max 1/default 0 |
Example:
echo (getmode)Example output: capture the flag
Example:
echo (getmode 1)Example output: CTF
Starts a map with the mode "Hunt the Flag".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Keep the Flag".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Survivor". Some players prefer the name "Last Man Standing" for this mode.
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Last Swiss Standing".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Sets the gameplay mode to N for the next map loaded.
Argument | Description | Values |
---|
N | Team Deathmatch | 0 |
| Co-op edit | 1 |
| Deathmatch | 2 |
| Survivor | 3 |
| Team Survivor | 4 |
| Capture the Flag | 5 |
| Pistol Frenzy | 6 |
| Bot Team Deathmatch | 7 |
| Bot Deathmatch | 8 |
| Last Swiss Standing | 9 |
| One Shot, One Kill | 10 |
| Team One Shot, One Kill | 11 |
| Bot One Shot, One Kill | 12 |
| Hunt the Flag | 13 |
| Team Keep the Flag | 14 |
| Keep the Flag | 15 |
| Team Pistol Frenzy | 16 |
| Team Last Swiss Standing | 17 |
| Bot Pistol Frenzy | 18 |
| Bot Last Swiss Standing | 19 |
| Bot Team Survivor | 20 |
| Bot Team One Shot, One Kill | 21 |
Example:
mode 7; map ac_complex; echo "Bot Team Deathmatch on ac_complex"
Example:
mode 8; map ac_mines 4; echo "Bot Deathmatch on ac_mines for 4 minutes"
Example:
mode 5; map ac_shine; echo "CTF @ ac_shine"
See also:
map,
gamemode,
getmode,
curmodeattr,
modeacronyms,
modenum,
tdm,
coop,
dm,
surv,
tsurv,
ctf,
tpf,
pf,
tlss,
lss,
osok,
tosok,
htf,
tktf,
ktf,
btdm,
bdm,
bpf,
blss,
btsurv,
bosok,
btosok,
GamemodesToggles use of acronyms instead of full modenames in the serverbrowser, scoreboard, voting info.
Token
|
Description
| Values | Range | Default |
---|
B | | | 0..1 | 0 |
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
Starts a map with the mode "One Shot, One Kill".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Pistol Frenzy".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
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 |
Starts a map with the mode "Survivor".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 10 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Team Deathmatch".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Team Keep the Flag".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Team Last Swiss Standing".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Team One Shot, One Kill".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Example:
tosok ac_complex
Starts a map with the mode "Team Pistol Frenzy".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Starts a map with the mode "Team Survivor".
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Example:
tsurv ac_complex
Starts a map with the mode "Hunt the Flag". Some players prefer the name "VIP" for this mode.
Argument | Description | Values |
---|
M | The name of the map you wish to play | |
T | The time limit, in minutes (default 15 minutes if T is 0 or not specified) | 1..60 |
Keyboard and mouse
This section describes keyboard and mouse related identifiers.
Whether or not the next call to _resetallbinds will remove any and all binds; cleaning up before setting the default bindings.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:yes | 0..1 | 0 |
Clears all binds for all keys and all modes, including self-assigned ones.
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 | |
Switches between scopesensscale and autoscopesensscale.
Token
|
Description
| Values | Range | Default |
---|
N | auto on/off | | 0 (scopesensscale)..1 (autoscopesens) | 0 |
Binds a key to a command.
Argument | Description | Values |
---|
K | the key to bind | string |
A | the command | string, usually an alias |
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 |
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
Sets mouse to "flight sim" mode.
Token
|
Description
| Values | Range | Default |
---|
B | sets invmouse | 1:inverted Y-axis | 0..1 | 0 |
Returns the contents of a keybind, bound with 'bind'.
Argument | Description | Values |
---|
K | name of key | |
Returns the contents of a keybind, bound with 'editbind'.
Argument | Description | Values |
---|
K | name of key | |
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 | |
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)]
Returns the contents of a keybind, bound with 'specbind'.
Argument | Description | Values |
---|
K | name of key | |
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!]
Sets the degree of mouse filtering (0.0 being no filtering).
Token
|
Description
| Values | Range | Default |
---|
N | Amount of mouse filtration | | 0.0..6.0 | 0.0 |
Indicates if a CTRL key is pressed.
Description
| Values | Range | Default |
---|
state of the CTRL key | 0: unpressed, 1: pressed | 0..1 | 0 |
Is the CTRL currently key pressed?
Sets the mouse acceleration.
Token
|
Description
| Values | Range | Default |
---|
N | acceleration factor | | 0.0..1000.0 | 0.0 |
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" ] ]
The way the mouse movement is handled.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 0:warped, 1:relative | 0..1 | 1 |
Resets all binds back to their default values.
Mouse sensitivity while scoped.
Token
|
Description
| Values | Range | Default |
---|
N | scoped sensitivity | | 0..1000 | 0 |
Change sensitivity when scoping.
Token
|
Description
| Values | Range | Default |
---|
N | factor to change sensitivity while scoped | | 0.001..1000.0 | 0.5 |
Enable a workaround for buggy SDL X11 pointer grabbing.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:use workaround | 0..1 | 0 |
Searches keybinds (bound with 'bind'), returns keys with matching contents.
Argument | Description | Values |
---|
S | search string | |
Example:
echo (searchbinds "reload")Output: R
Searches keybinds (bound with 'editbind'), returns keys with matching contents.
Argument | Description | Values |
---|
s | search string | |
Example:
echo (searcheditbinds "toggleocull")Output: F5
Searches keybinds (bound with 'specbind'), returns keys with matching contents.
Argument | Description | Values |
---|
s | search string | |
Sets the mouse sensitivity.
Token
|
Description
| Values | Range | Default |
---|
S | the sensitivity | floating-point | 0.001..1000 | 3.0 |
Scales all mouse sensitivity values.
Token
|
Description
| Values | Range | Default |
---|
N | the sensitivity scale | | 0.001..1000.0 | 1.0 |
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 |
Toggles grabbing of mouse and keyboard input in a game.
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 |
Time in milliseconds before the abovehead icon dissapears.
Token
|
Description
| Values | Range | Default |
---|
V | abovehead icon display time | | 1..10000 | 2000 |
Sets the size for the icon shown above a player using comunications voices.
Token
|
Description
| Values | Range | Default |
---|
V | Icon size | | 0..1000 | 50 |
For toggling on the ability for any text to have the blinking bit set.
Token
|
Description
| Values | Range | Default |
---|
T | 0 = Off, 1 = On | | 0..1 | 0 |
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 |
Sets the level of anisotropic filtering.
Token
|
Description
| Values | Range | Default |
---|
V | anisotropic filtering | | 0..16 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Turns 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 |
Returns a name of the current font.
Token
|
Description
| Values | Range | Default |
---|
S | name of font | <empty>, default, mono, serif | .. | |
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 |
Returns a height of the desktop resolution (or zero, if not available).
Returns a width of the desktop resolution (or zero, if not available).
Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.
Token
|
Description
| Values | Range | Default |
---|
R | 0 off, 1 on | | 0..1 | 1 |
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) | |
Specifies a region of an image to be used as a font character.
Argument | Description | Values |
---|
A | X co-ordinates (from top-left corner) | |
B | Y co-ordinates (from top-left corner) | |
C | width | |
D | height | |
Specifies, at what char the font definition proceeds.
Argument | Description | Values |
---|
A | the ascii code of the first char | |
Sets the field of view (fov).
Token
|
Description
| Values | Range | Default |
---|
N | the FOV value | | 75..120 | 90 |
Sets the range of FPS (AC will adjust LOD to achieve it).
Argument | Description | Values |
---|
A | min | |
B | max | |
Sets the level of full-scene antialiasing (FSAA).
Token
|
Description
| Values | Range | Default |
---|
V | full-scene antialiasing | | -1..16 | 0 |
Enables or disables fullscreen.
Token
|
Description
| Values | Range | Default |
---|
| fullscreen | | 0..1 | 1 |
Enables using always desktop resolution in fullscreen mode.
Token
|
Description
| Values | Range | Default |
---|
V | Use desktop resolution for fullscreen | | 0..1 | 1 |
Toggles fullscreen on or off.
Sets the temporary (to next map start) hardware gamma value.
Token
|
Description
| Values | Range | Default |
---|
N | the gamma value | | 30..300 | 100 |
Returns a list of available screen resolutions.
Returns an encoded string to display an inlined image outside the console.
Argument | Description | Values |
---|
M | mnemonic | |
Enables or disables the gib animation entirely.
Token
|
Description
| Values | Range | Default |
---|
B | off OR on | 0 (false), 1 (true) | 0..1 | 1 |
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..60000 | 7000 |
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]
Token
|
Description
| Values | Range | Default |
---|
B | | | 0..1 | 0 |
Hides inlined images in the console.
Token
|
Description
| Values | Range | Default |
---|
N | 0: show, 1: hide | | 0..1 | 0 |
Controls whether textures with a scale higher than 1.0 will be scaled down while loading (0) or not (1).
Token
|
Description
| Values | Range | Default |
---|
S | scale down? | | 0..1 | 1 |
Shows the maximum level of anisotropic filtering supported by the graphics hardware.
Shows the maximum texture size (in pixels) supported by the graphics hardware.
Ignores per-map overrides to limit waveheight on the client.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:ignore | .. | 0 |
Ignores per-map overrides to disable stencil shadows on the client.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:ignore | .. | 0 |
Ignores per-map overrides to disable water reflection on the client.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:ignore | .. | 0 |
Enables animation of inlined images with multiple frames.
Token
|
Description
| Values | Range | Default |
---|
N | 0: display only first frame, 1: enable animation | | 0..1 | 1 |
Default frame time for inlined images with multiple frames.
Token
|
Description
| Values | Range | Default |
---|
N | frame time for images | | 5..2000 | 200 |
Scales inlined images (in percent).
Token
|
Description
| Values | Range | Default |
---|
N | size of images (in percent) | | 80..300 | 120 |
Scales the hardcoded inlined images: "1".."9" (in percent).
Token
|
Description
| Values | Range | Default |
---|
N | size of images (in percent) | | 80..160 | 106 |
Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels.
Token
|
Description
| Values | Range | Default |
---|
E | the error value, 1 being the best quality | | 1..100 | 4 |
Scaling factor for all light in the game.
Token
|
Description
| Values | Range | Default |
---|
D | divisor | values will be divided by this | 1..100 | 4 |
Per-map override to limit waveheight on the client.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:ignore | .. | 0 |
Per-map override to disable stencil shadows on the client.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:ignore | .. | 0 |
Per-map override to disable water reflection on the client.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:ignore | .. | 0 |
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 |
Sets the maximum value the display will roll when you get damages.
Token
|
Description
| Values | Range | Default |
---|
N | the roll value | | 0..30 | 10 |
Limits the maximum value the display will roll on strafing or if player gets damages, when spectating other players.
Token
|
Description
| Values | Range | Default |
---|
N | The roll value | | 0..50 | 10 |
The maximum texture size that will be used by the engine, larger textures will be scaled down.
Token
|
Description
| Values | Range | Default |
---|
V | maximum texture size | | 0..4096 | 0 |
Gets the maximum number of supported textures when performing multitexturing.
Maximum number of smoke particles along shotline of sniper rifle.
Token
|
Description
| Values | Range | Default |
---|
N | maximum number of smoke particles | | 1..10000 | 500 |
Token
|
Description
| Values | Range | Default |
---|
N | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..32 | 2 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 1..32 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Minimal level of detail.
Token
|
Description
| Values | Range | Default |
---|
V | | | 25..250 | 60 |
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 | 0 |
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 |
Makes dead players instantly pop out of existence, instead of falling over and sinking into the ground.
Token
|
Description
| Values | Range | Default |
---|
B | BOOL | | 0..1 | 0 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Token
|
Description
| Values | Range | Default |
---|
V | | | 6..10 | 8 |
Resets the OpenGL rendering settings.
Chooses whether the players hand carrying the weapon appears as right or left handed.
Token
|
Description
| Values | Range | Default |
---|
N | 0: lefty, 1: righty | | 0..1 | 1 |
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 |
Sets the screen height.
Token
|
Description
| Values | Range | Default |
---|
H | the screen height | | 200..10000 | 768 |
Sets the screen width.
Token
|
Description
| Values | Range | Default |
---|
W | the screen width | | 320..10000 | 1024 |
Returns the actual height of the screen/window.
Description
| Values | Range | Default |
---|
the screen/window height | | .. | |
Changes the screen resolution.
Argument | Description | Values |
---|
W | width | |
H | height | |
Returns the actual width of the screen/window.
Description
| Values | Range | Default |
---|
the screen/window width | | .. | |
Changes the current font.
Argument | Description | Values |
---|
N | font name | default, mono, serif |
Sets a persistent gamma value for a map.
Argument | Description | Values |
---|
G | the gamma value | 30..300, default 100 |
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 |
Determines the skin of the current player.
Argument | Description | Values |
---|
N | skin id | value |
Chooses skin when playing for team CLA.
Argument | Description | Values |
---|
N | skin id | |
Chooses skin when playing for team RVSF.
Argument | Description | Values |
---|
N | skin id | |
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
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 |
Specifies the Field Of View when in spectating/ghost mode.
Token
|
Description
| Values | Range | Default |
---|
V | Spectate FOV size | | 5..120 | 110 |
Chooses between local or remote player's FOV when spectating.
Token
|
Description
| Values | Range | Default |
---|
V | 0: uses 'spectfov' and the local 'scopefov', 1: uses 'fov' and 'scopefov' of the spectated player | | 0..1 | 0 |
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 |
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 |
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 |
Swaps vertices of model triangles.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Checks for new files in packages/misc/igraph/ folder.
Enables or disables vsync.
Token
|
Description
| Values | Range | Default |
---|
V | 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 |
Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).
Token
|
Description
| Values | Range | Default |
---|
F | wave height (floating-point value) | | 0..1 | 0.3 |
Heads-Up Display
This section describes the identifiers to configure the head-up display (HUD).
Sets whether or not to display the accuracy information window.
Token
|
Description
| Values | Range | Default |
---|
N | 1: on, 0: off | | 0..1 | 0 |
Shows in the console accuracy of all used weapons.
Resets accuracy counters.
Sets the percent of screen height for text lines on an alternate F11 history display.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 0 |
Hides most of elements on the HUD for X frames.
Token
|
Description
| Values | Range | Default |
---|
X | blank out the HUD | | 0..10000 | 0 |
Recreates the minimap for the current map.
Colour of CN column in scoreboard.
Token
|
Description
| Values | Range | Default |
---|
C | color | 0 (green), 1 (blue), 2 (yellow), 3 (red), 4 (gray), 5 (white), 6 (dark brown), 7 (dark red), 8 (purple), 9 (orange) | 0..9 | 5 |
Sets the transparency of the console.
Token
|
Description
| Values | Range | Default |
---|
N | Alpha value | | 0..255 | 255 |
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 |
Turns on or off crosshair effects.
Argument | Description | Values |
---|
V | turn off all effects | 0 |
| turn on all effects (color and size change) | 1 (default) |
| turn on color change/turn off size change | 2 |
| turn off color change/turn on size change | 3 |
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 |
Sets the level of transparency of the damage indicator, 100 = totally solid.
Token
|
Description
| Values | Range | Default |
---|
V | damage indicator alpha value | | 1..100 | 50 |
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 |
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 |
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 |
Options for flag score hud transparency.
Token
|
Description
| Values | Range | Default |
---|
V | flag score hud transparency | 0: no transparency, icon set 'flag gone'; 1: transparency, icon set 'flag gone'; 2: transparency, classic icon set | 0..2 | 2 |
Sets the percent of screen height for text lines on the F11 history display.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..100 | 40 |
Show the game-time clock on the HUD.
Token
|
Description
| Values | Range | Default |
---|
D | off (0), count backward (1), count forward (2) | | 0..2 | 1 |
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/off the damage indicator.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable damage indicator | | 0..1 | 0 |
Turns on or off the display of equipment icons.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable equipment 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 ktf flag direction indicator.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable ktf indicator | | 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 status.
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 team score icons.
Token
|
Description
| Values | Range | Default |
---|
V | enable/disable team score icons | | 0..1 | 0 |
Turns on or off the display of vote icons.
Token
|
Description
| Values | Range | Default |
---|
V | 0=on; 1=on, but hide after own vote; 2=off | | 0..2 | 0 |
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 level of transparency of ktf flag direction indicator, 100 = totally solid.
Token
|
Description
| Values | Range | Default |
---|
V | ktf indicator alpha value | | 1..100 | 70 |
Sets the resolution for the minimap.
Token
|
Description
| Values | Range | Default |
---|
N | the resolution | | 7..10 | 9 |
Shows ammo statistics like in version 1.0.
Token
|
Description
| Values | Range | Default |
---|
N | 0: new, 1: old | | 0..1 | 0 |
Rendering options for the flags in the overview spectator mode.
Argument | Description | Values |
---|
| real | 0 |
| askew | 1 |
| radar | 2 |
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 |
Changes at what height you are floating in the radar-view.
Token
|
Description
| Values | Range | Default |
---|
H | height | | 5..500 | 150 |
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 |
Determines if the mini-map should be shown on screen.
Token
|
Description
| Values | Range | Default |
---|
B | show mini-map | | 0..1 | 0 |
default key: left Alt - toggles minimap
Determines whether to have a see-through map overview (0), or render it on a black backdrop (1) or a combination of both (2).
Token
|
Description
| Values | Range | Default |
---|
B | backdrop-style | | 0..2 | 0 |
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.
default key: TAB
Determines if scores should be shown on death.
Token
|
Description
| Values | Range | Default |
---|
V | | | 0..1 | 1 |
Enables or disables showing the player's horizontal speed (vector).
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.
Token
|
Description
| Values | Range | Default |
---|
V | show/hide hudgun when spectating | | 0..1 | 1 |
Toggles the console.
default key: F11
Sets the transparency of the vote display.
Token
|
Description
| Values | Range | Default |
---|
N | Alpha value | | 0..255 | 255 |
Editing
Whether or not texture paths are scrutinized.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:yes=>ignore | 0..1 | 0 |
Set to 1 just before calling a newent command where all attributes are meant to be kept.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:yes=>keep attribute values | 0..1 | 0 |
Adds an entity of the specified type at the current camera position.
Argument | Description | Values |
---|
E | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16) |
Selects the given area, as if dragged with the mouse holding editmeta.
Argument | Description | Values |
---|
X | the X coordinate | |
Y | the Y coordinate | |
XS | the length along the X axis | |
XY | the length along the Y axis | |
See also:
select,
selectall,
resetselections,
expandselection,
shrinkselection,
enlargevdeltaselections,
selx,
sely,
selxs,
selys,
selectionwalk,
pushselections,
editmetaAdds the entity #index to the TODO list.
Argument | Description | Values |
---|
I | index | |
C | comment (optional) | |
Selects 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 |
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 |
Enables the "automatic embedded map config data" feature.
Counts all the mips in the current map and prints their numbers as 1x1/2x2/4x4/8x8/16x16/32x32/64x64.
Turns on/off clean edit mode.
Argument | Description | Values |
---|
V | sets cleanedit on/off | 0 (off), 1 (on) |
Deletes all entities of said type.
Argument | Description | Values |
---|
T | the entity type, see command 'newent' | string |
Clears list of TODO entities.
Argument | Description | Values |
---|
I | index (optional) | |
Clears a set parameters of vantage point.
Restricts 'closest entity' display to one entity type.
Argument | Description | Values |
---|
A | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16) |
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.
default key: C
Copies the current closest entity into a buffer.
default key: - (minus)
Makes the current selection into a "corner".
default key: K
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.
default key: BACKSPACE
Deletes a map entity.
Argument | Description | Values |
---|
N | entity index/number | |
Deletes an unused mapmodel slot.
Argument | Description | Values |
---|
N | mapmodel slot number | |
P | purge | |
Deletes an unused map sound slot.
Argument | Description | Values |
---|
N | map sound slot number | |
P | purge | |
Deletes an unused texture slot.
Argument | Description | Values |
---|
N | texture slot number | 0..255 |
P | delete used slot? | purge |
R | replacement slot | 0..255 |
Returns a value for the main axis of player orientation.
Description
| Values | Range | Default |
---|
main axis of player orientation | 11 (X), 12 (Y), 13 (Z), 111 (-X), 112 (-Y), 113 (-Z) | 0..113 | 0 |
Edits a map entity.
Argument | Description | Values |
---|
N | entity index/number | |
A | list of attributes (optional) | |
Example:
echo (editentity 33)Prints all attributes of map entity number 33, for example "light 174 172 12 20 255 200 200 0 0 0"
Example:
editentity 33 "" 173Changes the y-position of entity 33 to 173
Changes the height of the current selection.
Argument | Description | Values |
---|
T | an integer denoting the type | 0 (floor), 2 (ceiling) |
D | the delta value to move it in | 1 (forwards), -1 (backwards) |
default keys:
[ - moves downwards the selection in the floor
] - moves upwards the selection in the floor
O - moves downwards the selection in the ceiling
P - moves upwards the selection in the ceiling
Integer variable containing a bitmask of hidden entity types.
Update the edit info panel every N milliseconds.
Token
|
Description
| Values | Range | Default |
---|
N | milliseconds | integer | 5..2000 | 80 |
A variable indicating if the game is in editmode.
Description
| Values | Range | Default |
---|
editmode in singleplayer | 1 (true), 0 (false) | 0..1 | 0 |
A variable indicating if the game is in singleplayer editmode.
Description
| Values | Range | Default |
---|
editmode | 1 (true), 0 (false) | 0..1 | 0 |
How long the temporary bits of showeditingsettings are displayed.
Token
|
Description
| Values | Range | Default |
---|
T | time | time in milliseconds | 750..75000 | 7500 |
Edits the parameters of a mapmodel slot.
Argument | Description | Values |
---|
N | mapmodel slot number | integer |
R | radius | integer |
H | height | integer |
Z | z-offset | integer |
0 | redundant, leave it at zero so you don't break the command | 0 |
P | mapmodel path | string |
Example:
editmapmodelslot 33 "" "" -5sets the z-offset of slot #33 to -5 without affecting other parameters
Example:
echo (editmapmodelslot 33)prints the current parameters of mapmodel slot #33 , for example: 0 0 0 0 "makke/lightbulb"
Allows to edit the map message.
Edits path/name and maxuses parameters of a mapsound slot.
Argument | Description | Values |
---|
N | map sound slot number | |
P | map sound path | |
M | maxuses | |
Argument | Description | Values |
---|
T | tag | integer value |
Sets tag clip type of all selected cubes.
Argument | Description | Values |
---|
T | type | 0 (none), 64 (clip), 128 (plclip) |
default keys:
1 on the keypad - sets a tag clip: none
2 on the keypad - sets a tag clip: clip
3 on the keypad - sets a tag clip: plclip
Changes the texture on current selection by browsing through a list of textures directly shown on the cubes.
Argument | Description | Values |
---|
T | an integer denoting the type | 0 (floor), 1 (lower or wall), 2 (ceiling), 3 (upper wall) |
D | the direction you want to cycle the textures in | 1 (forwards), -1 (backwards) |
default keys:
Insert - browses forward through floor textures
Delete - browses backward through floor textures
Home - browses forward through wall textures
End - browses backward through wall textures
Page Up - browses forward through ceiling textures
Page Down - browses backward through ceiling textures
7 on the keypad - browses forward through upper-wall textures
4 on the keypad - browses backward through upper-wall textures
X + mouse scroll - scrolls wall and upper-wall textures
Z + mouse scroll - scrolls floor or ceiling textures
Edits the parameters of a texture slot.
Argument | Description | Values |
---|
N | texture slot number | 0..255 |
S | scale | |
P | path | |
Example:
edittextureslot 33 "" "arcitool/rohbaubims.jpg"Sets texture name of slot #33
Example:
echo (edittextureslot 33)Prints the current parameters of texture slot #33, for example: 0 "zastrow/3wood_crate_10.jpg"
Puts a texture slot in a "last used" list up front.
Argument | Description | Values |
---|
S | surface | floor, wall or ceiling |
N | texture slot number | 0..255 |
Switches between map edit mode and normal.
default key: E
Loads the map config file, includes it in the map header and renames the original config file.
Automatically enlarge selections after placing arches or slopes.
Token
|
Description
| Values | Range | Default |
---|
N | 0: don't enlarge selection, 1: enlarge selection | | 0..1 | 0 |
Enlarges all selections by one cube in x- and y- direction, to change a selection from the "cube area" to the "vdelta area".
Argument | Description | Values |
---|
I | incremente (optional) | |
Changes property (attributes) of the closest entity.
Argument | Description | Values |
---|
A | attribute index | 0..6 (atrr1 - attr7), 11..13 (x, y, z) |
I | attribute increment | |
U | unscaled flag (optional) | 0 or 1 |
entset E attr1 attr2 attr3 attr4 attr5 attr6 attr7
Edits the closest entity.
Argument | Description | Values |
---|
E | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16) |
attr1 | see newent 'type' | |
attr2 | see newent 'type' | |
attr3 | see newent 'type' | |
attr4 | see newent 'type' | |
attr5 | see newent 'type' | |
attr6 | see newent 'type' | |
attr7 | see newent 'type' | |
Prints some map entity statistics to the console.
Returns a list of the numbers of all entities of that type.
Argument | Description | Values |
---|
type | the entity type | light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet |
Returns a list of TODO entities.
Levels the floor/ceiling of the selection.
Argument | Description | Values |
---|
T | an integer denoting the type | 0 (floor), 2 (ceiling) |
default keys:
, - equalizes the selection on the floor
. - equalizes the selection on the ceiling
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 |
Sets all light values to fullbright.
Token
|
Description
| Values | Range | Default |
---|
B | sets fullbright on or off | 0 (off), 1 (on) | .. | |
default key: F7 - toggles fullbright
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 |
Returns "1" if automapconfig is already enabled, "0" otherwise.
Returns the entity index number of the closest entity (or of the pinned entity, if one exists).
Returns a list of deleted entities.
Returns the value of the selected attribute of the nearest entity.
Argument | Description | Values |
---|
A | attribute index | 0..6 |
U | unscaled flag (optional) | 0 or 1 |
Returns the entity type of the nearest entity.
Returns values for all attributes to a specific mapmodel.
Argument | Description | Values |
---|
P | model path | |
N | attribute name (optional) | keywords, desc, defaults, usage, author, license, distribution, version |
Returns a list of all *.wav and *.ogg files below packages/audio/ambience.
Returns the location where the map sound file actually can be found.
Argument | Description | Values |
---|
N | filename or partial path with filename | |
Returns the "last written" timestamp of the current map in the requested format.
Argument | Description | Values |
---|
fmt | format | strftime format |
Returns a table of all texture files fitting a certain description.
Argument | Description | Values |
---|
includes | Optional list of path prefixes to include in the table. | |
excludes | Optional list of path prefixes to exclude from the table. | |
extensions | Optional list of filename extensions to include in the table. | |
Example:
echo (gettexturelist)Outputs two columns like "noctua/wall" "wall02.jpg"
Example:
echo (gettexturelist "" "map_editor skymaps")Outputs two columns like "noctua/wall" "wall02.jpg", but omits skymaps and special textures for the editor
Example:
echo (gettexturelist makke)Outputs only textures by makke and adds a third column like "makke/rattrap" "rb_box_03.jpg" "/rattrap"
Example:
echo (gettexturelist "skymaps/" "" "_ft.jpg")
Outputs four columns like "skymaps/egypt" "egypt_ft.jpg" "egypt" "egypt",
"skymaps/humus" "meadow_ft.jpg" "humus" "meadow"
Returns the location where the texture file actually can be found.
Argument | Description | Values |
---|
N | filename or partial path with filename | |
Returns string with coordinates of vantage point or empty string, if none is set.
Returns a string with the four components of the water colour: red, green, blue and alpha.
Example:
echo (getwatercolor)Output: 20 25 20 178
Returns a list of all regular xmaps in memory, or, if 'what' is "bak", the details of a stored backup xmap.
Argument | Description | Values |
---|
w | what (optional) | bak |
Visit next or previous player spawn entity.
Argument | Description | Values |
---|
N | direction | none or 1: next, -1: previous |
Jump to the location of a map entity.
Argument | Description | Values |
---|
N | the entity number | |
Only in edit mode: gets and sets camera position.
Argument | Description | Values |
---|
x | X coordinate | float |
y | Y coordinate | float |
z | Z coordinate | float |
yaw | yaw | integer |
pitch | pitch | integer |
Example:
echo (gotoposition)Output: 67.7 78.6 5.5 8 0
Example:
gotoposition "" "" "" 180 0Change yaw and pitch to look straight in +y direction.
Sets camera position in vantage point.
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) |
default keys:
H - makes the selection on the floor a heightfield
I - makes the selection on the ceiling a heightfield
Hide the edit info panel.
Token
|
Description
| Values | Range | Default |
---|
N | 0: show, 1: hide | | 0..1 | 0 |
Hide the closest entity filename info.
Token
|
Description
| Values | Range | Default |
---|
N | 0: show info always, 1: only show "unassigned slot" if necessary, 2: never show info | | 0..2 | 0 |
Show preview of textures during editing.
Token
|
Description
| Values | Range | Default |
---|
T | time to show texture preview [ms] | | 0..10000 | 2500 |
Returns a table of all known mapmodels.
Argument | Description | Values |
---|
N | list of attribute names | explodekeywords, sortby: keywords, desc, defaults, usage, author, license, distribution, version |
Example:
listallmapmodelattributes sortby: author sortby: desc explodekeywords
Tries to load mapmodels from all paths below packages/models/mapmodels.
Calculates some key values to determine map geometry viability.
Argument | Description | Values |
---|
W | what | vdelta, steepest, total, pprest, pp (default) |
Adds artist info to a map.
Argument | Description | Values |
---|
N | Prints the map artist player ID | print |
| Sets the map artist player ID to the player currently logged in | set |
| Returns the current map artist player ID | get |
| Erases an existing map artist record in the current map | clear |
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 license.
Argument | Description | Values |
---|
L | type of license | string |
Set to "1" with every command that changes mapmodel slots.
Token
|
Description
| Values | Range | Default |
---|
N | 0: not changed, 1: changed | | 0..1 | 0 |
Adds values for all attributes to a specific mapmodel.
Argument | Description | Values |
---|
P | model path | |
V | list of all attribute values | |
Deletes all loaded mapmodel attributes.
Returns the slot number registered in the map config file of the model with the given name.
Argument | Description | Values |
---|
M | mapmodel name (with path) | |
Example:
echo (mapmodelslotbyname "mapmodels/makke/platform_bridge")Output: 5
Returns the map model name (and path) of the mapmodel registered in the given slot number in the map config file.
Argument | Description | Values |
---|
N | mapmodel slot number | |
Returns a list of map entity indices which use a certain mapmodel slot.
Argument | Description | Values |
---|
N | mapmodel slot number | |
Allows negative z-offsets for mapmodels.
Argument | Description | Values |
---|
N | mapmodel slot number | |
Cleanups hidden map attributes.
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.
Set to "1" with every command that changes mapsound slots.
Token
|
Description
| Values | Range | Default |
---|
N | 0: not changed, 1: changed | | 0..1 | 0 |
Returns the list of numbers of all mapsound slots which use that sound file.
Argument | Description | Values |
---|
N | map sound filename | |
Returns a list of map entity indices which use a certain map sound slot.
Argument | Description | Values |
---|
N | map sound slot number | |
Adds modeinfo info to a map.
Argument | Description | Values |
---|
N | Lists current modeinfo entries | list |
| Returns list of current modeinfo entries | get |
| Erases current list of modeinfo entries | clear |
| Specifies flags for a list of modes | <modelist> <modeflags> |
Moves the whole map (including all entities) in the specified direction.
Argument | Description | Values |
---|
dX | x-offset | |
dY | y-offset | |
dZ | z-offset | |
newent E attr1 attr2 attr3 attr4 attr5 attr6 attr7
Adds a new entity.
Argument | Description | Values |
---|
E | the entity type or number | light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16) |
attr1 | see newent 'type' | |
attr2 | see newent 'type' | |
attr3 | see newent 'type' | |
attr4 | see newent 'type' | |
attr5 | see newent 'type' | |
attr6 | see newent 'type' | |
attr7 | see newent 'type' | |
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 |
Chooses another 'closest ent'.
Visit next player spawn entity.
Argument | Description | Values |
---|
N | team number | 0: CLA, 1: RVSF, 100: FFA |
Enables or disables using squares to render the editing grid/current selection instead of triangles.
Token
|
Description
| Values | Range | Default |
---|
N | 0 off, 1 on | | 0..1 | 1 |
This alias will automatically be executed when a new map is created via the "newmap" command.
Pastes a previously copied selection.
default key: V
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) | |
Enables or disables pointing at entity sparklies.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 0: nearest, 1: pointed at | 0..1 | 0 |
Specifies the required precision for pointing at entities sparklies.
Token
|
Description
| Values | Range | Default |
---|
N | 0: not changed, 1: changed | float | 0.01..180.0 | 2.0 |
Determines if undo data should be preserved on using "savemap" command.
Token
|
Description
| Values | Range | Default |
---|
N | 0: don't preserve undos, 1: preserve undos | | 0..1 | 0 |
Stores the positions of all current selections.
Recomputes all there is to recompute about a map, currently only lighting.
Redoes editing operations undone by 'undo'.
default key: R
Repeats the last texture edit throughout the map.
Variable, which is set to "1" when a sound is downloaded.
Token
|
Description
| Values | Range | Default |
---|
N | is sound downloaded? | 0: no, 1: yes | 0..1 | 1 |
Variable, which is set to "1" when a texture is downloaded.
Token
|
Description
| Values | Range | Default |
---|
N | is texture downloaded? | 0: no, 1: yes | 0..1 | 1 |
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 |
Saves a map in old map format 9 (may lose some map details that are not possible with format 9).
Saves optimised the current map, with no undo data.
Argument | Description | Values |
---|
M | file name of the map, see command 'map' for the naming scheme | string |
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 | |
See also:
addselection,
selectall,
resetselections,
expandselection,
shrinkselection,
enlargevdeltaselections,
selx,
sely,
selxs,
selys,
selectionwalk,
pushselectionsSelects the whole map (minus the two cubes wide border).
Flips the selected part of the map at an axis.
Argument | Description | Values |
---|
AXIS | X or Y | |
Rotates the selected part of the map in 90 degree steps.
Argument | Description | Values |
---|
D | steps | |
Iterates over all cubes in all selections and executes "action" for each cube.
Argument | Description | Values |
---|
action | action | |
beginsel | begin action before cubes action of each selection (optional) | |
endsel | end action before cubes action of each selection (optional) | |
Returns the x-coordinate of the westernmost (towards negative x) cube(s) in the current selection.
Returns the x-span (size on the x-axis) of the current selection.
Returns the y-coordinate of the northernmost (towards negative y) cube(s) in the current selection.
Returns the y-span (size on the y-axis) of the current selection.
Sets a texture for the current selection.
Argument | Description | Values |
---|
T | position of the texture to set in map cfg | integer |
t | the type of the texture | 0 (floor), 1 (wall), 2 (ceil), 3 (upper wall) |
Sets vantage point in current camera position.
Allows setting the components of the water colour independently.
Argument | Description | Values |
---|
W | what | red (0), green (1), blue (2), alpha (3) |
V | value | (0)1..255 |
Example:
setwatercolour red 200- sets the red component to 200
Shadow yaw specifies the angle at which shadow stencils are drawn on a map.
Token
|
Description
| Values | Range | Default |
---|
D | degrees | The angle in degrees to rotate the stencil shadows | 0..360 | 45 |
Show clips/plclips/mapmodel clips in edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 1 |
A visual representation of hidden/shown entities. (may be used for more editing ephemerals later)
Token
|
Description
| Values | Range | Default |
---|
P | persistence | 0:off(*),1:short,2:text-short,3:permanent | 0..3 | 0 |
Shows detailed geometry data of the cube inside editing focus.
default key: F8
Show editing cursor grid.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 1 |
Show ladder entities (as blue wireframes) in edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 0 |
Prints some map statistics.
Toggles between showing what parts of the scenery are rendered.
default key: F6
Show mapmodel clipping during edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 0 |
Show all playerstarts in edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | 0: hide, 1: show | | 0..1 | 0 |
Show the volume of a focused clip entity as a cloud of sparklies.
Argument | Description | Values |
---|
B | on/off | 0:off,1:on |
default key: B - while pressed clips are clouds of sparklies
Show tagclips/tagplclips in edit mode.
Token
|
Description
| Values | Range | Default |
---|
N | - | | 0..1 | 1 |
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) |
default keys:
F - makes the selection a solid
G - makes the selection a space/non-heightfield
Sorts all mapmoodel slots alphabetically and merges identical slots.
Argument | Description | Values |
---|
nosort | do not sort the list alphabetically (optional) | |
nomerge | do not merge any slots (optional) | |
mergeused | merge used and unused (identical) slots freely (optional) | |
Example:
sortmapmodelslots
- sorts the mapmodel slot list alphabetically and merge unused identical slots. Merging an unused slot is
pretty much the same as deleting it, so this command sorts the list and removes unneeded double entries
Example:
sortmapmodelslots nosort- merges (deletes) unused double entries in the mapmodel slot list
Example:
sortmapmodelslots nosort mergeused
- merges double entries in the mapmodel slot list. If two identical entries are used in the map,
all uses are mapped to the new combined slot. This leaves no visual changes on the map.
Should be avoided, if mapmodel slots have been renamed manually - and the renaming isn't finished yet
Example:
sortmapmodelslots mergeused- sorts the mapmodel slot list and merges all double entries
Sorts all mapsound slots alphabetically and merges identical slots.
Argument | Description | Values |
---|
nosort | do not sort the list alphabetically (optional) | |
nomerge | do not merge any slots (optional) | |
mergeused | merge used and unused (identical) slots freely (optional) | |
Sorts all texture slots alphabetically and merges identical slots.
Argument | Description | Values |
---|
nosort | do not sort the list alphabetically (optional) | |
nomerge | do not merge any slots (optional) | |
mergeused | merge used and unused (identical) slots freely (optional) | |
Places stairs in all selections.
Argument | Description | Values |
---|
xs | step width in x-direction | |
ys | step width in y-direction | |
The width of the tagclip lines.
Token
|
Description
| Values | Range | Default |
---|
W | width | | 0.2..3 | 1 |
Fading time of sparklies in focused on tagclip volume
Token
|
Description
| Values | Range | Default |
---|
T | time | milliseconds | 1..1000 | 30 |
Number of particles in the focused on tagclip volume.
Token
|
Description
| Values | Range | Default |
---|
C | count | particle count | 1..100 | 14 |
Number of particles in any tagclip volume - if showtagclipfocus is not 1.
Token
|
Description
| Values | Range | Default |
---|
C | count | particle count | 1..100 | 0 |
Returns the list of numbers of all texture slots which use that texture file.
Argument | Description | Values |
---|
N | texture filename | |
Returns a list of mapmodels who use that texture as skin.
Argument | Description | Values |
---|
N | texture slot number | 0..255 |
Returns a list of 256 numbers representing the number of uses for every texture slot.
Argument | Description | Values |
---|
W | what | onlygeometry, onlymodels, onlymostvisible |
Example:
echo (textureslotusagelist onlymostvisible)Output: wall 211 floor 45 ceiling 0 "upper wall" 79
Inverses the on/off state of cleanedit
Toggles the pin on the "closest entity" selector.
default key: middle mouse button
Turns occlusion culling on and off.
default key: F5
Restores deleted entity.
Argument | Description | Values |
---|
I | index | |
Multi-level undo of any of the changes caused by editing operations.
default key: U
Returns the number of undo steps that can be undone.
Argument | Description | Values |
---|
L | level | integer |
Example:
echo (undolevel) - prints number of previous editing steps, for example "55". Do some editing and:
Example:
undolevel 55
- undoes all changes to restore the previous state (if that state is still in memory)
Sets the number of megabytes used for the undo buffer.
Token
|
Description
| Values | Range | Default |
---|
N | number of megabytes | integer | 0..50 | 5 |
Removes entities from the list of deleted entities.
Argument | Description | Values |
---|
W | which | [a number], all or last |
Holds the number of unsaved edits.
A cubescript hook to provide additional information about the current edit situation.
Update map config with any mapmodels required by those in use.
Changes the vdelta value of the current selection.
Argument | Description | Values |
---|
N | vdelta value | |
default keys:
8 - manipulates downwards the corner of the current selection
9 - manipulates upwards the corner of the current selection
Sets the global water level for the map.
Token
|
Description
| Values | Range | Default |
---|
H | the water level | float, -10000="no water" | -128..127 | -10000 |
Whether or not to output debugging information while loading/saving maps.
Token
|
Description
| Values | Range | Default |
---|
B | boolean | 1:debug output | 0..1 | 0 |
Deletes the named snapshot.
Argument | Description | Values |
---|
N | nickname | |
Moves the backup xmap to a regular named spot.
Argument | Description | Values |
---|
N | nickname | |
Lists all xmaps currently in memory.
Changes the nickname of the xmap.
Argument | Description | Values |
---|
O | old nickname | |
N | new nickname | |
Restores the xmap snapshot.
Argument | Description | Values |
---|
N | nickname | |
Creates a snapshot and stores it under the given nickname.
Argument | Description | Values |
---|
N | nickname | |