admin.cfg commands : alias to const, doc updates

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6745 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2012-01-01 16:45:46 +00:00
parent 792fa3b58a
commit fed2e7c200
3 changed files with 260 additions and 185 deletions
+18 -18
View File
@@ -1,24 +1,24 @@
ingall = 0
kick = [ callvote 0 $arg1 $arg2 ]
ban = [ callvote 1 $arg1 $arg2 ]
removebans = [ callvote 2 $arg1 ]
mastermode = [ callvote 3 $arg1 ]
autoteam = [ callvote 4 $arg1 ]
forceteam = [ callvote 5 $arg1 ]
forceme = [ forceteam (findcn $curname) ]
ignoreall = [ if $connected [ ingall = 1; loop ia 21 [ ignore $ia ]; echo (c 1)NOTE: (c 5)All clients currently on the server were ignored. ] ]
unignoreall = [ if $connected [ ingall = 0; clearignored ]; echo (c 1)NOTE: (c 5)All clients currently on the server were unignored. ]
giveadmin = [ callvote 6 $arg1 ]
map = [ callvote 7 $arg1 $arg2 ]
recorddemo = [ callvote 8 1 ]
stopdemo = [ callvote 9 ]
cleardemo = [ callvote 10 $arg1 ]
cleardemos = [ callvote 10 0 ]
serverdesc = [ callvote 11 $arg1 ]
shuffleteams = [ callvote 12 ]
const kick [ callvote 0 $arg1 $arg2 ]
const ban [ callvote 1 $arg1 $arg2 ]
const removebans [ callvote 2 $arg1 ]
const mastermode [ callvote 3 $arg1 ]
const autoteam [ callvote 4 $arg1 ]
const forceteam [ callvote 5 $arg1 ]
const forceme [ forceteam (findcn $curname) ]
const ignoreall [ if $connected [ ingall = 1; loop ia 21 [ ignore $ia ]; echo (c 1)NOTE: (c 5)All clients currently on the server were ignored. ] ]
const unignoreall [ if $connected [ ingall = 0; clearignored ]; echo (c 1)NOTE: (c 5)All clients currently on the server were unignored. ]
const giveadmin [ callvote 6 $arg1 ]
const map [ callvote 7 $arg1 $arg2 ]
const recorddemo [ callvote 8 1 ]
const stopdemo [ callvote 9 ]
const cleardemo [ callvote 10 $arg1 ]
const cleardemos [ callvote 10 0 ]
const serverdesc [ callvote 11 $arg1 ]
const shuffleteams [ callvote 12 ]
demo = [
const demo [
_demofile = $arg1
if $connected [
addOnLoadOnce [ mode -1; map $_demofile ]
+183 -135
View File
@@ -6,48 +6,6 @@
docsection [CubeScript]
docident [<] [Determines if a value is smaller than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [<=] [Determines if a values is less than or equal than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [=] [Determines if two values are equal.];
docargument [A] [first value] [] [0];
docargument [B] [second value] [] [0];
docexample [echo there are only (concatword (= 1 1) (= 1 0)) types of people in the world] [Output: there are only 10 types of people in the world];
docident [>] [Determines if a value is bigger than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [>=] [Determines if a values is greater than or equal than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [||] [logical OR.];
docargument [A] [first value] [] [0];
docargument [B] [second value] [] [0];
docexample [echo (|| 1 0)] [output: 1];
docexample [echo (|| 0 0)] [output: 0];
docident [-] [Performs a subtraction.];
docargument [A] [the minuend] [] [0];
@@ -64,11 +22,11 @@ docargument [A] [first value] [] [0];
docargument [B] [second value] [] [0];
docident [*] [Performs a multiplication.];
docident [!=f] [Determines if a floating-point value is not equal to a second floating-point value.];
docargument [A] [the multiplicand] [] [0];
docargument [A] [the first value] [] [0];
docargument [B] [the multiplier] [] [0];
docargument [B] [the second value] [] [0];
docident [&&] [logical AND.];
@@ -80,6 +38,36 @@ docexample [echo (&& 1 1)] [Output: 1];
docexample [echo (&& 1 0)] [Output: 0];
docident [*] [Performs a multiplication.];
docargument [A] [the multiplicand] [] [0];
docargument [B] [the multiplier] [] [0];
docident [*=] [Multiplies a value and an alias.];
docargument [A] [the alias to multiplied] [] [0];
docargument [B] [the multiplier] [] [0];
docremark [Example: *= foo 1337];
docident [*f] [Performs a floating point multiplication.];
docargument [A] [the multiplicand] [] [0];
docargument [B] [the multiplier] [] [0];
docident [||] [logical OR.];
docargument [A] [first value] [] [0];
docargument [B] [second value] [] [0];
docexample [echo (|| 1 0)] [output: 1];
docexample [echo (|| 0 0)] [output: 0];
docident [+] [Performs an addition.];
docargument [A] [the first summand] [] [0];
@@ -88,6 +76,90 @@ docargument [B] [the second summand] [] [0];
docremark [Example: echo the sum of x and y is (+ $x $y)];
docident [+=] [Adds a value to an alias.];
docargument [A] [the alias to add to] [] [0];
docargument [B] [value to be added] [] [0];
docremark [Example: += foo 1337];
docident [+f] [Adds up two floating-point numbers.];
docargument [A] [the first summand] [float] [0];
docargument [B] [the second summand] [float] [0];
docident [<] [Determines if a value is smaller than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [<=] [Determines if a values is less than or equal than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [<=f] [Compares if a particular floating-point value is less than or equal to another floating-point value.];
docargument [A] [The first value.] [] [0];
docargument [B] [The second value.] [] [0];
docident [<f] [Compares if a particular floating-point value is smaller than another floating-point value.];
docargument [A] [The first value.] [] [0];
docargument [B] [The second value.] [] [0];
docident [=] [Determines if two values are equal.];
docargument [A] [first value] [] [0];
docargument [B] [second value] [] [0];
docexample [echo there are only (concatword (= 1 1) (= 1 0)) types of people in the world] [Output: there are only 10 types of people in the world];
docident [-=] [Subtracts a value from an alias.];
docargument [A] [the alias to subtract from] [] [0];
docargument [B] [value to be subtracted] [] [0];
docremark [Example: -= foo 1337];
docident [=f] [Compares if a particular floating-point value is equal to another floating-point value.];
docargument [A] [The first value.] [] [0];
docargument [B] [The second value.] [] [0];
docident [>] [Determines if a value is bigger than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [>=] [Determines if a values is greater than or equal than a second value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [>=f] [Determines if a floating-point value is greater than or equal to a second floating-point value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [>f] [Determines if a floating-point value is greater than a second floating-point value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [add2alias] [This will append the passed 2nd argument to any existing content of the alias named in the 1st argument. Several popular aliases have predefined shortcuts using this scriptalias: addOnQuit, addOnLoadOnce, addOnLoadAlways. Check config/scripts.cfg for possible omissions in that list.];
docexample [foo = "one" add2alias foo two echo foo] [Output: one two];
@@ -258,60 +330,12 @@ docargument [S] [the string to execute] [] [0];
docexample [execute (concat echo (addpunct fov 3))] [Example output: 90.0];
docident [<f] [Compares if a particular floating-point value is smaller than another floating-point value.];
docargument [A] [The first value.] [] [0];
docargument [B] [The second value.] [] [0];
docident [<=f] [Compares if a particular floating-point value is less than or equal to another floating-point value.];
docargument [A] [The first value.] [] [0];
docargument [B] [The second value.] [] [0];
docident [=f] [Compares if a particular floating-point value is equal to another floating-point value.];
docargument [A] [The first value.] [] [0];
docargument [B] [The second value.] [] [0];
docident [>f] [Determines if a floating-point value is greater than a second floating-point value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [>=f] [Determines if a floating-point value is greater than or equal to a second floating-point value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [-f] [Subtracts two floating-point numbers.];
docargument [A] [the minuend] [float] [0];
docargument [B] [the subtrahend] [float] [0];
docident [!=f] [Determines if a floating-point value is not equal to a second floating-point value.];
docargument [A] [the first value] [] [0];
docargument [B] [the second value] [] [0];
docident [*f] [Performs a floating point multiplication.];
docargument [A] [the multiplicand] [] [0];
docargument [B] [the multiplier] [] [0];
docident [+f] [Adds up two floating-point numbers.];
docargument [A] [the first summand] [float] [0];
docargument [B] [the second summand] [float] [0];
docident [findcn] [find client number (cn)];
docargument [N] [NAME] [] [0];
@@ -498,20 +522,6 @@ docargument [B] [the second string] [] [0];
docexample [if (strcmp yes yes) [echo the two strings are equal] [echo the two strings are not equal]] [Output: the two strings are equal];
docident [strins] [Returns string B inserted into string A at position X.];
docargument [A] [the original string] [] [0];
docargument [B] [the string to insert into the original] [] [0];
docargument [P] [the position at which to insert string B into string A] [] [0];
docremark [The third argument must be at least greater than -1, and 1 less than the length "(in characters)" of string A, otherwise use concat or concatword.];
docexample [echo (strins "Hello world" " cruel" 5)] [Output: Hello cruel world];
docexample [tmp = "Hello world"; echo (strins $tmp " cruel" (strlen $tmp))] [Output: -1];
docident [strlen] [Returns the length (in characters, including whitespace) of string S.];
docargument [S] [STRING] [] [0];
@@ -620,7 +630,7 @@ docexample [echo (toupper hello)] [Output: HELLO];
docident [while] [Loops the specified body while the condition evaluates to true.];
docargument [cond] [the condition] [0 (false) or anything else (true)] [0];
docargument [cond] [the condition] [the code evaluated before each iteration] [0];
docargument [body] [the body to execute on each iteration] [] [0];
@@ -896,7 +906,7 @@ docremark [default keys: D and Right Arrow];
docident [screenshot] [Takes a screenshot.];
docremark [Screenshots are saved to "screenshots/screenshotN.bmp", where N is the number of milliseconds since the game was launched.];
docremark [Screenshots are saved to "screenshots/[date]_[time]_[map]_[mode].[ext]", where [ext] is the image type selected.];
dockey [F12] [] [];
@@ -1186,6 +1196,22 @@ docargument [] [this command does not take any arguments] [none] [0];
docremark [This is a debugging command and only works for single player modes.];
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];
docargument [Y1] [Y-coordinate - top-left corner] [] [0];
docargument [Y2] [Y-coordinate - bottom-right corner] [] [0];
docargument [C] [a color for the zone, in hexadecimal notation] [default: 0x00FF00 (green)] [0];
docremark [Only a single zone can be drawn at a time, and it 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.];
docident [dropflag] [Drops the enemy flag.];
docident [footstepalign] [Maximum time span between player animation and the playback of the footstep sound];
@@ -1378,6 +1404,16 @@ 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 [modmdlvwepN] [change name of directory used for weapon model (viewable/world) number N];
docident [modmdlweapN] [change 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];
@@ -1672,6 +1708,20 @@ docident [addpath2way1] [];
docident [addpath2way2] [];
docident [addselection] [Select the given area, as if dragged with the mouse holding CTRL.];
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. It adds a selection to the current list of selections. The dimensions of the current selections can be accessed by the commands selsx, selsy, selsxs and selsys. 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.).];
docident [addwp] [];
docident [advancemaprevision] [Select the increment of the map revision number for the next 'savemap'.];
@@ -1860,14 +1910,14 @@ docargument [A] [42] [] [0];
docremark [The output will be written to the file 'mapdependencies.txt'.];
docident [mapbackupsonsave] [Determines if map backups (.bak) should be created when a map is saved.];
docargument [N] [0 off, 1 on] [min 0/max 1/default 1];
docident [Map editing] [A variable indicating if the game is in editmode.];
docargument [B] [editmode] [1 (true), 0 (false) read-only];
docident [mapbackupsonsave] [Determines if map backups (.bak) should be created when a map is saved.];
docargument [N] [0 off, 1 on] [min 0/max 1/default 1];
docident [mapenlarge] [Enlarges the current map.];
docremark [This command will make the current map 1 power of two bigger. So a size 6 map (64x64 units) will become a size 7 map (128x128), with the old map in the middle (from 32-96) and the new areas solid.];
@@ -2066,6 +2116,8 @@ 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 [resetselections] [Resets all current selections.];
docident [savemap] [Saves the current map.];
docargument [M] [file name of the map, see command 'map' for the naming scheme] [string] [0];
@@ -2082,7 +2134,7 @@ docargument [I] [intensity change (percentage)] [] [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.];
docident [select] [Resets all current selections and selects the given area, as if dragged with the mouse.];
docargument [X] [the X coordinate] [] [0];
@@ -2092,9 +2144,7 @@ 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.).];
docremark [This command is similar to addselection although "select" resets all selections.];
docident [selectionflip] [Flip the selected part of the map at an axis.];
@@ -2106,21 +2156,13 @@ docargument [D] [steps] [] [0];
docremark [To rotate clockwise, use a positive number of steps. Note, that only quadratic selections can be rotated by 90 degrees.];
docident [selx] [Current selection: x-coordinate];
docident [selsx] [Return a list containg the x-coordinate of each selection];
docargument [N] [x] [min 0/max 4096/default 0];
docident [selsxs] [Return a list containg the x-span of each selection];
docident [selxs] [Current selection: x-span];
docident [selsy] [Return a list containg the y-coordinate of each selection];
docargument [N] [xs] [min 0/max 4096/default 0];
docident [sely] [Current selection: y-coordinate];
docargument [N] [y] [min 0/max 4096/default 0];
docident [selys] [Current selection: y-span];
docargument [N] [ys] [min 0/max 4096/default 0];
docident [selsys] [Return a list containg the y-span of each selection];
docident [setjumpwp] [];
@@ -2544,6 +2586,10 @@ docident [righthanded] [Choose whether the players hand carrying the weapon appe
docargument [N] [0: lefty, 1: righty] [min 0/max 1/default 1];
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 [showstats] [Turns on/off display of FPS/rendering statistics on the HUD.];
docargument [N] [0: Show no stats, 1: Only show FPS stats, 2: Show all stats] [min 0/max 2/default 1];
@@ -2878,12 +2924,6 @@ docident [scorchttl] [];
docargument [V] [] [min 0/max 30000/default 10000];
docident [screenres] [Changes the screen resolution, available only for LINUX];
docargument [W] [width] [] [0];
docargument [H] [height] [] [0];
docident [scr_h] [Sets the screen height.];
docargument [] [the screen height] [min 0/max 768/default 10000];
@@ -2892,6 +2932,12 @@ docident [scr_w] [Sets the screen width.];
docargument [] [the screen width] [min 0/max 1024/default 10000];
docident [screenres] [Changes the screen resolution, available only for LINUX];
docargument [W] [width] [] [0];
docargument [H] [height] [] [0];
docident [setfont] [Changes the current font.];
docargument [N] [Font name] [name of the font] [0];
@@ -3726,6 +3772,8 @@ docargument [N] [TODO] [min 0/max 1/default 0];
docident [cleardemos] [Clears all demos currently in memory on the server.];
docident [delalias] [deletes the passed alias.];
docident [demonameformat] [set the formatstring for demo filenames - default: TODO (when stable)];
docargument [S] [STRING] [] [0];
+59 -32
View File
@@ -4053,26 +4053,6 @@ Output:
<value token="N" description="increment" minValue="1" maxValue="100" defaultValue="1" />
</variable>
<variable name="selx">
<description>Current selection: x-coordinate</description>
<value token="N" description="x" minValue="0" maxValue="4096" defaultValue="0" />
</variable>
<variable name="selxs">
<description>Current selection: x-span</description>
<value token="N" description="xs" minValue="0" maxValue="4096" defaultValue="0" />
</variable>
<variable name="sely">
<description>Current selection: y-coordinate</description>
<value token="N" description="y" minValue="0" maxValue="4096" defaultValue="0" />
</variable>
<variable name="selys">
<description>Current selection: y-span</description>
<value token="N" description="ys" minValue="0" maxValue="4096" defaultValue="0" />
</variable>
<variable name="showmodelclipping">
<description>Show mapmodel clipping during edit mode.</description>
<value token="N" description="-" minValue="0" maxValue="1" defaultValue="0" />
@@ -4189,23 +4169,19 @@ Output:
</command>
<command name="select">
<description>Selects the given area, as if dragged with the mouse.</description>
<description>Resets all current selections and selects the given area, as if dragged with the mouse.</description>
<remarks>
<remark>
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.
</remark>
<remark>
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.).
This command is similar to addselection although "select" resets all selections.
</remark>
</remarks>
<references>
<identifierReference name="selx" identifier="selx"/>
<identifierReference name="sely" identifier="sely"/>
<identifierReference name="selxs" identifier="selxs"/>
<identifierReference name="selys" identifier="selys"/>
<identifierReference name="addselection" identifier="addselection"/>
<identifierReference name="resetselections" identifier="resetselections"/>
<identifierReference name="selsx" identifier="selsx"/>
<identifierReference name="selsy" identifier="selsy"/>
<identifierReference name="selsxs" identifier="selsxs"/>
<identifierReference name="selsys" identifier="selsys"/>
</references>
<arguments>
<argument token="X" description="the X coordinate"/>
@@ -4215,6 +4191,57 @@ Output:
</arguments>
</command>
<command name="addselection">
<description>Select the given area, as if dragged with the mouse holding CTRL.</description>
<remarks>
<remark>
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 selsx, selsy, selsxs and selsys.
These commands return the list of coordinates corresponding to each selection.
</remark>
<remark>
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.).
</remark>
</remarks>
<references>
<identifierReference name="select" identifier="select"/>
<identifierReference name="resetselections" identifier="resetselections"/>
<identifierReference name="selsx" identifier="selsx"/>
<identifierReference name="selsy" identifier="selsy"/>
<identifierReference name="selsxs" identifier="selsxs"/>
<identifierReference name="selsys" identifier="selsys"/>
</references>
<arguments>
<argument token="X" description="the X coordinate"/>
<argument token="Y" description="the Y coordinate"/>
<argument token="XS" description="the length along the X axis"/>
<argument token="XY" description="the length along the Y axis"/>
</arguments>
</command>
<command name="resetselections">
<description>Resets all current selections.</description>
</command>
<command name="selsx">
<description>Return a list containg the x-coordinate of each selection</description>
</command>
<command name="selsxs">
<description>Return a list containg the x-span of each selection</description>
</command>
<command name="selsy">
<description>Return a list containg the y-coordinate of each selection</description>
</command>
<command name="selsys">
<description>Return a list containg the y-span of each selection</description>
</command>
<command name="registersound">
<description>Registers a sound.</description>
<remarks>