Home / config
Name Modified Size InfoDownloads / Week
Parent folder
tutorial.cfg 2012-04-07 11.0 kB
tools docsection.cfg 2012-04-07 23.4 kB
tools.cfg 2012-04-07 24.4 kB
tools_readme.txt 2012-04-07 8.5 kB
sounds.cfg 2012-04-07 6.8 kB
survival.cfg 2012-04-07 9.7 kB
serverpwd.cfg 2012-04-07 311 Bytes
servers.cfg 2012-04-07 5 Bytes
serverinfo_en.txt 2012-04-07 870 Bytes
serverkillmessages.cfg 2012-04-07 606 Bytes
securemaps.cfg 2012-04-07 592 Bytes
servercmdline.txt 2012-04-07 4.8 kB
scontext.cfg 2012-04-07 924 Bytes
scripts.cfg 2012-04-07 10.6 kB
resetbinds.cfg 2012-04-07 3.4 kB
on_quit.cfg 2012-04-07 762 Bytes
prefabs.cfg 2012-04-07 820 Bytes
motd_en.txt 2012-04-07 540 Bytes
menus_voicecom.cfg 2012-04-07 3.4 kB
mono.cfg 2012-04-07 2.5 kB
old_maprot.txt 2012-04-07 4.2 kB
releasefiles.cfg 2012-04-07 65.3 kB
menus_mappack.cfg 2012-04-07 122 Bytes
locale.cfg 2012-04-07 138 Bytes
maprot - Copy.cfg 2012-04-07 1.8 kB
menu_voicecom.cfg 2012-04-07 3.5 kB
menus.cfg 2012-04-07 5.6 kB
menus_bot.cfg 2012-04-07 4.5 kB
menus_edit.cfg 2012-04-07 20.8 kB
menus_multiplayer.cfg 2012-04-07 11.6 kB
menus_settings.cfg 2012-04-07 31.0 kB
forbidden.cfg 2012-04-07 11 Bytes
firstrun.cfg 2012-04-07 535 Bytes
dyngamma.cfg 2012-04-07 1.5 kB
favourites.cfg 2012-04-07 4.7 kB
font.cfg 2012-04-07 7.2 kB
font_default.cfg 2012-04-07 2.9 kB
font_monospace.cfg 2012-04-07 2.4 kB
font_serif.cfg 2012-04-07 2.9 kB
keymap.cfg 2012-04-07 2.5 kB
maprot.cfg 2012-04-07 7.1 kB
compatibility.cfg 2012-04-07 522 Bytes
creditmenu.cfg 2012-04-07 96 Bytes
admin.cfg 2012-04-07 710 Bytes
defaults.cfg 2012-04-07 1.3 kB
docs.cfg 2012-04-07 108.8 kB
autosave.cfg 2012-04-07 1.2 kB
default_map_settings.cfg 2012-04-07 30.7 kB
Totals: 48 Items   437.7 kB 0
tools.cfg -- A collection of useful CubeScript tools -- by V-Man
Version (logn -1), 4/1/2011

Installation and use

Installation
To properly install tools.cfg, you will need to have autoexec.cfg execute it specifically by name rather than out of an automatically executed folder (to make sure all the tools are defined before the game attempts to use them in other scripts).
1) Unzip tools.cfg and place it in your config folder.
2) Open autoexec.cfg using a text editor.
3) Add this line at the top:
exec config\tools.cfg
Congratulations! You now have the tools installed. Make sure you don't override native alias definitions after executing tools.cfg -- for instance, mapstartalways or start_intermission. Change the commands from
"alias mapstartalways" and "alias start_intermission"
to
"addcheck_msa" and "addcheck_si"
respectively.

It is also highly recommended to create a new folder named "scripts" and place all your other scripts (.cfg files) in there. Then you can add to the bottom of autoexec.cfg:
execdir scripts
And all the scripts in that folder will be automatically executed each time you run SilverCloud RPG!
Most of the scripts that depend on tools.cfg have installation instructions that ask no more of you than to dump a .cfg file in your "scripts" folder.
See http://forum.cubers.net/thread-2356.html for details about automatically executed scripts folders.

If you wish to use the in-game documentation for the tools, unzip "tools docsection.cfg" and place it in your automatically executed scripts folder.

Use
The different tools in this config file can be called up in many different ways and for many different applications. The tools have been sorted into specific sections:

MATH SECTION
isfloat -- Checks a given argument and determines if it is a floater or not.
isint -- Checks a given argument and determines if it is an integer or not.
isnumber -- Checks a given argument and determines if it is a number or not.
iseven -- Checks a given argument and determines whether it is even.
rndposneg -- Generates a random number with an absolute value up to the given argument.
rrnd -- Generates a random number in a specified range.
rrndf -- Generates a random float in a specified range.
absval -- Returns the absolute value of a given number.
square -- Returns the square of a given number.
sqrt -- Returns the square root of a given number.
pow -- Performs an exponential calculation.
roundf -- Rounds a given number to the nearest integer.
average -- Averages a given list of numbers.
formatprec -- Rounds down a given floating-decimal number to the given number of decimal places.
larger -- Returns the larger of two given numbers or calculations.
smaller -- Returns the smaller of two given numbers or calculations.
whatpercent -- Returns the percent of a given value of a given max and min range.
percentrange -- Returns the value of a percent of a given max and min range.
div=f -- Sets an alias equal to itself divided by a given float number.
logn -- Calculates approximate natural logarithm.
log2 -- Calculates approximate binary logarithm.
log10 -- Calculates approximate common logarithm.
GCD -- Calculates the greatest common divisor of two given numbers.
LCM -- Calculates the lowest common multiple of given numbers.
sin -- Calculates the Taylor Series sine of a given angle (answer in radians).
cos -- Calculates the Taylor Series cosine of a given angle (answer in radians).
tan -- Calculates the tangent of a given angle (answer in radians).
cosecant -- Trig function.
secant -- Trig function.
cotangent -- Trig function.
torads -- Converts given degrees to radians.
todegs -- Converts given radians to degrees.
numpi -- Expresses a number as rounded multiples of pi.

ALIAS SECTION
addcheck -- Adds a given string to an alias, if the alias does not yet have it; first adds a semicolon.
add2list -- Adds a given string to an alias, if the alias does not yet have it; does not add a semicolon.
addcheck_msa -- Adds a given string to "mapstartalways" if it does not yet have it; first adds a semicolon.
addcheck_si -- Adds a given string to "start_intermission" if it does not yet have it; first adds a semicolon.
addcheck_onquit -- Adds a given string to "onQuit" if it does not yet have it; first adds a semicolon.
addcheck_sb -- Adds a given string to "sbconnect" if it does not yet have it; first adds a semicolon.
addlistonquit -- Adds a list of aliases to a queue to be deleted when you quit the game.
checkinit -- Defines an empty alias, if it does not yet exist, with a given definition.
initialize -- Defines a list of empty aliases, if they (each) do not yet exist, with a given definition.
storeargs -- Stores given arguments passed to it from the containing alias.
serial -- Creates a series of aliases with the same base-name and numbered name-suffixes.
delserial -- Deletes a series of aliases with the same base-name and numbered name-suffixes.
nestalias -- Creates an alias nested within itself; each time it is executed, it "sheds" a layer.
recursive -- Creates an alias which calls itself recursively, with given pause time.
stoploop -- Temporarily sets an alias to empty; the alias can then be reset using "pop" (alias name).

LOOP TOOLS
bloop -- A backward loop. Performs the same as "loop" but counts backward from the top (second argument).
sloop -- Adds a sleep value to a loop.

KEYBIND SECTION
add2bind -- Adds a given string to a keybind, if the keybind does not yet have it; first adds a semicolon.
bindcheck -- Checks a given keybind for a given string; returns 1 or 0.
findbind -- Searches through all keys for a given string, using bindcheck; returns the names of the keys.
numbinds -- Returns the number of keybinds containing a given string.
add2eachbind -- Adds a given command to each keybind that contains a given string.
ifbind -- Encases an already-existing keybind in an "if" statement.

STRING MODIFICATION
delfromlist -- Returns a list based on a given list and a string to delete.
delfromlistend -- Returns a list based on a given list and the number of elements to delete from its end.
delfromliststart -- Returns a list based on a given list and the number of elements to delete from its beginning.
delfromlist_mult -- Loops "delfromlist" to return a list with multiple entries omitted.
replacestr -- Returns a list with one element replaced by another.
swapstrpos -- Returns a list with two of its elements switched.
insertpos -- Inserts a given string into a given position of a given list.
insertstr -- Same as insertpos, but takes the strings on either side of the replacement as arguments.
concatlist -- Returns a single string (unless abused) composed of the concatenated elements of a given list.

MENU SECTION
add2menu -- Appends given code to the end of a given menu.
add2mainmenu -- Appends given code to the end of the main menu.

CONLINE SECTION
if_conline_has -- Checks the text console output for a given string or list of strings, and if the conditions are met, executes a given command or set of commands.
add2conloop -- Adds commands to the self-prepetuating conloop checker; meant for use with "if_conline_has", but can also be used for other commands that need to be looped constantly.
whoisline -- An alias that is automatically updated to contain the latest WHOIS info requested.

PLAYERS SECTION
curplayers -- Returns the number of players currently in-game. Counts spectators.
validcnumlist -- Returns the (non-duplicated) client numbers.
kickbots -- Kicks multiple bots out of a bot game.
whoisall -- Performs a "whois" on every client currently in the server.
teamcount -- Returns the number of players in a given team.
curhighestcn -- Returns the highest valid client number found in the current game.
curenemies -- Returns the current number of enemies you have in the game.
curdeaths -- Returns the current number of deaths a client currently has.
curfrags -- Returns the current number of frags a client currently has.
curratio -- Returns the current ratio (frags / deaths) of a client.
curscore -- Returns the current score of a client.

MISC SECTION
countsound -- Registers a sound and saves its execution command in an alias to allow for multiple sound mods.

For more details, read the "docsection" documentation!

Generally, if tools.cfg is installed, scripts depending on it will now work properly without you needing to do anything else!
Source: tools_readme.txt, updated 2012-04-07