Search using:FAST Google Inktomi Teoma
   

User's Guide for TW Scripter 2.0
Program by Micha Koch (Dark Rider)
Text by Joseph Swails (Mad Maxx) joseph888@my-deja.com
Ver. 0.94 (05/19/01)

Overview:

TW Scripter 2 (TWS2) is an on-line helper and scripting application for enhanced play of the on-line strategy game Trade Wars 2002.*

TWS2 provides an enhanced user interface and the ability to automate certain gameplay procedures. A Trade Wars "scripter" application can be thought of as a complex "auto-pilot" system, that will move, port, land, etc. your ship for you according to specified jobs and procedures, and return to your manual control when finished.

Minimum system requirements:

- Macintosh OS 7.1 or higher
- 68030/40, Power PC, or G3/G4 processor
- 800x600 pixel resolution or higher monitor
- 2 megabytes RAM
- 1 megabyte hard disk space

TWS2 works through MacTCP/IP system and is both MacPPP and Open Transport compatible.

According to the author, the minimum recommended processor speed for competative play should be 200MHz. The program will WORK with slower processors, but will run very slow -- and in a competative game, slow gets you blown up. I use a 333MHz G3 running OS 8.6, and while the display isn't as fast as a "plain" telnet application, it's more than adequate. With a newer 500MHz or higher G4, you'll hardly notice the difference.

Installation:

The SIT file should be placed in it's own folder and expanded. When run, it will generate data files that must be left in the same folder as the application.

General File Structure

Besides the data files, the program also creates two files in the System Folder/Preferences folder, "TW Scripter Macros" and "TW Scripter Bookmarks" the first time it is run. These files are updated each time the program is closed down, so if a crash occurs or the program is forced to quit, the files will not be updated.

The names given to the bookmarks are also used for some of the data files stored in the application's folder -- however, not for all of them. The folder will end up containing the following files:

TWScripter2 - the application itself
Map.out - a CIM compatible dump of the current known universe
out - file containing last ship settings, last sector, etc.
TWDebug - an error report for debugging (for development only)
TWMap - the current internal map database
{bookmark name} - game settings for the particular game corresponding to the assigned bookmark

The data files (except for Map.out) are all binary data used by the program and cannot read or edited by any other applications.

Since the Map files are re-written each time the program is closed, problems can develop if the same copy of TWS is run from the same folder for different games. Therefore, it is very important to avoid entering any other game besides the one the program is set up for once the data files have been written. Doing so will corrupt the internal map database and there is no way to recover it if this happens. (This is why separate folders for each game is recommended.) It's usually only a problem when multiple games are being run on the same server, and you enter the wrong game. If this happens and you exit the game before actually entering the first sector of play, the map will be unaffected.

One way to arrange for playing multiple games is to create an alias for each copy of the application, and name the aliases for each game and place them on the desktop or in their own folder.

Running TWS2:

Double-click on the program's icon to start the program. The menu bar will appear, but no windows will opened (or TCP/IP connection started) yet. Windows will appear on the screen when a telnet connection is detected.

MENUS

Flie Menu:

New Session: opens a dialog box for entering the telnet address and port of the Trade Wars server. Click on OK to log on. (Use this function to check out new games. If you decide you want to play in a game, create a bookmark for it in the Bookmarks menu and use that to log in to the server.)

Quit: Quits the program.

Edit Menu:

No edit functions (Cut, Copy, Paste) are implemented in TWS2

Bookmarks Menu:

Edit Bookmarks: opens the bookmark selection window. Click on New to create a new bookmark for a given server and game. Highlight the desired bookmark and click on Delete to permanently delete the bookmark. Highlight the desired bookmark and click Edit to change the bookmarks settings. This opens the bookmark editing dialog box. Enter a unique alias for the bookmark, and the telnet address and port number (usually 23) of the server. There are windows to change the size of the main screen scrollback buffer and the size of the Message screen buffer, and to specify the game's global key for the Who's Online command, which is usually # but may vary between servers. Click OK to create the bookmark. Click Cancel to cancel the operation.

The existing bookmarks are listed below Edit Bookmarks. Select a bookmark to open the game screens and log on to it's server.

Script Menu:

ZTM: starts the Zero Turn Mapping routine. This generates a complete map of the game's entire universe. However, it does not provide port data; TWS2 continuously gathers port data when you visit a sector or from e-probes. But without a complete sector map the Find Closest Fighter and Plot Course functions will not be accurate or will not work at all.

When started, Zero Turn Mapping enters the game's Computer Interrogation Mode (CIM) and begins plotting courses with the "ship's computer." The course results are captured by TWS2 and used to build a database of all sector warps in the game.

The process can take 3 or 4 hours total to map a standard 5000 sector game using a 56k modem, so you must idle on line until it completes the process. In a time limited game it would be impossible to run the ZTM in a single day. However, if you stop the process before it's done, it will pick up where it left off when you start it again later. When complete it will stop automatically.

Run Script: starts the script selected in the Scripts Window. (See descriptions of Scripts below.)

Stop Script: halts a running script and returns control to the keyboard.

Pause Scripting and Resume Scripting are not implemented in TWS2.

Map Info Menu:

Map info functions must have a complete map of the game's universe to function, either from a ZTM or by visiting/e-probing every sector. Also, to use the Find Fighter Closest To function, you must first get a scan of fighters from the game by typing 'G' at the main Command prompt. TWS2 captures the data and adds it to the internal database. This must be done every time you log on to play, and done again during a game session if any fighters have been moved, dropped, picked up or destroyed since the last scan was taken.

Plot Course: calls up the course plotting dialog box. Enter the start and end sector numbers and TWS2 plots the course between them. NOTE: The course plotter does NOT calculate for any avoids specified in your ship's computer, but gives the true shortest path.

Find Fighter Closest To: enter the target sector number and click on Find. TWS2 returns the location of nearest fighter to the target, and the true shortest path from there to the target.

Bubble Finder: opens a dialog box asking for the minimum depth bubble to report and a file name. Click on OK and it generates a printable report file listing all the bubbles, including the door sector, all sectors inside it, the dead ends, and any unseen "back doors" or one-way sectors leading into it from outside. (See description of Bubble Report below)

Tunnel Finder: not implemented in this version. Selecting Tunnel Finder simply generates the same report and the Bubble Finder.

Find Nearest ___ Port: gives location of requested port type. NOTE: result appears in the Message Window below the main screen.

Settings Menu:

Auto-haggle: Always Enabled turns the auto-haggle function on. It will run and "haggle" for the best price from a port whenever you Port and Trade. You still have to enter the kind and amount of product to haggle for manually. The auto-haggle script takes over when it gets the "Your offer?" prompt and stops after the buy or sell is made. Only When Scripting runs the auto-haggler only while a script is running. Disabled turns the auto-haggle off. Maximum Haggle is a "reverse" haggler that offers the worst price (meaning the "best" price from the port's point-of-view) that a port will accept as a "real offer". This is used to "fatten" a port with cash for subsequent robbing by a Red player, especially when using the "mega-robbing" techniques possible under the MBBS servers.

Anti-Idle: When checked, TWS2 will send a carriage return <CR> to the game after 60 seconds of no user input. This prevents the game from logging you off if you don't type anything for whatever length of time the sysop has set for "idling". CAUTION: in certain positions in the game, an unintended <CR> can have bad effects. For example, if you are at the Stardock prompt, it will have you "wandering around" and you take a chance of being mugged and losing money. If you're talking to the Grimy Trader, a <CR> exits the conversation. It's best to only run Anti-Idle while at the main game prompt and turn it off when you are at the keyboard.

Toggle Display Size: toggles between 800x600 and 1040x768 pixel display modes. Only available when using a monitor set for resolutions higher than 800x600.

Macros Menu:

Edit Macros: opens the macro editing window. Macros are strings of characters sent to the game in a single "dump". They are typed in to each field in the editing window and executed when the assigned command/number key combination is pressed. The macros are stored in a Preferences file and are the same for all games played. Macros can be up to 256 characters in length. <CR> is represented by \r.

Macro 1-0: executes the macro.

Help menu:

There are no on-line Help functions implemented in TWS2.

TWS2 DESKTOP

When a telnet connection is opened, several windows appear on the desktop. Click inside the window frame to make it active.

Main Screen:

The upper left window (and the largest) is the main game screen. In the top bar will be the name of the server. This window displays the standard scrolling screen of the game, in ANSI color. This window can be scrolled back to examine previous text.

Status Display:

This is a "floater" window and is always active. It displays the following information:

- Sector : Current location of your ship
- Credits : Amount of cash you have on hand
- Turns : Turns remaining
- Figs : Fighters on your ship
- Shields : Shields on your ship
- Exp : Your current experience points
- Align : Your current alignment
- Holds : Total holds on your ship
- Empty : Number of empty holds
- Fuel Ore : Holds of Fuel Ore
- Organics : Holds of Organics
- Equip : Holds of Equipment
- Colos : Holds of colonists
- SD : Location of Star Dock
- Class 0 : Location of Class 0 ports
- Lines : Number of lines in the scrollback buffer
- Status : Scripting status
- Autohaggle : Autohaggle setting
- Free Mem : Memory available for scrollback buffer
- Time on : Time on the game

NOTE: Sometimes the status screen does not update its settings under certain circumstances, especially when transporting between ships. However, simply type an 'I' from the main command prompt and the status screen will update itself.

TWScripter:

This is the script control window. See 'Using scripts' below for further information.

Message Window:

This is where fedcomm and subspace messages appear, after being filtered from the main screen display. Also, certain messages from the game itself also appear here, such as recovered turns and Federation messages. You can also scroll back this display to examine previous text.

Also, when using the "Find nearest ___ port" in the map functions menu, the result appears here.

Messages:

This window is used to compose and send messages. When active, it uses the mouse and cursor controls to edit text, like any word processor -- a great improvement over the game screen! Use the pulldown menu to select subspace, fedcomm or secure paging to a specific player (you must enter the trader's full name in the 'To:' field.) Click on the "Send Message" button to transmit.

Scripts:

Another floater window, it displays the currently running script.

Pop ups:

When you select "Find Nearest Fighter" or "Plot Course" in the Map Functions menu, a pop-up window appears. Enter the appropriate info in the fields and hit <return>. Click on the "Cancel" button to close the pop-up.


----------------------------------------------------

USING TWS2:

Connecting and starting a new game:

Once you successfully connect to a TWGS server, the windows will open up on the computer screen. You'll see a window with a standard Telnet ANSI screen and if the connection is active you should get a log-in prompt, just like any Telnet program. If you lose the connection all the windows will abruptly close. (Bummer, because sometimes you don't want to lose your scrollback.)

Clicking on various windows on the screen makes that window active, although scrolling input from the server will always continue on the main screen window.

The main screen is basically the same as the game's built-in scrolling display, so you can play the game from there manually if you want to.

The first thing you must do when logging into a game for the first time is capture the "game settings dump" from the main log-in menu. This data is automatically captured and stored in the database for that game. It's used to set things like steal-rob factor and planetary trade percentage. TO GET THE SETTINGS DUMP: At the main menu screen -- the place where you type T to "Play Trade Wars 2002", you simply type *. This hidden command causes the game's sysop settings to scroll by in one long dump. You only have to do this once. Then press T to enter the game.

Scripts and Macros:

The heart of TWS2 is it's scripting functions. It enables the player to automate some of the more tedious elements of playing Trade Wars.

A "script" is merely a series of keystrokes that TWS2 sends to the game server. Scripts are basically the same thing as a macro, but with greater functionality. Unlike a macro, a script can be made to "read" incoming characters from the game server and tailor the characters it sends in response accordingly.

In most case, using a script requires you place your ship in a particular position before you run it. Usually you are at whatever point you would be to do the same action manually; i.e. to start a pair-trading script, be in the designated sector (not docked) with full holds to trade and (if needed) enough cash on hand to make the transaction.

Macros are more often used to accomplish a fast series of moves with a single keystroke, such as moving into a sector and attacking, blasting off from StarDock and trans-warping away before an enemy parked outside can get a shot at you, or escaping with T-warp to a pre-set home base from an attacker.

Remember, unlike scripts, macros are stupid. Once triggered they will execute their keystrokes no matter what actually happens in the game. If you make an error you can do something bad like blind T-warp or fly into an enemy's fire. Use with caution!

Using scripts:

Use the pull down menu in the Script window to select the script. Run the selected script by clicking on the "Script It!" button or by typing command-R on the keyboard. Stop a running script by clicking on "Stop" or by typing command-. on the keyboard.

Blue Functions:

Pair trading: You specify the two adjacent sectors of the trade pair ports in the fields in the window. It's best to make a manual trade at each port first before running the script. Then place your ship in the sector with the port that is buying what you are carrying in your holds, and run the script. Your ship will move back and forth between sectors, port, trade and haggle until one port runs dry of a product or you run out of turns, or you stop the script manually. TWS2 will always trade the two most valuable products between ports.

Triple Trade: Performs a three-warp trading run between two Organic/Equipment trading ports that are seperated with a Fuel Ore/Organics trading port in between. Useful in a sparse (or heavily traded-out) universe with a low number of usable trading pairs.

Colonize: This function is only available if you have a federal commission and a transwarp ship. (Otherwise TWS2 will give an error warning and abort the command.) Also, you must have already mapped the direct path of sectors to and from Terra and your home sector. Enter the planet number to colonize, the planet number to pick up fuel ore from (fill in both fields, even if it's the same planet), and check the box to use a planetary transporter if available on the fuel ore planet. Start the script with your ship in the home sector but not while landed on the planet.

X-fer: This moves product from one planet to another within the same sector. Enter the planet numbers and specify the product to be moved and the amount. BUG: THE MOVE COLONISTS FUNCTION DOES NOT SEEM TO WORK CORRECTLY! (You'll have to come up with a macro.)

Photon-and-Move doesn't work. Period. Oh well. I just set up a macro to do it and put in the correct sector/planet numbers as needed. It's not like it's something you do everyday.

Red Functions:

(Red functions can only be used by an Evil (Red) trader character with an alignment rating of -100 or lower.)

SSM (Sell-Steal-Move) and SST (Sell-Steal-Transport) is done between two adjacent equipment buying ports. In order for you to be able to steal from an equipment buying (called an "xxB") port, the product level must be under 100%, enough for you to steal the amount of product your ship can hold (and that you can safely steal). Usually this is done by upgrading the port before stealing from it. Ports are upgraded (for some weird reason) at a factor of ten -- i.e. if you upgrade a port by "20 units", you just made 200 units of product available "on the dock" and ready to steal. You need to upgrade a little higher than the exact amount you're going to sell/steal, because ports regenerate over time and if you drop below the amount of holds you can steal, the script will pause. In fact, you can go ahead with the script paused and upgrade the port by a few units, dock again, go for the steal, and the script will pick up where it left off.

TWS2 will automatically calculate the maximum "safe" steal you can make, based on your experience level, number of available holds, and the sysop's "bust factor" from the settings dump.

Sell-Steal-Move: Similar to pair trading, but you're selling a load of product to a port, stealing it back, moving to the port next door, doing it again, and going back.

Sell-Steal-Transport: This requires two ships, one in each of the xxB sectors, but not necessarily adjacent. However, the pair must be within the ship's transport ranges of each other. The script steals from the first port using "Ship 1", transports you over to "Ship 2", sells any product that ship has, steals it back, transports you back to "Ship 1", where you sell the product you stole before, steal it back, transport, and so on until you either stop the script, the port runs out of stealable product, or you run out of turns.

In both of these functions, you start out with your ship's holds empty, and the xxB port in the sector with you with enough product ready to steal "on the dock." (This is displayed by the game when you give the (S)teal command.) For SSM, enter the sector numbers just like with trading pairs. For SST enter the Transport ID numbers for the two ships parked in the xxB sectors.

SDT - Steal-Dump-Trade: To use this function, your must have a planet in the sector with your ship and the port, and specify the planet number along with the ship number in the Script window. You must also specify the amount to steal and dump on the planet before trying to make the planetary trade. 1000 to 1250 units is recommended for maximum profit and minimum busts, so be sure the ports have at least that much available on the docks. Then put yourself into "Ship 1" with empty holds and run the script.

NOTE: Do NOT use passwords on ships running SST or SDT!

ANOTHER NOTE: If all the above regarding Red trader play is confusing to you, it's probably better not to try to use the SSM, SST or SDT functions until you understand the fundamentals of Evil play in TW2002. If you already know how to play Red then the above instructions should get you rolling. Otherwise, visit a few TW2002 websites and gather some docs and tip sheets on playing a Red character.

Bubble Report

In TW2002, a "bubble" is a sector, or series of sectors, that have only one way in or out. Also called "dead ends", but sometimes bubbles have forks inside them. Bubbles are useful for building defendable planetary bases.

A "bubble report" is a list of dead-ended bubbles. TWS2 creates this report from its internal map data, so it is limited to the explored sectors, unless you have run a complete Zero Turn Map first.

How to read the bubbles.out file

The Bubbles.out is not designed to be opened or read by TWS2! In order to read the file, it must be opened from within a word processing program such as Simple Text.

The file consists of a list of "doorway" sectors, each one followed by the sectors inside the bubble. For example:

Door: 2118
Sectors:
282 - 2597 {2118} 1938
2597 - 282
1938 - 282 (4131)
Size: 3


Graphically, the above example would look like this:



The first line is the "door" sector -- that is, the sector that leads to the bubble, but not inside the bubble. In other words, it's the last sector before you actually enter the bubble -- it's the "cork in the bottleneck" of the bubble. If you control the door, no one can get inside the bubble itself. The door sector itself is in "open space" and will always have at least three warps in and out of it.

After the Door, the report lists the sectors inside the bubble. On each line, the first number is one of the sectors inside the bubble, and the numbers after the '-' are the sectors that can be "warped to" from there. In other words, the numbers after the '-' are the same as what you would see displayed by the game on the "Warps to:" line while in that sector.

The { } brackets indicate the door itself. The parenthesis ( ) indicate that the bubble has a back door -- a one-way warp from that sector out of the bubble, but not into the bubble.

Some bubble reports from other mappers, such as SWATH, list bubbles with one-way back doors in to them -- this is known as an "unsecure" bubble. TWS2 does not include unsecure bubbles in it's report.

"Size" indicates the number of sectors inside the bubble.

 

Some bugs, glitches and comments:

If you are playing more than one game, it is suggested that you maintain a separate folder for each game, and copy the application file to each of these folders. Since it is relatively small (under 1 meg) this shouldn't present too much of a strain on disk space.

Unfortunately, TWS2 does not allow cutting and pasting of the main screen, and there is no way to save the scrollback buffer to a file.

Keep an eye on the turn counter while scripting -- you can burn through a lot of turns very quickly, especially in a large, slow ship.

Occasionally, TWS2, like almost all scripters on any platform, can suffer from glitches during gameplay. Usually these are caused by unexpected input on the screen, generally from fedcomm or subspace chatter. If this is a problem, it's best to silence at least the fedcomm messages, if not all messages, while scripting. Usually, the messages get filtered by TWS2 to the message window, but this doesn't always work perfectly. Set the messages for LONG instead of COMPACT (in the 'Personal Settings' of your ship's computer menu) and the filtering seems to work better.

Sometimes while using trading/stealing scripts, a glitch will cause your ship to go careening off into space. What happens is that one of the game's haggles gets a [CR] in response by accident and ends the trade process while TWS2 is still trying to haggle. So "random" numbers get sent followed by a [CR], which you ship reads as a move command. Your autopilot will pause at the first port or hazard you encounter and then you can stop the script, but even a few moves in a Colt can cost a lot of turns! It can also be dangerous if operating while enemies are online waiting for you to trip one of their beacon fighters.

The workaround for this if you must have absolute safety (like operating right next door to hostile sectors), is to set your ship's avoids to keep you from moving into a hostile sector. The game will warn you and freeze, and the script will pause. Turn off the script (command-.) and press "N" and you stay right where you are.

Sometimes this even happens when no messages are coming through, and it seems to be related to glitches in TWS2's port database. The TWS2 database file contains information about each port you encounter, including port class and product level, and a haggle factor after you trade there. You'll notice that the first few trades TWS2 makes at a new port has a lot of haggles, but after 2 or 3 visits it gets the 2 points on the first trade almost all the time. It "learns". But sometimes this data get corrupted. So the best approach to doing SST or SDT is this:

Make the first few steal-sell-transport cycles manually between the two ports. This seems to set the database up. Then get into position on the "first" port or ship and run the script. If you still experience a glitch, then get set up and before you run the script again, turn the autohaggle function off. Then after the script makes a few back and forth cycles, just pull down the autohaggle menu and turn the haggle back on while it's running. This almost always works.

Be sure you always save a separate game bookmark for every game you play, and if you play two or more games on the same server that you always select the bookmark that matches the game number on the server. Otherwise you internal map will get ruined and you'll have to clear the map and do a new ZTM.

It should be pointed out that TWScripter 2.0 is what should be called a "beta" level program. There are bugs (though not very many) and there are certain functions that are part of the program but just don't work as they should, or at all. The author, Micah Koch, has never claimed the program was everything it should be, For that reason (and due to recent advancments in Mac operating system technology), Micah has decided to start from scratch to create TW Scripter 3, which is now in the works. For that reason, TWS2 is not supported, and no upgrades or bug fixes are being considered. But of course, this is freeware, so no one can really complain about that.

That being said, I have found that with TWS2 I can play Trade Wars 2002 with the best of them. The program is quite stable and hardly ever crashes. The important stuff -- like the money making and colonizing scripts -- all work.

I usually play Red, and the "stealing" functions of TWS2 work every bit as well as those in PC applications such as SWATH or ATTAC. The Zero Turn Mapping is one of the fastest and most accurate on any platform. Me and my corporations win as many games as we lose (although "winning" a game of TW2002 is usually a simple matter of attrition), and using TWS2 I have played in cut-throat, top competion games with elite corpmates (and adversaries), held my own with the PC players, and won. All the tools are here to successfully play TW2002 at highly competative levels.


*Trade Wars 2002 is a registered trademark of Epic Interactive Strategies, Inc. TWS2 is not produced or endorsed by EIS.

Send other bugs or workarounds to joseph888@my-deja.com and I'll include them in the next update of this document.