Total Annihilation Core Contingency v3.1 Bug Fix patch
Dated: June 3, 2002
Version: 1.6 FINAL
LITE INSTALL VERSION!

This file is a list for all changes made from TA Bugfix version 1.5 to version 1.6.

Unit Scripts BOS files used in TA Bugfix are in a separate TABF_BOS.ZIP file.
The scripts were made with Scriptor RC1 -- good luck making them better.
Most of the scripts have defined variable names to ease understanding their structure, but I have not done any proper documentation for any of them.
The "old" directory under each directory contains previous versions of the current unit scripts found in TA Bugfix. These are included for comparision's sake and so you can see somewhat how I got from Cavedog's original scripts to the current scripting designs.
ALL the scripts should be considered a work-in-progress!
if any scripts have a targetcleared(which) procedure, remove that procedure -- it's buggy!

List of Changes: (table of contents)
---------------
New Control Options!
File Changes in GAMEDATA dir (in REV31.GP3)

AI fixes
Map Changes
Map Features Changes

Various Unit Changes
Unit GAF Changes
Unit Name Changes
Arm Fibber Sub Changes
Krogoth and Krogoth Gantry changes
Landmine Changes
Mobile Radars and Radar Jammers changes

Corpse Changes

Weapons changes
Landmine Weapons Changes
Core Pyro Weapon Changes
Torpedo Weapon changes
Weapons Removed
Weapons Added Back

Final Notes

New Control Options!
-------------------
Some 2-weapon and 3-weapon units now use the "D-Gun" option to individually fire their secondary weapon. This MAY cause some confusion on ships, because their 'main' gun is now weapon #3 so their depth-charge weapon WILL target Fibbers!

My experiments with setting up all 2-weapon units to use the "D-Gun" option to individually fire a secondary weapon has failed.

I couldn't get the Torpedo Seaplanes to fire their weapons reliably with the d-gun button, so they're losing the button. (It seems to be caused by a bug in TA's game engine, NOT a bug in the data I'm using.)

Only units that have 3 weapons
desperately need aiming ability for their secondary weapons (like for Destroyer's depth-charges) will gain this button.

Units with "D-gun" option:
Advanced Bombers (ARMPNIX and CORHURC)
Battleships (ARMBATS and CORBATS)
Cruisers (ARMCRUS and CORCRUS)
Destroyers (ARMROY and CORROY)
Missile Frigates (ARMMSHIP and CORMSHIP)
PT Boats (ARMPT and CORPT)
Doomsday Machine (CORDOOM)
Krogoth (CORKROG)
Panther (ARMLATNK)
Pelican (ARMAMPH)

Factories and c-units now allow you to press q,w,e,r,f, and v for each build menu button. Q would be the build position 0 (top left), w for 1 (top right), e for 2 (middle left), r is for 3 (middle right), f is for 4 (bottom left), and v is for 5 (bottom right).
(Kudos to BSR for the key choices.)

Nuke/antinuke silos now use the "Q" key for queing up nukes, because it is the first (and only) picture on the menu.
The Krogoth Gantry now uses the "Q" key for queing up Krogoths, because it is the first (and only) picture on the menu. (The now-missing 5 other build pictures/blanks on the 1st page can still be accessed via the shortcut keys if 3rd party units are installed that are built on the 1st page.)

File Changes in GAMEDATA dir (in REV31.GP3):
-------------------------------------------
Help.TDF is the help file viewed from inside the game. Page 3's last line should tell if TA Bugfix is installed or not and what version TA Bugfix is installed. I changed it from v1.5 to v1.6.

Also changed in the SIDEDATA.TDF file is the thickness of the metal and energy bars displayed at the top of the screen. This will make it easier to spot at a glance whether you are out of resources or not. Thanks to Dark Rain for this change!

AI fixes:
--------
Map OTA               Did use    Now uses
-------               -------    --------
Assault on Suburbia   Hover      HoverWin
East Indeez           SeaBattle  SeaWind
Eastside Westside     Urban      UrbanWin
Flooded Glaciers      SeaBattle  UrbanWin
Higher Ground        *AirBattle  Wind
Ice Scream            Hover      HoverWin
John's Pass           Hover      HoverWin
Lake Shore            Default    UrbanWin
Long Lakes**          Default    UrbanWin
Pillopeens            SeaBattle  SeaWind
Sail Away             SeaBattle  SeaWind
Slate Gordon          AirBattle  Default
Temblorian Mist      *AirBattle  Wind
The Barrier Reef      SeaBattle  SeaWind
Trout Farm            Default    UrbanWin
*NOTE: AirBattle is now strictly aircraft-only maps.
**NOTE: Stand-alone map by Cavedog, not found in TA, TA:CC, or TA:BT

Map Changes:
-----------
The CHANGE MAP selection screen has been made much larger -- now it will be easier to examine a map's minimap before selecting it. This required a GUI change for VIEWMAP.GUI and SELMAP.GUI, and a bitmap change for DSelectmap2.pcx and Dviewmap.pcx. Thanks to Dark Rain for this change!

Fix Krogoth Campaign... it wasn't very challenging in TABF v1.4. :) <-- DONE!

MORE Minor editing done on some mission map OTA files to improve the ai. <-- DONE!

Moon Quartet has its starting locations moved slightly to offer more equal starts. The poorer bottom center position is now player #4's starting location instead of player #2's -- however, it has been shifted to the right about 1,000 pixels so it's almost on top of a good metal spot. Having to walk a whole screenlength just to get to the nearest metal spot was very unfair. Now, it's not the case.

Slate Gordon's start locations have been moved around -- player #1 now starts on the mainland instead of the island. The only start on the island now is player #7. Odd player numbers start on the left side of the mountain ridge on the map, even player numbers start on the right. Although maybe still not a purely fair match-up now for metal spots per player, it is FAR fairer than having 1 player start out on the small island while the other started out on the mainland.

Lava Run's start locations have been moved around -- in 1 vs 1 or 2 vs 2 (left versis right), players start at or near opposite ends of the map. No more early wins thanks to radar-targetting missiles or guardians! (This change may bother some people as the map wasn't technically 'broken' -- which Moon Quartet and Slate Gordon practically are -- but the original starting setup really limited gameplay.)

Map Features Changes:
--------------------
AcidMetal03, the largest metal deposits on Acid Maps such as Gasplant Plain have been increased in size from a 3x3 footprint to a 3x4 footprint. They are now taller than they are wide. This was done to more accurately reflect their graphical appearance which implied a bigger metal spot than the game treated them as. It now means that 2 metal extractors have to be built one above the other to effectively recover all the metal (yielding +1.4m/sec from each of the 2 mexs, or +2m/sec from 1 and +0.8m/s from the other) from each such metal spot. Also, a moho extractor built on these metal spots will now make about +8.4m/sec instead of +6.2m/sec like originally.

DryMetal03, the largest metal deposits (the streaked lower-level metal spots) on Desert maps such as Painted Desert and Desert Triad have been increased in size from a 3x3 footprint to a 4x3 footprint. They are now wider than they are tall. It now means that 2 metal extractors have to be built side-by-side to effectively recover all the metal (yielding +1.4m/sec from each of the 2 mexs) from each such metal spot.

SlateMetal6, the long, narrow metal deposits on Slate (air/clouds) maps have been increased in size from a 6x3 footprint to a 7x3 footprint. It is now longer. (from left to right)

SlateMetal10, the y-shaped metal deposits on Slate (air/clouds) maps have been increased in size from a 3x3 footprint to a 4x3 footprint. It is now wider. (from left to right)

WaterAquaOre2, the medium underwater metal deposits found on waterworlds have been increased in size from a 3x3 footprint to a 4x3 footprint. It is now wider. (from left to right)

WaterAquaOre3, the medium underwater metal deposits found on waterworlds have been increased in size from a 3x3 footprint to a 5x3 footprint. It is now wider. (from left to right)

Various Unit Changes:
--------------------
I added y to the yardmaps of all factories that appeared to have empty space in their footprints. This will help especially well with Core factories, so slightly more c-units can guard the factories.

Pop-up turrets scripts are fixed.
The Arm Annihilator and Core Doomsday Machine SHOULD work correctly now. (But if they don't, PLEASE email me about how they messed up. :)

Construction kbots and advanced kbots now turn their turrets while opening to begin nanolathing. Previously they opened their nanolather THEN turned their turrets. This minor change saves as much as 1/2 second in start-up times.

I'm trying some counter-intuitive bad-targetting lines to help decrease the AA-ignoring-aircraft bug. Kudos goes to Brother Alpha for the idea!

The Core metal extractor and Core Moho mine are now slightly tougher when they're turned off. (Unlike the Arm equivalents, they turn themselves inside-out when on! Considering they cannot make metal while off and will only help modestly for surviving while under fire, it is mostly a for-realism change.)

Likewise, the Core bob-up naval series metal maker is slightly tougher while submerged. (This is to counteract the fact that ALL surface units can see and target them even when they're underwater.)

MANY COB scripts have been simplified slightly to reduce lag.

Arm's Advanced Construction Sub now has 100 Energy and 100 Metal storage, just like Core's Advanced Construction Sub -- and like all other advanced c-units.

The Core Advanced Vehicle Plant's build platform no longer spins while building units. This is to compensate for it having only 1 exit, unlike Arm's Advanced Vehicle Plant.

The Core Gimp now uses the same movement class (MovementClass=TANKDS2;) as the Core Commander. Previously, it was set to use the TANKHOVER3 movement class -- even though it is defined as a 2x2 footprint unit (in its FBI and corpse file) and it's NOT a hovercraft!

Unit GAF Changes:
----------------
The Arm FARK's gadget.gaf is no longer messed up!
The Arm Merl Hover (ARMMH) no longer has a messed-up GAF file either.

Unit Name Changes:
-----------------
The Arm Millenium has been renamed "Millennium". (See dictionary for correct spelling of the word. :p)

Arm Fibber Sub Changes:
----------------------
The Arm Fibber in OTA is one unfair unit because of the way sonar jamming works. Sonar jamming gives the equivalent to underwater cloaking on ALL units within the jamming radius, and in the case of the Fibber this costs NO energy! (Even mincloakdistance=100; does not negate this cloaking-like effect.)

Now, if the Fibber somehow takes damage, its sonar jamming effect is temporarily disabled for up to 10 seconds. This is no different than a radar that turns off briefly when hit, and should help make anti-Fibber wars winnable, with difficulty.

Fibbers now have a fake weapon that acts as a fake torpedo. It does 0 damage, but has a large area of effect -- almost as big as a crawling bomb explosion. Fire orders have been disabled, so the Fibber is stuck permanently in Fire at Will mode. If most any unit gets within 200 pixels of the Fibber, the Fibber will fire on it. And when the Fibber fires, it turns off its sonar jamming for up to 10 seconds. Also, if something like an enemy destroyer or sub is hit, they WILL return fire! With the fibber weapon's large area of effect, it is possible that more than 1 enemy unit will be affected by it -- so return fire may be significant. Net result: Fibbers now turn off their sonar jamming IF an enemy unit gets within 200 pixels of them (and presumeably has them in their LOS.)

However, because the Fibber's OWN LOS is less than 200 pixels, when the Fibber travels alone it has to get closer than 200 pixels to an enemy unit before it will open fire with its fake torpedo. Also, the Fibber will NOT fire at unarmed buildings unless +SHOOTALL has been enabled. Fibbers probably won't fire at aircraft or hovercraft in any case, since regular sub torpedoes and destroyer depth-charges also won't shoot at aircraft and hovercraft. This means overflying aircraft and hovercraft WON'T unmask your underwater base. But they still will see unidentifed dots on radar within the aircraft's LOS as it passes.

Keep Fibbers at the back of the pack and they'll work just fine -- use them as spotters against anti-submarine defenses and you'll lose them. Which is fair and makes sense, I think.

Krogoth and Krogoth Gantry changes:
----------------------------------
The Krogoth can now be selected to built in the Krogoth Gantry using the "Q" key when the Gantry is selected and the Krogoth is showing on the menu. The buildpic for the Krogoth is now a huge picture on the the first build menu page. (Page #2 as a keyboard shortcut -- the actual 1st page is the fire orders page.) The now-missing 5 other unit build buttons are hidden in the title and description bars next to the Krogoth build picture and are still accessable through keyboard shortcuts.

The Core Krogoth Gantry will consistantly stay open between each Krogoth it builds in sequence. It also builds at 2x its original OTA rate. This means that without assistance and without nanostall a Krogoth will take about 16.5 minutes to complete. Each extra c-unit will NOT decrease the Krogoth buildtime as much as they did in OTA.

Landmine Changes:
----------------
Landmines now have an On/Off switch. When "ON", they are "primed for destruction" -- it sets their damage resistance to only 1/10th normal, making them very easy to destroy -- not that they were very tough to begin with. The main purpose of this is to allow landmines out front to be set to hold fire and ON while the ones at the rear are set to fire at will and OFF. That means they won't detonate till enemy units pass near the landmines at the rear -- which will detonate all the landmines turned on, causing much more destruction with minimal micromanagement. (The idea came from UberHack, but since it decreases micromanagement so much I decided it made sense as a new control option to add it to TA Bugfix.)

(See Landmine Weapons Changes below for more Landmine Changes)

Mobile Radars and Radar Jammers changes:
---------------------------------------
Mobile radar tanks (ARMSEER and CORVRAD) didn't stop spinning their radars when turned off -- now fixed!

The mobile radars and radar jammers now use fake merl rockets instead of fake lasers to trick them into attacking like other units. This will make them more likely to hide behind covering terrain.

Weapon #1 of the mobile flakkers now a fake Missile Frigate Rocket -- previously it was a fake Annihilator Laser.

Corpse Changes:
--------------
Better dead Merl picture added. Thanks to the UH crew for this one!
Better dead Core MMM picture added. Thanks to the UH crew for this one!

Weapons changes:
---------------
I removed the Commander Blast weapon's special damage to other commanders, there's no need for it.

Immolator (CORPLAS) weapon now does 20 default damage instead of 10. It will now be able to kill a Jeffy with 4-6 direct hits instead of 8-12 direct hits. :) It also does 80 damage per shot versis Brawlers, (the same as it does to Peewees) since they ALSO carry EMG weapons. Still against anything BUT Flashes, Peewees, and Warriors, Immolators are far less effective than the less expensive LLT.

EMGs now use a 3do file instead of a bitmap hack.

ALL Blue Lasers of Death (BLoD) now have a 16 pixel Area of Effect instead of their previous 8 pixel area. This is to reduce the chance of them passing completely through a target without doing any damage because of their high shot velocity (now at 1,000 -- see slow light for more details.)

Edgeeffectiveness=1; added to all point-damage weapons (like gauss and lasers) and torpedoes and depth charges to ensure that hits with these weapons do damage.

Landmine Weapons Changes:
------------------------
OTA landmines have MUCH smaller explosions than many other units, so landmines explosion weapons have been replaced with existing explosions. My justification for this change is based on 2 possible assumptions of TA explosions by Cavedog landmine designers:
1.That explosion radius is the Area of Effect value in pixels found in the weapons files.
2.That the damage a landmine will inflict to units in its explosion is the value given in the landmine's explosion weapon file.

Both 2 assumptions are incorrect.
1.An explosion's area-of-effect is the diameter in pixels found in the weapons files. This reduces the area to 1/4.
2.The damage a weapon does to a unit also depends on edge effectiveness, which can reduce the max damage value to a tiny fraction. By default, edge effectiveness is 0% -- meaning something at the very edge of such an explosion would take 0 damage. Landmines have a low 5-15% edge effectiveness. Damage falls off linearly with distance from center.

All of the original landmine explosions, except for the nuclear mines, were 250 pixels or less in diameter. Even the nuke mines only had 350 (Arm) and 400 pixel diameters, while a nuke missile has a 512 pixel diameter. Plus they did 1k damage less (1.2k less for Core) and had reduced edge effectiveness (15% vs 25%) to make their smaller explosions far less explosive than a nuke missile.

For the non-nuke landmines, this means that the EFFECTIVE destructive area (capable of killing most level 1 units) for the original landmines is less than 100 pixels in diameter.

Landmines were probably only tested at 640x480 with permanent LOS and not seriously compaired to other weapons in TA.

The most devestating landmine after the nuclear landmines does 200 to 2,000 damage. A single landmine may not kill a Flash (625 armor) and definitely won't kill a Bulldog (2,102 armor.) Some of the lesser landmines are lucky to kill a Flea (75 armor.)

By using existing weapons and explosions in the game, I was less likely to use anything too powerful for landmine explosions. For starters, the nuclear landmines now use the EXACT same explosions as the nuclear missiles. The others are less deadly than that. Core's 2nd deadliest and expensive landmine after the nuclear mine uses the crawling bomb explosion which does less than half the damage of a nuclear missile explosion. (2.5k damage vs 5.5k damage) ARMMINE5 (Precision -- Arm's 5th landmine) has a deadlier explosion than the crawling bomb, (4.5k damage vs 2.5k damage) but concentrated into only 40% the area -- so it partially balances out.

All the other landmines use explosions equal or less in area of effect than the crawling bomb explosion -- which covers about the same area as a nuclear missile explosion.  The real crawling bombs cost far less than the landmine which uses the same explosion. And the cloaking costs for landmines is the same as the originals.

  Weapon                               Area of    Cost          Reload
ID   Name                 Range Damage Effect Metal Energy Path  Time
----------------------------------------------------------------------
Landmine	Metal Cost	Energy Cost	Cloaking Cost
ARMMINE1	32 M		1017 E	-7 E
200  SMALL_BUILDING         480   900     205    -     -     B   3.6
184  ARMMINE1(Tiny)         480   400(30) 160    -     -     B   3.6  10% edge effect

ARMMINE2	61 M		1909 E	-14 E
215  CRAWL_BLASTSML         480  1200     275    -     -     B   3.6
185  ARMMINE2(Area)         480   600(30) 200    -     -     B   3.6   5% edge effect

ARMMINE3	86 M		2688 E	-19 E
63   CORMINE5(M-515)        480  2000(30) 250    -     -     B   3.6  10% edge effect
186  ARMMINE3(Focused)      480  1300(30) 130    -     -     B   3.6  10% edge effect

ARMMINE4	137 M		4294 E	-31 E
27   ATOMIC_BLAST           480  2000     516    -     -     B   3.6
187  ARMMINE4(HE Area)      480  1500(30) 180    -     -     B   3.6   5% edge effect

ARMMINE5	132 M		4135 E	-30 E
189  ARMMINE6(Nuclear)      480  4500     350    -     -     B   3.6  15% edge effect
188  ARMMINE5(Precision)    480  2000(30) 130    -     -     B   3.6  10% edge effect

ARMMINE6	498 M		22272 E	-79 E
122  NUCLEAR_MISSILE      32000 5500(2900)512 2000 180000    L 180    25% edge effect
189  ARMMINE6(Nuclear)      480  4500     350    -     -     B   3.6  15% edge effect

CORMINE1	20 M		532 E		-5 E
185  ARMMINE2(Area)         480   600(30) 200    -     -     B   3.6   5% edge effect
33   CORMINE1(M-104)        480   200(45) 175    -     -     B   3.6  10% edge effect

CORMINE2	48 M		1156 E	-11 E
28   ATOMIC_BLASTSML        480  1000     260    -     -     B   3.6
36   CORMINE2(M-209)        480   400(45) 190    -     -     B   3.6   5% edge effect

CORMINE3	73 M		1704 E	-15 E
201  MEDIUM_BUILDING        480  1400     325    -     -     B   3.6
37   CORMINE3(M-303)        480   700(45) 160    -     -     B   3.6  10% edge effect

CORMINE4	104 M		2342 E	-21 E
202  LARGE_BUILDING         480  1800     400    -     -     B   3.6
61   CORMINE4(M-420)        480  1100(45) 140    -     -     B   3.6   5% edge effect

CORMINE5	264 M		7607 E	-70 E
214  CRAWL_BLAST            480  2500     556    -     -     B   3.6
63   CORMINE5(M-515)        480  2000(30) 250    -     -     B   3.6  10% edge effect

CORMINE6	595 M		26172 E	-123 E
122  NUCLEAR_MISSILE      32000 5500(2900)512 2000 180000    L 180    25% edge effect
74   CORMINE6(M-610)        480  4300     400    -     -     B   3.6  15% edge effect

Still-used landmine explosion weapons:
185  ARMMINE2(Area)         480   600(30) 200    -     -     B   3.6   5% edge effect
189  ARMMINE6(Nuclear)      480  4500     350    -     -     B   3.6  15% edge effect
63   CORMINE5(M-515)        480  2000(30) 250    -     -     B   3.6  10% edge effect

Core Pyro Weapon Changes:
------------------------
This weapon can now pass through more than 1 unit and continue on to max range, doing damage to anything in its path.

Torpedo Weapon changes:
----------------------
Edgeeffectiveness=1; added to all point-damage weapons (like gauss and lasers) and torpedoes and depth charges to ensure that hits with these weapons do damage.

Weapons Removed:
---------------
  Weapon                               Area of    Cost          Reload
ID   Name                 Range Damage Effect Metal Energy Path  Time
----------------------------------------------------------------------
33   CORMINE1(M-104)        480   200(45) 175    -     -     B   3.6  10% edge effect
36   CORMINE2(M-209)        480   400(45) 190    -     -     B   3.6   5% edge effect
37   CORMINE3(M-303)        480   700(45) 160    -     -     B   3.6  10% edge effect
61   CORMINE4(M-420)        480  1100(45) 140    -     -     B   3.6   5% edge effect
74   CORMINE6(M-610)        480  4300     400    -     -     B   3.6  15% edge effect
184  ARMMINE1(Tiny)         480   400(30) 160    -     -     B   3.6  10% edge effect
186  ARMMINE3(Focused)      480  1300(30) 130    -     -     B   3.6  10% edge effect
187  ARMMINE4(HE Area)      480  1500(30) 180    -     -     B   3.6   5% edge effect
188  ARMMINE5(Precision)    480  2000(30) 130    -     -     B   3.6  10% edge effect

The landmines explosion weapons have been replaced with existing explosions. All of them have higher damage amounts and larger areas of effect than the originals.

Weapons Added Back:
------------------
  Weapon                               Area of    Cost          Reload
ID   Name                 Range Damage Effect Metal Energy Path  Time
----------------------------------------------------------------------
148  ARMSCRAM_WEAPON        200   0       420    -     -     L   2		  -- see NOTE #6

NOTE #6: (Arm Fibber fake torpedo addition)
This adds a NEW weapon (well, actually a previously removed weapon is added back...) that allows the Arm Fibber to tag along with attack forces and also causes it to stop sonar jamming if it gets too close to enemy units. The weapon id# was changed from #158 to #148 because that frees up more weapon id slots in a row. (leaving #'s 157-159 open)
See Arm Fibber Sub Changes for further details...

Final Notes:
-----------
Unitscripting is still very hard for me to do, but I'm learning/figuring out what works little by little.

There remains unit scripting animation problems on the Arm maverick and both sides C-ships. These units still WORK in the game, they just sometimes animate incorrectly. I am looking into a fix for them, but the problem SEEMS unresolvable.

Practically every 2-weapon unit has been converted back to their original designs (minus the 'fancy' 2nd attack button via the d-key.) I simply could NOT get them to fire their 2nd weapons reliably otherwise. The good news, in a way, is once I redo much of TA Bugfix it will be more like OTA than the last versions were. But it'll mean getting the 2nd weapon on a unit to fire at a particular target in a group will be difficult or impossible -- same as it was in OTA.
