Documentation (heh!) for the trade wars viewer programs Last revision: 1/24/91 by woody Abstract: ________ The game Trade Wars is a delightful mix of economic strategy, exploration, and military conquest. For the first two to succeed, however, requires a good working knowledge of the universe. Unfortunately, keeping all the information about which sectors you've visited, which are ports, and which is connected to which can be a nightmare. These two programs, "Convert" and "Examine" should help to make keeping that information straight a little easier, and increase your enjoyment of the game. The first program, "Convert", creates a data base of explored sectors, warps for each sector, if it is a port or not, and if a port, what it is selling. The second, "Examine", allows you to look at that data base in a variety of ways, from visual graphing of the data to asking questions about nearby ports and so on. What you need to run the programs: ---------------------------------- To create the data base, you need to be in a terminal program that allows ascii uploads and ascii captures. The best situation is one that allows you to do them simultaneously, i.e. capture input while uploading a file. Second best is to have a large scrollback buffer, that allows you to take pieces out of the scrollback and append them to a file. There are two versions of the programs, one for DOS machines and another for Macs. (Source code available if anyone wants to port it to the Amiga or something. Should only require minor changes to file I/O and graphics.) If you are running the DOS versions, you will need the device drivers (.BGI files) suitable for your machine. HOW TO CREATE AND MAINTAIN THE ORIGINAL DATA BASE: -------------------------------------------------- First, log into the game, and invoke the computer. Tell the computer you want the known universe report, by hitting K. Now start an ascii download. If you have explored more than half the universe, tell the computer that you want unexplored sectors by hitting U and return. The computer will list your unexplored sectors. If you have explored less than half, tell the computer you want explored sectors by hitting E and return. The computer will list your known sectors. If you've explored a lot of sectors, there may be a [PAUSE] in the listing; just hit the space bar and go on past it. (Its okay if it shows up in your ascii download.) When the listing is finished, turn off the download. Your captured file must contain the line that says "You have explored the following sectors:" or "You have NOT explored the following sectors:" and at least one blank line after the sectors. (A little more before or after is okay too.) Now shift from your terminal program to the program "Convert". At the first prompt, it is asking for your initial data base. If you've already developed a data base, and are just updating it, give the name of your old base; if you don't have an existing data base, just hit a return. Next, it will ask if it should be reading a list of explored sectors, a log of inter-warp and port information, or a list of unexplored sectors. Choose option 1 or 3 depending on whether you hit E or U above. Next, it will ask for your "Explored Sectors" or "Unexplored Sectors" file. Next, it will ask you to come up with the name of a file to generate: use anything you like here, but be careful that you don't accidentally overwrite something you want to keep. The last question the program will ask you is if you want an update on your ports: this will add a request for update for every port. The program maintains information about current trading levels for each known in the game; this will freshen that information to the current data. It probably isn't needed very often, but once in a while to update things it is useful. (I generally use that only if I've lots of time to play around: I refresh the "interesting" ports by using an upload from the "Examine" program.) What this step will do is create a file that you can upload to generate lots of printouts. Essentially, what it does is create a file with I and R for every new sector. The nice thing is that this will interface well with the Crai on board your ship... Now back to Tradewars. You are probably still in Computer mode; if not, get there. What you want to do is upload the contents of the file you just generated with the convert program into the Crai on your ship. If you can do that while doing an ascii download, start the download and then start the upload. Otherwise, you may have to start the upload and then capture the results later from your scrollback buffer. In any case, your captured file should contain all the I reports (sector nnn has warps to : xxx - yyy - zzz etc) and all the R reports (Commerce report for ...). There will be lots of "I have no record of a port in that sector."'s: that is okay -- had to find out if there was a port there or not. If there are a couple of ports that you are trying to keep track of, you can also call up a port report on them and store that in the downloaded file: just make sure that when you hit your R you don't just carriage return but explicitly type in the sector number. Back to the "Convert" program. Again, tell the program your old data file (or hit return to start fresh) and this time we are in part 2. Tell it the name of the ascii download you just captured, and the name you want to use for your database. The program will generate the data base. The database is in plain text, so you can examine it yourself if you like. Information is divided into several categories. First, are the lines ::Tradewars Data file:: SpaceDock is 200 if you have visited the space dock yet, or possibly SpaceDock is 0 if you haven't visited the space dock sector. Next is a line of the form 7 <- number of notes where the integer represents how many "Notes" you've stored for the game. A note has the form 13 Don't Go Near This Sector!!!! i.e. a sector number, and a short bit of text. You can add or delete notes in the "Examine" program, as well as display those sectors for which you've recorded notes. Next is a line of the form 105 <- number of Port Infos followed by lines of the form 120 3000 3280 -2530 The first integer is the sector number for the port; next are the levels for the three goods "Fuel Ore", "Organics", and "Equipment". A positive number means that the port is selling the stuff, and a negative number means the port is buying up to that much of the stuff. (Remember that the larger the magnitude of the number, the better the price you get -- ports are more willing to stretch when the numbers are higher!) The sectors are in no special order (actually, in order of appearance from the logs over time) but there must be as many lines as specified in the <- number of Port Infos... Next is a line of the form Sector data starts here... followed by lines of the form 1 6 2 3 4 5 6 7 8 2 ... Here, for example, is a report for sector 1: it has six warps, to positions 2 through 7, a port code of 8 (which actually corresponds to class 0) and an "etc" code of 2. A "Port Code" corresponds to -1, if the sector is not a port, 0 through 7 based upon a three bit representation of selling or buying (for example, sector 120 is selling Ore, selling Organics, and buying Equipment, so its port code would be 1 * 1 + 1 * 2 + 0 * 4 = 3; don't worry about it, the program handles figuring out port codes and so on). The "etc" code tells about various pieces of information, again depending on bit representation: currently the codes in use are NoteExists = 1; IsPort = 2; Stardock = 128; but others will probably follow. (Note that the Stardock is also a port; so its etc code is 128 + 2 = 130; if a random port had a note attached, its code would be 2 + 1 = 3.) There is no particular limit to the number of sector warp information lines; in particular, if you are merging information with someone else, you have to be careful when it comes to adding together the port and note info (you must have only ONE line in the "port infos" or "note info" area for a sector, and the number must match with the header number, but you can just concatenate the warp sectors. The worst that will happen is that it won't be able to find an attached note or port info, which will confuse the program but not fatally. This makes a good way for a corporation to gain a real edge: some of the group can be doing the exploring, they can merge their information together with other members of the corp, and then members with the CargoTrans or the like can go out, and do some Combat Trading... HOW TO USE THE DATA BASE VIEWER --- -- --- --- ---- ---- ------ Its pretty well impossible to draw a decent map with all 1000 sectors, so the data base viewer doesn't try to do that. Run "Examine", and tell it the name of your data base. You will be presented with a list of options. In version 0.8, you get to choose from the following list: Choose one of dd note ispersion of sectors dit data base Closest place to buy ighters, shields, and holds Note nformation ength of path between two sectors ajor Space Lane information earest port

aired ports This is one of my favorites. What it does is go through the data base and find ports that are adjacent (i.e. you can warp between them using normal space in one turn) and are compatible (i.e. at port A you can buy a good that is sold at port B, and you can sell a good that is bought at port B). You can be selective (greedy) and only specify ports that are compatible in the very profitable Organic-Equipment trade, or ask for all compatible pairs. The program offers you the opportunity to have the results sent to a text file, which you can then print later (if you can't run the program simultaneously with your terminal emulator, you can get hard copy of the "hot sectors") and you can have the results sent to a text file that are compatible for upload (i.e. part 2 of the "Convert" program so you can keep an eye on trading levels at these critical ports). Displayed to the screen is an integer "factor" -- this number is based upon levels of goods available in the critical trades, and will give a rough estimate of how good a deal you are going to get. ranswarp menu This drops down to a submenu that deals with locations of deployed fighters and using a transwarp drive. Most submenu items are pretty obvious: you specify where you have deployed fighters, or tell the data base that some #%!%@$ has shot up your deployed fighters, or list the places the data base knows you've deployed your fighters. The only thing that needs mentioning is the shortest route submenu item: you specify where you are, and where you want to go. It figures out, based upon where your fighters are located, the fastest route to get there (using a transwarp jump and then normal autopilot). It may say to transwarp to your current sector -- that just means the shortest route lies through normal space. iew space in graphic format Viewing the data will attempt a graphic display on your screen of space: you tell it about how many rows across and columns up and down of sectors to use (maximums are given in the program: hit a return, and you get a default value that is about 3/4 of maximum); you tell it the base sector you want in the center of the screen (has to be a sector you've visited!); and you tell it how large a radius to display (all sectors it is aware of no more than that distance away from your base sector). It will try to display the collection of warps that make up space. Ordinary, visited sectors are displayed as circles, ports as rectangles. (Unexplored sectors just have their numbers floating in space, and if you have color are in yellow.) Lines between sectors means there is a warp connecting one with the other. Dashed lines means that you don't know if the warp is two way or not: if one end of the sector is unexplored, you will have a dashed line. If both ends are explored, then the warp really is one way! (Try graphing around the StarDock and around the class 0 ports.) Don't try to graph too many sectors at once: the screen gets too busy, and you won't be able to tell what connects to what. FEEDBACK ________ Best place for info is 415-376-1554; leave mail to number 1. ACKNOWLEDGEMENTS ________________ Thanks, of course, to the Martins for such a great game! COPYRIGHT AND LICENSING STUFF ----------------------------- Copyright 1991 by Robert Weaver. All Rights Reserved. You may not distribute this for any fee beyond reasonable costs of distribution. Permission is granted to distribute this document and the related executables and source code provided this notice is preserved, and anyone you give the executable has the ability to obtain this documentation and the accompanying source.

aired ports uit Nearest ectors ranswarp menu Nearest nexplored sectors iew space in graphic format ecise note (delete it) Here is what the commands will do: dd note Note nformation ecise note (delete it) These manage the notes that you may have stored on your universe. Typical notes might be "enemy base here!", "great trading spot", "Fedspace", or whatever. Option "A" will add a note to a sector, option "X" will delete a note from a sector, and option "I" will present you with a list of the notes you've made, sorted by distance from a current sector. ispersion of sectors This will display how many sectors there are at a specified distance from your current sector. You can tell you are in the boonies when there are lots of sectors at large distances, and not too many at close distances... dit data base This allows you to go in an mark a sector as unexplored, create or destroy a port, and define the location of the star dock. You might want to do the former if you think something has gone wrong with your data; the next because someone has either shot up a star port or built one. You might need to tell the data base where the star dock is located if your sysop has redefined the name of the port where stardock is located; the program looks for "StarGate Alpha" -- and if its not there, or been moved, the program won't find it and you will have to tell it directly. Closest place to buy ighters, shields, and holds Invoke this option, and you will be asked for your current sector. The computer will then display the path from that sector to any place it knows of to buy fighters: if the only class 0 port you know is Terra, that is the only one it will display, but if you know the others, it will display a shortest path to that sector. ength of path between two sectors You specify two sectors, and it will tell you the shortest way it knows of to get between those two sectors. Note that this may NOT be the actual shortest path, if there are sectors you have not yet explored that might give you a better route. It gives you the shortest path YOU'VE EXPLORED between those two sectors. earest port Nearest ectors Nearest nexplored sectors These displays will give you information about what is close to your current position. Information displayed includes if the sector has been explored, any notes, if its a port, its status (SSB for example, means selling Ore, selling Organics, and buying Equipment) and levels of production. If you ask for the "Nearest Port" report, only ports are listed. I find the "Nearest Unexplored sectors" report VERY useful for exploration purposes: I can just head toward the nearest unexplored sector easily this way. ajor Space Lane information This report is supposed to show you the sectors that are the major space lanes. Take this with a grain of salt. First of all, if you haven't explored the sectors on the major space lanes, it will use not the true shortest route but the shortest route it knows of. Secondly, because the algorithm the Martins are using for shortest path is apparently not the same as the one I'm using, (I'm trying to communicate with them to find out what they do in the program) if there is more than one way to get from Space Dock to the class 0 ports, or from one class 0 port to another, the data presented might not be right. Hopefully this will be nailed down in a later version.