diff --git a/docs/reference.xml b/docs/reference.xml index fed1aa1f..a9cd90f3 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -1,1020 +1,1002 @@ + + + + - This reference describes the commands and variables available in AssaultCube. + + + +
+ This section describes identifiers that are closely related to the CubeScript language. + + + + + Determines if a floating-point value is smaller than a second floating-point value. + + + + + + -
- This section describes identifiers that are closely related to the CubeScript language. - - -Determines if a floating-point value is smaller than a second floating-point value. - - - - - - + + Determines if a floating-point value is less than or equal to a second floating-point value. + + + + + + - -Determines if a floating-point value is less than or equal to a second floating-point value. - - - - - - + + Determines if a floating-point value is equal to a second floating-point value. + + + + + + - -Determines if a floating-point value is equal to a second floating-point value. - - - - - - + + Determines if a floating-point value is greater than a second floating-point value. + + + + + + - -Determines if a floating-point value is greater than a second floating-point value. - - - - - - + + Determines if a floating-point value is greater than or equal to a second floating-point value. + + + + + + - -Determines if a floating-point value is greater than or equal to a second floating-point value. - - - - - - + + Determines if a floating-point value is not equal to a second floating-point value. + + + + + + - -Determines if a floating-point value is not equal to a second floating-point value. - - - - - - + + sets the result value of a CubeScript block + + + + - -sets the result value of a CubeScript block - - - - + + + + + + + + + - - - - - - - - - + + Performs a floating-point modulo operation. + + + + + + + + + Output: 7.5 + + + + Output: 5.0 + + + - -Performs a floating-point modulo operation. - - - - - - - - -Output: 7.5 - - - -Output: 5.0 - - - + + + + + + + + - - - - - - - - + + Performs an addition. + + + Example: echo the sum of x and y is (+ $x $y) + + + + + + + + - -Performs an addition. - - -Example: echo the sum of x and y is (+ $x $y) - - - - - - - - + + Performs a subtraction. + + + + + + - -Performs a subtraction. - - - - - - + + Subtracts two floating-point numbers. + + + + + + - -Subtracts two floating-point numbers. - - - - - - + + Adds up two floating-point numbers. + + + + + + - -Adds up two floating-point numbers. - - - - - - + + Performs a multiplication. + + + + + + - -Performs a multiplication. - - - - - - + + Performs an integer division. + + + + + + - -Performs an integer division. - - - - - - + + Performs a division with floating-point precision. + + + + + + - -Performs a division with floating-point precision. - - - - - - + + Performs a modulo operation. + + + + + + - -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 equal. - - - - - - - - -Output: there are only 10 types of people in the world - - - + + Determines if two values are not equal. + + + + + + - -Determines if two values are not equal. - - - - - - + + Determines if a value is smaller than a second value. + + + + + + - -Determines if a value is smaller than a second value. - - - - - - + + Determines if a value is bigger than a second value. + + + + + + - -Determines if a value is bigger than a second value. - - - - - - + + Determines if a values is less than or equal than a second value. + + + + + - -Determines if a values is less than or equal than a second value. - - - - - + + Determines if a values is greater than or equal than a second value. + + + + + - -Determines if a values is greater than or equal than a second value. - - - - - + + logical AND. + + + + Output: 1 + + + + Output: 0 + + + + + + + + - -logical AND. - - - -Output: 1 - - - -Output: 0 - - - - - - - - + + logical OR. + + + + + output: 1 + + + + + + output: 0 + + + + + + + + + - -logical OR. - - - - -output: 1 - - - - - -output: 0 - - - - - - - - - + + Performs a negation. + + + + - -Performs a negation. - - - - + + Performs a floating point multiplication. + + + + + + - -Performs a floating point multiplication. - - - - - - + + Random value + + + + + - -Random value - - - - - + + Determines if two strings are equal. + + + + + + - -Determines if two strings are equal. - - - - - - + + Controls the script flow based on a boolean expression. + + + $x 10) [ echo x is bigger than 10 ] [ echo x too small ]]]> + + + + + + + + - -Controls the script flow based on a boolean expression. - - - $x 10) [ echo x is bigger than 10 ] [ echo x too small ]]]> - - - - - - - - + + 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. - -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. + + + + + + + + + + + + - -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. - - - - - - - - - - - - + + Concatenates multiple strings with spaces inbetween. + + + + output: hello world + + + + + + + + - -Concatenates multiple strings with spaces inbetween. - - - -output: hello world - - - - - - - - + + Concatenates multiple strings. + + The newly created string is saved to the alias 's'. + + + + + output: CubeScript + + + + + + + + - -Concatenates multiple strings. - -The newly created string is saved to the alias 's'. - - - - -output: CubeScript - - - - - - - - + + Grabs a word out of a string. + + + + output: two + + + + + + + + - -Grabs a word out of a string. - - - -output: two - - - - - - - - + + returns the element count of the given list. + + + + - -returns the element count of the given list. - - - - + + Searches a list for a specified value. + + + + + + - -Searches a list for a specified value. - - - - - - + + Executes a command after specified time period. + + + + Prints 'foo' to the screen after 1 second. + + + + + + + - -Executes a command after specified time period. - - - -Prints 'foo' to the screen after 1 second. - - - - - - - + + The number of arguments passed to the current alias + + - -The number of arguments passed to the current alias - - + + + + + + + + + output: 99 bottles of beer on the wall, 99 bottles of beer! + + + - - - - - - - - -output: 99 bottles of beer on the wall, 99 bottles of beer! - - - - - +
+ +
- This section describes general identifiers. - - -Toggle for taking an automatic screenshot during intermission. - - + This section describes general identifiers. + + + + Toggle for taking an automatic screenshot during intermission. + + - -Toggle format of screenshot image. Your choice is for BMP (0) or JPEG (1). - - + + Toggle format of screenshot image. Your choice is for BMP (0) or JPEG (1). + + - -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 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. + + + - -Plays all hardcoded sounds in order. - + + Plays all hardcoded sounds in order. + - -writes current configuration to config/saved.cfg - automatic on quit - + + writes current configuration to config/saved.cfg - automatic on quit + - -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 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. + + + + - - - - - + + + + + - -Dump all command arguments to STDOUT - - - - + + Dump all command arguments to STDOUT + + + + - - -Toggles getting descriptive text from CGZ or DMO files in menudirlist. - - - - - + + + + + Toggles getting descriptive text from CGZ or DMO files in menudirlist. + + + + + - -Toggles physics interpolation. - - + + Toggles physics interpolation. + + - -create 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 - - - - - - - + + create 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 + + + + + + + - - -Toggles the console. - - + + Toggles the console. + - -Triggers a jump. - -default keys: space and right mouse. - - + + Triggers a jump. + + default keys: space and right mouse. + + - -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. - - - - - + + 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. + + + + + - -Returns the number of milliseconds since engine start. - - - - - - - + + Returns the number of milliseconds since engine start. + + + + + + + - -seconds since the epoch (00:00:00 UTC on January 1, 1970) - - - - - - + + 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 - - - - - - - - - - - - - + + 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. - - - - - - - + + 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 - - - - - - - - - + + the current time in (H)H:MM:SS format + + + + + + + + + - -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. - - - - - - - + + 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. + + + + + + + - -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. - - - - - - - - - - - - - - + + 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. + + + + + + + + + + + + + - -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. - - - + + 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. + + + - -Quits the game without asking. - + + Quits the game without asking. + - -Moves the player forward. - -default keys: W and Up Arrow - - + + Moves the player forward. + + default keys: W and Up Arrow + + - -Moves the player backward. - -default keys: S and Down Arrow - - + + Moves the player backward. + + default keys: S and Down Arrow + + - -Moves the player left. - -default keys: A and Left Arrow - - + + Moves the player left. + + default keys: A and Left Arrow + + - -Moves the player right. - -default keys: D and Right Arrow - - + + Moves the player right. + + default keys: D and Right Arrow + + - -Fires the current weapon. - -default: left mouse button - - + + Fires the current weapon. + + default: left mouse button + + - -Sets mouse to "flight sim" mode. - - - - + + Sets mouse to "flight sim" mode. + + + + - -Takes a screenshot. - - -Screenshots are saved to "screenshots/screenshotN.bmp", -where N is the number of milliseconds since the game was launched. - - - - - - + + Takes a screenshot. + + + Screenshots are saved to "screenshots/screenshotN.bmp", + where N is the number of milliseconds since the game was launched. + + + + + + - -Executes all commands in a specified config file. - - - - + + Executes all commands in a specified config file. + + + + - -Sets up the keymap for the specified key. - - -You should never have to use this command manually, use "bind" instead. - - - - - - - - - - - + + Sets up the keymap for the specified key. + + You should never have to use this command manually, use "bind" instead. + + + + + + + + + + - -Sets the mouse sensitivity. - - - - + + Sets the mouse sensitivity. + + + + - -Adds a server to the list of server to query in the server list menu. - - - - - + + Adds a server to the list of server to query in the server list menu. + + + + + - -Clears the list of secured maps. - - - - + + 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. - - - - - - - - - - - + + Adds a map to the list of secured maps. + + Secured maps can not be overwritten by the commands sendmap and getmap. + + + + + + + + + + - -Enables output of processed network packets. - -This variable only has an effect if the client binary is compiled in debug mode. - - - + + 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. - - + + Determines if the current played map should be automatically downloaded if it is not available locally. + + - -Automatically get new map revisions from the server. - - + + 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)); - - - - - - - + + 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. - - - - - - + + Enables correction of the system clock. + + + + + - -Enable triangle debug. - - -Prints details while connecting triangles of 3d models. - - - - + + Enable triangle debug. + + Prints details while connecting triangles of 3d models. + + + - - -Limits the FPS (frames per second) of the game. - - - + + Limits the FPS (frames per second) of the game. + + - - -Gets the maximum number of supported textures when performing multitexturing. - - - + + Gets the maximum number of supported textures when performing multitexturing. + + - - -Minimal level of detail. - - - + + Minimal level of detail. + + - -Toggles use of acronyms instead of full modenames in the serverbrowser. - - + + Toggles use of acronyms instead of full modenames in the serverbrowser. + + - - -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. - - - + + 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. + + + - - -Swaps your player to the enemy team. - - + + Swaps your player to the enemy team. + - - -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 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 the valid distance when extrapolating a players position. - - - + + Determines the valid distance when extrapolating a players position. + + - - -Determines the speed when extrapolating a players position. - - - + + Determines the speed when extrapolating a players position. + + - - -Determines how fast network throttling accelerates. - - - - - - - + + Determines how fast network throttling accelerates. + + + + + + - - -Determines how fast network throttling decelerates. - - - - - - - + + Determines how fast network throttling decelerates. + + + + + + - - -Determines the interval of re-evaluating network throttling. - - - - - - - + + Determines the interval of re-evaluating network throttling. + + + + + + - - -Swaps vertices of model triangles. - - - + + Swaps vertices of model triangles. + + - - -Gets an integer representing the game version. READ ONLY - - -As example, version 1.0 is represented as value 1000. - - + + Gets an integer representing the game version. READ ONLY + + As example, version 1.0 is represented as value 1000. + + - -Holds the current game mode. READ ONLY - - - -Output: 5 - - - - - - + + Holds the current game mode. READ ONLY + + + + Output: 5 + + + + + + - -Indicates if a connection to a server exists. - - + + Indicates if a connection to a server exists. + + - -Sets the maximum value the display will roll on strafing. - - - - -
+ + Sets the maximum value the display will roll on strafing. + + +
+
+ + +
This section describes gameplay related identifiers.