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(data): patch at least three data bugs in each of the nine generals
Olcay Seygan179e1f65c033
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 910d2e540..1e627f266 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -432,6 +432,33 @@ found and fixed — EA's own, not port damage.**- A tank thrown by a carpet bomb or a MOAB is out of your hands until it comes down. A tank hit where it stood got its controls back on the very next frame, before it had left the ground, and anything already in the air got them back at the top of its arc, so it could drive in mid-air. Now the stun lasts until it lands and a few frames after, and a tank that comes down on its roof, in water it cannot drive through, on a cliff or off the edge of the map is lost, the way the game was written to do and never did. Over one carpet bomb, 16 of 20 units that lived through it came down still stunned where none did before, and one Paladin landed on its back. Replays recorded before this change play out differently.- Wreckage and bodies that should not bounce, don't. The data tells debris and a soldier flung by a blast to lie where they land, and fifteen entries say so, but the game never read the number and bounced all of it the same. Replays recorded before this change play out differently.+## The nine generals, as their own data meant them++Every Zero Hour general is a copy of a base faction with changes on top, and the copies missed things. Each general had at least three; they are all fixed, and a replay recorded before this change plays back differently.++- Air Force, Laser and Superweapon: the Avenger no longer drives off after whoever shoots it. It holds position the way every other support vehicle does.+- Air Force: the Avenger wears the Avenger's armour. It had been left on the older anti-air armour, so jet missiles did 30% to it instead of 23%.+- Air Force: a King Raptor with Countermeasures gets the armour that comes with the flares. It only ever got the flares.+- Air Force: a Saboteur in your Supply Center steals money and nothing else. The building was marked as a power plant, so the same Saboteur also blacked out your base.+- Air Force and Superweapon: nothing can shoot at the gas cloud an Aurora leaves behind. Enemy defences used to waste their fire on it.+- Air Force and Superweapon: the Microwave Tank stops showing a Composite Armor icon for an upgrade those generals cannot buy.+- American soldiers killed by gamma toxin scream in English. Rangers, Colonel Burton, Missile Defenders, Pathfinders and pilots of the Air Force, Laser and Superweapon generals died with a GLA rebel's voice, and Chinese infantry of the Tank, Infantry and Nuke generals did the same; Black Lotus now dies with a woman's voice.+- Laser: a Humvee plays its door sound once. Every soldier getting in or out played it twice.+- Laser: the Laser Turret's anti-air and assist shots are its own blue beam with its own sound, not a Laser Paladin's.+- Tank: the Emperor's propaganda speaker gets louder with Subliminal Messaging, like the Overlord's. It never read the upgrade at all.+- Tank: a Helix shows its Napalm Bomb once you have bought it.+- Infantry and Nuke: a Nuke Cannon fires neutron shells only after you buy Neutron Shells. Both generals' cannons came with them from the first shot.+- Infantry: the Minigunner can be run over like every other soldier.+- Infantry: a Tank Hunter's icons show Nationalism and Fanaticism, the two upgrades that change him, where one read a raw text label.+- Nuke: the Battlemaster and the Overlord drop icons for upgrades that do not exist, and the Overlord shows Isotope Stability, which it does have.+- Toxin: the Tunnel Defender fires one rocket at a time. It carries a ground rocket and an air rocket, and each kept its own reload, so with a tank and a helicopter both in range it shot at the two together.+- Toxin and Demolitions: Rebels, Terrorists and Tunnel Defenders show the upgrades they really have (AP Bullets, Anthrax Beta and Gamma, Booby Trap) and not Camouflage, which the Toxin general cannot buy.+- Demolitions: a Stinger Site's demolition charge goes off once, at full strength, and only when you blow it up yourself. A suicide set it off twice, an ordinary death set off the suicide charge, and poison set off nothing.+- Demolitions: the Stinger Site and the Tunnel Network show the Demolitions upgrade that arms them.+- Stealth: a Rebel stays hidden when he is hit. Only firing gives him away, as on every other stealth soldier.+- Stealth: a Palace whose garrison opens fire can be seen. The soldiers inside shot from cover without ever showing it.+- Stealth: the Bomb Truck shows Anthrax Beta and the fake Arms Dealer shows Camo Netting.+## One crate, one collector- Salvage gets collected. A wreck leaves money and a free upgrade lying on the ground, and the game asked you to spot it in the middle of the fight that made it, work out which of your units was allowed to take it, and drive that one over it by hand. Nobody does that, so most salvage on most maps timed out where it fell. Whoever is standing nearest with nothing to do goes and gets it now: a unit that can still be upgraded off it goes first, however far back it is standing, and failing that the nearest idle unit takes the cash. Dozers and harvesters are left to the job they are already earning at.diff --git a/GeneralsMD/Code/Data/INI/FixesReforged.ini b/GeneralsMD/Code/Data/INI/FixesReforged.ininew file mode 100644index 000000000..feab51cc0--- /dev/null+++ b/GeneralsMD/Code/Data/INI/FixesReforged.ini@@ -0,0 +1,595 @@+; Zero Hour Reforged data fixes for the nine generals, loaded after BalanceReforged.ini.+;+; These are mistakes in EA's 1.04 data, not balance: a general's copy of a unit that missed a+; change the original got, a module pointing at the wrong faction's sound, an upgrade icon naming+; an upgrade that does not exist. Every block edits a template in place the way the balance file+; does. A module is swapped with ReplaceModule and a new tag, and a WeaponSet or ArmorSet with the+; same Conditions as one the object already has takes its place.+;+; This file lands in the multiplayer INI checksum.++; ==== Air Force General ==========================================================================++; The Avenger wears AntiAirVehicle, the armor the Avenger had before 1.04. Every other Avenger+; wears AvengerArmor, which takes 23% from jet missiles instead of 30%.+; Without CANNOT_RETALIATE it drives at whatever shoots it, painting the attacker with a target+; laser that does no damage. The USA Avenger has had the flag since 1.04.++Object AirF_AmericaTankAvenger+ KindOf = +CANNOT_RETALIATE+ ArmorSet+ Conditions = None+ Armor = AvengerArmor+ DamageFX = TankDamageFX+ End+End++; The King Raptor buys Countermeasures and gets the flares, and its ArmorUpgrade raises the+; PLAYER_UPGRADE flag, but it has no armor set for that flag, so the armor half of the upgrade+; never reaches it. The USA Raptor has both halves.++Object AirF_AmericaJetRaptor+ ArmorSet+ Conditions = PLAYER_UPGRADE+ Armor = CountermeasuresAirplaneArmor+ DamageFX = None+ End+End++; The Supply Center is marked FS_POWER, so a Saboteur that runs into it steals the money and+; blacks out the whole base for the power plant sabotage time as well.++Object AirF_AmericaSupplyCenter+ KindOf = -FS_POWER+End++; The Air Force General cannot buy Composite Armor, yet the Microwave Tank shows its icon.++Object AirF_AmericaTankMicrowave+ UpgradeCameo5 = None+End++; The Aurora's burning gas cloud has one hit point and nothing marking it untargetable, so enemy+; defences turn and fire at it.++Object AirF_AuroraBombGas+ KindOf = +UNATTACKABLE+End++; Killed by Anthrax Gamma, these soldiers scream with the GLA voice.++Object AirF_AmericaInfantryRanger+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object AirF_AmericaInfantryColonelBurton+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++; ==== Laser General ==============================================================================++Object Lazr_AmericaTankAvenger+ KindOf = +CANNOT_RETALIATE+End++; The Laser Humvee plays the Humvee door sound and the building garrison sound on every soldier+; who gets in or out. The USA Humvee plays only the first.++Object Lazr_AmericaVehicleHumvee+ ReplaceModule ModuleTag_05+ Behavior = TransportContain ModuleTag_05_Fix+ PassengersAllowedToFire = Yes+ Slots = 5+ DamagePercentToUnits = 100%+ AllowInsideKindOf = INFANTRY+ ExitDelay = 250+ NumberOfExitPaths = 3+ GoAggressiveOnExit = Yes+ End+ End+End++; Against aircraft, and when helping another turret, the Laser Turret draws the Paladin's point+; defense beam and plays its pulse. Its ground shot draws its own beam.++Weapon Lazr_PatriotMissileWeaponAir+ LaserName = Lazr_PatriotLaserBeam+ FireFX = Lazr_WeaponFX_LaserCrusader+End++Weapon Lazr_PatriotMissileAssistWeapon+ LaserName = Lazr_PatriotLaserBeam+ FireFX = Lazr_WeaponFX_LaserCrusader+End++Object Lazr_AmericaInfantryRanger+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Lazr_AmericaInfantryColonelBurton+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Lazr_AmericaInfantryMissileDefender+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Lazr_AmericaInfantryPathfinder+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Lazr_AmericaInfantryPilot+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++; ==== Superweapon General ========================================================================++Object SupW_AmericaTankAvenger+ KindOf = +CANNOT_RETALIATE+End++Object SupW_AmericaTankMicrowave+ UpgradeCameo5 = None+End++; The Alpha Aurora's fuel air cloud, the same one hit point target as the Air Force Aurora's.++Object SupW_AuroraFuelAirGas+ KindOf = +UNATTACKABLE+End++Object SupW_AmericaInfantryRanger+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object SupW_AmericaInfantryColonelBurton+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object SupW_AmericaInfantryMissileDefender+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object SupW_AmericaInfantryPathfinder+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object SupW_AmericaInfantryPilot+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinUSA+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++; ==== Tank General ===============================================================================++; The Emperor's loudspeaker waits for Upgrade_ChinaOverlordPropagandaTower, an object upgrade+; the Emperor is never given, so it never heals faster or pulses harder after Subliminal+; Messaging. The Overlord's speaker tower waits for Subliminal Messaging.++Object Tank_ChinaTankEmperor+ UpgradeCameo5 = Upgrade_ChinaSubliminalMessaging+ ReplaceModule ModulePropaganda_04+ Behavior = PropagandaTowerBehavior ModulePropaganda_04_Fix+ Radius = 150.0+ DelayBetweenUpdates = 2000+ HealPercentEachSecond = 1%+ PulseFX = FX_OverlordPropagandaTowerPropagandaPulse+ UpgradeRequired = Upgrade_ChinaSubliminalMessaging+ UpgradedHealPercentEachSecond = 2%+ UpgradedPulseFX = FX_OverlordPropagandaTowerSubliminalPulse+ AffectsSelf = Yes+ End+ End+End++; The Airfield sells the Helix Napalm Bomb but the Helix never shows its icon. The Infantry+; General's Helix does. The plain China Helix has the same gap.++Object Tank_ChinaVehicleHelix+ UpgradeCameo1 = Upgrade_HelixNapalmBomb+End++Object ChinaVehicleHelix+ UpgradeCameo1 = Upgrade_HelixNapalmBomb+End++Object Tank_ChinaInfantryRedguard+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Tank_ChinaInfantryTankHunter+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Tank_ChinaInfantryHacker+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Tank_ChinaInfantryBlackLotus+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinFemale+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++; ==== Infantry General ===========================================================================++; The Minigunner has no SquishCollide, the module every other soldier uses to die under a tank,+; so vehicles push it aside instead of running it over.++Object Infa_ChinaInfantryMiniGunner+ UpgradeCameo3 = Upgrade_Nationalism+ AddModule+ Behavior = SquishCollide ModuleTag_Squish_Fix+ End+ End+End++; The Tank Hunter's first icon names UPGRADE:Fanaticism, the upgrade's text label rather than+; the upgrade, so the slot stays empty. Nationalism, which the Infantry General gets for free,+; has no icon either.++Object Infa_ChinaInfantryTankHunter+ UpgradeCameo1 = Upgrade_Nationalism+ UpgradeCameo2 = Upgrade_Fanaticism+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Infa_ChinaInfantryHacker+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++; Every Nuke Cannon carries the Neutron Shell in its only weapon set, with FROM_AI among the+; sources allowed to pick it. A cannon on guard or attack move, or one the computer owns, can fire+; neutron shells before anyone has paid for them. The shell now sits in the upgraded set alone.++Object Infa_ChinaVehicleNukeLauncher+ WeaponSet+ Conditions = None+ Weapon = PRIMARY NukeCannonGun+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI+ End+ WeaponSet+ Conditions = PLAYER_UPGRADE+ Weapon = PRIMARY NukeCannonGun+ Weapon = SECONDARY NukeCannonNeutronWeapon+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI+ AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI+ ShareWeaponReloadTime = Yes+ End+ AddModule+ Behavior = WeaponSetUpgrade ModuleTag_NeutronShells_Fix+ TriggeredBy = Upgrade_ChinaNeutronShells+ End+ End+End++; ==== Nuke General ===============================================================================++Object Nuke_ChinaVehicleNukeLauncher+ WeaponSet+ Conditions = None+ Weapon = PRIMARY NukeCannonGun+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI+ End+ WeaponSet+ Conditions = PLAYER_UPGRADE+ Weapon = PRIMARY NukeCannonGun+ Weapon = SECONDARY NukeCannonNeutronWeapon+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI+ AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI+ ShareWeaponReloadTime = Yes+ End+ AddModule+ Behavior = WeaponSetUpgrade ModuleTag_NeutronShells_Fix+ TriggeredBy = Upgrade_ChinaNeutronShells+ End+ End+End++Object ChinaVehicleNukeLauncher+ WeaponSet+ Conditions = None+ Weapon = PRIMARY NukeCannonGun+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI+ End+ WeaponSet+ Conditions = PLAYER_UPGRADE+ Weapon = PRIMARY NukeCannonGun+ Weapon = SECONDARY NukeCannonNeutronWeapon+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_SCRIPT FROM_AI+ AutoChooseSources = SECONDARY FROM_SCRIPT FROM_AI+ ShareWeaponReloadTime = Yes+ End+ AddModule+ Behavior = WeaponSetUpgrade ModuleTag_NeutronShells_Fix+ TriggeredBy = Upgrade_ChinaNeutronShells+ End+ End+End++; The Battlemaster and the Overlord name Upgrade_ChinaWGUraniumShells and+; Upgrade_ChinaFusionReactors, which do not exist; the cut Nuke versions carry a Nuke_ prefix and+; no building sells them. The Overlord dies without a nuclear blast after Isotope Stability like+; the Battlemaster does, but only the Battlemaster shows that icon.++Object Nuke_ChinaTankBattleMaster+ UpgradeCameo2 = None+ UpgradeCameo3 = None+End++Object Nuke_ChinaTankOverlord+ UpgradeCameo1 = Upgrade_ChinaIsotopeStability+ UpgradeCameo2 = None+End++Object Nuke_ChinaInfantryRedguard+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Nuke_ChinaInfantryTankHunter+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Nuke_ChinaInfantryHacker+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinChina+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++Object Nuke_ChinaInfantryBlackLotus+ ReplaceModule ModuleTag_Death07+ Behavior = SlowDeathBehavior ModuleTag_Death07_Fix+ DeathTypes = NONE +POISONED_GAMMA+ DestructionDelay = 0+ FX = INITIAL FX_DieByToxinFemale+ OCL = INITIAL OCL_ToxicInfantryGamma+ End+ End+End++; ==== Toxin General ==============================================================================++; The Tunnel Defender has a ground rocket and an air rocket that reload apart. Swapping between a+; tank and a helicopter it fires the second rocket straight after the first, where every other+; Tunnel Defender has one rocket and waits out its one second reload.++Object Chem_GLAInfantryTunnelDefender+ UpgradeCameo2 = Chem_Upgrade_GLAAnthraxGamma+ WeaponSet+ Conditions = None+ Weapon = PRIMARY Chem_TunnelDefenderRocketWeaponBeta+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_AI FROM_SCRIPT+ Weapon = SECONDARY Chem_TunnelDefenderRocketWeaponBetaAir+ PreferredAgainst = SECONDARY BALLISTIC_MISSILE AIRCRAFT+ ShareWeaponReloadTime = Yes+ End+ WeaponSet+ Conditions = PLAYER_UPGRADE+ Weapon = PRIMARY Chem_TunnelDefenderRocketWeaponGamma+ AutoChooseSources = PRIMARY FROM_PLAYER FROM_AI FROM_SCRIPT+ Weapon = SECONDARY Chem_TunnelDefenderRocketWeaponGammaAir+ PreferredAgainst = SECONDARY BALLISTIC_MISSILE AIRCRAFT+ ShareWeaponReloadTime = Yes+ End+End++; The Rebel shows Camouflage, which the Toxin General cannot buy, and hides AP Bullets, which it+; can and which the Rebel's rifle uses.++Object Chem_GLAInfantryRebel+ UpgradeCameo3 = Upgrade_GLAAPBullets+End++Object Chem_GLAInfantryTerrorist+ UpgradeCameo2 = Upgrade_GLAAnthraxBeta+End++; ==== Demolition General =========================================================================++; With the Demo upgrade the Stinger Site fires the suicide charge, 500 damage over 18, when it is+; merely destroyed; every other Demo building fires Demo_DestroyedWeapon, 50 over 60. A poison+; death fires no charge. A suicide fires two 700 charges, one from a module that is always on and+; one from the upgrade. It now fires one.++Object Demo_GLAStingerSite+ UpgradeCameo2 = Demo_Upgrade_SuicideBomb+ RemoveModule ModuleTag_Death18+ ReplaceModule ModuleTag999+ Behavior = FireWeaponWhenDeadBehavior ModuleTag999_Fix+ DeathWeapon = Demo_DestroyedWeapon+ StartsActive = No+ TriggeredBy = Demo_Upgrade_SuicideBomb+ DeathTypes = ALL -SUICIDED+ End+ End+End++Object Demo_GLATunnelNetwork+ UpgradeCameo1 = Demo_Upgrade_SuicideBomb+End++; The Rebel's Booby Trap is unlocked by an upgrade that has no icon on the Rebel.++Object Demo_GLAInfantryRebel+ UpgradeCameo4 = Upgrade_GLAInfantryRebelBoobyTrapAttack+End++; ==== Stealth General ============================================================================++; The Stealth General's Rebel is born hidden and drops out of hiding every time it is hit. No+; other hidden unit does; the plain Rebel with Camouflage does not.++Object Slth_GLAInfantryRebel+ ReplaceModule ModuleTag_07+ Behavior = StealthUpdate ModuleTag_07_Fix+ StealthDelay = 2500+ StealthForbiddenConditions = ATTACKING USING_ABILITY+ MoveThresholdSpeed = 3+ InnateStealth = Yes+ OrderIdleEnemiesToAttackMeUponReveal = Yes+ End+ End+End++; Under Camo Netting the Palace stays hidden while the five soldiers inside it shoot out, so the+; enemy can see who is killing it and cannot fire back at the building.++Object Slth_GLAPalace+ ReplaceModule ModuleStealth_09+ Behavior = StealthUpdate ModuleStealth_09_Fix+ StealthDelay = 2500+ StealthForbiddenConditions = ATTACKING USING_ABILITY TAKING_DAMAGE RIDERS_ATTACKING+ InnateStealth = No+ OrderIdleEnemiesToAttackMeUponReveal = Yes+ End+ End+End++Object Slth_GLAVehicleBombTruck+ UpgradeCameo4 = Upgrade_GLAAnthraxBeta+End++Object Slth_FakeGLAArmsDealer+ UpgradeCameo2 = Upgrade_GLACamoNetting+Enddiff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cppindex 5016d5f3a..e86c0b5b6 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp@@ -1089,6 +1089,9 @@ void GameEngine::init( int argc, char *argv[] )wrote it, so the file holds the changes and nothing else; an Armor block still replacesthat armor whole. It is in the INI CRC like the files it edits. */ini.load( AsciiString( "Data\\INI\\BalanceReforged.ini" ), INI_LOAD_MULTIFILE, &xferCRC );+ /* Mistakes in EA's data for the nine generals, patched the same way: a copy that missed the+ original's change, a wrong faction's sound, an icon naming an upgrade that does not exist. */+ ini.load( AsciiString( "Data\\INI\\FixesReforged.ini" ), INI_LOAD_MULTIFILE, &xferCRC );#ifdef DUMP_PERF_STATS///////////////////////////////////////////////////////////////////////////GetPrecisionTimer(&endTime64);//////////////////////////////////////////////////////////////////diff --git a/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingTemplate.cpp b/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingTemplate.cppindex 78db00ff6..272b97ee7 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingTemplate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/Thing/ThingTemplate.cpp@@ -909,6 +909,19 @@ void ThingTemplate::parseArmorTemplateSet( INI* ini, void *instance, void * /*stArmorTemplateSet ws;ws.parseArmorTemplateSet(ini);+ self->m_armorTemplateSetFinder.clear();+ if (ini->getLoadType() == INI_LOAD_MULTIFILE)+ {+ // a patch file's set with conditions the template already has takes that set's place+ for (ArmorTemplateSetVector::iterator it = self->m_armorTemplateSets.begin(); it != self->m_armorTemplateSets.end(); ++it)+ {+ if (it->getNthConditionsYes(0) == ws.getNthConditionsYes(0))+ {+ *it = ws;+ return;+ }+ }+ }#if defined(_DEBUG) || defined(_INTERNAL)if (ini->getLoadType() != INI_LOAD_CREATE_OVERRIDES){@@ -922,7 +935,6 @@ void ThingTemplate::parseArmorTemplateSet( INI* ini, void *instance, void * /*st}#endifself->m_armorTemplateSets.push_back(ws);- self->m_armorTemplateSetFinder.clear();}//-------------------------------------------------------------------------------------------------@@ -937,6 +949,19 @@ void ThingTemplate::parseWeaponTemplateSet( INI* ini, void *instance, void * /*sWeaponTemplateSet ws;ws.parseWeaponTemplateSet(ini, self);+ self->m_weaponTemplateSetFinder.clear();+ if (ini->getLoadType() == INI_LOAD_MULTIFILE)+ {+ // a patch file's set with conditions the template already has takes that set's place+ for (WeaponTemplateSetVector::iterator it = self->m_weaponTemplateSets.begin(); it != self->m_weaponTemplateSets.end(); ++it)+ {+ if (it->getNthConditionsYes(0) == ws.getNthConditionsYes(0))+ {+ *it = ws;+ return;+ }+ }+ }#if defined(_DEBUG) || defined(_INTERNAL)if (ini->getLoadType() != INI_LOAD_CREATE_OVERRIDES){@@ -950,7 +975,6 @@ void ThingTemplate::parseWeaponTemplateSet( INI* ini, void *instance, void * /*s}#endifself->m_weaponTemplateSets.push_back(ws);- self->m_weaponTemplateSetFinder.clear();}//-------------------------------------------------------------------------------------------------