chiark / gitweb /
Track Elite package interface change. Allow configurable hyperspace
[rocl] / README
1 RIGHT ON COMMAND-LINE
2   Elite tools for the discerning player
3
4 1. Installation
5
6         You need a C compiler and a working Tcl/Tk installation.  (The
7         elite-editor program needs Tk; the rest of the tools don't.)
8         The Makefile works on my Debian GNU/Linux box (potato), but I'm
9         not making any promises about anyone else's.  I've successfully
10         built earlier versions of everything under Cygwin, against
11         ActiveState's Tcl 8.4, but I've forgotten the Holy Runes.  I do
12         have the `.def' file I used to build the DLL, though, for
13         whatever that's worth.  (If you want to hack the Makefile to
14         work under Windows, I'll take a patch.)
15
16         The runes for Debian woody are:
17
18           $ make INCLUDES=/usr/include/tcl8.3
19           $ ROOTLY make install prefix=/usr
20
21         (where ROOTLY is some command which does things with root
22         privileges, say `sudo', `become root' or, at a pinch, `su -c')
23         because the Tcl installation no longer looks in /usr/local/lib,
24         worse luck.
25
26         The theory is that you should edit the Makefile for your system
27         and say `make'; then, as some suitably privileged person, say
28         `make install' and stand well back.  Everything should then be
29         installed.
30
31         In practice:
32
33           * If you can't build `pkgIndex.tcl', run `tclsh' and say
34
35               % pkg_mkIndex -verbose -direct . elite.so elite.tcl
36
37             to it.  (Use `elite.dll' if you're on Windows.)  Say
38
39               % set tcl_pkgPath
40
41             to see a list of suitable places for putting the kit.  Pick
42             one.  The directory `/usr/local/lib' appears in my
43             installation, so that's what I use.
44
45           * Make a subdirectory in the place you chose, and copy
46             `elite.so', `elite.tcl' and `pkgIndex.tcl' into it.  All
47             should now be hunky-dory.
48
49           * Run (say) `elite-describe lave' to check that things are set
50             up properly.
51
52
53 2. The command-line tools
54
55         A `galaxy-spec' is
56
57           * a number, between 1 and 8, for one of the standard eight
58             galaxies; 
59
60           * a `galaxy seed' of 12 hex digits (a 48-bit value), for any
61             arbitrary galaxy; or
62
63           * a string `SEED:N' where SEED is a galaxy seed and N is a
64             number between 1 and 8, for the Nth galaxy in some custom
65             universe.
66
67         A `planet-spec' is interpreted relative to some parent galaxy.
68         It may be
69
70           * a number N, for the Nth planet in the galaxy (planets are
71             numbered pseudorandomly -- this is not often a helpful
72             option);
73
74           * a `planet seed' of 12 hex digits (a 48-bit value), for any
75             arbitrary planet;
76
77           * a pair of numbers `X,Y', for the planet nearest the point X
78             decilightyears rightwards and T decilightyears down from the
79             top left of the galaxy;
80
81           * a glob pattern (a string containing `*' and `?' wildcards,
82             matching any substring or any single character,
83             respectively), for the first planet whose name matches the
84             pattern; or
85
86           * a string `GAL:P', where GAL is a galaxy-spec and P is a
87             planet-spec, for the planet P in galaxy GAL.
88
89
90   elite-describe [-g GAL] PLANET ...
91
92         For each PLANET, print the planet data for that PLANET.  The
93         PLANETs are interpreted relative to GAL, or standard galaxy 1 if
94         GAL is not specified.
95
96
97   elite-map [-qv] [-g GALAXY] [-d DIST] [-w WEIGHT] [-W WD,HT] [-a ASP]
98         [PLANET ...]
99
100         Prints a map of (part of) a galaxy to the terminal.
101
102         If PLANET is specified (which it usually is), a map of the area
103         around PLANET in GALAXY (default standard galaxy 1) is printed,
104         showing other planets within a box extending about DIST
105         lightyears around the PLANETs.
106
107         If no PLANETs are not specified, the entire galaxy is printed.
108         This is usually unhelpful.
109
110         The `-w' option plots a route through the listed planets,
111         highlighting the waypoints.  See `elite-path' for the possible
112         weightings.
113
114         Planets are shown as numbers or letters (or, occasionally a
115         sequence of letters).  If there is only one PLANET, it is shown
116         as a `*'; otherwise, they're labelled `*0', `*1', etc.  Planets
117         on the path are labelled `+0', `+1', ..., in the order you're
118         meant to visit them.  (Note that if the path doubles back on
119         itself, the planets involved /won't/ be listed twice.  Use
120         `elite-path' for a full guide on where to go, and `elite-map' to
121         visualize the route.)
122
123         The `-q' and `-v' options allow optional suppression of the key
124         below the map.  The defaults are as follows:
125
126           * A galactic map shows no key.
127
128           * A route map (with the `-w' option) shows the waypoints
129             (named PLANETs) and the planets on the path.
130
131           * An area map (around named planets) shows the names of all
132             planets shown.
133
134         The key can be made more verbose by giving the `-v' option, or
135         less verbose by `-q'.  Note that the options parser is currently
136         really shoddy, and won't let you say things like `-qqq'.
137
138         The size of the map may be controlled by the -W option -- set WD
139         to the maximum allowable width, and HT to the maximum allowable
140         height (in columns and rows, respectively).  The map will be
141         scaled so as to fit.  The -a option sets the aspect ratio of
142         your characters, height to width (the default is about 2, and
143         seems right for viewing in an xterm with the standard fixed
144         font).
145
146
147
148   elite-path [-g GALAXY] [-w WEIGHT] [-a ACC] PLANET PLANET ...
149
150         Computes a route through a GALAXY (default is standard galaxy
151         1), starting at the first PLANET listed, via the second, via the
152         third, etc., and ending at the last.  For each planet you're
153         meant to stop at on the way, a summary line is printed giving
154         the planet's name, position, government type, economy type and
155         tech level.
156
157         You can affect how elite-path selects its routes using the `-w'
158         option.  The default is to minimize the number of hops.  Other
159         possibilities are:
160
161         hops            Minimize number of hops.  This is the default.
162
163         safety          Maximize stability of the planets in the route,
164                         to attempt to improve safety.  Useful during the
165                         early stages of the game.
166
167         encounters      The opposite of `safety' -- minimizes stability
168                         of planets in the route.  Useful if you want to
169                         maximize kills.
170
171         trading         Maximize the difference in economy type between
172                         successive planets in the route.  This should
173                         give you an opportunity to make a good profit as
174                         you go.
175
176         fuel            Minimize absolute distance.  For those on a
177                         tight budget.
178
179         The `-a' option controls what total is accumulated down the
180         right hand side of the summaries:
181
182         none            No running total down the right hand side.
183
184         distance        Accumulate distance, in lightyears.
185
186         weight          Accumulate the shortest-path weight function.
187
188         Beneath the path is printed a total for distance and weight if
189         these are interesting and not already displayed.  The weight for
190         `hops' and `fuel' are simply the hop count and distance in
191         lightyears respectively; the other weight functions use
192         appropriate square-law functions.
193
194
195   elite-reach [-d DIST] [GALAXY ...]
196
197         For each GALAXY (default is the 8 standard ones), print summary
198         information for each planet, with blank lines separating
199         disconnected groups of planets, i.e., groups where a ship
200         capable of travelling DIST lightyears (default 7) can't get from
201         one to the other.
202
203
204   elite-find [-g GALAXY] [EXPR]
205
206         Without EXPR, simply prints summary information for each planet
207         in GALAXY (default standard 1).
208
209         If EXPR is specified, it must be a Tcl expression (as for the
210         `expr' command).  Information is printed for each planet for
211         which EXPR returns nonzero.  The EXPR may use the following
212         variables:
213
214         name            The planet name, with initial capital letter.
215
216         x, y            X and Y coordinates, from top left, in
217                         decilightyears.
218
219         economy         From 0 (rich industrial) to 7 (poor
220                         agricultural).
221
222         government      From 0 (anarchy) to 7 (corporate state).
223
224         techlevel       From 1 to 15.
225
226         radius          In kilometres.
227
228         productivity    In millions of credits.
229
230         population      In hundreds of millions.
231
232         inhabitants     A Tcl list of words describing the inhabitants.
233
234         description     As a Tcl list of words.
235
236
237   elite-pairs [-g GALAXY] [-d DIST] AEXPR BEXPR
238
239         Prints the names of pairs of planets A and B in GALAXY (default
240         standard 1), no further than DIST (default 7) lightyears apart,
241         such that AEXPR returns nonzero for planet A and BEXPR returns
242         nonzero for planet B.
243
244         The expressions AEXPR and BEXPR may use the same variables as
245         for elite-find.  In addition, BEXPR may use
246
247         d               The distance between planets A and B.
248
249         a               An array containing the information about planet
250                         A.  The indices have the same names and meanings
251                         as the variables described above.
252
253
254   elite-cmdr [FILE] [-OPTION | ATTR | ATTR=VALUE | FILE] ...
255
256         A command-line Elite commander editor and viewer.  With a single
257         argument, reads a commander file and displays its contents as a
258         human readable table.  The arguments may be special options,
259         attribute names, attribute assignments, or filenames.
260
261         The special options are:
262
263         -show           Write the commander data to standard output as a
264                         human-readable table.  This is the default if no
265                         other output action is requested.
266
267         -load FILE      Read the commander file named FILE.
268
269         -save FILE      Write the modified commander data to FILE.
270
271         -reset          Reset the commander to the default `JAMESON'
272                         settings.
273
274         -dump           Write the commander data to standard output in
275                         the form of a script which can be read back by
276                         the `-read' option.
277
278         -read FILE      Read attribute/value pairs from FILE, and modify
279                         the commander accordingly.
280
281         An attribute name on its own is a request to print the current
282         value of that attribute.  An assignment ATTR=VALUE makes ATTR
283         have the requested VALUE.
284
285         The attributes, their meanings, and the acceptable values are as
286         follows:
287
288         mission         The commander's current mission.  (0 is no
289                         mission; 1 is searching for the Constrictor; 2
290                         is killed the Constrictor; 3 is waiting for the
291                         second mission; 4 is heading for Ceerdi; 5 is
292                         heading for Birera; and 6 is all missions
293                         completed.)  Must be an integer between 0 and
294                         255.
295
296         score           Current number of kills.  Must be an integer
297                         between 0 a 65535, or one of the strings
298                         `harmless', `mostly-harmless', `poor',
299                         `average', `above-average', `competent',
300                         `dangerous', `deadly', or `elite'.
301
302         credits         Number of credits.  Must be between 0 and
303                         429496729.5.
304
305         cargo           Size of cargo bay.  Must be between 4 and 255.
306
307         gal-number      Number of the current galaxy.  Note that this
308                         doesn't affect which galaxy the commander is
309                         actually in -- set gal-seed for that.  Must be
310                         between 1 and 8.
311
312         gal-seed        Which galaxy the commander is in.  May be any
313                         galaxy-spec.
314
315         world           Which world the commander is docked at.  May be
316                         any planet-spec describing a world in the
317                         correct galaxy.  (Note that, since the commander
318                         file actually stores the location as an x, y
319                         pair and chooses the closest world to those
320                         coordinates, and there are coincident pairs of
321                         worlds, it is not possible to have a commander
322                         start at some worlds.)
323
324         market-fluc     The market fluctuation byte.  Affects prices at
325                         the space station.  Must be an integer between 0
326                         and 255.
327
328         fuel            Amount of fuel.  Must be between 0 and 25.5.
329
330         energy-unit     Strength of the ship's energy unit.  May be an
331                         integer between 0 (none) and 255 (scary cheat)
332                         or one of the strings `none', `standard', or
333                         `naval'.
334
335         front-laser, rear-laser, left-laser, light-laser
336                         Strength of appropriate laser.  May be an
337                         integer between 0 (none) and 255 (scary cheat)
338                         or one of the strings `none', `pulse', `beam',
339                         `mining', or `military'.
340
341         ecm, fuel-scroop, enery-bomb, escape-pod,
342         docking-computer, gal-hyperdrive
343                         Whether the ship has various bits of equipment.
344                         One of `yes', `true', or `on' for yes, or `no',
345                         `false' or `off' for no.
346
347         missiles        Number of missiles carried.  Must be an integer
348                         between 0 and 255.
349
350         hold-ITEM, station-ITEM
351                         Quantity of some item in the ship's hold, or at
352                         the station.  Must be an integer between 0 and
353                         255.  ITEM must be one of `food', `textiles',
354                         `radioactives', `slaves', `liquor-wines',
355                         `luxuries', `narcotics', `computers',
356                         `machinery', `alloys', `firearms', `furs',
357                         `minerals', `gold', `platinum', `gem-stones', or
358                         `alien-items'.
359
360         #               A special attribute which is never printed.  Its
361                         value is ignored.  This may be used to insert
362                         comments in script files.
363
364         Anything else is assumed to be a filename, and loaded as for the
365         `-load' option.
366
367
368   elite-prices [-g GALAXY] [-s SORT] [FROM TO]
369
370         Shows minimum, average and maximum profit (in that order, in
371         credits per unit) for the various commodities, starting at one
372         kind of world and ending at another.
373
374         By default, the commodities are listed in standard order, and
375         the profits are computed going from a poor agricultural world to
376         a rich industrial one.
377
378         You can change the worlds under consideration by typing a pair
379         of planet-specs or economy types (as printed by `elite-find').
380         Any planet-specs are obviously taken relative to GALAXY.
381
382         The SORT parameter may be one of `min', `max', or `avg' to sort
383         by minimum, maximum or average profit (highest at the top).
384
385
386 3. The graphical editor
387
388   elite-editor [GALAXY | FILE | -jameson]
389
390         Starts the RIGHT ON COMMAND-LINE Commander Editor and Map.  This
391         is a Tk program -- you'll need that installed to run it.
392
393         I'll not go into excruciating detail about how to work the
394         program.  It's fairly simple, really.
395
396         The map view lets you colour-code planets according to
397         techlevel, government or economy.  The colours ought to be as
398         follows:
399
400         Colour          Government      Economy         Techlevel
401
402         Red             Anarchy         Poor agri       1
403         Orange          Feudal          Average agri    2 or 3
404         Yellow          Multi-gov       Rich agri       4 or 5
405         Green           Dictatorship    Mainly agri     6 or 7
406         Blue            Communist       Mainly indust   8 or 9
407         Magenta         Confederacy     Poor indust     10 or 11
408         Violet          Democracy       Average indust  12 or 13
409         White           Corporate       Rich indust     14 or 15
410
411         The connectivity map shows how you can get around the galaxy
412         using hops of up to 7 light years.
413
414         Planet names are unhelpful except at small scales.  The
415         placement algorithm could do with a lot of work.
416
417         Clicking on the map with button 1 (usually the left one) sets
418         the destination world, marked with an orange cross.  Clicking
419         with button 3 (usually the right one) sets the home world,
420         marked with a red cross, and with a green hyperspace-range
421         circle around it.  (The circle doesn't actually correspond
422         exactly with hyperspace reachability, because there are rounding
423         errors in the distance computation.  ROCL correctly emulates the
424         rounding errors from the original game.)
425
426         Double-clicking opens a window showing information about a
427         planet.  Two info windows can be open at any time, one for the
428         home world and one for the destination.
429
430         The bar along the bottom of the map window shows the names of
431         the home and destination worlds, and the distance between them.
432         You can type new names (or any old planet spec) into either to
433         select different planets.  The change will take place when you
434         press return or when the input focus moves.  Pressing control-
435         return will pop up the appropriate planet info window.
436
437         The `Compute path' lets you do the same kinds of computations as
438         the elite-path tool.  It plots a route from the home to the
439         destination.  The path is shown in orange on the map.
440
441         The commander editor should be self-explanatory, but maybe a few
442         pointers might be helpful.
443
444         The entry fields for items with pop-up menus are disabled when
445         the menus show values other than `Custom', so you must first
446         choose `Custom' from the menu if you want a fancy value.
447
448         The `Show galaxy map' button opens a map which will be tied to
449         the commander window.  When you select a home world (button 3),
450         this will set the world where the commander will start.  Note
451         that the market prices (in the `Cargo' window) update
452         automatically as you move about the universe.  It is quite
453         possible to travel about entirely new universes by turning off
454         the `Standard galaxy' button and typing some hex number into the
455         `Galaxy seed' box.  All of the ROCL tools work in these custom
456         universes.  Note that your docked planet is recorded as an x, y
457         coordinate pair, so Elite can't tell which of two coincident
458         planets you're docked at (yes, there are such pairs).  ROCL
459         won't cope with this at the moment.
460
461         Lasers are a bit odd.  Bit 7 is a `rapid-fire' bit.  It doesn't
462         affect the strength of the laser, but means that there's no
463         delay between shots.  The low 7 bits control the strength, but
464         without the rapid-fire bit, powerful lasers will tend to fire
465         more slowly than weak ones.  Some comparisons in the program are
466         for exact laser power: you can't damage the Constrictor or
467         Cougar ships unless you have military (or 0x17 slow-firing)
468         lasers; and you can't fragment asteroids unless you have mining
469         or 0xb2 rapid-fire lasers.  (The 0xb2's pack a serious punch.  I
470         recommend them as an upgrade for commanders who don't wish to
471         cheat completely.)
472
473         One suggestion I've heard of, if Elite is too easy, is to start
474         at Lave (as usual), with no money, lasers, missiles, or fuel.
475         You can get your first money by ramming asteroids (easy but
476         unrewarding) or pirates (risky and tedious), and start trading
477         food and other cheap items.
478
479 $Id: README,v 1.6 2003/03/04 10:25:43 mdw Exp $
480 \f
481 Local variables:
482 mode: text
483 End: