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.

feat(gameengine): give the turkiye mehmetcik his own model

Olcay Seygan0989c232c5d2
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f15933881..30dfe6c45 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -260,7 +260,7 @@ found and fixed, EA's own, not port damage.**
- A Turkish computer player fires its powers, the Minefield included, as soon as they are ready, and pulls its spotter teams back out of the enemy's reach while keeping the enemy in sight.
- Turkish units climb the Turkish Land Forces' own ladder: 21 promotions from Er through Onbaşı, Çavuş, Uzman Çavuş and six astsubay grades to Teğmen, Yüzbaşı, Albay, the four generals and Mareşal at the top. The names read in Turkish in every language, and each grade wears its own insignia: chevrons for the enlisted men, gold bars for the astsubays, stars for the officers, the oak wreath under a field officer's stars and the crescent and star over a general's. The climb costs what it costs everyone else, a unit turns Veteran at Uzman Çavuş, Elite at Teğmen and Heroic at Albay. Its bonuses lean on health: at Mareşal a unit has 42% more of it, fires 25% faster, hits 19% harder and reaches 12% further. The Maroon Beret starts as an Albay, as Burton starts as a Colonel. Before this a Turkish unit wore EA's three chevrons.
- Turkish ranks carry more than numbers. A Çavuş sees 10% further, an Uzman Çavuş takes 10% less damage standing still, and from the sixth grade a unit patches itself up out of a fight at 1% a second. Sight grows to 20% and 30% further at the astsubay and general ranks. A Teğmen spots for the Firtina and the Sakarya the way the spotter team does, a Binbaşı's own guns spread 15% less, and a Tümgeneral finds stealthed enemies within 100 of it. Officers lead: the Astsubay Kıdemli Başçavuş makes every friendly unit within 150 fire 5% faster and the Albay 10%, the Yüzbaşı lets them see 10% further, the Korgeneral cuts the damage they take by 10% and the Orgeneral puts 5% on the artillery's range. A Tuğgeneral who falls leaves the men around him taking 15% less damage for ten seconds, and a Mareşal's leadership reaches 300. Two officers of the same kind never add up: a tank between an Albay and a Başçavuş fires 10% faster, the Albay's figure alone. Select or hover a leader and what it gives the men around it shows on the ground as one quiet dial at the edge of its reach, each gift in its own band and its own pattern: short ticks round the rim for fire, a dotted line for sight, a notched line for armour, a graduated scale for the guns' reach and a faint wash inside for the last stand, so an Albay draws two bands and a Mareşal the whole dial; the portrait's tooltip lists what the rank carries. Only you and your allies see the rings. Making those colours work fixed a mistake in how the game tints glowing ground marks, which had drawn every one of them in pure blue. The grid a spy satellite or a radar scan lays over what it reveals is now the dim grey-blue EA's data asks for, and about half as bright as before.
-- The units still borrow American and other sides' models, voices and cameos.
+- The units still borrow American and other sides' models, voices and cameos, except the Mehmetcik. He has a model of his own: a rifleman in digital camouflage with a Turkish flag on his left sleeve and a plate carrier and helmet band in his side's colour. He moves with the Red Guard's animations, so he walks, fires and falls like one, and he still raises a Red Guard's flag when he takes a building. Anyone joining a game needs the same copy of the model, so it ships with the game.
- The computer plays Turkiye too. A Turkish AI puts up a full base with radar towers, Hisar batteries and Siper bunkers it fills with its own infantry, sends supply trucks, fields the new army, artillery included, fires its own powers and attacks.
- The Turkish computer brings its guns and the eyes to aim them. A Firtina or Sakarya that comes out for one of its attack groups now sends for spotter teams, one on Easy and Medium and two on Hard, and the group waits for them before it leaves; until now the guns walked out blind and the spotters it did buy sat in its bunkers. The American battle plans it plays never put a Firtina in an Easy attack and only reach one after a quarter of an hour on Medium, so it adds a gun of its own to every Easy attack group, every second Medium one and every fourth on Hard. In three fifteen-minute matches a difficulty on Twilight Flame against America, Easy fielded 21 guns, Medium 48 and Hard 27, and all 41 that came out for an attack group sent for their spotters. The computer pays the Turkish price for them now. A Firtina used to cost it the American 1200 whenever that was all it had in the bank. A spotter team killed in the field is replaced for any group that still has a gun and none left to see for it, the men it trains for the seats of a Humvee or a bunker are no longer spotter teams, and a group whose spotters are late leaves without them instead of breaking up when its build time runs out.
diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifest
index 3994e990d..b9da33ebb 100644
--- a/GeneralsMD/Code/BuildFingerprint.manifest
+++ b/GeneralsMD/Code/BuildFingerprint.manifest
@@ -42,6 +42,8 @@ Data/Art/Textures/ReforgedRanksUSA.tga
Data/Art/Textures/ReforgedSignalAttack.tga
Data/Art/Textures/ReforgedSignalDefend.tga
Data/Art/Textures/ReforgedSignalLook.tga
+Data/Art/Textures/ZHCA_TRMehmet.tga
+Data/Art/W3D/TRMEHM_SKN.W3D
Data/Cinema/aurorablast.txt
Data/Cinema/aurorafog.txt
Data/Cinema/blastcheck.txt
@@ -110,6 +112,7 @@ Data/Cinema/rankauramaresal.txt
Data/Cinema/rankauranight.txt
Data/Cinema/rankaurasnow.txt
Data/Cinema/rankladder.txt
+Data/Cinema/rankringsall.txt
Data/Cinema/rankzero.txt
Data/Cinema/readme_water.txt
Data/Cinema/rf_ai.txt
@@ -314,6 +317,7 @@ Data/Scenarios/mappers.txt
Data/Scenarios/mass420x2.txt
Data/Scenarios/mass840.txt
Data/Scenarios/massmove.txt
+Data/Scenarios/mehmetcik.txt
Data/Scenarios/minefx.txt
Data/Scenarios/minefx_blast.txt
Data/Scenarios/minefx_desert.txt
@@ -352,6 +356,7 @@ Data/Scenarios/rankaurareplay.txt
Data/Scenarios/rankaurasnow.txt
Data/Scenarios/rankaurawiki.txt
Data/Scenarios/rankladder.txt
+Data/Scenarios/rankringsall.txt
Data/Scenarios/rankzero.txt
Data/Scenarios/reachshot.txt
Data/Scenarios/readme_hud.txt
diff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txt
index fa303f37e..306f8bc14 100644
--- a/GeneralsMD/Code/CMakeLists.txt
+++ b/GeneralsMD/Code/CMakeLists.txt
@@ -1837,6 +1837,11 @@ add_custom_command(TARGET generals POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/Data/Art/Textures
${CMAKE_CURRENT_SOURCE_DIR}/../Run/Art/Textures
+ # The fork's own models (Mehmetcik's TRMEHM_SKN). A model's name and bytes are in the
+ # multiplayer INI checksum, so the launcher payload ships this folder from the same masters.
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
+ ${CMAKE_CURRENT_SOURCE_DIR}/Data/Art/W3D
+ ${CMAKE_CURRENT_SOURCE_DIR}/../Run/Art/W3D
# The fork's window layouts, generated from the shipped ones by Tools/*.py and
# tracked here. They live outside Data/ in the archive (Window/Menus/...), and
# a loose file wins over WindowZH.big. Layouts are not in the multiplayer INI
diff --git a/GeneralsMD/Code/Data/Art/Textures/ZHCA_TRMehmet.tga b/GeneralsMD/Code/Data/Art/Textures/ZHCA_TRMehmet.tga
new file mode 100644
index 000000000..482e8d625
Binary files /dev/null and b/GeneralsMD/Code/Data/Art/Textures/ZHCA_TRMehmet.tga differ
diff --git a/GeneralsMD/Code/Data/Art/W3D/TRMEHM_SKN.W3D b/GeneralsMD/Code/Data/Art/W3D/TRMEHM_SKN.W3D
new file mode 100644
index 000000000..d6a4eb351
Binary files /dev/null and b/GeneralsMD/Code/Data/Art/W3D/TRMEHM_SKN.W3D differ
diff --git a/GeneralsMD/Code/Data/INI/TurkiyeReforged.ini b/GeneralsMD/Code/Data/INI/TurkiyeReforged.ini
index b07a8bebe..83467630e 100644
--- a/GeneralsMD/Code/Data/INI/TurkiyeReforged.ini
+++ b/GeneralsMD/Code/Data/INI/TurkiyeReforged.ini
@@ -406,6 +406,159 @@ Object TurkiyeInfantryMehmetcik
InitialHealth = 200.0
End
End
+ ; His own model, TRMEHM_SKN (Code/Data/Art/W3D, drawn by experiments/proofs/2026-10-26/mehmetcik
+ ; in the workspace), is skinned to the Red Guard's skeleton, so this is EA's Red Guard draw module
+ ; with that model and without the bayonet states. Capturing a building still swaps in the Red
+ ; Guard's flag carrier, NICNSC_F_SKN. The Ranger's flash-bang and rappel states are gone with the
+ ; Ranger's draw: Turkiye never buys the grenade, and rappelling falls back to standing.
+ ReplaceModule ModuleTag_01
+ Draw = W3DModelDraw ModuleTag_01_Turkiye
+ OkToChangeModelColor = Yes
+ IgnoreConditionStates = PREATTACK_A FIRING_A BETWEEN_FIRING_SHOTS_A RELOADING_A
+ DefaultConditionState
+ Model = TRMEHM_SKN
+ IdleAnimation = NICNSC_SKL.NICNSC_STA 0 35
+ IdleAnimation = NICNSC_SKL.NICNSC_IDA
+ IdleAnimation = NICNSC_SKL.NICNSC_IDB
+ AnimationMode = ONCE
+ WeaponFireFXBone = PRIMARY Muzzle
+ WeaponMuzzleFlash = PRIMARY MuzzleFX
+ TransitionKey = TRANS_Stand
+ End
+ ConditionState = REALLYDAMAGED
+ IdleAnimation = NICNSC_SKL.NICNSC_STB
+ AnimationMode = ONCE
+ TransitionKey = TRANS_StandDamaged
+ End
+ ConditionState = USING_WEAPON_A
+ Animation = NICNSC_SKL.NICNSC_ATA
+ AnimationMode = LOOP
+ TransitionKey = TRANS_Firing
+ End
+ ConditionState = USING_WEAPON_A REALLYDAMAGED
+ Animation = NICNSC_SKL.NICNSC_ATC
+ AnimationMode = LOOP
+ TransitionKey = TRANS_FiringDamaged
+ End
+ TransitionState = TRANS_Firing TRANS_FiringDamaged
+ Animation = NICNSC_SKL.NICNSC_AA2AC
+ AnimationMode = ONCE
+ End
+ TransitionState = TRANS_Stand TRANS_Firing
+ Animation = NICNSC_SKL.NICNSC_SA2AA
+ AnimationMode = ONCE
+ End
+ TransitionState = TRANS_Firing TRANS_Stand
+ Animation = NICNSC_SKL.NICNSC_AA2SA
+ AnimationMode = ONCE
+ End
+ TransitionState = TRANS_StandDamaged TRANS_FiringDamaged
+ Animation = NICNSC_SKL.NICNSC_ATCST
+ AnimationMode = ONCE
+ End
+ TransitionState = TRANS_FiringDamaged TRANS_StandDamaged
+ Animation = NICNSC_SKL.NICNSC_ATCED
+ AnimationMode = ONCE
+ End
+ TransitionState = TRANS_Stand TRANS_StandDamaged
+ Animation = NICNSC_SKL.NICNSC_AA2SA
+ AnimationMode = ONCE_BACKWARDS
+ AnimationSpeedFactorRange = 4 5
+ Flags = START_FRAME_LAST
+ End
+ ConditionState = FREEFALL
+ Animation = NICNSC_SKL.NICNSC_POP
+ AnimationMode = MANUAL
+ Flags = START_FRAME_FIRST
+ TransitionKey = TRANS_Falling
+ End
+ AliasConditionState = FREEFALL REALLYDAMAGED
+ AliasConditionState = FREEFALL DYING
+ ConditionState = PARACHUTING
+ Animation = NICNSC_SKL.NICNSC_PHG
+ AnimationMode = LOOP
+ Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME
+ TransitionKey = TRANS_Chute
+ End
+ AliasConditionState = PARACHUTING REALLYDAMAGED
+ AliasConditionState = PARACHUTING DYING
+ TransitionState = TRANS_Falling TRANS_Chute
+ Animation = NICNSC_SKL.NICNSC_POP
+ AnimationMode = ONCE
+ Flags = PRISTINE_BONE_POS_IN_FINAL_FRAME
+ End
+ TransitionState = TRANS_Chute TRANS_Stand
+ Animation = NICNSC_SKL.NICNSC_PTD
+ AnimationMode = ONCE
+ End
+ ConditionState = MOVING
+ Animation = NICNSC_SKL.NICNSC_RNA 26
+ AnimationMode = LOOP
+ Flags = RANDOMSTART
+ TransitionKey = None
+ ParticleSysBone = None InfantryDustTrails
+ End
+ AliasConditionState = MOVING ATTACKING
+ ConditionState = MOVING REALLYDAMAGED
+ Animation = NICNSC_SKL.NICNSC_RNB 28
+ AnimationMode = LOOP
+ Flags = RANDOMSTART
+ TransitionKey = None
+ End
+ AliasConditionState = MOVING ATTACKING REALLYDAMAGED
+ ConditionState = UNPACKING
+ Model = NICNSC_F_SKN
+ Animation = NICNSC_F_SKL.NICNSC_F_FDP1
+ AnimationMode = ONCE
+ End
+ AliasConditionState = UNPACKING REALLYDAMAGED
+ ConditionState = RAISING_FLAG
+ Model = NICNSC_F_SKN
+ Animation = NICNSC_F_SKL.NICNSC_F_FDP2
+ AnimationMode = ONCE
+ TransitionKey = TRANS_Raising
+ End
+ AliasConditionState = RAISING_FLAG REALLYDAMAGED
+ ConditionState = PACKING
+ Model = NICNSC_F_SKN
+ Animation = NICNSC_F_SKL.NICNSC_F_FDP1
+ AnimationMode = ONCE_BACKWARDS
+ Flags = START_FRAME_LAST
+ TransitionKey = TRANS_Packing
+ End
+ AliasConditionState = PACKING REALLYDAMAGED
+ TransitionState = TRANS_Raising TRANS_Packing
+ Model = NICNSC_F_SKN
+ Animation = NICNSC_F_SKL.NICNSC_F_FDP2
+ AnimationMode = ONCE_BACKWARDS
+ Flags = START_FRAME_LAST
+ End
+ ConditionState = DYING
+ Animation = NICNSC_SKL.NICNSC_DTA
+ Animation = NICNSC_SKL.NICNSC_DTB
+ AnimationMode = ONCE
+ TransitionKey = TRANS_Dying
+ End
+ TransitionState = TRANS_Dying TRANS_Flailing
+ Animation = NICNSC_SKL.NICNSC_ATDE1
+ AnimationMode = ONCE
+ End
+ ConditionState = DYING EXPLODED_FLAILING
+ Animation = NICNSC_SKL.NICNSC_ATDE2
+ AnimationMode = LOOP
+ TransitionKey = TRANS_Flailing
+ End
+ ConditionState = DYING EXPLODED_BOUNCING
+ Animation = NICNSC_SKL.NICNSC_ATDE3
+ AnimationMode = ONCE
+ TransitionKey = None
+ End
+ ConditionState = SPECIAL_CHEERING
+ Animation = NICNSC_SKL.NICNSC_CHA
+ AnimationMode = LOOP
+ End
+ End
+ End
End
; The Istihkam takimi builds in place of a dozer. It is the GLA Worker's body and dozer AI without
diff --git a/GeneralsMD/Code/Data/Scenarios/mehmetcik.txt b/GeneralsMD/Code/Data/Scenarios/mehmetcik.txt
new file mode 100644
index 000000000..065a3b6c6
--- /dev/null
+++ b/GeneralsMD/Code/Data/Scenarios/mehmetcik.txt
@@ -0,0 +1,22 @@
+# TurkiyeInfantryMehmetcik on his own model, TRMEHM_SKN on the Red Guard's skeleton: two of them
+# stand, walk east, shoot three Rebels and are then run down by two Technicals, so idle, move,
+# fire, injured and death all play. Frames are retail frames, 30 a second.
+#
+# cd source\GeneralsMD\Run
+# .\generals.exe -headless -quickstart -noshellmap -observer -multiInstance -noFPSLimit
+# -map "Maps\Alpine Assault\Alpine Assault.map" -autoskirmish 2 -takeover
+# -side 0 FactionTurkiye -side 1 FactionGLA -seed 1 -maxframes 3600
+# -scenario mehmetcik -logPrefix mehmetcik_
+#
+# For a look, -win -fps 120 -noFPSLimit in place of -headless and -camera 900 935.
+
+30 spawn 0 TurkiyeInfantryMehmetcik 2 760 920
+60 tally 0 TurkiyeInfantryMehmetcik
+300 move 0 TurkiyeInfantryMehmetcik 900 920
+600 spawn 1 GLAInfantryRebel 3 1100 935 25
+630 attack 0 TurkiyeInfantryMehmetcik 1 GLAInfantryRebel
+900 tally 1 GLAInfantryRebel
+900 tally 0 TurkiyeInfantryMehmetcik
+1050 spawn 1 GLAVehicleTechnical 2 1150 900 40
+1080 attackmove 1 GLAVehicleTechnical* 900 935
+1700 tally 0 TurkiyeInfantryMehmetcik
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/System/FileSystem.cpp b/GeneralsMD/Code/GameEngine/Source/Common/System/FileSystem.cpp
index 26a63b790..804cb765b 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/System/FileSystem.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/System/FileSystem.cpp
@@ -563,6 +563,8 @@ Bool FileSystem::isForkOwnedPath(const AsciiString& filename)
|| starts("data\\turkish\\") || starts("data\\german\\")
|| starts("data\\ukrainian\\") || starts("data\\russian\\") || starts("data\\french\\")
|| starts("art\\textures\\reforged")
+ // Mehmetcik's own model; the texture keeps EA's ZHCA_ prefix, which is what takes the house colour
+ || p == "art\\w3d\\trmehm_skn.w3d" || p == "art\\textures\\zhca_trmehmet.tga"
|| starts("window\\")
|| p == "install_final.bmp";
}