Category : A Collection of Games for DOS and Windows
Archive   : TWBUG11.ZIP
Filename : TWUNBUG.DOC

Output of file : TWUNBUG.DOC contained in archive : TWBUG11.ZIP


Version 1.1

Trade Wars 2002 Unbug
by Albin Gersich
(C) Copyright 1992 - Sasquatch Software

º Table of Contents º

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.1 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Compatibility . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.6 Support and Distribution . . . . . . . . . . . . . . . . . . 4
1.7 Licensing . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Command Format . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 How To Use TWUNBUG . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Configuring TWUNBUG . . . . . . . . . . . . . . . . . . . . . . . . 8

4.1 Invincible Planet bug . . . . . . . . . . . . . . . . . . . 8
4.2 Ship Overloading bug . . . . . . . . . . . . . . . . . . . . 9
4.3 Megaholds bug . . . . . . . . . . . . . . . . . . . . . . . 9
4.4 Holds bug . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.5 Cloaked Ship Exchange bug . . . . . . . . . . . . . . . . . 11

5 Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . 12

6 Exit Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

7 Future Plans . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Page 2

º Section 1 Introduction º

Are you tired of your competitors using bugs to get the advantage? Are
you tired of your users complaining about people using bugs? Are your
Trade Wars games dying due to lack of interest? Are you going into Trade
Wars withdrawal? Your fix is here! Breathe some life into your Trade Wars
games. Get TWUNBUG.

Trade Wars 2002 Unbug was developed to answer the cries of the players.
It will scan the data files after each player exits the game and look for
data that is the related to certain bugs. Corrective action will be taken
to eliminate the problem data. Each bug check can be enabled or disabled.
TWUNBUG can not fix every bug in the game, only revised code can do that.
TWUNBUG will attempt to minimize the affect of the worst bugs. Here are
the bugs TWUNBUG looks for:

Invincible Planets bug
Ship Overloading bug
Megaholds bug
Holds Bug
Cloaked Ship Exchange bug

Now lets have some good Trade Wars games!

°±²Û 1.1 Û²±° Disclaimer

The TWUNBUG package is provided AS IS. Sasquatch Software makes no
warranty, either expressed or implied, with respect to the software or
documentation, including but not limited to their quality, performance,
merchantability, or fitness for a particular purpose. In no event will
Sasquatch Software or the author be liable for direct, indirect, special,
incidental, or consequential damages arising out of the use, misuse, or
inability to use the software or documentation, even if advised of the
possibility of such damages.

°±²Û 1.2 Û²±° Acknowledgements

I would like to give thanks to Jason Boyd for providing the formats to
the Trade Wars 2002 data files. When I picked them up and tucked them
away, I never thought this is what I would use them for. TWUNBUG would
not exist without those file formats.

I would also like to acknowledge Dan Roseen for allowing me to distribute
and support this program through his BBS.

°±²Û 1.3 Û²±° Trademarks

IBM is a trademark of International Business Machines Corporation.
MS-DOS is a registered trademark of Microsoft Corporation.

Page 3

°±²Û 1.4 Û²±° Compatibility

Trade Wars 2002:

This program has been tested for compatibility with Trade Wars 2002
v1.03d, a door game by Martech Software Inc. It should be compatible
with v1.03 but has not been tested with it. It is strongly recommended
this program be used in conjunction with v1.03d to fix the most bugs.
Compatibility with other versions or modified games is not guaranteed.

TWUNBUG checks and modifies the TW2002 data files. It does not modify
any of the executables.

Operating system:

TWASSIST runs on an IBM or 100% compatible PC or AT running DOS. It
has been tested under MS-DOS version 5.0. Compatibility with other
versions or operating systems is not guaranteed.

°±²Û 1.5 Û²±° Files

The TWUNBUG version 1.1 package (TWNBUG11.ZIP) contains the following

TWUNBUG .DOC 25004 11-05-92 1:10a This document
TWUNBUG .EXE 51934 11-05-92 1:10a The executable program
TWUNBUG .HIS 1504 11-05-92 1:10a Revision history

Files created by the program:

TWUNBUG .DAT Configuration and data file. This file is created in the
same directory as the Trade Wars 2002 data files. One
per game being monitored. File size is approximately 6k.

°±²Û 1.6 Û²±° Support and Distribution

Updates and/or new releases of TWUNBUG can be downloaded or filerequested
from Dan Roseen's BBS, The Night Owl, as shown below. If you are logging
in, you will have to fill out a new user questionnaire. Once you have done
this you will have enough access to download TWUNBUG without complete user

If you are experiencing problems, call The Night Owl BBS or write to the
address below. Provide a detailed description of the problem and any data
related to the problem. If you send mail on The Night Owl, send it to the
author, Albin Gersich. The sysop is not responsible for support of
TWUNBUG, do not bother him with messages or chats. A special message area
for another program, TWASSIST, by the same author has been setup. You may
use this message area to send mail to the author. This area has file
attach capability, allowing you to attach files of interest to your message.

Page 4

1.6 Support and Distribution (contd)

Mail can be sent to:

Sasquatch Software
P.O. Box 4331
Kent, WA 98032

Support and Distribution:
Sysop: Dan Roseen (not the author)
BBS: The Night Owl
Fidonet: 1:343/102

Login: (206)631-4949 24 Hrs. Kent, WA - USA

Mail/FREQ: (206)631-1752 1:343/102 (this number is NOT for login)
USRobotics DS HST/V.32bis/V.42bis

Comment: For downloading latest version: Download TWNBUG*.ZIP
For file-requesting: Use the magic name "TWUNBUG"
or request TWNBUG*.ZIP

°±²Û 1.7 Û²±° Licensing

The software and documentation is copyrighted and is protected by United
States copyright laws and international treaty provisions. All rights
are reserved by Sasquatch Software. The software is owned by Sasquatch
Software and title remains in Sasquatch Software. You may distribute
the program as long as the entire package (as described in the section
titled Files) is distributed together and no fee is charged for the
software (a nominal distribution or shipping fee is ok). You may not
decompile, disassemble, modify, merge, or reverse engineer the software
in any way.

TWUNBUG is free. You are granted a license to use the software
indefinitely. No consideration is required or expected. Contributions
to provide incentive for the development of utilities will be gladly
accepted. They may be sent to the mail address above.

Page 5

º Section 2 Command Format º

TWUNBUG [ -config | -maint ] [ tw_dir ]

-config or /config Runs the configuration part of the program.

-maint or /maint Performs maintenance by updating the TWUNBUG
(optional) data file without taking corrective action.

tw_dir The directory where the Trade Wars data files
(optional) are in. Default is the current directory.

If neither -config nor -maint are specified, TWUNBUG will perform checks
of the Trade Wars data files for bug related data and take corrective
action. Messages will be sent to the players informing them of the
violation and the action taken. Information is also provided in the
Trade Wars log file, TWGAME.LOG, of actions taken. This allows the sysop
to review what happened if questions arise. By using the TW game log,
a history of the players and the TWUNBUG actions are easily correlated.
Sometimes a player can use a bug, like ship overloading, and pass the
problem on to another player (e.g. exchange ships). The player who
receives the messages is not the one who used the bug so he may not
understand what happened. The info in the game log should help the sysop
determine what happened.

The -config option is used for setting the configuration for TWUNBUG.
It is used initially to identify which bugs to check, specify any values
required, and to identify penalties to assess if it determines a player has
used one of the bugs being monitored for. If the TWUNBUG.DAT file does not
exist in the Trade Wars directory it will be created. The -config option
may also be used later to change the configuration.

The -maint option is used to update the TWUNBUG data file. It will read
the Trade Wars data file and update the TWUNBUG data accordingly, without
doing any of the checks for bugs. This is used when first setting up
TWUNBUG in a running game or when EXTERN maintenance is run. It will also
put a message in the daily journal informing the players the game is being
monitored by TWUNBUG.

Page 6

º Section 3 How To Use TWUNBUG º

Set the configuration.

For each Trade Wars game, run TWUNBUG with the -config option. After
setting the configuration, run TWUNBUG with the -maint option to update
the data file to agree with the Trade Wars data.

If the game is already running, run TWUNBUG one more time (without
-config or -maint) to check for bug related data and take corrective

Changing the configuration:

To change the configuration of TWUNBUG for a game that is already being
monitored, run TWUNBUG with the -config option. Do not follow it up
with the -maint option as the data file already is up to date with the
Trade Wars data.

During maintenance:

Run TWUNBUG with the -maint option after each time EXTERN is run. This
allows TWUNBUG to update its data to reflect changes made by EXTERN. If
you have a batch file for running EXTERN then add TWUNBUG to it.

After game play:

Setup the BBS so TWUNBUG is run each time a player exits the game.
TWUNBUG will check for bug related data and take the appropriate
action. The TWUNBUG data files will be updated to reflect the game


If a TWUNBUG configuration already exists in the Trade Wars directory
from a previous game, it is not required to run -config unless you
want to change the configuration. Run TWUNBUG with the -maint option
to update the data file to the newly initialized game data.
Alternatively, you may delete the data file and start over.

After using TEDIT:

After using TEDIT, run TWUNBUG with the -maint option so it will update
its data file.


Backup the TWUNBUG.DAT file at the same time the Trade Wars data files
are backed up.

Page 7

º Section 4 Configuring TWUNBUG º

This section describes the configurable items for TWUNBUG. To change a
value, enter the letter in paraenthises for that item in the menu. You
will shown a screen of information about the particular value and prompted
if you want to make changes.

Each of the bug checks TWUNBUG can perform can be enabled or disabled.
Disable a bug if you want to allow its use or if there are problems with
TWUNBUG doing that bug check. It is recommended all bug checks be enabled
unless there is a problem.

Some of the bug checks have values that are used to determine if a bug is
being used. Each subsection below describes the bug check, the values

associated with it, and the corrective actions. Recommended default values
are given where applicable. Messages will be sent to the player in the
game informing them of any action taken. Similiar information will also be
recorded in the log file.

°±²Û 4.1 Û²±° Invincible Planet bug

The Invincible Planet bug is when there are 1639 or more shields on a
planet with a level 5 citadel.

Values: You may set the maximum number of planetary shields to be allowed.
The default is 1638. This mimimizes disruption to existing games.
For new games you may prefer a different value (like 1500 which is
easy to remember).

Action: If the citadel is level 4 or lower, no action is taken. Might as
well leave the shields there as a bounty for a conquerer. If the
citadel is level 5 or higher, the number of shields will be
reduced to the maximum allowed. The excess will be lost. No
additional penalty is made. This is a minor infraction that can
easily be done accidently without realizing it.

Page 8

°±²Û 4.2 Û²±° Ship Overloading bug

The Ship Overloading bug is when a player has more of a particular item
than his ship type is allowed to carry. This checks for all items (holds,
mines, etc.), not just fighters and shields.

Values: None. The maximums allowed are read from the SHIPSTAT.DAT file
in the Trade Wars directory except for some items that have a
fixed maximum (e.g. mine distrupters).

Action: Any item that exceeds the maximum allowed will be reduced.

Penatly: They will lose all of the item overloaded.

NOTE: If negative amounts of an item are detected, they will also be set
to zero.

°±²Û 4.3 Û²±° Megaholds bug

The Megaholds bug is a way of fooling the game into thinking there are
more empty cargo holds on a ship than there actually are. It is caused by
weird values for products being carried.

Values: None.

Action: Any weird values are set to zero. The total number of holds used
by the products is also checked. Any excess over the number of
holds is removed (fuel first, then organics, equipment, and
finally colonists).

Penalty: If the total number of holds used exceeds the maximum allowed for
the ship type, the action was deliberate and the penalty is the
loss of all cargo holds.

NOTE: If the total number of holds used was not over the maximum allowed
for the ship type, the products are adjusted and an informational
message will be sent but no penalty is assessed. This may have
been caused accidently by the program (e.g. Ferrengi taking holds
but not the cargo) rather than a deliberate action by the player.

Page 9

°±²Û 4.4 Û²±° Holds bug

The Holds bug allows a player to get free cargo holds. This is the
toughest bug to figure out because there is no bad data in the Trade Wars
data files. Telltale signs are trails of busts at ports but these could
also be the result of legitimate play.

Values: The maximum number of busts allowed per day. The default is 2.
This should work well in a 60 base turn game but will need to be
adjusted for higher base turn games.

I have been caught two or three times, in a 60 base turn game, in
one day doing legitimate play. For 90 base turn games I recommend
the maximum number of busts allowed to be set to 3, and for 120 to
150 base turn games I recommend it to be set to 4. Problems arise
with this check in high turn games. The higher the number of
allowed busts the more the players can get away with. If set too
low, you could harshly penalize players for legitimate play.
Personal opinion: I wouldn't set the number of base turns to more
than 120 anyway, even for a learning game.

Action: If the number of times a player was busted in one day exceeds the
maximum number of busts allowed, a series of rules are tested to
determine if a warning message will be given or a penalty will be
assessed. These rules are designed to give the player the benefit
of the doubt for an occasional minor transgression, while hard
core and repeat offenders get penalized. Consideration is given
to the total number of busts, the number of busts in a day, the
number of warnings given, and the number of days since the last
time this bug check was triggered for this player.

Penalty: One of the following penalties will be given depending on the
results of the rules described above.

1. Warning given.
2. All holds removed from the ship.
3. The players ship is exchanged for a shiny escape pod.
4. The players ship is exchanged for a shiny escape pod AND
he is not allowed to play for a number of days, from one
to five.

Page 10

°±²Û 4.5 Û²±° Cloaked Ship Exchange bug

The Cloaked Ship Exchange bug allows players in a citadel to exchange
ships with another player who is not in the citadel but cloaked somewhere
in space. This is caused by a flag not getting cleared when the player
leaves the planet.

Values: None.

Action: If a cloaked ship has a planet flag that is not zero it is
cleared. No message is sent to the player as he will not
notice any difference. A message is still placed in the log.

Penalty: None.

Page 11

º Section 5 Recommendations º

If the game is beyond hope or fairly well determined, it is time for a
BIGBANG and use TWUNBUG from the start.

If a game is underway but still in reasonable shape, inform your players
TWUNBUG will be used. Give them a couple days warning to adjust their
situation accordingly. No need to make the users hostile to the sysop for
something you had little control over in the first place. Give them two
days warning and then implement TWUNBUG. Of course, you can always reset
the game to give everyone a fresh start.

Inform your players which bug checks are enabled and the maximum allowed
planetary shields if the Invincible Planet bug check is enabled. Do not
tell your players what value is used for the holds bug check.

º Section 6 Exit Codes º

Exit codes are provided for those who want to make use of them. You do
not need to do anything with the exit codes if you don't want to. The
following codes are used:

0 Successfull completion. No problems occurred.

1 Improper arguments to the command. Command did not run.

2 Error while reading the TWUNBUG data file. Command did not run.

5 Error while saving to the TWUNBUG data file, either when using
-config, -maint, or no bugs were detected. Fix the problem and

10 Problem with one of the Trade Wars files. Command may, may not,
or may have partially performed the desired function depending on
where it was when the problem occurred. Information may be given
in the log file depending on the nature of the problem. Run the
command locally with the same arguments and watch the output
messages for information on the problem. Fix the problem and

50 Successfull completion. Use of enabled bugs was discovered and
corrective action was taken.

Page 12

º Section 7 Future Plans º

TWUNBUG will be revised to support Trade Wars 2002 v1.03(d) as needed.
When the next version of Trade Wars 2002 is released, support for TWUNBUG
will be dropped as the bugs are to be fixed in the next version. TWUNBUG
will be resurrected for future versions if the need warrents it.

Comments and suggestions can be sent through the Fidonet Trade Wars echo
to Albin Gersich. To report a problem, send a detailed letter or message
to the author on The Night Owl BBS. Refer to the section on Support and
Distribution for more information.

Page 13

  3 Responses to “Category : A Collection of Games for DOS and Windows
Archive   : TWBUG11.ZIP
Filename : TWUNBUG.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: