From 78380dc45d670e31fd38b49d7662f33ea05b0cc3 Mon Sep 17 00:00:00 2001 From: ac-stef Date: Mon, 24 Apr 2017 15:52:58 +0200 Subject: [PATCH] fix docref * now restricted to command references * some parameter checks added docref adds a reference to another command to the current commands description docrefvisible 0|1 if set to 0, docrefs are not rendered (default 1) DOCREF docref docrefvisible --- config/docs.cfg | 1461 ++++++++++++++++++++++++++++++++++++++----- source/src/docs.cpp | 137 ++-- 2 files changed, 1354 insertions(+), 244 deletions(-) diff --git a/config/docs.cfg b/config/docs.cfg index 4bb34756..928d115c 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -14,6 +14,9 @@ docargument [B] [the second value] [] [0]; docident [!b] [Performs the operation NOT using binary arithmetic on integer values (32-bit signed).]; docargument [A] [argument] [] [0]; docremark [Integer values are 32-bit signed values, so for example "echo (!b 1)" returns "-2".]; +docref [&b]; +docref [|b]; +docref [^b]; docident [&&] [logical AND.]; docargument [A] [first value] [] [0]; docargument [B] [second value] [] [0]; @@ -21,7 +24,10 @@ docexample [echo (&& 1 1)] [Output: 1]; docexample [echo (&& 1 0)] [Output: 0]; docident [&b] [Performs the operation AND using binary arithmetic on integer values (32-bit signed).]; docargument [A] [the first argument] [] [0]; -docargument [A] [the second argument] [] [0]; +docargument [B] [the second argument] [] [0]; +docref [|b]; +docref [^b]; +docref [!b]; docident [*] [Performs a multiplication 2 or more numbers.]; docargument [A] [the multiplicand] [] [0]; docargument [B] [the multiplier(s)] [] [0]; @@ -43,9 +49,15 @@ docremark [Example: echo the sum of x and y is (+ $x $y)]; docident [++] [Increments an alias by 1.]; docargument [A] [the alias name] [] [0]; docexample [i = 0; ++ i; echo $i] [Output: 1]; +docref [--]; +docref [++f]; +docref [--f]; docident [++f] [Increments an alias by 1.]; docargument [A] [the alias name] [] [0]; docexample [i = 2.14; ++f i; echo $i] [Output: 3.14]; +docref [--f]; +docref [++]; +docref [--]; docident [+=] [Adds a value to an alias.]; docargument [A] [the alias to add to] [] [0]; docargument [B] [value to be added] [] [0]; @@ -63,9 +75,15 @@ docargument [B] [the subtrahend] [] [0]; docident [--] [Decrements an alias by 1.]; docargument [A] [the alias name] [] [0]; docexample [i = 0; -- i; echo $i] [Output: -1]; +docref [++]; +docref [--f]; +docref [++f]; docident [--f] [Decrements an alias by 1.]; docargument [A] [the alias name] [] [0]; docexample [i = 4.14; --f i; echo $i] [Output: 3.14]; +docref [++f]; +docref [--]; +docref [++]; docident [-=] [Subtracts a value from an alias.]; docargument [A] [the alias to subtract from] [] [0]; docargument [B] [value to be subtracted] [] [0]; @@ -110,13 +128,23 @@ docargument [A] [the first value] [] [0]; docargument [B] [the second value] [] [0]; docident [^b] [Performs the operation XOR using binary arithmetic on integer values (32-bit signed).]; docargument [A] [the first argument] [] [0]; -docargument [A] [the second argument] [] [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: addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.]; +docargument [B] [the second argument] [] [0]; +docref [&b]; +docref [|b]; +docref [!b]; +docident [add2alias] [This will append the passed 2nd argument to any existing content of the alias named in the 1st argument.]; +docargument [A] [the alias to add to] [] [0]; +docargument [E] [the new element to add] [] [0]; +docremark [Several popular aliases have predefined shortcuts using this scriptalias: addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.]; docexample [foo = "one" add2alias foo two echo foo] [Output: one two]; +docref [add2bind]; +docref [add2list]; 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!]; +docref [add2alias]; +docref [add2bind]; docident [addpunct] [Injects CubeScript punctuation.]; docargument [S] [a string] [] [0]; docargument [N] [ID or name] [0 (quotes), 1 (brackets), 2 (parenthesis), 3 (_$_), 4 (quote), 5 (percent)] [0]; @@ -133,32 +161,54 @@ docexample [test = [ echo "successful" ]] [There is also the shorthand version o docident [aliasinit] [Initializes a group of aliases using checkinit.]; docargument [L] [the list of aliases to check for] [] [0]; docargument [B] [the block of code to ensure the aliases contain] [] [0]; +docref [checkalias]; +docref [checkinit]; +docref [check2init]; +docref [check2initlist]; 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]; +docref [continue]; +docref [loop]; +docref [while]; docident [c] [Adds color to a string.]; docargument [N] [color id] [0-9, A-Z] [0]; docexample [echo (c 3)Hello (c 0)world!] [Output: a red "Hello" and a green "world!"]; +docref [cncolumncolor]; docident [ceil] [Upper value of a float number]; docargument [F] [The float number to get the ceil from] [] [0]; docident [check2init] [Defines an alias only if it does not already exist.]; docargument [A] [alias name] [] [0]; docargument [V] [alias value] [] [0]; +docref [check2initlist]; +docref [checkalias]; +docref [checkinit]; +docref [aliasinit]; docident [check2initlist] [Uses check2init on a list of aliases.]; docargument [L] [list of alias names] [] [0]; docargument [V] [alias value] [] [0]; +docref [checkalias]; +docref [checkinit]; +docref [aliasinit]; +docref [check2init]; 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]; +docref [checkinit]; +docref [aliasinit]; docident [checkinit] [Ensures the initialization of an alias.]; docargument [A] [the alias to check for] [] [0]; docargument [B] [the 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.]; +docref [checkalias]; +docref [aliasinit]; +docref [check2init]; +docref [check2initlist]; docident [concat] [Concatenates multiple strings with spaces inbetween.]; docargument [S] [the first string] [] [0]; docargument [...] [collection of strings to concatenate] [] [1]; @@ -178,6 +228,9 @@ docexample [const myalias myvalue;] [You can directly set a value for your alias 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]; +docref [break]; +docref [loop]; +docref [while]; docident [delalias] [deletes the passed alias.]; docargument [N] [the name of the alias] [string, must not contain '$'] [0]; docident [div] [Performs an integer division.]; @@ -198,8 +251,10 @@ docident [editsvar] [Interactively edits an alias in the console buffer.]; docargument [A] [Alias to edit] [The alias name, without $] [0]; docremark [This takes the current value of the alias, and inserts it into the command line / text entry box]; docexample [alias test "Hello World"; editsvar test] [Result: edit test: Hello World]; +docref [inputcommand]; docident [enumalias] [Lists all persistent aliases that start with prefix.]; docremark [Returns a table with two entries per alias: 1) full name and 2) name without prefix.]; +docref [alias]; docident [escape] [Replaces control characters in a string with escaped sequences.]; docargument [S] [string to escape] [] [0]; docexample [echo (escape (concat (c 3) "Hello World"] [Output: "\f3Hello World"]; @@ -222,10 +277,13 @@ 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] [Returns the value of the alias.]; docargument [N] [alias name] [] [0]; +docref [storesets]; +docref [getvarrange]; docident [getvarrange] [Gets range attribute for builtin variable.]; docargument [W] [what] [min, max, default] [0]; docargument [N] [the name of any builtin variable (integer or float)] [] [0]; -docident [h0] [Returns the given value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision).]; +docref [getalias]; +docident [h0] [Returns value as string of hexadecimal digits, padded with leading zeros to a given minimum length (precision).]; docargument [P] [precision] [] [0]; docargument [V] [value] [] [0]; docexample [echo (h0 2 1024)] [Output: 400]; @@ -236,6 +294,7 @@ docexample [echo (h0 0 (|b 0xe 0x3))] [Output: f]; docexample [echo (h0 0 (^b 0xe 0x3))] [Output: d]; docexample [echo (h0 0 (!b 0xe))] [Output: fffffff1]; docexample [echo (h0 0 (* -1 0xe))] [Output: fffffff2]; +docref [l0]; 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]; @@ -245,20 +304,27 @@ docident [inputcommand] [Makes an input perform a certain command.]; docargument [I] [input] [] [0]; docargument [C] [command] [] [0]; docargument [P] [prompt] [] [0]; +docref [complete]; +docref [listcomplete]; +docref [saycommand]; docident [isIdent] [Returns whether or not there is an identifier by that name.]; docargument [N] [identifier name] [] [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 [isolatecontext] [Isolates the given context. This disables access from this context to identifiers located in other contexts, also it removes all aliases created in this context once the running context changes]; +docref [const]; +docident [isolatecontext] [Isolates the given context.]; docargument [C] [the context] [] [0]; +docremark [This disables access from this context to identifiers located in other contexts, also it removes all aliases created in this context once the running context changes.]; +docref [sealcontexts]; docident [l0] [Leading zeros for the number V to make it W chars wide.]; docargument [W] [width] [] [0]; docargument [V] [value] [] [0]; docremark [It may look like 10 - which might be considered a mnemonic - but it's lowercase-L and 0!]; docexample [echo (l0 5 1000)] [Output: 01000]; docexample [echo (l0 3 1000)] [Output: 1000]; +docref [h0]; 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]; @@ -273,6 +339,10 @@ docargument [N] [the amount of loops] [] [0]; 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 ]] []; +docref [break]; +docref [continue]; +docref [while]; +docref [looplist]; docident [looplist] [Browses a list and executes a body for each element.]; docargument [V] [the list to browse] [] [0]; docargument [N] [the alias(es) containing the current element value] [] [0]; @@ -280,12 +350,20 @@ docargument [body] [the body to execute on each iteration] [] [0]; docremark [It works optionally with several variables.]; docexample [looplist "zero one two three" number [echo $number]] []; docexample [looplist [0 "is knife" 1 "is pistol"] [n w] [echo weapon $n $w]] []; +docref [break]; +docref [continue]; +docref [loop]; +docref [looplisti]; docident [looplisti] [Browses a list and executes a body for each element.]; docargument [V] [the list to browse] [] [0]; docargument [N] [the alias(es) containing the current element value] [] [0]; docargument [body] [the body to execute on each iteration] [] [0]; docremark [The same as looplist, but it automatically counts the loops in "i", starting with 0. It works optionally with several variables.]; docexample [a = [u v w]; b = [x y z]; looplisti $a m [echo $m (at $b $i) $i]] [Output: u x 0 , v y 1 , w z 2]; +docref [break]; +docref [continue]; +docref [loop]; +docref [looplist]; docident [mod] [Performs a modulo operation.]; docargument [A] [the dividend] [] [0]; docargument [B] [the divisor] [] [0]; @@ -304,6 +382,7 @@ docident [pop] [Resets a previously pushed alias to it's original value.]; docargument [A] [alias] [] [0]; docremark [It is allowed to use multiple arguments for "pop". So instead of "pop var_a ; pop var_b" you can write "pop var_a var_b". Also, "pop" will now give back the removed value of the first alias from the argument list. This allows using the pop'd value one last time.]; docexample [pop p; echo $p] [Output: 1]; +docref [push]; docident [powf] [Returns A raised to the power of B (floating-point)]; docargument [A] [the mantissa] [] [0]; docargument [B] [the exponent] [] [0]; @@ -311,11 +390,16 @@ 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]; +docref [pop]; docident [resetsleeps] [Resets all current "sleep".]; docident [result] [Sets the result value of a CubeScript block.]; docargument [R] [the result] [] [0]; +docref [execute]; +docref [return]; docident [return] [Sets the result value of a CubeScript block.]; docargument [R] [the result] [] [0]; +docref [execute]; +docref [result]; docident [rnd] [Random value]; docargument [A] [The upper limit of the random value] [] [0]; docident [round] [Round the given float]; @@ -336,13 +420,16 @@ docident [storesets] [Generates an alias (list) of the current values for the gi 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".]; +docref [getalias]; 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]; +docref [strstr]; docident [strlen] [Returns the length (in characters, including whitespace) of string S.]; docargument [S] [STRING] [] [0]; docexample [echo (strlen "Hello world!")] [Output: 12]; +docref [substr]; docident [strpos] [Returns the position of a substring into another.]; docargument [H] [haystack string] [] [0]; docargument [S] [needle string] [] [0]; @@ -356,10 +443,14 @@ 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]; +docref [strins]; +docref [strpos]; +docref [substr]; 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!]; +docref [strcmp]; docident [substr] [Copies a substring out of the original.]; docargument [S] [the original string] [] [0]; docargument [A] [start position] [] [0]; @@ -368,6 +459,10 @@ docremark [Character indexes begins at 0. If "start position" is negative, the r docexample [echo (substr abcdefgh 2 5) cdefg] []; docexample [echo (substr abcdefgh -3 2) fg] []; docexample [echo (substr abcdefgh 2) cdefgh] []; +docref [strlen]; +docref [strpos]; +docref [strreplace]; +docref [parsestring]; docident [swapelements] [Returns a modified list swapping the positions of 2 elements.]; docargument [L] [list] [] [0]; docargument [S] [positions of 2 elements in the list to swapping] [] [0]; @@ -380,6 +475,7 @@ docexample [switch 2 [echo case 0] [echo case 1] [echo case 2] [echo case 3] [ec docident [tempalias] [Creates a temporary alias that will not be written to saved.cfg, and thus will not persist after quitting.]; docargument [N] [temporary alias name] [] [0]; docargument [C] [Cubescript command(s)] [] [0]; +docref [alias]; 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]; @@ -396,17 +492,25 @@ docexample [echo (testchar " " 7)] [Output: 1 // It is a whitespace character]; docident [tolower] [Converts a string to all lowercase characters.]; docargument [S] [a string] [] [0]; docexample [echo (tolower HELLO)] [Output: hello]; +docref [toupper]; docident [toupper] [Converts a string to all uppercase characters.]; docargument [S] [a string] [] [0]; docexample [echo (toupper hello)] [Output: HELLO]; +docref [tolower]; docident [while] [Loops the specified body while the condition evaluates to true.]; docargument [cond] [the condition] [the code evaluated before each iteration] [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) ]] []; +docref [break]; +docref [continue]; +docref [loop]; docident [|b] [Performs the operation OR using binary arithmetic on integer values (32-bit signed).]; docargument [A] [the first argument] [] [0]; -docargument [A] [the second argument] [] [0]; +docargument [B] [the second argument] [] [0]; +docref [&b]; +docref [^b]; +docref [!b]; docident [||] [logical OR.]; docargument [A] [first value] [] [0]; docargument [B] [second value] [] [0]; @@ -420,14 +524,26 @@ docremark [Only add servers you trust.]; docremark [The list of servers is saved into config/pcksources.cfg on game quit.]; docremark [If a priority is given, it influences the sorting of servers. Servers with higher priority are queried first. If servers have the same priority, they are sorted by ping. Default priority is zero.]; docexample [addpckserver http://packages.ac-akimbo.net] []; +docref [resetpckservers]; +docref [autodownload]; +docref [getpckserver]; 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 [addzipmod] [Add the zip package file "mods/zipname.zip" to the virtual file system.]; docargument [N] [the name of the zip mod] [] [0]; docremark [Add the zip package file "mods/zipname.zip" to the virtual file system. Only files below the path "packages/" are added (and also files below "config/", if zipname starts with "###"). If the size of the zip file is below "zipcachemaxsize", the whole zip file is cached in memory. (Un-cached zip files are kept open at all time, so caching keeps the number of simultaneously opened files lower.)]; +docref [getmod]; +docref [zipcachemaxsize]; +docref [zipmodremove]; +docref [zipmodclear]; +docref [zipmodlist]; +docref [zipmodgetdesc]; +docref [zipmodgetfiles]; +docref [zipmodgetrevision]; 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]; +docref [hudecho]; docident [applydialog] [Toggles the showing of the "Apply changes now?" menu when changing certain graphical settings.]; docargument [N] [1 = show, 0 = don't show] [min 0/max 1/default 1]; docident [autodownload] [Determines if the game should try to download missing packages such as textures or mapmodels on the fly.]; @@ -440,20 +556,34 @@ docident [autogetnewmaprevisions] [Automatically get new map revisions from the docargument [N] [0: no, 1: yes] [min 0/max 1/default 0]; docident [autoscreenshot] [Toggle for taking an automatic screenshot during intermission.]; docargument [B] [0=Off, 1=On] [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.]; +docref [screenshot]; +docref [blankouthud]; docident [clearservers] [Clears the server list.]; docident [clockerror] [Sets the correction value for clockfix.]; docargument [V] [correction value] [min 990000/max 1010000/default 1000000]; docremark [Engine source-code snippet (main.cpp): if(clockfix) millis = int(millis*(double(clockerror)/1000000));]; +docref [clockfix]; docident [clockfix] [Enables correction of the system clock.]; docargument [B] [enable correction] [min 0/max 1/default 0]; +docref [clockerror]; +docident [complete] []; +docargument [C] [command] [any command or alias] [0]; +docargument [P] [path] [path to search] [0]; +docargument [E] [extension] [extension to match] [0]; +docremark [The completion will work on the first word of your console input.]; +docexample [complete demo "demos" dmo] [If you enter "/demo " and press TAB you will cycle through all available demos.]; +docexample [alias mapcomplete [complete $arg1 "packages/maps" cgz]] [helper alias for quickly adding complete-definitions for all gamemodes - see config/script.cfg (below "Auto-Completions")]; +docref [saycommand]; +docref [listcomplete]; docident [conline] [Returns text from the last line in the console.]; docident [connected] [Indicates if a connection to a server exists.]; docargument [B] [the connection state] [1 (connected), 0 (disconnected) min 0/max 1/default 0]; docident [conopen] [Indicates the state of the console.]; docargument [N] [console state] [0: closed, 1: open in an alternate size, 2: open regularly read-only]; +docref [altconsize]; +docref [toggleconsole]; docident [conskip] [Allows to browse through the console history by offsetting the console output.]; docargument [N] [the offset] [] [0]; dockey [KP_MINUS] [- on the keypad] [scrolls into the history (conskip 1)]; @@ -473,12 +603,15 @@ docremark [%s : seconds remaining ; %S : seconds played ;]; docremark [%h : IP of server ; %H : hostname of server (client only) ;]; docremark [%n : mapname ;]; docremark [%w : timestamp "when" (formatted by demotimeformat) .]; +docref [demotimeformat]; docident [demotimeformat] [Sets the formatstring for demo timestamp.]; docargument [S] [string] [strftime format] [0]; docremark [If the string starts with 'U', UTC is used - otherwise local time.]; docremark [The same format options as in strftime().]; +docref [demonameformat]; docident [echo] [Outputs text to the console.]; docargument [L] [List of strings] [] [0]; +docref [hudecho]; docident [exec] [Executes all commands in a specified config file.]; docargument [C] [the config file] [] [0]; docremark [It also allows to pass arguments to and deliver results from script files - when a script file is executed, any additional arguments are passed as execarg1..execargX to the script. The number of arguments is in execnumargs and if the script in the file sets the value of execresult, the exec command returns that value.]; @@ -488,8 +621,7 @@ docremark [then the command: "echo (exec testscript.cfg 6 7)" will output "42".] docident [execdir] [Executes all commands in all config files in the specified directory.]; docargument [s] [the directory path from the assaultcube root] [] [0]; docexample [execdir scripts] []; -docident [gamemode] [Holds the current game mode. READ ONLY]; -docexample [echo $gamemode] [Output: 5]; +docref [exec]; 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]; @@ -499,21 +631,25 @@ 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 [getpckserver] [Returns a table with four columns of all configured package servers.]; docremark [The columns are: host name, priority, ping and resolved. "resolved" is a flag, indicating, if the server answered the ping during game start.]; +docref [addpckserver]; +docref [autodownload]; +docref [resetpckservers]; docident [getscrext] [Returns the file extension of the client's current screenshottype setting.]; docexample [echo (getscrext)] [Example output: .jpg]; -docident [groupvariables] [Controls how many variables (with similar names) are grouped together on one line. This only pertains to commented variables in saved.cfg caused by omitunchangeddefaults being 0.]; +docref [screenshottype]; +docident [groupvariables] [Controls how many variables (with similar names) are grouped together on one line in saved.cfg.]; docargument [N] [Variables per line] [min 0/max 10/default 4]; +docremark [This only pertains to commented variables in saved.cfg caused by omitunchangeddefaults being 0.]; +docref [omitunchangeddefaults]; 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 [hudecho] [Outputs text to the console and heads up display.]; docargument [L] [List of strings] [] [0]; +docref [allowhudechos]; +docref [echo]; docident [jpegquality] [Sets the JPEG screenshot image quality.]; docargument [N] [Compression level] [min 10/max 100/default 70]; docremark [The image quality is set by it's compression level, a value of 10 sets maximum compression and a small file size but results in a bad quality image]; @@ -524,29 +660,58 @@ docremark [This is always a two-letter language code as defined in the ISO 639 s docremark [If lang is not set, or if the server does not have a matching MOTD file, it will fall back to English.]; docremark [Note: this does not affect the client language, which is derived from the system settings (e.g. on many *nix systems, it may be changed via the "LANG" environment variable).]; docexample [en, de, fr, ...] []; +docident [listcomplete] []; +docref [saycommand]; +docref [complete]; docident [mapshot] [save an image of the entire radar-overview of the map.]; docident [maxcon] [Sets the total number of text lines from the console to store as history.]; docargument [V] [] [min 10/max 1000/default 200]; -docident [maxfps] [Limits the FPS (frames per second) of AssaultCube's video output.]; -docargument [V] [maximum FPS] [0 disables maxfps min 25 or 0/max 1000/default 200]; docident [maxhistory] [Sets how many typed console commands to store.]; docargument [N] [Total of stored commands] [min 0/max 10000/default 1000]; docremark [This value sets how many command lines to store in memory, everytime a command is entered it gets store so it can be recalled using the "/" key along with the arrow keys to scroll back and forth through the list.]; docident [millis] [Returns the number of milliseconds since engine start.]; docexample [echo (millis)] []; -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 [modmdlbounceN] [Changes name of directory used for bounce model number N.]; +docremark [These setting should be loaded from config/autoexec.cfg, but they work on-the-fly too.]; +docremark [If the model fails to load you will end up with nothing being displayed; use delalias to get back to default.]; +docexample [modmdlbounce0 = misc/my_gib1] [This will make the gib 1 model use the data inside packages/models/misc/my_gib1]; +docexample [modmdlbounce1 = misc/my_gib2] [This will make the gib 2 model use the data inside packages/models/misc/my_gib2]; +docexample [modmdlbounce2 = misc/my_gib3] [This will make the gib 3 model use the data inside packages/models/misc/my_gib3]; +docexample [modmdlbounce3 = weapons/grenade2/static] [This will make the grenade static model use the data inside packages/models/weapons/grenade2/static]; +docref [modmdlweapN]; +docref [modmdlvwepN]; +docref [modmdlpickupN]; +docident [modmdlpickupN] [Changes name of directory used for pickup model number N.]; +docremark [These setting should be loaded from config/autoexec.cfg, but they work on-the-fly too.]; +docremark [If the model fails to load you will end up with nothing being displayed; use delalias to get back to default.]; +docexample [modmdlpickup3 = health2] [This will make the health pickup model use the data inside packages/models/pickups/health2]; +docexample [modmdlpickup1 = my_ammobox] [This will make the ammobox pickup model use the data inside packages/models/pickups/my_ammobox]; +docref [modmdlweapN]; +docref [modmdlvwepN]; +docref [modmdlbounceN]; +docident [modmdlvwepN] [Changes name of directory used for weapon model (viewable/world) number N.]; +docref [modmdlweapN]; +docref [modmdlpickupN]; +docref [modmdlbounceN]; +docident [modmdlweapN] [Changes name of directory used for weapon model (hudgun) number N.]; +docremark [These setting should be loaded from config/autoexec.cfg, but they work on-the-fly too.]; +docremark [If the model fails to load you will end up with nothing being displayed; use delalias to get back to default.]; +docexample [modmdlweap4 = my_subgun] [This will make the subgun hudgun model use the data inside packages/models/weapon/my_subgun]; +docref [modmdlvwepN]; +docref [modmdlpickupN]; +docref [modmdlbounceN]; 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 [omitunchangeddefaultbinds] [Omit unchanged default binds from saved.cfg.]; docargument [N] [0 = print; 1 = print, but commented out; 2 = omit] [min 0/max 2/default 1]; +docref [omitunchangeddefaults]; docident [omitunchangeddefaults] [Omit variables with unchanged default values from saved.cfg.]; docargument [N] [0 = print, but commented out; 1 = omit] [min 0/max 1/default 1]; docremark [If this value is 1, variables that are at their default values are omitted from saved.cfg. If 0, the variables are written to saved.cfg, but commented out.]; +docref [groupvariables]; +docref [omitunchangeddefaultbinds]; docident [physinterp] [Toggles physics interpolation.]; docargument [B] [] [min 0/max 1/default 1]; docident [pngcompress] [Sets the PNG screenshot file compression.]; @@ -558,33 +723,57 @@ docident [quit] [Quits the game without asking.]; docident [resetcfg] [Determines if all settings should be reset when the game quits.]; docargument [B] [enable reset] [min 0/max 1/default 0]; docremark [It is recommended to quit the game immediately after enabling this setting. Note that the reset happens only once as the value of this variable is reset as well.]; +docref [resetbinds]; +docref [quit]; docident [resetpckservers] [Resets the list of packages source servers where to download custom content from.]; docremark [Restart AssaultCube to take the effect.]; +docref [addpckserver]; +docref [autodownload]; +docref [getpckserver]; docident [resetsecuremaps] [Clears the list of secured maps.]; +docref [securemap]; docident [run] [Executes a config file within /config/]; docargument [N] [the file name (without extension)] [] [0]; +docident [saycommand] [Puts a prompt on screen.]; +docargument [S...] [the text to display in the prompt] [] [1]; +docremark [This puts a prompt on screen that you can type into, and will capture all keystrokes until you press return (or ESC to cancel). If what you typed started with a "/", the rest of it will be executed as a command, otherwise its something you "say" to all players.]; +dockey [T] [] [opens empty prompt]; +dockey [BACKQUOTE] [`] [opens a command prompt /]; +dockey [TAB] [] [autocompletes commands/variables/aliases]; +dockey [UP] [] [browse command history forwards]; +dockey [DOWN] [] [browse command history backwards]; +docref [complete]; +docref [listcomplete]; +docref [inputcommand]; docident [screenshot] [Takes a screenshot.]; docremark [Screenshots are saved to "screenshots/[date]_[time]_[map]_[mode].[ext]", where [ext] is the image type selected.]; dockey [F12] [] []; +docref [cleanshot]; 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]; +docref [getscrext]; 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.]; -docident [smoothdist] [Determines the valid distance when extrapolating a players position.]; -docargument [V] [distance] [min 0/max 16/default 8]; -docident [smoothmove] [Determines the speed when extrapolating a players position.]; -docargument [V] [movement speed] [min 0/max 100/default 75]; +docref [resetsecuremaps]; +docref [sendmap]; +docref [getmap]; docident [systime] [seconds since the epoch (00:00:00 UTC on January 1, 1970)]; docexample [echo (systime)] []; docident [throttle_accel] [Determines how fast network throttling accelerates.]; docargument [V] [acceleration] [min 0/max 32/default 2]; +docref [throttle_accel]; +docref [throttle_decel]; docident [throttle_decel] [Determines how fast network throttling decelerates.]; docargument [V] [deceleration] [min 0/max 32/default 2]; +docref [throttle_accel]; +docref [throttle_interval]; docident [throttle_interval] [Determines the interval of re-evaluating network throttling.]; docargument [V] [interval] [seconds min 0/max 30/default 5]; +docref [throttle_accel]; +docref [throttle_decel]; docident [timestamp] [a list of values for current time]; docremark [format: YYYY mm dd HH MM SS]; docexample [echo (timestamp) "2008 08 08 08 08 08"] []; @@ -593,7 +782,6 @@ docexample [echo (at (timestamp) 0) (at (timestamp) 2) (at (timestamp) 1) "2063 docident [timestring] [the current time in (H)H:MM:SS format]; docexample [echo (timestring) "12:34:56"] []; docexample [echo (timestring) "1:02:03"] []; -docident [toggleconsole] [Toggles the console.]; docident [tsswap] [Swaps vertices of model triangles.]; docargument [V] [] [min 0/max 1/default 1]; docident [updatefrommaster] [Contacts the masterserver and adds any new servers to the server list.]; @@ -605,24 +793,50 @@ docident [writecfg] [writes current configuration to config/saved.cfg - automati docident [zipcachemaxsize] [Maximal size of the file, which is cached in memory.]; docargument [S] [size [kB]] [min 0/max 1024/default 512]; docremark [If the size of the zip file is below "zipcachemaxsize", then during loading the whole zip file is cached in memory. When the size is greater, then zip is just opened as a file and read from disk.]; +docref [addzipmod]; docident [zipmodclear] [Removes all zip files from the virtual file system.]; +docref [addzipmod]; +docref [zipmodremove]; docident [zipmodgetdesc] [Reads and returns the first 11 lines from the file "desc.txt" in the named zip file.]; docargument [N] [the name of the zip mod] [] [0]; docremark [The first line is supposed to contain a descriptive title for the zip (for use in menus) and the next 10 lines should contain a more detailed description (also for use in menus). The command also unpacks "preview.jpg" from the zip and mounts it as a temporary file under the name "packages/modpreviews/zipname.jpg".]; +docref [getmod]; +docref [addzipmod]; +docref [zipmodlist]; +docref [zipmodgetfiles]; +docref [zipmodgetrevision]; docident [zipmodgetfiles] [Returns the list of files contained in a zip file.]; docargument [N] [the name of the zip mod] [] [0]; +docref [getmod]; +docref [addzipmod]; +docref [zipmodlist]; +docref [zipmodgetdesc]; +docref [zipmodgetrevision]; docident [zipmodgetrevision] [Returns the revision number of the zip file.]; docargument [N] [the name of the zip mod] [] [0]; docremark [The number is supposed to be part of a filename: "revision_n". If no such file is found in the zip file, the return value is zero. The content of the revision file is not relevant and a file size of zero is recommended.]; +docref [getmod]; +docref [addzipmod]; +docref [zipmodlist]; +docref [zipmodgetdesc]; +docref [zipmodgetfiles]; docident [zipmodlist] [Lists zip files in "mods/".]; docargument [W] [what] [all, active, inactive] [0]; docremark [By default or if "what" is "all", all zips are listed. If "what" is "active", only those zips, that are already in use, are listed. If "what" is "inactive", only the unused zip files are listed.]; +docref [getmod]; +docref [addzipmod]; +docref [zipmodgetdesc]; +docref [zipmodgetfiles]; +docref [zipmodgetrevision]; docident [zipmodremove] [Removes one zip file from the virtual file system.]; docargument [N] [the name of the zip mod] [] [0]; +docref [addzipmod]; +docref [zipmodclear]; docsection [Gameplay] docident [afterinit] [If defined, this will be executed after saved.cfg is loaded.]; docident [akimboautoswitch] [Enables or disables automatic switching to the akimbo upon pickup.]; docargument [N] [enable or disable] [min 0/max 1/default 1]; +docref [akimboendaction]; docident [akimboendaction] [Sets the behavior of weapon switching upon akimbo expiration.]; docargument [] [] [0 (switch to knife)] [0]; docargument [] [] [1 (stay with pistol)] [0]; @@ -630,39 +844,41 @@ docargument [] [] [2 (switch to grenades)] [0]; docargument [] [] [3 (switch to primary)] [0]; docargument [N] [akimbo end action] [min 0/max 3/default 3]; docremark [If no ammunition is detected for the target weapon, it will fallback to the previous weapon until it finds a weapon with ammunition to use.]; +docref [akimboautoswitch]; docident [attack] [Fires the current weapon.]; docremark [default: left mouse button]; docident [autoreload] [Indicates if the weapons should be reloaded automatically.]; docargument [B] [the autoreload state] [on (1), off (0) min 0/max 1/default 1]; docident [backward] [Moves the player backward.]; docremark [default keys: S and Down Arrow]; -docident [benchme] [Move from active team to spectator during match.]; +docident [benchme] [Moves from active team to spectator during match.]; docident [burstshots] [Set the firing mode of automatic weapons between full auto mode and burst fire mode.]; docargument [N] [the weapon number or name] [4 (subgun), 6 (assault), 8 (akimbo)] [0]; docargument [S] [shots per burst] [Special values: 0: set weapon to full auto, -1: don't set, instead check and return shots per burst] [0]; docident [changefollowplayer] []; docargument [D] [delta] [how many players to shift +/-] [0]; +docref [setfollowplayer]; +docident [changeteam] [Swaps your player to the enemy team.]; +docref [team]; docident [checkmag] [Determines if you have any ammunition available for the specified weapon. (uses magcontent and magreserve)]; docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; +docref [magcontent]; +docref [magreserve]; docident [clearignored] [Clear list of ignored players.]; docargument [A] [client number, or -1 to clear the whole list] [] [0]; docremark [Omit the client number to clear the whole list.]; docident [clearmuted] [Clear list of muted players.]; docargument [A] [client number, or -1 to clear the whole list] [] [0]; docremark [Omit the client number to clear the whole list.]; -docident [complete] []; -docargument [C] [command] [any command or alias] [0]; -docargument [P] [path] [path to search] [0]; -docargument [E] [extension] [extension to match] [0]; -docremark [The completion will work on the first word of your console input.]; -docexample [complete demo "demos" dmo] [If you enter "/demo " and press TAB you will cycle through all available demos.]; -docexample [alias mapcomplete [complete $arg1 "packages/maps" cgz]] [helper alias for quickly adding complete-definitions for all gamemodes - see config/script.cfg (below "Auto-Completions")]; docident [connect] [Connects to a server.]; docargument [N] [the address of the server (hostname or IP)] [] [0]; docargument [O] [the port] [] [0]; docargument [P] [the server password] [] [0]; docremark [If the server name is omitted, the client will try to connect to an available server in the LAN. If the port is omitted or set to 0, the default port will be used.]; docexample [connect 127.0.0.1 555 myServerPassword] []; +docref [connectadmin]; +docref [disconnect]; +docref [reconnect]; docident [connectadmin] [Connects to a server and tries to claim admin state.]; docargument [N] [the address of the server (hostname or IP)] [] [0]; docargument [O] [the port] [] [0]; @@ -671,22 +887,34 @@ docremark [This command will connect to a server just like the command 'connect' docremark [If the server name ist omitted, the client will try to connect to an available server in the LAN. If the port is omitted or set to 0, the default port will be used.]; 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".]; +docref [connect]; +docref [disconnect]; +docref [reconnect]; docident [crouch] [Triggers a crouch.]; docremark [default keys: left shift.]; docident [curautoteam] [Returns the server's current autoteam state.]; docident [curdemofile] [Returns the name of played demo.]; +docref [demo]; docident [curmap] [Returns the current map being played.]; +docref [gamemode]; +docref [map]; +docref [mode]; docident [curmaprevision] [Current map revision number.]; -docargument [] [-] [ read-only]; docident [curmastermode] [Returns the server's current mastermode state.]; -docident [curmodeattr] [Checks the current game mode for certain attributes.]; -docargument [A] [attribute name] [] [0]; -docremark [Possible attributes are: team, arena, flag and bot.]; docident [curname] [Returns the nick name of the local player.]; +docref [name]; docident [curplayers] [Returns the size of the players vector.]; docremark [The return value includes the local player "(you)" and works in both singleplayer and multiplayer scenarios. It can be used, for example, in a loop to find all valid clients (players) on server. Note: it DOESN'T return current number of players.]; +docref [isclient]; docident [currentprimary] [Returns the weapon-index the local player currently has selected as primary.]; docremark [This is not the same as curweapon - which could be a grenade or the knife.]; +docref [nextprimary]; +docref [curweapon]; +docref [prevweapon]; +docref [weapon]; +docref [magcontent]; +docref [magreserve]; +docref [hasprimary]; docident [curserver] [Returns information on the current server - if you're connected to one.]; 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']; @@ -698,12 +926,27 @@ docremark [If I is 8, you will get a serverbrowser-line with the server - this i 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 [curweapon] [Returns the weapon-index the local player is currently holding.]; +docref [currentprimary]; +docref [nextprimary]; +docref [prevweapon]; +docref [weapon]; +docref [magcontent]; +docref [magreserve]; +docref [hasprimary]; docident [demo] [Plays a recorded demo.]; docargument [S] [the demo name] [] [0]; docremark [Playback is interpolated for the player whose perspective you view.]; +docref [setmr]; +docref [rewind]; +docref [curdemofile]; docident [disconnect] [Leaves a server.]; +docref [reconnect]; +docref [connect]; +docref [connectadmin]; docident [dlmap] [Downloads and loads the specified map from an available packages source server.]; docargument [S] [the name of the map] [] [0]; +docref [getmap]; +docref [sendmap]; docident [drawzone] [Draws a zone marker with the specified color and dimensions on the minimap/radar. This is primarily intended for the survival mode.]; docargument [X1] [X-coordinate - top-left corner] [] [0]; docargument [X2] [X-coordinate - bottom-right corner] [] [0]; @@ -712,65 +955,115 @@ docargument [Y2] [Y-coordinate - bottom-right corner] [] [0]; docargument [C] [a color for the zone, in hexadecimal notation] [default: 0x00FF00 (green)] [0]; docremark [You can draw a few zones at a time. They will be reset (i.e. removed) once a new game starts.]; docremark [Note that the coordinates must be specified as integers, not as floating-point values.]; +docref [resetzones]; +docref [survival]; docident [dropflag] [Drops the taken flag.]; docident [findcn] [find client number (cn)]; docargument [N] [NAME] [] [0]; 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 [footsteps] [Indicates if the footsteps sound should be played]; -docargument [B] [enable footsteps] [1 (true), 0 (false) min 0/max 1/default 1]; docident [forward] [Moves the player forward.]; docremark [default keys: W and Up Arrow]; +docident [fragmessage] [Sets the frag message corresponding to a weapon (appearing on the hud).]; +docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; +docargument [M] [the message you want to appear] [example: sniped] [0]; +docexample [fragmessage sniper sniped] [It will display "you sniped unarmed" on the hud when you frag unarmed with sniper.]; +docref [gibmessage]; +docref [weapon]; docident [gamespeed] [Sets the gamespeed in percent.]; docargument [N] [the game speed] [min 10/max 1000/default 100]; 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 ] ]] []; +docref [minutesremaining]; +docref [gametimemaximum]; +docref [lastgametimeupdate]; +docref [millis]; docident [gametimemaximum] [Returns the maximum time (in milliseconds) of the currently played game. READ ONLY]; +docref [minutesremaining]; +docref [gametimecurrent]; +docref [lastgametimeupdate]; +docref [millis]; docident [gametimestart] [Returns the time (in milliseconds) when the last map was loaded.]; +docref [minutesremaining]; +docref [gametimecurrent]; +docref [lastgametimeupdate]; +docref [millis]; docident [getdemo] []; docargument [X] [number in list] [] [0]; docargument [P] [subpath] [] [0]; +docref [listdemos]; docident [getmap] [Retrieves the last map that was sent to the server using 'sendmap'.]; docargument [S] [the name of the map] [] [0]; docargument [C] [cubescript to execute once map is installed] [] [0]; docremark [If the command is passed an argument, different than the map being played, the game tries to download the specified map from an available packages source server.]; +docref [sendmap]; +docref [dlmap]; docident [getmod] [Try to download mods/modname.zip from all configured package servers.]; docargument [N] [the name of the mod] [] [0]; docremark [Does not automatically activate the mod.]; +docref [addzipmod]; +docident [gibmessage] [Sets the gib message corresponding to a weapon (appearing on the hud).]; +docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; +docargument [M] [the message you want to appear] [example: slashed] [0]; +docremark [This command is identical to fragmessage, please see it.]; +docref [fragmessage]; +docref [weapon]; docident [gndtoggle] [Toggles between your primary weapon and grenades. (must be binded to a key)]; +docref [sndtoggle]; +docref [knftoggle]; docident [grenades] [Switches to grenades. (if available) (must be binded to a key)]; +docref [primary]; +docref [secondary]; +docref [melee]; +docref [quicknadethrow]; docident [hasprimary] [Determines if the local player (you) are currently carrying a primary weapon.]; docremark [Returns 0 (false) or 1 (true).]; docexample [add2bind MOUSE1 [ if (hasprimary) [ echo you attacked with a primary weapon ] ]] [Everytime you press the left mouse button, assuming you are carrying your primary weapon, the above echo will be executed.]; -docident [hidecustomskins] []; -docargument [B] [] [min 0/max 1/default 0]; +docref [currentprimary]; +docref [curweapon]; +docref [checkmag]; docident [highestcn] [Returns the highest valid client number available.]; -docident [hitsound] [Plays a sound upon every successful hit if enabled.]; -docargument [B] [off OR on] [0 (disabled), 1 (server), 2 (local) min 0/max 2/default 0]; -docremark [If hitsound is set to 2, the sound will be played instantly rather than after server acknowledgment.]; 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 clients currently on the server. (only works in multiplayer)]; +docref [unignoreall]; +docref [ignoreteam]; +docref [ignoreenemy]; docident [ignoreenemy] [Ignores all clients on the enemy team.]; +docref [ignoreall]; +docref [unignoreall]; +docref [ignoreteam]; docident [ignoreteam] [Ignores all clients on the specified team.]; docargument [T] [the team to ignore] [0 or 1 || cla or rvsf] [0]; +docref [ignoreall]; +docref [unignoreall]; +docref [ignoreenemy]; 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]; +docref [curplayers]; docident [jump] [Triggers a jump.]; docremark [default keys: space and right ctrl.]; docident [knftoggle] [Toggles between your primary weapon and your knife. (must be binded to a key)]; -docident [lanconnect] []; +docref [sndtoggle]; +docref [gndtoggle]; +docident [lanconnect] [Connect to a LAN server.]; docident [lastgametimeupdate] [Returns the last time (in milliseconds) the gametime was updated. READ ONLY]; +docref [minutesremaining]; +docref [gametimecurrent]; +docref [gametimemaximum]; +docref [millis]; docident [lastpm] [Holds the CN of the last client who sent you a private message.]; docremark [If you haven't recieved any private messages, 'lastpm' is -1]; +docref [pm]; +docref [quickanswer]; docident [left] [Moves the player left.]; docremark [default keys: A and Left Arrow]; -docident [listcomplete] []; docident [listdemos] [Get the game demos listing from the server we are currently connected.]; +docref [getdemo]; docident [listignored] [Print a list of all players that you are currently ignoring.]; docident [listmuted] [Print a list of all players that you have muted.]; docident [loadcrosshair] [Loads a crosshair for argument T.]; @@ -783,35 +1076,58 @@ docexample [loadcrosshair assault red_dot.png] [Loads the red_dot.png crosshair docexample [loadcrosshair scope red_dot.png] [Loads the red_dot.png crosshair for your sniper rifle scope only.]; docident [loadmap] [Loads a map directly in the current gamemode (singleplayer only).]; docargument [M] [map name] [] [0]; -docident [localfootsteps] [Indicates if the footsteps sound for the local player should be played]; -docargument [B] [enable footsteps] [1 (true), 0 (false) min 0/max 1/default 1]; +docref [map]; +docref [votemap]; +docref [mode]; docident [magcontent] [Returns contents of current magazine.]; docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; docremark [A knife will always return 1.]; docremark [Weapons that aren't available will return -1.]; +docref [curweapon]; +docref [currentprimary]; +docref [nextprimary]; +docref [prevweapon]; +docref [weapon]; +docref [magreserve]; docident [magreserve] [Returns contents of magazine reserve.]; docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; +docref [curweapon]; +docref [currentprimary]; +docref [nextprimary]; +docref [prevweapon]; +docref [weapon]; +docref [magcontent]; docident [map] [Loads up a map in the gamemode set previously by the 'mode' command.]; docargument [M] [Name of the map to load] [string] [0]; docremark [If connected to a multiplayer server, it votes to load the map (others will have to type "map M" as well to agree with loading this map). To vote for a map with a specific mode, set the mode before you issue the map command.]; docremark [A map given as "blah" refers to "packages/maps/blah.cgz", "mypackage/blah" refers to "packages/mypackage/blah.cgz". At every map load, "config/default_map_settings.cfg" is loaded which sets up all texture definitions, etc. Everything defined there can be overridden per package or per map by creating a "mapname.cfg" which contains whatever you want to do differently from the default.]; docremark [When the map finishes it will load the next map when one is defined, otherwise it reloads the current map. You can define what map follows a particular map by making an alias like (in the map script): alias nextmap_blah1 blah2 (loads "blah2" after "blah1").]; -docident [mapmodelzoff] [Allows negative z-offsets for mapmodels.]; -docargument [N] [mapmodel slot number] [] [0]; -docremark [A mapmodel entity is placed at a z-coordinate that is based on the floor height of map geometry and a z-offset. The z-offset is a sum of the entity attribute 3 and the third mapmodel slot parameter. The entity z-offset can range from 0 to 255 while the mapmodel slot parameter can be any integer including negative numbers. So, to place a mapmodel below floor height, the mapmodel slot parameter has to be negative.]; -docremark ["mapmodelzoff" script decreases the mapmodel slot parameter by one and increases the z-offset of every mapmodel which uses that slot also by one. This means, that all mapmodel are exact in the same place afterwards - but the entity z-offset now has room to lower the mapmodel by one more cube.]; -docremark [If you need more z-offset available, run the script several times.]; -docident [mapsize] [outputs the mapsize.]; +docref [votemap]; +docref [loadmap]; +docref [mode]; docident [mapstartalways] [If this alias exists it will be run every time the game starts a new map.]; docexample [mapstartalways = [ echo "------------------------------" ]] [This will output the string and override any other actions that might've been defined.]; docexample [addOnLoadAlways [ echo "------------------------------" ]] [This will output the string after any previously defined actions have run.]; +docref [add2alias]; +docref [mapstartonce]; +docref [onNewMap]; 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.]; +docref [add2alias]; +docref [mapstartalways]; +docref [onNewMap]; docident [me] [Action chat message.]; docargument [...] [...] [] [1]; docident [melee] [Switches to your knife. (must be binded to a key)]; +docref [primary]; +docref [secondary]; +docref [grenades]; docident [minutesremaining] [Returns the remaining minutes of the currently played game. READ ONLY]; +docref [gametimecurrent]; +docref [gametimemaximum]; +docref [lastgametimeupdate]; +docref [millis]; docident [modconnect] [Connect to a modded server.]; docargument [A] [IP] [] [0]; docargument [B] [port] [] [0]; @@ -822,45 +1138,29 @@ docargument [A] [IP] [] [0]; docargument [B] [port] [] [0]; docargument [C] [admin password] [] [0]; docremark [The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server.]; -docident [modenum] [Returns the mode number for a specified mode acronym.]; -docargument [M] [the mode acronym] [] [0]; -docremark [Returns -1 if not found.]; -docexample [echo (modenum ctf)] [Output: 5]; -docexample [echo (modenum btosok)] [Output: 21]; docident [modlanconnect] [Connect to a modified LAN server.]; docremark [The modified server needs to use the original client-server protocol. The protocol version number will be the negated value of an unmodded server.]; -docident [modmdlbounceN] [Changes name of directory used for bounce model number N.]; -docremark [These setting should be loaded from config/autoexec.cfg, but they work on-the-fly too.]; -docremark [If the model fails to load you will end up with nothing being displayed; use delalias to get back to default]; -docexample [modmdlbounce0 = misc/my_gib1] [This will make the gib 1 model use the data inside packages/models/misc/my_gib1]; -docexample [modmdlbounce1 = misc/my_gib2] [This will make the gib 2 model use the data inside packages/models/misc/my_gib2]; -docexample [modmdlbounce2 = misc/my_gib3] [This will make the gib 3 model use the data inside packages/models/misc/my_gib3]; -docexample [modmdlbounce3 = weapons/grenade2/static] [This will make the grenade static model use the data inside packages/models/weapons/grenade2/static]; -docident [modmdlpickupN] [Change name of directory used for pickup model number N.]; -docremark [These setting should be loaded from config/autoexec.cfg, but they work on-the-fly too.]; -docremark [If the model fails to load you will end up with nothing being displayed; use delalias to get back to default]; -docexample [modmdlpickup3 = health2] [This will make the health pickup model use the data inside packages/models/pickups/health2]; -docexample [modmdlpickup1 = my_ammobox] [This will make the ammobox pickup model use the data inside packages/models/pickups/my_ammobox]; -docident [modmdlvwepN] [Changes name of directory used for weapon model (viewable/world) number N.]; -docident [modmdlweapN] [Changes name of directory used for weapon model (hudgun) number N.]; -docremark [These setting should be loaded from config/autoexec.cfg, but they work on-the-fly too.]; -docremark [If the model fails to load you will end up with nothing being displayed; use delalias to get back to default]; -docexample [modmdlweap4 = my_subgun] [This will make the subgun hudgun model use the data inside packages/models/weapon/my_subgun]; docident [muteplayer] [Mute a player]; docargument [A] [client number] [] [0]; docremark [You won't hear any further voice com messages from that player.]; docident [name] [Sets the nick name for the local player.]; docargument [N] [the name] [] [0]; +docref [curname]; docident [nextprimary] [Sets the primary weapon on next respawn.]; docargument [A] [the weapon number or name] [2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault)] [0]; -docident [nickcomplete] [adds a command to complete nicknames on]; -docremark [your own nick will be ignored]; +docident [nickcomplete] [Ads 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.]; +docref [complete]; docident [onAttack] [If defined, this will be executed each time you shot a bullet, throw a grenade or use your knife.]; docargument [weapon] [The weapon that was used] [] [0]; docremark [Remark: it works only in singleplayer.]; docident [onCallVote] [If this alias exists it will be run every time a vote is called.]; +docref [onChangeVote]; +docref [onVoteEnd]; docident [onChangeVote] [If this alias exists it will be run every time a vote is changed.]; +docref [onCallVote]; +docref [onVoteEnd]; 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 or another player disconnect(s) from a server.]; @@ -903,6 +1203,8 @@ 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]; docremark [Remark: it works only in singleplayer.]; docident [onVoteEnd] [If this alias exists it will be run every time a vote passes or fails.]; +docref [onCallVote]; +docref [onChangeVote]; docident [onWeaponSwitch] [If defined, this will be executed each time you switch to a different weapon.]; docargument [W] [The weapon number that you switched to] [] [0]; docremark [Remark: it works only in singleplayer.]; @@ -911,88 +1213,109 @@ docargument [B] [pause game] [min 0/max 1/default 0]; docident [pm] [Sends a private message to a specified client.]; docargument [C] [Client number] [] [0]; docargument [L] [List of strings] [] [0]; +docref [say]; +docref [quickanswer]; +docref [lastpm]; docident [prevweapon] [Returns the weapon-index the local player was previously holding.]; +docref [currentprimary]; +docref [nextprimary]; +docref [curweapon]; +docref [weapon]; +docref [magcontent]; +docref [magreserve]; docident [primary] [Switches to your current primary weapon. (must be binded to a key)]; +docref [secondary]; +docref [melee]; +docref [grenades]; 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 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]; +docref [start_intermission]; +docref [pstat_score]; +docref [weapon]; docident [quickanswer] [Easily respond the the last client who sent you a private message.]; +docref [pm]; +docref [lastpm]; docident [quicknadethrow] [Switches to grenades (if available). If grenades are already selected, throw a grenade and switch back to previous weapon. (must be binded to a key)]; +docref [grenades]; docident [reconnect] [Disconnects then reconnects you to the current server.]; docargument [P] [the server password] [] [0]; +docref [disconnect]; +docref [connect]; +docref [connectadmin]; docident [reload] [Reloads the weapon.]; docargument [A] [] [value] [0]; docident [resetzones] [Reset all drawn zones.]; +docref [drawzone]; +docref [survival]; 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.]; +docref [demo]; +docref [setmr]; docident [right] [Moves the player right.]; docremark [default keys: D and Right Arrow]; 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.]; -docident [saycommand] [Puts a prompt on screen.]; -docargument [S...] [the text to display in the prompt] [] [1]; -docremark [This puts a prompt on screen that you can type into, and will capture all keystrokes until you press return (or ESC to cancel). If what you typed started with a "/", the rest of it will be executed as a command, otherwise its something you "say" to all players.]; -dockey [T] [] [opens empty prompt]; -dockey [BACKQUOTE] [`] [opens a command prompt /]; -dockey [TAB] [] [autocompletes commands/variables/aliases]; -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]; +docref [fov]; docident [secondary] [Switches to your secondary weapon. (must be binded to a key)]; +docref [primary]; +docref [melee]; +docref [grenades]; docident [setfollowplayer] []; docargument [C] [clientnum] [which player to follow] [0]; +docref [changefollowplayer]; +docref [spectatecn]; 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]; +docref [demo]; +docref [rewind]; 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.]; docargument [D] [delta] [-N..-1,+1..N] [0]; dockey [MOUSE4] [] [cycle one up]; dockey [MOUSE5] [] [cycle one down]; -docident [showmap] [Determines if the mini-map should be shown on screen.]; -docargument [B] [show mini-map] [min 0/max 1/default 0]; -docident [showmapbackdrop] [change wether to have a see-through map overview (0), or render it on a black backdrop (1) or a combination of both (2)]; -docargument [B] [backdrop-style] [min 0/max 2/default 0]; -docident [showmapbackdroptransparency] [Transparency of the black map backdrop (in percent) rendered if showmapbackdrop is set to 2.]; -docargument [T] [transparency] [min 0/max 100/default 75]; -docident [showscores] [Shows or hides the scores.]; -dockey [TAB] [] []; -docident [showscoresondeath] [Determines if scores should be shown on death.]; -docargument [V] [] [min 0/max 1/default 1]; -docident [skin] [Determines the skin of the current player.]; -docargument [N] [skin id] [value] [0]; -docremark [See the player model folder for the according skin-id.]; -docident [skin_cla] [Choose skin when playing for team CLA.]; -docargument [N] [skin id] [] [0]; -docident [skin_rvsf] [Choose skin when playing for team RVSF.]; -docargument [N] [skin id] [] [0]; docident [sndtoggle] [Toggles between your primary weapon and your secondary weapon. (must be binded to a key)]; +docref [knftoggle]; +docref [gndtoggle]; docident [spectate] [Toggles spectator mode.]; +docref [spectatemode]; +docref [spectatepersistent]; +docident [spectatecn] [Returns client number of spectated player.]; +docref [setfollowplayer]; docident [spectatemode] [Sets the desired spectating mode.]; docargument [M] [the mode] [2 (1st-person), 3 (3rd-person), 4 (3rd-person transparent), 5 (free flying)] [0]; dockey [SPACE] [] [switch spectator mode]; -docident [spectatepersistent] [Enables persistent spectating concrete player in multiplayer.]; +docref [spectate]; +docident [spectatepersistent] [Enables persistent spectating concrete player.]; docargument [N] [0: enabled in non-arena modes, 1: always enabled] [min 0/max 1/default 1]; -docremark [For "spectatepersistent" = 1 persistent spectating is enabled in all game modes in multiplayer (that means, that spectated player isn't changed after his death), for "0" it is enabled only in non-arena modes in multiplayer.]; -docremark [In demo mode persistent spectating is always enabled.]; +docremark [For "spectatepersistent" = 1 persistent spectating is enabled in all game modes in multiplayer (that means, that spectated player isn't changed after his death), for "0" it is enabled only in non-arena modes.]; +docref [spectate]; docident [start_intermission] [If this alias exists it will be run when the game reaches intermission.]; docexample [start_intermission = [ echo "INTERMISSION - STATISTICS TIME" loop p 255 [ pn = (player $p name) if (strcmp $pn "") [ ] [ echo (concatword Player $p ":") (pstat_score $p) ":" (pstat_weap $p) ] ] echo "------------------------------" ]] [This will output the full statistics line for all players.]; +docref [pstat_score]; +docref [pstat_weap]; docident [stopdemo] [Stops demo playback.]; docident [suicide] [Kills your player. You will lose 1 frag point and receive 1 death point when using this command.]; docident [team] [Sets the team for the local player.]; docargument [N] [the team number or name] [0 (CLA), 1 (RVSF), 2 (CLA-SPECT), 3 (RVSF-SPECT), 4 (SPECTATOR)] [0]; docexample [team CLA] []; +docref [changeteam]; docident [teaminfo] [Returns attributes of a team.]; docargument [T] [Team] [cla, rvsf, 0, 1] [0]; docargument [A] [Attribute] [Valid attributes: flags, frags, deaths, points, name, players] [0]; docident [togglespect] [cycles through all available spectator modes. Follow-1stPerson, Follow-3rdPerson, Follow-3rdPerson-transparent and Fly.]; dockey [SPACE] [] [cycle spectator modes]; docident [unignoreall] [Unignores all clients currently on the server. (only works in multiplayer)]; +docref [ignoreall]; +docref [ignoreteam]; +docref [ignoreenemy]; docident [voicecom] []; docargument [S] [sound] [must be a registered voicecom-sound] [0]; docargument [T] [text] [] [0]; @@ -1009,6 +1332,9 @@ dockey [F2] [] [votes NO]; docident [votemap] [Sets the next gamemode then calls a vote for a map.]; docargument [I] [mode id] [] [0]; docargument [M] [map name] [] [0]; +docref [map]; +docref [loadmap]; +docref [mode]; 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.]; @@ -1023,47 +1349,77 @@ docsection [Keyboard and mouse] docident [KEYPRESS] [If defined, this will be executed every time you press a key.]; docargument [I] [integer key code] [] [0]; docexample [checkinit KEYPRESS [echo You pressed key: (findkey $arg1)]] []; +docref [KEYRELEASE]; +docref [findkey]; docident [KEYRELEASE] [If defined, this will be executed every time you release a key.]; docargument [I] [integer key code] [] [0]; docexample [checkinit KEYRELEASE [echo You released key: (findkey $arg1)]] []; +docref [KEYPRESS]; +docref [KEYPRESS]; +docref [findkey]; docident [_resetallbinds] [Clears all binds for all keys and all modes, including self-assigned ones.]; docremark [Do not use the command manually.]; +docref [resetbinds]; 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]; +docref [add2alias]; +docref [add2list]; 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.]; +docref [editbind]; +docref [specbind]; +docref [megabind]; +docref [onrelease]; docident [editbind] [Similar to bind, but is only active while editing, where it overrides the regular bind for the specified key.]; docargument [K] [the key to bind] [string] [0]; docargument [A] [the command] [string, usually an alias] [0]; +docref [bind]; +docref [specbind]; docident [findkey] [Returns the name of a key via a specified code.]; docargument [I] [integer] [] [0]; docremark [Returns -255 if the key does not exist.]; docremark [See /config/keymap.cfg for a full list of valid key codes.]; docexample [echo (findkey 8)] [Output: BACKSPACE]; docexample [echo (findkey 280)] [Output: PAGEUP]; +docref [keybind]; +docref [findkeycode]; docident [findkeycode] [Returns the integer code of a key.]; docargument [K] [the name of the key] [] [0]; docremark [Returns -255 if the key does not exist.]; docremark [See /config/keymap.cfg for a full list of valid key names.]; docexample [echo (findkeycode BACKSPACE)] [Output: 8]; docexample [echo (findkeycode PAGEUP)] [Output: 280]; +docref [keybind]; +docref [findkey]; docident [findsens] [Initiate sensitivity training, to help you find what sensitivity setting you like.]; docident [invmouse] [Sets mouse to "flight sim" mode.]; docargument [B] [sets invmouse] [0 (off), else (on)] [0]; docident [keybind] [Returns the contents of a keybind, bound with 'bind'.]; docargument [K] [name of key] [] [0]; +docref [bind]; +docref [findkey]; +docref [findkeycode]; +docref [keyeditbind]; +docref [keyspecbind]; docident [keyeditbind] [Returns the contents of a keybind, bound with 'editbind'.]; docargument [K] [name of key] [] [0]; +docref [editbind]; +docref [keybind]; +docref [keyspecbind]; docident [keymap] [Sets up the keymap for the specified key.]; docargument [K] [the key to map] [] [0]; docargument [N] [the name for the key] [] [0]; docargument [A] [the default action] [] [0]; docremark [You should never have to use this command manually, use "bind" instead.]; +docref [bind]; docident [keyspecbind] [Returns the contents of a keybind, bound with 'specbind'.]; docargument [K] [name of key] [] [0]; +docref [keybind]; +docref [keyeditbind]; +docref [specbind]; 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]; @@ -1073,29 +1429,42 @@ 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!]] []; +docref [bind]; +docref [onrelease]; docident [mfilter] [Sets the degree of mouse filtering (0.0 being no filtering)]; docargument [N] [Amount of mouse filtration] [min 0.0/max 6.0/default 0.0]; docident [mouseaccel] [Sets the mouse acceleration]; docargument [N] [acceleration factor] [min 0.0/max 1000.0/default 0.0]; +docref [sensitivity]; 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.]; docexample [bind CTRL [ echo "key pressed"; onrelease [ echo "key released" ] ]] []; +docref [bind]; +docref [megabind]; docident [resetbinds] [Resets all binds back to their default values.]; docremark [This command executes the file /config/resetbinds.cfg which will bind all keys to the values specified in that file, thus resetting the binds to their default values.]; +docref [resetcfg]; +docref [_resetallbinds]; docident [scopesensscale] [Scales the effect of an increase or decrease in the sensitivity value when scoping. The larger the value, the smaller the difference between sensitivity values.]; docargument [N] [the scope sensitivity scale] [min 0.001/max 1000.0/default 0.5]; docident [searchbinds] [Search keybinds (bound with 'bind'), return keys with matching contents.]; docargument [S] [search string] [] [0]; docremark [This is the inverse of 'keybind']; docexample [echo (searchbinds "reload")] [Output: R]; +docref [bind]; +docref [keybind]; docident [searcheditbinds] [Search keybinds (bound with 'editbind'), return keys with matching contents.]; docargument [s] [search string] [] [0]; docremark [This is the inverse of 'keyeditbind']; docexample [echo (searcheditbinds "toggleocull")] [Output: F5]; +docref [editbind]; +docref [keyeditbind]; docident [searchspecbinds] [Search keybinds (bound with 'specbind'), return keys with matching contents.]; docargument [s] [search string] [] [0]; docremark [This is the inverse of 'keyspecbind']; +docref [specbind]; +docref [keyspecbind]; docident [sensitivity] [Sets the mouse sensitivity.]; docargument [S] [the sensitivity] [floating-point] [0]; docident [sensitivityscale] [Scales the effect of an increase or decrease in the sensitivity value. The larger the value, the smaller the difference between sensitivity values.]; @@ -1103,10 +1472,17 @@ docargument [N] [the sensitivity scale] [min 0.001/max 1000.0/default 1.0]; docident [specbind] [Similar to bind, but is only active while spectating, where it overrides the regular bind for the specified key.]; docargument [K] [the key to bind] [string] [0]; docargument [A] [the command] [string, usually an alias] [0]; +docref [bind]; +docref [editbind]; +docident [togglegrab] [Toggles grabbing of mouse and keyboard input in a game.]; +docremark [Grabbing means that the mouse is confined to the AC, and nearly all keyboard input is passed directly to AC, and not interpreted by a window manager, if any. This is only useful when you run AC windowed.]; docsection [Editing] docident [addentity] [Adds an entity of the specified type at the current camera position.]; docargument [E] [the entity type or number] [light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)] [0]; docremark [It also returns the index number of the new entity, so that the other attributes can be set by editentity.]; +docref [enumentities]; +docref [editentity]; +docref [deleteentity]; docident [addselection] [Select the given area, as if dragged with the mouse holding editmeta.]; docargument [X] [the X coordinate] [] [0]; docargument [Y] [the Y coordinate] [] [0]; @@ -1114,6 +1490,25 @@ docargument [XS] [the length along the X axis] [] [0]; docargument [XY] [the length along the Y axis] [] [0]; docremark [This command is useful for making complex geometry-generating scripts. It adds a selection to the current list of selections. The dimensions of the current selections can be accessed by the commands selx, sely, selxs and selys. These commands return the list of coordinates corresponding to each selection.]; docremark [Coordinates are as follows: after a "newmap 6" the top-left corner (the one where the red dot points) are (8,8), the opposite corner is (56,56) (or (120,120) on a "newmap 7" etc.).]; +docref [select]; +docref [selectall]; +docref [resetselections]; +docref [expandselection]; +docref [shrinkselection]; +docref [enlargevdeltaselections]; +docref [selx]; +docref [sely]; +docref [selxs]; +docref [selys]; +docref [selectionwalk]; +docref [pushselections]; +docref [editmeta]; +docident [addtodoentity] [Adds the entity #index to the TODO list.]; +docargument [I] [index] [] [0]; +docargument [C] [comment] [] [0]; +docremark [Entity errors during map load are automatically added to the list. The list is saved and restored with xmaps.]; +docref [cleartodoentities]; +docref [enumtodoentities]; docident [advancemaprevision] [Select the increment of the map revision number for the next 'savemap'.]; docargument [N] [increment] [min 1/max 100/default 1]; docident [ambient] [Controls the ambient lighting of the map, i.e. how bright areas not affected by any light entities will appear.]; @@ -1122,6 +1517,8 @@ docident [applymapsoundchanges] [During map editing, drop all mapsounds so they docident [arch] [Makes an arch out of the current selection.]; docargument [S] [side delta] [] [0]; docremark [The selection must be a heightfield before this command can be used. Will make the arch in the long direction, i.e when you have 6x2 cubes selected, the arch will span 7 vertices. Optionally, sidedelta specifies the delta to add to the outer rows of vertices in the other direction, i.e. give the impression of an arch that bends 2 ways (try "arch 2" on an selection of at least 2 thick to see the effect). Not all arch sizes are necessarily available, see config/prefabs.cfg.]; +docref [archvertex]; +docref [enlargearchslopeselections]; docident [archvertex] [Defines a vertex delta for a specific arch span prefab, used by the 'arch' command.]; docargument [S] [span value] [integer] [0]; docargument [V] [vertex value] [integer] [0]; @@ -1130,10 +1527,25 @@ docremark [It returns the old value of the vertex, and if the vertex argument is docremark [See config/prefabs.cfg for an example on usage.]; docident [automapconfig] [Enables the "automatic embedded map config data" feature.]; docremark [With the next map save the map config file will get renamed and the map config data stored inside the map file.]; +docref [getautomapconfig]; +docref [embedconfigfile]; +docref [extractconfigfile]; +docref [listheaderextras]; docident [calcmipstats] [Counts all the mips in the current map and prints their numbers as 1x1/2x2/4x4/8x8/16x16/32x32/64x64.]; +docref [showmip]; docident [clearents] [Deletes all entities of said type.]; docargument [T] [the entity type, see command 'newent'] [string] [0]; +docref [delent]; +docref [deleteentity]; +docident [cleartodoentities] [Clears list of TODO entities.]; +docargument [I] [index] [] [0]; +docremark [The list is also deleted, when a new map is loaded.]; +docremark [If an entity number is given as an argument, only entries for this entity are cleared.]; +docref [addtodoentity]; +docref [enumtodoentities]; docident [clearvantagepoint] [Clears a set parameters of vantage point.]; +docref [setvantagepoint]; +docref [gotovantagepoint]; docident [closestenttype] [Restrict 'closest entity' display to one entity type.]; docargument [A] [entity type] [] [0]; docident [convertclips] [Converts the nearest entity (if its a clip or plclip) to its opposite type.]; @@ -1141,8 +1553,10 @@ docexample [convertclips] [Assuming the nearest entity is a clip, it will be con docexample [convertclips] [Assuming the nearest entity is a plclip, it will be converted to a clip.]; docident [copy] [Copies the current selection into a buffer.]; dockey [C] [] []; +docref [paste]; docident [copyent] [Copies the current closest entity into a buffer.]; docremark [Only works while in edit mode.]; +docref [pasteent]; 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.]; @@ -1152,25 +1566,53 @@ docargument [T] [the integer of type of the walls you want to count] [ 0 (solid) 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.]; dockey [BACKSPACE] [] []; +docref [undelent]; +docref [deleteentity]; +docref [clearents]; docident [deleteentity] [Deletes a map entity.]; docargument [N] [entity index/number] [] [0]; docremark [Note: deleting an entity only marks it as unused. It will be completely removed after saving and loading the map.]; +docref [delent]; +docref [clearents]; +docref [enumentities]; +docref [addentity]; +docref [editentity]; +docref [undelent]; +docref [getdeletedentities]; +docref [unlistdeletedentity]; docident [deletemapmodelslot] [Deletes an unused mapmodel slot.]; docargument [N] [mapmodel slot number] [] [0]; docargument [P] [purge] [] [0]; docremark [If "purge" is specified as second argument, it also deletes an used slot (including all map entities which use that mapmodel).]; docremark [Also it enables automapconfig.]; +docref [mapmodel]; +docref [mapmodelslotname]; +docref [mapmodelslotbyname]; +docref [mapmodelslotusage]; +docref [editmapmodelslot]; +docref [mapmodelchanged]; docident [deletemapsoundslot] [Deletes an unused map sound slot.]; docargument [N] [map sound slot number] [] [0]; docargument [P] [purge] [] [0]; docremark [If "purge" is specified as second argument, it also deletes an used slot (including all map entities which use that sound).]; docremark [Also it enables automapconfig.]; +docref [mapsound]; +docref [mapsoundslotbyname]; +docref [mapsoundslotusage]; +docref [editmapsoundslot]; +docref [mapsoundchanged]; docident [deletetextureslot] [Deletes an unused texture slot.]; docargument [N] [texture slot number] [0..255] [0]; docargument [P] [delete used slot?] [purge] [0]; docargument [R] [replacement slot] [0..255] [0]; docremark [If "purge" word is put as second argument, it also deletes an used slot. All mapmodels that use that texture as skin are changed to default skin. All world geometry, which uses the texture, is instead set to use slot #255 or a specified replacement slot. Slots below #5 always require "purge", no matter if they are in use (default slots).]; docremark [Also enables automapconfig.]; +docref [texture]; +docref [textureslotusage]; +docref [textureslotusagelist]; +docref [textureslotbyname]; +docref [edittextureslot]; +docref [edittexturestack]; docident [editaxis] [Contains the main axis of the player orientation.]; docargument [N] [11: X, 12: Y, 13: Z] [min 0/max 13/default 0]; docident [editentity] [Edits a map entity.]; @@ -1179,6 +1621,10 @@ docargument [A] [list of attributes] [] [0]; docremark [It edits only parameters given a non-empty value. Returns the type and the values of all attributes (x, y, z, attr1 - attr7). It uses float values for some attributes, return values also may be float.]; docexample [echo (editentity 33)] [Prints all attributes of map entity number 33, for example "light 174 172 12 20 255 200 200 0 0 0"]; docexample [editentity 33 "" 173] [Changes the y-position of entity 33 to 173]; +docref [entset]; +docref [enumentities]; +docref [addentity]; +docref [deleteentity]; docident [editheight] [Changes the height of the current selection.]; docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)] [0]; docargument [D] [the delta value to move it in] [1 (forwards), -1 (backwards)] [0]; @@ -1197,33 +1643,56 @@ docremark [The command returns the resulting data of the mapmodel slot. If only docremark [If anything is changed, automapconfig is enabled.]; docexample [editmapmodelslot 33 "" "" -5] [sets the z-offset of slot #33 to -5 without affecting other parameters]; docexample [echo (editmapmodelslot 33)] [prints the current parameters of mapmodel slot #33 , for example: 0 0 0 0 "makke/lightbulb"]; +docref [mapmodel]; +docref [mapmodelslotname]; +docref [mapmodelslotbyname]; +docref [mapmodelslotusage]; +docref [deletemapmodelslot]; +docref [mapmodelchanged]; docident [editmapmsg] [Allows to edit the map message.]; +docref [mapmsg]; docident [editmapsoundslot] [Edits path/name and maxuses parameters of a mapsound slot.]; docargument [N] [map sound slot number] [] [0]; docargument [P] [map sound path] [] [0]; docargument [M] [maxuses] [] [0]; docremark [Only non-empty parameters actually change something. The command returns the resulting data of the map sound slot. If only the map sound slot number is specified, no changes are made, but the current data is returned. Therefore the command can be used to get and set parameters.]; docremark [If anything is changed, automapconfig is enabled.]; +docref [mapsound]; +docref [mapsoundslotbyname]; +docref [mapsoundslotusage]; +docref [deletemapsoundslot]; +docref [mapsoundchanged]; docident [editmeta] [First modifier key for editing mode.]; docremark [Go to references mentioned below to see the use.]; dockey [LCTRL] [left Ctrl] [first modifier key for editing mode]; +docref [addselection]; +docref [entproperty]; +docref [undelent]; +docref [editmetakeydown]; docident [editmeta2] [Second modifier key for editing mode.]; docremark [Go to references mentioned below to see the use.]; dockey [LCTRL] [left Shift] [second modifier key for editing mode]; +docref [entproperty]; +docref [undelent]; +docref [editmeta2down]; docident [editmeta2down] [Indicates if editmeta key is pressed.]; docargument [N] [state of the second editmeta key] [0: unpressed, 1: pressed read-only]; +docref [editmeta2]; docident [editmetakeydown] [Indicates if editmeta key is pressed.]; docargument [N] [state of the first editmeta key] [0: unpressed, 1: pressed read-only]; +docref [editmeta]; docident [edittag] []; docargument [T] [tag] [integer value] [0]; docident [edittagclip] [Sets tag clip type of all selected cubes.]; docargument [T] [type] [0 (none), 64 (clip), 128 (plclip)] [0]; docremark [Type can be numeric or a keyword.]; +docref [transformclipentities]; docident [edittex] [Changes the texture on current selection by browsing through a list of textures directly shown on the cubes.]; docargument [T] [an integer denoting the type] [0 (floor), 1 (lower or wall), 2 (ceiling), 3 (upper wall)] [0]; docargument [D] [the direction you want to cycle the textures in] [1 (forwards), -1 (backwards)] [0]; docremark [Default keys are the six keys above the cursor keys, which each 2 of them cycle one type (and numpad 7/4 for upper).]; docremark [The way this works is slightly strange at first, but allows for very fast texture assignment. All textures are in 3 individual lists for each type (both wall kinds treated the same), and each time a texture is used, it is moved to the top of the list. So after a bit of editing, all your most frequently used textures will come first when pressing these keys, and the most recently used texture is set immediately when you press the forward key for the type. These lists are saved with the map. make a selection (including wall bits) and press these keys to get a feel for what they do.]; +docref [hudtexttl]; docident [edittextureslot] [Edits the parameters of a texture slot.]; docargument [N] [texture slot number] [0..255] [0]; docargument [S] [scale] [] [0]; @@ -1232,22 +1701,42 @@ docremark [Only non-empty parameters actually change something. The command retu docremark [If anything is changed, automapconfig is enabled.]; docexample [edittextureslot 33 "" "arcitool/rohbaubims.jpg"] [Sets texture name of slot #33]; docexample [echo (edittextureslot 33)] [Prints the current parameters of texture slot #33, for example: 0 "zastrow/3wood_crate_10.jpg"]; +docref [texture]; +docref [textureslotusage]; +docref [textureslotusagelist]; +docref [textureslotbyname]; +docref [deletetextureslot]; +docref [edittexturestack]; docident [edittexturestack] [Puts a texture slot in a "last used" list up front.]; docargument [S] [surface] [floor, wall or ceiling] [0]; docargument [N] [texture slot number] [0..255] [0]; docremark [The first parameter picks the list, the second parameter is the texture slot number to be used for the next edit.]; +docref [texture]; +docref [textureslotusage]; +docref [textureslotusagelist]; +docref [textureslotbyname]; +docref [deletetextureslot]; +docref [edittextureslot]; docident [edittoggle] [switches between map edit mode and normal.]; docremark [In map edit mode you can select bits of the map by clicking or dragging your crosshair on the floor or ceiling (using the "attack" identifier, normally MOUSE1), then use the identifiers below to modify the selection. While in edit mode, normal physics and collision don't apply (clips), and key repeat is ON. Note that if you fly outside the map, cube still renders the world as if you were standing on the floor directly below the camera.]; dockey [E] [] []; +docref [select]; docident [embedconfigfile] [Loads the map config file, includes it in the map header and renames the original config file.]; docremark [Embedded config files take precedence over regular config files.]; +docref [automapconfig]; +docref [extractconfigfile]; +docref [listheaderextras]; docident [enlargearchslopeselections] [Automatically enlarge selections after placing arches or slopes.]; docargument [N] [0: don't enlarge selection, 1: enlarge selection] [min 0/max 1/default 0]; docremark [If the variable is set to 1, after placing an arch or a slope, the selection is enlarged, so that the arch or slope can be changed by vdelta increments (for example, to raise an arch in 1/4 cube increments).]; docremark [If the variable is set to 0 (which is default), the selection remains unchanged. This way, for example, the arch can be raised or lowered by regular cube increments.]; +docref [arch]; +docref [slope]; docident [enlargevdeltaselections] [Enlarges all selections by one cube in x- and y- direction, to change a selection from the "cube area" to the "vdelta area".]; docargument [I] [incremente] [] [0]; docremark [If an argument is given, it is used as increment value, so, for example "enlargevdeltaselections -1" undoes a previous enlargement.]; +docref [select]; +docref [addselection]; docident [entproperty] [Changes property (attributes) of the closest entity.]; docargument [A] [attribute index] [0..6 (atrr1 - attr7), 11..13 (x, y, z)] [0]; docargument [I] [attribute increment] [] [0]; @@ -1255,6 +1744,11 @@ docargument [U] [unscaled flag] [0 or 1] [0]; docremark [For example 'entproperty 0 2' when executed near a lightsource would increase its radius by 2.]; docremark [Keys 1..7, in combination with the scrollwheel, can be used to alter the new entity attributes (attr1 - attr7). Pressing editmeta speeds up the scrolling. Pressing editmeta2 enables unscaled editing of entity attributes.]; docremark [Increment is a float for some attributes. If "unscaled" flag is "1", increment is applied as unscaled integer, which means, it will change float attributes at their highest resolution.]; +docref [getclosestent]; +docref [getentattr]; +docref [getenttype]; +docref [editmeta]; +docref [editmeta2]; docident [entset] [Edits the closest entity.]; docargument [E] [the entity type or number] [light (1), playerstart (2), pistol (3), ammobox (4), grenades (5), health (6), helmet (7), armour (8), akimbo (9), mapmodel (10), ladder (12), ctf-flag (13), sound (14), clip (15), plclip (16)] [0]; docargument [attr1] [see newent 'type'] [] [0]; @@ -1262,38 +1756,73 @@ docargument [attr2] [see newent 'type'] [] [0]; docargument [attr3] [see newent 'type'] [] [0]; docargument [attr4] [see newent 'type'] [] [0]; docremark [Overwrites the closest entity with the specified attributes. Some attributes may be specified as floats.]; +docref [editentity]; docident [entstats] [Print some map entity statistics to the console.]; docident [enumentities] [Returns a list of the numbers of all entities of that type.]; docargument [type] [the entity type] [light, sound, clip, plclip, playerstart, pistol, ammobox, grenades, health, armour, akimbo, mapmodel, ladder, ctf-flag, helmet] [0]; docremark [If no such entities exist or the entity type could not be recognised, the list is empty.]; +docref [gotoentity]; +docref [addentity]; +docref [editentity]; +docref [deleteentity]; +docident [enumtodoentities] [Returns a list of TODO entities.]; +docremark [Returns entity index number and comment for every entry.]; +docref [addtodoentity]; +docref [cleartodoentities]; +docref [xmap_list]; docident [equalize] [Levels the floor/ceiling of the selection.]; docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)] [0]; docremark [default keys , and .]; docident [expandselection] [Increases the size of the current selection by N cubes on all sides.]; docargument [N] [number of cubes] [integer] [0]; docremark [Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel.]; +docref [select]; +docref [addselection]; +docref [shrinkselection]; docident [extractconfigfile] [Writes an embedded config file to a separate file and removes it from the map header.]; +docref [automapconfig]; +docref [embedconfigfile]; 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 [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.]; +docident [fullbrightlevel] [Sets the level of brightness to use when using the command "/fullbright 1".]; +docargument [V] [Light intensity level] [min 0/max 255/default 176]; docident [getautomapconfig] [Returns "1" if automapconfig is already enabled, "0" otherwise.]; +docref [automapconfig]; docident [getclosestent] [Returns the entity index number of the closest entity (or of the pinned entity, if one exists).]; docremark [Returns -1, if no entities are on the map.]; docremark [Returns always exactly the entity, that edit commands like delent will use next.]; +docref [toggleclosestentpin]; +docref [entproperty]; +docref [getentattr]; +docref [getenttype]; docident [getdeletedentities] [Returns a list of deleted entities.]; docremark [Each line contains the entity type, the position and all seven attributes.]; +docref [undelent]; +docref [unlistdeletedentity]; +docref [deleteentity]; docident [getentattr] [Returns the value of the selected attribute of the nearest entity.]; docargument [A] [attribute index] [0..6] [0]; docargument [U] [unscaled flag] [0 or 1] [0]; docremark [It returns float values for some attributes. If "unscaled" flag is "1", raw integer values (representing the highest resolution) are returned.]; +docref [entproperty]; +docref [getenttype]; docident [getenttype] [Returns the entity type of the nearest entity.]; +docref [entproperty]; +docref [getentattr]; docident [getmapmodelattributes] [Returns values for all attributes to a specific mapmodel.]; docargument [P] [model path] [] [0]; docargument [N] [attribute name] [keywords, desc, defaults, usage, author, license, distribution, version] [0]; docremark [If modelpath is a number, it is interpreted as index for the list of models in the current map config. If no attribute name is specified, all attributes are printed to the console instead.]; +docref [mapmodel]; +docref [listallmapmodelattributes]; +docref [mapmodelregister]; +docref [mdlattribute]; docident [getmapsoundlist] [Returns a list of all *.wav and *.ogg files below packages/audio/ambience.]; +docref [mapsound]; +docref [getmapsoundorigin]; docident [getmapsoundorigin] [Returns the location where the map sound file actually can be found.]; docargument [N] [filename or partial path with filename] [] [0]; docremark [The possibilities are:]; @@ -1301,6 +1830,8 @@ docremark ["official": mapsound file was found in the working directory, which i docremark ["custom": mapsound file was found in the profile directory, which means, the mapsound is either manually installed or downloaded.]; docremark ["package dir #x": mapsound file was found in a mod directory.]; docremark [""]; +docref [mapsound]; +docref [getmapsoundlist]; docident [getmaptimestamp] [Returns the "last written" timestamp of the current map in the requested format.]; docargument [fmt] [format] [strftime format] [0]; docremark [If "fmt" starts with "U", the time is given as UTC, otherwise as local time. If "fmt" is empty, or not given or just the "U", the format defaults to "YYYYMMDD_hh.mm.ss". Use "%c" to get something nicer.]; @@ -1315,6 +1846,8 @@ docexample [echo (gettexturelist)] [Outputs two columns like "noctua/wall" "wall docexample [echo (gettexturelist "" "map_editor skymaps")] [Outputs two columns like "noctua/wall" "wall02.jpg", but omits skymaps and special textures for the editor]; docexample [echo (gettexturelist makke)] [Outputs only textures by makke and adds a third column like "makke/rattrap" "rb_box_03.jpg" "/rattrap"]; docexample [echo (gettexturelist "skymaps/" "" "_ft.jpg")] [Outputs four columns like "skymaps/egypt" "egypt_ft.jpg" "egypt" "egypt", "skymaps/humus" "meadow_ft.jpg" "humus" "meadow"]; +docref [texture]; +docref [gettextureorigin]; docident [gettextureorigin] [Returns the location where the texture file actually can be found.]; docargument [N] [filename or partial path with filename] [] [0]; docremark [The possibilities are:]; @@ -1322,11 +1855,16 @@ docremark ["official": texture file was found in the working directory, which in docremark ["custom": texture file was found in the profile directory, which means, the texture is either manually installed or downloaded.]; docremark ["package dir #x": texture file was found in a mod directory.]; docremark [""]; +docref [texture]; +docref [gettexturelist]; docident [getwatercolour] [Returns a string with the four components of the water colour: red, green, blue and alpha.]; docexample [echo (getwatercolor)] [Output: 20 25 20 178]; +docref [watercolour]; +docref [setwatercolour]; docident [gotoentity] [Jump to the location of a map entity.]; docargument [N] [the entity number] [] [0]; docremark [You can get the entity number with use "enumentities" command.]; +docref [enumentities]; docident [gotoposition] [Only in edit mode: get and set camera position.]; docargument [x] [X coordinate] [float] [0]; docargument [y] [Y coordinate] [float] [0]; @@ -1337,34 +1875,54 @@ docremark [Returns x, y, z, yaw and pitch. Sets x, y, z, yaw and pitch, if the p docexample [echo (gotoposition)] [Output: 67.7 78.6 5.5 8 0]; docexample [gotoposition "" "" "" 180 0] [Change yaw and pitch to look straight in +y direction.]; docident [gotovantagepoint] [Sets camera position in vantage point.]; +docref [setvantagepoint]; +docref [clearvantagepoint]; docident [guidetoggle] [Enables or disables a special set of default textures while editing.]; docremark [The textures in "packages/textures/map_editor" are used.]; docident [heightfield] [Marks the current selection as a heightfield.]; docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)] [0]; docremark [marks the current selection as a heightfield, with T being floor or ceiling, as above. A surface marked as heightfield will use the vdelta values (see below) of its 4 corners to create a sloped surface. To mark a heightfield as normal again (ignoring vdelta values, set or not) use "solid 0". Default keys are h (floor) and i (ceiling).]; docremark [Heightfields should be made the exact size that is needed, not more not less. The most important reason for this is that cube automatically generates "caps" (side-faces for heightfields) only on the borders of the heightfield. This also means if you have 2 independent heightfields accidentally touch each other, you will not get correct caps. Also, a heightfield is slightly slower to render than a non-heightfield floor or ceiling. Last but not least, a heightfield should have all the same baseheight (i.e. the height determined by a normal editheight operation) to get correct results.]; +docref [vdelta]; docident [hudtexttl] [show preview of textures during editing.]; docargument [T] [time to show texture preview [ms]] [min 0/max 10000/default 2500]; docremark [When textures of the map geometry are changed, five textures around the current pick from the "last used" stack are shown.]; docremark [The texture assigned to the "sky" slot is not shown. Instead, a plain blue rectangle is used.]; +docref [edittex]; docident [ignoreoverride_limitwaveheight] [Ignores per-map overrides to limit waveheight on the client.]; docargument [N] [0: off, 1: ignore] [0..1] [0]; docremark [Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_limitwaveheight is ignored, and "waveheight" is used unchanged.]; +docref [mapoverride_limitwaveheight]; +docref [ignoreoverride_nowaterreflect]; +docref [ignoreoverride_nostencilshadows]; docident [ignoreoverride_nostencilshadows] [Ignores per-map overrides to disable stencil shadows on the client.]; docargument [N] [0: off, 1: ignore] [0..1] [0]; docremark [Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_nostencilshadows is ignored.]; +docref [mapoverride_nostencilshadows]; +docref [ignoreoverride_nowaterreflect]; +docref [ignoreoverride_limitwaveheight]; docident [ignoreoverride_nowaterreflect] [Ignores per-map overrides to disable water reflection on the client.]; docargument [N] [0: off, 1: ignore] [0..1] [0]; docremark [Ignores the overrides set by the mappers (for their maps only). If "1", mapoverride_nowaterreflect is ignored and regular client settings are used.]; +docref [mapoverride_nowaterreflect]; +docref [ignoreoverride_limitwaveheight]; +docref [ignoreoverride_nostencilshadows]; docident [listallmapmodelattributes] [Returns a table of all known mapmodels.]; docargument [N] [list of attribute names] [explodekeywords, sortby: keywords, desc, defaults, usage, author, license, distribution, version] [0]; docremark [Each model is listed with the modelpath and the values for the requested attributes. To be used instead of a fixed table in menu_edit.cfg.]; docremark [In addition to attribute names, the function also allows the keywords "explodekeywords" and "sortby:" as arguments. If "explodekeywords" is given, all mapmodels with more than one keyword are listed multiple times, once for each keyword. If an attribute name is preceeded by "sortby:" the list will be sorted by this table column. If "sortby:" is used several times, this first sort will have highest priority. The list is always sorted by path by default.]; docexample [listallmapmodelattributes sortby: author sortby: desc explodekeywords] []; +docref [mapmodel]; +docref [getmapmodelattributes]; +docref [mapmodelregister]; +docref [mdlattribute]; docident [listheaderextras] [Returns a list with additional data ("header extras") from current map header.]; docremark [The header extras can be permanent, like the embedded config file, or can be used only once after map load, like the undo/redo data. Additional extra data can be easily added and will not break backward compatibility.]; +docref [automapconfig]; +docref [embedconfigfile]; docident [loadallmapmodels] [Tries to load mapmodels from all paths below packages/models/mapmodels.]; docremark [It will throw a lot of error messages, because not all directories contain models to load. This command can be used to build or rebuild the complete list of all available mapmodels. It is only necessary, if models are added manually to the directories, since every mapmodel gets added to the list when it is loaded - which takes care of all automatically downloaded models.]; +docref [mapmodel]; docident [mapareacheck] [Calculates some key values to determine map geometry viability.]; docargument [W] [what] [vdelta, steepest, total, pprest, pp (default)] [0]; docremark [It returns different sets of statistics, depending on the keyword "what":]; @@ -1377,62 +1935,125 @@ docident [mapbackupsonsave] [Determines if map backups (.bak) should be created 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.]; +docref [newmap]; +docref [mapsize]; +docref [mapshrink]; docident [mapinfo_comment] [Sets the map comment string.]; docargument [C] [comment] [string] [0]; docremark [The variable is stored withing the header of a map file. The comment string is ignored, as long as no map license string is set.]; docremark [You can get the comment string with the $mapinfo_comment variable.]; +docref [mapinfo_license]; docident [mapinfo_license] [Sets the map license.]; docargument [L] [type of license] [string] [0]; docremark [The name of license is stored withing the header of a map file. The license string is meant to hold an abbreviated name of the license, picked from a list of known map licenses.]; docremark [You can get the type of map license with the $mapinfo_license variable.]; +docref [mapinfo_comment]; docident [mapmodelchanged] [Set to "1" with every command that changes mapmodel slots.]; docargument [N] [0: not changed, 1: changed] [min 0/max 1/default 0]; docremark [Should be used to trigger a rebuild of mapsound menus.]; +docref [mapmodel]; +docref [editmapmodelslot]; +docref [deletemapmodelslot]; docident [mapmodelregister] [Adds values for all attributes to a specific mapmodel.]; docargument [P] [model path] [] [0]; docargument [V] [list of all attribute values] [] [0]; docremark [This is used to restore the cached values from config/mapmodelattributes.cfg during game start. It does not actually verify of load the model.]; +docref [mapmodel]; +docref [getmapmodelattributes]; +docref [listallmapmodelattributes]; +docref [mdlattribute]; docident [mapmodelslotbyname] [Returns the slot number registered in the map config file of the model with the given name.]; docargument [M] [mapmodel name (with path)] [] [0]; docexample [echo (mapmodelslotbyname "mapmodels/makke/platform_bridge")] [Output: 5]; +docref [mapmodel]; +docref [mapmodelslotname]; +docref [mapmodelslotusage]; +docref [editmapmodelslot]; +docref [deletemapmodelslot]; docident [mapmodelslotname] [Returns the map model name (and path) of the mapmodel registered in the given slot number in the map config file.]; docargument [N] [mapmodel slot number] [] [0]; +docref [mapmodel]; +docref [mapmodelslotbyname]; +docref [mapmodelslotusage]; +docref [editmapmodelslot]; +docref [deletemapmodelslot]; docident [mapmodelslotusage] [Returns a list of map entity indices which use a certain mapmodel slot.]; docargument [N] [mapmodel slot number] [] [0]; docremark [If the mapmodel is unused, it returns an empty string.]; +docremark [It returns a single space, if the model slot is not used by any map entity, but is required by another model (with entities).]; +docref [mapmodel]; +docref [mapmodelslotname]; +docref [mapmodelslotbyname]; +docref [editmapmodelslot]; +docref [deletemapmodelslot]; +docident [mapmodelzoff] [Allows negative z-offsets for mapmodels.]; +docargument [N] [mapmodel slot number] [] [0]; +docremark [A mapmodel entity is placed at a z-coordinate that is based on the floor height of map geometry and a z-offset. The z-offset is a sum of the entity attribute 3 and the third mapmodel slot parameter. The entity z-offset can range from 0 to 255 while the mapmodel slot parameter can be any integer including negative numbers. So, to place a mapmodel below floor height, the mapmodel slot parameter has to be negative.]; +docremark ["mapmodelzoff" script decreases the mapmodel slot parameter by one and increases the z-offset of every mapmodel which uses that slot also by one. This means, that all mapmodel are exact in the same place afterwards - but the entity z-offset now has room to lower the mapmodel by one more cube.]; +docremark [If you need more z-offset available, run the script several times.]; docident [mapmrproper] [Cleanups hidden map attributes.]; docremark ["mapmrproper" tries to optimize hidden attributes of maps in a way, that the map can be handled in bigger chunks by the renderer.]; docremark [The mipmapping routine does not take into account, if certain textures of a cube are visible at all, when it collects otherwise identical cubes to be handled en-bloc. "mapmrproper" changes invisible textures in a way, that the cubes are in fact identical - so, that the mipmapper is satisfied. The optimizer does not change any map properties that are visible in any way.]; docremark [Before any changes are made, mapmrproper creates a backup, which can be restored by "undo" command. Enable mipstats ("showmip" command), to see, what has been done.]; +docref [showmip]; docident [mapmsg] [Sets the map message, which will be displayed when the map loads.]; docargument [M] [The map message] [String] [0]; docremark [You will need to use quote marks around the message, otherwise it save the message correctly.]; docremark [For example: /mapmsg "Map By Author"]; docremark [You can get the current map message with the $mapmsg variable.]; +docref [editmapmsg]; docident [mapoverride_limitwaveheight] [Per-map override to limit waveheight on the client.]; docargument [N] [0: off, 1: limit waveheight] [0..1] [0]; docremark [Set by the mapper, for his map only. The overrides are stored in the map header.]; docremark [If "1", waveheight is capped at 0.1 max. Useful for small water areas (like puddles), where higher waves would look weird.]; +docref [mapoverride_nowaterreflect]; +docref [mapoverride_nostencilshadows]; +docref [ignoreoverride_limitwaveheight]; docident [mapoverride_nostencilshadows] [Per-map override to disable stencil shadows on the client.]; docargument [N] [0: off, 1: disable stencil shadows] [0..1] [0]; docremark [Set by the mapper, for his map only. The overrides are stored in the map header.]; docremark [If "1", stencil shadows are disabled. On clients, where stencil shadows are otherwise enabled, blob shadows are used instead. If shadows are disabled anyway, they stay disabled. Useful for dim maps, where hard shadows make no sense.]; +docref [mapoverride_nowaterreflect]; +docref [mapoverride_limitwaveheight]; +docref [ignoreoverride_nostencilshadows]; docident [mapoverride_nowaterreflect] [Per-map override to disable water reflection on the client.]; docargument [N] [0: off, 1: disable water reflection] [0..1] [0]; docremark [Set by the mapper, for his map only. The overrides are stored in the map header.]; docremark [If "1", water reflection is disabled. Useful, when odd water colours are used to emulate other liquids that are not supposed to be that reflective.]; +docref [mapoverride_limitwaveheight]; +docref [mapoverride_nostencilshadows]; +docref [ignoreoverride_nowaterreflect]; docident [mapshrink] [Reduces the world size by 1.]; docremark [This command will make the current map 1 power of two smaller. So a size 7 map (128x128) will become a 6 size map (64x64 units), by removing 32 cubes from each side. The area to be removed needs to be empty (= all solid).]; +docref [newmap]; +docref [mapsize]; +docref [mapenlarge]; +docident [mapsize] [Outputs the mapsize.]; +docref [newmap]; +docref [mapenlarge]; +docref [mapshrink]; docident [mapsoundchanged] [Set to "1" with every command that changes mapsound slots.]; docargument [N] [0: not changed, 1: changed] [min 0/max 1/default 0]; docremark [Should be used to trigger a rebuild of mapsound menus.]; +docref [mapsound]; +docref [editmapsoundslot]; +docref [deletemapsoundslot]; docident [mapsoundslotbyname] [Returns the list of numbers of all mapsound slots which use that sound file.]; docargument [N] [map sound filename] [] [0]; +docref [mapsound]; +docref [mapsoundslotusage]; +docref [editmapsoundslot]; +docref [deletemapsoundslot]; docident [mapsoundslotusage] [Returns a list of map entity indices which use a certain map sound slot.]; docargument [N] [map sound slot number] [] [0]; docremark [If the sound is unused, it returns an empty string.]; +docref [mapsound]; +docref [mapsoundslotbyname]; +docref [editmapsoundslot]; +docref [deletemapsoundslot]; docident [mapstats_hud] [Controls whether or not to show map statistics on map load.]; docargument [N] [0: Don't show, 1: Show] [min 0/max 1/default 0]; +docref [showmapstats]; docident [movemap] [Move the whole map (including all entities) in the specified direction.]; docargument [dX] [x-offset] [] [0]; docargument [dY] [y-offset] [] [0]; @@ -1463,6 +2084,7 @@ docident [newent helmet] [Adds a new helmet item.]; docident [newent ladder] [Adds a ladder entity.]; docargument [H] [the height of the ladder] [integer] [0]; docremark [Note that this entity is used for physics only, to create a visual ladder you will need to add a mapmodel entity too.]; +docref [newent mapmodel]; docident [newent light] [Adds a new light entity]; docargument [radius] [the light radius] [1..32] [0]; docargument [R] [red colour component. see remarks below.] [1..255] [0]; @@ -1492,21 +2114,31 @@ docargument [S] [the size] [default 0] [0]; docargument [V] [the volume] [default 255] [0]; docremark [Will play map-specific sound so long as the player is within the radius. However, only up to the maxuses allowed for N (specified in the mapsound command) will play, even if the player is within the radius of more N sounds than the max. By default (size 0), the sound is a point source. Its volume is maximal at the entity's location, and tapers off to 0 at the radius. If size is specified, the volume is maximal within the specified size, and only starts tapering once outside this distance. Radius is always defined as distance from the entity's location, so a size greater than or equal to the radius will just make a sound that is always max volume within the radius, and off outside.]; docremark [A sound entity can be either ambient or non-ambient. Ambient sounds have no specific direction, they are 'just there'. Non-ambient sounds however appear to come from a specific direction (stereo panning). If S is set to 0, the sound is a single point and will therefore be non-ambient. However if S is greater than 0, the sound will be ambient as it covers a specified area instead of being a single point.]; +docref [mapsound]; docident [newmap] [Creates a new map.]; docargument [S] [the size of the new map] [6..9] [0]; docremark [The new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large.]; +docref [mapsize]; +docref [mapenlarge]; +docref [mapshrink]; 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 [oldselstyle] [Enables or disables using squares to render the editing grid/current selection instead of triangles.]; docargument [N] [0 off, 1 on] [min 0/max 1/default 1]; -docident [onNewMap] [If this alias exists, it will automatically be executed when you create a new map via the "newmap" command (not to be confused with loading an existing map).]; +docident [onNewMap] [This alias will automatically be executed when a new map is created via the "newmap" command.]; +docremark [Does not affect the loading of an existing map.]; +docref [newmap]; +docref [mapstartonce]; +docref [mapstartalways]; 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.]; dockey [V] [] []; +docref [copy]; docident [pasteent] [Pastes a previously copied entity.]; docremark [Only works while in edit mode.]; +docref [copyent]; 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]; @@ -1515,30 +2147,45 @@ docremark [Keep the seed the same to create multiple perlin areas which fit with docident [preserveundosonsave] [Determines if undo data should be preserved on using "savemap" command.]; docargument [N] [0: don't preserve undos, 1: preserve undos] [min 0/max 1/default 0]; docremark [Undo data can be saved only in edit mode.]; +docref [savemap]; docident [pushselections] [Stores the positions of all current selections.]; docremark [Can be used repeatedly. To restore the selections, type "popselections".]; +docref [select]; +docref [addselection]; docident [recalc] [Recomputes all there is to recompute about a map, currently only lighting.]; docident [redo] [Redoes editing operations undone by 'undo'.]; docremark [With editmeta pressed it also restores player position and selects the affected area.]; dockey [R] [] []; +docref [undo]; +docref [editmeta]; docident [replace] [Repeats the last texture edit throughout the map.]; docremark [The way it works is intuitive: simply edit any texture anywhere, then using "replace" will replace all textures throughout the map in the same way (taking into account whether it was a floor/wall/ceil/upper too). If the there was more than one "old" texture in your selection, the one nearest to the red dot is used. This operation can't be undone.]; docident [rereadsoundlists] [Variable, which is set to "1" when a sound is downloaded.]; docargument [N] [is sound downloaded?] [0: no, 1: yes min 0/max 1/default 1]; docremark [Used to trigger menu rebuilds.]; +docref [rereadtexturelists]; docident [rereadtexturelists] [Variable, which is set to "1" when a texture is downloaded.]; docargument [N] [is texture downloaded?] [0: no, 1: yes min 0/max 1/default 1]; docremark [Used to trigger menu rebuilds.]; +docref [rereadsoundlists]; docident [resetselections] [Resets all current selections.]; +docref [select]; +docref [selectall]; +docref [addselection]; docident [savemap] [Saves the current map.]; docargument [M] [file name of the map, see command 'map' for the naming scheme] [string] [0]; docremark [It makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name.]; 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.]; docremark [For "savemap" to save different maps during editing with undo data, the variable "preserveundosonsave" has to be "1". It is "0" by default. "savemap" when not editing saves optimised map, with no undo data.]; +docref [map]; +docref [savemapoptimised]; +docref [preserveundosonsave]; docident [savemap9] [Saves a map in old map format 9 (may lose some map details that are not possible with format 9).]; docident [savemapoptimised] [Saves optimised the current map, with no undo data.]; docargument [M] [file name of the map, see command 'map' for the naming scheme] [string] [0]; docremark [It makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name.]; +docref [map]; +docref [savemap]; docident [scalelights] [Scales all lights in the map.]; docargument [S] [size change (percentage)] [] [0]; docargument [I] [intensity change (percentage)] [] [0]; @@ -1549,7 +2196,22 @@ docargument [Y] [the Y coordinate] [] [0]; docargument [XS] [the length along the X axis] [] [0]; docargument [XY] [the length along the Y axis] [] [0]; docremark [This command is similar to addselection although "select" resets all selections.]; +docref [addselection]; +docref [selectall]; +docref [resetselections]; +docref [expandselection]; +docref [shrinkselection]; +docref [enlargevdeltaselections]; +docref [selx]; +docref [sely]; +docref [selxs]; +docref [selys]; +docref [selectionwalk]; +docref [pushselections]; docident [selectall] [Selects the whole map (minus the two cubes wide border).]; +docref [select]; +docref [addselection]; +docref [resetselections]; docident [selectionflip] [Flip the selected part of the map at an axis.]; docargument [AXIS] [X or Y] [] [0]; docident [selectionrotate] [Rotate the selected part of the map in 90 degree steps.]; @@ -1570,25 +2232,48 @@ docremark ["sw_wtex", "sw_ftex", "sw_ctex", "sw_utex" - texture slot indices for docremark ["sw_vdelta", "sw_tag" - vdelta and tag values of current cube.]; docremark ["sw_r", "sw_g", "sw_b" - current light values of current cube. Can be edited, but only with temporary effect. Will be reset with the next light recalc.]; docremark [The command is mostly useful for statistics scripts (like counting cubes with certain attributes), but is can also be used for scripted editing, as the following (useless) example shows: selectionwalk [ += sw_floor (rnd 2) ]]; +docref [select]; +docref [addselection]; docident [selx] [Returns the x-coordinate of the westernmost (towards negative x) cube(s) in the current selection.]; +docref [select]; +docref [sely]; +docref [selxs]; +docref [selys]; docident [selxs] [Returns the x-span (size on the x-axis) of the current selection.]; +docref [select]; +docref [selx]; +docref [sely]; +docref [selys]; docident [sely] [Returns the y-coordinate of the northernmost (towards negative y) cube(s) in the current selection.]; +docref [select]; +docref [selx]; +docref [selxs]; +docref [selys]; docident [selys] [Returns the y-span (size on the y-axis) of the current selection.]; +docref [select]; +docref [selx]; +docref [sely]; +docref [selxs]; 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 [setvantagepoint] [Sets vantage point in current camera position.]; docremark [The vantage point is supposed to be a distinctive view on a map - like the angle from which the preview picture was taken.]; docremark [A map can only have one vantage point.]; +docref [gotovantagepoint]; +docref [clearvantagepoint]; docident [setwatercolour] [Allows setting the components of the water colour independently.]; docargument [W] [what] [red (0), green (1), blue (2), alpha (3)] [0]; docargument [V] [value] [(0)1..255] [0]; docremark ["what" is either a keyword "red|green|blue|alpha" or the index number 0..3 and determines, which component is set to value.]; docexample [setwatercolour red 200] [- sets the red component to 200]; +docref [watercolour]; +docref [getwatercolour]; docident [showclips] [Show clips/plclips/mapmodel clips in edit mode.]; docargument [N] [-] [min 0/max 1/default 1]; docident [showfocuscubedetails] [Shows detailed geometry data of the cube inside editing focus.]; docremark [It shows on the HUD cube type, floor and ceiling heights, vdelta and all textures.]; +docref [showmip]; docident [showgrid] [Show editing cursor grid.]; docargument [N] [-] [min 0/max 1/default 1]; docident [showladderentities] [Show ladder entities (as blue wireframes) in edit mode.]; @@ -1598,6 +2283,8 @@ docident [showmapstats] [Prints some map statistics.]; 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.]; docremark [If "showfocuscubedetails" is enabled, "showmip" stats on the HUD are hidden.]; +docref [calcmipstats]; +docref [showfocuscubedetails]; docident [showmodelclipping] [Show mapmodel clipping during edit mode.]; docargument [N] [-] [min 0/max 1/default 0]; docident [showplayerstarts] [Show all playerstarts in edit mode.]; @@ -1608,10 +2295,14 @@ docargument [N] [-] [min 0/max 1/default 1]; docident [shrinkselection] [Decreases the size of the current selection by N cubes on all sides.]; docargument [N] [number of cubes] [integer] [0]; docremark [Instead of manually executing this command, you can bind "domodifier 11" to a key. While holding this key you can expand/shrink the current selection with the mouse wheel.]; +docref [select]; +docref [addselection]; +docref [expandselection]; docident [slope] [Makes a slope out of the current selection.]; docargument [X] [x delta step] [integer] [0]; docargument [Y] [y delta step] [integer] [0]; docremark [The selection must be a heightfield before this command can be used. The steps specify the slope with the red vertex as left-top, i.e. "slope 1 2" will make a slope that increases just 1 step from left to right, and is slightly steeper from top to bottom. "slope -6 0" decreases steeply from left to right, and does not slope at all from top to bottom. Note that like the vdelta command, an increasing vdelta goes further away from the player, regardless of floor or ceiling.]; +docref [enlargearchslopeselections]; docident [solid] [makes the current selection all solid (i.e. wall) or all non-solid.]; docargument [B] [an integer denoting the solid-ness] [0 (non-solid), 1..* (solid)] [0]; docremark [This operation retains floor/ceiling heights/textures while swapping between the two. Default keys f and g respectively.]; @@ -1624,12 +2315,18 @@ docexample [sortmapmodelslots] [- sorts the mapmodel slot list alphabetically an docexample [sortmapmodelslots nosort] [- merges (deletes) unused double entries in the mapmodel slot list]; docexample [sortmapmodelslots nosort mergeused] [- merges double entries in the mapmodel slot list. If two identical entries are used in the map, all uses are mapped to the new combined slot. This leaves no visual changes on the map. Should be avoided, if mapmodel slots have been renamed manually - and the renaming isn't finished yet]; docexample [sortmapmodelslots mergeused] [- sorts the mapmodel slot list and merges all double entries]; +docref [mapmodel]; +docref [sorttextureslots]; +docref [sortmapsoundslots]; docident [sortmapsoundslots] [Sorts all mapsound slots alphabetically and merge identical slots.]; docargument [nosort] [do not sort the list alphabetically] [] [0]; docargument [nomerge] [do not merge any slots] [] [0]; docargument [mergeused] [merge used and unused (identical) slots freely] [] [0]; docremark [By default, the list is sorted and only unused identical slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".]; docremark [See examples in the "sortmapmodelslots" reference.]; +docref [mapsound]; +docref [sortmapmodelslots]; +docref [sorttextureslots]; docident [sorttextureslots] [Sorts all texture slots alphabetically and merge identical slots.]; docargument [nosort] [do not sort the list alphabetically] [] [0]; docargument [nomerge] [do not merge any slots] [] [0]; @@ -1637,15 +2334,30 @@ docargument [mergeused] [merge used and unused (identical) slots freely] [] [0]; docremark [By default, the list is sorted (besides the first five) and only unused identical (with the same texture and scale factor) slots are merged. The keywords can be combined in any order. "nomerge" takes priority over "mergeused".]; docremark [It allows to manually sort also the first few slots by adding the slot number to move to the slots #1, #2, #3, #4 (for example "sorttextureslots 11 12 13 14" will move slot #11 to slot #1, #12 to #2, #13 to #3 and #14 to #4, and sort the rest texture slots).]; docremark [See examples in the "sortmapmodelslots" reference.]; +docref [texture]; +docref [sortmapmodelslots]; +docref [sortmapsoundslots]; docident [stairs] [Places stairs in all selections.]; docargument [xs] [step width in x-direction] [] [0]; docargument [ys] [step width in y-direction] [] [0]; docremark ["xs" and "ys" determine the step width in x- and y-direction.]; docident [textureslotbyname] [Returns the list of numbers of all texture slots which use that texture file.]; docargument [N] [texture filename] [] [0]; +docref [texture]; +docref [textureslotusage]; +docref [textureslotusagelist]; +docref [edittextureslot]; +docref [deletetextureslot]; +docref [edittexturestack]; docident [textureslotusage] [Returns a list of mapmodels who use that texture as skin.]; docargument [N] [texture slot number] [0..255] [0]; docremark [If no mapmodel uses the texture, but world geometry does, a string of whitespace is returned. If the mapmodel is unused, an empty string is returned.]; +docref [texture]; +docref [textureslotusagelist]; +docref [textureslotbyname]; +docref [edittextureslot]; +docref [deletetextureslot]; +docref [edittexturestack]; docident [textureslotusagelist] [Returns a list of 256 numbers representing the number of uses for every texture slot.]; docargument [W] [what] [onlygeometry, onlymodels, onlymostvisible] [0]; docremark [If "what" is "onlygeometry", the uses as map model skin do not count.]; @@ -1653,36 +2365,60 @@ docremark [If "what" is "onlymodels", the uses in map geometry do not count.]; docremark [It returns two values per slot: usage and visibility.]; docremark [If "what" is "onlymostvisible", instead of the regular list, a list of only the most used wall, floor, ceiling and upper wall textures (alternating with the keywords) is returned.]; docexample [echo (textureslotusagelist onlymostvisible)] [Output: wall 211 floor 45 ceiling 0 "upper wall" 79]; +docref [texture]; +docref [textureslotusage]; +docref [textureslotbyname]; +docref [edittextureslot]; +docref [deletetextureslot]; +docref [edittexturestack]; docident [toggleclosestentpin] [Toggles the pin on the "closest entity" selector.]; docremark [The HUD will indicate the lock by showing "pinned" instead of "closest" entity. All actions, that would otherwise affect the closest entity, will affect the pinned entity instead. Deleting the locked entity will unlock it.]; dockey [MOUSE3] [middle mouse button] [toggles the pin on the closest entity]; -docident [togglegrab] [Will toggle the focus of the mouse in game. Normally you can use your mouse to look around, when you type this command your mouse cursor is visible and can be used as normally. This is only useful when you run cube windowed.]; +docref [getclosestent]; docident [toggleocull] [Turns occlusion culling on and off.]; docremark [The reason one may want to turn it off is to get an overview of the map from above, without having all occluded bits stripped out.]; -docident [transformclipentities] [Transforms all clip entities to tag clips, if they are big enough (so that no player could be above or below them).]; +docident [transformclipentities] [Transforms all full height clip entities to tag clips.]; +docref [edittagclip]; docident [undelent] [Restores deleted entity.]; docargument [I] [index] [] [0]; docremark [If no index is specified, the last deleted entity is restored. If an index is given, the specified entity from the list of deleted entities is restored.]; docremark [BACKSPACE in combination with editmeta undeletes the last deleted entity.]; docremark [BACKSPACE in combination with editmeta2 brings up the menu "deleted entities".]; +docref [getdeletedentities]; +docref [unlistdeletedentity]; +docref [deleteentity]; +docref [editmeta]; +docref [editmeta2]; docident [undo] [Multi-level undo of any of the changes caused by editing operations.]; docremark [With editmeta pressed it also restores player position and selects the affected area.]; dockey [U] [] []; +docref [redo]; +docref [undolevel]; +docref [undomegs]; +docref [editmeta]; docident [undolevel] [Returns the number of undo steps that can be undone.]; docargument [L] [level] [integer] [0]; docremark [If argument "level" is given, as many steps are undone, until "level" steps remain.]; docremark [Unless memory limits delete states, undolevel commands can be undone with "redo".]; docexample [echo (undolevel)] [- prints number of previous editing steps, for example "55". Do some editing and:]; docexample [undolevel 55] [- undoes all changes to restore the previous state (if that state is still in memory)]; +docref [undo]; +docref [redo]; +docref [undomegs]; docident [undomegs] [Sets the number of megabytes used for the undo buffer.]; docargument [N] [number of megabytes] [integer min 0/max 50/default 5]; docremark [Undo's work for any size areas, so the amount of undo steps per megabyte is more for small areas than for big ones (a megabyte fits 280 undo steps on a 16x16 area, but only 4 steps on a 128x128 area).]; +docref [undo]; +docref [undolevel]; docident [unlistdeletedentity] [Removes entities from the list of deleted entities.]; docargument [W] [which] [[a number], all or last] [0]; docremark [If is a number, the specified entry from the list of deleted entities gets removed.]; docremark [If is "all", the whole list of deleted entities gets deleted.]; docremark [If is "last" the last deleted entity is removed from the list of deleted entities.]; docremark [Returns the number of entities on the list of deleted entities (even if the parameter was unknown or not specified).]; +docref [getdeletedentities]; +docref [undelent]; +docref [deleteentity]; docident [unsavededits] [Holds the number of unsaved edits.]; docident [vdelta] [changes the vdelta value of the current selection]; docargument [N] [vdelta value] [] [0]; @@ -1692,15 +2428,27 @@ docident [waterlevel] [Sets the global water level for the map.]; docargument [H] [the water level] [float, -10000="no water" min -128/max 127/default -10000]; docremark [Every cube that has a lower floor than the water level will be rendered with a nice wavy water alpha texture. Water physics will be applied to any entity located below it.]; docremark [Performance notes: water is rendered for a whole square encapsulating all visible water areas in the map (try flying above the map in edit mode to see how). So the most efficient water is a single body of water, or multiple water areas that are mostly not visible from each other. Players can influence how accurate the water is rendered using the "watersubdiv" command (map config).]; +docref [watersubdiv]; docident [xmap_delete] [Deletes the named snapshot.]; docargument [N] [nickname] [] [0]; +docref [xmap_list]; docident [xmap_delete_backup] [Deletes the backup xmap.]; +docref [xmap_list]; docident [xmap_keep_backup] [Moves the backup xmap to a regular named spot.]; docargument [N] [nickname] [] [0]; +docref [xmap_list]; docident [xmap_list] [Lists all xmaps currently in memory.]; +docref [xmap_store]; +docref [xmap_restore]; +docref [xmap_delete]; +docref [xmap_delete_backup]; +docref [xmap_keep_backup]; +docref [xmap_rename]; +docref [enumtodoentities]; docident [xmap_rename] [Changes the nickname of the xmap.]; docargument [O] [old nickname] [] [0]; docargument [N] [new nickname] [] [0]; +docref [xmap_list]; docident [xmap_restore] [Restores the xmap snapshot.]; docargument [N] [nickname] [] [0]; docremark [1. If nickname is not given, it restores the last automatic backup snapshot. Automatic snapshots are taken:]; @@ -1708,36 +2456,61 @@ docremark [a) before a snapshot is restored,]; docremark [b) before a new map is loaded (if there were unsaved edits on the map) and]; docremark [c) when the game ends (if there were unsaved edits).]; docremark [2. If nickname is given, the command restores the named snapshot, it also creates a backup snapshot of the current editing data.]; +docref [xmap_list]; +docref [xmap_store]; docident [xmap_store] [Creates a snapshot and stores it under the given nickname.]; docargument [N] [nickname] [] [0]; docremark [Nicknames have to qualify as valid filenames.]; +docref [xmap_list]; +docref [xmap_restore]; docsection [Menus] docident [browsefiledesc] [Toggles getting descriptive text from CGZ or DMO files in menudirlist.]; docargument [B] [] [min 0/max 1/default 1]; +docref [menudirlist]; docident [chmenumdl] [Changes the menu model of a specified menu.]; docargument [N] [the name of the menu] [] [0]; docargument [M] [the (new) model] [] [0]; docargument [A] [the animation to play] [] [0]; docargument [R] [the rotation speed] [] [0]; docargument [S] [the scale] [] [0]; +docref [menumdl]; docident [chmenutexture] [Displays a texture on the right side of a menu.]; docargument [N] [the name of the menu] [] [0]; docargument [P] [the path to the texture] [] [0]; docargument [T] [the title of the picture] [] [0]; docremark [By specifying a title string in the third argument to chmenutexture, a picture is rendered instead of a texture. The title string is displayed instead of the texture resolution. The variable "menupicturesize" holds a size modifier for pictures, similar to "menutexturesize".]; +docref [menutexturesize]; +docref [menupicturesize]; docident [closecurmenu] [Closes the currently open menu.]; docremark [If more than one menu is open, only closes the topmost menu on the stack.]; +docref [curmenu]; +docref [refreshcurmenu]; +docref [refreshcurmenudelayed]; 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!]; +docref [newmenu]; +docref [showmenu]; +docref [delmenu]; +docref [closecurmenu]; docident [curmenu] [Returns the name of the currently open menu.]; docremark [If more than one menu is open, only the name of the topmost menu on the stack is returned.]; +docref [closecurmenu]; +docref [refreshcurmenu]; +docref [refreshcurmenudelayed]; docident [delmenu] [Deletes the entire contents (all menu items) of the given menu.]; docargument [N] [the name of a previously defined menu] [] [0]; +docref [newmenu]; +docref [showmenu]; +docref [closemenu]; docident [hidebigmenuimages] [Hide big images in menus.]; docargument [N] [0: show, 1: hide] [min 0/max 1/default 0]; +docident [maploaditemlength] [Changes at what position to truncate the map title string.]; +docargument [N] [chars] [min 0/max 255/default 46]; +docref [menuitemmapload]; 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 = Off, Any other integer = On] [Any integer is valid, positive or negative] [0]; +docref [allowblinkingtext]; docident [menudirlist] [Create a menu listing of files from a path and perform an action on them when clicked.]; docargument [P] [the directory path from the assaultcube root] [] [0]; docargument [E] [file extension] [] [0]; @@ -1747,14 +2520,18 @@ docargument [S] [string - search it in map/demo filenames and descriptions and s docremark [Use this inside menu definitions, almost always as the only command of that menu.]; docremark [Compare the usage inside config/menus.cfg]; docexample [menudirlist "packages/maps" "cgz" "map $arg1"] [will create a list of maps and load them when clicked]; +docref [newmenu]; +docref [browsefiledesc]; docident [menufont] [Switches the font in which the menu is displayed]; docargument [F] [font] [default, mono, serif] [0]; +docref [font]; docident [menuheader] [Adds header and/or footer to the menu.]; docargument [H] [header] [] [0]; docargument [F] [footer] [] [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.]; +docref [newmenu]; docident [menuinitselection] [Defines the initial selection for a menu.]; docargument [A] [line number] [] [0]; docident [menuitem] [Creates a new menuitem.]; @@ -1764,6 +2541,7 @@ docargument [H] [the command to execute upon rolling over the menuitem] [] [0]; docargument [D] [the description of menu item, which is displayed on the menu footer] [] [0]; docremark [Upon activating the menuitem, the associated command will be executed. (See config/menus.cfg for examples). If the command argument is omitted, then it will be set to the same value as the description. If -1 is specified instead of the command to execute, then no command is executed when activating the item. If the rollover option is used, the menuitem will execute that command when selecting (but not activating) the menuitem.]; docremark [(Note: To activate the menu item, select it, and either: Click, press SPACE or press ENTER/Return).]; +docref [newmenu]; docident [menuitemaltfont] [Displays a menu line with a text which may contain chars from an alternate font.]; docargument [N] [the name of the alternate font] [default, mono, serif, huddigits, serverquality, bargraphs, radaricons] [0]; docargument [T] [text content in menu line] [] [0]; @@ -1771,6 +2549,7 @@ docargument [A] [action] [] [0]; docargument [H] [hoveraction] [] [0]; docargument [D] [description displayed on menu footer] [] [0]; docremark [Chars from the alternate font have to be marked with "\a". Alternate font chars have no width and are just rendered above the following text. Use spaces to counter that.]; +docref [font]; docident [menuitemcheckbox] [Creates a checkbox menu item.]; docargument [T] [text] [] [0]; docargument [V] [value] [] [0]; @@ -1778,6 +2557,8 @@ docargument [A] [action] [] [0]; docident [menuitemeditkeyinput] [Menuitem which displays "text" and all keys, that bind "bindcmd"- in edit mode.]; docargument [T] [text] [] [0]; docargument [B] [bind command] [] [0]; +docref [menuitemkeyinput]; +docref [menuitemspectkeyinput]; docident [menuitemimage] []; docargument [N] [image filename] [] [0]; docargument [T] [text] [] [0]; @@ -1786,9 +2567,12 @@ docargument [H] [hoveraction] [] [0]; docident [menuitemkeyinput] [Menuitem which displays "text" and all keys, that bind "bindcmd"- in game mode.]; docargument [T] [text] [] [0]; docargument [B] [bind command] [] [0]; +docref [menuitemeditkeyinput]; +docref [menuitemspectkeyinput]; docident [menuitemmapload] [a menuitem that loads a map, displays the title and the preview or a default image]; docargument [M] [map] [] [0]; docargument [T] [text] [] [0]; +docref [maploaditemlength]; docident [menuitemslider] []; docargument [T] [text] [] [0]; docargument [L] [min] [] [0]; @@ -1800,6 +2584,8 @@ docargument [A] [action] [] [0]; docident [menuitemspectkeyinput] [Menuitem which displays "text" and all keys, that bind "bindcmd"- in spectate mode.]; docargument [T] [text] [] [0]; docargument [B] [bind command] [] [0]; +docref [menuitemkeyinput]; +docref [menuitemeditkeyinput]; docident [menuitemtextinput] [Creates a new menuitem with text input field.]; docargument [T] [text] [] [0]; docargument [V] [value] [] [0]; @@ -1812,6 +2598,8 @@ docargument [N] [the cubescript to generate the menuitem description] [] [0]; docargument [A] [the command to execute on selection of the menuitem] [] [0]; docargument [H] [the command to execute upon rolling over the menuitem] [] [0]; docremark [Like 'menuitem', but the menuitem description will be the result of an evaluation, everytime the menu gets displayed.]; +docref [newmenu]; +docref [menuitem]; docident [menumdl] [Specifies a model to render while displaying the last added menu.]; docargument [M] [the model] [] [0]; docargument [A] [the animation to play] [] [0]; @@ -1819,6 +2607,8 @@ docargument [R] [the rotation speed] [] [0]; docargument [S] [the scale] [] [0]; docident [menupicturesize] [Changes the size of pictures displayed in menus.]; docargument [N] [size factor] [min 0.1f/max 5.0f/default 1.6f]; +docref [chmenutexture]; +docref [menutexturesize]; docident [menurenderoffset] [Moves a menu away from the middle of the screen.]; docargument [X] [x-offset] [] [0]; docargument [Y] [y-offset] [] [0]; @@ -1841,30 +2631,48 @@ docremark [When enabled, it restores a previously saved selection.]; docremark [Probably most efficient inside "menuinit". The position is restored during execution of this command, so the menu entry has to already exist and the alias with the last position has to be read from saved.cfg. In automatically created menus it may be necessary to execute the command with a short delay.]; docident [menutexturesize] [Changes the size of textures displayed in menus (mostly for testing purposes).]; docargument [N] [size factor] [min 0.1f/max 5.0f/default 1.0f]; +docref [chmenutexture]; +docref [menupicturesize]; docident [newmenu] [Creates a new menu.]; docargument [N] [The name of the menu] [] [0]; docremark [All menu commands placed after newmenu (i.e. menuitem, menuitemcheckbox, etc) are added into the menu until another "newmenu" command is specified.]; +docref [menuitem]; docident [refreshcurmenu] [Refreshes (closes and opens again) the current menu.]; +docref [curmenu]; +docref [refreshcurmenudelayed]; +docref [closecurmenu]; docident [refreshcurmenudelayed] [Refreshes (closes and opens again, after very short delay) the current menu.]; +docref [curmenu]; +docref [refreshcurmenu]; +docref [closecurmenu]; 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.]; +docref [newmenu]; +docref [closemenu]; +docref [delmenu]; docident [wrapslider] [If wrapslider is set the menuitemslider will toggle to the min/max value if at end of the range.]; docargument [N] [0 off, 1 on] [min 0/max 1/default 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]; docident [accuracy] [Sets whether or not to display the accuracy information window.]; docargument [N] [1: on, 0: off] [min 0/max 1/default 0]; docremark [Accuracy is displayed for current weapon and only then, if scoreboard is turned on.]; +docref [accuracyinfo]; +docref [accuracyreset]; docident [accuracyinfo] [Shows in the console accuracy of all used weapons.]; +docref [accuracy]; docident [accuracyreset] [Resets accuracy counters.]; +docref [accuracy]; docident [altconsize] [Sets the percent of screen height for text lines on an alternate F11 history display.]; docargument [V] [] [min 0/max 100/default 0]; +docref [consize]; +docref [fullconsize]; docident [blankouthud] [Hides most of elements on the HUD for X frames.]; docargument [X] [blank out the HUD] [min 0/max 10000/default 0]; docremark [Used for "clean" screenshot. The parameter is "frames", so for example 1000 will take 20 seconds at 50 fps or second at 1000 fps.]; +docref [cleanshot]; docident [clearminimap] [Recreates the minimap for the current map.]; +docref [minimapres]; docident [cncolumncolor] [Colour of CN column in scoreboard.]; docargument [C] [color] [0 (green), 1 (blue), 2 (yellow), 3 (red), 4 (gray), 5 (white), 6 (dark brown), 7 (dark red), 8 (purple), 9 (orange) min 0/max 9/default 5]; docident [conalpha] [Sets the transparency of the console.]; @@ -1873,6 +2681,8 @@ docident [confade] [Sets how many seconds before the console text rolls (disappe 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]; +docref [altconsize]; +docref [fullconsize]; docident [crosshairfx] [Turns on or off crosshair effects.]; docargument [] [turn off all effects] [0] [0]; docargument [] [turn on all effects (color and size change)] [1 (default)] [0]; @@ -1893,11 +2703,25 @@ 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 [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 [dbgpos] [Displays local player's current x,y,z position in map, showstats 1 must be enabled.]; +docargument [V] [display current position] [min 0/max 1/default 0]; +docref [showstats]; docident [fullconsize] [Sets the percent of screen height for text lines on the F11 history display.]; docargument [V] [] [min 0/max 100/default 40]; +docref [consize]; +docref [altconsize]; docident [gametimedisplay] [Show the game-time clock on the HUD.]; docargument [D] [off (0), count backward (1), count forward (2)] [min 0/max 2/default 1]; docremark [The clock can count backward (from time limit to 0s) or forward (from 0s to time limit).]; +docref [wallclockformat]; docident [hidecompass] [Turns on/off the radar compass]; docargument [V] [enable/disable radar compass] [min 0/max 1/default 0]; docident [hideconsole] [Turns on or off the display of console text.]; @@ -1912,6 +2736,7 @@ docident [hidehudmsgs] [Turns on or off the display of messages at the bottom of docargument [V] [enable/disable messages] [min 0/max 1/default 0]; docident [hidektfindicator] [Turns on or off the display of ktf flag direction indicator.]; docargument [V] [enable/disable ktf indicator] [min 0/max 1/default 0]; +docref [ktfindicatoralpha]; 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.]; @@ -1926,22 +2751,23 @@ 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]; +docref [consize]; +docref [hideconsole]; +docref [hidehudmsgs]; 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 [ktfindicatoralpha] [Sets the level of transparency of ktf flag direction indicator, 100 = totaly solid.]; docargument [V] [ktf indicator alpha value] [min 1/max 100/default 70]; +docref [hidektfindicator]; 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]; +docref [clearminimap]; docident [oldfashionedgunstats] [Shows ammo statistics like version 1.0]; docargument [N] [0: new, 1: old] [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 4/max 64/default 12]; docident [radarheight] [change at what height you are floating in the radar-view]; docargument [H] [height] [min 5/max 500/default 150]; -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 [sc_clientnum] [Sets the order priority for the column cn on the scoreboard.]; docargument [V] [low priority: left, high priority: right] [min 0/max 100/default 6]; docident [sc_deaths] [Sets the order priority for the column deaths or disables it on the scoreboard.]; @@ -1958,8 +2784,17 @@ docident [sc_ratio] [Sets the order priority for the column ratio or disables it docargument [V] [-1: disable, low priority: left, high priority: right] [min -1/max 100/default -1]; docident [sc_score] [Sets the order priority for the column score or disables it on the scoreboard.]; docargument [V] [-1: disable, low priority: left, high priority: right] [min -1/max 100/default 4]; -docident [showmodedescriptions] [enables or disables the showing of game mode descriptions on the console after map starts.]; -docargument [B] [0 off, 1 on] [min 0/max 1/default 1]; +docident [showmap] [Determines if the mini-map should be shown on screen.]; +docargument [B] [show mini-map] [min 0/max 1/default 0]; +docident [showmapbackdrop] [Determines whether to have a see-through map overview (0), or render it on a black backdrop (1) or a combination of both (2).]; +docargument [B] [backdrop-style] [min 0/max 2/default 0]; +docident [showmapbackdroptransparency] [Transparency of the black map backdrop (in percent) rendered if showmapbackdrop is set to 2.]; +docargument [T] [transparency] [min 0/max 100/default 75]; +docref [showmapbackdrop]; +docident [showscores] [Shows or hides the scores.]; +dockey [TAB] [] []; +docident [showscoresondeath] [Determines if scores should be shown on death.]; +docargument [V] [] [min 0/max 1/default 1]; docident [showspeed] [Enables or disables showing the player's horizontal speed (vector).]; docargument [N] [0 off, 1 on] [min 0/max 1/default 0]; docident [showstats] [Turns on/off display of FPS/rendering statistics on the HUD.]; @@ -1968,29 +2803,27 @@ docident [showtargetname] [enables or disables showing the player name on the HU docargument [N] [0 off, 1 on] [min 0/max 1/default 1]; docident [specthudgun] [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] []; -docargument [V] [] [min 1/max 1000/default 105]; -docident [swayupmovediv] []; -docargument [V] [] [min 1/max 1000/default 200]; -docident [swayupspeeddiv] []; -docargument [V] [] [min 1/max 1000/default 105]; +docident [toggleconsole] [Toggles the console.]; docident [votealpha] [Sets the transparency of the vote display.]; docargument [N] [Alpha value] [min 0/max 255/default 255]; docident [wallclockformat] [Show the wall clock with time (usually local, not game-time) on the HUD.]; docremark ["wallclockformat" alias should contain string in strftime format to show the clock with proper time. If the alias is empty, the wall clock is hidden.]; +docref [gametimedisplay]; docsection [Visuals] docident [aadynshadow] [Sets the size/resolution of the dynamic shadow data.]; docargument [] [the size] [min 0/max 3/default 2]; +docident [aboveheadiconfadetime] [Time in milliseconds before the abovehead icon dissapears.]; +docargument [V] [abovehead icon display time] [min 1/max 10000/default 2000]; docident [aboveheadiconsize] [Sets the size for the icon shown above a player using comunications voices.]; docargument [V] [Icon size] [min 0/max 1000/default 50]; -docident [allowblinkingtext] [for toggling on the ability for any text to have the blinking bit set.]; +docident [allowblinkingtext] [For toggling on the ability for any text to have the blinking bit set.]; docargument [T] [0 = Off, 1 = On] [min 0/max 1/default 0]; +docref [menucanblink]; docident [animationinterpolationtime] [Sets the time available for interpolation between model animations.]; docargument [N] [the amount of milliseconds for the interpolation] [min 0/max 1000/default 100]; docident [aniso] [Sets the level of anisotropic filtering.]; docargument [V] [anisotropic filtering] [min 0/max 16/default 0]; +docref [hwmaxaniso]; docident [ati_mda_bug] []; docargument [V] [] [min 0/max 1/default 0]; docident [bilinear] []; @@ -2007,20 +2840,18 @@ docident [colorbits] [Sets the bits per pixel value.]; docargument [] [bits per pixel] [min 0/max 32/default 0]; docident [curfont] [Returns a name of the current font.]; docargument [N] [name of font] [default, mono, serif min /max /default default]; -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 [dbgpos] [Displays local player's current x,y,z position in map, showstats 1 must be enabled.]; -docargument [V] [display current position] [min 0/max 1/default 0]; +docref [font]; +docref [setfont]; 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 [desktoph] [Returns a height of the desktop resolution (or zero, if not available).]; +docref [desktopw]; +docref [screenres]; +docident [desktopw] [Returns a width of the desktop resolution (or zero, if not available).]; +docref [desktoph]; +docref [screenres]; docident [dynlight] [Determines whether dynamic shadows and lights are rendered, provided just incase they slow your fps down too much.]; docargument [R] [0 off, 1 on] [min 0/max 1/default 1]; docident [dynshadow] [Sets the alpha value (transparency) for dynamic shadows.]; @@ -2040,43 +2871,55 @@ docargument [C] [offset (co-ordinate X)] [] [0]; docargument [D] [offset (co-ordinate Y)] [] [0]; docargument [E] [offset (width)] [] [0]; docargument [F] [offset (height)] [] [0]; +docref [fontchar]; +docref [fontskip]; +docref [setfont]; +docref [menufont]; +docref [scorefont]; +docref [menuitemaltfont]; docident [fontchar] [Specifies 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]; +docref [font]; +docref [fontskip]; docident [fontskip] [Specifies, at what char the font definition proceeds.]; docargument [A] [the ascii code of the first char] [] [0]; docremark [For example "fontskip 48" means the ascii code of the first char in defined font will be "48", which is '0'; "fontskip 65" would start at 'A'.]; +docref [font]; +docref [fontchar]; docident [fov] [Sets the field of view (fov).]; docargument [N] [the FOV value] [min 75/max 120/default 90]; -docident [fpsrange] [(descripton unavailable)]; +docident [fpsrange] [Sets the range of FPS (AC will adjust LOD to achieve it).]; docargument [A] [min] [] [0]; docargument [B] [max] [] [0]; -docident [fragmessage] [set the frag message corresponding to a weapon (appearing on the hud).]; -docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; -docargument [M] [the message you want to appear] [example: sniped] [0]; -docexample [fragmessage sniper sniped] [It will display "you sniped unarmed" on the hud when you frag unarmed with sniper.]; +docref [maxfps]; docident [fsaa] [Sets the level of full-scene antialiasing (FSAA).]; docargument [V] [full-scene antialiasing] [min -1/max 16/default 0]; docremark [-1 uses the default settings obtained from the system. 0 disables, 1..16 enables FSAA.]; -docident [fullbrightlevel] [Sets the level of brightness to use when using the command "/fullbright 1".]; -docargument [V] [Light intensity level] [min 0/max 255/default 176]; docident [fullscreen] [Enables or disables fullscreen.]; docargument [] [fullscreen] [min 0/max 1/default 1]; +docref [fullscreentoggle]; docident [fullscreentoggle] [Toggles fullscreen on or off.]; +docref [fullscreen]; docident [gamma] [Sets the temporary (to next map start) 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 [getdisplayresolutions] [Returns a list of available screen resolutions.]; +docref [screenres]; docident [gib] [Enables or disables the gib animation entirely.]; 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).]; -docargument [N] [the weapon number or name] [0 (knife), 1 (pistol), 2 (carbine), 3 (shotgun), 4 (subgun), 5 (sniper), 6 (assault), 7 (grenades), 8 (akimbo)] [0]; -docargument [M] [the message you want to appear] [example: slashed] [0]; -docremark [This command is identical to fragmessage, please see it.]; +docref [gibnum]; +docref [gibspeed]; +docref [gibsgore]; +docref [gibttl]; +docref [popdeadplayers]; 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.]; +docref [gibttl]; +docref [gibspeed]; docident [gibsgore] [Adjusts gib/gibnum/gibspeed/gibttl variables collectively.]; docargument [] [] [0 - Off] [0]; docargument [] [] [1 - Default/Normal values] [0]; @@ -2086,27 +2929,43 @@ docargument [] [] [4 - Unrealistic] [0]; docargument [N] [] [min 0/max 4/default 1]; docident [gibspeed] [Sets the velocity at which gibs will fly from a victim.]; docargument [N] [velocity] [min 1/max 100/default 30]; +docref [gibnum]; +docref [gibttl]; docident [gibttl] [Sets the time for gibs to live (in milliseconds), after which they will disappear.]; docargument [N] [time to live] [min 0/max 60000/default 7000]; -docident [glext] [checks for the searchstring in all loaded extensions]; +docref [gibnum]; +docref [gibspeed]; +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 [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).]; +docident [hidecustomskins] []; +docargument [B] [] [min 0/max 1/default 0]; +docident [hirestextures] [Controls whether textures with a scale higher than 1.0 will be scaled down while loading (0) or not (1).]; docargument [S] [scale down?] [min 0/max 1/default 1]; +docref [texture]; docident [hwmaxaniso] [Shows the maximum level of anisotropic filtering supported by the graphics hardware.]; +docref [aniso]; docident [hwtexsize] [Shows the maximum texture size (in pixels) supported by the graphics hardware.]; +docref [maxtexsize]; 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]; +docref [recalc]; +docident [maxfps] [Limits the FPS (frames per second) of AssaultCube's video output.]; +docargument [V] [maximum FPS] [0 disables maxfps min 25 or 0/max 1000/default 200]; +docremark [Remark: limit to '200' is optimal.]; +docref [maxfps]; docident [maxroll] [Sets the maximum value the display will roll on strafing.]; docargument [N] [the roll value] [min 0/max 20/default 0]; +docref [maxrollremote]; docident [maxrollremote] [Limits the maximum value the display will roll on strafing when spectating other players.]; docargument [N] [The roll value] [min 0/max 20/default 0]; docremark [This only comes into effect if the remote client being spectated has a maxroll greater than 0.]; -docident [maxtexsize] [The maximum texture (if less than hwtexsize) that will actually be used by the engine, larger textures will be scaled down. 0 removes this limit.]; +docref [maxroll]; +docident [maxtexsize] [The maximum texture size that will be used by the engine, larger textures will be scaled down.]; docargument [V] [maximum texture size] [min 0/max 4096/default 0]; +docremark [If this value is zero, hwtexsize will be used.]; +docref [hwtexsize]; docident [maxtmus] [Gets the maximum number of supported textures when performing multitexturing.]; docident [maxtrail] [Maximum number of smoke particles along shotline of sniper rifle.]; docargument [N] [maximum number of smoke particles] [min 1/max 10000/default 500]; @@ -2118,18 +2977,23 @@ docident [mdlstatcache] []; docargument [V] [] [min 1/max 32/default 1]; docident [mergestrips] []; docargument [V] [] [min 0/max 1/default 1]; +docident [minlod] [Minimal level of detail.]; +docargument [V] [] [min 25/max 250/default 60]; docident [mtexplosion] []; docargument [V] [] [min 0/max 1/default 1]; docident [mtwater] []; docargument [V] [] [min 0/max 1/default 1]; +docident [nosway] []; +docargument [V] [] [min 0/max 1/default 0]; docident [particlesize] [Scales all particles.]; docargument [P] [the scale percentage] [min 20/max 500/default 100]; 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.]; +docident [popdeadplayers] [Makes 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]; +docref [gib]; docident [reflectclip] []; docargument [V] [] [min 0/max 100/default 1]; docident [reflectscissor] []; @@ -2137,6 +3001,8 @@ docargument [V] [] [min 0/max 1/default 1]; docident [reflectsize] []; docargument [V] [] [min 6/max 10/default 8]; docident [resetgl] [Resets the OpenGL rendering settings]; +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 [saveshadows] [Sets if dynamic shadows should be saved to disk.]; docargument [] [auto save] [min 0/max 1/default 1]; docident [scorch] []; @@ -2145,6 +3011,7 @@ docident [scorchttl] []; docargument [V] [] [min 0/max 30000/default 10000]; docident [scorefont] [Whether a special monospace font should be used to render the text on the scoreboard.]; docargument [M] [normal (0) or monospace (1)] [min 0/max 1/default 0]; +docref [font]; docident [scr_h] [Sets the screen height.]; docargument [H] [the screen height] [min 200/max 10000/default 768]; docident [scr_w] [Sets the screen width.]; @@ -2152,13 +3019,17 @@ docargument [W] [the screen width] [min 320/max 10000/default 1024]; docident [screenres] [Changes the screen resolution.]; docargument [W] [width] [] [0]; docargument [H] [height] [] [0]; -docident [setdesktopres] [Sets the screen resolution as in desktop.]; +docref [desktopw]; +docref [desktoph]; +docref [getdisplayresolutions]; docident [setfont] [Changes the current font.]; docargument [N] [font name] [default, mono, serif] [0]; +docref [font]; +docref [curfont]; docident [setgamma] [Sets a persistent gamma value for a map.]; docargument [G] [the gamma value] [30..300, default 100] [0]; +docref [gamma]; docident [shadowcasters] []; -docargument [V] [] [min 1/max 0/default 0]; docident [shadowclip] []; docargument [V] [] [min 0/max 1/default 1]; docident [shadowtile] []; @@ -2167,14 +3038,33 @@ docident [shotline] []; docargument [V] [] [min 0/max 1/default 1]; docident [shotlinettl] []; docargument [V] [] [min 0/max 10000/default 75]; +docident [skin] [Determines the skin of the current player.]; +docargument [N] [skin id] [value] [0]; +docremark [See the player model folder for the according skin-id.]; +docident [skin_cla] [Choose skin when playing for team CLA.]; +docargument [N] [skin id] [] [0]; +docident [skin_rvsf] [Choose skin when playing for team RVSF.]; +docargument [N] [skin id] [] [0]; docident [skyclip] []; docargument [V] [] [min 0/max 1/default 1]; +docident [smoothdist] [Determines the valid distance when extrapolating a players position.]; +docargument [V] [distance] [min 0/max 16/default 8]; +docident [smoothmove] [Determines the speed when extrapolating a players position.]; +docargument [V] [movement speed] [min 0/max 100/default 75]; docident [spectfov] [Specifies the Field Of View when in spectating/ghost mode.]; docargument [V] [Spectate FOV size] [min 5/max 120/default 110]; docident [stencilbits] []; docargument [V] [] [min 0/max 32/default 0]; docident [stencilshadow] [Sets the transparency/opacity level of stencil shadows.]; docargument [V] [Alpha level] [min 0/max 100/default 40]; +docident [swaymovediv] []; +docargument [V] [] [min 1/max 1000/default 200]; +docident [swayspeeddiv] []; +docargument [V] [] [min 1/max 1000/default 105]; +docident [swayupmovediv] []; +docargument [V] [] [min 1/max 1000/default 200]; +docident [swayupspeeddiv] []; +docargument [V] [] [min 1/max 1000/default 105]; docident [teamdisplaymode] [Sets the team display mode.]; docargument [N] [the team display mode] [0 (none), 1 (color vests), 2 (color skins) min 0/max 2/default 1]; docremark [In mode 0 team display is disabled In mode 1 players will be rendered with a colored vest to make the teams distinguishable. In mode 2 almost the whole suit of the players will be colored. These display modes are only applied in team gameodes.]; @@ -2192,6 +3082,7 @@ 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.]; +docref [waterlevel]; docident [waveheight] [Sets the wave height of water, between 0 (completely still, no waves at all) and 1 (very choppy).]; docargument [F] [wave height (floating-point value)] [min 0/max 1/default 0.3]; docsection [Sound] @@ -2215,14 +3106,25 @@ docident [bulletbouncesound] []; docargument [V] [] [min 0/max 1/default 1]; docident [bulletbouncesoundrad] []; docargument [V] [] [min 0/max 1000/default 15]; +docident [footsteps] [Indicates if the footsteps sound should be played.]; +docargument [B] [enable footsteps] [1 (true), 0 (false) min 0/max 1/default 1]; +docref [localfootsteps]; docident [gainscale] [Each subsequent played sound's gain-value is scaled by this percentage.]; docargument [N] [percentage] [min 0/max 100/default 100]; docremark [This lowers the gain of the sounds before they are mixed, this might be useful in cases when the mixer has problems with too high gain values.]; docident [heartbeat] [Defines the health level at or below which a heartbeat sound will be played.]; docargument [H] [health value] [min 0/max 99/default 0]; +docident [hitsound] [Plays a sound upon every successful hit if enabled.]; +docargument [B] [off OR on] [0 (disabled), 1 (server), 2 (local) min 0/max 2/default 0]; +docremark [If hitsound is set to 2, the sound will be played instantly rather than after server acknowledgment.]; +docident [localfootsteps] [Indicates if the footsteps sound for the local player should be played.]; +docargument [B] [enable footsteps] [1 (true), 0 (false) min 0/max 1/default 1]; +docref [footsteps]; docident [mapsoundrefresh] [Specifies the interval for checking mapsounds.]; docargument [N] [interval in milliseconds] [min 0/max 1000/default 10]; docremark [If set to value 0, the map sounds will be checked in every frame without any interval limitation.]; +docref [mapsound]; +docref [newent sound]; docident [maxsoundsatonce] []; docargument [V] [] [min 0/max 100/default 32]; docident [music] [Play music in the background.]; @@ -2231,11 +3133,15 @@ docargument [B] [playtime] [] [0]; docargument [C] [command to be executed, when music is done] [] [0]; docident [musicvol] [Sets the music volume.]; docargument [N] [the volume] [min 0/max 255/default 128]; +docref [soundvol]; docident [mutesound] [Mute a specific game sound.]; docargument [N] [ID of the sound to mute] [see config/sounds.cfg, starting at ID 0] [0]; docargument [A] [audible?] [(mute) 0 || 1 (unmute)] [0]; -docident [registermusic] [registers a track as music - the first three tracks have special meaning. Track #1 is for "flag grab" the second and third are used as "last minute" tracks.]; +docref [soundmuted]; +docref [unmuteallsounds]; +docident [registermusic] [Registers a track as music.]; docargument [M] [music file] [] [0]; +docremark [The first three tracks have special meaning: Track #1 is for "flag grab" the second and third are used as "last minute" tracks.]; docident [registersound] [Registers a sound.]; docargument [N] [sound name] [string, see config/sounds.cfg] [0]; docargument [V] [volume] [0..255] [0]; @@ -2243,6 +3149,7 @@ docargument [L] [loop] [0 (off), 1 (on)] [0]; docargument [R] [audible radius] [] [0]; docremark [This command returns the sound number, which is assigned from 0 onwards, and which can be used with "sound" command. If the sound was already registered, its existing index is returned. registersound does not actually load the sound, this is done on first play.]; docremark [See for example config/sounds.cfg.]; +docref [sound]; docident [sound] [Plays the specified sound.]; docargument [S] [the sound to play] [string, see config/sounds.cfg] [0]; docremark [See config/sounds.cfg for default sounds, and use registersound to register your own. For example, 'sound 0' and 'sound (registersound "player/jump")' both play the standard jump sound.]; @@ -2252,6 +3159,8 @@ docremark [AC will try to allocate that number of channels but it is not guarant 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!]; +docref [mutesound]; +docref [unmuteallsounds]; docident [soundscheddistancescore] []; docargument [V] [] [min 0/max 1000/default 5]; docident [soundschedoldbonus] []; @@ -2264,7 +3173,8 @@ docident [soundtest] [Plays all hardcoded sounds in order.]; docident [soundvol] [Sets the sound volume for all sounds.]; docargument [N] [the volume] [min 0/max 255/default 128]; docident [unmuteallsounds] [Unmutes all previously muted sounds.]; -docsection [Ingame Reference] +docref [mutesound]; +docsection [Ingame reference] docident [docargument] [Adds a new argument documentation to the last added identifier.]; docargument [T] [the token] [] [0]; docargument [D] [the description] [] [0]; @@ -2272,12 +3182,16 @@ docargument [V] [the value notes] [] [0]; docargument [I] [flags this argument as variable-length] [1 (true), 0 (false)] [0]; docremark [An argument represents either a command argument or a variable value.]; docremark [The last argument of an identifier can be flagged as variable-length to indicate that it represents an unknown number of arguments.]; +docref [docident]; docident [docexample] [Adds an example to the last added identifier.]; docargument [C] [the example code] [] [0]; docargument [E] [the explanation] [] [0]; docident [docfind] [Searches the ingame docs for identifier documentations matching the specified search string.]; docargument [S] [the search string] [] [0]; docremark [The name, description and remarks are included in the search.]; +docref [docident]; +docref [docundone]; +docref [docinvalid]; docident [docident] [Adds a new identifier documentation to the last added section.]; docargument [N] [name of the identifier] [] [0]; docargument [D] [the description] [] [0]; @@ -2285,8 +3199,19 @@ docremark [An identifier represents a command or variable. The new identifier]; docremark [The name may contain spaces to create a "multipart" identifier documentation that can be used to describe a complex argument as a single pseudo identifier, look at the examples.]; docexample [docident fov "Sets the field of view."] []; docexample [docident "newent light" "Adds a new light entity."] []; +docref [docsection]; +docref [docargument]; +docref [docremark]; +docref [docref]; +docref [docundone]; +docref [docinvalid]; +docref [docfind]; +docref [docwritebaseref]; docident [docinvalid] [Outputs a list of identifier documentations that do not match any existing identifier.]; docremark [Multipart identifiers are not included in this list, see 'docident'.]; +docref [docident]; +docref [docinvalid]; +docref [docfind]; docident [dockey] []; docargument [A] [] [value] [0]; docident [docref] [Adds a new documentation reference to an identifier.]; @@ -2294,16 +3219,22 @@ docargument [N] [the display name] [] [0]; docargument [I] [the identifier to refer to] [] [0]; docargument [U] [the URL to refer to] [] [0]; docremark [The new reference is added to the last added identifier documentation.]; +docref [docident]; docident [docremark] [Adds a new documentation remark to the last added identifier.]; docargument [S] [the remark] [] [0]; +docref [docident]; docident [docsection] [Adds a new section to the ingame documentation.]; docargument [S] [the section name] [] [0]; +docref [docident]; docident [docskip] []; docargument [V] [] [min 0/max 1000/default 0]; docident [docundone] [Outputs a list of yet undocumented identifiers (commands,variables, etc)]; docargument [A] [output all identifiers] [1 (true), 0 (false)] [0]; docremark [If the one argument is omitted, only the builtin identifiers will be listed. Therefore specify the argument other identifiers like aliases should be included too.]; docremark [Note that the list also includes identifiers that contain the substrings "TODO" or "UNDONE" in their documentation.]; +docref [docident]; +docref [docinvalid]; +docref [docfind]; docident [docvisible] []; docargument [V] [] [min 0/max 1/default 1]; docident [docwritebaseref] [Writes out a base XML documentation reference containing templates for the builtin identifiers.]; @@ -2311,6 +3242,10 @@ docargument [R] [the reference name] [] [0]; docargument [S] [the XML schema location string] [] [0]; docargument [T] [XML stylesheet to use] [] [0]; docremark [The generated reference is written to "docs/autogenerated_base_reference.xml" by default. The three arguments can be changed later on in the generated XML document.]; +docref [docident]; +docref [docundone]; +docref [docinvalid]; +docref [docfind]; docident [docwritetodoref] [Writes out an XML documentation reference file containing undocumented identifiers or identifiers marked with "TODO"]; docargument [i] [Also include aliases? Optional] [1: Include aliases, 0: Don't include. Default: 0] [0]; docsection [Server commands] @@ -2319,10 +3254,13 @@ docargument [A] [reference designator (keep short and unique)] [] [0]; docremark [Add new categories to your autoexec.cfg, check favourites.cfg for examples.]; docident [autoteam] [Sets automated team assignment.]; docargument [B] [Enables or disables auto team] [1 (On), 0 (Off)] [0]; +docref [setadmin]; docident [ban] [Temporary ban of the specified player from the server.]; docargument [C] [The player to ban] [client number] [0]; docargument [R] [The reason] [at least 4 characters] [0]; docremark [Temporary ban duration is fixed at 20 minutes.]; +docref [removebans]; +docref [setadmin]; docident [callvote] [Calls a vote on the server.]; docargument [T] [Vote type] [value] [0]; docargument [A] [First argument] [] [0]; @@ -2330,32 +3268,41 @@ 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 [cleardemo] [Clears specific demo currently in memory on the server.]; docargument [X] [number in list] [0 (all), 1..] [0]; +docref [listdemos]; docident [cleardemos] [Clears all demos currently in memory on the server.]; docident [deleteservermap] [Deletes a map from the current server.]; docargument [A] [map name] [] [0]; docident [forceme] [Calls a vote to forceteam yourself to the specified team.]; docargument [T] [the team to force yourself to] [0-4] [0]; docremark [By default, if you are on team CLA or RVSF, this command will force you to the enemy team, no arguments necessary.]; +docref [forceteam]; docident [forceteam] [Calls a vote to force the specified player to switch to the specified team.]; docargument [C] [client number of player] [integer] [0]; docargument [T] [the team to force to] [0-4] [0]; +docref [forceme]; +docref [setadmin]; docident [giveadmin] [Gives admin state to the specified player.]; docargument [C] [The player to become admin] [client number] [0]; docremark [Requires admin state. The admin will lose his admin state after successfully issuing this command.]; +docref [setadmin]; docident [hidefavicons] [Hide favourites icons in serverbrowser.]; docargument [N] [0: show, 1: hide] [min 0/max 1/default 0]; docident [kick] [Kicks the specified player from the server.]; docargument [C] [The player to kick] [client number] [0]; docargument [R] [The reason] [at least 4 characters] [0]; +docref [setadmin]; docident [listfavcats] [List all registered serverbrowser favourites categories]; docident [mastermode] [Sets the mastermode for the server.]; docargument [N] [The master mode] [0 (Open), 1 (Private), 2 (Match)] [0]; docremark [If the mastermode is set to 'private', no more clients can join the server. Default is 'open' which allows anyone to join the server.]; +docref [setadmin]; docident [masterupdatefrequency] []; docargument [V] [] [min 1/max 24*60*60/default 60*60]; docident [maxservpings] [Sets the number of servers to be pinged at once.]; docargument [V] [] [min 0/max 1000/default 10]; docident [removebans] [Removes all temporary bans from the server. Temporary bans are normally automatically removed after 20 minutes.]; +docref [ban]; +docref [setadmin]; docident [searchlan] []; docargument [V] [] [min 0/max 2/default 1]; docident [searchnickname] [Search a nickname (or -part) on all servers.]; @@ -2364,12 +3311,15 @@ docident [sendmap] [Sends a map to the server.]; docargument [M] [map to send] [] [0]; docremark [During coop edit, the current map gets saved to file and sent to the server. Other players can use 'getmap' to download it.]; docremark [When not in edit mode, the map will not be saved. The new map will be used, when the next game on that map starts on the server.]; +docref [getmap]; +docref [dlmap]; docident [serverbrowserhidefavtag] [Hide favourites tag column in serverbrowser]; docargument [N] [-] [min 0/max 2/default 1]; docident [serverbrowserhideip] [Hide server IP and port in serverbrowser.]; docargument [N] [-] [min 0/max 2/default 2]; -docident [serverdesc] [If the server was run with -n1 and -n2 arguments (prefix and suffix of descriptive title) a serveradmin can set a user-defined server description with this command, if it wasn't this command results in "invalid vote". This title will only stay until the next map is loaded.]; +docident [serverdesc] [Set user-define server description.]; docargument [D] [description] [] [0]; +docremark [If the server was run with -n1 and -n2 arguments (prefix and suffix of descriptive title) a serveradmin can set a user-defined server description with this command, if it wasn't this command results in "invalid vote". This title will only stay until the next map is loaded.]; docremark [If, for example, the server was run with -n"Fred's Server" -n1"Fred's " -n2" Server", then you could call "/serverdesc [pWn4g3 TOSOK]" and it would show up as "Fred's pWn4g3 TOSOK Server" in the serverbrowser.]; docident [serverextension] [Modded servers announcement of features. See source/src/server.cpp [Line 2926ff. "case SV_EXTENSION:"]]; docargument [E] [extension] [] [0]; @@ -2385,6 +3335,11 @@ docident [setadmin] [Claims or drops admin status.]; docargument [B] [Status] [1 (Claim), 0 (Drop)] [0]; docargument [PASS] [Password] [case sensitive] [0]; docremark [Failed logins result in an auto kick. The admin is granted the right to kick, ban, remove bans, set autoteam, set shuffleteam, change server description (if enabled), change map, change mastermode, force team, change mode, record demos, stop demos and clear demo(s) - All without needing votes from other users. If the admin votes on any (other players) call, his vote is final. In the scoreboard, the admin will be shown as a red colour.]; +docref [kick]; +docref [autoteam]; +docref [mastermode]; +docref [ban]; +docref [removebans]; docident [showallplayersnumber] [Shows on serverbrowser number of all players on the servers.]; docargument [N] [] [min 0/max 1/default 0]; docident [showallservers] [Whether servers that have not yet responded to a ping should be shown in the server list.]; @@ -2400,7 +3355,10 @@ docargument [N] [-] [min 0/max 1/default 0]; docident [showweights] [Show 'weights' in serverbrowser.]; docargument [N] [] [min 0/max 1/default 1]; docremark ['weights' are the sort criteria with the highest priority. Favourites categories can change the weights. Use 'showweights' to debug problems with serverbrowser sorting.]; -docident [shuffleteams] [Shuffles the teams. The server will attempt to restore balance, but the result may be less that optimal, and there are certainly better ways to keep teams balanced.]; +docident [shuffleteams] [Shuffles the teams.]; +docremark [The server will attempt to restore balance, but the result may be less that optimal, and there are certainly better ways to keep teams balanced.]; +docref [forceteam]; +docref [forceme]; docsection [Authentication] docident [authkey] [Manages a list of keys other than the game key (which is managed by authsetup).]; docargument [P] [parameter] [clear, list, delete keyname, new keyname, add keyname privkey, selfcert keyname [comment]] [0]; @@ -2411,12 +3369,22 @@ docremark ["authkey delete keyname" - deletes the key "keyname" from memory.]; docremark ["authkey new keyname" - generates a new key with the name "keyname". If a key of that name already exists, it is deleted. The key is added to the list in memory and also written to the file config/authkeys.cfg.]; docremark ["authkey add keyname privkey" - adds a key with the name "keyname" to the list in memory. The privkey is a 32-byte hexadecimal string, preferrably generated by authkey new. The matching public key is generated automatically from the private key.]; docremark ["authkey selfcert keyname [comment]" - generates a self-signed certificate for the key "keyname". Being able to create such a cert is proof, that you own the private key of a certain public key.]; +docref [authsetup]; docident [authmaxtime] [Sets an amount of time (in ms), new password hashes are created with this fixed amount of time.]; docargument [N] [amount of time [ms]] [min 1<<9/max 1<<16/default 1<<12]; +docref [authsetup]; +docref [authmemusage]; +docref [authrounds]; docident [authmemusage] [Sets a number of megabytes of RAM that are used for the password hash calculation (when new passwords are created).]; docargument [N] [number of RAM [MB]] [min 2/max (1<<10)-1/default 24]; +docref [authsetup]; +docref [authrounds]; +docref [authmaxtime]; docident [authrounds] [Sets a number of rounds, if greater than 0, then new password hashes are created with this fixed number of rounds.]; docargument [N] [number of rounds] [min 0/max 2^31-1/default 0]; +docref [authsetup]; +docref [authmemusage]; +docref [authmaxtime]; docident [authsetup] [Manages player authentication.]; docargument [P] [parameter] [[empty], pre preprivhex [psalthex pwdcfg], priv privhex [salthex pwdcfg], pub pubhex, ppass preprivpass, pass privpass, passd privpass [commandwhendone], needpass, genpre [prelen], genpriv, genpub, newppass preprivpass [preprivfilename], newpass privpass [privatefilename], unarmed] [0]; docremark ["authsetup" contains all the funtionality needed to generate, load and save private and public keys, and to lock and unlock the private key with a password.]; @@ -2440,10 +3408,18 @@ docremark ["authsetup newpass privpass [privatefilename]" - encrypts private key docremark ["authsetup unarmed" - sets private and public keys to a fixed value. For testing only. Can be used to "log out".]; docremark [----------]; docremark ["authmemusage", "authrounds", "authmaxtime" are only used, when new passwords are created (authsetup new[p]pass). "authmemusage" is the number of megabytes of RAM that are used for the password hash calculation. If "authrounds" is zero (as is default), then the hash algorithm calculates as many rounds as possible in the number of milliseconds specified in "authmaxtime". If "authrounds" is a positive number, then that is the number of rounds to be done, regardless the required time. Note that, since the password hash algorithm is not endianness-aware, it is not possible to move an encrypted password to a machine with different endianness. Moving between 32- and 64-bit machines should be no problem.]; +docref [authmemusage]; +docref [authrounds]; +docref [authmaxtime]; +docref [authkey]; +docref [mypubkey]; +docref [cryptodebug]; docident [cryptodebug] [Enables some debug messages in crypto.cpp file.]; docargument [N] [enable debugging] [min 0/max 1/default 1]; +docref [authsetup]; docident [mypubkey] [Returns a public key of game account.]; docremark [It returns empty string, if no account exists or it is unusable (due to missing password, for example).]; +docref [authsetup]; docsection [Game modes] docident [bdm] [Starts a map with the mode "Bot Deathmatch"]; docargument [M] [The name of the map you wish to play] [] [1]; @@ -2481,13 +3457,34 @@ docident [ctf] [Starts a map with the mode "Capture the Flag"]; docargument [M] [The name of the map you wish to play] [] [1]; docargument [T] [The time limit, in minutes (default 15 minutes if T is 0 or not specified)] [1..60] [1]; docexample [ctf ac_mines] []; +docident [curmodeattr] [Checks the current game mode for certain attributes.]; +docargument [A] [attribute name] [] [0]; +docremark [Possible attributes are: team, arena, flag and bot.]; +docref [mode]; +docref [gamemode]; +docref [getmode]; docident [dm] [Starts a map with the mode "Deathmatch"]; docargument [M] [The name of the map you wish to play] [] [1]; docargument [T] [The time limit, in minutes (default 10 minutes if T is 0 or not specified)] [1..60] [1]; docexample [dm ac_complex] []; +docident [gamemode] [Returns the number of current game mode.]; +docexample [echo $gamemode] [Output: 5]; +docref [mode]; +docref [getmode]; +docref [curmodeattr]; docident [gamemodedesc] []; docargument [M] [mode] [integer] [0]; docargument [D] [description] [string] [0]; +docref [mode]; +docref [showmodedescriptions]; +docident [getmode] [Returns the name of 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]; +docref [mode]; +docref [modeacronyms]; +docref [gamemode]; +docref [curmodeattr]; docident [htf] [Starts a map with the mode "Hunt the Flag"]; docargument [M] [The name of the map you wish to play] [] [1]; docargument [T] [The time limit, in minutes (default 15 minutes if T is 0 or not specified)] [1..60] [1]; @@ -2532,6 +3529,48 @@ docremark [There are many aliases for you to use instead of remembering the nume docexample [mode 7; map ac_complex; echo "Bot Team Deathmatch on ac_complex"] []; docexample [mode 8; map ac_mines 4; echo "Bot Deathmatch on ac_mines for 4 minutes"] []; docexample [mode 5; map ac_shine; echo "CTF @ ac_shine"] []; +docref [map]; +docref [gamemode]; +docref [getmode]; +docref [curmodeattr]; +docref [modeacronyms]; +docref [modenum]; +docref [tdm]; +docref [coop]; +docref [dm]; +docref [surv]; +docref [tsurv]; +docref [ctf]; +docref [tpf]; +docref [pf]; +docref [tlss]; +docref [lss]; +docref [osok]; +docref [tosok]; +docref [htf]; +docref [tktf]; +docref [ktf]; +docref [btdm]; +docref [bdm]; +docref [bpf]; +docref [blss]; +docref [btdm]; +docref [bdm]; +docref [btsurv]; +docref [bosok]; +docref [btosok]; +docident [modeacronyms] [Toggles use of acronyms instead of full modenames in the serverbrowser, scoreboard, voting info.]; +docargument [B] [] [min 0/max 1/default 0]; +docref [mode]; +docref [getmode]; +docref [modenum]; +docident [modenum] [Returns the mode number for a specified mode acronym.]; +docargument [M] [the mode acronym] [] [0]; +docremark [Returns -1 if not found.]; +docexample [echo (modenum ctf)] [Output: 5]; +docexample [echo (modenum btosok)] [Output: 21]; +docref [mode]; +docref [modeacronyms]; docident [osok] [Starts a map with the mode "One Shot, One Kill"]; docargument [M] [The name of the map you wish to play] [] [1]; docargument [T] [The time limit, in minutes (default 10 minutes if T is 0 or not specified)] [1..60] [1]; @@ -2540,6 +3579,10 @@ docident [pf] [Starts a map with the mode "Pistol Frenzy"]; docargument [M] [The name of the map you wish to play] [] [1]; docargument [T] [The time limit, in minutes (default 10 minutes if T is 0 or not specified)] [1..60] [1]; docexample [pf ac_complex] []; +docident [showmodedescriptions] [Enables or disables the showing of game mode descriptions on the console after map starts.]; +docargument [B] [0 off, 1 on] [min 0/max 1/default 1]; +docref [mode]; +docref [gamemodedesc]; docident [surv] [Starts a map with the mode "Survivor"]; docargument [M] [The name of the map you wish to play] [] [1]; docargument [T] [The time limit, in minutes (default 10 minutes if T is 0 or not specified)] [1..60] [1]; @@ -2576,15 +3619,21 @@ docsection [Editing configs] docident [fog] [Sets the fog distance.]; docargument [N] [The fog distance] [64...1024, default is 180] [0]; docremark [You can do this for tweaking the visual effect of the fog, or if you are on a slow machine, setting the fog to a low value can also be a very effective way to increase fps (if you are geometry limited). Try out different values on big maps / maps which give you low fps. It is also good for aesthetic features of maps especially when combined with "fogcolour".]; +docref [fogcolour]; docident [fogcolour] [Sets the fog and clearing colour.]; docargument [C] [The colour] [Hexadecimal colour, default is 0x8099B3] [0]; +docref [fog]; docident [getnotexture] [Returns the current "notexture" path (set by loadnotexture).]; docexample [echo (getnotexture)] []; +docref [loadnotexture]; docident [loadnotexture] [Binds a texture to be used if a slot couldn't be loaded with a given textures path.]; docargument [F] [file name of the texture to bind] [string] [0]; docremark [Binds the texture indicated in the filename to the texture slot of any textures that aren't found. The path is given exactly as with the texture-command, if it is omitted (or can't be loaded) the default is used. The default is located in packages/misc/notexture.jpg (not in packages/textures - where custom ones must reside!)]; docexample [loadnotexture // Reset to default] []; docexample [loadnotexture "makke/black.jpg" // Any missing texture will show up black] []; +docref [texture]; +docref [texturereset]; +docref [getnotexture]; docident [loadsky] [Loads a skymap for a map.]; docargument [P] [path to skymap textures] [string] [0]; docremark [The available skymaps reside in packages/textures/skymaps/..]; @@ -2598,19 +3647,46 @@ docargument [H] [The height of the bounding box.] [Integer] [0]; docargument [Z] [The initial height offset from the ground.] [Integer] [0]; docargument [0] [This integer is redundant. Leave it at zero so you don't break the command.] [0] [0]; docargument [N] [The name of the map model] [string] [0]; +docargument [F] [If '1', the model is preloaded, even if no entities use it] [1 (optional)] [0]; docremark [A mapmodel registered with this command can be placed in a map using the 'newent mapmodel' command. The bounding box is an invisible force surrounding the model, allowing players to collide against it, instead of walking through the mapmodel. For more information about this command, read mapediting5.xml.]; docremark [Example: mapmodel 4 2 4 0 "modelname"]; docremark [This mapmodel has a bounding box of 8x8x2 in size (X/Y/Z) and by default hovers 4 units above ground.]; docremark [It also returns the number of the created slot, example: echo (mapmodel ...)]; +docref [newent mapmodel]; +docref [mapmodelreset]; +docref [loadallmapmodels]; +docref [mapmodelslotname]; +docref [mapmodelslotbyname]; +docref [mapmodelslotusage]; +docref [editmapmodelslot]; +docref [deletemapmodelslot]; +docref [sortmapmodelslots]; +docref [mapmodelchanged]; +docref [listallmapmodelattributes]; +docref [getmapmodelattributes]; docident [mapmodelreset] [Resets the mapmodel slots/indices to 0 for the subsequent "mapmodel" commands.]; docremark [Each subsequent mapmodel command increases it again. See config/default_map_settings.cfg for an example.]; +docref [mapmodel]; +docref [newent mapmodel]; docident [mapsound] [Defines a mapsound.]; docargument [P] [Path to the sound file] [] [0]; docargument [M] [Maximum simultaneous sounds/maxuses] [default -1 (unlimited)] [0]; docremark [Registers the sound as a map-specific sound. These map-specific sounds may currently only be used with "sound" entities within a map. The first map sound registered in a map has slot/index number 0 and increases afterwards.]; docremark [It also returns the number of the created slot, example: echo (mapsound ...)]; +docref [newent sound]; +docref [mapsoundreset]; +docref [getmapsoundlist]; +docref [getmapsoundorigin]; +docref [mapsoundslotbyname]; +docref [mapsoundslotusage]; +docref [editmapsoundslot]; +docref [deletemapsoundslot]; +docref [sortmapsoundslots]; +docref [mapsoundchanged]; docident [mapsoundreset] [Resets the mapsound slots/indices to 0 for the subsequent "mapsound" commands.]; docremark [Each subsequent mapsound command increases it again. See config/default_map_settings.cfg for an example.]; +docref [newent sound]; +docref [mapsound]; docident [md2anim] []; docargument [A] [anim] [] [0]; docargument [F] [frame] [] [0]; @@ -2651,8 +3727,13 @@ docargument [A] [alphablend] [] [0]; docident [mdlalphatest] []; docargument [A] [alphatest] [] [0]; docident [mdlattribute] [Adds a value for a specified attribute to the model.]; -docargument [A] [attribute] [keywords, desc, defaults, usage, author, license, distribution, version] [0]; +docargument [A] [attribute] [keywords, desc, defaults, usage, author, license, distribution, version, requires] [0]; docargument [V] [value] [] [0]; +docremark [If used, specifies that the current model depends on parts of another custom model (which therefore also has to be downloaded) can only be used once per model config.]; +docremark [Example: 'mdlattribute' requires 'makke/signs/exit' could be used in 'signs/loading-dock/md2.cfg' to reuse 'makke/signs/exit/tris.md2' .]; +docref [getmapmodelattributes]; +docref [listallmapmodelattributes]; +docref [mapmodelregister]; docident [mdlcachelimit] []; docargument [L] [cachelimit] [] [0]; docident [mdlcullface] []; @@ -2679,14 +3760,30 @@ 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.]; docremark [It also returns the number of the created slot, example: echo (texture ...)]; +docref [loadnotexture]; +docref [texturereset]; +docref [hirestextures]; +docref [gettexturelist]; +docref [gettextureorigin]; +docref [textureslotusage]; +docref [textureslotusagelist]; +docref [textureslotbyname]; +docref [deletetextureslot]; +docref [edittextureslot]; +docref [edittexturestack]; +docref [sorttextureslots]; 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.]; +docref [texture]; docident [watercolour] [Determines the water colour in a map.]; docargument [R] [red colour intensity] [1..255] [0]; docargument [G] [green colour intensity] [1..255] [0]; docargument [B] [blue colour intensity] [1..255] [0]; docargument [A] [alpha value (transparency)] [0..255 (default 178)] [0]; docremark [You must define at least 3 first values, otherwise this command may not work correctly (use "1" as a placeholder if needed).]; +docref [getwatercolour]; +docref [setwatercolour]; +docref [waterlevel]; docsection [Bot mode] docident [addbot] [add a bot for a given team with a given skill calling him a given name.]; docargument [T] [team] [RVSF or CLA] [0]; @@ -2732,12 +3829,15 @@ docident [kickbot] [Kicks the bot with the given name out of the current game.]; docargument [N] [botname] [name of the bot to kick.] [0]; docexample [kickbot Robbie] [Will make the bot named "Robbie" dissapear from the current game.]; docident [setjumpwp] []; -docident [setwptriggernr] [Assigns a number to the nearest waypoint. This is only used for trigger waypoints, so that the bots go to triggers in the right order. If you don't do this bots will search for every trigger, even when they are not reachable yet.]; +docref [unsetjumpwp]; +docident [setwptriggernr] [Assigns a number to the nearest waypoint.]; docargument [N] [number] [] [0]; +docremark [This is only used for trigger waypoints, so that the bots go to triggers in the right order. If you don't do this bots will search for every trigger, even when they are not reachable yet.]; docident [setwpyaw] [takes the current player yaw for the current waypoint]; docident [togglebotview] [When used you will see what the bot sees. Type it again (with or without name) to return to the game(you will respawn).]; docargument [N] [botname] [the name of the bot] [0]; docident [unsetjumpwp] []; +docref [setjumpwp]; docident [wpclear] []; docident [wpflood] []; docident [wpinfo] [makes waypoints visible and either turns on or off the waypoint information display.]; @@ -2751,29 +3851,52 @@ docargument [V] [Note: This is turned on by default.] [min 0/max 1/default 1]; docsection [Optional] docident [alive] [Returns 1 if the local player is alive.]; docexample [echo (alive)] [Output: 1]; +docref [load_compatibility]; docident [breakparse] [Breaks out of a parsestring loop.]; docremark [Important: this command should only be used within the 3rd argument (the cubescript to execute) of parsestring.]; +docref [load_parsestring]; +docref [parsestring]; docident [changegamma] [Smoothly changes your gamma to the specified value.]; docargument [G] [the gamma to change to] [] [0]; docargument [M] [milliseconds between gamma changes] [] [0]; docremark [Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu.]; docexample [changegamma 300 30] [Every 30 milliseconds your gamma is changed by 1 until it reaches its goal of gamma 300.]; +docref [load_survival]; +docref [gamma]; +docref [changespeed]; docident [changespeed] [Smoothly changes your gamespeed to the specified value.]; docargument [S] [the gamespeed to change to] [] [0]; docargument [M] [milliseconds between gamespeed changes] [] [0]; docremark [Remark: that's optional command, disabled by default, to enable it execute "run opt/survival" or start bot surival mode from menu.]; docexample [changespeed 1000 30] [Every 30 milliseconds your gamespeed is changed by 1 until it reaches its goal of gamespeed 1000.]; +docref [load_survival]; +docref [gamespeed]; +docref [changegamma]; docident [curmode] [Returns the mode number for the current game.]; +docref [load_compatibility]; +docref [gamemode]; +docref [curmap]; +docref [map]; +docref [mode]; docident [currole] [Returns 1 if the local player has admin privileges, 0 otherwise.]; +docref [load_compatibility]; +docref [setadmin]; +docref [connectadmin]; docident [curteam] [Returns an integer indicating what team a client is currently on.]; docargument [C] [client number] [returns the specified client's team instead] [0]; docremark [Returns 0 for CLA, 1 for RVSF.]; docremark [Returns 2 for CLA-spectator, 3 for RVSF-spectator.]; docremark [Returns 4 for spectator.]; docremark [By default this command returns what team *you* (player1) are currently on.]; +docref [load_compatibility]; +docref [team]; +docref [forceteam]; +docref [skin]; docident [findpn] [find player name]; docargument [CN] [client number] [] [0]; +docref [load_compatibility]; docident [getclientmode] [Returns the current game mode number.]; +docref [load_compatibility]; docident [load_autosave] [Loads optional obsolete autosave settings.]; docremark [To see the obsolete autosave settings, look in config/opt/autosave.cfg]; docident [load_compatibility] [Loads optional compatibility settings for old scripts.]; @@ -2788,6 +3911,7 @@ docremark [To see the settings for survival, look in config/opt/survival.cfg]; docremark [The settings are loaded, when bot survival mode is started via menu.]; 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]; +docref [load_compatibility]; docident [parsestring] [Loops through every character in the given string and executes the given block of cubescript on each iteration.]; docargument [S] [string] [string to parse] [0]; docargument [A] [string] [name of alias to use as iterator] [0]; @@ -2798,19 +3922,34 @@ docexample [parsestring "Hello world" iter [echo $iter]] [Uses echo on every cha docexample [parsestring "Hello world" iter [echo (concatword "Char #" $__iter ": " $iter)]] [Uses echo on every character in the string: "Hello world" --- Also outputs the position of each character in the string.]; docexample [backwardsstring = []; parsestring "This will look interesting backwards." iter [backwardsstring = (concatword $backwardsstring $iter); if (= $__iter 0) [echo $backwardsstring]] 1] [Outputs: ".sdrawkcab gnitseretni kool lliw sihT"]; docexample [parsestring "abcdefghijklmnopqrstuvwxyz" iter [if (> $__iter 4) breakparse [echo $iter]]] [Example usage of the breakparse command. Uses echo on characters a through e, then breaks out of the parse.]; +docref [load_parsestring]; +docref [breakparse]; +docref [substr]; +docref [trimAllWhitespace]; +docref [trimAllUnnecessaryWhitespace]; docident [pstat_score] [Returns the score statistics for the player with the given client number.]; docargument [CN] [client number] [0..N] [0]; docexample [echo (pstat_score 0)] [Output: 0 5 3 43 1 1 unarmed]; +docref [load_compatibility]; +docref [start_intermission]; +docref [pstat_weap]; docident [survival] [Prepares a round of bot survival mode on the specified map.]; docargument [M] [the map to use] [] [0]; docargument [D] [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.]; +docref [load_survival]; docident [trimAllUnnecessaryWhitespace] [Removes all unnecessary leading and trailing whitespace characters from the given string.]; docargument [S] [string] [string to modify] [0]; docexample [echo (trimAllUnnecessaryWhitespace " H e ll o w o r l d ")] [Outputs: "H e ll o w o r l d"]; +docref [load_parsestring]; +docref [trimAllWhitespace]; +docref [parsestring]; docident [trimAllWhitespace] [Removes all whitespace characters from the given string.]; docargument [S] [string] [string to modify] [0]; docexample [echo (trimAllWhitespace " H e ll o w o r l d ")] [Outputs: Helloworld]; +docref [load_parsestring]; +docref [trimAllUnnecessaryWhitespace]; +docref [parsestring]; docsection [TODO] docident [autoscopesens] [TODO]; docargument [N] [TODO] [min 0/max 1/default 0]; diff --git a/source/src/docs.cpp b/source/src/docs.cpp index fbebb3c2..feaf9089 100644 --- a/source/src/docs.cpp +++ b/source/src/docs.cpp @@ -20,20 +20,6 @@ struct docargument } }; -struct docref -{ - char *name, *ident, *url, *article; - - docref() : name(NULL), ident(NULL), url(NULL), article(NULL) {} - ~docref() - { - DELETEA(name); - DELETEA(ident); - DELETEA(url); - DELETEA(article); - } -}; - struct docexample { char *code, *explanation; @@ -64,7 +50,7 @@ struct docident char *name, *desc; vector arguments; vector remarks; - vector references; + vector references; vector examples; vector keys; @@ -96,49 +82,54 @@ docident *lastident = NULL; void adddocsection(char *name) { - if(!name) return; + if(!name || !*name) { lastsection = NULL; return; } docsection &s = sections.add(); s.name = newstring(name); s.menu = addmenu(s.name, NULL, true, renderdocsection); lastsection = &s; } +COMMANDN(docsection, adddocsection, "s"); void adddocident(char *name, char *desc) { - if(!name || !desc || !lastsection) return; + if(!name || !desc || !lastsection || !*name) { lastident = NULL; return; } name = newstring(name); docident &c = docidents[name]; lastsection->idents.add(&c); c.name = name; c.desc = newstring(desc); lastident = &c; +#ifdef _DEBUG + if(strlen(desc) > 111) clientlogf("docident: very long description for ident %s (%d)", name, (int)strlen(desc)); +#endif } +COMMANDN(docident, adddocident, "ss"); void adddocargument(char *token, char *desc, char *values, char *vararg) { if(!lastident || !token || !desc) return; + if(*token) loopv(lastident->arguments) if(!strcmp(token, lastident->arguments[i].token)) clientlogf("docargument: double token %s in reference %s", token, lastident->name); docargument &a = lastident->arguments.add(); a.token = newstring(token); a.desc = newstring(desc); a.values = values && strlen(values) ? newstring(values) : NULL; a.vararg = vararg && atoi(vararg) == 1 ? true : false; } +COMMANDN(docargument, adddocargument, "ssss"); void adddocremark(char *remark) { - if(!lastident || !remark) return; + if(!lastident || !remark || !*remark) return; lastident->remarks.add(newstring(remark)); } +COMMANDN(docremark, adddocremark, "s"); -void adddocref(char *name, char *ident, char *url, char *article) +void adddocref(char *refident) { - if(!lastident || !name) return; - docref &r = lastident->references.add(); - r.name = newstring(name); - r.ident = ident && strlen(ident) ? newstring(ident) : NULL; - r.url = url && strlen(url) ? newstring(url) : NULL; - r.article = article && strlen(article) ? newstring(article) : NULL; + if(!lastident || !refident || !*refident) return; + lastident->references.add(newstring(refident)); } +COMMANDN(docref, adddocref, "s"); void adddocexample(char *code, char *explanation) { @@ -147,6 +138,7 @@ void adddocexample(char *code, char *explanation) e.code = newstring(code); e.explanation = explanation && strlen(explanation) ? newstring(explanation) : NULL; } +COMMANDN(docexample, adddocexample, "ss"); void adddockey(char *alias, char *name, char *desc) { @@ -156,15 +148,9 @@ void adddockey(char *alias, char *name, char *desc) k.name = name && strlen(name) ? newstring(name) : NULL; k.desc = desc && strlen(desc) ? newstring(desc) : NULL; } - -COMMANDN(docsection, adddocsection, "s"); -COMMANDN(docident, adddocident, "ss"); -COMMANDN(docargument, adddocargument, "ssss"); -COMMANDN(docremark, adddocremark, "s"); -COMMANDN(docref, adddocref, "ssss"); -COMMANDN(docexample, adddocexample, "ss"); COMMANDN(dockey, adddockey, "sss"); + const char *docgetdesc(const char *name) { docident *id = docidents.access(name); @@ -201,12 +187,7 @@ void listundoneidents(vector &inames, int allidents) srch.add(id->arguments[j].desc); srch.add(id->arguments[j].values); } - loopvj(id->references) - { - srch.add(id->references[j].ident); - srch.add(id->references[j].name); - srch.add(id->references[j].url); - } + loopvj(id->references) srch.add(id->references[j]); if(cvecstr(srch, "TODO") || cvecstr(srch, "UNDONE")) id = NULL; } if(!id) inames.add(name); @@ -222,6 +203,7 @@ void docundone(int *allidents) inames.sort(stringsort); loopv(inames) conoutf("%s", inames[i]); } +COMMAND(docundone, "i"); void docinvalid() { @@ -234,6 +216,7 @@ void docinvalid() conoutf("%s", d.name); }); } +COMMAND(docinvalid, ""); void docfind(char *search) { @@ -255,6 +238,7 @@ void docfind(char *search) } }); } +COMMAND(docfind, "s"); char *xmlstringenc(char *d, const char *s, size_t len) { @@ -362,18 +346,16 @@ void docwritebaseref(char *ref, char *schemalocation, char *transformation) { docwriteref(-1, ref, schemalocation, transformation); } +COMMAND(docwritebaseref, "sss"); void docwritetodoref(int *allidents) { docwriteref(*allidents ? 1 : 0, "", "", ""); } - -COMMAND(docundone, "i"); -COMMAND(docinvalid, ""); -COMMAND(docfind, "s"); -COMMAND(docwritebaseref, "sss"); COMMAND(docwritetodoref, "i"); + VAR(docvisible, 0, 1, 1); +VAR(docrefvisible, 0, 1, 1); VAR(docskip, 0, 0, 1000); void toggledoc() { docvisible = !docvisible; } @@ -445,7 +427,7 @@ void renderdoc(int x, int y, int doch) bool nc = false; //tests if text after open parenthesis is not a command - docident *ident = NULL; + docident *curident = NULL; for(size_t i = 0; i < clen; i++) // search first matching cmd doc by stripping arguments of exp from right to left { @@ -465,36 +447,36 @@ void renderdoc(int x, int y, int doch) if(!*dnd || *dnd == ' ') { copystring(dmd, d, dlen-j+1); - ident = docidents.access(dmd); + curident = docidents.access(dmd); } - if (j == dlen-1 && !ident) + if (j == dlen-1 && !curident) nc = true; } } else { nc = true; - ident = docidents.access(cmd); + curident = docidents.access(cmd); } - if(ident) + if(curident) { vector doclines; char *label = newstringbuf(); // label doclines.add(label); - formatstring(label)("~%s", ident->name); - loopvj(ident->arguments) + formatstring(label)("~%s", curident->name); + loopvj(curident->arguments) { concatstring(label, " "); - concatstring(label, ident->arguments[j].token); + concatstring(label, curident->arguments[j].token); } doclines.add(NULL); - doclines.add(ident->desc); + doclines.add(curident->desc); doclines.add(NULL); - if(ident->arguments.length() > 0) // args + if(curident->arguments.length() > 0) // args { extern textinputbuffer cmdline; @@ -526,12 +508,12 @@ void renderdoc(int x, int y, int doch) } // fixes offset for var args - if(arg >= ident->arguments.length() && ident->arguments.last().vararg) arg = ident->arguments.length() - 1; + if(arg >= curident->arguments.length() && curident->arguments.last().vararg) arg = curident->arguments.length() - 1; } - loopvj(ident->arguments) + loopvj(curident->arguments) { - docargument *a = &ident->arguments[j]; + docargument *a = &curident->arguments[j]; if(!a) continue; formatstring(doclines.add(newstringbuf()))("\f%d%-8s%s %s%s%s", j == arg ? 4 : 5, a->token, a->desc, a->values ? "(" : "", a->values ? a->values : "", a->values ? ")" : ""); @@ -540,51 +522,40 @@ void renderdoc(int x, int y, int doch) doclines.add(NULL); } - if(ident->remarks.length()) // remarks + if(curident->remarks.length()) // remarks { - loopvj(ident->remarks) doclines.add(ident->remarks[j]); + loopvj(curident->remarks) doclines.add(curident->remarks[j]); doclines.add(NULL); } - if(ident->examples.length()) // examples + if(curident->examples.length()) // examples { - doclines.add(ident->examples.length() == 1 ? "Example:" : "Examples:"); - loopvj(ident->examples) + doclines.add(curident->examples.length() == 1 ? "Example:" : "Examples:"); + loopvj(curident->examples) { - doclines.add(ident->examples[j].code); - doclines.add(ident->examples[j].explanation); + doclines.add(curident->examples[j].code); + doclines.add(curident->examples[j].explanation); } doclines.add(NULL); } - if(ident->keys.length()) // default keys + if(curident->keys.length()) // default keys { - doclines.add(ident->keys.length() == 1 ? "Default key:" : "Default keys:"); - loopvj(ident->keys) + doclines.add(curident->keys.length() == 1 ? "Default key:" : "Default keys:"); + loopvj(curident->keys) { - dockey &k = ident->keys[j]; + dockey &k = curident->keys[j]; defformatstring(line)("~%-10s %s", k.name ? k.name : k.alias, k.desc ? k.desc : ""); doclines.add(newstring(line)); } doclines.add(NULL); } - if(ident->references.length()) // references + if(docrefvisible && curident->references.length()) // references { - struct category { string label; string refs; } - categories[] = {{"related identifiers", ""} , {"web resources", ""}, {"wiki articles", ""}, {"other", ""}}; - loopvj(ident->references) - { - docref &r = ident->references[j]; - char *ref = r.ident ? categories[0].refs : (r.url ? categories[1].refs : (r.article ? categories[2].refs : categories[3].refs)); - concatstring(ref, r.name); - if(j < ident->references.length()-1) concatstring(ref, ", "); - } - loopj(sizeof(categories)/sizeof(category)) - { - if(!strlen(categories[j].refs)) continue; - formatstring(doclines.add(newstringbuf()))("~%s: %s", categories[j].label, categories[j].refs); - } + string refs = ""; + loopvj(curident->references) concatformatstring(refs, ", %s", curident->references[j]); + formatstring(doclines.add(newstringbuf()))("~related identifiers:%s", refs + 1); } while(doclines.length() && !doclines.last()) doclines.pop(); @@ -601,6 +572,7 @@ void renderdoc(int x, int y, int doch) cury += height; maxl = j+1; } + if(offset > 0 && maxl >= doclines.length()) { for(int j = offset-1; j >= 0; j--) @@ -614,7 +586,6 @@ void renderdoc(int x, int y, int doch) } } - cury = y; for(int j = offset; j < maxl; j++) {