diff --git a/config/docs.cfg b/config/docs.cfg index 105dcfc7..a3a36685 100644 --- a/config/docs.cfg +++ b/config/docs.cfg @@ -2,97 +2,189 @@ docsection [CubeScript] docident [-] [Performs a subtraction.]; -docargument [A] [the minuend] []; -docargument [B] [the subtrahend] []; +docargument [A] [the minuend] [] [0]; +docargument [B] [the subtrahend] [] [0]; docident [*] [Performs a multiplication.]; -docargument [A] [the multiplicand] []; -docargument [B] [the multiplier] []; +docargument [A] [the multiplicand] [] [0]; +docargument [B] [the multiplier] [] [0]; docident [+] [Performs an addition.]; -docargument [A] [the first summand] []; -docargument [B] [the second summand] []; +docargument [A] [the first summand] [] [0]; +docargument [B] [the second summand] [] [0]; docremark [Example: echo the sum of x and y is (+ $x $y)]; docident [<] [Determines if a value is smaller than a second value.]; -docargument [A] [the first value] []; -docargument [B] [the second value] []; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; docident [=] [Determines if two values are equal.]; -docargument [A] [first value] []; -docargument [B] [second value] []; +docargument [A] [first value] [] [0]; +docargument [B] [second value] [] [0]; docident [>] [Determines if a value is bigger than a second value.]; -docargument [A] [the first value] []; -docargument [B] [the second value] []; +docargument [A] [the first value] [] [0]; +docargument [B] [the second value] [] [0]; docident [at] [Grabs a word out of a string.]; -docargument [S] [the string] []; -docargument [N] [the index of the word] []; +docargument [S] [the string] [] [0]; +docargument [N] [the index of the word] [] [0]; docremark [The word is saved to the alias 's'.]; +docexample [at "zero one two three" 2; echo $s] [output: two]; docident [concat] [Concatenates multiple strings with spaces inbetween.]; -docargument [S] [the first string] []; +docargument [S] [the first string] [] [0]; +docargument [...] [collection of strings to concatenate] [] [1]; docremark [The newly created string is saved to the alias 's'.]; +docexample [alias a "hello"; concat $a "world"; echo $s] [output: hello world]; docident [concatword] [Concatenates multiple strings.]; -docargument [S] [the first string] []; +docargument [S] [the first string] [] [0]; +docargument [...] [collection of strings to concatenate] [] [1]; docremark [The newly created string is saved to the alias 's'.]; +docexample [alias a "Cube"; concatword $a "Script"; echo $s] [output: CubeScript]; docident [div] [Performs a division.]; -docargument [A] [the dividend] []; -docargument [B] [the divisor] []; +docargument [A] [the dividend] [] [0]; +docargument [B] [the divisor] [] [0]; docident [if] [Controls the script flow based on a boolean expression.]; -docargument [cond] [the condition] [0 (false) or anything else (true)]; -docargument [true] [the body to execute if the condition is true] []; -docargument [false] [the body to execute if the condition is true] []; +docargument [cond] [the condition] [0 (false) or anything else (true)] [0]; +docargument [true] [the body to execute if the condition is true] [] [0]; +docargument [false] [the body to execute if the condition is true] [] [0]; +docexample [if (> $x 10) [ echo x is bigger than 10 ] [ else x too small ]] []; docident [loop] [Loops the specified body.]; -docargument [N] [the amount of loops] []; -docargument [body] [the body to execute on each iteration] []; +docargument [N] [the amount of loops] [] [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.]; +docexample [loop 10 [ echo $i ]] []; docident [mod] [Performs a modulo operation.]; -docargument [A] [the dividend] []; -docargument [B] [the divisor] []; +docargument [A] [the dividend] [] [0]; +docargument [B] [the divisor] [] [0]; docident [sleep] [Executes a command after specified time period.]; -docargument [N] [the amount of milliseconds] []; -docargument [C] [the command to execute] []; +docargument [N] [the amount of milliseconds] [] [0]; +docargument [C] [the command to execute] [] [0]; +docexample [sleep 1000 [ echo foo ]] [Prints 'foo' to the screen after 1 second.]; docident [strcmp] [Determines if two strings are equal.]; -docargument [A] [the first string] []; -docargument [B] [the second string] []; +docargument [A] [the first string] [] [0]; +docargument [B] [the second string] [] [0]; docident [while] [Loops the specified body while the condition evaluates to true.]; -docargument [cond] [the condition] [0 (false) or anything else (true)]; -docargument [body] [the body to execute on each iteration] []; +docargument [cond] [the condition] [0 (false) or anything else (true)] [0]; +docargument [body] [the body to execute on each iteration] [] [0]; docremark [This command sets the alias "i" from 0 to N-1 for every iteration. Note that the condition here has to have [], otherwise it would only be evaluated once.]; +docexample [alias i 0; while [ (< $i 10) ] [ echo $i; alias i (+ $i 1) ]] []; -docsection [Engine] +docsection [Gameplay] -docident [millis] [Returns the number of milliseconds since engine start.]; +docident [connect] [Connects to a server.]; +docargument [N] [the (dns) name or ip of the server] [] [0]; +docargument [P] [the password] [] [0]; +docexample [connect 127.0.0.1 myPassword] []; -docsection [Game] +docident [demo] [Plays a recorded demo.]; +docargument [S] [the demo name] [] [0]; +docremark [Playback is interpolated for the player whose perspective you view.]; + +docident [demodelaymsec] [Changes the demo playback delay.]; +docargument [D] [delay in milliseconds] [min 0/max 500/default 120]; +docremark [Only touch if you know what you are doing: changes the delay in msec with which the demo is played back to allow for interpolation. Default is 100, if you decrease it you will most likely just get choppier (it will obstruct the spline interpolation) for an unnoticable bit less lag. Increase it if you notice choppyness in playback, should not be needed in general, but may help if you insist on playing back demos at very low demoplaybackspeed.]; + +docident [demoplaybackspeed] [Sets the playback speed for a demo.]; +docargument [P] [the playback speed] [min 10/max 1000/default 100]; +docremark [To see the effect, the variable must be set before playing a demo.]; + +docident [demotracking] [Specifies if particles should be emitted on demo players position.]; +docargument [B] [sets the demo tracking state] [1 (on), 0 (off) min 0/max 1/default 0]; +docremark [When demotracking is on (B = 1), the camera will create a red particle every frame where it moves, creating a trail. This can be used to inspect someone's movement in a game. It will only show the last N particles according to the maxparticles variable, which you may want to increase to 10000. The particles will remain even after you stop the demo, so you can use edit mode to look at it from all angles.]; + +docident [disconnect] [Leaves a server.]; + +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 [getmap] [Retrieves the last map that was sent to the server using 'sendmap'.]; + +docident [hidestats] [Turns on/off display of fps/rendering stats on the HUD.]; +docargument [B] [Turns the stats off (1) or on (0)] [min 0/max 1/default 1]; + +docident [mode] [Set gameplay mode to N for the next game played (next map load).]; +docargument [N] [the mode number] [TODO] [0]; + +docident [name] [Sets the nick name for the local player.]; +docargument [N] [the name] [] [0]; + +docident [record] [Starts recording of a demo.]; +docargument [S] [the demo name] [] [0]; +docremark [This works for any multiplayer mode, including the default "ffa" mode you are in when you load up a map locally. The file is saved to demos/S.cdgz.]; + +docident [say] [Outputs text to other players.]; +docargument [S...] [the text] [] [1]; +docremark [If the text begins with an 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 where you can type stuff into, which 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.]; +docremark [this puts a prompt on screen where you can type stuff into, which 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.]; +docremark [this puts a prompt on screen where you can type stuff into, which 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.]; +docremark [this puts a prompt on screen where you can type stuff into, which 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.]; +docremark [this puts a prompt on screen where you can type stuff into, which 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.]; +docremark [this puts a prompt on screen where you can type stuff into, which 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.]; +docremark [this puts a prompt on screen where you can type stuff into, which 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 [schowscores] [Shows or hides the scores.]; +dockey [TAB] [] []; + +docident [sendmap] [Sends the current map to the server and sends other players a message about it.]; +docargument [M] [map to save and reload locally] [] [0]; +docremark [If the map argument is specified, the map is first saved and then reloaded before sending it. Note its always required to be on the map one wants to send before issuing this command!]; + +docident [stop] [Stops any demo recording or playback.]; + +docident [team] [Sets the team for the local player.]; +docargument [S] [the team name] [either CLA or RVSF] [0]; +docexample [team CLA] []; + +docident [weapon] [Changes the weapon.]; +docargument [N] [the weapon number] [0 (knife), 1 (pistol), 2 (shotgun), 3 (sub), 4 (sniper), 5 (assault), 6 (grenades)] [0]; + +docsection [General] docident [alias] [Binds a name to commands.]; -docargument [N] [the name of the alias] [string, must not contain '$']; -docargument [A] [the commands] [string]; +docargument [N] [the name of the alias] [string, must not contain '$'] [0]; +docargument [A] [the commands] [string] [0]; docremark [It is possible to re-bind an alias, even during its evaluation.]; docremark [Example: alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ]]; 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 [bind] [Binds a key to a command.]; -docargument [K] [the key to bind] [string]; -docargument [A] [the command] [string, usually an alias]; +docargument [K] [the key to bind] [string] [0]; +docargument [A] [the command] [string, usually an alias] [0]; docremark [To find out what key names and their default bindings are, look at config/keymap.cfg, then add bind commands to your autoexec.cfg.]; +docident [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)]; +dockey [KP_PLUS] [+ on the keypad] [resets the history (conskip -1000)]; + docident [crosshairfx] [Turns on or off crosshair effects.]; docargument [B] [Turns the effects on (1) or off (0)] [min 0/max 1/default 1]; docremark [When on, the crosshair will go grey when the weapon is reloading, orange when health se 50 or red when se 25.]; @@ -101,48 +193,92 @@ docident [crosshairsize] [Sets the size of your crosshair.]; docargument [N] [the crosshair size] [min 0/max 50/default 15]; docremark [The crosshair is turned off entirely if the size is set to 0.]; +docident [docargument] [Adds a new argument documentation to an identifier.]; +docargument [T] [the token] [] [0]; +docargument [D] [the description] [] [0]; +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. The new argument is added to the last added identifier documentation.]; +docremark [The last argument of an identifier can be flagged as variable-length to indicate that it represents an unknown number of arguments.]; + +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.]; + +docident [docident] [Adds a new identifier documentation to a section.]; +docargument [N] [name of the identifier] [] [0]; +docargument [D] [the description] [] [0]; +docremark [An identifier represents a command or variable. The new identifier documentation is assigned to the last added documentation section.]; +docremark [The name may countain 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 entitiy."] []; + +docident [docinvalid] [Outputs a list of identifer documentations that do not match any existing identifer.]; +docremark [Multipart identifiers are not included in this list, see 'docident'.]; + +docident [docref] [Adds a new documentation reference to an identifier.]; +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.]; + +docident [docremark] [Adds a new documentation remark to an identifier.]; +docargument [S] [the remark] [] [0]; +docremark [The new remark is added to the last added identifier documentation.]; + +docident [docsection] [Adds a new section to the ingame documentation.]; +docargument [S] [the section name] [] [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 identifers like aliases should be included too.]; +docremark [Note that the list also includes identifiers that contain the substrings "TODO" or "UNDONE" in their documentation.]; + +docident [docwritebaseref] [Writes out a base XML documentation reference containing templates for the builtin identifiers.]; +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 "config/autogenerated_base_reference.xml" by default. The three arguments can be changed later on in the generated XML document.]; + docident [dynlight] [Determines wether dynamic shadows and lights are rendered, providedjust incase they slow your fps down too much.]; docargument [R] [the radius of a dynamic light] [min 0/max 32/default 16]; docremark [With radius you can specify the radius of a dynamic light, smaller to maybe gain some speed (0 is off entirely), or bigger to see the effect of dynamic shadows more dramatically (try shooting it past some pillars that have a dark area on the other side... or use the "gamespeed" variable).]; docident [exec] [Executes all commands in a specified config file.]; -docargument [C] [the config file] []; +docargument [C] [the config file] [] [0]; docident [fog] [Sets the fog distance.]; -docargument [N] [the fog distance] [integer, default is 160]; +docargument [N] [the fog distance] [integer, default is 160] [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.]; docident [fogcolour] [Sets fog and clearing colour.]; -docargument [C] [the colour] [integer, default is 0x8099B3]; +docargument [C] [the colour] [integer, default is 0x8099B3] [0]; docremark [This and the fog variable can be set in the map config file.]; docident [forward] [Moves the player forward.]; docremark [default keys: W and Up Arrow]; docident [fov] [Sets the field of view (fov).]; -docargument [N] [the fov value] [60..120]; +docargument [N] [the fov value] [60..120] [0]; docident [gamma] [Sets the hardware gamma value.]; docargument [N] [the gamma value] [min 30/max 300/default 100]; docremark [May not work if your card/driver doesn't support it.]; -docident [hidestats] [Turns on/off display of fps/rendering stats on the HUD.]; -docargument [B] [Turns the stats off (1) or on (0)] [min 0/max 1/default 1]; - docident [history] [Executes the specified command in the command line history.]; -docargument [N] [the N'th command from the history] []; +docargument [N] [the N'th command from the history] [] [0]; docremark [For example, binding "history 0" to a key allows to quickly repeat the last command typed in (useful for placing many identical entities etc.)]; docident [invmouse] [Sets mouse to "flight sim" mode.]; -docargument [B] [sets invmouse] [0 (off), else (on)]; +docargument [B] [sets invmouse] [0 (off), else (on)] [0]; docident [jump] [Triggers a jump.]; docremark [default keys: space and right mouse.]; docident [keymap] [Sets up the keymap for the specified key.]; -docargument [K] [the key to map] []; -docargument [N] [the name for the key] []; -docargument [A] [the default action] []; +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.]; docident [left] [Moves the player left.]; @@ -156,48 +292,60 @@ docident [lightscale] [Used to finetune the "overbright lighting" rendering feat docargument [N] [the brightness of the scene] [min 1/max 100/default 4]; docremark [After changing this value, a "recalc" is needed to see the differences.]; +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 [TODO: multiplayer voting]; +docremark [A map given as "blah" refers to "packages/base/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 in there can be overridden per package or per map by creating a "package.cfg" or "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 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 [maxroll] [Sets the maximum value the display will roll on strafing.]; docargument [N] [the roll value] [min 0/max 20/default 0]; docident [menuitem] [Creates a new menuitem.]; -docargument [N] [the name of the menuitem] []; -docargument [A] [the action on selection] []; +docargument [N] [the name of the menuitem] [] [0]; +docargument [A] [the action on selection] [] [0]; docremark [If the action argument is omitted, then it will be set to the same value as the description. Upon pressing return, the associated action will be executed. See config/menus.cfg for examples.]; +docident [millis] [Returns the number of milliseconds since engine start.]; +docexample [echo (millis)] []; + docident [minmillis] [Sets the minimum number of milliseconds a frame should take.]; -docargument [N] [the number of milliseconds] [integer, 0 (off), default is 5]; +docargument [N] [the number of milliseconds] [integer, 0 (off), default is 5] [0]; docremark [This is for very fast machines that run Cube at hundreds of fps. Default is 5, i.e. try to stay close to 200fps. This command is not exact, i.e. the precise delay it generates depends on OS and other factors... experiment with your ideal setting.]; docident [musicvol] [Sets the music volume.]; -docargument [N] [the volume] [0..255]; +docargument [N] [the volume] [0..255] [0]; docident [newmenu] [Creates a new menu.]; -docargument [N] [the name of the menu] []; +docargument [N] [the name of the menu] [] [0]; docident [onrelease] [Executes a command on the release of a key/button.]; -docargument [A] [the command] []; +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" ] ]] []; docident [particlesize] [Scales all particles.]; docargument [P] [the scale percentage] [min 20/max 500/default 100]; docident [quit] [Quits the game without asking.]; +docident [rate] [Sets the clients maximum downstream bandwidth.]; +docargument [N] [the bytes per second] [min 0/max 25000/default 0]; +docremark [Leaving it at 0 (the default) means the server will dynamically try to do the best thing, this is recommended for players who don't have a clue what their bandwidth is (setting your rate unoptimally is worse than not setting it all). Modem players (56k) could try rate 4000 and tweak from there, dsl players can try rate 6000-10000. Note that the more players on a server, the more critical the effect of your rate. If you are tweak addicted, you can try playing with the variables throttle_decel (how quickly to start dropping packets when your connection becomes bandwidth limited) throttle_accel (how quickly to recover once bandwidth becomes available again) and throttle_interval (how quickly to reestimate the situation). Change the defaults at your own risk.]; + docident [right] [Moves the player right.]; docremark [default keys: D and Right Arrow]; docident [screenshot] [Takes a screenshot.]; -docremark [Writes out "screenshots/screenshotN.bmp", where N is the number of milliseconds since cube was launched. default key = F12]; - -docident [screenshot] [Takes a screenshot.]; -docremark [Screenshots are saved to "screenshots/screenshotN.bmp", where N is the number of milliseconds since the game was launched (default key = F12).]; +docremark [Screenshots are saved to "screenshots/screenshotN.bmp", where N is the number of milliseconds since the game was launched.]; +dockey [F12] [] []; docident [sensitivity] [Sets the mouse sensitivity.]; -docargument [S] [the sensitivity] [integer]; +docargument [S] [the sensitivity] [integer] [0]; docremark [With 'sensitivityscale' you can specify a number that the sensitivity is divided by.]; docident [showmenu] [Displays the specified menu.]; -docargument [N] [the name of a previously defined menu] []; +docargument [N] [the name of a previously defined menu] [] [0]; docremark [The menu allows the user to pick an item with the cursor keys. Upon pressing return, the associated action will be executed. Pressing ESC will cancel the menu.]; docident [soundbufferlen] [Sets the sound buffer length.]; @@ -207,6 +355,9 @@ docremark [Tweak this if you experience stuttering or lagging sound.]; docident [soundvol] [Sets the sound volume.]; docargument [N] [the volume] [min 0/max 255/default 155]; +docident [updatefrommaster] [Contacts the masterserver and adds any new servers to the server list.]; +docremark [The servers are written to the config/servers.cfg file. This menu can be reached through the Multiplayer menu.]; + 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.]; @@ -214,39 +365,40 @@ docremark [Must be a power of 2: 4 is the default, 8 is recommended for people o docsection [Editing] docident [arch] [Makes an arch out of the current selection.]; -docargument [S] [side delta (optional)] []; +docargument [S] [side delta (optional)] [] [0]; docremark [The selection must be a heighfield 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 atleast 2 thick to see the effect). Not all arch sizes are necessarily available, see config/prefabs.cfg.]; docident [archvertex] [Defines a vertex delta for a specific arch span prefab, used by the 'arch' command.]; -docargument [S] [span value] [integer]; -docargument [V] [vertex value] [integer]; -docargument [D] [delta value] [integer]; +docargument [S] [span value] [integer] [0]; +docargument [V] [vertex value] [integer] [0]; +docargument [D] [delta value] [integer] [0]; docremark [See config/prefabs.cfg for an example on usage.]; docident [clearents] [Deletes all entities of said type.]; -docargument [T] [the entity type, see command 'newent'] [string]; +docargument [T] [the entity type, see command 'newent'] [string] [0]; docident [copy] [Copies the current selection into a buffer.]; docremark [hotkey c]; 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. Default key = k you can make bigger corners at once by pressing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them.]; +docremark [In both cases, the corner will orient itself automatically depending on its neighbours, behaviour with other configurations than the 2 above is unspecified. Since the latter configuration generates possibly 2 floor and 2 ceiling levels, up to 4 textures are used: for example for the 2 floors the higher one will of the cube itself, and the lower one of a neighbouring low cube. You can make bigger corners at once by issuing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them.]; +dockey [K] [] []; docident [delent] [Deletes the entity closest to the player]; docremark [hotkey x]; docident [editheight] [Changes the height of the current selection.]; -docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)]; -docargument [D] [the delta value to move it in] [1 (forwards), -1 (backwards)]; +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]; docremark [Default keys are [ and ] for floor level, and o/p for ceiling.]; docident [editing] [A variable indicating if the game is in editmode.]; docargument [] [editmode] [1 (true), 0 (false) read-only]; 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)]; -docargument [D] [the direction you want to cycle the textures in] [1 (forwards), -1 (backwards)]; +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.]; @@ -255,40 +407,35 @@ docremark [In map edit mode you can select bits of the map by clicking or draggi docremark [Hotkey E]; docident [entproperty] [Changes property of the closest entity.]; -docargument [P] [the property to change] [0..3]; -docargument [A] [amount by wich the property is increased] [integer]; +docargument [P] [the property to change] [0..3] [0]; +docargument [A] [amount by wich the property is increased] [integer] [0]; docremark [For example 'entproperty 0 2' when executed near a lightsource would increase its radius by 2.]; docident [equalize] [Levels the floor/ceiling of the selection.]; -docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)]; +docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)] [0]; docremark [default keys , and .]; docident [flrceil] [A variable indicating if the player looks at the floor or at the ceiling.]; docargument [] [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)]; +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 [heighfield] [Marks the current selection as a heightfield.]; -docargument [T] [an integer denoting the type] [0 (floor), 2 (ceiling)]; +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 heighfield. This also means if you have 2 independant heightfields accidentally touch eachother, you will not get correct caps. Also, a heighfield is slightly slower to render than a non-heighfield 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.]; -docident [map] [Loads up a map in the gamemode set previously by the 'mode' command.]; -docargument [M] [name of the map to load] [string]; -docremark [A map given as "blah" refers to "packages/base/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 in there can be overridden per package or per map by creating a "package.cfg" or "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 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 [mapenlarge] [Enlarges the current map.]; docremark [This command will make the current map 1 power of two bigger. So a 6 size map (64x64 units) it will become a 7 map (128x128), with the old map in the middle (from 32-96) and the new areas solid.]; docident [mapmodel] [Registers a mapmodel that can be placed in maps.]; -docargument [R] [the square radius] [string]; -docargument [H] [the height] [integer]; -docargument [Z] [the initial Z-offset above ground] [integer]; -docargument [S] [the snap value in 16ths of a cube unit] [integer, 0 meaning no snap]; -docargument [N] [the name of the map model] [string]; +docargument [R] [the square radius] [string] [0]; +docargument [H] [the height] [integer] [0]; +docargument [Z] [the initial Z-offset above ground] [integer] [0]; +docargument [S] [the snap value in 16ths of a cube unit] [integer, 0 meaning no snap] [0]; +docargument [N] [the name of the map model] [string] [0]; docremark [A map model registered with this command can be placed in a map using the 'newent mapmodel' command. All of these values are used for collision as well as rendering. Specifying a snap can be useful for architectural mapmodels, as the md2 format doesn't provide exact vertex coordinates.]; docremark [Example: mapmodel 4 2 4 2 this map model is 8x8x2 in size (x,y,z), by default hovers 4 units above ground, and has all coordinates snapped to the nearest even number. See data/models.cfg.]; @@ -296,15 +443,15 @@ docident [mapmodelreset] [Resets the mapmodel slots/indices to 0.]; docremark [Each subsequent mapmodel command increases it again. See config/default_map_settings.cfg for an example.]; docident [mapmsg] [Sets the map message, which will be displayed when the map loads.]; -docargument [M] [the map message] [string]; +docargument [M] [the map message] [string] [0]; docremark [For example: mapmsg "Map By Author".]; docident [newent] [Adds a new entity]; -docargument [type] [the entity type] [light, playerstart, clips, ammobox, grenades, health, armour, akimbo, mapmodel, trigger, ladder, ctf-flag]; -docargument [value1] [see newent 'type'] []; -docargument [value2] [see newent 'type'] []; -docargument [value3] [see newent 'type'] []; -docargument [value4] [see newent 'type'] []; +docargument [type] [the entity type] [light, playerstart, clips, ammobox, grenades, health, armour, akimbo, mapmodel, trigger, ladder, ctf-flag] [0]; +docargument [value1] [see newent 'type'] [] [0]; +docargument [value2] [see newent 'type'] [] [0]; +docargument [value3] [see newent 'type'] [] [0]; +docargument [value4] [see newent 'type'] [] [0]; docremark [(x,y) is determined by the current selection (the red dot corner) and z by the camera height, of said type. Type is a string giving the type of entity, such as "light", and may optionally take values (depending on the entity).]; docident [newent ammo] [Adds a new ammo box item.]; @@ -316,7 +463,7 @@ docident [newent armour] [Adds a new akimbo item.]; docident [newent clips] [Adds a new clip item.]; docident [newent ctf-flag] [Adds a CTF flag entity.]; -docargument [T] [denotes the flag's team] [0 (CLA), 1 (RVSF)]; +docargument [T] [denotes the flag's team] [0 (CLA), 1 (RVSF)] [0]; docremark [Note that this entity is only rendered as flag if the current game mode is CTF.]; docident [newent grenades] [Adds a new grenades item.]; @@ -324,35 +471,35 @@ docident [newent grenades] [Adds a new grenades item.]; docident [newent health] [Adds a new health item.]; docident [newent ladder] [Adds a ladder entity.]; -docargument [H] [the height of the ladder] [integer]; +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.]; docident [newent light] [Adds a new light entity]; -docargument [radius] [the light radius] [1..32]; -docargument [R] [red colour component. see remarks below.] [1..255]; -docargument [G] [green colour component] [1..255]; -docargument [B] [blue colour component] [1..255]; +docargument [radius] [the light radius] [1..32] [0]; +docargument [R] [red colour component. see remarks below.] [1..255] [0]; +docargument [G] [green colour component] [1..255] [0]; +docargument [B] [blue colour component] [1..255] [0]; docremark [if only argument R is specified, it is interpreted as brightness for white light.]; docident [newent mapmodel] [Adds a map model, i.e. an object rendered as md2/md3 which you collide against but has no behaviour or movement]; -docargument [N] [the mapmodel identifier] [integer]; -docargument [Z] [extra elevation above ground] [integer]; -docargument [T] [the map texture to use (optional)] [integer]; +docargument [N] [the mapmodel identifier] [integer] [0]; +docargument [Z] [extra elevation above ground] [integer] [0]; +docargument [T] [the map texture to use (optional)] [integer] [0]; docremark [The mapmodel identifier is the desired map model which is defined by the 'mapmodel' command. The map texture refers to a texture which is defined by the 'texture' command, if omitted the models default skin will be used. The 'mapmodel' and 'texture' commands are placed in the map config normally. Mapmodels are more expensive than normal map geometry, do not use insane amounts of them to replace normal geometry.]; docident [newent playerstart] [Adds a new spawn spot.]; docremark [The yaw is taken from the current camera yaw.]; docident [newent teledest] [Creates a teleport destination.]; -docargument [N] [the teleport identifier] [0..255]; +docargument [N] [the teleport identifier] [0..255] [0]; docremark [Teleports are linked to a teledest with the same identifier. The teledest uses the current camera yaw.]; docident [newent teleport] [Creates a teleport connection.]; -docargument [N] [the teleport identifier] [0..255]; +docargument [N] [the teleport identifier] [0..255] [0]; docremark [Teleports are linked to a teledest with the same identifier.]; docident [newmap] [Creates a new map.]; -docargument [S] [the size of the new map] [6..12]; +docargument [S] [the size of the new map] [6..12] [0]; docremark [The new map has 2^S cubes. For S, 6 is small, 7 medium, 8 large.]; docident [paste] [Pastes a previously copied selection.]; @@ -360,16 +507,16 @@ docremark [To paste a selection back requires a same size selection at the desti docremark [hotkey v]; docident [perlin] [Generates a perlin noise landscape in the current selection.]; -docargument [S] [the scale, frequency of the features] [default is 10]; -docargument [E] [the random seed] [integer]; -docargument [C] [cube size, how many cubes to generate a surface for at once (unused)] []; +docargument [S] [the scale, frequency of the features] [default is 10] [0]; +docargument [E] [the random seed] [integer] [0]; +docargument [C] [cube size, how many cubes to generate a surface for at once (unused)] [] [0]; docremark [Keep the seed the same to create multiple perlin areas which fit with eachother, or use different numbers if to create alternative random generations.]; docident [recalc] [Recomputes all there is to recompute about a map, currently only lighting.]; docremark [hotkey R]; docident [registersound] [Registers a sound.]; -docargument [N] [sound name] [string, see config/sounds.cfg]; +docargument [N] [sound name] [string, see config/sounds.cfg] [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.]; @@ -377,20 +524,20 @@ docident [replace] [Repeats the last texture edit thruout the map.]; docremark [The way it works is intuitive: simply edit any texture anywhere, then using "replace" will replace all textures thruout the map in the same way (taking into account wether 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 [savemap] [Saves the current map.]; -docargument [M] [file name of the map, see command 'map' for the naming scheme] [string]; +docargument [M] [file name of the map, see command 'map' for the naming scheme] [string] [0]; docremark [savemap makes a versioned backup (mapname_N.BAK) if a map by that name already exists. If the name argument is omitted, it is saved under the current map name.]; docremark [Where you store a map depends on the complexity of what you are creating: if its a single map (maybe with its own .cfg) then the "base" package is the best place. If its multiple maps or a map with new media (textures etc.) its better to store it in its own package (a directory under "packages"), which makes distributing it less messy.]; docident [scalelights] [Scales all lights in the map.]; -docargument [P] [percentage] []; -docargument [I] [intensity] []; +docargument [P] [percentage] [] [0]; +docargument [I] [intensity] [] [0]; docremark [This command is useful if a map is too dark or bright but you want to keep the light entities where they are.]; docident [select] [Selects the given area, as if dragged with the mouse.]; -docargument [X] [the X coordinate] []; -docargument [Y] [the Y coordinate] []; -docargument [XS] [the length along the X axis] []; -docargument [XY] [the length along the Y axis] []; +docargument [X] [the X coordinate] [] [0]; +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 useful for making complex geometry-generating scripts. The current dimensions of the selection (either created by the user or this command) are in the variables selx, sely, selxs and selys and can also be read/modified.]; 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.).]; @@ -398,21 +545,21 @@ docident [showmip] [Toggles between showing what parts of the scenery are render docremark [Shows hat parts of the scenery are rendered using what size cubes, and outputs some stats too. This can give mappers hints as to what architecture to align / textures to change etc.]; docident [slope] [Makes a slope out of the current selection.]; -docargument [X] [x delta step] [integer]; -docargument [Y] [y delta step] [integer]; +docargument [X] [x delta step] [integer] [0]; +docargument [Y] [y delta step] [integer] [0]; docremark [The selection must be a heighfield 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.]; 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)]; +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.]; docident [sound] [Plays the specified sound.]; -docargument [S] [the sound to play] [string, see config/sounds.cfg]; +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 "aard/jump") both play the standard jump sound.]; docident [texture] [Binds a texture to the current texture slot.]; -docargument [S] [number of a secondary texture (unused)] [string]; -docargument [F] [file name of the texture to bind] [string]; +docargument [S] [number of a secondary texture (unused)] [string] [0]; +docargument [F] [file name of the texture to bind] [string] [0]; docremark [Binds the texture indicated in filename to the current texture slot, then increments the slot number. This is for use in map configs only. A secondary textures can be specified for a single texture slot, for use in shaders and other features (unused for now, should be set to 0 to indicate primary texture).]; docident [texturereset] [Sets the texture slot to 0 for the subsequent "texture" commands.]; @@ -424,16 +571,16 @@ docident [undo] [Multi-level undo of any of the changes caused by editing operat docremark [hotkey u]; docident [undomegs] [Sets the number of megabytes used for the undo buffer.]; -docargument [N] [number of megabytes, default is 1] [integer]; +docargument [N] [number of megabytes, default is 1] [integer] [0]; 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).]; docident [vdelta] [changes the vdelta value of the current selection]; -docargument [N] [vdelta value] []; +docargument [N] [vdelta value] [] [0]; docremark [Note that unlike all other editing functions, this function doesn't affect a cube, but its top-left vertex (market by the dot in the editing cursor). So to edit a N * M heightfield, you will likely have to edit the vdelta of (N+1) * (M+1) cubes, i.e. you have to select 1 row and 1 column more in the opposite direction of the red dot to affect all the vertices of a heightfield of a given size (try it, it makes sense :)]; docremark [A floor delta offsets vertices to beneath the level set by editheight (and a ceil delta to above). Delta offsets have a precision of a quarter of a unit, however you should use non-unitsize vertices only to touch other such vertices. Default keys are 8 and 9 to decrease/increase the vdelta.]; docident [waterlevel] [Sets the global water level for the map.]; -docargument [H] [the water level] [integer]; +docargument [H] [the water level] [integer] [0]; 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 eachother. Players can influence how accurate the water is rendered using the "watersubdiv" command (map config).]; diff --git a/docs/reference.xml b/docs/reference.xml index a06e2601..91ea8711 100644 --- a/docs/reference.xml +++ b/docs/reference.xml @@ -3,7 +3,6 @@ - @@ -12,7 +11,7 @@ This reference describes the commands and variables available in AssaultCube. - +
This section describes identifiers that are closely related to the CubeScript language. @@ -246,11 +245,455 @@
-
+
- This section describes identifiers closely related to the Cube Engine. + This section describes gameplay related identifiers. + + Sets the nick name for the local player. + + + + + + Outputs text to other players. + + + If the text begins with an percent character (%), + only team mates will receive the message. + + + + + + + + + Puts a prompt on screen. + + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + this puts a prompt on screen where you can type stuff into, + which 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. + + + + + + + + + + + + + + + + Connects to a server. + + + + + connect 127.0.0.1 myPassword + + + + + + + + + + Leaves a server. + + + Sets the team for the local player. + + + + team CLA + + + + + + + + + Shows or hides the scores. + + + + + + Changes the weapon. + + + + + + Set gameplay mode to N for the next game played (next map load). + + + + + + + + + Sends the current map to the server and sends other players a message about it. + + + If the map argument is specified, the map is first saved and then reloaded before sending it. + Note its always required to be on the map one wants + to send before issuing this command! + + + + + + + + + + + Retrieves the last map that was sent to the server using 'sendmap'. + + + + + + Starts recording of a demo. + + + This works for any multiplayer mode, including the default "ffa" mode you are in when + you load up a map locally. The file is saved to demos/S.cdgz. + + + + + + + + + Stops any demo recording or playback. + + + + Plays a recorded demo. + + + Playback is interpolated for the player whose perspective you view. + + + + + + + + Turns on/off display of fps/rendering stats on the HUD. + + + + Sets the playback speed for a demo. + + To see the effect, the variable must be set before playing a demo. + + + + + Changes the demo playback delay. + + + Only touch if you know what you are doing: + changes the delay in msec with which the demo is played back to allow for interpolation. + Default is 100, if you decrease it you will most likely just get choppier (it will obstruct + the spline interpolation) for an unnoticable bit less lag. Increase it if you notice choppyness + in playback, should not be needed in general, but may help if you insist on playing back + demos at very low demoplaybackspeed. + + + + + + Specifies if particles should be emitted on demo players position. + + + When demotracking is on (B = 1), the camera will create a red particle every frame where it moves, + creating a trail. This can be used to inspect someone's movement in a game. + It will only show the last N particles according to the maxparticles variable, + which you may want to increase to 10000. The particles will remain even after + you stop the demo, so you can use edit mode to look at it from all angles. + + + + + + Sets the gamespeed in percent. + + This does not work in multiplayer. For entertainment purposes only :) + + + + +
+
+ + This section describes general identifiers. + + + + Adds a new section to the ingame documentation. + + + + + + + + + Adds a new identifier documentation to a section. + + + An identifier represents a command or variable. The new identifier + documentation is assigned to the last added documentation section. + + + The name may countain 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. + + + + + docident fov "Sets the field of view." + + + docident "newent light" "Adds a new light entitiy." + + + + + + + + + + + + + + + + + + + Adds a new argument documentation to an identifier. + + + An argument represents either a command argument or a variable value. + The new argument is added to the last added identifier documentation. + + + The last argument of an identifier can be flagged as variable-length + to indicate that it represents an unknown number of arguments. + + + + + + + + + + + + + + Adds a new documentation remark to an identifier. + + + The new remark is added to the last added identifier documentation. + + + + + + + + + + + Adds a new documentation reference to an identifier. + + + The new reference is added to the last added identifier documentation. + + + + + + + + + + + + + Outputs a list of yet undocumented identifiers (commands,variables, etc) + + + If the one argument is omitted, only the builtin identifiers will be listed. Therefore specify the argument + other identifers like aliases should be included too. + + + Note that the list also includes identifiers that contain the substrings "TODO" or "UNDONE" in their documentation. + + + + + + + + + + + + + Outputs a list of identifer documentations that do not match any existing identifer. + + + Multipart identifiers are not included in this list, see 'docident'. + + + + + + + + + + Searches the ingame docs for identifier documentations matching the specified search string. + + + The name, description and remarks are included in the search. + + + + + + + + + + + + + Writes out a base XML documentation reference containing templates for the builtin identifiers. + + + The generated reference is written to "config/autogenerated_base_reference.xml" by default. + The three arguments can be changed later on in the generated XML document. + + + + + + + + + + + + + + + + Loads up a map in the gamemode set previously by the 'mode' command. + + + TODO: multiplayer voting + + + A map given as "blah" refers to "packages/base/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 in there can be overridden per package or per map by creating a "package.cfg" or "mapname.cfg" which + contains whatever you want to do differently from the default. + + + When the map finishes it will load the next map when one is defined, otherwise 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"). + + + + + + + + Triggers a jump. + + default keys: space and right mouse. + + + + Contacts the masterserver and adds any new servers to the server list. + + The servers are written to the config/servers.cfg file. This menu can be reached through the Multiplayer menu. + + + + + Allows to browse through the console history by offsetting the console output. + + + + + + + + + Returns the number of milliseconds since engine start. @@ -260,10 +703,6 @@ - -
-
- Binds a key to a command. @@ -295,7 +734,7 @@ - + Binds a name to commands. @@ -305,7 +744,7 @@ Example: alias myalias [ echo "hello world"; alias myalias [ echo "I already said hello" ] ] - + @@ -344,32 +783,12 @@ default: left mouse button - - Triggers a jump. - - default keys: space and right mouse. - - Sets mouse to "flight sim" mode. - - Sets the mouse sensitivity. - - - With 'sensitivityscale' you can specify a number that the sensitivity is divided by. - - - - - - - - - Sets the field of view (fov). @@ -416,18 +835,13 @@ Takes a screenshot. - Writes out "screenshots/screenshotN.bmp", where N is the number of milliseconds since cube was launched. - default key = F12 + Screenshots are saved to "screenshots/screenshotN.bmp", + where N is the number of milliseconds since the game was launched. - - - Takes a screenshot. - - - Screenshots are saved to "screenshots/screenshotN.bmp", - where N is the number of milliseconds since the game was launched (default key = F12). - + + + Sets the music volume. @@ -482,13 +896,13 @@ - + Executes the specified command in the command line history. - For example, binding "history 0" to a key allows to quickly repeat the last + For example, binding "history 0" to a key allows to quickly repeat the last command typed in (useful for placing many identical entities etc.) @@ -512,72 +926,20 @@ - - Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels. + + Sets the mouse sensitivity. - If this variable is changed this during play, - a "recalc" is needed to see the effect. + With 'sensitivityscale' you can specify a number that the sensitivity is divided by. - + - - - - Determines wether dynamic shadows and lights are rendered, providedjust incase they slow your fps down too much. - - - With radius you can specify the radius of a dynamic light, - smaller to maybe gain some speed (0 is off entirely), - or bigger to see the effect of dynamic shadows more dramatically - (try shooting it past some pillars that have a dark area on the other side... or use the "gamespeed" variable). - - - - - - Determines the subdivision of the water surface in maps. - - - Must be a power of 2: 4 is the default, 8 is recommended for people on slow machines, - 2 is nice for fast machines, and 1 is quite OTT. See "waterlevel" (edit reference) - on how to add water to your own levels. - - - - - - Sets the sound volume. - - - - Sets the sound buffer length. - - - Tweak this if you experience stuttering or lagging sound. - - - - - - Sets the hardware gamma value. - - - May not work if your card/driver doesn't support it. - - - - - - Turns on/off display of fps/rendering stats on the HUD. - - - - Sets the maximum value the display will roll on strafing. - - + + + + Sets the size of your crosshair. @@ -595,6 +957,89 @@ + + + Sets the maximum value the display will roll on strafing. + + + + Allows to finetune the amount of "error" the mipmapper/stripifier allow themselves for changing lightlevels. + + + If this variable is changed this during play, + a "recalc" is needed to see the effect. + + + + + + + + + Indicates if the weapons should be reloaded automatically. + + + + Determines wether dynamic shadows and lights are rendered, providedjust incase they slow your fps down too much. + + + With radius you can specify the radius of a dynamic light, + smaller to maybe gain some speed (0 is off entirely), + or bigger to see the effect of dynamic shadows more dramatically + (try shooting it past some pillars that have a dark area on the other side... or use the "gamespeed" variable). + + + + + + Determines the subdivision of the water surface in maps. + + + Must be a power of 2: 4 is the default, 8 is recommended for people on slow machines, + 2 is nice for fast machines, and 1 is quite OTT. See "waterlevel" (edit reference) + on how to add water to your own levels. + + + + + + Sets the sound volume. + + + + Sets the clients maximum downstream bandwidth. + + + Leaving it at 0 (the default) means the server will dynamically try to do the best thing, + this is recommended for players who don't have a clue what their bandwidth is + (setting your rate unoptimally is worse than not setting it all). + Modem players (56k) could try rate 4000 and tweak from there, dsl players can try rate 6000-10000. + Note that the more players on a server, the more critical the effect of your rate. + If you are tweak addicted, you can try playing with the variables throttle_decel + (how quickly to start dropping packets when your connection becomes bandwidth limited) + throttle_accel (how quickly to recover once bandwidth becomes available again) and + throttle_interval (how quickly to reestimate the situation). Change the defaults at your own risk. + + + + + + Sets the sound buffer length. + + + Tweak this if you experience stuttering or lagging sound. + + + + + + Sets the hardware gamma value. + + + May not work if your card/driver doesn't support it. + + + Used to finetune the "overbright lighting" rendering feature when enabled. @@ -616,27 +1061,6 @@
- @@ -759,10 +1183,13 @@ 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. Default key = k you can make bigger corners at once by - pressing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them. + itself, and the lower one of a neighbouring low cube. You can make bigger corners at once by + issuing "corner" on grid aligned 2x2/4x4/8x8 selections, with equal size solid blocks next to them. + + + Multi-level undo of any of the changes caused by editing operations @@ -962,25 +1389,6 @@ hotkey R - - Loads up a map in the gamemode set previously by the 'mode' command. - - - A map given as "blah" refers to "packages/base/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 in there can be overridden per package or per map by creating a "package.cfg" or "mapname.cfg" which - contains whatever you want to do differently from the default. - - - When the map finishes it will load the next map when one is defined, otherwise 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"). - - - - - - Saves the current map. diff --git a/docs/schemas/cuberef.xsd b/docs/schemas/cuberef.xsd index 7f9b55b2..b79de94c 100644 --- a/docs/schemas/cuberef.xsd +++ b/docs/schemas/cuberef.xsd @@ -50,6 +50,12 @@ + + + + + + @@ -91,17 +97,31 @@ - + - + + + + + + + + + + + + + + + @@ -125,6 +145,14 @@ + + + + + + + + @@ -163,6 +191,7 @@ + @@ -172,7 +201,7 @@ - + @@ -210,7 +239,7 @@ - + diff --git a/docs/styles/ac.css b/docs/styles/ac.css index 2cb06e93..70b3822d 100644 --- a/docs/styles/ac.css +++ b/docs/styles/ac.css @@ -1,6 +1,8 @@ /* ZLIB licensed, (C) 2007 Adrian 'driAn' Henke, http://www.sprintf.org */ -/* common styles for all AC xhtml documentation pages */ +/* + common styles for all documentation pages +*/ /* main layout */ diff --git a/docs/styles/cubedoc.css b/docs/styles/cubedoc.css index 60a59e8a..7f81de9e 100644 --- a/docs/styles/cubedoc.css +++ b/docs/styles/cubedoc.css @@ -1,122 +1,12 @@ -/* (C) Adrian Henke 2007 - ZLIB License */ +/* ZLIB licensed, (C) 2007 Adrian 'driAn' Henke, http://www.sprintf.org */ + +/* + styles for the readme +*/ @import url(ac.css); -/* -html -{ - background-color: #343434; /* blame firefox' buggy xslt support -} - -body -{ - font-family: Verdana, Sans-Serif; - margin: 0px; - padding: 10px 0 10px 0; - font-size: 12px; - color: Black; -} - -ul -{ - list-style-type:square; -} - -p -{ - margin-top: 0; - margin-bottom: 1em; -} - -img -{ - border-width: 0; -} - -pre -{ - margin: 0 0 1em 0; - padding: 0; - font-family: Courier New; - font-size: 12px; -} - -table -{ - margin-bottom: 1em; -} - -h1 -{ - font-size: 24px; - margin: 0 0 0.5em 0; -} - -h2 -{ - font-size: 18px; - margin: 0 0 0.5em 0; -} - -h3 -{ - font-size: 14px; - margin: 0 0 0.5em 0; -} - -#main -{ - background-color: #666666; - width: 650px; - margin: 0; - padding: 10px; - text-align: left; - border: solid 1px black; -} - -#header -{ - background-color: black; - width: 650px; - margin: 0px; - padding: 0; - height: 10px; - text-align: right; - font-size: 10px; - color: White; - font-family: Courier New, Sans-Serif; - line-height: 1em; -} - -#footer -{ - background-color: black; - width: 650px; - margin: 0; - padding: 0; - height: 10px; - text-align: right; - font-size: 10px; - color: White !important; - font-family: Courier New, Sans-Serif; - line-height: 1em; -} - -#footer a, #footer a:hover, #footer a:visited -{ - color: White; - text-decoration: none; -} - -a, a:hover, a:visited -{ - color: #333333; -} - -*/ - - /* guns */ table#guns td diff --git a/docs/styles/cuberef.css b/docs/styles/cuberef.css index 7a57e9c3..7c4840ed 100644 --- a/docs/styles/cuberef.css +++ b/docs/styles/cuberef.css @@ -1,7 +1,40 @@ -/* (C) 2007 Adrian 'driAn' Henke - http://www.sprintf.org - ZLIB licensed */ +/* ZLIB licensed, (C) 2007 Adrian 'driAn' Henke, http://www.sprintf.org */ + +/* + styles for the reference +*/ @import url(ac.css); +/* fix positioned menu */ + +div#fixedmenu a +{ + visibility: hidden; + position: fixed; + padding: 5px; + left: 10px; + bottom: 10px; + font-size: 16px; + font-family: Courier New, Sans-Serif; + font-weight: bold; + text-decoration: none; + border: solid 2px black; + background-color: #444444; + color: Black; +} + +body > div#fixedmenu a /* broken browsers will ignore this and therefore keep the menu hidden */ +{ + visibility: visible; +} + +div#fixedmenu a:hover +{ + background-color: #555555; +} + + /* side contentspanel */ div#contentspanel @@ -49,6 +82,7 @@ div#contentspanel div.identifiers a display: block; position: relative; width: 130px; + overflow: hidden; } div#contentspanel div.identifiers a:hover @@ -205,7 +239,6 @@ div.section div.identifier div.remarks div.remark div.section div.identifier div.references { - text-align: right; } div.section div.identifier div.references a.internal diff --git a/docs/transformations/cubedoc2xhtml.xslt b/docs/transformations/cubedoc2xhtml.xslt index 7814ffdf..8446818a 100644 --- a/docs/transformations/cubedoc2xhtml.xslt +++ b/docs/transformations/cubedoc2xhtml.xslt @@ -1,6 +1,10 @@ + + diff --git a/docs/transformations/cuberef2cubescript.xslt b/docs/transformations/cuberef2cubescript.xslt index d30cf61e..a666d8d2 100644 --- a/docs/transformations/cuberef2cubescript.xslt +++ b/docs/transformations/cuberef2cubescript.xslt @@ -1,16 +1,27 @@ - + - + + + + + + - - // auto generated script to make the command reference readable for AssaultCube + + + + + + + // auto generated script to make the doc reference readable for Cube games, see the 'docs/cuberef.txt' + @@ -18,21 +29,22 @@ [ ] - + + - + docident [ ] [ ]; - + - + docargument [ @@ -40,8 +52,17 @@ ] [ + ] [ + + + 1 + + + 0 + + ]; - + @@ -70,7 +91,7 @@ ]; - + @@ -79,7 +100,31 @@ [ ]; - + + + + + + docexample + [ + + ] [ + + ]; + + + + + + dockey + [ + + ] [ + + ] [ + + ]; + @@ -92,10 +137,10 @@ ] [ ]; - + - + diff --git a/docs/transformations/cuberef2xhtml.xslt b/docs/transformations/cuberef2xhtml.xslt index 45a08bc4..1b4a79de 100644 --- a/docs/transformations/cuberef2xhtml.xslt +++ b/docs/transformations/cuberef2xhtml.xslt @@ -8,6 +8,22 @@ + + + + + + + + + + + + + , + + + @@ -15,6 +31,9 @@ #identifier_ + + + @@ -30,6 +49,9 @@ +
+ TOP +
@@ -48,7 +70,7 @@
- +
@@ -62,7 +84,7 @@