Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

fix(gameengine): charge kills missiles without EA's explosion cloud

Olcay Seygan99d6e47b5eaa
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d23e9af23..731e5935c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -58,7 +58,7 @@ found and fixed — EA's own, not port damage.**
## Flares and hard-kill charges instead of lasers
-- The Air Force General's King Raptor, Aurora, Stealth Fighter, B-3 and Chinooks carried a laser that burned every missile out of the air as it came near. They drop flares now. A Stinger fired at a King Raptor sees the flares leave its tail, turns onto one and burns out behind the plane. The flares come fitted from the factory with no upgrade to buy: three volleys, then six seconds to reload. Two King Raptors making seven passes over a Stinger Site took 180 and 150 damage of 480 in the two measured runs, where the lasers let through 150 and 270.
+- The Air Force General's King Raptor, Aurora, Stealth Fighter, B-3 and Chinooks carried a laser that burned every missile out of the air as it came near. They drop flares now. A Stinger fired at a King Raptor sees the flares leave its tail, turns onto one and burns out behind the plane. The flares come fitted from the factory with no upgrade to buy: three volleys, then six seconds to reload. Two King Raptors making seven passes over a Stinger Site took between 60 and 180 damage of 480 over the measured runs, where the lasers let through 150 and 270.
- Flares cannot do everything the laser did. A Chinook sitting on the ground has no missile defence at all, an Aurora on its supersonic run is too fast to throw them, and no flare fools a SCUD or a Tomahawk, which the laser used to shoot down near these aircraft. Bought anyway, Countermeasures still gives the Air Force General's planes its armor.
- The Paladin and the Avenger fire a small charge from the hull that bursts an incoming missile short of the tank. You see a puff and hear a bang at the hull, and the missile goes up in a blast. A Paladin holds two charges and reloads in four seconds, and each of the Avenger's two launchers holds four and reloads in three. Under five Tank Hunters an Avenger bursts 8 missiles where the laser stopped 14 or 16, but it dies on the same frame, because fifteen hits kill it either way. A Paladin under four Rocket Buggies stops 4 rockets of 36, as it did before.
- The Paladin's laser also hit infantry that came within 65 of the tank. A second launcher with its own two charges does that now, so shooting at a soldier never leaves the tank without a charge for a missile. The blast throws a soldier where the laser burned him.
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index 2fe479840..6469b0091 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -831,7 +831,7 @@ End
; The aircraft now drop flares instead. They are fitted from birth (StartsActive, no Countermeasures
; upgrade needed), and a Stinger that rolls the evasion turns onto the newest flare and burns out
; harmlessly. EA's upgrade decoys 30%; at 90%, with three volleys of four and a six second reload,
-; the King Raptors took 180 and 150 damage, about what the lasers let through. Flares only work in
+; the King Raptors took 60 to 180 damage, about what the lasers let through. Flares only work in
; the air, so a Chinook sitting on its pad has no missile defence at all; an Aurora on its supersonic
; run gets none (Weapon.cpp skips a supersonic victim); and they do nothing against a SCUD or a
; Tomahawk, which the lasers used to shoot down near these aircraft. A Countermeasures upgrade bought
@@ -975,10 +975,20 @@ End
; short of the tank: a puff and a bang at the hull, a blast at the missile. The weapons keep their
; reach and the laser's damage, which a missile cannot survive, but they come in clips now. The
; point defense module counts the clip itself (PointDefenseLaserUpdate), since it fires a fresh
-; copy of its weapon every shot. The Paladin's laser also burned down infantry that came within 65;
-; that is a second launcher on the same charge with its own clip, so a Tank Hunter's missile and the
-; Tank Hunter himself no longer share one gun. DeathType EXPLODED throws the infantry instead of
-; burning it.
+; copy of its weapon every shot.
+;
+; A missile picks its death by DeathType, the same three ways in every missile EA made: LASERED
+; plays a laser disintegration, DETONATED plays nothing (it is how a missile that reached its target
+; leaves the world), and anything else plays a full Explosion with ExplosionSmoke, a grey cloud the
+; size of a tank that stacked into a column under repeated intercepts. The charge kills with
+; DETONATED, so the burst it plays itself is all there is to see.
+;
+; The Paladin's laser also burned down infantry that came within 65. A second launcher with its own
+; clip does that, so a Tank Hunter's missile and the Tank Hunter himself no longer share one gun, and
+; it kills with EXPLODED, which throws a soldier where the laser burned him. That needs a second
+; weapon and a MULTIFILE file cannot add one, so it is AirF_RaptorPointDefenseLaser, which nothing
+; fires any more since the King Raptor and the Boss Raptor took flares: every field that matters is
+; set here, to the Paladin charge's numbers.
;
; The Paladin's laser had already been slowed to one shot in two seconds, because at EA's one a
; second it shot down every Patriot missile: Paladins killed a Patriot four times of four for 0.28
@@ -991,6 +1001,20 @@ Weapon PaladinPointDefenseLaser
DelayBetweenShots = 250 ; EA: 1000
ClipSize = 2 ; EA: 0
ClipReloadTime = 4000
+ DeathType = DETONATED
+ LaserName =
+ FireFX = FX_ActiveProtectionLaunch
+ ProjectileDetonationFX = FX_ActiveProtectionBlast
+End
+
+Weapon AirF_RaptorPointDefenseLaser ; the Paladin's anti-personnel charge, see above
+ PrimaryDamage = 100.0
+ PrimaryDamageRadius = 0.0
+ AttackRange = 65.0
+ DamageType = LASER
+ DelayBetweenShots = 250
+ ClipSize = 2
+ ClipReloadTime = 4000
DeathType = EXPLODED
LaserName =
FireFX = FX_ActiveProtectionLaunch
@@ -1001,7 +1025,7 @@ Weapon AvengerPointDefenseLaserOne
DelayBetweenShots = 250 ; EA: 500
ClipSize = 4 ; EA: 0
ClipReloadTime = 3000
- DeathType = EXPLODED
+ DeathType = DETONATED
LaserName =
FireFX = FX_ActiveProtectionLaunch
ProjectileDetonationFX = FX_ActiveProtectionBlast
@@ -1011,7 +1035,7 @@ Weapon AvengerPointDefenseLaserTwo
DelayBetweenShots = 250 ; EA: 500
ClipSize = 4 ; EA: 0
ClipReloadTime = 3000
- DeathType = EXPLODED
+ DeathType = DETONATED
LaserName =
FireFX = FX_ActiveProtectionLaunch
ProjectileDetonationFX = FX_ActiveProtectionBlast
@@ -1029,7 +1053,7 @@ Object AmericaTankPaladin
End
AddModule
Behavior = PointDefenseLaserUpdate ModuleTag_07_Infantry
- WeaponTemplate = PaladinPointDefenseLaser
+ WeaponTemplate = AirF_RaptorPointDefenseLaser
PrimaryTargetTypes = INFANTRY
ScanRate = 500
ScanRange = 120.0
@@ -1050,7 +1074,7 @@ Object Boss_TankPaladin
End
AddModule
Behavior = PointDefenseLaserUpdate ModuleTag_07_Infantry
- WeaponTemplate = PaladinPointDefenseLaser
+ WeaponTemplate = AirF_RaptorPointDefenseLaser
PrimaryTargetTypes = INFANTRY
ScanRate = 500
ScanRange = 120.0
@@ -1071,7 +1095,7 @@ Object Lazr_AmericaTankPaladin
End
AddModule
Behavior = PointDefenseLaserUpdate ModuleTag_07_Infantry
- WeaponTemplate = PaladinPointDefenseLaser
+ WeaponTemplate = AirF_RaptorPointDefenseLaser
PrimaryTargetTypes = INFANTRY
ScanRate = 500
ScanRange = 120.0
@@ -1092,7 +1116,7 @@ Object SupW_AmericaTankPaladin
End
AddModule
Behavior = PointDefenseLaserUpdate ModuleTag_07_Infantry
- WeaponTemplate = PaladinPointDefenseLaser
+ WeaponTemplate = AirF_RaptorPointDefenseLaser
PrimaryTargetTypes = INFANTRY
ScanRate = 500
ScanRange = 120.0
diff --git a/GeneralsMD/Code/Data/Scenarios/missiledefence.txt b/GeneralsMD/Code/Data/Scenarios/missiledefence.txt
index ef2515094..408205541 100644
--- a/GeneralsMD/Code/Data/Scenarios/missiledefence.txt
+++ b/GeneralsMD/Code/Data/Scenarios/missiledefence.txt
@@ -22,6 +22,12 @@
# Paladin and Terrorists: one Terrorist gets through and kills it, frame 378 and 397, the other
# five left on 540 and 398 health of 600. After: frame 397 and 398, 380 and 422.
#
+# The charge then went from DeathType EXPLODED to DETONATED for missiles, because EXPLODED made every
+# missile it burst play EA's full Explosion and grey cloud. A missile's death draws from the logic
+# random stream, so the runs moved, read from the tallies and the KILLXP lines: the Raptors took 60
+# and 150, the Avenger died on 261 and 261, the Paladin under buggies on 381 and 381, the Paladin
+# under Terrorists on 397 and 450, and its infantry charge killed a Terrorist on frame 385 of seed 7.
+#
# Worth filming: flares come off a Raptor and Stingers turn onto them around 2620,3005 at about 95
# high on frames 250 to 256 (seed 7); the Avenger at 2195,3906 bursts Tank Hunter missiles about 90
# north of it on frames 150 to 190, and the Paladin at 3300,3800 a buggy rocket 60 north on 146.