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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
fix(balance): tank shells damage the infantry they hit
Olcay Seygan6ae78964e5c0
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 00042f7ee..f688a6fde 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,13 @@ found and fixed — EA's own, not port damage.**---+## A tank shell kills the man it hits++- A cannon shell did 6 damage to a soldier. A Ranger has 180 health, so thirty shells that actually hit him left him standing, a full minute of fire from a Crusader, while the same shell does 60 to another tank. It now does that 60 to him as well. Three hits kill a Ranger. Two kill a Red Guard or a Rebel.+- The gun still throws the shot wide of infantry, and the blast is small, so a shell that bursts beside a man still misses. A Gattling Tank does not throw wide, and it is still the gun that cuts a whole squad down.+- A chemical suit still stops toxin, radiation and microwaves, and a cannon shell goes through it the same as through a bare uniform. The Infantry General's men, the Toxin Rebel, the biohazard suit and the Demolitions terrorist each had their own copy of that shrug, and a shell goes through those too. The men on a Stinger Site keep theirs: that armor belongs to the site. The Missile Defender's laser-guided missile is the same kind of round, so it does its 40 to a soldier, and he fires that one at them. An ordinary rocket still barely scratches a man.+- A replay recorded before this change plays out differently.+## The battle runs at 60 steps a second- The game now works out the battle 60 times a second, double the 30 Zero Hour has run at since 2003. Each step is 17 milliseconds where it was 33, so an order you give waits half as long for the step that carries it out, and a unit turning, braking or firing moves in steps half the size.diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.iniindex babfef650..c185f7ea0 100644--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini@@ -1670,3 +1670,124 @@ Object Nuke_OverlordTankShellEndEndEnd++; ---- a tank shell does its damage to the man it hits ---------------------------------------------+;+; HumanArmor took armor-piercing at 10%, so a Crusader's 60 did 6 to a Ranger with 180 health:+; thirty connecting hits. The gun already scatters up to 10 against infantry and the blast is 5+; across, which is what keeps a tank from mowing a squad. A shell that lands now does the full 60.+; ChemSuitHumanArmor is that armor plus the toxin resists, and a Ranger wears it after Chemical+; Suits, so it takes the same shells. The Infantry General, the Toxin Rebel, the biohazard suit+; and the Demolitions terrorist each have their own copy of the 10%, and those open too.+; StingerSoldierArmor stays: its whole table is the site's crew, and gattling already does+; nothing to them. Infantry rockets stay at 10% on the plain uniform. An Armor block replaces+; the template, so every other line is EA's.++Armor HumanArmor+ Armor = CRUSH 200%+ Armor = ARMOR_PIERCING 100% ; EA: 10%+ Armor = INFANTRY_MISSILE 10%+ Armor = FLAME 150%+ Armor = PARTICLE_BEAM 150%+ Armor = SNIPER 200%+ Armor = LASER 50%+ Armor = HAZARD_CLEANUP 0%+ Armor = KILL_PILOT 0%+ Armor = SURRENDER 100%+ Armor = SUBDUAL_MISSILE 0%+ Armor = SUBDUAL_VEHICLE 0%+ Armor = SUBDUAL_BUILDING 0%+End++Armor ChemSuitHumanArmor+ Armor = CRUSH 200%+ Armor = ARMOR_PIERCING 100% ; EA: 10%+ Armor = INFANTRY_MISSILE 10%+ Armor = FLAME 150%+ Armor = POISON 20%+ Armor = RADIATION 20%+ Armor = MICROWAVE 20%+ Armor = PARTICLE_BEAM 150%+ Armor = SNIPER 200%+ Armor = LASER 50%+ Armor = HAZARD_CLEANUP 0%+ Armor = KILL_PILOT 0%+ Armor = SURRENDER 100%+ Armor = SUBDUAL_MISSILE 0%+ Armor = SUBDUAL_VEHICLE 0%+ Armor = SUBDUAL_BUILDING 0%+End++Armor InfGen_HumanArmor+ Armor = CRUSH 200%+ Armor = ARMOR_PIERCING 100% ; EA: 10%+ Armor = INFANTRY_MISSILE 10%+ Armor = FLAME 150%+ Armor = POISON 60%+ Armor = RADIATION 60%+ Armor = MICROWAVE 60%+ Armor = PARTICLE_BEAM 150%+ Armor = SNIPER 200%+ Armor = LASER 50%+ Armor = HAZARD_CLEANUP 0%+ Armor = KILL_PILOT 0%+ Armor = SURRENDER 100%+ Armor = SUBDUAL_MISSILE 0%+ Armor = SUBDUAL_VEHICLE 0%+ Armor = SUBDUAL_BUILDING 0%+End++Armor ChemReb_HumanArmor+ Armor = CRUSH 200%+ Armor = ARMOR_PIERCING 100% ; EA: 10%+ Armor = INFANTRY_MISSILE 10%+ Armor = SNIPER 200%+ Armor = FLAME 150%+ Armor = LASER 50%+ Armor = POISON 5%+ Armor = PARTICLE_BEAM 150%+ Armor = HAZARD_CLEANUP 0%+ Armor = KILL_PILOT 0%+ Armor = SURRENDER 100%+ Armor = SUBDUAL_MISSILE 0%+ Armor = SUBDUAL_VEHICLE 0%+ Armor = SUBDUAL_BUILDING 0%+End++Armor HazMatHumanArmor+ Armor = CRUSH 200%+ Armor = ARMOR_PIERCING 100% ; EA: 10%+ Armor = SNIPER 200%+ Armor = FLAME 25%+ Armor = LASER 25%+ Armor = POISON 0%+ Armor = RADIATION 0%+ Armor = MICROWAVE 0%+ Armor = PARTICLE_BEAM 150%+ Armor = HAZARD_CLEANUP 0%+ Armor = KILL_PILOT 0%+ Armor = SURRENDER 100%+ Armor = SUBDUAL_MISSILE 0%+ Armor = SUBDUAL_VEHICLE 0%+ Armor = SUBDUAL_BUILDING 0%+End++Armor DemoGenTerroristArmor+ Armor = CRUSH 200%+ Armor = ARMOR_PIERCING 100% ; EA: 10%+ Armor = INFANTRY_MISSILE 10%+ Armor = FLAME 100%+ Armor = PARTICLE_BEAM 150%+ Armor = SNIPER 200%+ Armor = LASER 50%+ Armor = HAZARD_CLEANUP 0%+ Armor = KILL_PILOT 0%+ Armor = SURRENDER 100%+ Armor = SUBDUAL_MISSILE 0%+ Armor = SUBDUAL_VEHICLE 0%+ Armor = SUBDUAL_BUILDING 0%+ Armor = SMALL_ARMS 80%+ Armor = GATTLING 80%+ Armor = COMANCHE_VULCAN 80%+ Armor = POISON 50%+Enddiff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cppindex a2d017c08..5f2d277d8 100644--- a/GeneralsMD/Code/Tests/test_gameengine.cpp+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp@@ -11542,10 +11542,11 @@ TEST(frames_to_kill_counts_shots_delays_and_reloads)crusaderGun.m_delayFrames = 60.0f;CHECK_NEAR( 480.0f, aiFramesToKill( 480.0f, crusaderGun ), 0.001f );- // the same shell through HumanArmor's 10% on a 120-health Rebel: twenty shells, not two+ // the same shell through HumanArmor on a 120-health Rebel. Armor-piercing lands in full+ // now, so two shells. At the old 10% it was 6 a shell and twenty of them.AIShotPattern crusaderOnInfantry = crusaderGun;- crusaderOnInfantry.m_damagePerShot = 6.0f;- CHECK_NEAR( 1200.0f, aiFramesToKill( 120.0f, crusaderOnInfantry ), 0.001f );+ crusaderOnInfantry.m_damagePerShot = 60.0f;+ CHECK_NEAR( 120.0f, aiFramesToKill( 120.0f, crusaderOnInfantry ), 0.001f );// a clip of two with a long reload: the third shot waits for the reload, not the delayAIShotPattern clip;diff --git a/Tools/Balance/unitmatrix.py b/Tools/Balance/unitmatrix.pyindex 35e2d61b2..bc6c0bee9 100644--- a/Tools/Balance/unitmatrix.py+++ b/Tools/Balance/unitmatrix.py@@ -715,7 +715,7 @@ def selfcheck():"""The numbers test_gameengine's frames_to_kill_counts_shots_delays_and_reloads checks in C++."""gun = Shots(60.0, 60.0, 0, 0.0, 0.0)assert kill_frames(480.0, gun) == 480.0- assert kill_frames(120.0, gun._replace(damage=6.0)) == 1200.0+ assert kill_frames(120.0, gun) == 120.0clip = Shots(50.0, 10.0, 2, 100.0, 0.0)assert kill_frames(150.0, clip) == 120.0assert kill_frames(150.0, clip._replace(opening=15.0)) == 135.0