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(data): tank shell tracer rides the shell, EA's tank muzzle flare

Olcay Seyganf9108cc0f7af
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3f8bfd897..8224c9ea0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1373,7 +1373,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same
- An explosion lights everything around it, smoothly. On the default renderer the light of a blast reaches every tank, soldier, building and patch of ground it can see, fading out with distance, where the ground used to brighten in blocky squares and a model took only four lights at once, so in a big fight half the tanks next to a burning wreck stayed dark. The 32 blasts nearest the camera light at the same time, and a wall with its back to the fire stays in shadow. The light brightens what it falls on by three quarters at most: a nuke's took the ground to white within a few frames until it was held there.
- A bright cloud no longer shows what is behind it as a line drawing. Inside a nuke's white cloud, or a falling War Factory's fireball, every tree and wreck under it used to come out as a thin grey outline, and the picture's sharpening ringed each dark piece in white. Both stop where the frame is bright.
- Smoke and fire no longer end on a straight line where they meet the ground or a building. A puff that sinks into a hillside or drifts against a wall thins out over its last few metres, softly enough that a nuke's haze and a Scud's grey smoke no longer come out as stacked, stair-stepped terraces, and a toxin cloud lying low over the ground keeps its body instead of breaking into hard-edged green islands. A China mine field blinks where you can see it again: its lights hang just off the ground, and the fade had eaten all but a thirtieth of their bright middle. No effect fades over more than its own size now, so a small spark close to the ground keeps its light. This is the default renderer; Classic and the old renderer keep the hard edge they had in 2003.
-- Gunfire shows at the zoom you play at. A rifle's tracer was a third of a unit wide, about one pixel from the default camera, and a bullet hit nothing you could see. Tracers from rifles, Gattlings, Humvees, Technicals and Quad Cannons are now twice as wide and half again as long, the muzzle flash is half as big again, and every hit kicks up sparks and a puff of dirt where it lands. Tank guns fire a hot streak that flies with the shell, a Crusader's, Battlemaster's, Scorpion's, Paladin's or Overlord's muzzle flame and flash are about half as big again, and a shell landing throws dirt and sparks around its blast. The colours are the ones the game always used, and no weapon does anything different.
+- Gunfire shows at the zoom you play at. A rifle's tracer was a third of a unit wide, about one pixel from the default camera, and a bullet hit nothing you could see. Tracers from rifles, Gattlings, Humvees, Technicals and Quad Cannons are now twice as wide and half again as long, the muzzle flash is half as big again, and every hit kicks up sparks and a puff of dirt where it lands. A tank shell burns a short hot streak behind it all the way to the target, where it used to be a grey sliver you could not pick out between the flash and the blast. A Crusader's, Battlemaster's, Scorpion's, Paladin's or Overlord's muzzle flame and smoke are about half as big again, and a shell landing throws dirt and sparks around its blast. The colours are the ones the game always used, and no weapon does anything different.
- A China mine field has mines in it. EA's field had no model at all, only a white glint blinking on each of its eight spots, so your own minefield looked like a patch of fireflies. Each spot is now a round steel mine pressed into a ring of dug earth, at a random turn, with an arming LED over its fuse that flicks on for a fifth of a second every second and a half, red on standard and cluster mines and a cold blue on EMP mines. You and your allies see them a little see-through, the way you see your own stealthed units. The enemy still sees nothing until he detects the field, and then he sees the same mines. A mine going off under a tank now throws a column of dark earth twice the tank's height, scatters clods round it and leaves a low black smoke and a scorch, with a short jolt of the screen; it used to puff a pale spray of specks that looked like dust kicked up. An EMP mine adds a blue ring across the ground and a crackle of blue sparks. What a mine does is unchanged.
- A base out of power looks out of power. A building short of power, or one a hacker shut down, drains to a cold grey and sags darker, and its windows and lamps go out. Every few seconds it blinks dark for an instant or its lights catch again for a moment, and blue sparks jump on its walls where something shorts. A tank or building hit by an EMP crawls with thin blue arcs for as long as it stays dead, where it used to just turn dark grey.
- Your own stealthed units look cloaked instead of faded. What stands behind a Pathfinder, Colonel Burton or a stealthed GLA unit bends through its body in a slow ripple, under a cold edge you can still read the unit by. When an enemy detector has found him, that edge pulses amber. An enemy stealth unit your detector finds used to turn into a flat orange shape with no paint; now it keeps its own paint, drained of colour, under a burning red-orange outline with scan lines running up it, and all of it flares on every sweep of the detector. This is the default renderer; Classic and the old renderer keep the 2003 look for all of these.
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index f2f15f72c..eb302b64e 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -1519,3 +1519,90 @@ Object Boss_VehicleSupplyTruck
End
End
End
+
+; ---- tank shells glow in flight -------------------------------------------------------------------
+;
+; Looks only, nothing a shell does changes. EA's cannon shell is AVTankShel, a grey sliver about as
+; long as a rifleman's head is wide, and at the default camera a Crusader's shot was invisible
+; between the flash and the blast. Each shell that draws it now carries ReforgedTankShellTracer
+; (ParticleSystemReforged.ini), a short hot streak behind it. "None" is no bone, so the system sits
+; at the shell's origin, the way EA hangs SparksMedium and MissileExhaust on its projectiles. The
+; Inferno, Nuke Cannon, barrage and Bender shells draw the same model and are artillery, so they
+; keep EA's look.
+
+Object GenericTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
+
+Object BattleMasterTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
+
+Object OverlordTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
+
+Object ScorpionTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
+
+Object MarauderTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
+
+Object Nuke_BattleMasterTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
+
+Object Nuke_OverlordTankShell
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Reforged
+ ConditionState = NONE
+ Model = AVTankShel
+ ParticleSysBone = None ReforgedTankShellTracer
+ End
+ End
+ End
+End
diff --git a/GeneralsMD/Code/Data/INI/FXListReforged.ini b/GeneralsMD/Code/Data/INI/FXListReforged.ini
index 41fd21dc0..1e51986eb 100644
--- a/GeneralsMD/Code/Data/INI/FXListReforged.ini
+++ b/GeneralsMD/Code/Data/INI/FXListReforged.ini
@@ -4409,11 +4409,11 @@ FXList WeaponFX_TechnicalGunFire
End
; ----------------------------------------------
-; Tank cannon. EA's "NoTracer" FXLists drew the muzzle and nothing in flight but the shell model,
-; a grey sliver smaller than a rifleman's head. Each one now sends a hot tracer with the shell,
-; at the weapon's own speed (no Speed line: the tracer takes the WeaponSpeed it is fired with),
-; and lights the ground around the muzzle further. The flame, flare and smoke are larger in
-; ParticleSystemReforged.ini.
+; Tank cannon: EA's muzzle FXLists with the ground around the muzzle lit further. The flame and
+; smoke are larger in ParticleSystemReforged.ini, and the shell's glowing trail is the shell's own
+; (ReforgedTankShellTracer, BalanceReforged.ini). A Tracer nugget here flew a straight line from
+; the muzzle while the shell arcs up to ten above the ground, and on film it read as a second shot
+; flying under the first.
FXList WeaponFX_GenericTankGunNoTracer
ViewShake
Type = NORMAL
@@ -4441,12 +4441,6 @@ FXList WeaponFX_GenericTankGunNoTracer
OrientToObject = Yes
CreateAtGroundHeight = Yes
End
- Tracer
- DecayAt = 1
- Length = 14
- Width = 1.2
- Color = R:255 G:210 B:140
- End
End
; ----------------------------------------------
@@ -4472,12 +4466,6 @@ FXList WeaponFX_GenericTankGunNoTracerSmall
Name = TankSmallMuzzleFlare
OrientToObject = Yes
End
- Tracer
- DecayAt = 1
- Length = 12
- Width = 1.0
- Color = R:255 G:210 B:140
- End
End
; ----------------------------------------------
@@ -4508,12 +4496,6 @@ FXList WeaponFX_HeroicGenericTankGunNoTracer
OrientToObject = Yes
CreateAtGroundHeight = Yes
End
- Tracer
- DecayAt = 1
- Length = 14
- Width = 1.2
- Color = R:255 G:90 B:60
- End
End
; ----------------------------------------------
@@ -4539,10 +4521,4 @@ FXList WeaponFX_HeroicGenericTankGunNoTracerSmall
Name = HeroicTankSmallMuzzleFlare
OrientToObject = Yes
End
- Tracer
- DecayAt = 1
- Length = 12
- Width = 1.0
- Color = R:255 G:90 B:60
- End
End
diff --git a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
index 8650a2df1..83d1a220e 100644
--- a/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
+++ b/GeneralsMD/Code/Data/INI/ParticleSystemReforged.ini
@@ -3935,7 +3935,9 @@ End
; and the tank's flame started half a unit across; at the default camera both were a few pixels.
; These are EA's muzzle systems at about one and a half times the size, the machine gun flare held
; one frame longer and the tank flame thrown further with more puffs. Every weapon that names one
-; of them gets it bigger, the Gattling building and the Quad Cannon included.
+; of them gets it bigger, the Gattling building and the Quad Cannon included. The tank's white
+; flare (TankMuzzleFlare) stays EA's: at one and a half times it blew the barrel and the ground in
+; front of it out to a white blob on film.
ParticleSystem GattlingCannonLenzflare
Priority = WEAPON_EXPLOSION
@@ -4073,9 +4075,9 @@ ParticleSystem TankMuzzleFlashFlame
Gravity = 0.00
Lifetime = 25.00 25.00
SystemLifetime = 10
- Size = 1.50 1.50
+ Size = 1.00 1.00
StartSizeRate = 0.00 0.00
- SizeRate = 2.00 3.50
+ SizeRate = 1.50 3.00
SizeRateDamping = 0.93 0.95
Alpha1 = 0.00 0.00 0
Alpha2 = 0.00 0.00 0
@@ -4085,7 +4087,7 @@ ParticleSystem TankMuzzleFlashFlame
Color3 = R:0 G:0 B:0 0
ColorScale = 0.00 0.00
BurstDelay = 99999.00 99999.00
- BurstCount = 14.00 14.00
+ BurstCount = 12.00 12.00
InitialDelay = 0.00 0.00
DriftVelocity = X:0.00 Y:0.00 Z:0.00
VelocityType = ORTHO
@@ -4101,47 +4103,6 @@ ParticleSystem TankMuzzleFlashFlame
IsParticleUpTowardsEmitter = No
End
-ParticleSystem TankMuzzleFlare
- Priority = CRITICAL
- IsOneShot = No
- Shader = ADDITIVE
- Type = PARTICLE
- ParticleName = EXLnzFlar2.tga
- AngleZ = 0.00 0.00
- AngularRateZ = 0.00 0.00
- AngularDamping = 1.00 1.00
- VelocityDamping = 0.70 0.70
- Gravity = 0.00
- Lifetime = 25.00 25.00
- SystemLifetime = 1
- Size = 56.00 56.00
- StartSizeRate = 0.00 0.00
- SizeRate = 20.00 20.00
- SizeRateDamping = 0.70 0.70
- Alpha1 = 0.00 0.00 0
- Alpha2 = 0.00 0.00 0
- Alpha3 = 0.00 0.00 0
- Color1 = R:0 G:0 B:0 0
- Color2 = R:253 G:253 B:253 5
- Color3 = R:0 G:0 B:0 25
- ColorScale = 0.00 0.00
- BurstDelay = 1.00 1.00
- BurstCount = 1.00 1.00
- InitialDelay = 0.00 0.00
- DriftVelocity = X:0.00 Y:0.00 Z:0.00
- VelocityType = ORTHO
- VelOrthoX = 4.00 4.00
- VelOrthoY = 0.00 0.00
- VelOrthoZ = 0.00 0.00
- VolumeType = CYLINDER
- VolCylinderRadius = 0.00
- VolCylinderLength = 0.00
- IsHollow = No
- IsGroundAligned = No
- IsEmitAboveGroundOnly = No
- IsParticleUpTowardsEmitter = No
-End
-
ParticleSystem TankMuzzleFlashSmoke
Priority = WEAPON_EXPLOSION
IsOneShot = No
@@ -4224,47 +4185,6 @@ ParticleSystem TankSmallMuzzleFlashFlame
IsParticleUpTowardsEmitter = No
End
-ParticleSystem TankSmallMuzzleFlare
- Priority = CRITICAL
- IsOneShot = No
- Shader = ADDITIVE
- Type = PARTICLE
- ParticleName = EXLnzFlar2.tga
- AngleZ = 0.00 0.00
- AngularRateZ = 0.00 0.00
- AngularDamping = 1.00 1.00
- VelocityDamping = 0.70 0.70
- Gravity = 0.00
- Lifetime = 25.00 25.00
- SystemLifetime = 1
- Size = 32.00 32.00
- StartSizeRate = 0.00 0.00
- SizeRate = 12.00 12.00
- SizeRateDamping = 0.70 0.70
- Alpha1 = 0.00 0.00 0
- Alpha2 = 0.00 0.00 0
- Alpha3 = 0.00 0.00 0
- Color1 = R:0 G:0 B:0 0
- Color2 = R:206 G:206 B:206 5
- Color3 = R:0 G:0 B:0 25
- ColorScale = 0.00 0.00
- BurstDelay = 1.00 1.00
- BurstCount = 1.00 1.00
- InitialDelay = 0.00 0.00
- DriftVelocity = X:0.00 Y:0.00 Z:0.00
- VelocityType = ORTHO
- VelOrthoX = 2.00 2.00
- VelOrthoY = 0.00 0.00
- VelOrthoZ = 0.00 0.00
- VolumeType = CYLINDER
- VolCylinderRadius = 0.00
- VolCylinderLength = 0.00
- IsHollow = No
- IsGroundAligned = No
- IsEmitAboveGroundOnly = No
- IsParticleUpTowardsEmitter = No
-End
-
ParticleSystem TankSmallMuzzleFlashSmoke
Priority = WEAPON_EXPLOSION
IsOneShot = No
@@ -4387,3 +4307,49 @@ ParticleSystem ReforgedBulletImpactDust
IsEmitAboveGroundOnly = No
IsParticleUpTowardsEmitter = No
End
+
+; A tank shell's tracer, hung on the shell itself (BalanceReforged.ini gives every cannon shell
+; that draws EA's AVTankShel model this system). A shell covers about 13 a frame, so each frame
+; lays four glowing beads along the stretch behind it, and they burn out in five frames: a short
+; hot streak that rides the shell's own arc.
+
+ParticleSystem ReforgedTankShellTracer
+ Priority = WEAPON_TRAIL
+ IsOneShot = No
+ Shader = ADDITIVE
+ Type = PARTICLE
+ ParticleName = EXLnzFlar2.tga
+ AngleZ = 0.00 0.00
+ AngularRateZ = 0.00 0.00
+ AngularDamping = 1.00 1.00
+ VelocityDamping = 1.00 1.00
+ Gravity = 0.00
+ Lifetime = 5.00 5.00
+ SystemLifetime = 0
+ Size = 3.00 3.00
+ StartSizeRate = 0.00 0.00
+ SizeRate = -0.30 -0.30
+ SizeRateDamping = 1.00 1.00
+ Alpha1 = 0.00 0.00 0
+ Alpha2 = 0.00 0.00 0
+ Alpha3 = 0.00 0.00 0
+ Color1 = R:255 G:220 B:150 0
+ Color2 = R:255 G:140 B:60 2
+ Color3 = R:0 G:0 B:0 5
+ ColorScale = 0.00 0.00
+ BurstDelay = 0.00 0.00
+ BurstCount = 4.00 4.00
+ InitialDelay = 0.00 0.00
+ DriftVelocity = X:0.00 Y:0.00 Z:0.00
+ VelocityType = ORTHO
+ VelOrthoX = 0.00 0.00
+ VelOrthoY = 0.00 0.00
+ VelOrthoZ = 0.00 0.00
+ VolumeType = LINE
+ VolLineStart = X:0.00 Y:0.00 Z:0.00
+ VolLineEnd = X:-13.00 Y:0.00 Z:0.00
+ IsHollow = No
+ IsGroundAligned = No
+ IsEmitAboveGroundOnly = No
+ IsParticleUpTowardsEmitter = No
+End