# CubeScript

This section describes identifiers that are closely related to the CubeScript language.
Compares if a particular floating-point value is smaller than another floating-point value.

(true)1||0(false)

The first value.

The second value.

Compares if a particular floating-point value is less than or equal to another floating-point value.

(true)1||0(false)

The first value.

The second value.

Compares if a particular floating-point value is equal to another floating-point value.

(true)1||0(false)

The first value.

The second value.

Determines if the first floating-point value is greater than the second floating-point value.

(true)1||0(false)

the first value

the second value

Determines if the first floating-point value is greater than or equal to the second floating-point value.

(true)1||0(false)

the first value

the second value

Determines if the first floating-point value is not equal to the second floating-point value.

(true)1||0(false)

the first value

the second value

Sets the result value of a cubescript block.

the result

Executes the specified string as cubescript.

the string to execute

execute (concat echo (addpunct fov 3))
Example output: 90.0
Temporarily redefines the value of an alias.

alias name

action

p = 1; push p 2; echo $p
Output: 2
Returns the value of the alias.

alias name

Gets range attribute for builtin variable.

what

the name of any builtin variable (integer or float)

Returns whether or not there is an identifier by that name.

identifier name

Performs a floating-point modulo operation.

the dividend

the divisor

the modulo value

echo (modf 7.5 12.5)
Output: 7.5
echo (modf 17.5 12.5)
Output: 5.0
Returns A raised to the power of B (floating-point).

the mantissa

the exponent

A raised to the power of B

Resets a previously pushed alias to it's original value.

alias

p = 1; push p 2; pop p; echo $p
Output: 1
Performs an addition 2 or more numbers.

the first summand

the summand(s)

the sum

Performs a subtraction.

the minuend

the subtrahend

the difference

Performs a multiplication 2 or more numbers.

the multiplicand

the multiplier(s)

the product

Performs an integer division.

the dividend

the divisor

the quotient (integer)

Subtracts two floating-point numbers.

the minuend

the subtrahend

the difference

Adds up two or more floating-point numbers.

the first summand

the summand(s)

the sum

Performs a floating point multiplication 2 or more numbers.

the multiplicand

the multiplier(s)

the product

Performs a division with floating-point precision.

the quotient (floating-point)

Adds a value to an alias.

the alias to add to

value to be added

Subtracts a value from an alias.

the alias to subtract from

value to be subtracted

Multiplies an alias by a value.

the alias to be multiplied

the multiplier

Divides an alias by a value.

the alias to be divided

the divisor

Adds a floating-point value to an alias.

the alias to add to

value to be added

Subtracts a floating-point value from an alias.

the alias to subtract from

value to be subtracted

Multiplies an alias by a floating-point value.

the alias to be multiplied

the multiplier

Divides an alias by a floating-point value.

the alias to be divided

the divisor

Performs a modulo operation.

the dividend

the divisor

the modulo value

Determines if two values are equal.

first value

second value

the equality

echo there are only (concatword (= 1 1) (= 1 0)) types of people in the world
Output: there are only 10 types of people in the world
Determines if two values are not equal.

first value

second value

the inequality

Determines if a value is smaller than a second value.

the first value

the second value

the comparison

Determines if a value is bigger than a second value.

the first value

the second value

the comparison

Determines if a values is less than or equal to a second value.

the first value

the second value

Determines if a values is greater than or equal to a second value.

the first value

the second value

Logical AND.
echo (&& 1 1)
Output: 1
echo (&& 1 0)
Output: 0

first value

second value

A AND B

Logical OR.
echo (|| 1 0)
output: 1
echo (|| 0 0)
output: 0

first value

second value

A OR B

Performs a negation.

argument

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

the first argument

the second argument

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

the first argument

the second argument

Performs the operation XOR using binary arithmetic on integer values (32-bit signed).

the first argument

the second argument

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

argument

Returns value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision).
echo (h0 2 1024)
Output: 400
echo (h0 4 1024)
Output: 0400
echo (h0 6 1024)
Output: 000400
echo (h0 0 (&b 0xe 0x3))
Output: 2
echo (h0 0 (|b 0xe 0x3))
Output: f
echo (h0 0 (^b 0xe 0x3))
Output: d
echo (h0 0 (!b 0xe))
Output: fffffff1
echo (h0 0 (* -1 0xe))
Output: fffffff2

precision

value

Random value.

the upper limit of the random value

the random value

Rounds the given float.

the float number to round

the rounded integer

Upper value of a float number.

the float number to get the ceil from

the ceil value (integer)

Floor value of a float number.

the float number to get the floor from

The floor value (integer)

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

the first string

the second string

the equality

Determines if string B was found in string A.
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!

the first string

the second string

integer

Returns the length (in characters, including whitespace) of string S.
echo (strlen "Hello world!")
Output: 12

string

Copies a substring out of the original.

the original string

start position

substring length

the substring

echo (substr abcdefgh 2 5)
Output: cdefg
echo (substr abcdefgh -3 2)
Output: fg
echo (substr abcdefgh 2)
Output: cdefgh
echo (substr abcdefgh 1 -2)
Output: bcdefg
Controls the script flow based on a boolean expression.
if (> $x 10) [ echo x is bigger than 10 ] [ echo x too small ]

the condition

the body to execute if the condition is true

the body to execute if the condition is false

Takes an integer argument to determine what block of code to execute.
switch 2 [echo case 0] [echo case 1] [echo case 2] [echo case 3] [echo case 4]
Output: case 2

integer

a variable number of 'case' arguments...

Loops the specified body.
loop i 10 [ echo $i ]

the alias used as counter

the amount of loops

the body to execute on each iteration

Loops the specified body while the condition evaluates to true.
alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]

the condition

the body to execute on each iteration

Browses a list and executes a body for each element.
looplist "zero one two three" number [echo $number]
looplist [0 "is knife" 1 "is pistol"] [n w] [echo weapon $n $w]

the list to browse

the alias(es) containing the current element value

the body to execute on each iteration

Browses a list and executes a body for each element.
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

the list to browse

the alias(es) containing the current element value

the body to execute on each iteration

Aborts a loop created with a 'loop', 'looplist' or 'while' command.
loop i 10 [ if (= $i 4) [ break ]; echo $i]
output: 0 1 2 3
Skip current loop iteration.
loop i 5 [ if (= $i 2) [ continue ]; echo $i]
output: 0 1 3 4
Concatenates multiple strings with spaces inbetween.
alias a "hello"; echo (concat $a "world")
output: hello world

the first string

collection of strings to concatenate

The newly created string

Concatenates multiple strings.
alias a "Cube"; echo (concatword $a "Script")
output: CubeScript

the first string

collection of strings to concatenate

The newly created string

Grabs a word out of a string.
echo (at "zero one two three" 2)
output: two

the string

the index of the word

the word from the specified idex

returns the element count of the given list.

the list

Searches a list for a specified value.

the list

the item to find

the index of the item in the list

Executes a command after specified time period.
sleep 1000 [ echo foo ]
Prints 'foo' to the screen after 1 second.

the amount of milliseconds

the command to execute

ignore map change

Resets all current "sleep".
The number of arguments passed to the current alias.

numargs

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

format

value(s)

echo (format "%1 bottles of %2 on the %3, %1 bottles of %2!" 99 beer wall)
output: 99 bottles of beer on the wall, 99 bottles of beer!
Replaces "%" format specifiers in the string by the values specified in subsequent arguments.

format

value(s)

echo (format "_%1_%2_%3_%4_%5_" "A B C" D E F)
output: _A B C_D_E_F__
echo (format2 "_%1_%2_%3_%4_%5_" "A B C" D E F)
output: _A_B_C_D_E_
Adds color to a string.
echo "\f3Hello \f0world!"
Output: a red "Hello" and a green "world!"

color id

Leading zeros for the number V to make it W chars wide.
echo (l0 5 1000)
Output: 01000
echo (l0 3 1000)
Output: 1000

width

value

Generates an alias (list) of the current values for the given aliases/CVARs.
storesets "sensitivity hudgun fov" tmp
Example result: stores "3.000 1 120" into alias "tmp".

the list of aliases/CVARs

the alias to store them in

Binds a name to commands.

the name of the alias

the commands

alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ]
It is possible to re-bind an alias, even during its evaluation.
test = [ echo "successful" ]
There is also the shorthand version of defining an alias via the "=" sign.
Set an alias as a constant.

the name of the alias

the value

myalias = myvalue; const myalias;
Set "myalias" value to "myvalue" then "lock" it as a constant.
const myalias myvalue;
You can directly set a value for your alias when you define it as a constant.
const myalias myvalue; myalias = anothervalue;
Assigning a value to a const will throw you an error. Output: myalias is already defined as a constant
Lists all persistent aliases that start with prefix.
Determines if the argument given is an existing alias or not.
hello = ""; echo (checkalias hello)
Output: 1
echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)
Output: 0

the alias to check for

Determines if the argument given is a constant or not.
const hello ""; echo (isconst hello)
Output: 1
hello = value; echo (isconst hello)
Output: 0

the alias to check for

Ensures the initialization of an alias.
checkinit mapstartalways
Output: if alias mapstartalways does not exist, this command initializes it.
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.

the alias to check for

the block of code to ensure that the alias contains

Defines an alias only if it does not already exist.

alias name

alias value

Deletes the passed alias.

the name of the alias

Forcibly sets a list of aliases to a specified value.
alias1 = 0; alias2 = 0; alias3 = 0; alias4 = 0; alias 5 = 0
Can be written as:
forceinit [alias1 alias2 alias3 alias4 alias5] 0

list of alias names

alias value

Initializes a group of aliases using checkinit.

the list of aliases to check for

the block of code to ensure the aliases contain

Uses check2init on a list of aliases.

list of alias names

alias value

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

control option

persistidents 0; foo = [ echo "bar"]
foo will not be saved and has to be redefined when restarting AC.
persistidents 1; bar = [ echo "foo"]
bar will be saved and persistent across sessions.
Injects cubescript punctuation.
echo (addpunct hello)
Output: "hello"
echo (addpunct hello 1)
Output: [hello]
echo (addpunct hello 2)
Output: (hello)
echo (addpunct hello 3)
Output: $hello
test = (concat echo (addpunct fov 3)); test
Output: 90.0

a string

ID or name

Converts a string to all lowercase characters.
echo (tolower HELLO)
Output: hello

a string

Converts a string to all uppercase characters.
echo (toupper hello)
Output: HELLO

a string

Tests a character argument for various things.
echo (testchar 1)
Output: 1 // It is a 0-9 digit
echo (testchar a 1)
Output: 1 // It is a a-z or A-Z character
echo (testchar z 2)
Output: 1 // It is a a-z or A-Z character or 0-9 digit
echo (testchar b 3)
Output: 1 // It is a lowercase a-z character
echo (testchar B 4)
Output: 1 // It is a uppercase A-Z character
echo (testchar , 5)
Output: 1 // It is a printable character
echo (testchar . 6)
Output: 1 // It is a punctuation character
echo (testchar " " 7)
Output: 1 // It is a whitespace character

the character to test

type of test to run

Returns a string, with a portion of it replaced with a new sub-string.
echo (strreplace "Hello cruel world" cruel "")
Output: Hello world

the original string to modify

the target sub-string to replace

the new sub-string to replace the target

Returns the average of a list of numbers.
echo (listaverage "2 5 5")
Output: 4.0

the list of numbers

This will append the passed 2nd argument to any existing content of the alias named in the 1st argument.

the alias to add to

the new element to add

foo = "one" add2alias foo two echo foo
Output: one two
This will output the string and override any other actions that might've been defined.
Appends a new element to a list.
tmp_list = []; add2list tmp_list Hello; add2list tmp_list world!; echo $tmp_list
Output: Hello world!

the alias (list) to add to

the new element to add

Lists the argument options for several argument types.
echo (listoptions)
Output: "entities ents weapons teamnames teamnames-abbrv punctuations crosshairnames menufilesortorders texturestacktypes cubetypes"
echo (listoptions teamnames)
Output: "CLA RVSF CLA-SPECT RVSF-SPECT SPECTATOR"
Replaces control characters in a string with escaped sequences.

string to escape

echo (escape (concat (c 3) "Hello World"))
Output: "\f3Hello World"
Creates a temporary alias that will not be written to saved.cfg, and thus will not persist after quitting.

temporary alias name

cubescript command(s)

Interactively edits an existing alias in the console buffer.

alias to edit

alias test "Hello World"; editsvar test
Result: edit test: Hello World
Interactively edits an alias in the console buffer.

alias to edit

alias test "Hello World"; editalias test
Result: edit test: Hello World
Makes an input perform a certain command.

input

command

prompt

nopersist

Returns a sorted version of a list.
echo (sortlist [1 3 2])
Output: 1 2 3

list to sort

Isolates the given context.

context (integer or name)

Secures this configuration for the rest of the game.

context (integer or name)

id name

# General

This section describes general identifiers.

Text to put in the clipboard.

Toggle for taking an automatic screenshot during intermission.

0=Off, 1=On

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

0=BMP, 1=JPEG, 2=PNG

Scales screenshots by the given factor before saving. 1 = original size, 0.5 = half size, etc.

Scale

Returns the file extension of the client's current screenshottype setting.
echo (getscrext)
Example output: .jpg
Sets the JPEG screenshot image quality.

Compression level

Sets the PNG screenshot file compression.

Compression level

Writes current configuration to config/saved.cfg - automatic on quit.
Outputs text to the console.

List of strings

Outputs text to the console and heads up display.

List of strings

Enables or disables the ability of hudecho to output text to the heads up display.

0 off, 1 on

Puts a prompt on screen.

opens empty prompt

opens a command prompt /

opens a command prompt % (for team chat)

autocompletes forwards commands/variables/aliases

autocompletes backwards commands/variables/aliases

resets the commandline to the state before using TAB-completion

browse forwards command history

browse backwards command history

the text to display in the prompt

command

path

extension

complete demo "demos" dmo
If you enter "/demo " and press TAB you will cycle through all available demos.
alias mapcomplete [complete $arg1 "packages/maps" cgz]
Helper alias for quickly adding complete-definitions for all gamemodes - see config/script.cfg (below "Auto-completions").
Dumps all command arguments to STDOUT.

...

Toggles physics interpolation.
Returns the number of milliseconds since engine start.
echo (millis)

the milliseconds

Seconds since the epoch (00:00:00 UTC on January 1, 1970).
echo (systime)
A list of values for current time.
echo (timestamp) "2008 08 08 08 08 08"
echo (timestamp) "2063 04 05 12 00 00"
echo (at (timestamp) 0) (at (timestamp) 2) (at (timestamp) 1) "2063 05 04"
Representation of date.
echo (datestring) "Sat Jun 7 17:08:35 2008"
The current time in (H)H:MM:SS format.
echo (timestring) "12:34:56"
echo (timestring) "1:02:03"
Quits the game without asking.
Takes a screenshot.
Takes a "clean" screenshot with no HUD items.
Saves an image of the entire radar-overview of the map.
Executes all commands in a specified config file.

the config file

Executes all commands in all config files in the specified directory.

the directory path from the assaultcube root

execdir scripts
Executes a config file within "config" folder.

the file name (without extension)

Clears the list of secured maps.
Adds a map to the list of secured maps.

the name of the map

Returns a list of values describing the current engine (rendering) state.
echo (getEngineState)
Enables output of processed network packets.

enable network debugging

Determines if the current played map should be automatically downloaded if it is not available locally.

enable auto map download

Automatically get new map revisions from the server.

0: no, 1: yes

Sets the correction value for clockfix.

correction value

Enables correction of the system clock.

enable correction

Determines if all settings should be reset when the game quits.

enable reset

Determines how fast network throttling accelerates.

acceleration

Determines how fast network throttling decelerates.

deceleration

Determines the interval of re-evaluating network throttling.

interval

Gets an integer representing the game version. READ ONLY
Compare given version to current version.

newest available version

Gets an integer representing the game protocol. READ ONLY
Indicates if a connection to a server exists.

the connection state

Hold the current number of lines on the console.
Returns text from the last line in the console.
Sets the language for which a translated server MOTD will be fetched, if the server has one for this language.
en, de, fr, ...

the language code

Toggles the showing of the "Apply changes now?" menu when changing certain graphical settings.

1 = show, 0 = don't show

Indicates the state of the console.

console state

Executes the specified command in the command line history.

the N'th command from the history

Allows to browse through the console history by offsetting the console output.

scrolls backwards the console (conskip 5)

scrolls forwards the console (conskip -5)

resets the console (conskip -1000)

scrolls the console

the offset

Sets how many typed console commands to store.

Total of stored commands

Sets the total number of text lines from the console to store as history.
Omit variables with unchanged default values from saved.cfg.

0 = print, but commented out; 1 = omit

Controls how many variables (with similar names) are grouped together on one line in saved.cfg.

Variables per line

Omit unchanged default binds from saved.cfg.

0 = print; 1 = print, but commented out; 2 = omit

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

The server address. Trailing slash not needed.

priority of the server

addpckserver http://packages.ac-akimbo.net
Returns a table with four columns of all configured package servers.
Resets the list of packages source servers where to download custom content from.
Determines if the game should try to download missing packages such as textures or mapmodels on the fly.

Note: This is turned on by default

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

Add debug info to autodownload

Add the zip package file "mods/zipname.zip" to the virtual file system.

the name of the zip mod

Maximal size of the file, which is cached in memory.

size [kB]

Removes one zip file from the virtual file system.

the name of the zip mod

Removes all zip files from the virtual file system.
Lists zip files in "mods/".

what

Reads and returns the first 11 lines from the file "desc.txt" in the named zip file.

the name of the zip mod

Returns the list of files contained in a zip file.

the name of the zip mod

Returns the revision number of the zip file.

the name of the zip mod

Sets the formatstring for demo filenames.

string

Sets the formatstring for demo timestamp.

string

If defined, this will be executed after saved.cfg is loaded.
If defined, this will be executed after autoexec.cfg is loaded.
Lists files in a directory.

path to directory

extension

Output statistics and errors when handling zip compressed data.

boolean

Whether or not to output input events.

threshhold

Disconnect from a server making us load an incompatible map.

boolean

# Gameplay

This section describes gameplay related identifiers.
If this alias exists it will be run when the game reaches intermission.
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.
If this alias exists it will be run when the game starts a new map, then it is deleted.
mapstartonce = [ echo "------------------------------" ]
This will output the string and override any other actions that might've been defined.
addOnLoadOnce [ echo "------------------------------" ]
This will output the string after any previously defined actions have run.
If this alias exists it will be run every time the game starts a new map.
mapstartalways = [ echo "------------------------------" ]
This will output the string and override any other actions that might've been defined.
addOnLoadAlways [ echo "------------------------------" ]
This will output the string after any previously defined actions have run.
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 this alias exists it will be run every time a vote passes or fails.
Determines if there is a vote pending or not.
echo $votepending
Output: if there is currently a vote pending, returns 1, else returns 0.
If it exists, this alias will be executing when any player get killed, receiving a few arguments.

The client number of the actor

The client number of the target

The number of the gun used

Is it a gib or a normal frag

The action that occured

The client number of the actor

The flag owner team

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

The item that was picked up

The quantity that was received

If defined, this will be executed each time you pick up an item.

The weapon that was used

If defined, this will be executed each time you shot a bullet, throw a grenade or use your knife.

The client number of the actor

The client number of the target

The damage done

The number of the gun used

Is it a gib or a normal frag

If it's defined, this alias will be executed each time a damage is done.

The weapon number that you switched to

If defined, this will be executed each time you switch to a different weapon.

was autoreload?

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

The client number of the player who connected

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

The client number of the player who disconnected

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

The client number of the player who spawned

If defined, this will be executed each time a player spawns.

The client number of the player who changed name

The new name of the client

If defined, this will be executed when you or another player change(s) his name.

The client number who sent you private message

The private message

If defined, this will be executed when another player sent you private message.
Returns the shot statistics for the player with the given clientnumber.

client

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

cycle one up

cycle one down

delta

Displays a scope for the sniper-rifle.

scope on?

Cycles through all available spectator modes.

cycle spectator modes

Get the IP address of a given clientnumber - only admins get shown the last octet.

clientnum

Agree or disagree to the currently running vote.

vote value

votes YES

votes NO

Go to the next match in the servers rotation for the desired gamemode.

gamemode

Call a vote for mode and map.

gamemode

map

sound

text

opens the voicecom menu, use number keys for your choice

Enables or disables voicecom audio.

voicecom sounds

Loads a crosshair for given type.
loadcrosshair red_dot.png
Loads the red_dot.png crosshair for all weapons.
loadcrosshair default red_dot.png
Same as above. Loads the red_dot.png crosshair for all weapons.
loadcrosshair knife red_dot.png
Loads the red_dot.png crosshair for your knife only.
loadcrosshair assault red_dot.png
Loads the red_dot.png crosshair for your assault rifle only.
loadcrosshair scope red_dot.png
Loads the red_dot.png crosshair for your sniper rifle scope only.
loadcrosshair reset
Loads all default crosshairs (including teammate and scope).

type

image

Get the game demos listing from the server we are currently connected.
Gets the recorded demo from a game on the server.

number in list

subpath

Drops the taken flag.
Triggers a crouch.
Triggers a jump.

delta

clientnum

Returns client number of spectated player.
Returns attributes of a team.

Team

Attribute

Returns the current map being played.
Current map revision number.
Returns the server's current mastermode state.
Returns the server's current autoteam state.
Returns the server's current pause state (1=paused, 0=resumed).
Returns the weapon-index the local player currently has selected as primary.
Determines if the local player (you) are currently carrying a primary weapon.
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 information on the current server - if you're connected to one.

info

echo [I am (curserver 4) to (curserver 2)]
Output: I am connected to ctf-only.assault-servers.net
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.
Returns the weapon-index the local player was previously holding.
Loads up a map in the gamemode set previously by the 'mode' command.

Name of the map to load

Sets the next gamemode then calls a vote for a map.

mode id

map name

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

map name

Sets the primary weapon on next respawn.

the weapon number or name

Reloads the weapon.
Sets the nick name for the local player.

the name

Returns the nick name of the local player.
Outputs text to other players.

the text

Sends a private message to a specified client.

Client number

List of strings

Holds the CN of the last client who sent you a private message.
Easily respond the last client who sent you a private message.
Ignore a player.

client number

Print a list of all players that you are currently ignoring.
Clear list of ignored players.

client number, or -1 to clear the whole list

Ignore all clients currently on the server.
Unignore all clients currently on the server.
Ignore all clients on the specified team.

the team to ignore

Ignore all clients on the enemy team.
Mutes a player.

client number

Clears a list of muted players.

client number, or -1 to clear the whole list

Prints a list of all players that you have muted.
Action chat message.

...

command

Adds a command to complete nicknames on.
nickgreet = [ say (concat "Hello," (concatword $arg1 "!")) ]; nickcomplete nickgreet
with this you can enter "/nickgreet " and cycle via TAB to the nickname you want to greet.
Connects to a server.
connect 127.0.0.1 555 myServerPassword

the address of the server (hostname or IP)

the port

the server password

Connects to a server and tries to claim admin state.
connectadmin 127.0.0.1 777 myAdminPassword
connect as admin on port 777 of localhost
connectadmin "" 0 myAdminPassword
will try to connect to a LAN server on the default port as admin with the given password of "myAdminPassword".

the address of the server (hostname or IP)

the port

the admin password

Leaves a server.
Disconnects then reconnects you to the current server.

the server password

Tries to connect to a LAN server.
Sets the team for the local player.
team CLA

the team number or name

Swaps your player to the enemy team.
Moves from active team to spectator during match.
Connects to a modded server.

IP

port

password

Connects to a modded server and tries to claim admin state.

IP

port

admin password

Tries to connect to a modified LAN server.
Whether or not to automatically switch to akimbo upon pickup.

boolean

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

the number/name of available weapon

Switches to your current primary weapon (must be bound to a key).
Switches to your secondary weapon (must be bound to a key).
Switches to knife (must be bound to a key).

switches to knife

switches to knife and attacks (if the key is held)

Switches to grenades, if available (must be bound to a key).

switches to grenades

Toggles between your primary weapon and secondary weapon (must be bound to a key).
Toggles between your primary weapon and knife (must be bound to a key).
Toggles between your primary weapon and grenades (must be bound to a key).
Returns contents of current magazine.

the weapon number or name

Returns contents of magazine reserve.

the weapon number or name

Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve)

the weapon number or name

Retrieves the last map that was sent to the server using 'sendmap'.

the name of the map

cubescript to execute once map is installed

Downloads and loads the specified map from an available packages source server.

the name of the map

Try to download mods/modname.zip from all configured package servers.

the name of the mod

Sets the desired spectating mode.

the mode

switch spectator mode

Toggles spectator mode.
Enables persistent spectating concrete player.

0: enabled in non-arena modes, 1: always enabled

Stops demo playback.
Returns 1 when the current game is being played from a demo, else 0.
echo I am (at [not now] (watchingdemo)) watching a demo. "so, are you?"

truth value

Kills your player. You will lose 1 frag point and receive 1 death point when using this command.
Plays a recorded demo.

the demo name

Go to a predefined number of minutes before the end of the game while watching a demo.

the minutes remaining to skip to

Rewind the current demo to S seconds ago.

the number of seconds to rewind

Returns the name of played demo.
Returns the remaining minutes of the currently played game. READ ONLY
Returns the time (in milliseconds) of the currently played game. READ ONLY
showtime = [ if (> $lastgametimeupdate 0) [ gmr = (- $gametimemaximum (+ $gametimecurrent (- (millis) $lastgametimeupdate))) gsr = (div $gmr 1000) gts = (mod $gsr 60) if (< $gts 10) [ gts = (concatword 0 $gts) ] [ ] gtm = (div $gsr 60) if (< $gtm 10) [ gtm = (concatword 0 $gtm) ] [ ] echo (concatword $gtm : $gts) remaining ] [ echo gametime not updated yet ] ]
Returns the maximum time (in milliseconds) of the currently played game. READ ONLY
Returns the time (in milliseconds) when the last map was loaded.
Returns the last time (in milliseconds) the gametime was updated. READ ONLY
Determines if the singleplayer game should be paused.

pause game

Vote to pause or resume the match.

pause or resume

>
Indicates if the weapons should be reloaded automatically.

the autoreload state

Determines the FOV when scoping.
Sets the gamespeed in percent.

the game speed

Determines by how much to multiply the fly speeds by.

the multiplier

Sets the behavior of weapon switching upon akimbo expiration.

akimbo end action

switch to knife

stay with pistol

switch to grenades

switch to primary

Draws a zone marker with the specified color and dimensions on the minimap/radar.

X-coordinate - top-left corner

X-coordinate - bottom-right corner

Y-coordinate - top-left corner

Y-coordinate - bottom-right corner

a color for the zone, in hexadecimal notation

Reset all drawn zones.
If this alias exists, it will be automatically executed on the last minute remaining mark.
Returns the size of the players vector.
Determines if the client number given is a valid client (player).
echo (isclient 0)
Example output: 1
echo (isclient 32)
Example output: 0

client number

Finds client number (cn) of player with given name.

player name

Returns the highest valid client number available.
Switches to grenades, if available (must be bound to a key).

for all weapons

for all weapons except sniper rifle

Moves the player forward.
Moves the player backward.
Moves the player left.
Moves the player right.
Fires the current weapon.
Prints the local client's (x,y) coordinates.
Sets the firing mode of automatic weapons between full auto mode and burst fire mode.

the weapon number or name

shots per burst

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.
Sets the frag message corresponding to a weapon (appearing on the hud).

the weapon number or name

the message you want to appear

fragmessage sniper sniped
It will display "you sniped unarmed" on the hud when you frag unarmed with sniper.
Sets the gib message corresponding to a weapon (appearing on the hud).

the weapon number or name

the message you want to appear

Retrieve an attribute of a player identified by clientnum.

clientnum

attribute

Retrieve an attribute of yourself.

attribute

# Keyboard and mouse

This section describes keyboard and mouse related identifiers.
Binds a key to a command.

the key to bind

the command

Similar to bind, but is only active while editing, where it overrides the regular bind for the specified key.

the key to bind

the command

Similar to bind, but is only active while spectating, where it overrides the regular bind for the specified key.

the key to bind

the command

Binds a key to many different actions depending on the current game state.
megabind F9 [echo Demo!] [echo Editing or coop!] [echo Connected!] [echo Bots!] [echo Other!]

the key to bind

body of code to execute if watching a demo

body of code to execute if editing or in coop-edit mode

body of code to execute if connected to a server

body of code to execute if in a bot mode

body of code to execute if none of the other arguments have been met

Executes a command on the release of a key/button.
bind CTRL [ echo "key pressed"; onrelease [ echo "key released" ] ]

the command

Adds a block of code, if it does not already exist, to a keybind.

the key to add to

the code to add

Returns the contents of a keybind, bound with 'bind'.

name of key

Returns the contents of a keybind, bound with 'editbind'.

name of key

Returns the contents of a keybind, bound with 'specbind'.

name of key

Searches keybinds (bound with 'bind'), returns keys with matching contents.

search string

echo (searchbinds "reload")
Output: R
Searches keybinds (bound with 'editbind'), returns keys with matching contents.

search string

echo (searcheditbinds "toggleocull")
Output: F5
Searches keybinds (bound with 'specbind'), returns keys with matching contents.

search string

Returns the name of a key via a specified code.
echo (findkey 8)
Output: BACKSPACE
echo (findkey 280)
Output: PAGEUP

integer

Returns the integer code of a key.
echo (findkeycode BACKSPACE)
Output: 8
echo (findkeycode PAGEUP)
Output: 280

the name of the key

Resets all binds back to their default values.
Clears all binds for all keys and all modes, including self-assigned ones.
Whether or not the next call to _resetallbinds will remove any and all binds; cleaning up before setting the default bindings.

boolean

Sets up the keymap for the specified key.

the key to map

the name for the key

the default action

If defined, this will be executed every time you press a key.

integer key code

checkinit KEYPRESS [echo You pressed key: (findkey $arg1)]
If defined, this will be executed every time you release a key.

integer key code

checkinit KEYRELEASE [echo You released key: (findkey $arg1)]
Sets the mouse sensitivity.

the sensitivity

Scales all mouse sensitivity values.

the sensitivity scale

Mouse sensitivity while scoped.

scoped sensitivity

Switches between scopesensscale and autoscopesensscale.

auto on/off

Change sensitivity when scoping.

factor to change sensitivity while scoped

Sets mouse to "flight sim" mode.

sets invmouse

The way the mouse movement is handled.

boolean

Enable a workaround for buggy SDL X11 pointer grabbing.

boolean

Sets the degree of mouse filtering (0.0 being no filtering).

Amount of mouse filtration

Sets the mouse acceleration.

acceleration factor

Toggles grabbing of mouse and keyboard input in a game.
Indicates if a CTRL key is pressed.

state of the CTRL key

Is the CTRL currently key pressed?

# Editing

Returns the value of the selected attribute of the nearest entity.

attribute index

unscaled flag

Returns the entity type of the nearest entity.

tag

Sets tag clip type of all selected cubes.

type

sets a tag clip: none

sets a tag clip: clip

sets a tag clip: plclip

Transforms all full height clip entities to tag clips.
During map editing, drop all mapsounds so they can be re-added.
Switches between map edit mode and normal.
Changes the texture on current selection by browsing through a list of textures directly shown on the cubes.

an integer denoting the type

the direction you want to cycle the textures in

browses forward through floor textures

browses backward through floor textures

browses forward through wall textures

browses backward through wall textures

browses forward through ceiling textures

browses backward through ceiling textures

browses forward through upper-wall textures

browses backward through upper-wall textures

scrolls wall and upper-wall textures

scrolls floor or ceiling textures

Show preview of textures during editing.

time to show texture preview [ms]

Sets a texture for the current selection.

position of the texture to set in map cfg

the type of the texture

Changes the height of the current selection.

an integer denoting the type

the delta value to move it in

moves downwards the selection in the floor

moves upwards the selection in the floor

moves downwards the selection in the ceiling

moves upwards the selection in the ceiling

Makes the current selection all solid (i.e. wall) or all non-solid.

an integer denoting the solid-ness

makes the selection a solid

makes the selection a space/non-heightfield

Levels the floor/ceiling of the selection.

an integer denoting the type

equalizes the selection on the floor

equalizes the selection on the ceiling

Marks the current selection as a heightfield.

an integer denoting the type

makes the selection on the floor a heightfield

makes the selection on the ceiling a heightfield

Changes the vdelta value of the current selection.

vdelta value

manipulates downwards the corner of the current selection

manipulates upwards the corner of the current selection

Makes the current selection into a "corner".
Multi-level undo of any of the changes caused by editing operations.
Redoes editing operations undone by 'undo'.
Returns the number of undo steps that can be undone.
echo (undolevel)
- prints number of previous editing steps, for example "55". Do some editing and:
undolevel 55
- undoes all changes to restore the previous state (if that state is still in memory)

level

Sets the number of megabytes used for the undo buffer.

number of megabytes

Copies the current selection into a buffer.
Copies the current closest entity into a buffer.
Pastes a previously copied selection.
Pastes a previously copied entity.
Returns the number of solid walls contained into the current selection.

the integer of type of the walls you want to count

echo (concat "The selection contains " (countwalls 0) "solid wall(s)")
Output: The selection contains 3 solid wall(s)
Repeats the last texture edit throughout the map.
Adds a new entity.

the entity type or number

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

Adds a new light entity.

the light radius

red colour component, see remarks below

green colour component

blue colour component

Adds a new spawn spot.
Adds a new ammo box item.
Adds a pistol magazine item.
Adds a new grenades item.
Adds a new health item.
Adds a new armour item.
Adds a new helmet item.
Adds a new akimbo item.
Adds a map model to the map (i.e. a rendered md2/md3 model which you collide against but has no behaviour or movement).

The mapmodel identifier

Extra elevation above ground

The map texture to use

Adds a CTF flag entity.

denotes the flag's team

Adds a ladder entity.

the height of the ladder

Adds a sound entity.

the sound to play

the radius

the size

the volume

Adds a clip entity.

elevation above the ground

X radius around the box center

Y radius around the box center

height of the box

Adds a player clip entity.

elevation above the ground

X radius around the box center

Y radius around the box center

height of the box

Deletes the entity closest to the player.
Edits the closest entity.

the entity type or number

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

see newent 'type'

Changes property (attributes) of the closest entity.

attribute index

attribute increment

unscaled flag

Deletes all entities of said type.

the entity type, see command 'newent'

Turns on/off clean edit mode.

sets cleanedit on/off

Inverses the on/off state of cleanedit
Recomputes all there is to recompute about a map, currently only lighting.
Saves the current map.

file name of the map, see command 'map' for the naming scheme

Saves optimised the current map, with no undo data.

file name of the map, see command 'map' for the naming scheme

Determines if undo data should be preserved on using "savemap" command.

0: don't preserve undos, 1: preserve undos

Determines if map backups (.bak) should be created when a map is saved.

0 off, 1 on

Saves a map in old map format 9 (may lose some map details that are not possible with format 9).
Creates a new map.

the size of the new map

Outputs the mapsize.
Enlarges the current map.
Reduces the world size by 1.
Sets the map message, which will be displayed when the map loads.

The map message

Allows to edit the map message.
Sets the map license.

type of license

Sets the map comment string.

comment

Prints some map entity statistics to the console.
Restricts 'closest entity' display to one entity type.

the entity type or number

Chooses another 'closest ent'.
Visit next player spawn entity.

team number

Visit next or previous player spawn entity.

direction

Converts the nearest entity (if its a clip or plclip) to its opposite type.
convertclips
Assuming the nearest entity is a clip, it will be converted to a plclip.
convertclips
Assuming the nearest entity is a plclip, it will be converted to a clip.
Moves the whole map (including all entities) in the specified direction.

x-offset

y-offset

z-offset

Flips the selected part of the map at an axis.

X or Y

Rotates the selected part of the map in 90 degree steps.

steps

Returns a value for the main axis of player orientation.

main axis of player orientation

Selects the increment of the map revision number for the next 'savemap'.

increment

Show mapmodel clipping during edit mode.

-

Show editing cursor grid.

-

Show clips/plclips/mapmodel clips in edit mode.

-

Show tagclips/tagplclips in edit mode.

-

Number of particles in the focused on tagclip volume.

count

Number of particles in any tagclip volume - if showtagclipfocus is not 1.

count

Fading time of sparklies in focused on tagclip volume

time

Show ladder entities (as blue wireframes) in edit mode.

-

Enables or disables a special set of default textures while editing.
Sets the global water level for the map.

the water level

Returns a string with the four components of the water colour: red, green, blue and alpha.
echo (getwatercolor)
Output: 20 25 20 178
Allows setting the components of the water colour independently.
setwatercolour red 200
- sets the red component to 200

what

value

Controls the ambient lighting of the map, i.e. how bright areas not affected by any light entities will appear.
This should be entered in hexadecimal notation, as 0xRRGGBB. If the green and blue are both zero, the input will be interpreted as a grayscale value.

the ambient color

Sets all light values to fullbright.

sets fullbright on or off

toggles fullbright

Sets the level of brightness to use when using the command "/fullbright 1".

Light intensity level

Toggles between showing what parts of the scenery are rendered.
Shows detailed geometry data of the cube inside editing focus.
Turns occlusion culling on and off.
Makes a slope out of the current selection.

x delta step

y delta step

Makes an arch out of the current selection.

side delta

Defines a vertex delta for a specific arch span prefab, used by the 'arch' command.

span value

vertex value

delta value

Automatically enlarge selections after placing arches or slopes.

0: don't enlarge selection, 1: enlarge selection

Generates a perlin noise landscape in the current selection.

the scale, frequency of the features

the random seed

cube size, how many cubes to generate a surface for at once (unused)

Resets all current selections and selects the given area, as if dragged with the mouse.

the X coordinate

the Y coordinate

the length along the X axis

the length along the Y axis

Selects the given area, as if dragged with the mouse holding editmeta.

the X coordinate

the Y coordinate

the length along the X axis

the length along the Y axis

Selects the whole map (minus the two cubes wide border).
Resets all current selections.
Increases the size of the current selection by N cubes on all sides.

number of cubes

Decreases the size of the current selection by N cubes on all sides.

number of cubes

Enlarges all selections by one cube in x- and y- direction, to change a selection from the "cube area" to the "vdelta area".

incremente

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.
Iterates over all cubes in all selections and executes "action" for each cube.

action

begin action before cubes action of each selection

end action before cubes action of each selection

Stores the positions of all current selections.
Scales all lights in the map.

size change (percentage)

intensity change (percentage)

A variable indicating if the game is in editmode.

editmode in singleplayer

A variable indicating if the game is in singleplayer editmode.

editmode

A variable indicating if the player looks at the floor or at the ceiling.

flrceil

This alias will automatically be executed when a new map is created via the "newmap" command.
Enables or disables using squares to render the editing grid/current selection instead of triangles.

0 off, 1 on

Only in edit mode: gets and sets camera position.

X coordinate

Y coordinate

Z coordinate

yaw

pitch

echo (gotoposition)
Output: 67.7 78.6 5.5 8 0
gotoposition "" "" "" 180 0
Change yaw and pitch to look straight in +y direction.
Sets vantage point in current camera position.
Returns string with coordinates of vantage point or empty string, if none is set.
Sets camera position in vantage point.
Clears a set parameters of vantage point.
Prints some map statistics.
Prints map dimensions.
Holds the number of unsaved edits.
Returns the map model name (and path) of the mapmodel registered in the given slot number in the map config file.

mapmodel slot number

Returns the slot number registered in the map config file of the model with the given name.

mapmodel name (with path)

echo (mapmodelslotbyname "mapmodels/makke/platform_bridge")
Output: 5
Returns a list of map entity indices which use a certain mapmodel slot.

mapmodel slot number

Edits the parameters of a mapmodel slot.

mapmodel slot number

radius

height

z-offset

redundant, leave it at zero so you don't break the command

mapmodel path

editmapmodelslot 33 "" "" -5
sets the z-offset of slot #33 to -5 without affecting other parameters
echo (editmapmodelslot 33)
prints the current parameters of mapmodel slot #33 , for example: 0 0 0 0 "makke/lightbulb"
Deletes an unused mapmodel slot.

mapmodel slot number

purge

Sorts all mapmoodel slots alphabetically and merges identical slots.
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
sortmapmodelslots nosort
- merges (deletes) unused double entries in the mapmodel slot list
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
sortmapmodelslots mergeused
- sorts the mapmodel slot list and merges all double entries

do not sort the list alphabetically

do not merge any slots

merge used and unused (identical) slots freely

Set to "1" with every command that changes mapmodel slots.

0: not changed, 1: changed

Adds values for all attributes to a specific mapmodel.

model path

list of all attribute values

Deletes all loaded mapmodel attributes.
Returns values for all attributes to a specific mapmodel.

model path

attribute name

Returns a table of all known mapmodels.

list of attribute names

listallmapmodelattributes sortby: author sortby: desc explodekeywords
Tries to load mapmodels from all paths below packages/models/mapmodels.
Allows negative z-offsets for mapmodels.

mapmodel slot number

Returns a table of all texture files fitting a certain description.

Optional list of path prefixes to include in the table.

Optional list of path prefixes to exclude from the table.

Optional list of filename extensions to include in the table.

echo (gettexturelist)
Outputs two columns like "noctua/wall" "wall02.jpg"
echo (gettexturelist "" "map_editor skymaps")
Outputs two columns like "noctua/wall" "wall02.jpg", but omits skymaps and special textures for the editor
echo (gettexturelist makke)
Outputs only textures by makke and adds a third column like "makke/rattrap" "rb_box_03.jpg" "/rattrap"
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.

filename or partial path with filename

Returns the list of numbers of all texture slots which use that texture file.

texture filename

Returns a list of mapmodels who use that texture as skin.

texture slot number

Returns a list of 256 numbers representing the number of uses for every texture slot.
echo (textureslotusagelist onlymostvisible)
Output: wall 211 floor 45 ceiling 0 "upper wall" 79

what

Deletes an unused texture slot.

texture slot number

delete used slot?

replacement slot

Edits the parameters of a texture slot.

texture slot number

scale

path

edittextureslot 33 "" "arcitool/rohbaubims.jpg"
Sets texture name of slot #33
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.

surface

texture slot number

Sorts all texture slots alphabetically and merges identical slots.

do not sort the list alphabetically

do not merge any slots

merge used and unused (identical) slots freely

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.

filename or partial path with filename

Returns the list of numbers of all mapsound slots which use that sound file.

map sound filename

Returns a list of map entity indices which use a certain map sound slot.

map sound slot number

Edits path/name and maxuses parameters of a mapsound slot.

map sound slot number

map sound path

maxuses

Deletes an unused map sound slot.

map sound slot number

purge

Sorts all mapsound slots alphabetically and merges identical slots.

do not sort the list alphabetically

do not merge any slots

merge used and unused (identical) slots freely

Set to "1" with every command that changes mapsound slots.

0: not changed, 1: changed

Enables the "automatic embedded map config data" feature.
Returns "1" if automapconfig is already enabled, "0" otherwise.
Loads the map config file, includes it in the map header and renames the original config file.
Writes an embedded config file to a separate file and removes it from the map header.
Returns a list with additional data ("header extras") from current map header.
Adds an entity of the specified type at the current camera position.

the entity type or number

Edits a map entity.

entity index/number

list of attributes

echo (editentity 33)
Prints all attributes of map entity number 33, for example "light 174 172 12 20 255 200 200 0 0 0"
editentity 33 "" 173
Changes the y-position of entity 33 to 173
Deletes a map entity.

entity index/number

Returns a list of the numbers of all entities of that type.

the entity type

Jump to the location of a map entity.

the entity number

Returns the entity index number of the closest entity (or of the pinned entity, if one exists).
Toggles the pin on the "closest entity" selector.
Enables or disables pointing at entity sparklies.

boolean

Specifies the required precision for pointing at entities sparklies.

0: not changed, 1: changed

Integer variable containing a bitmask of hidden entity types.
Returns a list of deleted entities.
Restores deleted entity.

index

Removes entities from the list of deleted entities.

which

Lists all xmaps currently in memory.
Creates a snapshot and stores it under the given nickname.

nickname

Restores the xmap snapshot.

nickname

Deletes the named snapshot.

nickname

Deletes the backup xmap.
Moves the backup xmap to a regular named spot.

nickname

Changes the nickname of the xmap.

old nickname

new nickname

Returns a list of all regular xmaps in memory, or, if 'what' is "bak", the details of a stored backup xmap.

what

Adds the entity #index to the TODO list.

index

comment

Clears list of TODO entities.

index

Returns a list of TODO entities.
Show all playerstarts in edit mode.

0: hide, 1: show

Cleanups hidden map attributes.
Counts all the mips in the current map and prints their numbers as 1x1/2x2/4x4/8x8/16x16/32x32/64x64.
First modifier key for editing mode.
Second modifier key for editing mode.
Indicates if editmeta key is pressed.

state of the first editmeta key

Indicates if second editmeta key is pressed.

state of the second editmeta key

Variable, which is set to "1" when a texture is downloaded.

is texture downloaded?

Variable, which is set to "1" when a sound is downloaded.

is sound downloaded?

Calculates some key values to determine map geometry viability.

what

Returns the "last written" timestamp of the current map in the requested format.

format

Whether or not texture paths are scrutinized.

boolean

Places stairs in all selections.

step width in x-direction

step width in y-direction

A cubescript hook to provide additional information about the current edit situation.
Update the edit info panel every N milliseconds.

milliseconds

Hide the edit info panel.

0: show, 1: hide

Hide the closest entity filename info.

0: show info always, 1: only show "unassigned slot" if necessary, 2: never show info

Adds artist info to a map.

Prints the map artist player ID

Sets the map artist player ID to the player currently logged in

Returns the current map artist player ID

Erases an existing map artist record in the current map

Adds modeinfo info to a map.

Lists current modeinfo entries

Returns list of current modeinfo entries

Erases current list of modeinfo entries

Specifies flags for a list of modes

Show the volume of a focused clip entity as a cloud of sparklies.

on/off

while pressed clips are clouds of sparklies

Update map config with any mapmodels required by those in use.
How long the temporary bits of showeditingsettings are displayed.

time

A visual representation of hidden/shown entities. (may be used for more editing ephemerals later)

persistence

Shadow yaw specifies the angle at which shadow stencils are drawn on a map.

degrees

shadowyaw 90
The width of the tagclip lines.

width

Whether or not to output debugging information while loading/saving maps.

boolean

Set to 1 just before calling a newent command where all attributes are meant to be kept.

boolean

# Menus

This section describes identifiers related to the menu gui.
Specifies commands to be executed when a menu opens.

the code to execute on init

Creates a new menu.

the name of the menu

Creates a new menuitem.

the text content in menu line

the command to execute on selection of the menuitem

the command to execute upon rolling over the menuitem

the description of menu item, which is displayed on the menu footer

Defines the initial selection for a menu.

line number

Displays a menu line with a text which may contain chars from an alternate font.

the name of the alternate font

text content in menu line

action

hoveraction

description displayed on menu footer

Selects a line in a menu.

menu name

line number

Enables persistent selections for the currently displayed menu.
Defines the background color for the menu selection bar.

red

green

blue

alpha

Defines the background color for the description of selected active menu items (checkbox, slider, text input).

red

green

blue

alpha

Creates a checkbox menu item.

text

value

action

position

image filename

text

action

hoveraction

Hide big images in menus.

0: show, 1: hide

Menuitem which displays "text" and all keys, that bind "bindcmd" - in game mode.

text

bind command

Menuitem which displays "text" and all keys, that bind "bindcmd" - in edit mode.

text

bind command

Menuitem which displays "text" and all keys, that bind "bindcmd" - in spectate mode.

text

bind command

Menuitem that loads a map, displays the title and the preview or a default image.

map

action

hoveraction

description displayed on menu footer

Creates a screenshot cropped to 4:3 with a given number of lines and jpeg quality 80.

creates map preview pictures during spectating

number of lines

text

min

max

value

display

action

wrap

text

min

max

value

display

action

Creates a new menuitem with text input field.

text

value

action

hoveraction

maxchars

Menu items added after this command are greyed out (1) or not (0).

value

Adds header and/or footer to the menu.

header

footer

Toggles getting descriptive text from CGZ or DMO files in menudirlist.
Creates a menu listing of files from a path and perform an action on them when clicked.

the directory path from the assaultcube root

file extension

action

show image from a file

string - search it in map/demo filenames and descriptions and show only matched files (case insensitive)

menudirlist "packages/maps" "cgz" "map $arg1"
will create a list of maps and load them when clicked
Adds subdirectory entries to a menu with a files list.

action, executed, when the menu entry is chosen

if it is 1, an entry '..' is added (parent directory)

Sets the font for a specific menu.

menu name

font

menufont score mono
sets the font on the scoreboard
Displays the specified menu.

the name of a previously defined menu

Closes the specified menu if it is open.

the name of a previously defined menu

Deletes the entire contents (all menu items) of the given menu.

the name of a previously defined menu

Specifies a model to render while displaying the specified menu.

the name of the menu

the model

the animation to play

the rotation speed

the scale

Displays a texture on the right side of a menu.

the name of the menu

the path to the texture

the title of the picture

Changes the size of textures displayed in menus (mostly for testing purposes).

size factor

Changes the size of pictures displayed in menus.

size factor

If wrapslider is set the menuitemslider will toggle to the min/max value if at end of the range.

0 off, 1 on

Toggles the ability for menutext to have the blinking bit set.

0 = Off, any other integer = On

Returns the name of the currently open menu.
Closes the currently open menu.
Refreshes (closes and opens again) the current menu.
Refreshes (closes and opens again, after very short delay) the current menu.
Moves a menu away from the middle of the screen.

x-offset

y-offset

Synchronizes tabs in menus.

value

Make a different title show up than the menu's internal name.

name

# Heads-Up Display

This section describes the identifiers to configure the head-up display (HUD).
Show the game-time clock on the HUD.

off (0), count backward (1), count forward (2)

Show the wall clock with time (usually local, not game-time) on the HUD.
Determines if the mini-map should be shown on screen.

show mini-map

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

backdrop-style

Transparency of the black map backdrop (in percent) rendered if showmapbackdrop is set to 2.

transparency

Recreates the minimap for the current map.
Sets the resolution for the minimap.

the resolution

Turns on/off the radar compass.

enable/disable radar compass

Rendering options for the flags in the overview spectator mode.

viewing variant

real

askew

radar

Turns on/off the damage indicator.

enable/disable damage indicator

Shows ammo statistics like in version 1.0.

0: new, 1: old

Toggles the console.
Sets how many seconds before the console text rolls (disappears) up the screen.

time before the text rolls up

Sets how many lines of text the console displays.
Sets the percent of screen height for text lines on an alternate F11 history display.
Sets the percent of screen height for text lines on the F11 history display.
Turns on or off the display of console text.

enable/disable console text

Turns on or off the display of equipment icons.

enable/disable equipment icons

Turns on or off the display of messages at the bottom of the screen.

enable/disable messages

Turns on or off the display of spectator status.

enable/disable spectator status

Turns on or off the display of team score icons.

enable/disable team score icons

Options for flag score hud transparency.

flag score hud transparency

Turns on or off the display of ktf flag direction indicator.

enable/disable ktf indicator

Sets the level of transparency of ktf flag direction indicator, 100 = totally solid.

ktf indicator alpha value

Turns on or off the display of local player team icons.

enable/disable team icons

Turns on or off the display of the on-screen radar.

enable/disable radar

Turns on or off the display of vote icons.

0=on; 1=on, but hide after own vote; 2=off

Turns on or off the display of the current selected gun.

show/hide guns 3D models

Turns on/off the display of the hudgun while spectating a player in first-person view.

show/hide hudgun when spectating

Turns on/off display of FPS/rendering statistics on the HUD.

0: Show no stats, 1: Only show FPS stats, 2: Show all stats

Displays local player's current x,y,z position in map, showstats 1 must be enabled.

display current position

Turns on/off display of team warning crosshair.

enable/disable warning crosshair

Sets the level of transparency of the damage indicator, 100 = totally solid.

damage indicator alpha value

Sets the separation of the arrows in the damage indicator.

damage indicator separation size

Sets the size of the damage indicator.

damage indicator icon size

Sets how long the damage indicator stays on screen.

damage indicator display time

Show the blood-spat overlay when receiving damage?

damagescreen

If overlay of blood-spat, at what blending (transparency) level?

damagescreen transparency

If overlay of blood-spat, use which factor?

damagescreen factor

If overlay of blood-spat, at what speed does it fade?

damagescreen fade

Sets the size of your crosshair.

the crosshair size

Turns on or off crosshair effects.

turn off all effects

turn on all effects (color and size change)

turn on color change/turn off size change

turn off color change/turn on size change

Sets the icon size of the players shown in the radar and the minimap.

size of icons inside radar

Colour of CN column in scoreboard.

color

Changes at what height you are floating in the radar-view.

height

Enables or disables showing the player name on the HUD when in your crosshair.

0: off, 1: on

Enables or disables showing the player's horizontal speed (vector).

0: off, 1: on

Hides most of elements on the HUD for X frames.

blank out the HUD

Shows or hides the scores.
Determines if scores should be shown on death.
Sets the order priority for the column flags on the scoreboard.

low priority: left, high priority: right

Sets the order priority for the column frags on the scoreboard.

low priority: left, high priority: right

Sets the order priority for the column deaths or disables it on the scoreboard.

-1: disable, low priority: left, high priority: right

Sets the order priority for the column ratio or disables it on the scoreboard.

-1: disable, low priority: left, high priority: right

Sets the order priority for the column score or disables it on the scoreboard.

-1: disable, low priority: left, high priority: right

Sets the order priority for the column pj/ping or disables it on the scoreboard.

-1: disable, low priority: left, high priority: right

Sets the order priority for the column cn on the scoreboard.

low priority: left, high priority: right

Sets the order priority for the column name on the scoreboard.

low priority: left, high priority: right

Sets whether or not to display the accuracy information window.

1: on, 0: off

Resets accuracy counters.
Shows in the console accuracy of all used weapons.
Sets the transparency of the console.

Alpha value

Sets the transparency of the vote display.

Alpha value

# Visuals

This section describes identifiers to configure the visuals.
Resets the OpenGL rendering settings.
Changes the screen resolution.

width

height

Returns a width of the desktop resolution (or zero, if not available).
Returns a height of the desktop resolution (or zero, if not available).
Returns a list of available screen resolutions.
Checks for the searchstring in all loaded extensions.

extension

if (glext shadow_funcs) [echo you have shadow functionality] [echo no shadows for you]
Sets the range of FPS (AC will adjust LOD to achieve it).

min

max

Limits the FPS (frames per second) of AssaultCube's video output.

maximum FPS

Sets the transparency/opacity level of stencil shadows.

Alpha level

Swaps vertices of model triangles.
Loads a font texture to use as text within AssaultCube.

the font name

the path to the font texture

the default width

the default height

offset (co-ordinate X)

offset (co-ordinate Y)

offset (width)

offset (height)

Specifies a region of an image to be used as a font character.

X co-ordinates (from top-left corner)

Y co-ordinates (from top-left corner)

width

height

Specifies, at what char the font definition proceeds.

the ascii code of the first char

Changes the current font.

font name

Returns a name of the current font.

name of font

Sets the field of view (fov).

the FOV value

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

Icon size

Time in milliseconds before the abovehead icon dissapears.

abovehead icon display time

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

Blood display time

Turns on and off the display of blood.

Enable/Disable blood

Enables or disables the gib animation entirely.

off OR on

Sets the number of gibs to display when performing a "messy" kill (grenade, knife, sniper headshot).

number of gibs

Sets the time for gibs to live (in milliseconds), after which they will disappear.

time to live

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

velocity

Sets the team display mode.

the team display mode

Sets the size/resolution of the dynamic shadow data.

the size

Sets the display size of the dynamic shadows.

the size

Sets if dynamic shadows should be saved to disk.

auto save

Sets the alpha value (transparency) for dynamic shadows.

the alpha value

Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.

0 off, 1 on

Determines the subdivision of the water surface in maps.

the subdivisioin value

Turns on/off the reflections in the water surface.

enable/disable water reflections

Turns on/off water refractions.

enable/disable water refractions

Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).

wave height (floating-point value)

Enables or disables fullscreen.

fullscreen

Toggles fullscreen on or off.
Shows the maximum level of anisotropic filtering supported by the graphics hardware.
Sets the level of anisotropic filtering.

anisotropic filtering

Sets the level of full-scene antialiasing (FSAA).

full-scene antialiasing

Sets the screen width.

the screen width

Sets the screen height.

the screen height

Returns the actual width of the screen/window.

the screen/window width

Returns the actual height of the screen/window.

the screen/window height

Enables using always desktop resolution in fullscreen mode.

Use desktop resolution for fullscreen

Sets the bits for the depth buffer.

depth pixels

Enables or disables vsync.

vsync

Sets the temporary (to next map start) hardware gamma value.

the gamma value

Sets a persistent gamma value for a map.

the gamma value

Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels.

the error value, 1 being the best quality

Minimal level of detail.
Specifies the Field Of View when in spectating/ghost mode.

Spectate FOV size

Chooses between local or remote player's FOV when spectating.

0: uses 'spectfov' and the local 'scopefov', 1: uses 'fov' and 'scopefov' of the spectated player

Shows the maximum texture size (in pixels) supported by the graphics hardware.
The maximum texture size that will be used by the engine, larger textures will be scaled down.

maximum texture size

Gets the maximum number of supported textures when performing multitexturing.
Reduces the size of all texture by the selected factor:
-1: 2x2 : 0 : 1: x0.5 : 2: x0.25 : 3: x0.125
Note: -1 is a special mode which reduces all textures to flat coloured surfaces.

scale selection

Controls whether textures with a scale higher than 1.0 will be scaled down while loading (0) or not (1).

scale down?

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

Bullethole display time

Turns on/off the display of bullet holes.

Enable/Disable bullet holes

Scales all particles.

the scale percentage

Maximum number of smoke particles along shotline of sniper rifle.

maximum number of smoke particles

Sets the time available for interpolation between model animations.

the amount of milliseconds for the interpolation

Adjusts gib/gibnum/gibspeed/gibttl variables collectively.
Makes dead players instantly pop out of existence, instead of falling over and sinking into the ground.

BOOL

Sets the maximum value the display will roll on strafing.

the roll value

Sets the maximum value the display will roll when you get damages.

the roll value

Limits the maximum value the display will roll on strafing or if player gets damages, when spectating other players.

The roll value

Chooses whether the players hand carrying the weapon appears as right or left handed.

0: lefty, 1: righty

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

0 = Off, 1 = On

Determines the skin of the current player.

skin id

Chooses skin when playing for team CLA.

skin id

Chooses skin when playing for team RVSF.

skin id

Determines the valid distance when extrapolating a players position.

distance

Determines the speed when extrapolating a players position.

movement speed

Returns an encoded string to display an inlined image outside the console.

mnemonic

Checks for new files in packages/misc/igraph/ folder.
Scales inlined images (in percent).

size of images (in percent)

Scales the hardcoded inlined images: "1".."9" (in percent).

size of images (in percent)

Enables animation of inlined images with multiple frames.

0: display only first frame, 1: enable animation

Default frame time for inlined images with multiple frames.

frame time for images

Hides inlined images in the console.

0: show, 1: hide

Per-map override to disable water reflection on the client.

boolean

Per-map override to limit waveheight on the client.

boolean

Per-map override to disable stencil shadows on the client.

boolean

Ignores per-map overrides to disable water reflection on the client.

boolean

Ignores per-map overrides to limit waveheight on the client.

boolean

Ignores per-map overrides to disable stencil shadows on the client.

boolean

Scaling factor for all light in the game.

divisor

# Sound

This section describes all identifiers related to music and sound effects.
The distance from the source emitting the sound to the listener.
This value indicates the relative "strength" of a sound (how far away the sound can be heard).
Plays the specified sound.

number of the sound to play

Plays all hardcoded sounds in order.
Mutes a specific game sound.

ID of the sound to mute

audible?

Returns 1 if sound N is muted, else 0.
mutesound 5; if (soundmuted 5) [echo Sound 5 is muted!] [echo Sound 5 is not muted!]
Output: Sound 5 is muted!

sound ID

Unmutes all previously muted sounds.
Specifies the interval for checking mapsounds.

interval in milliseconds

Enables verbose output for debugging purposes.

enable audio debug

Each subsequent played sound's gain-value is scaled by this percentage.

percentage

Sets the music volume.

the volume

Plays music in the background.

music file name

playtime

command to be executed, when music is done

Preloads the sound track.

soundtrack number

Registers a track as music.

music file

Registers a sound.
registersound "player/jump" 80
It registers packages/audio/player/jump.ogg sound with volume 80

sound name

volume

loop

audible radius

Lists sound index numbers and short descriptions for all sounds of one or more categories.
echo (enumsounds "VOICECOM !PUBLIC")
It will list all voicecom sounds that are for teams only
echo (enumsounds (listoptions soundcategories))
It will list all sounds

list of sound categories (flags)

Enables or disables the audio subsystem in AC.

enable

Sets the desired amount of allocated sound channels.

number of channels

Indicates if the footsteps sound should be played.

enable footsteps

Indicates if the footsteps sound for the local player should be played.

enable footsteps

Plays a sound upon every successful hit if enabled.

off OR on

Sets the sound volume for all sounds.

the volume

Defines the health level at or below which a heartbeat sound will be played.

health value

# Ingame reference

This section describes all identifiers related to the ingame documentation reference.
Adds a new section to the ingame documentation.

the section name

Adds a new identifier documentation to the last added section.
docident fov "Sets the field of view."
docident "newent light" "Adds a new light entity."

name of the identifier

the description

Adds a new argument documentation to the last added identifier.

the token

the description

the value notes

flags this argument as variable-length

Adds a new documentation remark to the last added identifier.

the remark

Adds an example to the last added identifier.

the example code

the explanation

Adds a new documentation reference to an identifier.

the display name

the identifier to refer to

the URL to refer to

Render documentation references (docrefs) of the identifiers.

0: hide, 1: render

Outputs a list of yet undocumented identifiers (commands, variables, etc.).

output all identifiers

Outputs a list of identifier documentations that do not match any existing identifier.
Searches for pattern in all ingame identifier documentations (reference) entries.

the pattern

silent?

Returns a string of the specified identifier documentation (reference) entry.

name of the identifier

the string index number of entry

Writes out a base XML documentation reference containing templates for the builtin identifiers.

the reference name

the XML schema location string

XML stylesheet to use

Adds a new default key to an identifier.
Allows to scroll through the rendered identifier documentation.

offset (number of lines)

Render identifier documentation for the typed command in the console.

0: hide, 1: render

Enables identifier details or statement analyser.

level of displaying the additional informations

Writes out an XML documentation reference file containing undocumented identifiers or identifiers marked with "TODO".

Also include aliases?

# Serverbrowser

This section describes all identifiers related to the serverbrowser.
Adds a server to the list of server to query in the server list menu.

the address of the server (hostname or IP)

the port

Clears the server list.
Whether servers that have not yet responded to a ping should be shown in the server list.
Contacts the masterserver and adds any new servers to the server list.

force update

Sets the method which client will use to contact the masterserver.

0: direct TCP connection, 1: HTTP connection (via proxy)

Sets the number of servers to be pinged at once.
Adds a new category in the serverbrowser favourites.

reference designator (keep short and unique)

Lists all registered serverbrowser favourites categories.
Hides favourites icons in serverbrowser.

0: show, 1: hide

Hides favourites tag column in serverbrowser.

-

Hides server IP and port in serverbrowser.

-

Selects ascending of descending sort order in serverbrowser.
Sort official maps over custom maps in serverbrowser.

-

Show 'minutes remaining' in serverbrowser.
Show player names in serverbrowser.

-

Show only servers of one favourites category in serverbrowser.

category index

Show only servers with the correct protocol in serverbrowser.

-

Show 'weights' in serverbrowser.
Shows on serverbrowser number of all players on the all servers.
Search a nickname (or -part) on all servers.

nickname to search

# Server commands

This section lists commands used by the client that communicate to the server. Most are used for server administration. Also see the "mode" section and the "map" command which also communicate to the server.
Sets user-define server description.

description

Sends the extension name and argument string to the server, which can use it for custom action.

extension name

argument

Sets automated team assignment.

Enables or disables auto team

Temporary ban of the specified player from the server.

The player to ban

The reason

Calls a vote on the server.

Vote type

First argument

Second argument

Calls a vote to force the specified player to switch to the specified team.

client number of player

the team to force to

Calls a vote to forceteam yourself to the specified team.

the team to force yourself to

Shuffles the teams.
Gives admin state to the specified player.

The player to become admin

Kicks the specified player from the server.

The player to kick

The reason

Sets the mastermode for the server.

The master mode

Removes all temporary bans from the server.
Clears specific demo currently in memory on the server.

number in list

Clears all demos currently in memory on the server.
Sends a map to the server.

map to send

Deletes a map from the current server.

map name

Claims or drops admin status.

Status

Password

Get vita for a client.

client number

Whether or not to output debugging information.

boolean

# Authentication

This section describes identifiers related to player authentication.
Manages player authentication.

parameter

Sets a number of megabytes of RAM that are used for the password hash calculation (when new passwords are created).

number of RAM [MB]

Sets a number of rounds, if greater than 0, then new password hashes are created with this fixed number of rounds.

number of rounds

Sets an amount of time (in ms), new password hashes are created with this fixed amount of time.

amount of time [ms]

Manages a list of keys other than the game key (which is managed by authsetup).

parameter

Returns a public key of game account.
Enables some debug messages in crypto.cpp file.

enable debugging

List all certificates.
Create and sign certificates from Cubescript.

command

linename or pubkey

value or comment

comment

# Game modes

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

Team Deathmatch

Co-op edit

Deathmatch

Survivor

Team Survivor

Capture the Flag

Pistol Frenzy

Bot Team Deathmatch

Bot Deathmatch

Last Swiss Standing

One Shot, One Kill

Team One Shot, One Kill

Bot One Shot, One Kill

Hunt the Flag

Team Keep the Flag

Keep the Flag

Team Pistol Frenzy

Team Last Swiss Standing

Bot Pistol Frenzy

Bot Last Swiss Standing

Bot Team Survivor

Bot Team One Shot, One Kill

mode 7; map ac_complex; echo "Bot Team Deathmatch on ac_complex"
mode 8; map ac_mines 4; echo "Bot Deathmatch on ac_mines for 4 minutes"
mode 5; map ac_shine; echo "CTF @ ac_shine"
Returns the name of current game mode.
echo (getmode)
Example output: capture the flag
echo (getmode 1)
Example output: CTF

0 = full mode name, 1 = mode acronym

Returns the number of current game mode.
echo $gamemode
Output: 5
Checks the current game mode for certain attributes.

attribute name

Toggles use of acronyms instead of full modenames in the serverbrowser, scoreboard, voting info.
Returns the mode number for a specified mode acronym.
echo (modenum ctf)
Output: 5
echo (modenum btosok)
Output: 21

the mode acronym

mode

description

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

0 off, 1 on

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

The name of the map you wish to edit

Starts a map with the mode "Capture the Flag".
ctf ac_mines

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

Starts a map with the mode "Deathmatch".
dm ac_complex

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

Starts a map with the mode "Hunt the Flag".
htf ac_mines

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

Starts a map with the mode "Keep the Flag".
ktf ac_mines

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

Starts a map with the mode "One Shot, One Kill".
osok ac_complex

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

Starts a map with the mode "Pistol Frenzy".
pf ac_complex

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

Starts a map with the mode "Team Deathmatch".
tdm ac_complex

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

Starts a map with the mode "Team Survivor".
tsurv ac_complex

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

Starts a map with the mode "Survivor".
surv ac_complex

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

Starts a map with the mode "Bot Deathmatch".
bdm ac_complex

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 10 minutes if T is 0 or not specified)

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

The name of the map you wish to play

The time limit, in minutes (default 15 minutes if T is 0 or not specified)

# Editing configs

All the below commands are used specifically in map configuration files. Some of these commands can also be used without the need of a map configuration file.

anim

frame

range

speed

tag name

particle type (integer or name)

attribute 1

attribute 2

name

vert1

vert2

vert3

vert4

anim

startframe

range

speed

tag name

particle type (integer or name)

attribute 1

attribute 2

parentno

childno

tag name

model

object name

skin texture

alphatest

alphablend

cachelimit

cullface

percent

shadow distance

Translates (= moves) the model.

translucency

vertexligh

Adds a value for a specified attribute to the model.

attribute

value

Sets the fog distance.

The fog distance

Sets the fog and clearing colour.

The colour

Binds a texture to be used if a slot couldn't be loaded with a given textures path.
loadnotexture // Reset to default
loadnotexture "makke/black.jpg" // Any missing texture will show up black

file name of the texture to bind

Returns the current "notexture" path (set by loadnotexture).
echo (getnotexture)
Loads a skymap for a map.
loadsky makke/mountain
loadsky textures/skymaps/makke/mountain

path to skymap textures

Registers a mapmodel that can be placed in maps.

The square radius of the bounding box.

The height of the bounding box.

The initial height offset from the ground.

This integer is redundant. Leave it at zero so you don't break the command.

The name of the map model

If '1', the model is preloaded, even if no entities use it

Resets the mapmodel slots/indices to 0 for the subsequent "mapmodel" commands.
Defines a mapsound.

Path to the sound file

Maximum simultaneous sounds/maxuses

Resets the mapsound slots/indices to 0 for the subsequent "mapsound" commands.
Binds a texture to the current texture slot.

Scale of the texture to load (should be a power of two).

File name of the texture to bind

Sets the texture slots/indicies to 0 for the subsequent "texture" commands.
Determines the water colour in a map.

red colour intensity

green colour intensity

blue colour intensity

alpha value (transparency)

Part of a map file

chunk of mapdata

Declaration of map parts.

many combinations

Whether or not to save all xmaps on exist and restore them at game start.

boolean

# Bot mode

This section describes bot mode related identifiers. See also "docs/cube_bot-readme.txt".
Enables or disables the processing of the bots artificial intelligence.

off OR on

idlebots 1
Will make the bots stand still.
idlebots 0
Will enable the bots to move and shoot.
Kicks all bots out of the current game.
Kicks the bot with the given name out of the current game.

botname

kickbot Robbie
Will make the bot named "Robbie" dissapear from the current game.
Adds a bot for a given team with a given skill calling him a given name.

team

skill

name

addbot RVSF medium Robbie
Will add a bot named Robbie with a medium skill level to the RVSF team.
Adds a given count of bots for the given team with the given skill and select random names for them.

count

team

skill

addnbot 2 CLA bad
Will add 2 bots with a bad skill level to the CLA team.
Changes the skill level for the given bot.

botname

botskill

botskill Robbie best
Changes the previous bot skill level of the bot named Robbie to a 'best' skill level.
Changes the skill level for all bots.

botskill

botskillall worse
Changes the previous bot skill level for all bots to a 'worse' skill level.
Enables or disables the ability of the bots to fire their weapons.

shooting bots?

botsshoot 0
Bots won't shoot.
Determines if bot waypoints should be selected/placed using the crosshair or by the nearest location to your player.

Note: This is turned on by default.

Assigns a number to the nearest waypoint.

number

Makes waypoints visible and either turns on or off the waypoint information display.

show info?

visible

Takes the current player yaw for the current waypoint.
When used you will see what the bot sees.

botname

Adds a bot waypoint at the current position.

connect automatically

Automatically places waypoints.

on

Deletes the selected waypoint.

# Optional

This section describes optional identifiers from the files in config/opt/ folder and commands, which enable them.
Loads optional obsolete autosave settings.
Loads optional compatibility settings for old scripts.
Loads optional settings for bot survival mode.
Loads optional settings for string parsing.
Loads optional FAQ settings.
Loads batch map conversion tools.
Loads extra map editing scripts.
Loops through every character in the given string and executes the given block of cubescript on each iteration.
parsestring "Hello world" iter [echo $iter]
Uses echo on every character in the string: "Hello world"
parsestring "Hello world" iter [echo (concatword "Char #" $__iter ": " $iter)]
Uses echo on every character in the string: "Hello world" --- Also outputs the position of each character in the string.
backwardsstring = []; parsestring "This will look interesting backwards." iter [backwardsstring = (concatword $backwardsstring $iter); if (= $__iter 0) [echo $backwardsstring]] 1
Outputs: ".sdrawkcab gnitseretni kool lliw sihT"
parsestring "abcdefghijklmnopqrstuvwxyz" iter [if (> $__iter 4) breakparse [echo $iter]]
Example usage of the breakparse command. Uses echo on characters a through e, then breaks out of the parse.

string

string

string

integer

Breaks out of a parsestring loop.
Removes all whitespace characters from the given string.
echo (trimAllWhitespace " H e ll o w o r l d ")
Outputs: Helloworld

string

Removes all unnecessary leading and trailing whitespace characters from the given string.
echo (trimAllUnnecessaryWhitespace " H e ll o w o r l d ")
Outputs: "H e ll o w o r l d"

string

Prepares a round of bot survival mode on the specified map.

the map to use

the difficulty

Smoothly changes your gamma to the specified value.

the gamma to change to

milliseconds between gamma changes

changegamma 300 30
Every 30 milliseconds your gamma is changed by 1 until it reaches its goal of gamma 300.
Smoothly changes your gamespeed to the specified value.

the gamespeed to change to

milliseconds between gamespeed changes

changespeed 1000 30
Every 30 milliseconds your gamespeed is changed by 1 until it reaches its goal of gamespeed 1000.
Returns 1 if the local player is alive.
echo (alive)
Output: 1
Returns the mode number for the current game.
Returns 1 if the local player has admin privileges, 0 otherwise.
Returns an integer indicating what team a client is currently on.

client number

Finds player name with this client number.

client number

Returns the current game mode number.
Show the client number column on the scoreboard first?

CN column order

Returns the score statistics for the player with the given client number.

client number

echo (pstat_score 0)
Output: 0 5 3 43 1 1 unarmed
The output is a list of FLAGS, FRAGS, DEATHS, POINTS, TEAM, TEAMKILLS, and NAME.
Shows the settings for hidden entities (sparklies).
Hides the list of entity types you set.

list of entity types to hide

Hides all but the single entity type you give.

the entity type to show exclusively

Increments an alias by 1.

the alias name

i = 0; ++ i; echo $i
Output: 1
Increments an alias by floating-point 1.

the alias name

i = 2.14; ++f i; echo $i
Output: 3.14
Decrements an alias by 1.

the alias name

i = 0; -- i; echo $i
Output: -1
Decrements an alias by floating-point 1.

the alias name

i = 4.14; --f i; echo $i
Output: 3.14

# TODO

This section describes identifiers that are not documented yet, but you may try to help us there.