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