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
feat(data): fly the nuke and scud storm out of the zoomed-out view
Olcay Seygan518f4efdceec
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 4ee5b4266..3bab8bfce 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -1181,6 +1181,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same- Text does not vanish at large sizes. Any font over 100 points simply failed to load, which on a 4K screen is a missing line of interface.- Zoom further out, with the whole map drawn instead of black corners. The ceiling is twice what it was again, which is the difference between watching your own half of the map and watching both.- The zoom-out ceiling is the same for everyone; no setting buys you a wider view.+- A nuke or a Scud Storm launched from the bottom of a fully zoomed-out screen climbs out of the top of it before it turns. EA flew the nuke at 500 and topped the Scud out at 634, low enough that from that height you watched the whole flight and knew where it was going before it got there. Both now climb to about 900, out of the picture on every screen shape from 16:9 to 5:4. The nuke flies faster to keep its time, so a far shot lands when it always did; the Scud missiles are a third faster at cruise and land a far shot within a twentieth of a second of the old time. A near target waits about half a second longer, since the missile still has the extra height to climb and come down.- The wheel covers that whole range in about six notches instead of thirty-eight.- Hold Ctrl and the wheel zooms five times as fast. With a building on the cursor, Ctrl and the wheel still turn the building.- Closer Zoom, a slider on Options > Controls, lets the wheel bring the camera up to 60 percent nearer the ground than the game's own limit. The zoom-out ceiling does not move with it.diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.iniindex 6d4d8f244..f9b77aa89 100644--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini@@ -961,3 +961,166 @@ Object SupW_AmericaTankPaladinEndEndEnd++; ---- the nuke and the Scud Storm climb out of the picture -----------------------------------------+;+; Pulled all the way out, the camera sits 992 over the ground (MaxCameraHeight 310 times the 3.2 of+; W3DView.cpp's ZOOM_OUT_LIMIT_FACTOR) and looks down at 37.5 degrees. The top edge of the picture is+; a ray 14.7 degrees above that at 16:9 and 19.3 degrees above it at 4:3. A missile rising from the+; bottom edge of the screen leaves at the top once it is 668 over the ground at 16:9, 709 at 16:10,+; 778 at 4:3 and 802 at 5:4; from the middle of the screen 448 is enough at 16:9. EA's nuke flew at+; 500 and its Scud topped out at 634, so a silo low on the screen kept the whole flight in view. Both+; now climb about 900 before they turn, which clears 5:4 with a missile's length to spare, and the+; turn itself happens at 700 to 800, over the top edge at 16:9 and 16:10.+;+; The nuke goes straight up, across to a point 900 over the target (EA: 500) and straight down as+; before. It flies faster to keep its time: RelativeSpeed over ForwardDamping is its top speed, 30 a+; frame against EA's 20, and the stronger damping lines the flight up with the nose quickly enough+; that it no longer overshoots the point over a near target and loops back. It comes down at half+; that, 450 a second (EA: 300). The slow lift out of the silo, SpecialSpeedHeight and+; SpecialSpeedTime, is EA's.+;+; The Scud cruises at 900 instead of 240 and comes down the quarter sine of+; Locomotor::moveTowardsPositionThrust from 450 out instead of 200, about EA's shape at more than+; twice the height. Its locomotor is a new one because EA's SCUDStormMissileLocomotor also flies the+; Superweapon General's Tomahawk. The Locomotor line sits inside the ReplaceModule, where the new AI+; module has no set yet and takes it; outside it the set is already there (FixesReforged.ini says+; why) and the load stops.+;+; Scenarios/missileapex.txt, seed 1, times from the missile leaving the silo to impact:+; nuke at 1442: apex 500 to 907, 5.73 s to 5.67 s+; nuke at 520: apex 515 to 923, 4.20 s to 4.63 s+; Scud at ~1730: apex 634 to 973, 9.10 s to 9.15 s (mean of nine)+; Scud at ~700: apex 634 to 973, 6.06 s to 6.58 s++Locomotor SCUDStormMissileHighLocomotor+ Surfaces = AIR+ Speed = 400 ; EA's SCUDStormMissileLocomotor: 300+ SpeedDamaged = 267 ; EA: 200+ MinSpeed = 100+ Acceleration = 675+ Braking = 0+ TurnRate = 540+ MaxThrustAngle = 45+ AllowAirborneMotiveForce = Yes+ Appearance = THRUST+ PreferredHeight = 900 ; EA: 240+ PreferredHeightDamping = 0.7+ ThrustRoll = 0.06+ ThrustWobbleRate = 0.008+ ThrustMinWobble = -0.040+ ThrustMaxWobble = 0.040+ CloseEnoughDist3D = Yes+End++Object ScudStormMissile+ ReplaceModule ModuleTag_04+ Behavior = MissileAIUpdate ModuleTag_04_High+ TryToFollowTarget = No+ FuelLifetime = 0+ InitialVelocity = 0+ IgnitionFX = FX_ScudStormIgnition+ DistanceToTravelBeforeTurning = 750 ; EA: 500+ DistanceToTargetBeforeDiving = 450 ; EA: 200+ End+ Locomotor = SET_NORMAL SCUDStormMissileHighLocomotor+ End+End++Object Chem_ScudStormMissile+ ReplaceModule ModuleTag_04+ Behavior = MissileAIUpdate ModuleTag_04_High+ TryToFollowTarget = No+ FuelLifetime = 0+ InitialVelocity = 0+ IgnitionFX = FX_ScudStormIgnition+ DistanceToTravelBeforeTurning = 750 ; EA: 500+ DistanceToTargetBeforeDiving = 450 ; EA: 200+ End+ Locomotor = SET_NORMAL SCUDStormMissileHighLocomotor+ End+End++Object Demo_ScudStormMissile+ ReplaceModule ModuleTag_04+ Behavior = MissileAIUpdate ModuleTag_04_High+ TryToFollowTarget = No+ FuelLifetime = 0+ InitialVelocity = 0+ IgnitionFX = FX_ScudStormIgnition+ DistanceToTravelBeforeTurning = 750 ; EA: 500+ DistanceToTargetBeforeDiving = 450 ; EA: 200+ End+ Locomotor = SET_NORMAL SCUDStormMissileHighLocomotor+ End+End++Object GC_Chem_ScudStormMissile+ ReplaceModule ModuleTag_04+ Behavior = MissileAIUpdate ModuleTag_04_High+ TryToFollowTarget = No+ FuelLifetime = 0+ InitialVelocity = 0+ IgnitionFX = FX_ScudStormIgnition+ DistanceToTravelBeforeTurning = 750 ; EA: 500+ DistanceToTargetBeforeDiving = 450 ; EA: 200+ End+ Locomotor = SET_NORMAL SCUDStormMissileHighLocomotor+ End+End++Object NeutronMissile+ ReplaceModule ModuleTag_03+ Behavior = NeutronMissileUpdate ModuleTag_03_High+ DistanceToTravelBeforeTurning = 700 ; EA: 300+ MaxTurnRate = 7200+ ForwardDamping = 0.15 ; EA: 0.1+ RelativeSpeed = 4.5 ; EA: 2.0+ LaunchFX = FX_NeutronMissileLaunch+ IgnitionFX = FX_NeutronMissileIgnition+ TargetFromDirectlyAbove = 900 ; EA: 500+ SpecialAccelFactor = 1+ SpecialSpeedTime = 1500+ SpecialSpeedHeight = 160+ SpecialJitterDistance = 0.4+ DeliveryDecalRadius = 210+ DeliveryDecal+ Texture = SCCNuclearMissile_China+ Style = SHADOW_ALPHA_DECAL+ OpacityMin = 25%+ OpacityMax = 50%+ OpacityThrobTime = 500+ Color = R:255 G:0 B:0 A:255+ OnlyVisibleToOwningPlayer = Yes+ End+ End+ End+End++Object SupW_NeutronMissile+ ReplaceModule ModuleTag_03+ Behavior = NeutronMissileUpdate ModuleTag_03_High+ DistanceToTravelBeforeTurning = 700 ; EA: 500+ MaxTurnRate = 9000+ ForwardDamping = 0.15 ; EA: 0.1+ RelativeSpeed = 4.5 ; EA: 2.0+ LaunchFX = FX_NeutronMissileLaunch+ IgnitionFX = FX_NeutronMissileIgnition+ TargetFromDirectlyAbove = 900 ; EA: 500+ SpecialAccelFactor = 1+ SpecialSpeedTime = 1500+ SpecialSpeedHeight = 160+ SpecialJitterDistance = 0.4+ DeliveryDecalRadius = 210+ DeliveryDecal+ Texture = SCCNuclearMissile_China+ Style = SHADOW_ALPHA_DECAL+ OpacityMin = 25%+ OpacityMax = 50%+ OpacityThrobTime = 500+ Color = R:255 G:0 B:0 A:255+ OnlyVisibleToOwningPlayer = Yes+ End+ End+ End+Enddiff --git a/GeneralsMD/Code/Data/Scenarios/missileapex.txt b/GeneralsMD/Code/Data/Scenarios/missileapex.txtnew file mode 100644index 000000000..3896e587f--- /dev/null+++ b/GeneralsMD/Code/Data/Scenarios/missileapex.txt@@ -0,0 +1,22 @@+# Nuke and Scud Storm flights: how high each missile climbs and how long it takes to land, at a far+# target (seats 0 and 1, start to start, about 1570) and a near one (seats 2 and 3, 500 away).+#+# generals.exe -headless -quickstart -noshellmap -observer -multiInstance -noFPSLimit+# -map "Maps\Twilight Flame\Twilight Flame.map" -autoskirmish 4 -takeover+# -side 0 FactionChina -side 1 FactionGLA -side 2 FactionChina -side 3 FactionGLA+# -seed 1 -maxframes 700 -scenario missileapex -logPrefix missileapex_+#+# The flight itself is only in the log with a temporary per-frame trace of each missile's position+# and the ground under it, a DEBUG_LOG at the end of NeutronMissileUpdate::update and+# MissileAIUpdate::update. The numbers it gave are in BalanceReforged.ini, at the nuke and the Scud.++10 spawn 0 ChinaNuclearMissileLauncher 1 start0:0:250+10 spawn 0 ChinaPowerPlant 3 start0:260:-40 90+10 spawn 1 GLAScudStorm 1 start1:0:250+10 spawn 2 ChinaNuclearMissileLauncher 1 start2:0:250+10 spawn 2 ChinaPowerPlant 3 start2:260:-40 90+10 spawn 3 GLAScudStorm 1 start3:0:250+40 power 0 ChinaNuclearMissileLauncher start1+40 power 1 GLAScudStorm start0+40 power 2 ChinaNuclearMissileLauncher start2:500:250+40 power 3 GLAScudStorm start3:-500:-250