PROJECT: Contributions of var & command descriptions

Re: Request: Contributions of var & command descriptions

Postby arand » 08 Nov 2012, 19:46

I've tweaked and added everything up to this point now (I think at least), onto fixing the wiki parsing... again :)
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: Request: Contributions of var & command descriptions

Postby srbs » 09 Nov 2012, 07:59

Have some more:
The rest of the getvar* commands are kind of riding on Ticket 254

{l Code}: {l Select All Code}
setdesc "getvarmin"   "returns the minimum value of <varname>, a built-in integer variable^nexample: getvarmin firstpersonfov" "<varname>"
setdesc "getvarmax"   "returns the maximum value of <varname>, a built-in integer variable^nexample: getvarmax firstpersonfov" "<varname>"
setdesc "getfvarmin"  "returns the minimum value of <varname>, a built-in float variable^nexample: getfvarmin movespeed" "<varname>"
setdesc "getfvarmax"  "returns the maximum value of <varname>, a built-in float variable^nexample: getfvarmax movespeed" "<varname>"

setdesc "writevars" "Writes changed variables to <filename>, including the unchanged variables commented if <all> is true, and with the server prefix (sv_) if <server> is true.^nexample: writevars mygame.cfg 1 1" "<filename> <all> <server>"
// @arand: how should we show defaults (writevars vars.cfg 0 0)
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Request: Contributions of var & command descriptions

Postby srbs » 10 Nov 2012, 08:50

My version of escape/unescape.
{l Code}: {l Select All Code}
setdesc "escape" "returns a quoted string with all newline, tab, form feed, ^^, and ^" characters converted to the cubescript escape sequence (^^n, ^^t, ^^f, ^^^^, ^^^")^nexample: escape [line1^^nline2]" "<text>"
setdesc "unescape" "returns a string with all cubescript escape sequences converted back into the 'normal' characters^nSee escape^nexample: unescape [line1^^^^nline2]" "<text>"
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Request: Contributions of var & command descriptions

Postby srbs » 10 Nov 2012, 09:24

Here are the rest of the math functions grouped into logical sections.

{l Code}: {l Select All Code}
setdesc "max" "returns the maximum <integer> value^nexample: max 1 3 -9" "<integer...>"
setdesc "maxf" "returns the maximum <float> value^nexample: maxf 1.1, 2.9, -9.5" "<float...>"
setdesc "min" "returns the minimum <integer> value^nexample: min 1 3 -9" "<integer...>"
setdesc "minf" "returns the minimum <float> value^nexample: minf 1.1, 2.9, -9.5" "<float...>"

setdesc "precf" "returns <float> truncated to <n> decimal points^nexample: precf 15.125 2" "<float> <n>"

setdesc "cos" "returns the cosine of <float>^nexample: cos 3.1415" "<float>"
setdesc "sin" "returns the sine of <float>^nexample: sin 3.1415" "<float>"
setdesc "tan" "returns the tangent of <float>^nexample: tan 3.1415" "<float>"

setdesc "acos" "returns the arc-cosine of <float>^nexample: acos 1" "<float>"
setdesc "asin" "returns the arc-sine of <float>^nexample: asin 1" "<float>"
setdesc "atan" "returns the arc-tangent of <float>^nexample: atan 1" "<float>"


setdesc "abs" "returns the absolute power of <integer>^nexample: abs -5" "<integer>"
setdesc "absf" "returns the absolute power of <float>^nexample: absf -8.5" "<float>"

setdesc "exp" "returns e (2.71828) raised to the <float> power^nexample: exp 5.6" "<float>"
setdesc "pow" "returns <base> raised to the power of <exponent>^nexample: pow 2.1 8.1" "<base> <exponent>"
setdesc "sqrt" "returns the square root of <float>^nexample: sqrt 4" "<float>"

setdesc "log10" "return the logarithm of <float> with base 10^nexample: log10 1000" "<float>"
setdesc "log2" "return the logarithm of <float> with base 2^nexample: log2 8" "<float>"
setdesc "loge" "return the logarithm of <float> with base e^nexample: loge 20.08" "<float>"



EDIT (2012/11/27): fixed absf example.
Last edited by srbs on 27 Nov 2012, 08:36, edited 3 times in total.
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Request: Contributions of var & command descriptions

Postby srbs » 26 Nov 2012, 07:42

sortlist! (r4498)

{l Code}: {l Select All Code}
setdesc "sortlist" "returns a sorted list (quicksort) based on the result of the <body> applied onto the <list>^nThe <body> returns true if the two elements, <varname_1> & <varname_2> need to be swapped, false otherwise.^nexample: sortlist ^"this is a list^" a b [<s $a $b]" "<list> <varname_1> <varname_2> <body>"
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Request: Contributions of var & command descriptions

Postby srbs » 27 Nov 2012, 07:33

stripcolors! (r4506)

{l Code}: {l Select All Code}
setdesc "stripcolors" "returns the <string> without any colors^nexample: stripcolors ^"^^frhello ^^f[6252287]^"" "<string>"
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Request: Contributions of var & command descriptions

Postby arand » 30 Nov 2012, 22:22

EDITED...

Added and tweaked everything up to this point, thanks!
I replaced the earlier escape/unescape since srbs' one was a bit more verbose I felt.

I also changed sortlist quite a lot and made it more verbose, I hope I've understood it correctly:
{l Code}: {l Select All Code}
setdesc "sortlist" "returns a sorted list (quicksort) based on the result of <body> applied onto <list>;^n if <body> returns true the two elements <varname_1> and <varname_2> will be swapped, unchanged otherwise,^nexample: sortlist ^"cat ape bear boar^" a b [<s $a $b], will return ^"ape bear boar cat^" (<s is ascii-alphabetic comparison)" "<list> <varname_1> <varname_2> <body>"


For defaults what I and others have done so far is writing them inline in the parameter descriptions, for example:
{l Code}: {l Select All Code}
setdesc "writevars" "writes the current server's variables to a config file named <file>;^nif [<all>] is true, every variable will be written with default values commented out; if false, only changed variables will be written (default: false)^nif [<sv_>] is true, variables will be prefixed with ^"sv_^" (default: false)" "<file> [<all>] [<sv_>]"

but I don't know what the best would be there...

I've changed the converting to wiki and I think that it currently should handle all *COMMAND(*s but we'll see, It works for case and guiimage at the moment at least.
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: Request: Contributions of var & command descriptions

Postby S.E.S » 09 Jan 2013, 16:08

"editmat" fix:

{l Code}: {l Select All Code}
setdesc "editmat" "modifies the material properties for the selected cubes;^nwhere filter: created earlier material for work with a this command;^nwhere style: 0 = normal, 1 = non-empty, 2 = empty, 3 = not entirely solid, 4 = entirely solid" "<type> <filter> <style>"
User avatar
S.E.S
 
Posts: 82
Joined: 08 Apr 2012, 11:43

Re: Request: Contributions of var & command descriptions

Postby arand » 04 Feb 2013, 12:02

Sorry for delay.
S.E.S {l Wrote}:"editmat" fix:

{l Code}: {l Select All Code}
setdesc "editmat" "modifies the material properties for the selected cubes;^nwhere filter: created earlier material for work with a this command;^nwhere style: 0 = normal, 1 = non-empty, 2 = empty, 3 = not entirely solid, 4 = entirely solid" "<type> <filter> <style>"

I don't really understand this description actually, what is it that <filter> does? What would be an example of a <filter>?

Would "water" be an example of a filter, so that the command would only apply to the water within the current selection?
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: Request: Contributions of var & command descriptions

Postby S.E.S » 04 Feb 2013, 12:09

arand {l Wrote}:Sorry for delay.
S.E.S {l Wrote}:"editmat" fix:

{l Code}: {l Select All Code}
setdesc "editmat" "modifies the material properties for the selected cubes;^nwhere filter: created earlier material for work with a this command;^nwhere style: 0 = normal, 1 = non-empty, 2 = empty, 3 = not entirely solid, 4 = entirely solid" "<type> <filter> <style>"

I don't really understand this description actually, what is it that <filter> does? What would be an example of a <filter>?

Would "water" be an example of a filter, so that the command would only apply to the water within the current selection?


Yes. See also "agui" (editing materials) for example.
User avatar
S.E.S
 
Posts: 82
Joined: 08 Apr 2012, 11:43

Re: Request: Contributions of var & command descriptions

Postby S.E.S » 04 Feb 2013, 12:20

Additional example:

Suppose there is a material in the current selection: "water, clip" and "lava".
After "editmat death water" - This will only change the "water,clip" on "water,clip,death".
User avatar
S.E.S
 
Posts: 82
Joined: 08 Apr 2012, 11:43

Re: Request: Contributions of var & command descriptions

Postby arand » 04 Feb 2013, 18:35

Ah, ok, and style seems act in a similar way...

I've updated it to this instead, is that correct?

{l Code}: {l Select All Code}
setdesc "editmat" "modifies the material properties for all or some of the selected cubes;^n<type> is the material to be applied {water, clip, ladder, etc.},^n<filter> limits the command to only affect cubes whose material match this,^n<style> limits the command to only affect cubes whose geometry match this {0 = normal, 1 = non-empty, 2 = empty, 3 = not entirely solid, 4 = entirely solid},^nexample: editmat air water 2 would set all empty cubes with water within the current selection to instead be air" "<type> <filter> <style>"


easiertoread {l Wrote}:"editmat"
modifies the material properties for all or some of the selected cubes;
<type> is the material to be applied {water, clip, ladder, etc.},
<filter> limits the command to only affect cubes whose material match this,
<style> limits the command to only affect cubes whose geometry match this {0 = normal, 1 = non-empty, 2 = empty, 3 = not entirely solid, 4 = entirely solid},
example: editmat air water 2 would set all empty cubes with water within the current selection to instead be air
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: Request: Contributions of var & command descriptions

Postby S.E.S » 05 Feb 2013, 15:04

I understand looking at the engine code, that yes. This is filter for geometry.
User avatar
S.E.S
 
Posts: 82
Joined: 08 Apr 2012, 11:43

Re: Request: Contributions of var & command descriptions

Postby S.E.S » 06 Feb 2013, 14:04

Update info for "editmat":

Example: "editmat water "" <style>" - skip material filter - only geometry filter (style).

Incorrect description for commans like "<material name> <style>". True: "<material name> <filter>". Filter similar as in "editmat". Styles somehow not work.
User avatar
S.E.S
 
Posts: 82
Joined: 08 Apr 2012, 11:43

Re: Request: Contributions of var & command descriptions

Postby unixfreak » 06 Feb 2013, 19:34

vlayer:
{l Code}: {l Select All Code}
setdesc "vlayer" "Sets the bottom texture layer to <texture #> for all textures in the current selection" "<texture #>"
User avatar
unixfreak
 
Posts: 82
Joined: 02 Feb 2012, 11:54
Location: Bristol, England

Re: Request: Contributions of var & command descriptions

Postby arand » 06 Feb 2013, 20:47

Added vlayer and changed the /materialname aliases to <filter> instead, thanks!
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: PROJECT: Contributions of var & command descriptions

Postby ZeroKnight » 14 Feb 2013, 13:00

IRC Commands! I tried explaining them as best as possible, but of course touch them up as you see fit. If you need me to elaborate on anything, go ahead and ask. As a note, I'm not 100% sure about ircauth, and exactly what each level of verbosity for relay levels actually represents could use some documenting. Quin already mentioned he doesn't have any clue anymore, but said looking for ircoutf() and srvoutf() in the code would probably help.

{l Code}: {l Select All Code}
setdesc "ircaddchan" "joins a channel on irc instance '<name>'. will attempt to automatically rejoin the channel whenever possible^n<name> - name of an irc instance^n<channel> - channel to join^n[friendly] - friendly name of <channel>^n[passkey] - passkey required for mode +k channels^n[relay] - sets relay level (verbosity of output)"<name> <channel> [friendly] [passkey] [relay]"

setdesc "ircaddclient" "creates an irc instance of type 'client'^n<name> - name of an irc instance^n<host> - host to connect to^n<port> - port of <host> to connect on^n<nick> - nickname to use for the connection^n[ip] - address to bind to (leave blank for any)^n[passkey] - password required to connect to <host>" "<name> <host> <port> <nick> [ip] [passkey]"

setdesc "ircaddrelay" "creates an irc instance of type 'relay'^n<name> - name of an irc instance^n<host> - host to connect to^n<port> - port of <host> to connect on^n<nick> - nickname to use for the connection^n[ip] - address to bind to (leave blank for any)^n[passkey] - password required to connect to <host>" "<name> <host> <port> <nick> [ip] [passkey]"

setdesc "ircjoinchan" "joins a channel on irc instance '<name>'. does NOT attempt to automatically rejoin the channel^n<name> - name of an irc instance^n<channel> - channel to join^n[friendly] - friendly name of <channel>^n[passkey] - passkey required for mode +k channels^n[relay] - sets relay level (verbosity of output)" "<name> <channel> [friendly] [passkey] [relay]"

setdesc "ircfilter" "sets how irc messages are filtered^n0 - send string as is; color escapes not converted; other escapes not filtered^n1 - converts Cube2-style color escapes to IRC color escapes^n2 - filters out all Cube2-style escapes" "<value>"

setdesc "ircbind" "sets the address that an irc instance binds to. when used without arguments, returns the address that irc instance '<name>' is currently bound to^n<name> - name of an irc instance^n[ip] - ip address to bind to <name>" "<name> [ip]"

setdesc "ircconnect" "attempts to establish a connection on irc instance '<name>'" "<name>"

setdesc "ircconns" "returns the number of active irc connections"

setdesc "ircfriendlychan" "sets the friendly name of an irc channel. if the [friendly] parameter isn't specified, the current friendly name of the channel is returned^n<name> - name of an irc instance^n<channel> - an irc channel^n[friendly] - new friendly name to use" "<name> <channel> [friendly]"

setdesc "ircnick" "sets the nickname of an irc instance. if the [nick] parameter isn't specified, the current nickname is returned^n<name> - name of an irc instance^n[nick] - new nickname" "<name> [nick]"

setdesc "ircpass" "sets the server passkey used by an irc instance. if the [passkey] parameter isn't specified, ^"<set>^" or ^"<not set>^" will be returned accordingly^n<name> - name of an irc instance^n[passkey] - new passkey" "<name> [passkey]"

setdesc "ircpasschan" "sets the passkey for a channel on an irc instance. if the [passkey] parameter isn't specified, ^"<set>^" or ^"<not set>^" will be returned accordingly^n<name> - name of an irc instance^n<channel> - an irc channel^n[passkey] - new passkey" "<name> [passkey]"

setdesc "ircrelaychan" "sets the relay level for a channel on an irc instance. if the [relay] parameter isn't specified, the current relay level will be returned^n<name> - name of an irc instance^n<channel> - an irc channel^n[relay] - new relay level (verbosity of output)" "<name> <channel> [relay]"

setdesc "ircport" "sets the server port used by an irc instance. if the [port] parameter isn't specified, the current server port is returned^n<name> - name of an irc instance^n[port] - new port" "<name> [port]"

setdesc "ircserv" "sets the host connected to for an irc instance. if the [host] parameter isn't specified, the current host is returned^n<name> - name of an irc instance^n[host] - new hostname" "<name> [host]"

setdesc "ircauth" "on a sucessful connection to an irc server and receiving the welcome message, send a message to a specified target. if <name> is the only parameter specified, [target] is returned and ^"<set>^" or ^"<not set>^" will be returned accordingly for [message].^nexample: ircauth relay NickServ ^"IDENTIFY password^"^n<name> - name of an irc instance^n[target] - where the message goes (user, service, channel)^n[message] - what is sent to '[target]' (ex: 'IDENTIFY password')" "<name> [target] [message]"
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Re: PROJECT: Contributions of var & command descriptions

Postby arand » 17 Feb 2013, 02:28

Bookkeeping: Everything up to this point has been added to svn.
Thanks!
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: PROJECT: Contributions of var & command descriptions

Postby Korsi » 01 Mar 2013, 22:53

{l Code}: {l Select All Code}
setdesc "botoffset" "increases or decreases the amount of bots from numplayers value of current map." "<value>"
User avatar
Korsi
 
Posts: 5
Joined: 04 Jun 2012, 18:42

Re: PROJECT: Contributions of var & command descriptions

Postby arand » 04 Mar 2013, 17:51

Added botoffset, thanks!

I've worked a bit on getting a better way of extracting the data and I think I've managed to get a reasonable solution in the form of a /writevarsinfo <file> command (not implemented yet, see https://sourceforge.net/apps/trac/redeclipse/ticket/268 for more info and preliminary code)

It seems to be working fairly well, the only problem being that the dump is more than 5000 lines and around 1MB of just text, so it has to be subdivided considerably.

I've added a few subsets over at http://redeclipse.net/wiki/Vars_and_Commands_in_SVN which also includes tags for #undocumented# vars/commands (*hint hint*).
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: PROJECT: Contributions of var & command descriptions

Postby TheLastProject » 04 Mar 2013, 17:57

Fine, arand, you win. Here are a few.

{l Code}: {l Select All Code}
setdesc "bombercarryspeed" "sets the movement speed of the player carrying the bomber ball to the default value times this value." "<value>"
setdesc "bombercarrytime" "time in milliseconds a player can carry the bomber ball before it explodes." "<value>"
setdesc "bomberholdinterval" "time in milliseconds a player needs to hold the bomber ball in hold bomber ball to get a point." "<value>"
setdesc "bomberpickupdelay" "time in milliseconds a player needs to wait to be able to pick up the bomber ball again after losing it." "<value>"
setdesc "bomberresetdelay" "time in milliseconds before the bomber ball resets after being dropped." "<value>"
setdesc "bomberspeed" "speed at which the bomber ball moves when thrown or dropped, with 100 being the speed the player moves at by default." "<value>"
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: PROJECT: Contributions of var & command descriptions

Postby arand » 04 Mar 2013, 18:16

Added bomber* vars, thanks!
User avatar
arand
 
Posts: 211
Joined: 26 Mar 2011, 21:42

Re: PROJECT: Contributions of var & command descriptions

Postby Korsi » 06 Mar 2013, 15:46

{l Code}: {l Select All Code}
setdesc "autospecdelay" "determines the delay after player joins spectators after being fragged" "<milliseconds>"
setdesc "bomberlockondelay" "determines the amount of time needed to hold throw button to achieve assisted pass to another team member" "<milliseconds>"
setdesc "botspeed" "multiplies the bots movement speed. 1 = same as movespeed" "<value>"
setdesc "capturecarryspeed" "determines the movement speed of player holding a flag multiplying movespeed value. 1 = same as movespeed" "<value>"
setdesc "capturepickupdelay" "time a player needs to wait to be able to pick up a flag again after losing it." "<milliseconds>"
setdesc "coopskillmax" "determines the maximum skill level a bot can have in coop" "<skill level>"
setdesc "coopskillmin" "determines the minimum skill level a bot can have in coop" "<skill level>"
setdesc "dominatepoints" "determines the amount of points a player gets when he achieves domination on another player or bot" "<value>"
setdesc "firstbloodpoints" "determines the amount of points a player gets when he makes the first kill of a match" "<value>"
User avatar
Korsi
 
Posts: 5
Joined: 04 Jun 2012, 18:42

Re: Request: Contributions of var & command descriptions

Postby srbs » 31 Mar 2013, 11:06

arand {l Wrote}:EDITED...

Added and tweaked everything up to this point, thanks!
I replaced the earlier escape/unescape since srbs' one was a bit more verbose I felt.

I also changed sortlist quite a lot and made it more verbose, I hope I've understood it correctly:
{l Code}: {l Select All Code}
setdesc "sortlist" "returns a sorted list (quicksort) based on the result of <body> applied onto <list>;^n if <body> returns true the two elements <varname_1> and <varname_2> will be swapped, unchanged otherwise,^nexample: sortlist ^"cat ape bear boar^" a b [<s $a $b], will return ^"ape bear boar cat^" (<s is ascii-alphabetic comparison)" "<list> <varname_1> <varname_2> <body>"


For defaults what I and others have done so far is writing them inline in the parameter descriptions, for example:
{l Code}: {l Select All Code}
setdesc "writevars" "writes the current server's variables to a config file named <file>;^nif [<all>] is true, every variable will be written with default values commented out; if false, only changed variables will be written (default: false)^nif [<sv_>] is true, variables will be prefixed with ^"sv_^" (default: false)" "<file> [<all>] [<sv_>]"

but I don't know what the best would be there...

I've changed the converting to wiki and I think that it currently should handle all *COMMAND(*s but we'll see, It works for case and guiimage at the moment at least.


Looks good to me. Sorry for my, what, 4 month delay?
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: PROJECT: Contributions of var & command descriptions

Postby ZeroKnight » 07 Apr 2013, 07:37

Tweaked the *lock descriptions, as 8 (nobody) is no longer an option (can't lock out creators).
I also tweaked the 'rotatemuts' description a little bit to include a bit more specific and helpful information.

Patch attached.
Attachments
desctweaks.patch
(9.35 KiB) Downloaded 367 times
[ Github ][ WazuClan -- irc.wazuclan.com #wazuclan ][ Zero's Archive of RE Extensions, Scripts, WeapMods & More! ]
User avatar
ZeroKnight
 
Posts: 524
Joined: 08 Jun 2011, 01:24
Location: Ohio, United States

Who is online

Users browsing this forum: No registered users and 1 guest

cron