Each of the following commands may be entered as if they were a normal empire server command. The client will automatically recognize these commands and handle them locally, where applicable.
In addition to commands that are typed in on the command line, commands can also be specified in three built-in configuration files. The file, "first.emp" is executed the first time the client connects to the server, "start.emp" is run every time the client starts up, and the file "connect.emp" is run each time a connection is made to the server.
Important Change! Previous versions of the client had a command known as "sync". This command has be renamed to "rdb", and its syntax has been altered!
At one time, the server had a bug that caused empire updates to modify sectors and units without updating the timestamps. To circumvent this problem, 'rdb' was expanded to use the form 'rerdb'. A "re-refresh" will force this command to ignore timestamps and dump the entire database. It should not be necessary to use this form of the command.
Additionally, the command rdb (or rerdb) may contain a suffix that contains any combination of 'epslno'. 'e' stands for sector dump, 'p' is a plane dump, 's' is a ship dump, 'l' is a land dump, 'n' is a nuke dump, and 'o' is a lost dump. When these selectors are specified, only the corresponding dumps will be sent. This is useful when it is known which databases have changed, and it is not desirable to dump all the databases. For example, you might specify 'rdbel' to synchronize just sectors and land units.
During processing of the outgoing command queue, if two or more rdb commands are buffered simultaneously, the client will automatically ignore the first database refresh. Since the first refresh is contained entirely within the second, it doesn't make much sense to send the first. When this behavior is not desired, the rdb command can be suffixed with a "P" flag. This prevents the first rdb command from being ignored.
The "execute" command may be abbreviated to as short as "exe". This command is intended to mimic the effects of the similar server based command.
To make an alias permanent, place the alias command in the start.emp file. There are also many examples of aliases in this file.
Note: There is no protection from infinitely recursing aliases. If an alias calls itself it will probably end up hanging the client!
Note2: When in burst mode aliases may also be evaluated for sub-prompts. Because of this, it is a good idea to plan out aliases that don't easily conflict with common empire sub-prompts.
Note: The internal parser will parse bursted commands!
Simple examples:
For a more in depth analysis, see the burst section in the TIPS file. There are also a number of examples in the default start.emp file.
Note: The client will still parse the output from commands that are sent raw!
WARNING! In raw mode, it is possible to send the command "exec" to the server. The client does not support the server's exec protocols. If exec is sent in raw mode, it may become necessary to disconnect via the Login Window to reset the client's connection.
Note: If you are short on disk space, you may have to use this tool to delete old telegrams and announcements from the database. Since the client automatically stores old messages, the database can become rather large over time.
NOTE: This command uses the internal database to determine which sectors apply. If the database is not synchronized, the results will not be correct!
The arguments to sect work in the same manner as the foreach command which is described below.
Optionally, you may run the Sect command with no arguments at all to erase the highlights from any past Sect commands.
NOTE: This command uses the internal database. If the database is not synchronized, the results will not be correct!
<sect> is a sector designation of the form x,y. (Note, if you wish to run a programmable-command on many sectors, use the foreach command.) This sector's database is referenced when evaluation the rest of the command.
<cmd> is an empire command that contains an arbitrary number of python expressions embedded within it. The python expressions must be enclosed within [ and ] characters (the square brackets). These python expressions are evaluated using a namespace from the specified database. The names of the variables are the same as their corresponding empire selectors, and similar to the empire selectors they may be abbreviated (for example, both 'newdes' and 'new' are equivalent). In addition to the standard empire selectors, there are two included aliases: sect (A string containing the sector's x,y pair), and dist (A string containing the dist_x,dist_y pair). See the selectors section of the TIPS file for more information.
An example:
NOTE: This command uses the internal database. If the database is not synchronized, the results will not be correct!
<sectors> and <selectors> are similar to those on the empire server. <sectors> can be a range of sectors (x1:x2,y1:y2), an '*' to specify all sectors, or an empire range of the form '#X'. <selectors> is a series of variable conditions that may be specified using the form "?<var><cond><var>" where <var> is a either a constant or a valid empire variable, and cond is one of '=', '<', '>' or '#'. Any number of selectors may be specified by appending them with a '&' character in-between. See the empire selectors section of the TIPS.html file for advanced information.
<cmd> is a string that will be parsed in the same manner as the eval command.
An example:
A more complex example:
An insane example:
WARNING: This command is experimental! Do not use it in important situations. (But it might be useful in blitzes.) It uses the internal database, which has to be synchronized.
Ok, an example:
The mmove utility is a contribution from Ulf Larsson. WARNING! This code is still experimental! Please use with discretion.
The amount field has a special meaning in this utility:
Note: This command is still in its infancy. Both it and the graphical move utility, which uses this command, should be used with a little caution. Also, this command has no support for moves that cause enemy interdiction. If interdiction occurs, it will probably not do what you want.