diff --git a/config/docs.cfg b/config/docs.cfg index 2c8b4a69..3579d34d 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -1,26 +1,6 @@ -// auto generated script to make the doc reference readable for Cube games, see the 'docs/cuberef.txt' +// This CubeScript has been automatically generated from AssaultCubes reference.xml file. +// To auto-generate this file yourself, please carefully read the comment at the top of reference.xml docsection [CubeScript] -docident [<] [Determines if a value is smaller than a second value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; -docident [<=] [Determines if a values is less than or equal than a second value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; -docident [=] [Determines if two values are equal.]; -docargument [A] [first value] [] [0]; -docargument [B] [second value] [] [0]; -docexample [echo there are only (concatword (= 1 1) (= 1 0)) types of people in the world] [Output: there are only 10 types of people in the world]; -docident [>] [Determines if a value is bigger than a second value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; -docident [>=] [Determines if a values is greater than or equal than a second value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; -docident [||] [logical OR.]; -docargument [A] [first value] [] [0]; -docargument [B] [second value] [] [0]; -docexample [echo (|| 1 0)] [output: 1]; -docexample [echo (|| 0 0)] [output: 0]; docident [-] [Performs a subtraction.]; docargument [A] [the minuend] [] [0]; docargument [B] [the subtrahend] [] [0]; @@ -29,22 +9,112 @@ docargument [A] [argument] [] [0]; docident [!=] [Determines if two values are not equal.]; docargument [A] [first value] [] [0]; docargument [B] [second value] [] [0]; -docident [*] [Performs a multiplication.]; -docargument [A] [the multiplicand] [] [0]; -docargument [B] [the multiplier] [] [0]; +docident [!=f] [Determines if a floating-point value is not equal to a second floating-point value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; docident [&&] [logical AND.]; docargument [A] [first value] [] [0]; docargument [B] [second value] [] [0]; docexample [echo (&& 1 1)] [Output: 1]; docexample [echo (&& 1 0)] [Output: 0]; +docident [*] [Performs a multiplication.]; +docargument [A] [the multiplicand] [] [0]; +docargument [B] [the multiplier] [] [0]; +docident [*f] [Performs a floating point multiplication.]; +docargument [A] [the multiplicand] [] [0]; +docargument [B] [the multiplier] [] [0]; +docident [||] [logical OR.]; +docargument [A] [first value] [] [0]; +docargument [B] [second value] [] [0]; +docexample [echo (|| 1 0)] [output: 1]; +docexample [echo (|| 0 0)] [output: 0]; docident [+] [Performs an addition.]; docargument [A] [the first summand] [] [0]; docargument [B] [the second summand] [] [0]; docremark [Example: echo the sum of x and y is (+ $x $y)]; +docident [+f] [Adds up two floating-point numbers.]; +docargument [A] [the first summand] [float] [0]; +docargument [B] [the second summand] [float] [0]; +docident [<] [Determines if a value is smaller than a second value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; +docident [<=] [Determines if a values is less than or equal than a second value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; +docident [<=f] [Compares if a particular floating-point value is less than or equal to another floating-point value.]; +docargument [A] [The first value.] [] [0]; +docargument [B] [The second value.] [] [0]; +docident [] [Determines if a value is bigger than a second value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; +docident [>=] [Determines if a values is greater than or equal than a second value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; +docident [>=f] [Determines if a floating-point value is greater than or equal to a second floating-point value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; +docident [>f] [Determines if a floating-point value is greater than a second floating-point value.]; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; +docident [add2alias] [This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.]; +docexample [foo = "one" add2alias foo two echo foo] [Output: one two]; +docident [add2bind] [Adds a block of code, if it does not already exist, to a keybind.]; +docargument [K] [the key to add to] [] [0]; +docargument [C] [the code to add] [] [0]; +docident [add2list] [Appends a new element to a list.]; +docargument [A] [the alias (list) to add to] [] [0]; +docargument [E] [the new element to add] [] [0]; +docexample [tmp_list = []; add2list tmp_list Hello; add2list tmp_list world!; echo $tmp_list] [Output: Hello world!]; +docident [addpunct] [Injects CubeScript punctuation.]; +docargument [S] [a string] [] [0]; +docargument [N] [type ID] [min 0/max 5/default 0] [0]; +docexample [echo (addpunct hello)] [Output: "hello"]; +docexample [echo (addpunct hello 1)] [Output: [hello]]; +docexample [echo (addpunct hello 2)] [Output: (hello)]; +docexample [echo (addpunct hello 3)] [Output: $hello]; +docexample [echo (addpunct "" 4)] [Output: "]; +docexample [echo (addpunct "" 5)] [Output: %]; +docexample [test = (concat echo (addpunct fov 3)); test] [Output: 90.0]; +docident [alias] [Binds a name to commands.]; +docargument [N] [the name of the alias] [string, must not contain '$'] [0]; +docargument [A] [the commands] [string] [0]; +docexample [alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ]] [It is possible to re-bind an alias, even during its evaluation.]; +docexample [test = [ echo "successful" ]] [There is also the shorthand version of defining an alias via the "="-sign.]; +docident [aliasinit] [Initializes a group of aliases using checkinit.]; +docargument [L] [the list of aliases to check for] [] [0]; +docargument [B] [the optional block of code to ensure the aliases contain] [] [0]; +docexample [aliasinit "tmp1 tmp2 tmp3 tmp4 tmp5"] [Checks to ensure that all 5 aliases listed exist, if not, it initializes them.]; +docexample [aliasinit "tmp1 tmp2 tmp3 tmp4 tmp5" 0] [Checks to ensure that all 5 aliases listed exist, if not, it initializes them to 0.]; docident [at] [Grabs a word out of a string.]; docargument [S] [the string] [] [0]; docargument [N] [the index of the word] [] [0]; docexample [echo (at "zero one two three" 2)] [output: two]; +docident [break] [Aborts a loop created with a 'loop', 'looplist' or 'while' command.]; +docexample [loop i 10 [ if (= $i 4) [ break ]; echo $i]] [output: 0 1 2 3]; +docident [c] [Adds color to a string.]; +docargument [N] [color id] [0 min, 9 max] [0]; +docexample [echo (c 3)Hello (c 0)world!] [Output: a red "Hello" and a green "world!"]; +docident [ceil] [Upper value of a float number]; +docargument [F] [The float number to get the ceil from] [] [0]; +docident [checkalias] [Determines if the argument given is an existing alias or not.]; +docargument [A] [the alias to check for] [] [0]; +docexample [hello = ""; echo (checkalias hello)] [Output: 1]; +docexample [echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)] [Output: 0]; +docident [checkinit] [Ensures the initialization of an alias.]; +docargument [A] [the alias to check for] [] [0]; +docargument [B] [the optional block of code to ensure that the alias contains] [] [0]; +docexample [checkinit mapstartalways] [Output: if alias mapstartalways does not exist, this command initializes it.]; +docexample [checkinit mapstartalways [ echo New map, good luck! ]] [Output: if alias mapstartalways does not exist, it is initialized, and if the block of code "[ echo New map, good luck! ]" does not exist within the aliases contents, this command adds it.]; docident [concat] [Concatenates multiple strings with spaces inbetween.]; docargument [S] [the first string] [] [0]; docargument [...] [collection of strings to concatenate] [] [1]; @@ -54,55 +124,70 @@ docargument [S] [the first string] [] [0]; docargument [...] [collection of strings to concatenate] [] [1]; docremark [The newly created string is saved to the alias 's'.]; docexample [alias a "Cube"; echo (concatword $a "Script")] [output: CubeScript]; +docident [const] [Set an alias as a constant.]; +docargument [N] [the name of the alias] [string, must not contain '$'] [0]; +docargument [A] [the value] [string (optional)] [0]; +docremark [A constant cannot be redefined : its value cannot be changed.]; +docremark [To get rid of a constant, use delalias]; +docexample [myalias = myvalue; const myalias;] [Set "myalias" value to "myvalue" then "lock" it as a constant.]; +docexample [const myalias myvalue;] [You can directly set a value for your alias when you define it as a constant.]; +docexample [const myalias myvalue; myalias = anothervalue;] [Assigning a value to a const will throw you an error. Output: myalias is already defined as a constant]; +docident [continue] [Skip current loop iteration.]; +docexample [loop i 5 [ if (= $i 2) [ continue ]; echo $i]] [output: 0 1 3 4]; +docident [convertcase] [Converts a list of strings to lowercase or uppercase characters.]; +docargument [N] [0 - use lowercase, 1 - use uppercase] [min 0/max 1] [0]; +docargument [...] [a list of strings] [] [0]; +docremark [This command can handle up to 23 string arguments.]; +docexample [echo (convertcase 0 ZERO ONE TWO THREE)] [Output: zero one two three]; +docexample [echo (convertcase 1 zero one two three)] [Output: ZERO ONE TWO THREE]; +docident [curplayers] [Returns the current number of players.]; +docremark [The return value includes the local player "(you)", and works in both singleplayer and multiplayer scenarios.]; docident [div] [Performs an integer division.]; docargument [A] [the dividend] [] [0]; docargument [B] [the divisor] [] [0]; docident [divf] [Performs a division with floating-point precision.]; docargument [A] [] [the dividend] [0]; docargument [B] [] [the divisor] [0]; -docident [f] [Determines if a floating-point value is greater than a second floating-point value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; -docident [>=f] [Determines if a floating-point value is greater than or equal to a second floating-point value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; +docident [execute] [Executes the specified string as CubeScript.]; +docargument [S] [the string to execute] [] [0]; +docexample [execute (concat echo (addpunct fov 3))] [Example output: 90.0]; docident [-f] [Subtracts two floating-point numbers.]; docargument [A] [the minuend] [float] [0]; docargument [B] [the subtrahend] [float] [0]; -docident [!=f] [Determines if a floating-point value is not equal to a second floating-point value.]; -docargument [A] [the first value] [] [0]; -docargument [B] [the second value] [] [0]; -docident [*f] [Performs a floating point multiplication.]; -docargument [A] [the multiplicand] [] [0]; -docargument [B] [the multiplier] [] [0]; -docident [+f] [Adds up two floating-point numbers.]; -docargument [A] [the first summand] [float] [0]; -docargument [B] [the second summand] [float] [0]; docident [findcn] [find client number (cn)]; docargument [N] [NAME] [] [0]; -docident [findpn] [find player name]; -docargument [C] [CLIENTNUM] [] [0]; docident [findlist] [Searches a list for a specified value.]; docargument [L] [the list] [] [0]; docargument [I] [the item to find] [] [0]; +docident [findpn] [find player name]; +docargument [C] [CLIENTNUM] [] [0]; +docident [floor] [Floor value of a float number]; +docargument [F] [The float number to get the floor from] [] [0]; docident [format] []; docargument [F] [format] [use %1..%9 for the values] [0]; docargument [V] [value(s)] [] [0]; docexample [echo (format "%1 bottles of %2 on the %3, %1 bottles of %2!" 99 beer wall)] [output: 99 bottles of beer on the wall, 99 bottles of beer!]; +docident [getalias] [return the value of the alias]; +docargument [N] [alias name] [] [0]; docident [if] [Controls the script flow based on a boolean expression.]; docargument [cond] [the condition] [0 (false) or anything else (true)] [0]; docargument [true] [the body to execute if the condition is true] [] [0]; docargument [false] [the body to execute if the condition is false] [] [0]; docexample [if (> $x 10) [ echo x is bigger than 10 ] [ echo x too small ]] []; +docident [isconst] [Determines if the argument given is a constant or not.]; +docargument [A] [the alias to check for] [] [0]; +docexample [const hello ""; echo (isconst hello)] [Output: 1]; +docexample [hello = value; echo (isconst hello)] [Output: 0]; +docident [isIdent] [returns whether or not there is an identifier by that name]; +docargument [N] [identifier name] [] [0]; +docident [l0] [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!]; +docargument [W] [WIDTH] [] [0]; +docargument [V] [VALUE] [] [0]; +docexample [echo (l0 5 1000)] [Output: 01000]; +docexample [echo (l0 3 1000)] [Output: 1000]; +docident [listaverage] [Returns the average of a list of numbers.]; +docargument [L] [the list of numbers] [supports ints and floats] [0]; +docexample [echo (listaverage "2 5 5")] [Output: 4.0]; docident [listlen] [returns the element count of the given list.]; docargument [L] [the list] [] [0]; docident [loop] [Loops the specified body.]; @@ -112,9 +197,9 @@ docargument [body] [the body to execute on each iteration] [] [0]; docremark [This command sets the alias you choose, as first argument, from 0 to N-1 for every iteration.]; docexample [loop i 10 [ echo $i ]] []; docident [looplist] [Browses a list and executes a body for each element]; -docargument [L] [the list] [0]; -docargument [E] [the alias containing the current element] [0]; -docargument [body] [the body to execute for each element] [0]; +docargument [V] [the list to browse] [] [0]; +docargument [N] [the alias containing the current element value.] [] [0]; +docargument [body] [the body to execute on each iteration] [] [0]; docexample [looplist "zero one two three" number [ echo $number ]] []; docident [mod] [Performs a modulo operation.]; docargument [A] [the dividend] [] [0]; @@ -126,165 +211,113 @@ docexample [echo (modf 7.5 12.5)] [Output: 7.5]; docexample [echo (modf 17.5 12.5)] [Output: 5.0]; docident [numargs] [The number of arguments passed to the current alias]; docargument [V] [numargs] [ read-only]; +docident [persistidents] [Controls whether aliases defined afterwards will be saved (1) or not (0). This option is useful to keep saved.cfg free from unneeded clutter.]; +docargument [B] [control option] [1...persistent, 0...not persistent] [0]; +docexample [persistidents 0; foo = [ echo "bar"]] [foo will not be saved and has to be redefined when restarting AC.]; +docexample [persistidents 1; bar = [ echo "foo"]] [bar will be saved and persistent across sessions.]; docident [pop] [Resets a previously pushed alias to it's original value.]; docargument [A] [alias] [] [0]; docexample [pop p; echo $p] [Output: 1]; +docident [powf] [Returns A raised to the power of B (floating-point)]; +docargument [A] [the mantissa] [] [0]; +docargument [B] [the exponent] [] [0]; docident [push] [Temporarily redefines the value of an alias.]; docargument [N] [alias name] [] [0]; docargument [A] [action] [] [0]; docexample [p = 1; push p 2; echo $p] [Output: 2]; +docident [resetsleeps] [Resets all current "sleep".]; docident [result] [sets the result value of a CubeScript block]; docargument [R] [the result] [] [0]; -docident [return] [sets the result value of a CubeScript block "(same as using result)"] +docident [return] [sets the result value of a CubeScript block]; docargument [R] [the result] [] [0]; -docident [execute] [Executes the specified string as CubeScript.]; -docargument [S] [the string to execute] [] [0]; -docexample [execute (concat echo (addpunct fov 3))] [Example output: 90.0]; -docident [round] [Round a float and returns an integer]; -docargument [F] [The float number to be rounded] [] [0]; -docident [ceil] [Return the ceil value (integer) of a float]; -docargument [F] [The float number] [] [0] -docident [floor] [Return the floor value (integer) of a float]; -docargument [F] [The float number] [] [0] docident [rnd] [Random value]; docargument [A] [The upper limit of the random value] [] [0]; -docident [rrnd] [Ranged random value]; -docargument [A] [the lowest value to return] [] [0]; -docargument [B] [the upper limit of the random value] [] [0]; +docident [round] [Round the given float]; +docargument [F] [The float number to round] [] [0]; docident [sleep] [Executes a command after specified time period.]; docargument [N] [the amount of milliseconds] [] [0]; docargument [C] [the command to execute] [] [0]; -docargument [P] [ignore map reset] [] [0]; +docargument [P] [ignore map change (optionnal)] [] [0]; docexample [sleep 1000 [ echo foo ]] [Prints 'foo' to the screen after 1 second.]; -docident [resetsleeps] [Reset all current sleeps]; -docident [strcmp] [Determines if two strings are equal.]; -docargument [A] [the first string] [] [0]; -docargument [B] [the second string] [] [0]; -docexample [if (strcmp yes yes) [echo the two strings are equal] [echo the two strings are not equal]] [Output: the two strings are equal]; -docident [strstr] [Determines if string B was found in string A.]; -docargument [A] [The first string.] [] [0]; -docargument [B] [The second string.] [] [0]; -docexample [if (strstr "Hello world!" Hello) [echo found Hello in Hello world!] [echo did not find Hello in Hello world!]] [Output: found Hello in Hello world!]; -docident [strlen] [Returns the length (in characters, including whitespace) of string S.]; -docargument [S] [The string to check.] [] [0]; -docexample [echo (strlen "Hello world!")] [output: 12]; -docident [strins] [Returns string B inserted into string A at position X.]; -docargument [A] [the original string] [] [0]; -docargument [B] [the string to insert into the original] [] [0]; -docargument [P] [the position at which to insert string B into string A] [] [0]; -docexample [echo (strins "Hello world" " cruel" 5)] [Output: Hello cruel world]; -docexample [tmp = "Hello world"; echo (strins $tmp " cruel" (strlen $tmp))] [Output: -1]; -docremark []; -docident [substr] [Copies a substring out of the original]; -docargument [S] [The original string.] [] [0]; -docargument [A] [The starting position.] [] [0]; -docargument [B] [The end position.] [] [0]; -docexample [echo (substr abcdefgh 2 5)] [Output: cde]; -docexample [echo (substr abcdefgh 2)] [Output: cdefgh]; -docident [while] [Loops the specified body while the condition evaluates to true.]; -docargument [cond] [the condition] [0 (false) or anything else (true)] [0]; -docargument [body] [the body to execute on each iteration] [] [0]; -docremark [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.]; -docexample [alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]] []; -docident [c] [Adds color to a string.]; -docargument [N] [The color ID.]; -docexample [echo (c 3)Hello (c 0)world!] [Output: a red "Hello" and a green "world!"]; -docident [l0] [leading zeros for the number V to make it W chars wide]; -docargument [W] [the width] [] [0]; -docargument [V] [the number] [] [0]; -docexample [echo (l0 5 1000)] [Output: 01000]; -docexample [echo (l0 3 1000)] [Output: 1000]; -docident [add2list] [Appends a new element to a list.]; -docargument [A] [the alias (list) to add to] [] [0]; -docargument [E] [the new element to add] [] [0]; -docexample [tmp_list = []; add2list tmp_list Hello; add2list tmp_list world!; echo $tmp_list] [Output: Hello world!]; docident [storesets] [Generates an alias (list) of the current values for the given aliases/CVARs.]; docargument [L] [the list of aliases/CVARs] [] [0]; docargument [A] [the alias to store them in] [] [0]; docexample [storesets "sensitivity hudgun fov" tmp] [Example result: stores "3.000 1 120" into alias "tmp".]; -docident [onLastMin] [If this alias exists, it will be automatically executed on the last minute remaining mark.]; -docident [akimboautoswitch] [Enables or disables automatic switching to the akimbo upon pickup.]; -docargument [N] [enable or disable] [min 0/max 1/default 1] [0]; -docident [akimboendaction] [Sets the behavior of weapon switching upon akimbo expiration.]; -docargument [N] [akimbo end action] [min 0/max 2/default 0]; -docexample [akimboendaction 0] [none]; -docexample [akimboendaction 1] [switch to primary]; -docexample [akimboendaction 2] [switch to grenades, else switch to primary]; -docident [break] [Aborts a loop created with a 'loop' or 'while' command.]; -docexample [loop i 10 [ if (= $i 4) [ break ]; echo $i]] [Output: 0 1 2 3]; -docident [continue] [Skip current loop iteration.] -docexample [loop i 5 [ if (= $i 2) [ continue ]; echo $i]] [output: 0 1 3 4] -docident [checkalias] [Determines if the argument given is an existing alias or not.]; -docargument [A] [the alias to check for] [] [0]; -docexample [hello = ""; echo (checkalias hello)] [Output: 1]; -docexample [echo (checkalias oMgThIsAlIaSpRoLlYdOeSnTeXiSt)] [Output: 0]; -docident [isconst] [Determines if the argument given is a constant or not.]; -docargument [A] [the alias to check for] [] [0]; -docexample [const hello ""; echo (isconst hello)] [Output: 1]; -docexample [hello = value; echo (isconst hello)] [Output: 0]; -docident [checkinit] [Ensures the initialization of an alias.]; -docargument [A] [the alias to check for] [] [0]; -docargument [B] [the optional block of code to ensure that the alias contains] [] [0]; -docexample [checkinit mapstartalways] [Output: if alias mapstartalways does not exist, this command initializes it.]; -docexample [checkinit mapstartalways [ echo New map, good luck! ]] [Output: if alias mapstartalways does not exist, it is initialized, and if the block of code "[ echo New map, good luck! ]" does not exist within the aliases contents, this command adds it.]; -docident [aliasinit] [Initializes a group of aliases using checkinit.]; -docargument [L] [the list of aliases to check for] [] [0]; -docargument [B] [the optional block of code to ensure the aliases contain] [] [0]; -docexample [aliasinit "tmp1 tmp2 tmp3 tmp4 tmp5"] [Checks to ensure that all 5 aliases listed exist, if not, it initializes them.]; -docexample [aliasinit "tmp1 tmp2 tmp3 tmp4 tmp5" 0] [Checks to ensure that all 5 aliases listed exist, if not, it initializes them to 0.]; -docident [addpunct] [Injects CubeScript punctuation.]; -docargument [S] [a string] [] [0]; -docargument [N] [type ID] [min 0/max 5/default 0] [0]; -docexample [echo (addpunct hello 1)] [Output: [hello]]; -docident [curplayers] [Returns the current number of players.]; -docremark [The return value includes the local player "(you)", and works in both singleplayer and multiplayer scenarios.]; +docident [strcmp] [Determines if two strings are equal.]; +docargument [A] [the first string] [] [0]; +docargument [B] [the second string] [] [0]; +docexample [if (strcmp yes yes) [echo the two strings are equal] [echo the two strings are not equal]] [Output: the two strings are equal]; +docident [strins] [Returns string B inserted into string A at position X.]; +docargument [A] [the original string] [] [0]; +docargument [B] [the string to insert into the original] [] [0]; +docargument [P] [the position at which to insert string B into string A] [] [0]; +docremark [The third argument must be at least greater than -1, and 1 less than the length "(in characters)" of string A, otherwise use concat or concatword.]; +docexample [echo (strins "Hello world" " cruel" 5)] [Output: Hello cruel world]; +docexample [tmp = "Hello world"; echo (strins $tmp " cruel" (strlen $tmp))] [Output: -1]; +docident [strlen] [Returns the length (in characters, including whitespace) of string S.]; +docargument [S] [STRING] [] [0]; +docexample [echo (strlen "Hello world!")] [Output: 12]; +docident [strpos] [Returns the position of a substring into another]; +docargument [H] [haystack string] [] [0]; +docargument [S] [needle string] [] [0]; +docargument [N] [The occurence of 'needle' to find (optionnal)] [] [0]; +docremark [Character indexes and occurence number begin at 0.]; +docexample [echo (strpos "hello world" "world") 6] []; +docexample [echo (strpos "hello world" "l") 2] []; +docexample [echo (strpos "hello world" "l" 2) 9] []; +docident [strreplace] [Returns a string, with a portion of it replaced with a new sub-string.]; +docargument [S] [the original string to modify] [] [0]; +docargument [T] [the target sub-string to replace] [] [0]; +docargument [N] [the new sub-string to replace the target] [] [0]; +docexample [echo (strreplace "Hello cruel world" cruel "")] [Output: Hello world]; +docident [strstr] [Determines if string B was found in string A.]; +docargument [A] [the first string] [] [0]; +docargument [B] [the second string] [] [0]; +docexample [if (strstr "Hello world!" Hello) [echo found Hello in Hello world!] [echo did not find Hello in Hello world!]] [Output: found Hello in Hello world!]; +docident [substr] [Copies a substring out of the original.]; +docargument [S] [the original string] [] [0]; +docargument [A] [start position] [] [0]; +docargument [L] [substring length (optionnal)] [] [0]; +docremark [Character indexes begins at 0. If "start position" is negative, the reference is the end of the string.]; +docexample [echo (substr abcdefgh 2 5) cdefg] []; +docexample [echo (substr abcdefgh -3 2) fg] []; +docexample [echo (substr abcdefgh 2) cdefgh] []; +docident [testchar] [Tests a character argument for various things.]; +docargument [C] [the character to test] [] [0]; +docargument [N] [type of test to run] [min 0/max 7/default 0] [0]; +docremark [See the following c++ functions for more information about the usage of this command:]; +docremark [isalpha(), isalnum(), isdigit(), islower(), isprint(), ispunct(), isupper(), and isspace()]; +docexample [echo (testchar 1)] [Output: 1 // It is a 0-9 digit]; +docexample [echo (testchar a 1)] [Output: 1 // It is a a-z or A-Z character]; +docexample [echo (testchar z 2)] [Output: 1 // It is a a-z or A-Z character or 0-9 digit]; +docexample [echo (testchar b 3)] [Output: 1 // It is a lowercase a-z character]; +docexample [echo (testchar B 4)] [Output: 1 // It is a uppercase A-Z character]; +docexample [echo (testchar , 5)] [Output: 1 // It is a printable character]; +docexample [echo (testchar . 6)] [Output: 1 // It is a punctuation character]; +docexample [echo (testchar " " 7)] [Output: 1 // It is a whitespace character]; +docident [testlist] [Tests a list argument for various things.]; +docargument [L] [the list to test] [] [0]; +docargument [N] [type of test to run] [min 0/max 2/default 0] [0]; +docexample [echo (testlist "1 2.45 8")] [Output: 1 // It is a valid list of numbers (supports ints and floats)]; +docexample [echo (testlist "a B C defg hi jk" 1)] [Output: 1 // It is a valid list of alpha-characters a-z or A-Z only]; +docexample [echo (testlist "a B C defg hi jk" 2)] [Output: 1 // It is a valid list of alpha-characters a-z or A-Z or whitespace only]; docident [tolower] [Converts a string to all lowercase characters.]; docargument [S] [a string] [] [0]; docexample [echo (tolower HELLO)] [Output: hello]; docident [toupper] [Converts a string to all uppercase characters.]; docargument [S] [a string] [] [0]; docexample [echo (toupper hello)] [Output: HELLO]; -docident [convertcase] [Converts a list of strings to lowercase or uppercase characters.]; -docargument [N] [0 - use lowercase, 1 - use uppercase] [min 0/max 1] [0]; -docargument [...] [a list of strings] [] [0]; -docexample [echo (convertcase 0 ZERO ONE TWO THREE)] [Output: zero one two three]; -docexample [echo (convertcase 1 zero one two three)] [Output: ZERO ONE TWO THREE]; -docremark [This command can handle up to 23 string arguments.]; -docident [testchar] [Tests a character argument for various things.]; -docargument [C] [the character to test] [] [0]; -docargument [N] [type of test to run] [min 0/max 7/default 0] [0]; -docexample [echo (testchar 1)] [Output: 1 "(because it is a 0-9 digit)"]; -docremark [See /docs/reference.xml for more information about the usage of this command.]; -docident [testlist] [Tests a list argument for various things.]; -docargument [L] [the list to test] [] [0]; -docargument [N] [the type of test to run] [min 0/max 2/default 0] [0]; -docremark [See /docs/reference.xml for more information about the usage of this command.]; -docident [strreplace] [Returns a string, with a portion of it replaced with a new sub-string.]; -docargument [S] [the original string to modify] [] [0]; -docargument [T] [the target sub-string to replace] [] [0]; -docargument [N] [the new sub-string to replace the target] [] [0]; -docexample [echo (strreplace "Hello cruel world" cruel "")] [Output: Hello world]; -docident [listaverage] [Returns the average of a list of numbers.]; -docargument [L] [the list of numbers] [supports ints and floats] [0]; -docexample [echo (listaverage "2 5 5")] [Output: 4.0]; -docident [add2bind] [Adds a block of code, if it does not already exist, to a keybind.]; -docargument [K] [the key to add to] [] [0]; -docargument [C] [the code to add] [] [0]; +docident [while] [Loops the specified body while the condition evaluates to true.]; +docargument [cond] [the condition] [0 (false) or anything else (true)] [0]; +docargument [body] [the body to execute on each iteration] [] [0]; +docremark [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.]; +docexample [alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]] []; docsection [General] docident [addserver] [Adds a server to the list of server to query in the server list menu.]; docargument [S] [the address of the server (hostname or IP)] [] [0]; docargument [P] [the port] [] [0]; -docident [alias] [Binds a name to commands.]; -docargument [N] [the name of the alias] [string, must not contain '$'] [0]; -docargument [A] [the commands] [string] [0]; -docexample [alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ]] [It is possible to re-bind an alias, even during its evaluation.]; -docexample [test = [ echo "successful" ]] [There is also the shorthand version of defining an alias via the "="-sign.]; -docident [const] [Set an alias as a constant.]; -docargument [N] [the name of the alias] [string, must not contain '$'] [0]; -docargument [A] [the value (optional)] [string] [0]; -docexample [myalias = myvalue; const myalias;] [Set "myalias" value to "myvalue" then "lock" it as a constant.]; -docexample [const myalias myvalue;] [You can directly set a value for your alias when you define it as a constant.]; -docexample [const myalias myvalue; myalias = anothervalue;] [Assigning a value to a const will throw you an error. Output: myalias is already defined as a constant]; +docident [allowhudechos] [Enables or disables the ability of hudecho to output text to the heads up display.]; +docargument [N] [0 off, 1 on] [min 0/max 1/default 1]; docident [attack] [Fires the current weapon.]; docremark [default: left mouse button]; docident [autogetmap] [Determines if the current played map should be automatically downloaded if it is not available locally.]; @@ -299,17 +332,11 @@ docident [bind] [Binds a key to a command.]; docargument [K] [the key to bind] [string] [0]; docargument [A] [the command] [string, usually an alias] [0]; docremark [To find out what key names and their default bindings are, look at config/keymap.cfg, then add bind commands to your autoexec.cfg.]; -docident [megabind] [Binds a key to many different actions depending on the current game state.]; -docargument [K] [the key to bind]; -docargument [D] [body of code to execute if watching a demo]; -docargument [E] [body of code to execute if editing or in coop-edit mode]; -docargument [C] [body of code to execute if connected to a server]; -docargument [B] [body of code to execute if in a bot mode]; -docargument [O] [body of code to execute if none of the other arguments have been met]; -docremark [This command requires 6 arguments, no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing".]; docident [browsefiledesc] [Toggles getting descriptive text from CGZ or DMO files in menudirlist.]; docargument [B] [] [min 0/max 1/default 1]; docident [changeteam] [Swaps your player to the enemy team.]; +docident [cleanshot] [Take a "clean" screenshot with no HUD items.]; +docremark [Your current HUD configuration is stored into a buffer, and is re-enabled afterwards.]; docident [clearservers] []; docident [clockerror] [Sets the correction value for clockfix.]; docargument [V] [correction value] [min 990000/max 1010000/default 1000000]; @@ -329,16 +356,29 @@ docident [debugargs] [Dump all command arguments to STDOUT]; docargument [...] [...] [] [1]; docident [echo] [Outputs text to the console.]; docargument [L] [List of strings] [] [0]; -docident [hudecho] [Outputs text to the console and heads up display.]; -docargument [L] [List of strings] [] [0]; -docident [allowhudechos] [Enables or disables the ability of hudecho to output text to the heads up display.]; -docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0]; docident [exec] [Executes all commands in a specified config file.]; docargument [C] [the config file] [] [0]; docident [forward] [Moves the player forward.]; docremark [default keys: W and Up Arrow]; docident [gamemode] [Holds the current game mode. READ ONLY]; docexample [echo $gamemode] [Output: 5]; +docident [getEngineState] [Returns a list of values describing the current engine (rendering) state.]; +docremark [It will only be filled after the first frame was drawn.]; +docremark [The list is: FPS LOD WQD WVT EVT]; +docremark [FPS = Frames Per Second]; +docremark [LOD = Level Of Detail]; +docremark [WQD = World QuaD Count]; +docremark [WVT = World VerTex Count]; +docremark [EVT = Extra VerTex Count (HUD & menu)]; +docexample [echo (getEngineState)] []; +docident [getmode] [Returns the current game mode.]; +docargument [N] [0 = full mode name, 1 = mode acronym] [min 0/max 1/default 0] [0]; +docexample [echo (getmode)] [Example output: capture the flag]; +docexample [echo (getmode 1)] [Example output: CTF]; +docident [getscrext] [Returns the file extension of the client's current screenshottype setting.]; +docexample [echo (getscrext)] [Example output: .jpg]; +docident [hudecho] [Outputs text to the console and heads up display.]; +docargument [L] [List of strings] [] [0]; docident [invmouse] [Sets mouse to "flight sim" mode.]; docargument [B] [sets invmouse] [0 (off), else (on)] [0]; docident [jpegquality] [Sets the JPEG screenshot image quality.]; @@ -354,12 +394,22 @@ docargument [A] [the default action] [] [0]; docremark [You should never have to use this command manually, use "bind" instead.]; docident [left] [Moves the player left.]; docremark [default keys: A and Left Arrow]; +docident [mapshot] [save an image of the entire radar-overview of the map.]; docident [maxfps] [Limits the FPS (frames per second) of the game.]; -docargument [V] [maximum FPS] [min 25/max 200/default 200]; +docargument [V] [maximum FPS] [0 disables maxfps min 25 or 0/max 200/default 200]; docident [maxroll] [Sets the maximum value the display will roll on strafing.]; docargument [N] [the roll value] [min 0/max 20/default 0]; docident [maxtmus] [Gets the maximum number of supported textures when performing multitexturing.]; docargument [V] [max. number of textures] [ read-only]; +docident [megabind] [Binds a key to many different actions depending on the current game state.]; +docargument [K] [the key to bind] [string] [0]; +docargument [D] [body of code to execute if watching a demo] [a body of code] [0]; +docargument [E] [body of code to execute if editing or in coop-edit mode] [a body of code] [0]; +docargument [C] [body of code to execute if connected to a server] [a body of code] [0]; +docargument [B] [body of code to execute if in a bot mode] [a body of code] [0]; +docargument [O] [body of code to execute if none of the other arguments have been met] [a body of code] [0]; +docremark [This command requires 6 arguments, no less. Use an empty set of brackets [] for any of the arguments that you want to "do nothing".]; +docexample [megabind F9 [echo Demo!] [echo Editing or coop!] [echo Connected!] [echo Bots!] [echo Other!]] []; docident [menudirlist] [create a menu listing of files from a path and perform an action on them when clicked.]; docargument [] [] [] [0]; docremark [use this inside menu definitions, almost always as the only command of that menu.]; @@ -371,13 +421,10 @@ docident [minlod] [Minimal level of detail.]; docargument [V] [] [min 25/max 250/default 60]; docident [modeacronyms] [Toggles use of acronyms instead of full modenames in the serverbrowser.]; docargument [B] [] [min 0/max 1/default 0]; -docident [getmode] [Returns the current game mode.]; -docargument [N] [0 = full mode name, 1 = mode acronym] [min 0/max 1/default 0] [0]; -docexample [echo (getmode)] [Example output: capture the flag]; -docexample [echo (getmode 1)] [Example output: CTF]; docident [networkdebug] [Enables output of processed network packets.]; docargument [B] [enable network debugging] [min 0/max 1/default 0]; docremark [This variable only has an effect if the client binary is compiled in debug mode.]; +docident [numconlines] [Hold the current number of lines on the console.]; docident [onrelease] [Executes a command on the release of a key/button.]; docargument [A] [the command] [] [0]; docremark [This command must be placed in an action in a bind or in an alias in a bind.]; @@ -401,13 +448,10 @@ docremark [default keys: D and Right Arrow]; docident [screenshot] [Takes a screenshot.]; docremark [Screenshots are saved to "screenshots/screenshotN.bmp", where N is the number of milliseconds since the game was launched.]; dockey [F12] [] []; -docident [cleanshot] [Take a "clean" screenshot with no HUD items.]; -docremark [Your current HUD configuration is stored into a buffer, and is re-enabled afterwards.]; -docident [mapshot] [save an image of the entire radar-overview of the map.]; +docident [screenshotscale] [Scales screenshots by the given factor before saving. 1 = original size, 0.5 = half size, etc.]; +docargument [S] [Scale] [min 0.1/max 1/default 1]; docident [screenshottype] [Toggle format of screenshot image. Your choice is for BMP (0), JPEG (1) or PNG (2).]; docargument [T] [0=BMP, 1=JPEG, 2=PNG] [min 0/max 2/default 1]; -docident [getscrext] [Returns the file extension of the client's current screenshottype setting.]; -docexample [echo (getscrext)] [Example output: .jpg]; docident [securemap] [Adds a map to the list of secured maps.]; docargument [S] [the name of the map] [] [0]; docremark [Secured maps can not be overwritten by the commands sendmap and getmap.]; @@ -443,22 +487,16 @@ docremark [The servers are written to the config/servers.cfg file. This menu can docident [version] [Gets an integer representing the game version. READ ONLY]; docremark [As example, version 1.0 is represented as value 1000.]; docident [writecfg] [writes current configuration to config/saved.cfg - automatic on quit]; -docident [onNewMap] [If this alias exists, it will be automatically executed when you start a new map.]; -docident [numconlines] [Holds the current number of lines on the console.]; docsection [Gameplay] -docident [add2alias] [This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.]; -docexample [foo = "one" add2alias foo two echo foo] [Output: one two]; -docident [addOnQuit] [Execute a command or block of code on quit.]; -docargument [A] [the command or block of code to execute] [] [0]; -docident [addListOnQuit] [Deletes a list of aliases (from saved.cfg) on quit.]; -docargument [L] [the list of aliases to delete] [] [0]; -docexample [addListOnQuit "a b c"] [Deletes aliases a, b, and c from existance and saved.cfg upon quit.]; docident [addbot] [add a bot for a given team with a given skill calling him a given name.]; -docargument [T] [team] [RVSF or CLA or SPECTATOR] [0]; +docargument [T] [team] [RVSF or CLA] [0]; docargument [S] [skill] [best, good, medium, worse OR bad] [0]; docargument [N] [name] [name for the bot] [0]; docremark [This command only works for single player modes.]; docexample [addbot RVSF medium Robbie] [Will add a bot named Robbie with a medium skill level to the RVSF team.]; +docident [addListOnQuit] [Deletes a list of aliases (from saved.cfg) on quit.]; +docargument [L] [the list of aliases to delete] [min /max /default ]; +docexample [addListOnQuit "a b c"] [Deletes aliases a, b, and c from existance and saved.cfg upon quit.]; docident [addnbot] [will add a given count of bots for the given team with the given skill and select random names for them.]; docargument [C] [count] [how many bots to add] [0]; docargument [T] [team] [RVSF or CLA] [0]; @@ -466,6 +504,15 @@ docargument [S] [skill] [best, good, medium, worse OR bad] [0]; docremark [This command only works for single player modes.]; docremark [The name of the bots will be selected randomly.]; docexample [addnbot 2 CLA bad] [Will add 2 bots with a bad skill level to the CLA team.]; +docident [addOnQuit] [Execute a command or block of code on quit.]; +docargument [A] [the command or block of code to execute] [min /max /default ]; +docident [akimboautoswitch] [Enables or disables automatic switching to the akimbo upon pickup.]; +docargument [N] [enable or disable] [min 0/max 1/default 1]; +docident [akimboendaction] [Sets the behavior of weapon switching upon akimbo expiration.]; +docargument [] [] [0 (none)] [0]; +docargument [] [] [1 (switch to primary)] [0]; +docargument [] [] [2 (switch to grenades, else switch to primary)] [0]; +docargument [N] [akimbo end action] [min 0/max 2/default 0]; docident [alive] [Returns 1 if the local player is alive.]; docexample [echo (alive)] [Output: 1]; docident [autoreload] [Indicates if the weapons should be reloaded automatically.]; @@ -511,6 +558,7 @@ docremark [If the server name ist omitted, the client will try to connect to an docexample [connectadmin 127.0.0.1 777 myAdminPassword] [connect as admin on port 777 of localhost]; docexample [connectadmin "" 0 myAdminPassword] [will try to connect to a LAN server on the default port as admin with the given password of "myAdminPassword".]; docident [crouch] []; +docident [curautoteam] [Returns the server's current autoteam state.]; docident [curmap] [Returns the current map being played.]; docargument [I] [clean] [0, 1] [0]; docremark [If you pass it a non-zero value, the result will be path-less.]; @@ -518,7 +566,6 @@ docexample [echo playing: (curmap) vote for: (curmap 1)] [output: playing maps/a docident [curmaprevision] [Current map revision number.]; docargument [] [-] [ read-only]; docident [curmastermode] [Returns the server's current mastermode state.]; -docident [curautoteam] [Returns the server's current autoteam state.]; docident [curmode] [Returns the mode number for the current game.]; docident [curmodeattr] [Checks the current game mode for certain attributes.]; docargument [A] [attribute name] [] [0]; @@ -527,21 +574,19 @@ docident [currentprimary] [Returns the weapon-index the local player currently h docremark [This is not the same as curweapon - which could be a grenade or the knife.]; docident [currole] [Returns 1 if the local player has admin privileges, 0 otherwise.]; docident [curserver] [Returns information on the current server - if you're connected to one.]; -docargument [I] [info] [0, 1, 2, 3 or 4] [0]; +docargument [I] [info] [0, 1, 2, 3, 4, 5, 6, 7, 8] [0]; docremark [If I is 0 (omitted or any other value than the ones below) you will get a string with 'IP PORT']; docremark [If I is 1,2 or 3 you will get the IP, HostName or port respectively.]; docremark [If I is 4 you get a string representing the current state of the peer - usually this should be 'connected'.]; +docremark [FIXME:TODO: 5=SERVERNAME, 6,7=description, 8=serverbrowser-line -- these are to be handled with caution, sometimes empty, #8 will be outdated w/o serverbrowser open.]; docexample [echo [I am (curserver 4) to (curserver 2)]] [Output: I am connected to ctf-only.assault-servers.net]; docexample [last_server = "" remember_server = [ if (strcmp (curserver 4) "connected") [ last_server = (curserver 0) echo "I'm remembering:" $last_server ] [ echo "you are not 'connected' - you" (concatword "are '" (curserver 4) "' !") ] ] bind PRINT [ if (strcmp $last_server "") [ remember_server ] [ say (concat "^L2I was just ^Lfon^L3" $last_server) last_server = "" ] ]] [This will either remember or retrieve the last server you pressed the PrintScreen-key on.]; -docident [curteam] [Returns 1 if the local player is on the RVSF team, 0 if on CLA.]; -docargument [C] [optional argument: client number] [] [0]; +docident [curteam] [Returns 1 if the local player is on the RVSF team, 0 if on CLA. If the player is in SPECTATOR it returns 2.]; +docargument [C] [optional argument: client number] [returns the specified client's team instead] [0]; docident [curweapon] [Returns the weapon-index the local player is currently holding.]; docident [demo] [Plays a recorded demo.]; docargument [S] [the demo name] [] [0]; docremark [Playback is interpolated for the player whose perspective you view.]; -docident [setmr] [Restarts the current demo, and "fast forwards" to a predefined minutes remaining.]; -docargument [M] [the minutes remaining to skip to] [] [0]; -docremark [Note: If the argument given is too low, this command will simply fast forward through an entire partial demo.]; docident [disconnect] [Leaves a server.]; docident [drawbeamtobots] [Draws a shooting line in the direction of all available bots.]; docargument [] [this command does not take any arguments] [none] [0]; @@ -550,8 +595,6 @@ docident [dropflag] [Drops the enemy flag.]; docident [footstepalign] [Maximum time span between player animation and the playback of the footstep sound]; docargument [T] [time span] [min 5/max 4000/default 15]; docremark [If the footstep sound would be played immediately when entering the radius of the other player, it would not be synchronous to the player model animation.]; -docident [hitsound] [Plays a sound upon every successful hit if enabled.]; -docargument [B] [off OR on] [0 (false), 1 (true)]; docident [footsteps] [Indicates if the footsteps sound should be played]; docargument [B] [enable footsteps] [1 (true), 0 (false) min 0/max 1/default 1]; docident [gamespeed] [Sets the gamespeed in percent.]; @@ -560,7 +603,7 @@ docremark [This does not work in multiplayer. For entertainment purposes only :) docident [gametimecurrent] [Returns the time (in milliseconds) of the currently played game. READ ONLY]; docexample [showtime = [ if (> $lastgametimeupdate 0) [ gmr = (- $gametimemaximum (+ $gametimecurrent (- (millis) $lastgametimeupdate))) gsr = (div $gmr 1000) gts = (mod $gsr 60) if (< $gts 10) [ gts = (concatword 0 $gts) ] [ ] gtm = (div $gsr 60) if (< $gtm 10) [ gtm = (concatword 0 $gtm) ] [ ] echo (concatword $gtm : $gts) remaining ] [ echo gametime not updated yet ] ]] []; docident [gametimemaximum] [Returns the maximum time (in milliseconds) of the currently played game. READ ONLY]; -docident [gametimestart] [Returns the time "(in milliseconds)" when the last map was loaded.]; +docident [gametimestart] [Returns the time (in milliseconds) when the last map was loaded.]; docident [getclientmode] [Returns the current game mode number.]; docident [getdemo] []; docargument [X] [number in list] [] [0]; @@ -568,6 +611,8 @@ docargument [P] [subpath (optional)] [] [0]; docident [getmap] [Retrieves the last map that was sent to the server using 'sendmap'.]; docident [hidecustomskins] []; docargument [B] [] [min 0/max 1/default 0]; +docident [hitsound] [Plays a sound upon every successful hit if enabled.]; +docargument [B] [off OR on] [1 (true), 0 (false) min 0/max 1/default 0]; docident [idlebots] [Enables or disables the processing of the bots artificial intelligence]; docargument [T] [off OR on] [0||1] [0]; docexample [idlebots 1] [Will make the bots stand still.]; @@ -575,12 +620,18 @@ docexample [idlebots 0] [Will enable the bots to move and shoot.]; docident [ignore] [Ignore a player.]; docargument [A] [client number] [] [0]; docremark [You won't see any further game chat or hear any more voice com messages from that player.]; -docident [ignoreall] [Ignores all players currently on the server.]; -docident [unignoreall] [Un-ignores all players currently on the server.]; docident [inputcommand] [Makes an input perform a certain command.]; docargument [I] [input] [] [0]; docargument [C] [command] [] [0]; docargument [P] [prompt] [] [0]; +docident [inWater] [Determines if the local player is standing in water or submerged.]; +docargument [T] [check if submerged instead?] [min 0/max 1/default 0] [0]; +docexample [if (inWater) [echo in water] [echo not in water]] [Example output: in water]; +docexample [if (inWater 1) [echo submerged] [echo not submerged]] [Example output: not submerged]; +docident [isclient] [Determines if the client number given is a valid client (player).]; +docargument [C] [client number] [] [0]; +docexample [echo (isclient 0)] [Example output: 1]; +docexample [echo (isclient 32)] [Example output: 0]; docident [kickallbots] [Kicks all bots out of the current game.]; docargument [] [this command does not take any arguments] [none] [0]; docident [kickbot] [Kicks the bot with the given name out of the current game.]; @@ -617,19 +668,6 @@ docexample [addOnLoadAlways [ echo "------------------------------" ]] [This wil docident [mapstartonce] [If this alias exists it will be run when the game starts a new map, then it is deleted.]; docexample [mapstartonce = [ echo "------------------------------" ]] [This will output the string and override any other actions that might've been defined.]; docexample [addOnLoadOnce [ echo "------------------------------" ]] [This will output the string after any previously defined actions have run.]; -docident [onCallVote] [If this alias exists it will be run every time a vote is called.]; -docident [onChangeVote] [If this alias exists it will be run every time a vote is changed.]; -docident [onVoteEnd] [If this alias exists it will be run every time a vote passes or fails.]; -docident [votepending] [Determines if there is a vote pending or not.]; -docexample [echo $votepending] [Output: if there is currently a vote pending, returns 1, else returns 0.]; -docident [onSpawn] [If this alias exists it will be run every time someone spawns.]; -docident [onKill] [If this alias exists it will be run every time a player is killed.]; -docident [onFlag] [If this alias exists it will be run every time a flag action occurs.]; -docident [onPickup] [If this alias exists it will be run every time you pick up an item.]; -docident [onWeaponSwitch] [If this alias exists it will be run every time you switch to a different weapon.]; -docident [onConnect] [If this alias exists it will be run every time you or another player join(s) your server.]; -docident [onDisconnect] [If this alias exists it will be run every time you disconnect from a server.]; -docident [onNameChange] [If this alias exists it will be run every time you or another player change(s) of name.]; docident [mdldyncache] []; docargument [V] [] [min 1/max 32/default 2]; docident [mdlstatcache] []; @@ -659,6 +697,33 @@ docargument [A] [weapon id] [value] [0]; docident [nickcomplete] [adds a command to complete nicknames on]; docremark [your own nick will be ignored]; docexample [nickgreet = [ say (concat "Hello," (concatword $arg1 "!")) ]; nickcomplete nickgreet] [with this you can enter "/nickgreet " and cycle via TAB to the nickname you want to greet.]; +docident [onCallVote] [If this alias exists it will be run every time a vote is called.]; +docident [onChangeVote] [If this alias exists it will be run every time a vote is changed.]; +docident [onConnect] [If defined, this will be executed when you or another player join(s) a server.]; +docargument [player] [The client number of the player who connected] [integer (-1 for local player)] [0]; +docident [onDisconnect] [If defined, this will be executed when you disconnect from a server.]; +docident [onFlag] [If defined, this will be executed each time a flag action occurs.]; +docargument [action] [The action that occured] [integer (0 = stolen, 1 = dropped, 2 = lost, 3 = returned, 4 = scored, 5 = ktfscore, 6 = failed to score, 7 = reset)] [0]; +docargument [actor] [The client number of the actor] [integer] [0]; +docargument [flag] [The flag owner team] [integer (0 = CLA, 1 = RVSF)] [0]; +docident [onKill] [If it exists, this alias will be executing when any player get killed, receiving a few arguments :]; +docargument [actor] [The client number of the actor] [integer] [0]; +docargument [target] [The client number of the target] [integer] [0]; +docargument [gun] [The number of the gun used] [integer] [0]; +docargument [gib] [Is it a gib or a normal frag] [integer (0 or 1)] [0]; +docident [onLastMin] [If this alias exists, it will be automatically executed on the last minute remaining mark.]; +docident [onNameChange] [If defined, this will be executed when you or another player change(s) his name.]; +docargument [player] [The client number of the player who connected] [integer] [0]; +docargument [new name] [The new name of the client] [string] [0]; +docremark [The alias is executed before the name is effectively changed, so you can still get the previous name of the client from this alias.]; +docident [onPickup] [If defined, this will be executed each time you pick up an item.]; +docargument [item] [The item that was picked up] [integer (0 = pistol clips, 1 = ammo box, 2 = grenade, 3 = health, 4 = helmet, 5 = armour, 6 = akimbo)] [0]; +docargument [q] [The quantity that was received] [] [0]; +docident [onSpawn] [If defined, this will be executed each time a player spawns.]; +docargument [player] [The client number of the player who spawned] [integer] [0]; +docident [onVoteEnd] [If this alias exists it will be run every time a vote passes or fails.]; +docident [onWeaponSwitch] [If defined, this will be executed each time you switch to a different weapon.]; +docargument [w] [The weapon ID that you switched to] [] [0]; docident [paused] [Determines if the game should be paused.]; docargument [B] [pause game] [min 0/max 1/default 0]; docident [prevweapon] [Returns the weapon-index the local player was previously holding.]; @@ -667,9 +732,14 @@ docargument [C] [client] [0..N] [0]; docexample [echo (pstat_score 0)] [Output: 0 5 3 43 1 1 unarmed]; docident [pstat_weap] [Returns the shot statistics for the player with the given clientnumber.]; docargument [C] [client] [0..N] [0]; +docremark [The list is:]; +docremark [knife/atk dmg pistol/atk dmg carbine/atk dmg shotgun/atk dmg smg/atk dmg sniper/atk dmg assault/atk dmg cpistol/atk dmg nade/atk dmg akimbo/atk dmg]; docexample [echo (pstat_weap 0)] [Output: 0 0 0 0 0 0 0 0 0 0 1 240 15 312 0 0 3 112 0 0]; docident [reload] [Reloads the weapon.]; docargument [A] [] [value] [0]; +docident [rewind] [Rewind the current demo to S seconds ago.]; +docargument [S] [the number of seconds to rewind] [] [0]; +docremark [Note: you can use a negative value to forward.]; docident [say] [Outputs text to other players.]; docargument [S...] [the text] [] [1]; docremark [If the text begins with a percent character (%), only team mates will receive the message.]; @@ -683,6 +753,10 @@ dockey [UP] [] [browse command history forwards]; dockey [DOWN] [] [browse command history backwards]; docident [scopefov] [Determines the FOV when scoping.]; docargument [V] [] [min 5/max 60/default 50]; +docident [setfollowplayer] []; +docargument [C] [clientnum] [which player to follow] [0]; +docident [setmr] [Go to a predefined number of minutes before the end of the game while watching a demo.]; +docargument [M] [the minutes remaining to skip to] [] [0]; docident [setscope] [will display a scope for the sniper-rifle. used in the zoom-script (config/scripts.cfg [l. 92ff "alias zoom"]]; docargument [Y] [scope on?] [0||1] [0]; docident [shiftweapon] [shifts your selected weapon by a given delta. By default the mouse-wheel shifts one up or down according to your scroll direction.]; @@ -712,8 +786,12 @@ docident [start_intermission] [If this alias exists it will be run when the game docexample [start_intermission = [ echo "INTERMISSION - STATISTICS TIME" loop p 255 [ pn = (findpn $p) if (strcmp $pn "") [ ] [ echo (concatword Player $p ":") (pstat_score $p) ":" (pstat_weap $p) ] ] echo "------------------------------" ]] [This will output the full statistics line for all players.]; docident [stopdemo] [Stops any demo recording or playback.]; docident [suicide] [Kills your player. You will lose 1 frag point and gain 1 death point when using this command.]; +docident [survival] [Prepares a round of bot survival mode on the specified map.]; +docargument [M] [the map to use] [] [0]; +docargument [D] [optional: the difficulty] [0 = easy, 1 = intermediate, 2 = hard, 3 = impossible] [0]; +docremark [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.]; docident [team] [Sets the team for the local player.]; -docargument [S] [the team name] [either CLA or RVSF] [0]; +docargument [S] [the team name] [either CLA or RVSF or SPECTATOR] [0]; docexample [team CLA] []; docident [togglespect] [cycles through all available spectator modes. Follow-1stPerson, Follow-3rdPerson, Follow-3rdPerson-transparent and Fly.]; dockey [SPACE] [] [cycle spectator modes]; @@ -722,12 +800,16 @@ docargument [S] [sound] [must be a registered voicecom-sound] [0]; docargument [T] [text] [] [0]; dockey [V] [] [opens the voicecom menu, use number keys for your choice]; docident [voicecomsounds] [Enables or disables voicecom audio.]; -docargument [N] [0..2] [min 0/max 2/default 1]; -docremark [0 (off), 1 (always play voicecom audio), 2 (only play voicecom audio from you and your teammates)]; +docargument [] [] [0 (off)] [0]; +docargument [] [] [1 (always play voicecom audio)] [0]; +docargument [] [] [2 (only play voicecom audio from you and your teammates)] [0]; +docargument [N] [voicecom sounds] [min 0/max 2/default 1]; docident [vote] [agree or disagree to the currently running vote]; docargument [V] [vote value] [1 (yes) OR 2 (no)] [0]; dockey [F1] [] [votes YES]; dockey [F2] [] [votes NO]; +docident [votepending] [Determines if there is a vote pending or not.]; +docexample [echo $votepending] [Output: if there is currently a vote pending, returns 1, else returns 0.]; docident [watchingdemo] [Returns 1 when the current game is being played from a demo, else 0.]; docexample [echo I am (at [not now] (watchingdemo)) watching a demo. "so, are you?"] []; docident [weapon] [Changes the weapon.]; @@ -736,22 +818,6 @@ docident [whois] [get the IP address of a given clientnumber - only admins get s docargument [C] [clientnum] [] [0]; docident [xhairwpsel] [Determines if bot waypoints should be selected/placed using the crosshair or by the nearest location to your player.]; docargument [V] [Note: This is turned on by default.] [min 0/max 1/default 1]; -docident [survival] [Prepares a round of bot survival mode on the specified map.]; -docargument [M] [the map to use] [] [0]; -docargument [D] [optional: the difficulty] [0 = easy, 1 = intermediate, 2 = hard, 3 = impossible] [0]; -docremark [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.]; -docident [inWater] [Determines if the local player is standing in water or submerged.]; -docargument [T] [check if submerged instead?] [min 0/max 1/default 0] [0]; -docexample [if (inWater) [echo in water] [echo not in water]] [Example output: in water]; -docexample [if (inWater 1) [echo submerged] [echo not submerged]] [Example output: not submerged]; -docident [setbottimeout] [set the length of matches against bots]; -docargument [M] [mode] [1 or 2] [0]; -docargument [T] [time (in minutes)] [1-60] [0]; -docremark [The first argument "M" needs to be 1 for setting the FFA-timeout or 2 for the Team-Mode-timeout.]; -docident [isclient] [Determines if the client number given is a valid client "(player)".]; -docargument [C] [client number] [] [0]; -docexample [echo (isclient 0)] [Example output: 1]; -docexample [echo (isclient 32)] [Example output: 0]; docsection [Editing] docident [addpath1way1] []; docident [addpath1way2] []; @@ -772,6 +838,7 @@ docargument [V] [vertex value] [integer] [0]; docargument [D] [delta value] [integer] [0]; docremark [See config/prefabs.cfg for an example on usage.]; docident [autowp] []; +docident [checkmapdependencies] [Find what media the map depends on, this is used for mediapack providers.]; docident [clearents] [Deletes all entities of said type.]; docargument [T] [the entity type, see command 'newent'] [string] [0]; docident [closestenttype] [Restrict 'closest entity' display to one entity type.]; @@ -779,10 +846,14 @@ docargument [A] [entity type] [] [0]; docident [copy] [Copies the current selection into a buffer.]; docremark [hotkey c]; docident [copyent] [Copies the current closest entity into a buffer.]; +docremark [Only works while in edit mode.]; docident [corner] [Makes the current selection into a "corner".]; docremark [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).]; docremark [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.]; dockey [K] [] []; +docident [countwalls] [Returns the number of solid walls contained into the current selection.]; +docargument [T] [the integer of type of the walls you want to count] [ 0 (solid), 1 (corner), 2 (floor heightfield), 3 (ceil heightfield), 4 (empty cube), 5 (semi solid)] [0]; +docexample [echo (concat "The selection contains " (countwalls 0) "solid wall(s)")] [Output: The selection contains 3 solid wall(s)]; docident [delent] [Deletes the entity closest to the player]; docremark [hotkey x]; docident [delpath1way1] []; @@ -810,7 +881,7 @@ docremark [In map edit mode you can select bits of the map by clicking or draggi docremark [Hotkey E]; docident [entproperty] [Changes property of the closest entity.]; docargument [P] [the property to change] [0..3] [0]; -docargument [A] [amount by which the property is increased] [integer] [0]; +docargument [A] [amount by wich the property is increased] [integer] [0]; docremark [For example 'entproperty 0 2' when executed near a lightsource would increase its radius by 2.]; docident [entset] [Edits the closest entity.]; docargument [type] [the entity type] [light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet] [0]; @@ -825,6 +896,8 @@ docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)] [0]; docremark [default keys , and .]; docident [flrceil] [A variable indicating if the player looks at the floor or at the ceiling.]; docargument [B] [flrceil] [0 (floor), 2 (ceiling) read-only]; +docident [flyspeed] [Determines by how much to multiply the fly speeds by.]; +docargument [N] [the multiplier] [min 1.0/max 5.0/default 2.0]; docident [fullbright] [Sets all light values to fullbright.]; docargument [B] [sets fullbright on or off] [0 (off), 1 (on)] [0]; docremark [Will be reset when you issue a 'recalc'. Only works in edit mode.]; @@ -846,6 +919,8 @@ docargument [A] [42] [] [0]; docremark [The output will be written to the file 'mapdependencies.txt'.]; docident [Map editing] [A variable indicating if the game is in editmode.]; docargument [B] [editmode] [1 (true), 0 (false) read-only]; +docident [mapbackupsonsave] [Determines if map backups (.bak) should be created when a map is saved.]; +docargument [N] [0 off, 1 on] [min 0/max 1/default 1]; docident [mapenlarge] [Enlarges the current map.]; docremark [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.]; docident [mapmsg] [Sets the map message, which will be displayed when the map loads.]; @@ -920,10 +995,18 @@ docident [nextclosestent] [Choose another 'closest ent'.]; docremark [Use this, when two entities are placed in exactly the same location.]; docident [nextplayerstart] [Visit next player spawn entity.]; docargument [TYPE] [0|1|100] [] [0]; +docident [old_editbinds] [Enables or disables the old editing binds.]; +docremark [If disabled, an updated editing binds system is used, see the comments in "/config/resetbinds.cfg" for more info.]; +docexample [old_editbinds = 0] [disables the old editing binds]; +docexample [old_editbinds = 1] [enables the old editing binds]; +docident [oldselstyle] [Enables or disables using triangles to render the editing grid/current selection instead of squares.]; +docargument [N] [0 off, 1 on] [min 0/max 1/default 1]; +docident [onNewMap] [If this alias exists, it will be automatically executed when you start a new map.]; docident [paste] [Pastes a previously copied selection.]; docremark [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.]; docremark [hotkey v]; docident [pasteent] [Pastes a previously copied entity.]; +docremark [Only works while in edit mode.]; docident [perlin] [Generates a perlin noise landscape in the current selection.]; docargument [S] [the scale, frequency of the features] [default is 10] [0]; docargument [E] [the random seed] [integer] [0]; @@ -941,8 +1024,6 @@ docident [savemap] [Saves the current map.]; docargument [M] [file name of the map, see command 'map' for the naming scheme] [string] [0]; docremark [savemap 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.]; docremark [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.]; -docident [mapbackupsonsave] [Determines if map backups (.bak) should be created when a map is saved.]; -docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0]; docident [scalelights] [Scales all lights in the map.]; docargument [S] [size change (percentage)] [] [0]; docargument [I] [intensity change (percentage)] [] [0]; @@ -968,6 +1049,9 @@ docargument [N] [y] [min 0/max 4096/default 0]; docident [selys] [Current selection: y-span]; docargument [N] [ys] [min 0/max 4096/default 0]; docident [setjumpwp] []; +docident [settex] [Set a texture for the current selection.]; +docargument [T] [position of the texture to set in map cfg] [integer] [0]; +docargument [t] [the type of the texture] [0 (floor), 1 (wall), 2 (ceil), 3 (upper wall)] [0]; docident [setwpyaw] [takes the current player yaw for the current waypoint]; docident [showmip] [Toggles between showing what parts of the scenery are rendered.]; docremark [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.]; @@ -1012,24 +1096,6 @@ docident [wpload] []; docident [wpsave] []; docident [wpvisible] []; docargument [V] [visible] [0||1] [0]; -docident [checkmapdependencies] [Find what media the map depends on, this is used for mediapack providers.]; -docident [gencl] [Randomly generates a valid colored light.]; -docargument [R] [optional argument to set the radius of the new light] [] [0]; -docremark [You must be in edit-mode for this command to function. If no arguments are given, if the closest entity is a light, this command will randomize the last 3 attributes of the entity to randomize the color, as well as use the existing radius for the new colored light.]; -docexample [gencl 12] [Example output: Trying colored light: 12 130 243 214]; -docident [genhex] [Randomly generates a valid hexadecimal color value.]; -docexample [fogcolour (genhex)] [Example output: Trying hexadecimal color: 0x2FCAF1]; -docident [genwc] [Randomly generates a valid watercolour value.]; -docremark [You must be in edit-mode for this command to function.]; -docexample [genwc] [Example output: Trying water color: 2 17 29]; -docident [old_editbinds] [Enables or disables the old editing binds.]; -docexample [old_editbinds = 0] [disables the old editing binds]; -docexample [old_editbinds = 1] [enables the old editing binds]; -docremark [If disabled, an updated editing binds system is used, see the comments in "/config/resetbinds.cfg" for more info.]; -docident [flyspeed] [Determines by how much to multiply the fly speeds by.]; -docargument [N] [the multiplicand] [min 1.0/max 5.0/default 2.0] [0]; -docident [oldselstyle] [Enables or disables using triangles to render the editing grid/current selection instead of squares.]; -docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0]; docsection [Menus] docident [chmenumdl] [Changes the menu model of a specified menu.]; docargument [N] [the name of the menu] [] [0]; @@ -1040,6 +1106,8 @@ docargument [S] [the scale] [] [0]; docident [closemenu] [Closes the specified menu if it is open.]; docargument [N] [the name of a previously defined menu] [] [0]; docremark [If it is open multiple times in the stack only the topmost instance will be closed!]; +docident [delmenu] [Deletes the entire contents (all menu items) of the given menu.]; +docargument [N] [the name of a previously defined menu] [] [0]; docident [menuinit] [Specifies commands to be executed when a menu opens.]; docargument [C] [The code to execute on init] [] [0]; docremark [This command should be placed after newmenu.]; @@ -1080,8 +1148,6 @@ docremark [All menu commands placed after newmenu (i.e. menuitem, menuitemcheckb docident [showmenu] [Displays the specified menu.]; docargument [N] [the name of a previously defined menu] [] [0]; docremark [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.]; -docident [delmenu] [Deletes the entire contents "(all menu items)" of the given menu.]; -docargument [N] [the name of a previously defined menu] [] [0]; docsection [Heads-Up Display] docident [aboveheadiconfadetime] [Time in milliseconds before the abovehead icon dissapears.]; docargument [V] [abovehead icon display time] [min 1/max 10000/default 2000]; @@ -1091,9 +1157,20 @@ docident [clearminimap] [Recreates the minimap for the current map.]; docident [clockdisplay] [Sets the display mode for the HUD clock.]; docargument [D] [display mode] [min 0/max 2/default 0]; docremark [The clock shows game-time, it is either off (0) or counts backward (1) or forward (2).]; -docident [confade] [Sets how many seconds before the console text rolls up.]; -docargument [V] [time before text rollout] [min 0/max 60/default 20]; -docremark [It may also be viewed as the speed at which the console text dissapears.]; +docident [cncolumncolor] [colour of CN column in scoreboard]; +docargument [] [] [0 (green)] [0]; +docargument [] [] [1 (blue)] [0]; +docargument [] [] [2 (yellow)] [0]; +docargument [] [] [3 (red)] [0]; +docargument [] [] [4 (gray)] [0]; +docargument [] [] [5 (white, default)] [0]; +docargument [] [] [6 (dark brown)] [0]; +docargument [] [] [7 (dark red)] [0]; +docargument [] [] [8 (purple)] [0]; +docargument [] [] [9 (orange)] [0]; +docargument [N] [color] [min 0/max 9/default 5]; +docident [confade] [Sets how many seconds before the console text rolls (disappears) up the screen.]; +docargument [V] [time before the text rolls up] [min 0/max 60/default 20]; docident [consize] [Sets how many lines of text the console displays.]; docargument [V] [] [min 0/max 100/default 6]; docident [conskip] [Allows to browse through the console history by offsetting the console output.]; @@ -1116,6 +1193,8 @@ docident [damageindicatorsize] [Sets the size of the damage indicator.]; docargument [V] [damage indicator icon size] [min 0/max 10000/default 200]; docident [damageindicatortime] [Sets how long the damage indicator stays on screen.]; docargument [V] [damage indicator display time] [min 1/max 10000/default 1000]; +docident [disablehud] [Stores your current HUD configuration in a buffer and disables it entirely.]; +docident [enablehud] [Restores your HUD configuration after using disablehud.]; docident [fullconsize] [Sets the number of text lines on the F11 history display.]; docargument [V] [] [min 0/max 100/default 40]; docident [hidebigmenuimages] [Hide big images in menus.]; @@ -1132,9 +1211,6 @@ docident [hidehudequipment] [Turns on or off the display of equipement icons.]; docargument [V] [enable/disable equipement icons] [min 0/max 1/default 0]; docident [hidehudmsgs] [Turns on or off the display of messages at the bottom of the screen.]; docargument [V] [enable/disable messages] [min 0/max 1/default 0]; -docident [hudextras] [Shows extra gameplay messages on certain events if connected to a server.]; -docargument [N] [0..3] [min 0/max 3/default 0]; -docremark [0 (off), 1 (show extra messages in the console), 2 (show extra messages in the console and on the HUD), 3 (SPAM extra messages in the console and on the HUD)]; docident [hideradar] [Turns on or off the display of the on-screen radar.]; docargument [V] [enable/disable radar] [min 0/max 1/default 0]; docident [hidespecthud] [Turns on or off the display of spectator staus.]; @@ -1146,6 +1222,12 @@ docargument [V] [enable/disable vote info] [min 0/max 2/default 0]; docident [history] [Executes the specified command in the command line history.]; docargument [N] [the N'th command from the history] [] [0]; docremark [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.)]; +docident [hudextras] [Shows extra gameplay messages on certain events if connected to a server.]; +docargument [] [] [0 (off)] [0]; +docargument [] [] [1 (show extra messages in the console)] [0]; +docargument [] [] [2 (show extra messages in the console and on the HUD)] [0]; +docargument [] [] [3 (SPAM extra messages in the console and on the HUD)] [0]; +docargument [N] [enable/disable extra gameplay messages] [min 0/max 3/default 0]; docident [hudgun] [Turns on or off the display of the current selected gun.]; docargument [V] [show/hide guns 3D models] [min 0/max 1/default 1]; docident [maxcon] [Sets the total number of text lines from the console to store as history.]; @@ -1159,10 +1241,14 @@ docident [minimapres] [Sets the resolution for the minimap.]; docargument [N] [the resolution] [min 7/max 10/default 9]; docident [nosway] []; docargument [V] [] [min 0/max 1/default 0]; -docident [oldfashionedgunstats] [Show ammo stats like in 1.0]; +docident [oldfashionedgunstats] [Shows ammo statistics like version 1.0]; docargument [N] [0: new, 1: old] [min 0/max 1/default 0]; +docident [orderscorecolumns] [Show the client number column on the scoreboard first?]; +docargument [N] [cn column order] [0 (false), 1 (true) min 0/max 1/default 0]; docident [radarentsize] [Sets the icon size of the players shown in the radar and the minimap.]; docargument [V] [size of icons inside radar] [min 1/max 64/default 4]; +docident [radarheight] [change at what height you are floating in the radar-view]; +docargument [H] [height] [min 20/max 70/default 35]; docident [recoilbackfade] []; docargument [V] [] [min 0/max 1000/default 100]; docident [recoilbase] []; @@ -1171,10 +1257,14 @@ docident [recoilincrease] []; docargument [V] [] [min 1/max 10/default 2]; docident [recoiltest] [.]; docargument [V] [] [min 0/max 1/default 0]; -docident [righthanded] [Choose player hand to carry the weapon.]; +docident [righthanded] [Choose whether the players hand carrying the weapon appears as right or left handed.]; docargument [N] [0: lefty, 1: righty] [min 0/max 1/default 1]; docident [showstats] [Turns on/off display of FPS/rendering statistics on the HUD.]; docargument [N] [0: Show no stats, 1: Only show FPS stats, 2: Show all stats] [min 0/max 2/default 1]; +docident [showtargetname] [enables or disables showing the player name on the HUD when in your crosshair.]; +docargument [N] [0 off, 1 on] [min 0/max 1/default 1]; +docident [spechudgun] [Turns on/off the display of the hudgun while spectating a player in first-person view. Works in demo mode as well.]; +docargument [V] [show/hide hudgun when spectating] [min 0/max 1/default 1]; docident [swaymovediv] []; docargument [V] [] [min 1/max 1000/default 200]; docident [swayspeeddiv] []; @@ -1183,14 +1273,6 @@ docident [swayupmovediv] []; docargument [V] [] [min 1/max 1000/default 200]; docident [swayupspeeddiv] []; docargument [V] [] [min 1/max 1000/default 105]; -docident [cncolumncolor] [colour of CN column in scoreboard]; -docargument [N] [0..9] [min 0/max 9/default 5]; -docident [radarheight] [change at what height you are floating in the radar-view]; -docargument [H] [height] [min 20/max 70/default 35]; -docident [showtargetname] [enables or disables showing the player name on the HUD when in your crosshair.]; -docargument [N] [0 off, 1 on] [min 0/max 1/default 1] [0]; -docident [disablehud] [Stores your current HUD configuration in a buffer and disables it entirely.]; -docident [enablehud] [Restores your HUD configuration after using disablehud.]; docsection [Visuals] docident [aadynshadow] [Sets the size/resolution of the dynamic shadow data.]; docargument [] [the size] [min 0/max 3/default 2]; @@ -1212,6 +1294,14 @@ docident [bulletholettl] [Specifies how long (in milliseconds) to display bullet docargument [V] [Bullethole display time] [min 0/max 30000/default 10000]; docident [colorbits] [Sets the bits per pixel value.]; docargument [] [bits per pixel] [min 0/max 32/default 0]; +docident [damagescreen] [show the blood-spat overlay when receiving damage?]; +docargument [N] [damagescreen] [0 (false), 1 (true) min 0/max 1/default 1]; +docident [damagescreenalpha] [if overlay of blood-spat, at what blending (transparency) level?]; +docargument [N] [damagescreen transparency] [min 1/max 100/default 45]; +docident [damagescreenfactor] [if overlay of blood-spat, use which factor?]; +docargument [N] [damagescreen factor] [min 1/max 100/default 7]; +docident [damagescreenfade] [if overlay of blood-spat, at what speed does it fade?]; +docargument [N] [damagescreen fade] [min 0/max 1000/default 125]; docident [dbgmbatch] []; docargument [V] [] [min 0/max 1/default 0]; docident [dbgpos] [Displays local player's current x,y,z position in map, showstats 1 must be enabled.]; @@ -1226,6 +1316,9 @@ docident [depthbits] [Sets the bits for the depth buffer.]; docargument [] [depth pixels] [min 0/max 32/default 0]; docident [depthoffset] []; docargument [V] [] [min /max /default 0.005f]; +docident [dyngamma] [Enables or disables the per official map dynamic gamma system.]; +docexample [dyngamma = 0] [Output: disables the system]; +docexample [dyngamma = 1] [Output: enables the system]; docident [dynlight] [Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.]; docargument [R] [the radius of a dynamic light] [min 0/max 32/default 16]; docremark [With radius you can specify the radius of a dynamic light, smaller to maybe gain some speed (0 is off entirely), or bigger to see the effect of dynamic shadows more dramatically (try shooting it past some pillars that have a dark area on the other side... or use the "gamespeed" variable).]; @@ -1237,10 +1330,20 @@ docident [dynshadowquad] []; docargument [V] [] [min 0/max 1/default 0]; docident [dynshadowsize] [Sets the display size of the dynamic shadows.]; docargument [] [the size] [min 4/max 8/default 5]; -docident [font] [Loads an image to be used as a text font.]; -docargument [A] [Check font.cfg for examples of use] [value] [0]; -docident [fontchar] [Especify a region of an image to be used as a font character.]; -docargument [A] [Check font.cfg for examples of use] [value] [0]; +docident [font] [Loads a font texture to use as text within AssaultCube.]; +docargument [NAME] [The font name.] [] [0]; +docargument [PATH] [The path to the font texture.] [] [0]; +docargument [A] [The default width.] [] [0]; +docargument [B] [The default height.] [] [0]; +docargument [C] [Offset (co-ordinate X).] [] [0]; +docargument [D] [Offset (co-ordinate Y).] [] [0]; +docargument [E] [Offset (width).] [] [0]; +docargument [F] [Offset (height).] [] [0]; +docident [fontchar] [Specify a region of an image to be used as a font character]; +docargument [A] [X co-ordinates (from top-left corner).] [] [0]; +docargument [B] [Y co-ordinates (from top-left corner).] [] [0]; +docargument [C] [Width.] [] [0]; +docargument [D] [Height.] [] [0]; docident [fov] [Sets the field of view (fov).]; docargument [N] [the FOV value] [min 75/max 120/default 90]; docident [fovcompat] [Sets the field of view (fov) based on the rules of AC v0.93]; @@ -1249,14 +1352,11 @@ docremark [This command is supplied for backward compatibility.]; docident [fpsrange] [(descripton unavailable)]; docargument [A] [min] [] [0]; docargument [B] [max] [] [0]; -docident [fragmessage] [Sets the frag message corresponding to a weapon (appearing on the hud or in server logs)]; -docargument [G] [gun] []; -docargument [M] [msg] []; -docremark [This command can be read by both client and server]; -docident [gibmessage] [Sets the gib message corresponding to a weapon (appearing on the hud or in server logs)]; -docargument [G] [gun] []; -docargument [M] [msg] []; -docremark [This command can be read by both client and server]; +docident [fragmessage] [set the frag message corresponding to a weapon (appearing on the hud or in server logs)]; +docargument [G] [the integer of the gun] [ 0 = knife, etc.] [0]; +docargument [M] [the message you want to appear] [ex : sniped] [0]; +docremark [This command can be read by both client and server, but the server can't read the cfg if it contains anything else than fragmessage or gibmessage calls.]; +docexample [fragmessage 5 sniped // set "sniped" message for frags with sniper.] [It will display "you sniped unarmed" on the hud when you frag unarmed with sniper. In server logs you will get "[127.0.0.1] killer sniped unarmed".]; docident [fsaa] [Sets the level of fullscreen antialiasing (FSAA).]; docargument [] [fsaa] [min 0/max 16/default 0]; docident [fullbrightlevel] [Sets the level of brightness to use when using the command "/fullbright 1".]; @@ -1267,14 +1367,10 @@ docremark [Not supported on Windows and Mac.]; docident [gamma] [Sets the hardware gamma value.]; docargument [N] [the gamma value] [min 30/max 300/default 100]; docremark [May not work if your card/driver doesn't support it.]; -docident [dyngamma] [Enables or disables the per official map dynamic gamma system.]; -docexample [dyngamma = 0] [disables the system]; -docexample [dyngamma = 1] [enables the system]; -docident [setgamma] [Sets the current map's default dynamic gamma.]; -docargument [G] [the gamma value] [min 30/max 300/default 100] [0]; -docremark [The setting will take affect automatically if dyngamma is enabled, upon future loads of that map. This command only works on official maps!]; docident [gib] [Enables or disables the gib animation entirely.]; -docargument [B] [off OR on] [0 (false), 1 (true)]; +docargument [B] [off OR on] [0 (false), 1 (true) min 0/max 1/default 1]; +docident [gibmessage] [set the gib message corresponding to a weapon (appearing on the hud or in server logs)]; +docremark [This command is identical to fragmessage (above)]; docident [gibnum] [Sets the number of gibs to display when performing a "messy" kill (grenade, knife, sniper headshot).]; docargument [N] [number of gibs] [min 0/max 1000/default 6]; docremark [Larger values are more spectacular, but can slow down less powerful machines. Reducing gibttl may help in this case.]; @@ -1292,11 +1388,15 @@ docargument [N] [time to live] [min 0/max 15000/default 5000]; docident [glext] [checks for the searchstring in all loaded extensions]; docargument [E] [extension] [] [0]; docexample [if (glext shadow_funcs) [echo you have shadow functionality] [echo no shadows for you]] []; +docident [heartbeat] [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.]; +docargument [H] [health value] [min 0/max 99/default 0]; docident [hwtexsize] []; docargument [V] [] [min 1/max 0/default 0]; docident [lighterror] [Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels.]; docargument [E] [the error value, 1 being the best quality] [ read-only]; docremark [If this variable is changed this during play, a "recalc" is needed to see the effect.]; +docident [maploaditemlength] [change at what position to truncate the map title string]; +docargument [N] [chars] [min 0/max 255/default 46]; docident [maxtexsize] []; docargument [V] [] [min 0/max 4096/default 0]; docident [mergestrips] []; @@ -1311,6 +1411,8 @@ docident [polygonoffsetfactor] []; docargument [V] [] [min /max /default -3.0f]; docident [polygonoffsetunits] []; docargument [V] [] [min /max /default -3.0f]; +docident [popdeadplayers] [make dead players instantly pop out of existence, instead of falling over and sinking into the ground.]; +docargument [B] [BOOL] [min 0/max 1/default 0]; docident [reflectclip] []; docargument [V] [] [min 0/max 100/default 3]; docident [reflectscissor] []; @@ -1324,15 +1426,20 @@ docident [scorch] []; docargument [V] [] [min 0/max 1/default 1]; docident [scorchttl] []; docargument [V] [] [min 0/max 30000/default 10000]; -docident [screenres] [Changes the screen resolution, available only for LINUX]; -docargument [W] [width] [] [0]; -docargument [H] [height] [] [0]; docident [scr_h] [Sets the screen height.]; docargument [] [the screen height] [min 0/max 768/default 10000]; docident [scr_w] [Sets the screen width.]; docargument [] [the screen width] [min 0/max 1024/default 10000]; +docident [screenres] [Changes the screen resolution, available only for LINUX]; +docargument [W] [width] [] [0]; +docargument [H] [height] [] [0]; docident [setfont] [Changes the current font.]; docargument [N] [Font name] [name of the font] [0]; +docident [setgamma] [Sets the current map's default dynamic gamma.]; +docargument [G] [the gamma value] [] [0]; +docremark [The setting will take affect automatically if dyngamma is enabled, upon future loads of that map. This command only works on official maps!]; +docremark [Rather than manually loading each official map and setting it's default gamma with this command, the entire list can be initialized via your autoexec.cfg like so:]; +docexample [ofc_gamma_list = [175 225 150 120 ...]] [Sets your custom gamma values for the per official map dynamic gamma system. If you are going to use this method, you MUST include values for every existing official map. The list must be alphabetical and be the exact length of the number of currrent official maps. Hint: use "echo $defaultmaps" and "echo (listlen $defaultmaps)".]; docident [shadowcasters] []; docargument [V] [] [min 1/max 0/default 0]; docident [shadowclip] []; @@ -1366,18 +1473,6 @@ docargument [V] [enable/disable water refractions] [min 0/max 1/default 0]; docident [watersubdiv] [Determines the subdivision of the water surface in maps.]; docargument [N] [the subdivisioin value] [min 1/max 64/default 4]; docremark [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.]; -docident [damagescreen] [show the blood-spat overlay when receiving damage?]; -docargument [N] [0 (false), 1 (true)] [min 0/max 1/default 1]; -docident [damagescreenalpha] [if overlay of blood-spat, at what blending (transparency) level?]; -docargument [N] [1..100] [min 1/max 100/default 45]; -docident [damagescreenfactor] [if overlay of blood-spat, use which factor?]; -docargument [N] [1..100] [min 1/max 100/default 7]; -docident [damagescreenfade] [if overlay of blood-spat, at what speed does it fade?]; -docargument [N] [0..1000] [min 0/max 1000/default 125]; -docident [popdeadplayers] [make dead players instantly pop out of existence, instead of falling over and sinking into the ground.]; -docargument [N] [pop dead players] [min 0/max 1/default 0]; -docident [maploaditemlength] [change at what position to truncate the map title string]; -docargument [N] [chars] [min 0/max 255/default 46]; docsection [Sound] docident [al_referencedistance] [The distance from the source emitting the sound to the listener.]; docargument [V] [] [min 0/max 1000000/default 400]; @@ -1422,6 +1517,9 @@ docremark [See config/sounds.cfg for default sounds, and use registersound to re docident [soundchannels] [Sets the desired amount of allocated sound channels.]; docargument [] [number of channels] [min 4/max 1024/default 32]; docremark [AC will try to allocate that number of channels but it is not guaranteed to succeed.]; +docident [soundmuted] [Returns 1 if sound A is muted, else 0.]; +docargument [A] [sound ID] [See /config/sounds.cfg for valid sound ID's.] [0]; +docexample [mutesound 5; if (soundmuted 5) [echo Sound 5 is muted!] [echo Sound 5 is not muted!]] [Output: Sound 5 is muted!]; docident [soundscheddistancescore] []; docargument [V] [] [min 0/max 1000/default 5]; docident [soundschedoldbonus] []; @@ -1496,9 +1594,9 @@ docargument [B] [Second argument] [] [0]; docremark [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.]; docident [deleteservermap] [Deletes a map from the current server.]; docargument [A] [map name] [] [0]; +docident [forceme] [Calls a vote to forceteam yourself to the enemy team.]; docident [forceteam] [Forces the specified player to join the enemy team.]; docargument [CN] [The player to assign to a team] [Client number] [0]; -docident [forceme] [Calls a vote to forceteam yourself to the enemy team.]; docident [giveadmin] [Gives admin state to the specified player.]; docargument [CN] [The player to become admin] [Client number] [0]; docremark [Requires admin state. The admin will lose his admin state after successfully issuing this command.]; @@ -1584,7 +1682,22 @@ docident [lss] [Starts a map with the mode "Last Swiss Standing"]; docargument [M] [The name of the map you wish to play] [] [1]; docexample [lss ac_complex] []; docident [mode] [Sets the gameplay mode to N for the next map loaded.]; -docargument [N] [The mode number] [0..15] [0]; +docargument [N] [Team Deathmatch] [0] [0]; +docargument [] [Co-op edit] [1] [0]; +docargument [] [Deathmatch] [2] [0]; +docargument [] [Survivor] [3] [0]; +docargument [] [Team survivor] [4] [0]; +docargument [] [Capture the Flag] [5] [0]; +docargument [] [Pistol frenzy] [6] [0]; +docargument [] [Bot team deathmatch] [7] [0]; +docargument [] [Bot deathmatch] [8] [0]; +docargument [] [Last swiss standing] [9] [0]; +docargument [] [One shot, One kill] [10] [0]; +docargument [] [Team One shot, One kill] [11] [0]; +docargument [] [Bot One shot, One kill] [12] [0]; +docargument [] [Hunt the Flag] [13] [0]; +docargument [] [Team keep the flag] [14] [0]; +docargument [] [Keep the flag] [15] [0]; docremark [You will need to define mode before loading the map or it will stay as the last mode played.]; docremark [There are many aliases for you to use instead of remembering the numeric mapping.]; docexample [mode 7;map ac_complex;echo "Bot Team Deathmatch on ac_complex"] []; @@ -1596,6 +1709,10 @@ docexample [osok ac_complex] []; docident [pf] [Starts a map with the mode "Pistol Frenzy"]; docargument [M] [The name of the map you wish to play] [] [1]; docexample [pf ac_complex] []; +docident [setbottimeout] [set the length of matches against bots]; +docargument [M] [mode] [1||2] [0]; +docargument [T] [time] [1..60] [0]; +docremark [The first argument "M" needs to be 1 for setting the FFA-timeout or 2 for the Team-Mode-timeout.]; docident [tdm] [Starts a map with the mode "Team Deathmatch"]; docargument [M] [The name of the map you wish to play] [] [1]; docexample [tdm ac_complex] []; @@ -1708,9 +1825,10 @@ docargument [D] [The angle in degrees to rotate the stencil shadows] [0...360, d docremark [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).]; docexample [shadowyaw 90] []; docident [texture] [Binds a texture to the current texture slot.]; -docargument [0] [This is a redundant value. Always leave this value as 0 here so it doesn'tbreak your configurations.] [0] [0]; +docargument [S] [Scale of the texture to load (should be a power of two).] [Float] [0]; docargument [F] [File name of the texture to bind] [String] [0]; docremark [Binds the texture indicated in the filename to the current texture slot and increments the slot number.]; +docremark [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.]; docident [texturereset] [Sets the texture slots/indicies to 0 for the subsequent "texture" commands.]; docremark [Each subsequent texture command increases it again. See config/default_map_settings.cfg for an example.]; docident [watercolour] [Determines the water colour in a map.]; @@ -1723,16 +1841,37 @@ docident [addzip] [TODO: Description]; docargument [A] [TODO] [] [0]; docargument [B] [TODO] [] [0]; docargument [C] [TODO] [] [0]; +docident [allowblinkingtext] [for toggling on the ability for any text to have the blinking bit set.]; +docargument [T] [TOGGLE] [] [0]; docident [ambient] [TODO]; docargument [N] [TODO] [min 0/max 16777215/default 0]; docident [applydialog] [do you really want to quit?]; docargument [N] [TODO] [min 0/max 1/default 1]; docident [autoscopesens] [TODO]; docargument [N] [TODO] [min 0/max 1/default 0]; +docident [cleardemos] [Clears all demos currently in memory on the server.]; +docident [demonameformat] [set the formatstring for demo filenames - default: TODO (when stable)]; +docargument [S] [STRING] [] [0]; +docremark [we use the following internal mapping of formatchars:]; +docremark [%g : gamemode (int) %G : gamemode (chr) %F : gamemode (full)]; +docremark [%m : minutes remaining %M : minutes played]; +docremark [%s : seconds remaining %S : seconds played]; +docremark [%h : IP of server %H : hostname of server (%N : title of server (really???))]; +docremark [%n : mapName]; +docremark [%w : timestamp "when"]; +docident [demotimeformat] [set the formatstring for demo timestamp - default: TODO (when stable)]; +docargument [S] [STRING] [] [0]; +docremark [same as strftime() - see http://www.cplusplus.com/reference/clibrary/ctime/strftime/ for details]; +docident [demotimelocal] [use localtime (1) or GMT (0)?]; +docargument [B] [BOOL] [min 0/max 1/default 0]; docident [fontskip] [At what char does the definition proceed?]; docargument [A] [TODO] [] [0]; +docident [getdemonameformat] [returns the currently used formatstring for demo filenames]; +docident [getdemotimeformat] [returns the currently used formatstring for demo timestamp]; docident [gettext] [An alias used for i18n. Translateable text should be marked [(_ "this is the EN-us variant of the text")].]; docargument [M] [I18Nmessage] [] [0]; +docident [hirestextures] [controls whether textures with a scale higher than 1.0 will be scaled down while loading to increase performance (0) or stay at higher resolution (1).]; +docargument [N] [TODO] [min 0/max 1/default 1]; docident [interms] [TODO]; docargument [N] [TODO] [min 0/max 1/default 0]; docident [mapdimsfactor] [TODO]; @@ -1741,6 +1880,8 @@ docident [maxrollremote] [TODO]; docargument [N] [TODO] [min 0/max 1/default 1]; docident [mdldlist] [TODO]; docargument [N] [TODO] [min 0/max 1/default 1]; +docident [menucanblink] [for toggling on the ability for menutext to have the blinking bit set. The global setting of 'allowblinkingtext' overrides this]; +docargument [T] [0 || !=0] [] [0]; docident [menufont] [switch the font in which the menu is displayed]; docargument [F] [FONT] [] [0]; docident [menuitemmapload] [a menuitem that loads a map, displays the title and the preview or a default image]; @@ -1748,12 +1889,10 @@ docargument [M] [MAP] [] [0]; docargument [T] [TEXT] [] [0]; docident [mfilter] [TODO]; docargument [N] [TODO] [min 0,0/max 6,0/default 0,0]; -docident [mouseaccel] []; +docident [mouseaccel] [TODO]; docargument [N] [TODO] [min 0,0/max 1000,0/default 0,0]; docident [musicpreload] [TODO: Description]; docargument [A] [TODO] [] [0]; -docident [orderscorecolumns] [Show the client number column on the scoreboard first?]; -docargument [N] [0 (false), 1 (true)] [min 0/max 1/default 0]; docident [quicknadethrow] [TODO: Description]; docident [removezip] [TODO: Description]; docargument [A] [TODO] [] [0]; @@ -1780,9 +1919,7 @@ docargument [A] [TODO] [] [0]; docident [showedithide] [shows the settings of edithide (sparklies)]; docident [showmapbackdroptransparency] []; docargument [T] [transparency] [min 0/max 100/default 75]; -docident [soundmuted] [Returns 1 if sound A is muted, else 0.]; -docargument [A] [sound ID] [See /config/sounds.cfg for valid sound ID's.] [0]; -docexample [mutesound 5; if (soundmuted 5) [echo Sound 5 is muted!] [echo Sound 5 is not muted!]] [Output: Sound 5 is muted!]; +docident [shuffleteam] [Shuffles the teams]; docident [testvel] [TODO]; docargument [N] [TODO] [min 0/max 1/default 0]; docident [texreduce] [-1: 2x2 : 0 : 1: x0.5 : 2: x0.25 : 3: x0.125];