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. Compares if a particular floating-point value is less than or equal to another floating-point value. Compares if a particular floating-point value is equal to another floating-point value. Determines if the first floating-point value is greater than the second floating-point value. Determines if the first floating-point value is greater than or equal to the second floating-point value. Determines if the first floating-point value is not equal to the second floating-point value. Sets the result value of a cubescript block. Executes the specified string as cubescript. Example output: 90.0 Temporarily redefines the value of an alias. Output: 2 Returns the value of the alias. Gets range attribute for builtin variable. Returns whether or not there is an identifier by that name. Performs a floating-point modulo operation. Output: 7.5 Output: 5.0 Returns A raised to the power of B (floating-point). Resets a previously pushed alias to it's original value. It is allowed to use multiple arguments for "pop". So instead of "pop var_a ; pop var_b" you can write "pop var_a var_b". Also, "pop" will now give back the removed value of the first alias from the argument list. This allows using the pop'd value one last time. Output: 1 Performs an addition 2 or more numbers. Example: echo the sum of x and y is (+ $x $y) Performs a subtraction. Performs a multiplication 2 or more numbers. Performs an integer division. Subtracts two floating-point numbers. Adds up two or more floating-point numbers. Performs a floating point multiplication 2 or more numbers. Performs a division with floating-point precision. Adds a value to an alias. Example: += foo 1337 Subtracts a value from an alias. Example: -= foo 1337 Multiplies an alias by a value. Example: *= foo 1337 Divides an alias by a value. Example: div= foo 1337 Adds a floating-point value to an alias. Example: +=f foo 13.37 Subtracts a floating-point value from an alias. Example: -=f foo 13.37 Multiplies an alias by a floating-point value. Example: *=f foo 13.37 Divides an alias by a floating-point value. Example: div=f foo 13.37 Performs a modulo operation. Determines if two values are equal. Output: there are only 10 types of people in the world Determines if two values are not equal. Determines if a value is smaller than a second value. Determines if a value is bigger than a second value. Determines if a values is less than or equal to a second value. Determines if a values is greater than or equal to a second value. Logical AND. Output: 1 Output: 0 Logical OR. output: 1 output: 0 Performs a negation. Performs the operation AND using binary arithmetic on integer values (32-bit signed). Performs the operation OR using binary arithmetic on integer values (32-bit signed). Performs the operation XOR using binary arithmetic on integer values (32-bit signed). Performs the operation NOT using binary arithmetic on integer values (32-bit signed). Integer values are 32-bit signed values, so for example "echo (!b 1)" returns "-2". Returns value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision). Output: 400 Output: 0400 Output: 000400 Output: 2 Output: f Output: d Output: fffffff1 Output: fffffff2 Random value. Rounds the given float. Upper value of a float number. Floor value of a float number. Determines if two strings are equal. Output: the two strings are equal Determines if string B was found in string A. It returns position of string B in string A (counting from 1) or zero, if not found. Output: found Hello in Hello world! Returns the length (in characters, including whitespace) of string S. Output: 12 Copies a substring out of the original. Character indexes begins at 0. If "start position" is negative, the reference is the end of the string. It also counts negative length from total length, if "substring length" parameter is negative. Output: cdefg Output: fg Output: cdefgh Output: bcdefg Controls the script flow based on a boolean expression. $x 10) [ echo x is bigger than 10 ] [ echo x too small ]]]> Takes an integer argument to determine what block of code to execute. This command can only handle up to 23 'cases' (because of cubescript's 24 argument limit). Output: case 2 Loops the specified body. This command sets the alias you choose, as first argument, from 0 to N-1 for every iteration. Loops the specified body while the condition evaluates to true. This command sets the alias "i" from 0 to N-1 for every iteration. Note that the condition here has to have [], otherwise it would only be evaluated once. Browses a list and executes a body for each element. It works optionally with several variables. Browses a list and executes a body for each element. The same as looplist, but it automatically counts the loops in "i", starting with 0. It works optionally with several variables. Output: u x 0 , v y 1 , w z 2 Aborts a loop created with a 'loop', 'looplist' or 'while' command. output: 0 1 2 3 Skip current loop iteration. output: 0 1 3 4 Concatenates multiple strings with spaces inbetween. output: hello world Concatenates multiple strings. The newly created string is saved to the alias 's'. output: CubeScript Grabs a word out of a string. Negative index number returns "". output: two returns the element count of the given list. Searches a list for a specified value. Executes a command after specified time period. Prints 'foo' to the screen after 1 second. Resets all current "sleep". The number of arguments passed to the current alias. Replaces "%" format specifiers in the string by the values specified in subsequent arguments. In addition, it allows access to more than nine parameters. Parameter numbers of 10 and higher have to be prefixed with an additional zero. For example "%010" accesses parameter number ten. 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. Like "format" command, but all parameters are treated as lists and are exploded first. In addition, it allows access to more than nine parameters. Parameter numbers of 10 and higher have to be prefixed with an additional zero. For example "%010" accesses parameter number ten. output: _A B C_D_E_F__ output: _A_B_C_D_E_ Adds color to a string. The whole string has to be included in quotes. Output: a red "Hello" and a green "world!" Leading zeros for the number V to make it W chars wide. It may look like 10 - which might be considered a mnemonic - but it's lowercase-L and 0! Output: 01000 Output: 1000 Generates an alias (list) of the current values for the given aliases/CVARs. Example result: stores "3.000 1 120" into alias "tmp". Binds a name to commands. It is possible to re-bind an alias, even during its evaluation. There is also the shorthand version of defining an alias via the "=" sign. Set an alias as a constant. A constant cannot be redefined in the same AC session: its value cannot be changed. To get rid of a constant, use "delalias". Constant alias is temporary that will not be written to saved.cfg, and thus will not persist after quitting. Set "myalias" value to "myvalue" then "lock" it as a constant. You can directly set a value for your alias when you define it as a constant. 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. Returns a table with two entries per alias: 1) full name and 2) name without prefix. Determines if the argument given is an existing alias or not. Output: 1 Output: 0 Determines if the argument given is a constant or not. Output: 1 Output: 0 Ensures the initialization of an alias. Output: if alias mapstartalways does not exist, this command initializes it. 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. Defines an alias only if it does not already exist. Deletes the passed alias. Forcibly sets a list of aliases to a specified value. Can be written as: Initializes a group of aliases using checkinit. Uses check2init on a list of aliases. Controls whether aliases defined afterwards will be saved (1) or not (0). Rules: * aliases created by "const" and "tempalias" are never persistent; * aliases created or altered by "alias" or "=" become persistent, if the "persistidents" flag is set during that operation; * "persistidents" is false during the execution of almost all config files during game start - those files can create aliases with default values which will not be persistent (until changed later while the flag is set); * before saved.cfg is executed, the flag is set and stays set all throughout the game - which means, that all changes (for example from menus or in console) will change the altered alias to "persistent"; * exceptions for map or model config files are unnecessary, since those run restricted and can't create aliases anyway; * exceptions are necessary for "late run" config files like those in config/opt/ folder. This command may be used to manually set or clear the flag. It also returns the current state of the flag. If used in a config file, the flag is restored to its original value when the file ends execution. In short: only late-run config files (meaning: run after saved.cfg was restored) may need to manually set/reset the flag. Use "const" and "tempalias" where appropriate and clear "persistidents" before creating an alias with a not-to-save default value that may be changed and made persistent later. foo will not be saved and has to be redefined when restarting AC. bar will be saved and persistent across sessions. Injects cubescript punctuation. Output: "hello" Output: [hello] Output: (hello) Output: $hello Output: 90.0 Converts a string to all lowercase characters. Output: hello Converts a string to all uppercase characters. Output: HELLO Tests a character argument for various things. Output: 1 // It is a 0-9 digit Output: 1 // It is a a-z or A-Z character Output: 1 // It is a a-z or A-Z character or 0-9 digit Output: 1 // It is a lowercase a-z character Output: 1 // It is a uppercase A-Z character Output: 1 // It is a printable character Output: 1 // It is a punctuation character Output: 1 // It is a whitespace character See the following c++ functions for more information about the usage of this command: isalpha(), isalnum(), isdigit(), islower(), isprint(), ispunct(), isupper(), and isspace() Returns a string, with a portion of it replaced with a new sub-string. Output: Hello world Returns the average of a list of numbers. Output: 4.0 This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list. 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. Output: Hello world! Lists the argument options for several argument types. Output: "entities ents weapons teamnames teamnames-abbrv punctuations crosshairnames menufilesortorders texturestacktypes cubetypes" Output: "CLA RVSF CLA-SPECT RVSF-SPECT SPECTATOR" Replaces control characters in a string with escaped sequences. Output: "\f3Hello World" Creates a temporary alias that will not be written to saved.cfg, and thus will not persist after quitting. Interactively edits an existing alias in the console buffer. This takes the current value of the existing alias, and inserts it into the command line / text entry box. Result: edit test: Hello World Interactively edits an alias in the console buffer. This takes the current value of the alias, and inserts it into the command line / text entry box. If the alias doesn't exist, it is created. Result: edit test: Hello World Makes an input perform a certain command. It opens a custom console buffer with custom prompt, initial buffer text and execution script (which gets the input buffer content in alias cmdbuf). If "nopersist" is not zero, the command will not be stored in console history. Returns a sorted version of a list. Output: 1 2 3 Isolates the given context. This disables access from this context to identifiers located in other contexts, also it removes all aliases created in this context once the running context changes. Secures this configuration for the rest of the game.
This section describes general identifiers. Toggle for taking an automatic screenshot during intermission. Toggle format of screenshot image. Your choice is for BMP (0), JPEG (1) or PNG (2). Scales screenshots by the given factor before saving. 1 = original size, 0.5 = half size, etc. Returns the file extension of the client's current screenshottype setting. Example output: .jpg Sets the JPEG screenshot image quality. The image quality is set by it's compression level, a value of 10 sets maximum compression and a small file size but results in a bad quality image while a value of 100 results in a large file but gives the best quality image. Sets the PNG screenshot file compression. A value of 9 sets maximum data compression and a smaller file size while a value of 0 results in a large file image, quality is always the same since PNG its a loosless format. Writes current configuration to config/saved.cfg - automatic on quit. Outputs text to the console. Outputs text to the console and heads up display. Enables or disables the ability of hudecho to output text to the heads up display. Puts a prompt on screen. This puts a prompt on screen that you can type into, and will capture all keystrokes until you press return (or ESC to cancel). If what you typed started with a "/", the rest of it will be executed as a command, otherwise its something you "say" to all players. The completion will work on the first word of your console input. If you enter "/demo " and press TAB you will cycle through all available demos. 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. Seconds since the epoch (00:00:00 UTC on January 1, 1970). A list of values for current time. Format: YYYY mm dd HH MM SS Representation of date. Format: Www Mmm dd hh:mm:ss yyyy Use timestamp to create your own formatting. The current time in (H)H:MM:SS format. Quits the game without asking. Takes a screenshot. Screenshots are saved to "screenshots/[date]_[time]_[map]_[mode].[ext]", where [ext] is the image type selected. Takes a "clean" screenshot with no HUD items. Your current HUD configuration is stored into a buffer, and is re-enabled afterwards. Saves an image of the entire radar-overview of the map. Executes all commands in a specified config file. It also allows to pass arguments to and deliver results from script files - when a script file is executed, any additional arguments are passed as execarg1..execargX to the script. The number of arguments is in execnumargs and if the script in the file sets the value of execresult, the exec command returns that value. Example: if there is a file testscript.cfg with this content: execresult = (* $execarg1 $execarg2) then the command: "echo (exec testscript.cfg 6 7)" will output "42". Executes all commands in all config files in the specified directory. Executes a config file within "config" folder. Clears the list of secured maps. Adds a map to the list of secured maps. Secured maps can not be overwritten by the commands sendmap and getmap. Returns a list of values describing the current engine (rendering) state. It will only be filled after the first frame was drawn. The list is: FPS LOD WQD WVT EVT FPS = Frames Per Second LOD = Level Of Detail WQD = World QuaD Count WVT = World VerTex Count EVT = Extra VerTex Count (HUD & menu) Enables output of processed network packets. This variable only has an effect if the client binary is compiled in debug mode. Determines if the current played map should be automatically downloaded if it is not available locally. Automatically get new map revisions from the server. Sets the correction value for clockfix. Engine source-code snippet (main.cpp): if(clockfix) millis = int(millis*(double(clockerror)/1000000)); Enables correction of the system clock. Determines if all settings should be reset when the game quits. It is recommended to quit the game immediately after enabling this setting. Note that the reset happens only once as the value of this variable is reset as well. Determines how fast network throttling accelerates. Determines how fast network throttling decelerates. Determines the interval of re-evaluating network throttling. Gets an integer representing the game version. READ ONLY As example, version 1.2.0.2 is represented as value 1202. Gets an integer representing the game protocol. READ ONLY As example, the protocol of version 1.2.0.2 is represented as value 1201. Indicates if a connection to a server exists. 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. This is always a two-letter language code as defined in the ISO 639 standard, three-letter codes are currently not allowed. If lang is not set, or if the server does not have a matching MOTD file, it will fall back to English. Note: this does not affect the client language, which is derived from the system settings (e.g. on many *nix systems, it may be changed via the "LANG" environment variable). en, de, fr, ... Toggles the showing of the "Apply changes now?" menu when changing certain graphical settings. Indicates the state of the console. Executes the specified command in the command line history. For example, binding "history 1" to a key allows you to quickly repeat the last command typed in (useful for placing many identical entities etc.) Allows to browse through the console history by offsetting the console output. Sets how many typed console commands to store. This value sets how many command lines to store in memory, everytime a command is entered it gets store so it can be recalled using the "/" key along with the arrow keys to scroll back and forth through the list. Sets the total number of text lines from the console to store as history. Omit variables with unchanged default values from saved.cfg. If this value is 1, variables that are at their default values are omitted from saved.cfg. If 0, the variables are written to saved.cfg, but commented out. Controls how many variables (with similar names) are grouped together on one line in saved.cfg. This only pertains to commented variables in saved.cfg caused by omitunchangeddefaults being 0. Omit unchanged default binds from saved.cfg. Adds a packages source server where to download custom content from. Only add servers you trust. The list of servers is saved into config/pcksources.cfg on game quit. If a priority is given, it influences the sorting of servers. Servers with higher priority are queried first. If servers have the same priority, they are sorted by ping. Default priority is zero. addpckserver http://packages.ac-akimbo.net Returns a table with four columns of all configured package servers. The columns are: host name, priority, ping and resolved. "resolved" is a flag, indicating, if the server answered the ping during game start. Resets the list of packages source servers where to download custom content from. Restart AssaultCube to take the effect. Determines if the game should try to download missing packages such as textures or mapmodels on the fly. When the variable autodownloaddebug is set to 1 and/or in debug binaries, more debug output is produced. Add the zip package file "mods/zipname.zip" to the virtual file system. Add the zip package file "mods/zipname.zip" to the virtual file system. Only files below the path "packages/" are added (and also files below "config/", if zipname starts with "###"). If the size of the zip file is below "zipcachemaxsize", the whole zip file is cached in memory. (Un-cached zip files are kept open at all time, so caching keeps the number of simultaneously opened files lower.) Maximal size of the file, which is cached in memory. If the size of the zip file is below "zipcachemaxsize", then during loading the whole zip file is cached in memory. When the size is greater, then zip is just opened as a file and read from disk. Removes one zip file from the virtual file system. Removes all zip files from the virtual file system. Lists zip files in "mods/". By default or if "what" is "all", all zips are listed. If "what" is "active", only those zips, that are already in use, are listed. If "what" is "inactive", only the unused zip files are listed. Reads and returns the first 11 lines from the file "desc.txt" in the named zip file. The first line is supposed to contain a descriptive title for the zip (for use in menus) and the next 10 lines should contain a more detailed description (also for use in menus). The command also unpacks "preview.jpg" from the zip and mounts it as a temporary file under the name "packages/modpreviews/zipname.jpg". Returns the list of files contained in a zip file. Returns the revision number of the zip file. The number is supposed to be part of a filename: "revision_n". If no such file is found in the zip file, the return value is zero. The content of the revision file is not relevant and a file size of zero is recommended. Sets the formatstring for demo filenames. we use the following internal mapping of formatchars: %g : gamemode (int) ; %G : gamemode (chr) ; %F : gamemode (full) ; %m : minutes remaining ; %M : minutes played ; %s : seconds remaining ; %S : seconds played ; %h : IP of server ; %H : hostname of server (client only) ; %n : mapname ; %w : timestamp "when" (formatted by demotimeformat) . Sets the formatstring for demo timestamp. If the string starts with 'U', UTC is used - otherwise local time. The same format options as in strftime(). 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. If extension is specified, only files of that extension are listed. If the extension is "dir", only directories are listed.
This section describes gameplay related identifiers. If this alias exists it will be run when the game reaches intermission. 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. This will output the string and override any other actions that might've been defined. 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. This will output the string and override any other actions that might've been defined. 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. 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. Remark: it works only in singleplayer. If defined, this will be executed each time a flag action occurs. Remark: it works only in singleplayer. If defined, this will be executed each time you pick up an item. Remark: it works only in singleplayer. If defined, this will be executed each time you shot a bullet, throw a grenade or use your knife. Remark: it works only in singleplayer. If it's defined, this alias will be executed each time a damage is done. Remark: it works only in singleplayer. If defined, this will be executed each time you switch to a different weapon. Remark: it works only in singleplayer. If defined, this will be executed each time you reload a weapon. Remark: it works only in singleplayer. If defined, this will be executed when you or another player join(s) a server. If defined, this will be executed when you or another player disconnect(s) from a server. If defined, this will be executed each time a player spawns. Remark: it works only in singleplayer. If defined, this will be executed when you or another player change(s) his name. The alias is executed before the name is effectively changed, so you can still get the previous name of the client from this alias. Remark: it works only in singleplayer. If defined, this will be executed when another player sent you private message. Returns the shot statistics for the player with the given clientnumber. 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. The list is: knife/atk dmg pistol/atk dmg carbine/atk dmg shotgun/atk dmg smg/atk dmg sniper/atk dmg assault/atk dmg nade/atk dmg akimbo/atk dmg Shifts your selected weapon by a given delta. By default the mouse-wheel shifts one up or down according to your scroll direction. Displays a scope for the sniper-rifle. It is used in the zoom-script (config/scripts.cfg: "const zoom"). Cycles through all available spectator modes. These modes are: Follow-1stPerson, Follow-3rdPerson, Follow-3rdPerson-transparent and Fly. Get the IP address of a given clientnumber - only admins get shown the last octet. Agree or disagree to the currently running vote. Enables or disables voicecom audio. Loads a crosshair for given type. Loads the red_dot.png crosshair for all weapons. Same as above. Loads the red_dot.png crosshair for all weapons. Loads the red_dot.png crosshair for your knife only. Loads the red_dot.png crosshair for your assault rifle only. Loads the red_dot.png crosshair for your sniper rifle scope only. Loads all default crosshairs (including teammate and scope). Get the game demos listing from the server we are currently connected. Gets the recorded demo from a game on the server. If F10 is pressed earlier than two minutes into the game, the last game will be downloaded. If F10 is pressed later than two minutes into the game, the current game is scheduled to be automatically downloaded when it ends. Drops the taken flag. Triggers a crouch. Triggers a jump. Returns client number of spectated player. Returns attributes of a team. 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 weapon-index the local player currently has selected as primary. This is not the same as curweapon - which could be a grenade or the knife. Determines if the local player (you) are currently carrying a primary weapon. Everytime you press the left mouse button, assuming you are carrying your primary weapon, the above echo will be executed. Returns 0 (false) or 1 (true). Returns information on the current server - if you're connected to one. If I is 0 (omitted or any other value than the ones below) you will get a string with 'IP PORT' If I is 1,2 or 3 you will get the IP, HostName or port respectively. If I is 4 you get a string representing the current state of the peer - usually this should be 'connected'. If I is 5 you will get a server name. If I is 6 or 7 you will get a server description. If I is 8, you will get a serverbrowser-line with the server - this is handled with caution, sometimes empty, #8 will be outdated w/o serverbrowser open. Output: I am connected to ctf-only.assault-servers.net 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. If connected to a multiplayer server, it votes to load the map (others will have to type "map M" as well to agree with loading this map). To vote for a map with a specific mode, set the mode before you issue the map command. A map given as "blah" refers to "packages/maps/blah.cgz", "mypackage/blah" refers to "packages/mypackage/blah.cgz". At every map load, "config/default_map_settings.cfg" is loaded which sets up all texture definitions, etc. Everything defined there can be overridden per package or per map by creating a "mapname.cfg" which contains whatever you want to do differently from the default. When the map finishes it will load the next map when one is defined, otherwise it reloads the current map. You can define what map follows a particular map by making an alias like (in the map script): alias nextmap_blah1 blah2 (loads "blah2" after "blah1"). Sets the next gamemode then calls a vote for a map. Loads a map directly in the current gamemode (singleplayer only). Sets the primary weapon on next respawn. Reloads the weapon. Sets the nick name for the local player. Returns the nick name of the local player. Outputs text to other players. If the text begins with a percent character (%), only team mates will receive the message. Sends a private message to a specified client. Holds the CN of the last client who sent you a private message. If you haven't recieved any private messages, 'lastpm' is -1 Easily respond the last client who sent you a private message. Ignore a player. You won't see any further game chat or hear any more voice com messages from that player. Print a list of all players that you are currently ignoring. Clear list of ignored players. Omit the client number 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. Ignore all clients on the enemy team. Mutes a player. You won't hear any further voice com messages from that player. Clears a list of muted players. Omit the client number to clear the whole list. Prints a list of all players that you have muted. Action chat message. Adds a command to complete nicknames on. Your own nick will be ignored. with this you can enter "/nickgreet " and cycle via TAB to the nickname you want to greet. Connects to a server. If the server name is omitted, the client will try to connect to an available server in the LAN. If the port is omitted or set to 0, the default port will be used. Connects to a server and tries to claim admin state. This command will connect to a server just like the command 'connect' and try to claim admin state. If the specified password is correct, the admin will be able to connect even if he is locked out by ban, private master mode or taken client slots. If successfully connected, bans assigned to the admin's host will be removed automatically. If all client slots are taken a random client will be kicked to let the admin in. If the server name ist omitted, the client will try to connect to an available server in the LAN. If the port is omitted or set to 0, the default port will be used. connect as admin on port 777 of localhost will try to connect to a LAN server on the default port as admin with the given password of "myAdminPassword". Leaves a server. Disconnects then reconnects you to the current server. Tries to connect to a LAN server. Sets the team for the local player. Swaps your player to the enemy team. Moves from active team to spectator during match. Connects to a modded server. The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server. Connects to a modded server and tries to claim admin state. The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server. Tries to connect to a modified LAN server. The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server. Changes the weapon (must be bound to a key). 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 grenades, if available (must be bound to a key). See also "quicknadethrow" command. 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. A knife will always return 1. Weapons that aren't available will return -1. Returns contents of magazine reserve. Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve) Retrieves the last map that was sent to the server using 'sendmap'. If the command is passed an argument, different than the map being played, the game tries to download the specified map from an available packages source server. Downloads and loads the specified map from an available packages source server. Try to download mods/modname.zip from all configured package servers. Does not automatically activate the mod. Sets the desired spectating mode. Toggles spectator mode. Enables persistent spectating concrete player. For "spectatepersistent" = 1 persistent spectating is enabled in all game modes in multiplayer (that means, that spectated player isn't changed after his death), for "0" it is enabled only in non-arena modes. Stops demo playback. Returns 1 when the current game is being played from a demo, else 0. Kills your player. You will lose 1 frag point and receive 1 death point when using this command. Plays a recorded demo. Playback is interpolated for the player whose perspective you view. Go to a predefined number of minutes before the end of the game while watching a demo. Rewind the current demo to S seconds ago. Note: you can use a negative value to forward. 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 $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. Indicates if the weapons should be reloaded automatically. Determines the FOV when scoping. Sets the gamespeed in percent. This does not work in multiplayer. Determines by how much to multiply the fly speeds by. Sets the behavior of weapon switching upon akimbo expiration. If no ammunition is detected for the target weapon, it will fallback to the previous weapon until it finds a weapon with ammunition to use. Draws a zone marker with the specified color and dimensions on the minimap/radar. This is primarily intended for the survival mode. You can draw a few zones at a time. They will be reset (i.e. removed) once a new game starts. Note that the coordinates must be specified as integers, not as floating-point values. 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. The return value includes the local player "(you)" and works in both singleplayer and multiplayer scenarios. It can be used, for example, in a loop to find all valid clients (players) on server. Note: it DOESN'T return current number of players. Determines if the client number given is a valid client (player). Example output: 1 Example output: 0 Finds client number (cn) of player with given name. Returns the highest valid client number available. Switches to grenades, if available (must be bound to a key). If grenades are already selected or the key is held, it throws a grenade and switches back to previous weapon. 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. 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). 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). This command is identical to fragmessage, please see it.
This section describes keyboard and mouse related identifiers. Binds a key to a command. To find out what key names and their default bindings are, look at config/keymap.cfg, then add bind commands to your autoexec.cfg. Similar to bind, but is only active while editing, where it overrides the regular bind for the specified key. Similar to bind, but is only active while spectating, where it overrides the regular bind for the specified key. Binds a key to many different actions depending on the current game state. This command requires 6 arguments, no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing". Executes a command on the release of a key/button. This command must be placed in an action in a bind or in an alias in a bind. Adds a block of code, if it does not already exist, to a keybind. Returns the contents of a keybind, bound with 'bind'. Returns the contents of a keybind, bound with 'editbind'. Returns the contents of a keybind, bound with 'specbind'. Searches keybinds (bound with 'bind'), returns keys with matching contents. Output: R This is the inverse of 'keybind' Searches keybinds (bound with 'editbind'), returns keys with matching contents. Output: F5 This is the inverse of 'keyeditbind' Searches keybinds (bound with 'specbind'), returns keys with matching contents. This is the inverse of 'keyspecbind' Returns the name of a key via a specified code. Output: BACKSPACE Output: PAGEUP Returns -255 if the key does not exist. See /config/keymap.cfg for a full list of valid key codes. Returns the integer code of a key. Output: 8 Output: 280 Returns -255 if the key does not exist. See /config/keymap.cfg for a full list of valid key names. Resets all binds back to their default values. This command executes the file /config/resetbinds.cfg which will bind all keys to the values specified in that file, thus resetting the binds to their default values. Clears all binds for all keys and all modes, including self-assigned ones. Do not use the command manually. Sets up the keymap for the specified key. You should never have to use this command manually, use "bind" instead. If defined, this will be executed every time you press a key. If defined, this will be executed every time you release a key. Sets the mouse sensitivity. Scales all mouse sensitivity values. Changes all sensitivity values. If unsure, keep this at "1". Mouse sensitivity while scoped. If zero, autoscopesens determines, how sensitivity is changed during scoping. Switches between scopesensscale and autoscopesensscale. Determines how to calculate scoped sensitivity if scopesens is zero. If enabled, derives scoped sensitivity from scopefov and fov. Change sensitivity when scoping. If used, scoped sens = sensitivity * scopesensscale (roughly). Ignored, if autoscopesens is set. Sets mouse to "flight sim" mode. Inverts movement on the y-axis. Sets the degree of mouse filtering (0.0 being no filtering). Sets the mouse acceleration. Toggles grabbing of mouse and keyboard input in a game. Grabbing means that the mouse is confined to the AC, and nearly all keyboard input is passed directly to AC, and not interpreted by a window manager, if any. This is only useful when you run AC windowed. Indicates if a CTRL key is pressed.
Returns the value of the selected attribute of the nearest entity. It returns float values for some attributes. If "unscaled" flag is "1", raw integer values (representing the highest resolution) are returned. Returns the entity type of the nearest entity. Sets tag clip type of all selected cubes. Type can be numeric or a keyword. 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. In map edit mode you can select bits of the map by clicking or dragging your crosshair on the floor or ceiling (using the "attack" identifier, normally MOUSE1), then use the identifiers below to modify the selection. While in edit mode, normal physics and collision don't apply (clips), and key repeat is ON. Note that if you fly outside the map, cube still renders the world as if you were standing on the floor directly below the camera. Changes the texture on current selection by browsing through a list of textures directly shown on the cubes. Default keys are the six keys above the cursor keys, which each 2 of them cycle one type (and numpad 7/4 for upper-wall). The way this works is slightly strange at first, but allows for very fast texture assignment. All textures are in 3 individual lists for each type (both wall kinds treated the same), and each time a texture is used, it is moved to the top of the list. So after a bit of editing, all your most frequently used textures will come first when pressing these keys, and the most recently used texture is set immediately when you press the forward key for the type. These lists are saved with the map. Make a selection (including wall bits) and press these keys to get a feel for what they do. Show preview of textures during editing. When textures of the map geometry are changed, five textures around the current pick from the "last used" stack are shown. The texture assigned to the "sky" slot is not shown. Instead, a plain blue rectangle is used. Sets a texture for the current selection. Changes the height of the current selection. Makes the current selection all solid (i.e. wall) or all non-solid. This operation retains floor/ceiling heights/textures while swapping between the two. Levels the floor/ceiling of the selection. Marks the current selection as a heightfield. It marks the current selection as a heightfield, with T being floor or ceiling, as above. A surface marked as heightfield will use the vdelta values (see below) of its 4 corners to create a sloped surface. To mark a heightfield as normal again (ignoring vdelta values, set or not) use "solid 0". Heightfields should be made the exact size that is needed, not more not less. The most important reason for this is that cube automatically generates "caps" (side-faces for heightfields) only on the borders of the heightfield. This also means if you have 2 independent heightfields accidentally touch each other, you will not get correct caps. Also, a heightfield is slightly slower to render than a non-heightfield floor or ceiling. Last but not least, a heightfield should have all the same baseheight (i.e. the height determined by a normal editheight operation) to get correct results. Changes the vdelta value of the current selection. Note that unlike all other editing functions, this function doesn't affect a cube, but its top-left vertex (market by the dot in the editing cursor). So to edit a N * M heightfield, you will likely have to edit the vdelta of (N+1) * (M+1) cubes, i.e. you have to select 1 row and 1 column more in the opposite direction of the red dot to affect all the vertices of a heightfield of a given size (try it, it makes sense :). A floor delta offsets vertices to beneath the level set by editheight (and a ceil delta to above). Delta offsets have a precision of a quarter of a unit, however you should use non-unitsize vertices only to touch other such vertices. This only works if the cube is a heightfield. Makes the current selection into a "corner". Currently there is only one type of corner (a 45 degree one), only works on a single unit (cube) at a time. It can be positioned either next to 2 solid walls or in the middle of 2 higher floorlevels and 2 lower ones forming a diagonal (and similar with ceiling). In both cases, the corner will orient itself automatically depending on its neighbours, behaviour with other configurations than the 2 above is unspecified. Since the latter configuration generates possibly 2 floor and 2 ceiling levels, up to 4 textures are used: for example for the 2 floors the higher one will of the cube itself, and the lower one of a neighbouring low cube. You can make bigger corners at once by issuing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them. Multi-level undo of any of the changes caused by editing operations. With editmeta pressed it also restores player position and selects the affected area. Redoes editing operations undone by 'undo'. With editmeta pressed it also restores player position and selects the affected area. Returns the number of undo steps that can be undone. If argument "level" is given, as many steps are undone, until "level" steps remain. Unless memory limits delete states, undolevel commands can be undone with "redo". - prints number of previous editing steps, for example "55". Do some editing and: - undoes all changes to restore the previous state (if that state is still in memory) Sets the number of megabytes used for the undo buffer. Undo's work for any size areas, so the amount of undo steps per megabyte is more for small areas than for big ones (a megabyte fits 280 undo steps on a 16x16 area, but only 4 steps on a 128x128 area). Copies the current selection into a buffer. Copies the current closest entity into a buffer. It also works with the menu list of copied entities. It works only while in edit mode. Pastes a previously copied selection. To paste a selection back requires a same size selection at the destination location. If it is not the same size the selection will be resized automatically prior to the paste operation (with the red dot as anchor), which is easier for large selections. Pastes a previously copied entity. It also works with the menu list of copied entities. It works only while in edit mode. Pressing "editmeta" while using "pasteent" opens the menu with a list of copied entities. Returns the number of solid walls contained into the current selection. Output: The selection contains 3 solid wall(s) Repeats the last texture edit throughout the map. The way it works is intuitive: simply edit any texture anywhere, then using "replace" will replace all textures throughout the map in the same way (taking into account whether it was a floor/wall/ceil/upper too). If the there was more than one "old" texture in your selection, the one nearest to the red dot is used. This operation can't be undone. Adds a new entity. (x,y) is determined by the current selection (the red dot corner) and z by the camera height, of said type. The type of entity may optionally take attributes (depending on the entity). Adds a new entity, works like newent, but can set all seven attributes directly. It does not automatically put the camera yaw angle into mapmodel and flag entities. (x,y) is determined by the current selection (the red dot corner) and z by the camera height, of said type. The type of entity may optionally take attributes (depending on the entity). Adds a new light entity. if only argument R is specified, it is interpreted as brightness for white light. Adds a new spawn spot. The yaw is taken from the current camera yaw. 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 is the desired map model which is defined by the 'mapmodel' command. The order in which the mapmodel is placed in the map config file defines the mapmodel identifier. The map texture refers to a texture which is defined by the 'texture' command, if omitted the models default skin will be used. The 'mapmodel' and 'texture' commands are placed in the map config normally. Mapmodels are more expensive than normal map geometry, so do not use insane amounts of them to replace normal geometry. Adds a CTF flag entity. Note that outside of edit mode, this entity is only rendered as flag if the current game mode is CTF. Adds a ladder entity. Note that this entity is used for physics only, to create a visual ladder you will need to add a mapmodel entity too. Adds a sound entity. Will play map-specific sound so long as the player is within the radius. However, only up to the maxuses allowed for N (specified in the mapsound command) will play, even if the player is within the radius of more N sounds than the max. By default (size 0), the sound is a point source. Its volume is maximal at the entity's location, and tapers off to 0 at the radius. If size is specified, the volume is maximal within the specified size, and only starts tapering once outside this distance. Radius is always defined as distance from the entity's location, so a size greater than or equal to the radius will just make a sound that is always max volume within the radius, and off outside. A sound entity can be either ambient or non-ambient. Ambient sounds have no specific direction, they are 'just there'. Non-ambient sounds however appear to come from a specific direction (stereo panning). If S is set to 0, the sound is a single point and will therefore be non-ambient. However if S is greater than 0, the sound will be ambient as it covers a specified area instead of being a single point. Adds a clip entity. Defines a clipping box against which the player will collide. Use this clip type to clip visible obstacles like fences or the gas tank. If you only want to prevent a player from entering an area, use plclip instead. Adds a player clip entity. Defines a clipping box against which (only) the player will collide. Use this clip type to define no-go areas for players without visible obstacles, for example to prevent players from walking on a wall. Nades will not be affected by this clip type. Deletes the entity closest to the player. Edits the closest entity. Overwrites the closest entity with the specified attributes. Some attributes may be specified as floats. Changes property (attributes) of the closest entity. For example 'entproperty 0 2' when executed near a lightsource would increase its radius by 2. Keys 1..7, in combination with the scrollwheel, can be used to alter the new entity attributes (attr1 - attr7). Key "M", in combination with the scrollwheel, can be used to move the entity. Pressing editmeta speeds up the scrolling. Pressing editmeta2 enables unscaled editing of entity attributes. Increment is a float for some attributes. If "unscaled" flag is "1", increment is applied as unscaled integer, which means, it will change float attributes at their highest resolution. If 100 is added to the attribute index parameter, the sign of the increment value is changed. Deletes all entities of said type. Recomputes all there is to recompute about a map, currently only lighting. Saves the current map. It makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name. Where you store a map depends on the complexity of what you are creating: if its a single map (maybe with its own .cfg) then the "base" package is the best place. If its multiple maps or a map with new media (textures etc.) its better to store it in its own package (a directory under "packages"), which makes distributing it less messy. For "savemap" to save different maps during editing with undo data, the variable "preserveundosonsave" has to be "1". It is "0" by default. "savemap" when not editing saves optimised map, with no undo data. Saves optimised the current map, with no undo data. It makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name. Determines if undo data should be preserved on using "savemap" command. Undo data can be saved only in edit mode. Determines if map backups (.bak) should be created when a map is saved. 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 new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large. Outputs the mapsize. Enlarges the current map. This command will make the current map 1 power of two bigger. So a size 6 map (64x64 units) will become a size 7 map (128x128), with the old map in the middle (from 32-96) and the new areas solid. Reduces the world size by 1. This command will make the current map 1 power of two smaller. So a size 7 map (128x128) will become a 6 size map (64x64 units), by removing 32 cubes from each side. The area to be removed needs to be empty (= all solid). Sets the map message, which will be displayed when the map loads. You will need to use quote marks around the message, otherwise it save the message correctly. For example: /mapmsg "Map By Author" You can get the current map message with the $mapmsg variable. Allows to edit the map message. Sets the map license. The name of license is stored withing the header of a map file. The license string is meant to hold an abbreviated name of the license, picked from a list of known map licenses. You can get the type of map license with the $mapinfo_license variable. Sets the map comment string. The variable is stored withing the header of a map file. The comment string is ignored, as long as no map license string is set. You can get the comment string with the $mapinfo_comment variable. Prints some map entity statistics to the console. Restricts 'closest entity' display to one entity type. It returns the current value and not change the value if the argument is "-". Chooses another 'closest ent'. Use this, when two entities are placed in exactly the same location. Visit next player spawn entity. Visit next or previous player spawn entity. Converts the nearest entity (if its a clip or plclip) to its opposite type. Assuming the nearest entity is a clip, it will be converted to a plclip. 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. Flips the selected part of the map at an axis. Rotates the selected part of the map in 90 degree steps. To rotate clockwise, use a positive number of steps. Note, that only quadratic selections can be rotated by 90 degrees. Returns a value for the main axis of player orientation. "100" is added if the player is looking in the negative direction of the axis. Selects the increment of the map revision number for the next 'savemap'. Show mapmodel clipping during edit mode. Show editing cursor grid. Show clips/plclips/mapmodel clips in edit mode. Show tagclips/tagplclips in edit mode. Show ladder entities (as blue wireframes) in edit mode. Enables or disables a special set of default textures while editing. The textures in "packages/textures/map_editor" are used. Sets the global water level for the map. Every cube that has a lower floor than the water level will be rendered with a nice wavy water alpha texture. Water physics will be applied to any entity located below it. Performance notes: water is rendered for a whole square encapsulating all visible water areas in the map (try flying above the map in edit mode to see how). So the most efficient water is a single body of water, or multiple water areas that are mostly not visible from each other. Players can influence how accurate the water is rendered using the "watersubdiv" command (map config). Returns a string with the four components of the water colour: red, green, blue and alpha. Output: 20 25 20 178 Allows setting the components of the water colour independently. "what" is either a keyword "red|green|blue|alpha" or the index number 0..3 and determines, which component is set to value. - sets the red component to 200 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. Sets all light values to fullbright. Will be reset when you issue a 'recalc'. Only works in edit mode. Sets the level of brightness to use when using the command "/fullbright 1". Toggles between showing what parts of the scenery are rendered. Shows what parts of the scenery are rendered using what size cubes and outputs some statistics about it. This can give map editors hints as to what architecture to align, textures to change, etc. If "showfocuscubedetails" is enabled, "showmip" stats on the HUD are hidden. Shows detailed geometry data of the cube inside editing focus. It shows on the HUD cube type, floor and ceiling heights, vdelta and all textures. Turns occlusion culling on and off. The reason one may want to turn it off is to get an overview of the map from above, without having all occluded bits stripped out. Makes a slope out of the current selection. The selection must be a heightfield before this command can be used. The steps specify the slope with the red vertex as left-top, i.e. "slope 1 2" will make a slope that increases just 1 step from left to right, and is slightly steeper from top to bottom. "slope -6 0" decreases steeply from left to right, and does not slope at all from top to bottom. Note that like the vdelta command, an increasing vdelta goes further away from the player, regardless of floor or ceiling. Makes an arch out of the current selection. The selection must be a heightfield before this command can be used. Will make the arch in the long direction, i.e when you have 6x2 cubes selected, the arch will span 7 vertices. Optionally, sidedelta specifies the delta to add to the outer rows of vertices in the other direction, i.e. give the impression of an arch that bends 2 ways (try "arch 2" on an selection of at least 2 thick to see the effect). Not all arch sizes are necessarily available, see config/prefabs.cfg. Defines a vertex delta for a specific arch span prefab, used by the 'arch' command. It returns the old value of the vertex, and if the vertex argument is omitted, doesn't change it. See config/prefabs.cfg for an example on usage. Automatically enlarge selections after placing arches or slopes. If the variable is set to 1, after placing an arch or a slope, the selection is enlarged, so that the arch or slope can be changed by vdelta increments (for example, to raise an arch in 1/4 cube increments). If the variable is set to 0 (which is default), the selection remains unchanged. This way, for example, the arch can be raised or lowered by regular cube increments. Generates a perlin noise landscape in the current selection. Keep the seed the same to create multiple perlin areas which fit with each other, or use different numbers if to create alternative random generations. Resets all current selections and selects the given area, as if dragged with the mouse. This command is similar to addselection although "select" resets all selections. Selects the given area, as if dragged with the mouse holding editmeta. This command is useful for making complex geometry-generating scripts. It adds a selection to the current list of selections. The dimensions of the current selections can be accessed by the commands selx, sely, selxs and selys. These commands return the list of coordinates corresponding to each selection. Coordinates are as follows: after a "newmap 6" the top-left corner (the one where the red dot points) are (8,8), the opposite corner is (56,56) (or (120,120) on a "newmap 7" etc.). 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. Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel. It works also with multiple selections. Decreases the size of the current selection by N cubes on all sides. Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel. It works also with multiple selections. Enlarges all selections by one cube in x- and y- direction, to change a selection from the "cube area" to the "vdelta area". If an argument is given, it is used as increment value, so, for example "enlargevdeltaselections -1" undoes a previous enlargement. 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. The cubes of every selection are framed by executions of "beginsel" and "endsel", i.e. for each new selection, before executing "action" for the cubes of that selection, "beginsel" is executed, and then, after actions for all cubes of that selection, "endsel" is executed. The action script is allowed to make changes to cube attributes, and if it does, an undo point is automatically added. "beginsel" and "endsel" are optional. While the scripts are executed, several aliases provide further info: "sw_cursel" - position and size of the current selection. Valid in all three scripts. Holds four integer values for x, y, xs, ys. See "select" command for details. (all following aliases are only valid during the execution of the action script and provide the attributes of one cube of the map) "sw_abs_x", "sw_abs_y", "sw_rel_x", "sw_rel_y" - absolute and relative (within the current selection) coordinates of the current cube. Read-only values. "sw_type" - type of the current cube. Can be 0..4 for SOLID, CORNER, FHF, CHF and SPACE. May be changed to other numerical value or keyword. "sw_floor", "sw_ceil" - floor and ceiling heights of the current cube. Range -128..127. "sw_wtex", "sw_ftex", "sw_ctex", "sw_utex" - texture slot indices for wall, floor, ceiling and upper wall of the current cube. "sw_vdelta", "sw_tag" - vdelta and tag values of current cube. "sw_r", "sw_g", "sw_b" - current light values of current cube. Can be edited, but only with temporary effect. Will be reset with the next light recalc. The command is mostly useful for statistics scripts (like counting cubes with certain attributes), but is can also be used for scripted editing, as the following (useless) example shows: selectionwalk [ += sw_floor (rnd 2) ] Stores the positions of all current selections. Can be used repeatedly. To restore the selections, type "popselections". Scales all lights in the map. This command is useful if a map is too dark or bright but you want to keep the light entities where they are. A variable indicating if the game is in editmode. A variable indicating if the game is in singleplayer editmode. A variable indicating if the player looks at the floor or at the ceiling. This alias will automatically be executed when a new map is created via the "newmap" command. Does not affect the loading of an existing map. Enables or disables using squares to render the editing grid/current selection instead of triangles. Only in edit mode: gets and sets camera position. Returns x, y, z, yaw and pitch. Sets x, y, z, yaw and pitch, if the parameter is not an empty string. Output: 67.7 78.6 5.5 8 0 Change yaw and pitch to look straight in +y direction. Sets vantage point in current camera position. The vantage point is supposed to be a distinctive view on a map - like the angle from which the preview picture was taken. It is allowed to use when editing offline or spectating offline. A map can only have one vantage point. Returns string with coordinates of vantage point or empty string, if none is set. Sets camera position in vantage point. It returns 1, if the map actually has a vantage point set. 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. Returns the slot number registered in the map config file of the model with the given name. Output: 5 Returns a list of map entity indices which use a certain mapmodel slot. If the mapmodel is unused, it returns an empty string. It returns a single space, if the model slot is not used by any map entity, but is required by another model (with entities). Edits the parameters of a mapmodel slot. Edits the parameters of a mapmodel slot. Only non-empty parameters actually change something. The command returns the resulting data of the mapmodel slot. If only the mapmodel slot number is specified, no changes are made, but the current data is returned (also in non-edit mode). Therefore the command can be used to get and set parameters. If anything is changed, automapconfig is enabled. sets the z-offset of slot #33 to -5 without affecting other parameters prints the current parameters of mapmodel slot #33 , for example: 0 0 0 0 "makke/lightbulb" Deletes an unused mapmodel slot. If "purge" is specified as second argument, it also deletes an used slot (including all map entities which use that mapmodel). Also it enables automapconfig. Sorts all mapmoodel slots alphabetically and merges identical slots. By default, the list is sorted and only unused identical (with the same model and parameters) slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused". - 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 - merges (deletes) unused double entries in the mapmodel slot list - 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 - sorts the mapmodel slot list and merges all double entries Set to "1" with every command that changes mapmodel slots. Should be used to trigger a rebuild of mapmodel menus. Adds values for all attributes to a specific mapmodel. This is used to restore the cached values from config/mapmodelattributes.cfg during game start. It does not actually verify of load the model. Deletes all loaded mapmodel attributes. Returns values for all attributes to a specific mapmodel. If modelpath is a number, it is interpreted as index for the list of models in the current map config. If no attribute name is specified, all attributes are printed to the console instead. Returns a table of all known mapmodels. Each model is listed with the modelpath and the values for the requested attributes. To be used instead of a fixed table in menu_edit.cfg. In addition to attribute names, the function also allows the keywords "explodekeywords" and "sortby:" as arguments. If "explodekeywords" is given, all mapmodels with more than one keyword are listed multiple times, once for each keyword. If an attribute name is preceeded by "sortby:" the list will be sorted by this table column. If "sortby:" is used several times, this first sort will have highest priority. The list is always sorted by path by default. Tries to load mapmodels from all paths below packages/models/mapmodels. It will throw a lot of error messages, because not all directories contain models to load. This command can be used to build or rebuild the complete list of all available mapmodels. It is only necessary, if models are added manually to the directories, since every mapmodel gets added to the list when it is loaded - which takes care of all automatically downloaded models. Allows negative z-offsets for mapmodels. A mapmodel entity is placed at a z-coordinate that is based on the floor height of map geometry and a z-offset. The z-offset is a sum of the entity attribute 3 and the third mapmodel slot parameter. The entity z-offset can range from 0 to 255 while the mapmodel slot parameter can be any integer including negative numbers. So, to place a mapmodel below floor height, the mapmodel slot parameter has to be negative. "mapmodelzoff" script decreases the mapmodel slot parameter by one and increases the z-offset of every mapmodel which uses that slot also by one. This means, that all mapmodel are exact in the same place afterwards - but the entity z-offset now has room to lower the mapmodel by one more cube. If you need more z-offset available, run the script several times. Returns a table of all texture files fitting a certain description. All files found under packages/textures are examined. By default, the command returns a list with two columns: path and filename. If "excludes" is exactly one path prefix to exclude, the table gets a third column with path names without that prefix. If "extensions" is exactly one extension which does not start with the character '.', the table gets an additional (third or fourth) column containing file names without that extension. Outputs two columns like "noctua/wall" "wall02.jpg" Outputs two columns like "noctua/wall" "wall02.jpg", but omits skymaps and special textures for the editor Outputs only textures by makke and adds a third column like "makke/rattrap" "rb_box_03.jpg" "/rattrap" 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. The possibilities are: "official": texture file was found in the working directory, which indicates an official texture. "custom": texture file was found in the profile directory, which means, the texture is either manually installed or downloaded. "package dir #x": texture file was found in a mod directory. "<file not found>" Returns the list of numbers of all texture slots which use that texture file. Returns a list of mapmodels who use that texture as skin. If no mapmodel uses the texture, but world geometry does, a string of whitespace is returned. If the mapmodel is unused, an empty string is returned. Returns a list of 256 numbers representing the number of uses for every texture slot. If "what" is "onlygeometry", the uses as map model skin do not count. If "what" is "onlymodels", the uses in map geometry do not count. It returns two values per slot: usage and visibility. If "what" is "onlymostvisible", instead of the regular list, a list of only the most used wall, floor, ceiling and upper wall textures (alternating with the keywords) is returned. Output: wall 211 floor 45 ceiling 0 "upper wall" 79 Deletes an unused texture slot. If "purge" word is put as second argument, it also deletes an used slot. All mapmodels that use that texture as skin are changed to default skin. All world geometry, which uses the texture, is instead set to use slot #255 or a specified replacement slot. Slots below #5 always require "purge", no matter if they are in use (default slots). Also enables automapconfig. Edits the parameters of a texture slot. Only non-empty parameters actually change something. The command returns the resulting data of the texture slot. If only the texture slot number is specified, no changes are made, but the current data is returned (also in non-edit mode). Therefore the command can be used to get and set parameters. If anything is changed, automapconfig is enabled. Sets texture name of slot #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. The first parameter picks the list, the second parameter is the texture slot number to be used for the next edit. Sorts all texture slots alphabetically and merges identical slots. By default, the list is sorted (except the first five) and only unused identical (with the same texture and scale factor) slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused". It allows to manually sort also the first few slots by adding the slot number to move to the slots #1, #2, #3, #4 (for example "sorttextureslots 11 12 13 14" will move slot #11 to slot #1, #12 to #2, #13 to #3 and #14 to #4, and sort the rest texture slots). See examples in the "sortmapmodelslots" reference. 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. The possibilities are: "official": mapsound file was found in the working directory, which indicates an official mapsound. "custom": mapsound file was found in the profile directory, which means, the mapsound is either manually installed or downloaded. "package dir #x": mapsound file was found in a mod directory. "<file not found>" Returns the list of numbers of all mapsound slots which use that sound file. Returns a list of map entity indices which use a certain map sound slot. If the sound is unused, it returns an empty string. Edits path/name and maxuses parameters of a mapsound slot. Only non-empty parameters actually change something. The command returns the resulting data of the map sound slot. If only the map sound slot number is specified, no changes are made, but the current data is returned (also in non-edit mode). Therefore the command can be used to get and set parameters. If anything is changed, automapconfig is enabled. Deletes an unused map sound slot. If "purge" is specified as second argument, it also deletes an used slot (including all map entities which use that sound). Also it enables automapconfig. Sorts all mapsound slots alphabetically and merges identical slots. By default, the list is sorted and only unused identical slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused". See examples in the "sortmapmodelslots" reference. Set to "1" with every command that changes mapsound slots. Should be used to trigger a rebuild of mapsound menus. Enables the "automatic embedded map config data" feature. With the next map save the map config file will get renamed and the map config data stored inside the map file. 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. Embedded config files take precedence over regular config files. 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. The header extras can be permanent, like the embedded config file, or can be used only once after map load, like the undo/redo data. Additional extra data can be easily added and will not break backward compatibility. Adds an entity of the specified type at the current camera position. It also returns the index number of the new entity, so that the other attributes can be set by editentity. Edits a map entity. It edits only parameters given a non-empty value. Returns the type and the values of all attributes (x, y, z, attr1 - attr7). It uses float values for some attributes, return values also may be float. Prints all attributes of map entity number 33, for example "light 174 172 12 20 255 200 200 0 0 0" Changes the y-position of entity 33 to 173 Deletes a map entity. Note: deleting an entity only marks it as unused. It will be completely removed after saving and loading the map. Returns a list of the numbers of all entities of that type. If no such entities exist or the entity type could not be recognised, the list is empty. Jump to the location of a map entity. You can get the entity number with use "enumentities" command. Returns the entity index number of the closest entity (or of the pinned entity, if one exists). Returns -1, if no entities are on the map. Returns always exactly the entity, that edit commands like delent will use next. Toggles the pin on the "closest entity" selector. The HUD will indicate the lock by showing "pinned" instead of "closest" entity. All actions, that would otherwise affect the closest entity, will affect the pinned entity instead. Deleting the locked entity will unlock it. Enables or disables pointing at entity sparklies. If an entity is pointed at during disabling, it is pinned. Specifies the required precision for pointing at entities sparklies. Integer variable containing a bitmask of hidden entity types. Returns a list of deleted entities. Each line contains the entity type, the position and all seven attributes. Restores deleted entity. If no index is specified, the last deleted entity is restored. If an index is given, the specified entity from the list of deleted entities is restored. BACKSPACE in combination with editmeta undeletes the last deleted entity. BACKSPACE in combination with editmeta2 brings up the menu "deleted entities". Removes entities from the list of deleted entities. If <which> is a number, the specified entry from the list of deleted entities gets removed. If <which> is "all", the whole list of deleted entities gets deleted. If <which> is "last" the last deleted entity is removed from the list of deleted entities. Returns the number of entities on the list of deleted entities (even if the parameter <which> was unknown or not specified). Lists all xmaps currently in memory. Creates a snapshot and stores it under the given nickname. Nicknames have to qualify as valid filenames. Restores the xmap snapshot. 1. If nickname is not given, it restores the last automatic backup snapshot. Automatic snapshots are taken: a) before a snapshot is restored, b) before a new map is loaded (if there were unsaved edits on the map) and c) when the game ends (if there were unsaved edits). 2. If nickname is given, the command restores the named snapshot, it also creates a backup snapshot of the current editing data. Deletes the named snapshot. Deletes the backup xmap. Moves the backup xmap to a regular named spot. Changes the nickname of the xmap. Returns a list of all regular xmaps in memory, or, if 'what' is "bak", the details of a stored backup xmap. Each xmap is listed with nickname and description. Adds the entity #index to the TODO list. Entity errors during map load are automatically added to the list. The list is saved and restored with xmaps. Clears list of TODO entities. The list is also deleted, when a new map is loaded. If an entity number is given as an argument, only entries for this entity are cleared. Returns a list of TODO entities. Returns entity index number and comment for every entry. Show all playerstarts in edit mode. Set showplayerstarts to "1" to see a playermodel rendered at all playerstart entities. Cleanups hidden map attributes. "mapmrproper" tries to optimize hidden attributes of maps in a way, that the map can be handled in bigger chunks by the renderer. The mipmapping routine does not take into account, if certain textures of a cube are visible at all, when it collects otherwise identical cubes to be handled en-bloc. "mapmrproper" changes invisible textures in a way, that the cubes are in fact identical - so, that the mipmapper is satisfied. The optimizer does not change any map properties that are visible in any way. Before any changes are made, mapmrproper creates a backup, which can be restored by "undo" command. Enable mipstats ("showmip" command), to see, what has been done. 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. Go to references mentioned below to see the use. Second modifier key for editing mode. Go to references mentioned below to see the use. Indicates if editmeta key is pressed. Indicates if second editmeta key is pressed. Variable, which is set to "1" when a texture is downloaded. Used to trigger menu rebuilds. Variable, which is set to "1" when a sound is downloaded. Used to trigger menu rebuilds. Calculates some key values to determine map geometry viability. It returns different sets of statistics, depending on the keyword "what": "vdelta" - returns table of numbers of cubes within a certain range of vdelta differences (steepness). First entry is "0..2 cubes steep", next is "2..4" and so on. "steepest" - returns the coordinates of the steepest heightfield cube. "total" - returns the number of non-solid cubes on the map. "pprest" - returns the number of cubes _not_ visible from one of the probe positions. "pp" (default) - returns a table of all (currently 64) probe points of the map. Each probe point is listed with: x-coordinate, y-coordinate, floor height, area visible, volume of visible area, average height in visible area. Returns the "last written" timestamp of the current map in the requested format. If "fmt" starts with "U", the time is given as UTC, otherwise as local time. If "fmt" is empty, or not given or just the "U", the format defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer. The same format options as in strftime(). Per-map override to disable water reflection on the client. Set by the mapper, for his map only. The overrides are stored in the map header. If "1", water reflection is disabled. Useful, when odd water colours are used to emulate other liquids that are not supposed to be that reflective. Per-map override to limit waveheight on the client. Set by the mapper, for his map only. The overrides are stored in the map header. If "1", waveheight is capped at 0.1 max. Useful for small water areas (like puddles), where higher waves would look weird. Per-map override to disable stencil shadows on the client. Set by the mapper, for his map only. The overrides are stored in the map header. If "1", stencil shadows are disabled. On clients, where stencil shadows are otherwise enabled, blob shadows are used instead. If shadows are disabled anyway, they stay disabled. Useful for dim maps, where hard shadows make no sense. Ignores per-map overrides to disable water reflection on the client. Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_nowaterreflect is ignored and regular client settings are used. Ignores per-map overrides to limit waveheight on the client. Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is used unchanged. Ignores per-map overrides to disable stencil shadows on the client. Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_nostencilshadows is ignored. Places stairs in all selections. "xs" and "ys" determine the step width in x- and y-direction. A cubescript hook to provide additional information about the current edit situation. For example it provides additional information about the closest entity. The returned text is rendered on the right side of the screen. Default for "updateeditinfopanel" is "explainclosestentity" script which provides detailed info about the closest entity. Update the edit info panel every N milliseconds. Hide the edit info panel. Hide the closest entity filename info. Adds artist info to a map. Adds modeinfo info to a map. See possibilities of mode list and flags (keywords) in config/maprot.cfg file. To use flags for all modes you can use "all" value instead of mode list.
This section describes identifiers related to the menu gui. Specifies commands to be executed when a menu opens. This command should be placed after newmenu. Creates a new menu. All menu commands placed after newmenu (i.e. menuitem, menuitemcheckbox, etc.) are added into the menu until another "newmenu" command is specified. Creates a new menuitem. Upon activating the menuitem, the associated command will be executed (See config/menus.cfg for examples). If the command argument is omitted, then it will be set to the same value as the description. If -1 is specified instead of the command to execute, then no command is executed when activating the item. If the rollover option is used, the menuitem will execute that command when selecting (but not activating) the menuitem. '\n' in menuitem synchronizes further text with slider width (tab-like function). (Note: to activate the menu item, select it, and either: Click, press SPACE or press ENTER/Return). Defines the initial selection for a menu. Displays a menu line with a text which may contain chars from an alternate font. Chars from the alternate font have to be marked with "\a". Alternate font chars have no width and are just rendered above the following text. Use spaces to counter that. Selects a line in a menu. Enables persistent selections for the currently displayed menu. When enabled, it restores a previously saved selection. Probably most efficient inside "menuinit". The position is restored during execution of this command, so the menu entry has to already exist and the alias with the last position has to be read from saved.cfg. In automatically created menus it may be necessary to execute the command with a short delay. Defines the background color for the menu selection bar. Defines the background color for the description of selected active menu items (checkbox, slider, text input). Creates a checkbox menu item. Optional fourth parameter "position" in the range from 0 o 100, default 0, which moves the position of the checkbox over the width of a text input or slider, with 100 being left and 0 being right. Hide big images in menus. Menuitem which displays "text" and all keys, that bind "bindcmd" - in game mode. Menuitem which displays "text" and all keys, that bind "bindcmd" - in edit mode. Menuitem which displays "text" and all keys, that bind "bindcmd" - in spectate mode. Menuitem that loads a map, displays the title and the preview or a default image. Creates a screenshot cropped to 4:3 with a given number of lines and jpeg quality 80. Pressing CTRL+F12 during spectating creates a clean screenshot and saves it as map preview picture. Creates a new menuitem with text input field. If the last line of a menu is a text input item, pressing enter in that line will not only execute the assigned command, but also close the menu. Menu items added after this command are greyed out (1) or not (0). Greyed out menu items are grey and can't be operated. Adds header and/or footer to the menu. 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. Use this inside menu definitions, almost always as the only command of that menu. Compare the usage inside config/menus.cfg will create a list of maps and load them when clicked Adds subdirectory entries to a menu with a files list. It has to come after the menudirlist command. Sets the font for a specific menu. If menu is "", the currently initialised menu is used. sets the font on the scoreboard Displays the specified menu. The menu allows the user to pick an item with the cursor keys. Upon pressing return, the associated action will be executed. Pressing ESC will cancel the menu. Closes the specified menu if it is open. If it is open multiple times in the stack only the topmost instance will be closed! Deletes the entire contents (all menu items) of the given menu. Specifies a model to render while displaying the specified menu. If menu is "", the currently initialised menu is used. It specifies, which model to render and how. If only menu is specified, no model is rendered. Displays a texture on the right side of a menu. By specifying a title string in the third argument to chmenutexture, a picture is rendered instead of a texture. The title string is displayed instead of the texture resolution. The variable "menupicturesize" holds a size modifier for pictures, similar to "menutexturesize". Changes the size of textures displayed in menus (mostly for testing purposes). Changes the size of pictures displayed in menus. If wrapslider is set the menuitemslider will toggle to the min/max value if at end of the range. Toggles the ability for menutext to have the blinking bit set. The global setting of 'allowblinkingtext' overrides this. Returns the name of the currently open menu. If more than one menu is open, only the name of the topmost menu on the stack is returned. Closes the currently open menu. If more than one menu is open, only closes the topmost menu on the stack. 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. Values of "0" represent half the screen width and height. Synchronizes tabs in menus. If enabled (1), tab positions in a menu are synchronised. It affects menu title, header and items, but not footer or descriptions.
This section describes the identifiers to configure the head-up display (HUD). Show the game-time clock on the HUD. The clock can count backward (from time limit to 0s) or forward (from 0s to time limit). Show the wall clock with time (usually local, not game-time) on the HUD. "wallclockformat" alias should contain string in strftime format to show the clock with proper time. If the alias is empty, the wall clock is hidden. Determines if the mini-map should be shown on screen. Determines whether to have a see-through map overview (0), or render it on a black backdrop (1) or a combination of both (2). Transparency of the black map backdrop (in percent) rendered if showmapbackdrop is set to 2. Recreates the minimap for the current map. Sets the resolution for the minimap. Turns on/off the radar compass. Turns on/off the damage indicator. Shows ammo statistics like in version 1.0. Toggles the console. Sets how many seconds before the console text rolls (disappears) up the screen. 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. Turns on or off the display of equipment icons. Turns on or off the display of messages at the bottom of the screen. Turns on or off the display of spectator status. Turns on or off the display of team score icons. Options for flag score hud transparency. Turns on or off the display of ktf flag direction indicator. Sets the level of transparency of ktf flag direction indicator, 100 = totally solid. Turns on or off the display of local player team icons. Turns on or off the display of the on-screen radar. Turns on or off the display of vote icons. Turns on or off the display of the current selected gun. Turns on/off the display of the hudgun while spectating a player in first-person view. Works in demo mode as well. Turns on/off display of FPS/rendering statistics on the HUD. Displays local player's current x,y,z position in map, showstats 1 must be enabled. Turns on/off display of team warning crosshair. Sets the level of transparency of the damage indicator, 100 = totally solid. Sets the separation of the arrows in the damage indicator. Sets the size of the damage indicator. Sets how long the damage indicator stays on screen. Show the blood-spat overlay when receiving damage? If overlay of blood-spat, at what blending (transparency) level? If overlay of blood-spat, use which factor? If overlay of blood-spat, at what speed does it fade? Sets the size of your crosshair. The crosshair is turned off entirely if the size is set to 0. Turns on or off crosshair effects. When on, the crosshair will go orange when health is 50 or red when is 25. Size change of crosshair occurs when player holds assault rifle and has more than 3 shots in a row. Sets the icon size of the players shown in the radar and the minimap. Colour of CN column in scoreboard. Changes at what height you are floating in the radar-view. Enables or disables showing the player name on the HUD when in your crosshair. Enables or disables showing the player's horizontal speed (vector). Hides most of elements on the HUD for X frames. Used for "clean" screenshot. The parameter is "frames", so for example 1000 will take 20 seconds at 50 fps or second at 1000 fps. Shows or hides the scores. Determines if scores should be shown on death. Sets the order priority for the column flags on the scoreboard. Sets the order priority for the column frags on the scoreboard. Sets the order priority for the column deaths or disables it on the scoreboard. Sets the order priority for the column ratio or disables it on the scoreboard. Sets the order priority for the column score or disables it on the scoreboard. Sets the order priority for the column pj/ping or disables it on the scoreboard. Sets the order priority for the column cn on the scoreboard. Sets the order priority for the column name on the scoreboard. Sets whether or not to display the accuracy information window. Accuracy is displayed for current weapon and only then, if scoreboard is turned on. Resets accuracy counters. Shows in the console accuracy of all used weapons. Sets the transparency of the console. Sets the transparency of the vote display.
This section describes identifiers to configure the visuals. Resets the OpenGL rendering settings. Changes the screen resolution. 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. Sets the range of FPS (AC will adjust LOD to achieve it). Limits the FPS (frames per second) of AssaultCube's video output. Remark: limit to '200' is optimal. Sets the transparency/opacity level of stencil shadows. Swaps vertices of model triangles. Loads a font texture to use as text within AssaultCube. Specifies a region of an image to be used as a font character. Specifies, at what char the font definition proceeds. For example "fontskip 48" means the ascii code of the first char in defined font will be "48", which is '0'; "fontskip 65" would start at 'A'. Changes the current font. Returns a name of the current font. Sets the field of view (fov). Sets the size for the icon shown above a player using comunications voices. Time in milliseconds before the abovehead icon dissapears. Sets the amount of time in milliseconds that blood is displayed on the ground. Turns on and off the display of blood. Enables or disables the gib animation entirely. Sets the number of gibs to display when performing a "messy" kill (grenade, knife, sniper headshot). Larger values are more spectacular, but can slow down less powerful machines. Reducing gibttl may help in this case. Sets the time for gibs to live (in milliseconds), after which they will disappear. Sets the velocity at which gibs will fly from a victim. Sets the team display mode. In mode 0 team display is disabled In mode 1 players will be rendered with a colored vest to make the teams distinguishable. In mode 2 almost the whole suit of the players will be colored. These display modes are only applied in team gameodes. Sets the size/resolution of the dynamic shadow data. Sets the display size of the dynamic shadows. Sets if dynamic shadows should be saved to disk. Sets the alpha value (transparency) for dynamic shadows. Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much. Determines the subdivision of the water surface in maps. Must be a power of 2: 4 is the default, 8 is recommended for people on slow machines, 2 is nice for fast machines, and 1 is quite OTT. See "waterlevel" (edit reference) on how to add water to your own levels. Turns on/off the reflections in the water surface. Turns on/off water refractions. Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy). Enables or disables fullscreen. Toggles fullscreen on or off. Shows the maximum level of anisotropic filtering supported by the graphics hardware. Sets the level of anisotropic filtering. Sets the level of full-scene antialiasing (FSAA). -1 uses the default settings obtained from the system. 0 disables, 1..16 enables FSAA. Sets the screen width. Sets the screen height. Returns the actual width of the screen/window. Returns the actual height of the screen/window. Enables using always desktop resolution in fullscreen mode. Sets the bits for the depth buffer. Enables or disables vsync. -1 uses the default settings obtained from the system. 0 disables, 1 enables vsync. Sets the temporary (to next map start) hardware gamma value. May not work if your card/driver doesn't support it. Sets a persistent gamma value for a map. Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels. If this variable is changed this during play, a "recalc" is needed to see the effect. Minimal level of detail. Specifies the Field Of View when in spectating/ghost mode. Chooses between local or remote player's FOV when spectating. 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. If this value is zero, hwtexsize will be used. 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. Controls whether textures with a scale higher than 1.0 will be scaled down while loading (0) or not (1). Specifies how long (in milliseconds) to display bullet holes. Turns on/off the display of bullet holes. Scales all particles. Maximum number of smoke particles along shotline of sniper rifle. Sets the time available for interpolation between model animations. Adjusts gib/gibnum/gibspeed/gibttl variables collectively. Makes dead players instantly pop out of existence, instead of falling over and sinking into the ground. Sets the maximum value the display will roll on strafing. Sets the maximum value the display will roll when you get damages. Limits the maximum value the display will roll on strafing or if player gets damages, when spectating other players. Chooses whether the players hand carrying the weapon appears as right or left handed. For toggling on the ability for any text to have the blinking bit set. Determines the skin of the current player. See the player model folder for the according skin-id. Chooses skin when playing for team CLA. Chooses skin when playing for team RVSF. Determines the valid distance when extrapolating a players position. Determines the speed when extrapolating a players position. Returns an encoded string to display an inlined image outside the console. Images are stored in packages/misc/igraph/*.png and loaded during game start. Filenames consist of the image shorthand (mnemonic) and optional frame times, separated by "_". Media file names may only contain letters, digits and "_-.()". All texts displayed in the game console are scanned for mnemonics prefixed with ":". All found matches are replaced by the image. The images are displayed as squares with width and height the same as the regular font height. To create animations, put several square images side by side into the file. For example, a 128x32 image is interpreted as four frames. Frame duration is encoded in the filename, so, for example the file "nop_1000_200_100.png" shows the first frame for 1000 milliseconds, the second frame for 200 msec and the third (as the rest) for 100 msec. Igraphs "1" to "9" are hardcoded and can be manually encoded in menu texts. Use the new escape code "\i" plus the number of the image: "\i\1".."\i\9". Other images can be used in menus as well, but the codes have to be fetched by "getigraph". If the mnemonic was not found, then "getigraph" returns an empty string. Checks for new files in packages/misc/igraph/ folder. Only necessary, if new files are added during the game - for example, by mod package download. Scales inlined images (in percent). Scales the hardcoded inlined images: "1".."9" (in percent). Enables animation of inlined images with multiple frames. Default frame time for inlined images with multiple frames. Used for images with no frame duration specified in the filename. Hides inlined images in the console.
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. See source/src/server.h file or use "enumsounds" command for default sounds, and use "registersound" to register your own. For example, 'sound 0' and 'sound (registersound "player/jump")' both play the standard jump sound. Plays all hardcoded sounds in order. Mutes a specific game sound. Returns 1 if sound N is muted, else 0. Output: Sound 5 is muted! Unmutes all previously muted sounds. Specifies the interval for checking mapsounds. If set to value 0, the map sounds will be checked in every frame without any interval limitation. Enables verbose output for debugging purposes. Each subsequent played sound's gain-value is scaled by this percentage. This lowers the gain of the sounds before they are mixed, this might be useful in cases when the mixer has problems with too high gain values. Sets the music volume. Plays music in the background. Preloads the sound track. Can be helpful if you experience a delay, e.g. when picking up a flag. Registers a track as music. The first three tracks have special meaning: Track #1 is for "flag grab" the second and third are used as "last minute" tracks. Registers a sound. This command returns the sound number, which is assigned from 0 onwards, and which can be used with "sound" command. If the sound was already registered, its existing index is returned. "registersound" does not actually load the sound, this is done on first play. It registers packages/audio/player/jump.ogg sound with volume 80 Lists sound index numbers and short descriptions for all sounds of one or more categories. All sounds with at least one of the flags will be listed. Flag names prefixed with "!" will exclude all matching sound from the list. If no such entities exist or the entity type could not be recognised, the list is empty. It will list all voicecom sounds that are for teams only It will list all sounds Enables or disables the audio subsystem in AC. Sets the desired amount of allocated sound channels. AC will try to allocate that number of channels but it is not guaranteed to succeed. Indicates if the footsteps sound should be played. Indicates if the footsteps sound for the local player should be played. Plays a sound upon every successful hit if enabled. If hitsound is set to 2, the sound will be played instantly rather than after server acknowledgment. Sets the sound volume for all sounds. Defines the health level at or below which a heartbeat sound will be played. A value of 0 (which is the default) disables this feature.
This section describes all identifiers related to the ingame documentation reference. Adds a new section to the ingame documentation. Adds a new identifier documentation to the last added section. An identifier represents a command or variable. The name may contain spaces to create a "multipart" identifier documentation that can be used to describe a complex argument as a single pseudo identifier, look at the examples. Adds a new argument documentation to the last added identifier. An argument represents either a command argument or a variable value. The last argument of an identifier can be flagged as variable-length to indicate that it represents an unknown number of arguments. Adds a new documentation remark to the last added identifier. Adds an example to the last added identifier. Adds a new documentation reference to an identifier. The new reference is added to the last added identifier documentation. Render documentation references (docrefs) of the identifiers. Outputs a list of yet undocumented identifiers (commands, variables, etc.). If the one argument is omitted, only the builtin identifiers will be listed. Therefore specify the argument other identifiers like aliases should be included too. Note that the list also includes identifiers that contain the substrings "TODO" or "UNDONE" in their documentation. Outputs a list of identifier documentations that do not match any existing identifier. Multipart identifiers are not included in this list, see 'docident'. Searches for pattern in all ingame identifier documentations (reference) entries. If "silent" is zero or omitted, all found references are listed. A table of all found entries is returned as result. For each entry, the index of the doc entry string that contains the pattern is listed. Returns a string of the specified identifier documentation (reference) entry. String index numbers match with the result of "docfind". Writes out a base XML documentation reference containing templates for the builtin identifiers. The generated reference is written to "docs/autogenerated_base_reference.xml" by default. The three arguments can be changed later on in the generated XML document. Adds a new default key to an identifier. Allows to scroll through the rendered identifier documentation. Render identifier documentation for the typed command in the console. Enables identifier details or statement analyser. Writes out an XML documentation reference file containing undocumented identifiers or identifiers marked with "TODO".
This section describes all identifiers related to the serverbrowser. Adds a server to the list of server to query in the server list menu. 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. The servers are written to the config/servers.cfg file. This menu can be reached through the Multiplayer menu. Sets the method which client will use to contact the masterserver. Sets the number of servers to be pinged at once. Adds a new category in the serverbrowser favourites. Add new categories to your autoexec.cfg, check favourites.cfg for examples. Lists all registered serverbrowser favourites categories. Hides favourites icons in serverbrowser. 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. Show only servers with the correct protocol in serverbrowser. Show 'weights' in serverbrowser. 'weights' are the sort criteria with the highest priority. Favourites categories can change the weights. Use 'showweights' to debug problems with serverbrowser sorting. Shows on serverbrowser number of all players on the all servers. Search a nickname (or -part) on all servers.
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. If the server was run with -n1 and -n2 arguments (prefix and suffix of descriptive title) a serveradmin can set a user-defined server description with this command, if it wasn't this command results in "invalid vote". This title will only stay until the next map is loaded. If, for example, the server was run with -n"Fred's Server" -n1"Fred's " -n2" Server", then you could call "/serverdesc [pWn4g3 TOSOK]" and it would show up as "Fred's pWn4g3 TOSOK Server" in the serverbrowser. Sends the extension name and argument string to the server, which can use it for custom action. See source/src/server.cpp ["case SV_EXTENSION:"]. Sets automated team assignment. Temporary ban of the specified player from the server. Temporary ban duration is fixed at 20 minutes. Calls a vote on the server. This command is wrapped by aliases for better usability and is used to action votes such as ban, kick, etc. See config/admin.cfg for actual uses. Calls a vote to force the specified player to switch to the specified team. Calls a vote to forceteam yourself to the specified team. By default, if you are on team CLA or RVSF, this command will force you to the enemy team, no arguments necessary. Shuffles the teams. The server will attempt to restore balance, but the result may be less that optimal, and there are certainly better ways to keep teams balanced. Gives admin state to the specified player. Requires admin state. The admin will lose his admin state after successfully issuing this command. Kicks the specified player from the server. Sets the mastermode for the server. If the mastermode is set to 'private', no more clients can join the server. Default is 'open' which allows anyone to join the server. Removes all temporary bans from the server. Temporary bans are normally automatically removed after 20 minutes. Clears specific demo currently in memory on the server. Clears all demos currently in memory on the server. Sends a map to the server. During coop edit, the current map gets saved to file and sent to the server. Other players can use 'getmap' to download it. When not in edit mode, the map will not be saved. The new map will be used, when the next game on that map starts on the server. Deletes a map from the current server. Claims or drops admin status. Failed logins result in an auto kick. The admin is granted the right to kick, ban, remove bans, set autoteam, set shuffleteam, change server description (if enabled), change map, change mastermode, force team, change mode, record demos, stop demos and clear demo(s) - All without needing votes from other users. If the admin votes on any (other players) call, his vote is final. In the scoreboard, the admin will be shown as a red colour.
This section describes identifiers related to player authentication. Manages player authentication. "authsetup" contains all the funtionality needed to generate, load and save private and public keys, and to lock and unlock the private key with a password. Private and public keys are used to authenticate the player to servers, and are loaded from config/authprivate.cfg. Private keys can be stored in an "encrypted with password" version - in which case the player has to enter the password after game start. To prevent brute-force cracking of the password, the key-derivation function uses a constant time to encode (usually several seconds). Because of that, the decoding at game start can be done in the background. The private key is actually itself a public key generated from the prepriv key. The prepriv key should be kept away from the computer, either as hardcopy or on a thumbdrive. The prepriv key is not required to play the game. It can be used to prove ownership of the private key, in case the private key gets stolen. It can also be used to regenerate private and public keys, in case they are lost. The prepriv key can also be encrypted by its own password. ---------- Options: "authsetup" - checks private and public key and returns "1", if they match. "authsetup pre preprivhex [psalthex pwdcfg]" - loads prepriv key into memory. Optionally supports encrypted keys. "authsetup priv privhex [salthex pwdcfg]" - loads private key into memory. Optionally supports encrypted keys. "authsetup pub pubhex" - loads public key into memory. "authsetup ppass preprivpass" - decrypts prepriv key with password. "authsetup pass privpass" - decrypts private key with password. "authsetup passd privpass [commandwhendone]" - decrypts private key with password in background. Optionally executes cubescript command when done. "authsetup needpass" - returns "1", if the private key needs decryption. "authsetup genpre [prelen]" - generates new prepriv key. "authsetup genpriv" - generates private key from prepriv key. "authsetup genpub" - generates public key from private key. "authsetup newppass preprivpass [preprivfilename]" - encrypts prepriv key with new password and saves the result to file. The default filename is config/authpreprivate.cfg and an existing file gets overwritten - but the former file content is kept and also written, each line commented out. "authsetup newpass privpass [privatefilename]" - encrypts private key with new password and saves the encrypted private key and the public key to file. The default filename is config/authprivate.cfg and an existing file gets overwritten - but the former file content is kept and also written, each line commented out. "authsetup unarmed" - sets private and public keys to a fixed value. For testing only. Can be used to "log out". ---------- "authmemusage", "authrounds", "authmaxtime" are only used, when new passwords are created (authsetup new[p]pass). "authmemusage" is the number of megabytes of RAM that are used for the password hash calculation. If "authrounds" is zero (as is default), then the hash algorithm calculates as many rounds as possible in the number of milliseconds specified in "authmaxtime". If "authrounds" is a positive number, then that is the number of rounds to be done, regardless the required time. Note that, since the password hash algorithm is not endianness-aware, it is not possible to move an encrypted password to a machine with different endianness. Moving between 32- and 64-bit machines should be no problem. Sets a number of megabytes of RAM that are used for the password hash calculation (when new passwords are created). Sets a number of rounds, if greater than 0, then new password hashes are created with this fixed number of rounds. Sets an amount of time (in ms), new password hashes are created with this fixed amount of time. Manages a list of keys other than the game key (which is managed by authsetup). For example, this can be server owner keys or clan boss keys. Options: "authkey clear" - empties the list and comments out all lines in config/authkeys.cfg. "authkey list" - lists all authkeys that are currently in memory. "authkey delete keyname" - deletes the key "keyname" from memory. "authkey new keyname" - generates a new key with the name "keyname". If a key of that name already exists, it is deleted. The key is added to the list in memory and also written to the file config/authkeys.cfg. "authkey add keyname privkey" - adds a key with the name "keyname" to the list in memory. The privkey is a 32-byte hexadecimal string, preferrably generated by authkey new. The matching public key is generated automatically from the private key. "authkey selfcert keyname [comment]" - generates a self-signed certificate for the key "keyname". Being able to create such a cert is proof, that you own the private key of a certain public key. Returns a public key of game account. It returns empty string, if no account exists or it is unusable (due to missing password, for example). Enables some debug messages in crypto.cpp file.
Sets the gameplay mode to N for the next map loaded. You will need to define mode before loading the map or it will stay as the last mode played. There are many aliases for you to use instead of remembering the numeric mapping. Returns the name of current game mode. Example output: capture the flag Example output: CTF Returns the number of current game mode. Output: 5 Checks the current game mode for certain attributes. Possible attributes are: team, arena, flag and bot. Toggles use of acronyms instead of full modenames in the serverbrowser, scoreboard, voting info. Returns the mode number for a specified mode acronym. Output: 5 Output: 21 Returns -1 if not found. Enables or disables the showing of game mode descriptions on the console after map starts. Starts a map with the mode "Co-operative Editing". See the "Co-operative map editing" section on the "Tips, tricks and advice" chapter of the map editing guide for more information. Starts a map with the mode "Capture the Flag". Starts a map with the mode "Deathmatch". Starts a map with the mode "Hunt the Flag". Starts a map with the mode "Keep the Flag". Starts a map with the mode "Survivor". Some players prefer the name "Last Man Standing" for this mode. Starts a map with the mode "Last Swiss Standing". Starts a map with the mode "One Shot, One Kill". Starts a map with the mode "Pistol Frenzy". Starts a map with the mode "Team Deathmatch". Starts a map with the mode "Team Keep the Flag". Starts a map with the mode "Team One Shot, One Kill". Starts a map with the mode "Team Survivor". Starts a map with the mode "Hunt the Flag". Some players prefer the name "VIP" for this mode. Starts a map with the mode "Survivor". Starts a map with the mode "Team Pistol Frenzy". Starts a map with the mode "Team Last Swiss Standing". Starts a map with the mode "Bot Pistol Frenzy". Starts a map with the mode "Bot Last Swiss Standing". Starts a map with the mode "Bot Team Deathmatch". Starts a map with the mode "Bot Deathmatch". Starts a map with the mode "Bot Team Survivor". Starts a map with the mode "Bot One Shot, One Kill". Starts a map with the mode "Bot Team One Shot, One Kill".
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. Translates (= moves) the model. Adds a value for a specified attribute to the model. If used, specifies that the current model depends on parts of another custom model (which therefore also has to be downloaded) can only be used once per model config. Example: 'mdlattribute' requires 'makke/signs/exit' could be used in 'signs/loading-dock/md2.cfg' to reuse 'makke/signs/exit/tris.md2' . Sets the fog distance. You can do this for tweaking the visual effect of the fog, or if you are on a slow machine, setting the fog to a low value can also be a very effective way to increase fps (if you are geometry limited). Try out different values on big maps / maps which give you low fps. It is also good for aesthetic features of maps especially when combined with "fogcolour". Sets the fog and clearing colour. Binds a texture to be used if a slot couldn't be loaded with a given textures path. Binds the texture indicated in the filename to the texture slot of any textures that aren't found. The path is given exactly as with the texture-command, if it is omitted (or can't be loaded) the default is used. The default is located in packages/misc/notexture.jpg (not in packages/textures - where custom ones must reside!) Returns the current "notexture" path (set by loadnotexture). Loads a skymap for a map. The available skymaps reside in packages/textures/skymaps/.. The skymap name in the argument is required to start with "textures/skymaps/", but that part of the path can be omitted, and it should be used only up to the underscore "_" in the filename. You can get the current skymap name with the $loadsky variable. Registers a mapmodel that can be placed in maps. A mapmodel registered with this command can be placed in a map using the 'newent mapmodel' command. The bounding box is an invisible force surrounding the model, allowing players to collide against it, instead of walking through the mapmodel. For more information about this command, read mapediting5.xml. Example: mapmodel 4 2 4 0 "modelname" This mapmodel has a bounding box of 8x8x2 in size (X/Y/Z) and by default hovers 4 units above ground. It also returns the number of the created slot, example: echo (mapmodel ...) Resets the mapmodel slots/indices to 0 for the subsequent "mapmodel" commands. Each subsequent mapmodel command increases it again. See config/default_map_settings.cfg for an example. Defines a mapsound. Registers the sound as a map-specific sound. These map-specific sounds may currently only be used with "sound" entities within a map. The first map sound registered in a map has slot/index number 0 and increases afterwards. It also returns the number of the created slot, example: echo (mapsound ...) Resets the mapsound slots/indices to 0 for the subsequent "mapsound" commands. Each subsequent mapsound command increases it again. See config/default_map_settings.cfg for an example. Shadow yaw specifies the angle at which shadow stencils are drawn on a map. When specifying shadowyaw, remember that the default angle is 45 degrees. The example below would make the shadows appear at 90 degrees (45 degrees more to the left). Binds a texture to the current texture slot. Binds the texture indicated in the filename to the current texture slot and increments the slot number. The texture is rendered at the given scale. At scale 1.0 (or if scale is 0), 32x32 texels cover one cube. At scale 2.0, which is the current maximum, it's 64x64. It also returns the number of the created slot, example: echo (texture ...) Sets the texture slots/indicies to 0 for the subsequent "texture" commands. Each subsequent texture command increases it again. See config/default_map_settings.cfg for an example. Determines the water colour in a map. You must define at least 3 first values, otherwise this command may not work correctly (use "1" as a placeholder if needed).
This section describes bot mode related identifiers. See also "docs/cube_bot-readme.txt". Enables or disables the processing of the bots artificial intelligence. Will make the bots stand still. 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. 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. This command only works for single player modes. 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. This command only works for single player modes. The name of the bots will be selected randomly. Will add 2 bots with a bad skill level to the CLA team. Changes the skill level for the given bot. Changes the previous bot skill level of the bot named Robbie to a 'best' skill level. Changes the skill level for all bots. 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. Bots won't shoot. Determines if bot waypoints should be selected/placed using the crosshair or by the nearest location to your player. Assigns a number to the nearest waypoint. This is only used for trigger waypoints, so that the bots go to triggers in the right order. If you don't do this bots will search for every trigger, even when they are not reachable yet. Makes waypoints visible and either turns on or off the waypoint information display. Takes the current player yaw for the current waypoint. When used you will see what the bot sees. Type it again (with or without name) to return to the game (you will respawn). Adds a bot waypoint at the current position. Automatically places waypoints. Deletes the selected waypoint.
This section describes optional identifiers from the files in config/opt/ folder and commands, which enable them. Loads optional obsolete autosave settings. To see the obsolete autosave settings, look at config/opt/autosave.cfg file. Loads optional compatibility settings for old scripts. To see the compatibility settings, look at config/opt/compatibility.cfg file. Loads optional settings for bot survival mode. To see the settings for survival, look at config/opt/survival.cfg file. The settings are loaded, when bot survival mode is started via menu. Loads optional settings for string parsing. To see the string parsing settings, look at config/opt/parsestring.cfg file. Loads optional FAQ settings. To see the FAQ settings, look at config/opt/faq.cfg file. The settings are loaded, when FAQ is open in menu. Loads batch map conversion tools. To see the map conversion tools, look at config/opt/convmap.cfg file. Loads extra map editing scripts. To see the map editing scripts, look at config/opt/mapeditscripts.cfg file. Loops through every character in the given string and executes the given block of cubescript on each iteration. Uses echo on every character in the string: "Hello world" Uses echo on every character in the string: "Hello world" --- Also outputs the position of each character in the string. Outputs: ".sdrawkcab gnitseretni kool lliw sihT" $__iter 4) breakparse [echo $iter]]]]> Example usage of the breakparse command. Uses echo on characters a through e, then breaks out of the parse. Important: A secondary iterator alias (prefixed with a double underscore "__") is automatically created before each iteration that contains the character position data. Breaks out of a parsestring loop. Important: this command should only be used within the 3rd argument (the cubescript to execute) of parsestring. Removes all whitespace characters from the given string. Outputs: Helloworld Removes all unnecessary leading and trailing whitespace characters from the given string. Outputs: "H e ll o w o r l d" Prepares a round of bot survival mode on the specified map. All official maps are compatible with survival, if you want to play survival on a custom map, prior edits/additions to the script are necessary, such as adding a zone for that specific map. Smoothly changes your gamma to the specified value. Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu. 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. Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu. 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. 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. Returns 0 for CLA, 1 for RVSF. Returns 2 for CLA-spectator, 3 for RVSF-spectator. Returns 4 for spectator. By default this command returns what team *you* (player1) are currently on. Finds player name with this client number. Returns the current game mode number. Show the client number column on the scoreboard first? Returns the score statistics for the player with the given client number. 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. Call "setedithide [lights mapmodels]" to just hide all lights and mapmodels. Only shown entity types are potential 'closest entity'. "setedithide" without any arguments restores visibility of all entities. Hides all but the single entity type you give. Just run "seteditshow mapmodel" and see just the mapmodel entities. The other entity types are ignored as closestentity too. "seteditshow" without any argument hides all entities. Increments an alias by 1. i = 0; ++ i; echo $i Output: 1 Increments an alias by floating-point 1. i = 2.14; ++f i; echo $i Output: 3.14 Decrements an alias by 1. i = 0; -- i; echo $i Output: -1 Decrements an alias by floating-point 1. i = 4.14; --f i; echo $i Output: 3.14
This section describes identifiers that are not documented yet, but you may try to help us there.