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(gameengine): turkey faction on the american tree
Olcay Seygand288fed35160
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 49799b364..9b622485a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,11 @@ found and fixed — EA's own, not port damage.**---+## Turkey joins the fight++- Turkey is a fourth side in the skirmish and multiplayer lobbies. For now it fields the American army under its own name: the same buildings, tanks, aircraft and generals' powers, with the American voice, load screen and command bar. Its own units, art and powers come later and replace these one at a time.+- The computer plays Turkey too. A Turkish AI builds its base, sends trucks for supplies, trains an army, earns ranks and spends them on powers, and attacks the way an American AI does.+## Zero Hour on a Mac, on Linux and on the Steam Deck- The game runs on Apple silicon Macs and on Linux, the Steam Deck included, as a program built for that machine. There is no Wine or Proton underneath. It draws through Metal on a Mac and through Vulkan on Linux, from the same Zero Hour files you already own.diff --git a/GeneralsMD/Code/Data/INI/AIDataReforged.ini b/GeneralsMD/Code/Data/INI/AIDataReforged.ininew file mode 100644index 000000000..7b4a6b08c--- /dev/null+++ b/GeneralsMD/Code/Data/INI/AIDataReforged.ini@@ -0,0 +1,174 @@+; Zero Hour Reforged AI data for the fork's factions, loaded after AIData.ini with+; INI_LOAD_MULTIFILE. A SideInfo named again is edited, a new one is added; every+; SkirmishBuildList here is added.+;+; This file lands in the multiplayer INI checksum.++; Turkey's AI plays the SkirmishAmerica scripts, and those queue buildings by name:+; AISkirmishPlayer::buildSpecificAIBuilding compares the script's name with the build list's as+; strings. So Turkey's build list is America's, American names and all. Each Turkey object is a+; reskin of the American one (TurkeyReforged.ini), so a Turkey dozer or factory asked for the+; American name puts up its own button's Turkey building or unit instead+; (BuildAssistant::findBuildButtonTemplate), and the command center adjustBuildList rebuilds in+; place of the starting one is picked by side (AIPlayer::buildStructureNow).++AIData++ SideInfo Turkey+ ResourceGatherersEasy = 2+ ResourceGatherersNormal = 2+ ResourceGatherersHard = 2+ BaseDefenseStructure1 = AmericaPatriotBattery++ SkillSet1+ Science = SCIENCE_PaladinTank+ Science = SCIENCE_StealthFighter+ Science = SCIENCE_A10ThunderboltMissileStrike1+ Science = SCIENCE_A10ThunderboltMissileStrike2+ Science = SCIENCE_A10ThunderboltMissileStrike3+ Science = SCIENCE_SpectreGunshipSolo+ Science = SCIENCE_DaisyCutter+ End++ SkillSet2+ Science = SCIENCE_PaladinTank+ Science = SCIENCE_StealthFighter+ Science = SCIENCE_Pathfinder+ Science = SCIENCE_Paradrop1+ Science = SCIENCE_Paradrop2+ Science = SCIENCE_Paradrop3+ Science = SCIENCE_DaisyCutter+ End++ End++ SkirmishBuildList Turkey+ Structure AmericaCommandCenter+ Location = X:501.22 Y:546.25+ Rebuilds = 0+ Angle = -135.00+ InitiallyBuilt = No+ AutomaticallyBuild = Yes+ END+ Structure AmericaPowerPlant+ Location = X:770.43 Y:727.79+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaPowerPlant+ Location = X:759.90 Y:555.84+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaPowerPlant+ Location = X:374.82 Y:371.69+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaPowerPlant+ Location = X:477.11 Y:174.62+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaPowerPlant+ Location = X:189.19 Y:522.00+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaPowerPlant+ Location = X:418.35 Y:827.10+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaAirfield+ Location = X:767.04 Y:376.40+ Rebuilds = 0+ Angle = -135.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaBarracks+ Location = X:247.52 Y:734.59+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaParticleCannonUplink+ Location = X:594.59 Y:635.72+ Rebuilds = 0+ Angle = -45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaStrategyCenter+ Location = X:384.36 Y:652.24+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaSupplyDropZone+ Location = X:515.66 Y:347.88+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaSupplyDropZone+ Location = X:637.41 Y:490.20+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaSupplyDropZone+ Location = X:488.83 Y:760.27+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaSupplyDropZone+ Location = X:322.39 Y:502.03+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaWarFactory+ Location = X:650.93 Y:843.45+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaWarFactory+ Location = X:259.56 Y:289.71+ Rebuilds = 0+ Angle = -135.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ Structure AmericaPatriotBattery+ Location = X:676.07 Y:670.51+ Rebuilds = 0+ Angle = 45.00+ InitiallyBuilt = No+ AutomaticallyBuild = No+ END+ END++Enddiff --git a/GeneralsMD/Code/Data/INI/CommandSetReforged.ini b/GeneralsMD/Code/Data/INI/CommandSetReforged.iniindex 006f1ffab..2aae0d871 100644--- a/GeneralsMD/Code/Data/INI/CommandSetReforged.ini+++ b/GeneralsMD/Code/Data/INI/CommandSetReforged.ini@@ -367,3 +367,306 @@ CommandSet Demo_GLACommandCenterCommandSetUpgrade13 = Command_SetRallyPoint14 = Command_SellEnd++; ==== Turkey ======================================================================================++; The Turkey faction's buttons and sets (TurkeyReforged.ini). Each button is EA's American one with+; Object pointing at the Turkey reskin, so it keeps the American cameo, label and tooltip. Each set+; is the American set with the cloned buildings and units swapped in; the slots for things Turkey+; has no copy of (Paladin, Aurora, Burton and the rest) keep EA's American buttons, which build the+; American unit for a Turkey player. The science and shortcut sets are the American ones under+; Turkey's name, since Turkey buys the American powers.++CommandButton Command_ConstructTurkeyCommandCenter+ Command = DOZER_CONSTRUCT+ Object = TurkeyCommandCenter+ TextLabel = CONTROLBAR:ConstructAmericaCommandCenter+ ButtonImage = SAComCentr+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildCommandCenter+End++CommandButton Command_ConstructTurkeyPowerPlant+ Command = DOZER_CONSTRUCT+ Object = TurkeyPowerPlant+ TextLabel = CONTROLBAR:ConstructAmericaPowerPlant+ ButtonImage = SAPowerPlant+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildPowerPlant+End++CommandButton Command_ConstructTurkeySupplyCenter+ Command = DOZER_CONSTRUCT+ Object = TurkeySupplyCenter+ TextLabel = CONTROLBAR:ConstructAmericaSupplyCenter+ ButtonImage = SASupplyCntr+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildSupplyCenter+End++CommandButton Command_ConstructTurkeySupplyDropZone+ Command = DOZER_CONSTRUCT+ Object = TurkeySupplyDropZone+ TextLabel = CONTROLBAR:ConstructAmericaSupplyDropZone+ ButtonImage = SADropZone+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildSupplyDropZone+End++CommandButton Command_ConstructTurkeyBarracks+ Command = DOZER_CONSTRUCT+ Object = TurkeyBarracks+ TextLabel = CONTROLBAR:ConstructAmericaBarracks+ ButtonImage = SABarracks+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildBarracks+End++CommandButton Command_ConstructTurkeyWarFactory+ Command = DOZER_CONSTRUCT+ Object = TurkeyWarFactory+ TextLabel = CONTROLBAR:ConstructAmericaWarFactory+ ButtonImage = SACWeaponsfact+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildWarFactory+End++CommandButton Command_ConstructTurkeyAirfield+ Command = DOZER_CONSTRUCT+ Object = TurkeyAirfield+ TextLabel = CONTROLBAR:ConstructAmericaAirfield+ ButtonImage = SAACommand+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildAirField+End++CommandButton Command_ConstructTurkeyStrategyCenter+ Command = DOZER_CONSTRUCT+ Object = TurkeyStrategyCenter+ TextLabel = CONTROLBAR:ConstructAmericaStrategyCenter+ ButtonImage = SAStrategyCenter+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildStrategyCenter+End++CommandButton Command_ConstructTurkeyParticleCannonUplink+ Command = DOZER_CONSTRUCT+ Object = TurkeyParticleCannonUplink+ TextLabel = CONTROLBAR:ConstructAmericaParticleCannonUplink+ ButtonImage = SAUplink+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildParticleCannon+End++CommandButton Command_ConstructTurkeyPatriotBattery+ Command = DOZER_CONSTRUCT+ Object = TurkeyPatriotBattery+ TextLabel = CONTROLBAR:ConstructAmericaPatriotBattery+ ButtonImage = SAPatriot+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildPatriotBattery+End++CommandButton Command_ConstructTurkeyFireBase+ Command = DOZER_CONSTRUCT+ Object = TurkeyFireBase+ TextLabel = CONTROLBAR:ConstructAmericaFireBase+ ButtonImage = SAFirebase+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildFireBase+End++CommandButton Command_ConstructTurkeyDozer+ Command = UNIT_BUILD+ Object = TurkeyVehicleDozer+ TextLabel = CONTROLBAR:ConstructAmericaDozer+ ButtonImage = SACDozer+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildDozer+End++CommandButton Command_ConstructTurkeyVehicleChinook+ Command = UNIT_BUILD+ Object = TurkeyVehicleChinook+ TextLabel = CONTROLBAR:ConstructAmericaVehicleChinook+ ButtonImage = SAChinook+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABUildChinook+End++CommandButton Command_ConstructTurkeyInfantryRanger+ Command = UNIT_BUILD+ Object = TurkeyInfantryRanger+ TextLabel = CONTROLBAR:ConstructAmericaInfantryRanger+ ButtonImage = SARanger+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildRanger+End++CommandButton Command_ConstructTurkeyInfantryMissileDefender+ Command = UNIT_BUILD+ Object = TurkeyInfantryMissileDefender+ TextLabel = CONTROLBAR:ConstructAmericaInfantryMissileDefender+ ButtonImage = SAMissleDefender+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildMissileDefender+End++CommandButton Command_ConstructTurkeyTankCrusader+ Command = UNIT_BUILD+ Object = TurkeyTankCrusader+ TextLabel = CONTROLBAR:ConstructAmericaTankCrusader+ ButtonImage = SACLeopard+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildCrusader+End++CommandButton Command_ConstructTurkeyVehicleHumvee+ Command = UNIT_BUILD+ Object = TurkeyVehicleHumvee+ TextLabel = CONTROLBAR:ConstructAmericaVehicleHumvee+ ButtonImage = SAHummer+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildHumvee+End++CommandButton Command_ConstructTurkeyVehicleTomahawk+ Command = UNIT_BUILD+ Object = TurkeyVehicleTomahawk+ TextLabel = CONTROLBAR:ConstructAmericaVehicleTomahawk+ ButtonImage = SACTomahawk+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildTomahawk+End++CommandButton Command_ConstructTurkeyJetRaptor+ Command = UNIT_BUILD+ Object = TurkeyJetRaptor+ TextLabel = CONTROLBAR:ConstructAmericaJetRaptor+ ButtonImage = SACRaptor+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildRaptor+End++CommandButton Command_ConstructTurkeyVehicleComanche+ Command = UNIT_BUILD+ Object = TurkeyVehicleComanche+ TextLabel = CONTROLBAR:ConstructAmericaVehicleComanche+ ButtonImage = SACCommanche+ ButtonBorderType = BUILD+ DescriptLabel = CONTROLBAR:ToolTipUSABuildComanche+End++CommandSet TurkeyDozerCommandSet+ 1 = Command_ConstructTurkeyPowerPlant+ 2 = Command_ConstructTurkeyStrategyCenter+ 3 = Command_ConstructTurkeyBarracks+ 4 = Command_ConstructTurkeySupplyDropZone+ 5 = Command_ConstructTurkeySupplyCenter+ 6 = Command_ConstructTurkeyParticleCannonUplink+ 7 = Command_ConstructTurkeyPatriotBattery+ 8 = Command_ConstructTurkeyCommandCenter+ 9 = Command_ConstructTurkeyFireBase+ 11 = Command_ConstructTurkeyWarFactory+ 13 = Command_ConstructTurkeyAirfield+ 14 = Command_DisarmMinesAtPosition+End++CommandSet TurkeyCommandCenterCommandSet+ 1 = Command_ConstructTurkeyDozer+ 2 = Command_SpectreGunship+ 4 = Command_LeafletDrop+ 5 = Command_A10ThunderboltMissileStrike+ 6 = Command_Paradrop+ 7 = Command_SpyDrone+ 8 = Command_EmergencyRepair+ 9 = Command_DaisyCutter+ 10 = Command_SpySatelliteScan+ 13 = Command_SetRallyPoint+ 14 = Command_Sell+End++CommandSet TurkeySupplyCenterCommandSet+ 1 = Command_ConstructTurkeyVehicleChinook+ 13 = Command_SetRallyPoint+ 14 = Command_Sell+End++CommandSet TurkeyBarracksCommandSet+ 1 = Command_ConstructTurkeyInfantryRanger+ 2 = Command_ConstructTurkeyInfantryMissileDefender+ 3 = Command_ConstructAmericaInfantryColonelBurton+ 4 = Command_ConstructAmericaInfantryPathfinder+ 6 = Command_ConstructAmericaInfantryBiohazardTech+ 7 = Command_UpgradeAmericaRangerFlashBangGrenade+ 8 = Command_UpgradeAmericaRangerCaptureBuilding+ 13 = Command_SetRallyPoint+ 14 = Command_Sell+End++CommandSet TurkeyWarFactoryCommandSet+ 1 = Command_ConstructTurkeyTankCrusader+ 2 = Command_ConstructTurkeyVehicleTomahawk+ 3 = Command_ConstructTurkeyVehicleHumvee+ 4 = Command_ConstructAmericaVehicleMedic+ 5 = Command_ConstructAmericaVehiclePaladin+ 6 = Command_ConstructAmericaVehicleSentryDrone+ 7 = Command_ConstructAmericaVehicleAvenger+ 8 = Command_ConstructAmericaVehicleMicrowave+ 9 = Command_UpgradeAmericaSentryDroneGun+ 11 = Command_UpgradeAmericaTOWMissile+ 13 = Command_SetRallyPoint+ 14 = Command_Sell+End++CommandSet TurkeyAirfieldCommandSet+ 1 = Command_ConstructTurkeyJetRaptor+ 2 = Command_ConstructTurkeyVehicleComanche+ 3 = Command_ConstructAmericaJetAurora+ 4 = Command_ConstructAmericaJetStealthFighter+ 7 = Command_UpgradeComancheRocketPods+ 8 = Command_UpgradeAmericaLaserMissiles+ 9 = Command_UpgradeAmericaCountermeasures+ 10 = Command_UpgradeAmericaBunkerBusters+ 13 = Command_SetRallyPoint+ 14 = Command_Sell+End++CommandSet SCIENCE_Turkey_CommandSetRank1+ 1 = Command_PurchaseSciencePaladinTank+ 2 = Command_PurchaseScienceStealthFighter+ 3 = Command_PurchaseScienceSpyDrone+End++CommandSet SCIENCE_Turkey_CommandSetRank3+ 1 = Command_PurchaseSciencePathfinder+ 4 = Command_PurchaseScienceParadrop1+ 5 = Command_PurchaseScienceParadrop2+ 6 = Command_PurchaseScienceParadrop3+ 7 = Command_PurchaseScienceA10ThunderboltMissileStrike1+ 8 = Command_PurchaseScienceA10ThunderboltMissileStrike2+ 9 = Command_PurchaseScienceA10ThunderboltMissileStrike3+ 10 = Command_PurchaseScienceEmergencyRepair1+ 11 = Command_PurchaseScienceEmergencyRepair2+ 12 = Command_PurchaseScienceEmergencyRepair3+End++CommandSet SCIENCE_Turkey_CommandSetRank8+ 1 = Command_PurchaseScienceDaisyCutter+ 2 = Command_PurchaseScienceLeafletDrop+ 3 = Command_PurchaseScienceSpectreGunship+ 4 = Command_FAKECOMMAND_PurchaseScienceMOAB ; the slot has to exist; the button is SCRIPT_ONLY and hidden+End++CommandSet SpecialPowerShortcutTurkey+ 1 = Command_SpyDroneFromShortcut+ 2 = Command_ParadropFromShortcut+ 3 = Command_A10ThunderboltMissileStrikeFromShortcut+ 4 = Command_EmergencyRepairFromShortcut+ 5 = Command_DaisyCutterFromShortcut+ 6 = Command_FireParticleUplinkCannonFromShortcut+ 7 = Command_SpySatelliteScanFromShortcut+ 8 = Command_CIAIntelligenceFromShortcut+ 9 = Command_SpectreGunshipFromShortcut+ 10 = Command_LeafletDropFromShortcut+Enddiff --git a/GeneralsMD/Code/Data/INI/PlayerTemplateReforged.ini b/GeneralsMD/Code/Data/INI/PlayerTemplateReforged.ininew file mode 100644index 000000000..3025a1639--- /dev/null+++ b/GeneralsMD/Code/Data/INI/PlayerTemplateReforged.ini@@ -0,0 +1,41 @@+; Zero Hour Reforged factions, loaded after PlayerTemplate.ini with INI_LOAD_MULTIFILE: a new name+; is added after EA's templates, an existing one is edited in place.+;+; This file lands in the multiplayer INI checksum.++; Turkey is built on the American tree (TurkeyReforged.ini) and plays like an American general:+; BaseSide USA, the American sciences on top of its own SCIENCE_Turkey, and America's load screen,+; music and pictures until it has its own.++PlayerTemplate FactionTurkey+ Side = Turkey+ BaseSide = USA+ PlayableSide = Yes+ StartMoney = 0+ PreferredColor = R:255 G:0 B:0+ IntrinsicSciences = SCIENCE_AMERICA SCIENCE_Turkey+ PurchaseScienceCommandSetRank1 = SCIENCE_Turkey_CommandSetRank1+ PurchaseScienceCommandSetRank3 = SCIENCE_Turkey_CommandSetRank3+ PurchaseScienceCommandSetRank8 = SCIENCE_Turkey_CommandSetRank8+ SpecialPowerShortcutCommandSet = SpecialPowerShortcutTurkey+ SpecialPowerShortcutWinName = GenPowersShortcutBarUS.wnd+ SpecialPowerShortcutButtonCount = 10+ DisplayName = INI:FactionTurkey+ StartingBuilding = TurkeyCommandCenter+ StartingUnit0 = TurkeyVehicleDozer+ ScoreScreenImage = America_ScoreScreen+ LoadScreenImage = SAFactionLogoPage_US+ LoadScreenMusic = Load_USA+ ScoreScreenMusic = Score_USA+ FlagWaterMark = WatermarkUSA+ EnabledImage = SSObserverUSA+ BeaconName = MultiplayerBeacon+ SideIconImage = GameinfoAMRCA+ GeneralImage = USA_Logo+ OldFaction = No+ ArmyTooltip = TOOLTIP:BioStrategyLong_Turkey+ Features = GUI:BioFeatures_Turkey+ MedallionRegular = USAGeneral_slvr+ MedallionHilite = USAGeneral_blue+ MedallionSelect = USAGeneral_orng+Enddiff --git a/GeneralsMD/Code/Data/INI/ScienceReforged.ini b/GeneralsMD/Code/Data/INI/ScienceReforged.iniindex e64b69974..c5ba677f0 100644--- a/GeneralsMD/Code/Data/INI/ScienceReforged.ini+++ b/GeneralsMD/Code/Data/INI/ScienceReforged.ini@@ -30,3 +30,14 @@ Science Demo_SCIENCE_RebelAmbush3DisplayName = SCIENCE:GLARebelAmbush3Description = CONTROLBAR:Demo_ToolTipGLAScienceRebelAmbushEnd++; Turkey's side science, the way SCIENCE_AMERICA marks the Americans. FactionTurkey holds it beside+; SCIENCE_AMERICA (PlayerTemplateReforged.ini), so it buys the American powers today and a power of+; its own can name this as its prerequisite later. PlayerTemplateReforged.ini loads after this file+; and needs the name to exist.++Science SCIENCE_Turkey+ PrerequisiteSciences = None+ SciencePurchasePointCost = 0 ; not purchasable, as for SCIENCE_AMERICA+ IsGrantable = No+Enddiff --git a/GeneralsMD/Code/Data/INI/TurkeyReforged.ini b/GeneralsMD/Code/Data/INI/TurkeyReforged.ininew file mode 100644index 000000000..b65bca805--- /dev/null+++ b/GeneralsMD/Code/Data/INI/TurkeyReforged.ini@@ -0,0 +1,205 @@+; Zero Hour Reforged's Turkey faction, loaded after FixesReforged.ini with INI_LOAD_MULTIFILE.+;+; Every Turkey object is an ObjectReskin of the American one it is named after, followed by a+; patch block on the new name. The reskin copies the American template whole, as Balance and Fixes+; left it, and the patch then sets Side = Turkey and, where the building or dozer builds something,+; a Turkey command set. Nothing else is restated, so a later change to the American object reaches+; the Turkish one on the next load.+;+; A reskin counts as its source wherever the engine asks ThingTemplate::isEquivalentTo: a Turkey+; War Factory meets a prerequisite that names AmericaWarFactory, and a Turkey factory asked for an+; America-named unit by the skirmish scripts makes the Turkey one its button names+; (BuildAssistant::findBuildButtonTemplate). That is what lets a Turkey AI run the SkirmishAmerica+; scripts unchanged. A unit with no Turkey reskin yet keeps its American button and name.+;+; These are placeholders: American models, weapons, names and cameos under Turkish template names.+;+; This file lands in the multiplayer INI checksum.++ObjectReskin TurkeyCommandCenter AmericaCommandCenter+End++Object TurkeyCommandCenter+ Side = Turkey+ CommandSet = TurkeyCommandCenterCommandSet+End++ObjectReskin TurkeyPowerPlant AmericaPowerPlant+End++Object TurkeyPowerPlant+ Side = Turkey+End++; The Supply Center's free Chinook is a Turkey one.++ObjectReskin TurkeySupplyCenter AmericaSupplyCenter+End++Object TurkeySupplyCenter+ Side = Turkey+ CommandSet = TurkeySupplyCenterCommandSet+ ReplaceModule ModuleTag_12+ Behavior = SpawnBehavior ModuleTag_12_Turkey+ SpawnNumber = 1+ SpawnReplaceDelay = 9999+ SpawnTemplateName = TurkeyVehicleChinook+ OneShot = Yes+ CanReclaimOrphans = No+ SlavesHaveFreeWill = Yes+ End+ End+End++ObjectReskin TurkeySupplyDropZone AmericaSupplyDropZone+End++Object TurkeySupplyDropZone+ Side = Turkey+End++ObjectReskin TurkeyBarracks AmericaBarracks+End++Object TurkeyBarracks+ Side = Turkey+ CommandSet = TurkeyBarracksCommandSet+End++ObjectReskin TurkeyWarFactory AmericaWarFactory+End++Object TurkeyWarFactory+ Side = Turkey+ CommandSet = TurkeyWarFactoryCommandSet+End++ObjectReskin TurkeyAirfield AmericaAirfield+End++Object TurkeyAirfield+ Side = Turkey+ CommandSet = TurkeyAirfieldCommandSet+End++ObjectReskin TurkeyStrategyCenter AmericaStrategyCenter+End++Object TurkeyStrategyCenter+ Side = Turkey+End++ObjectReskin TurkeyParticleCannonUplink AmericaParticleCannonUplink+End++Object TurkeyParticleCannonUplink+ Side = Turkey+End++ObjectReskin TurkeyPatriotBattery AmericaPatriotBattery+End++Object TurkeyPatriotBattery+ Side = Turkey+End++ObjectReskin TurkeyFireBase AmericaFireBase+End++Object TurkeyFireBase+ Side = Turkey+End++ObjectReskin TurkeyVehicleDozer AmericaVehicleDozer+End++Object TurkeyVehicleDozer+ Side = Turkey+ CommandSet = TurkeyDozerCommandSet+End++ObjectReskin TurkeyVehicleChinook AmericaVehicleChinook+End++Object TurkeyVehicleChinook+ Side = Turkey+End++ObjectReskin TurkeyInfantryRanger AmericaInfantryRanger+End++Object TurkeyInfantryRanger+ Side = Turkey+End++ObjectReskin TurkeyInfantryMissileDefender AmericaInfantryMissileDefender+End++Object TurkeyInfantryMissileDefender+ Side = Turkey+End++ObjectReskin TurkeyTankCrusader AmericaTankCrusader+End++Object TurkeyTankCrusader+ Side = Turkey+End++ObjectReskin TurkeyVehicleHumvee AmericaVehicleHumvee+End++Object TurkeyVehicleHumvee+ Side = Turkey+End++ObjectReskin TurkeyVehicleTomahawk AmericaVehicleTomahawk+End++Object TurkeyVehicleTomahawk+ Side = Turkey+End++ObjectReskin TurkeyJetRaptor AmericaJetRaptor+End++Object TurkeyJetRaptor+ Side = Turkey+End++ObjectReskin TurkeyVehicleComanche AmericaVehicleComanche+End++Object TurkeyVehicleComanche+ Side = Turkey+End++; The Reinforcement Pad picks its convoy by the owner's side and had none for Turkey. It sends+; Turkey the plain American one.++Object TechReinforcementPad+ ReplaceModule ModuleTag_05+ Behavior = OCLUpdate ModuleTag_05_Turkey ; Context window is a reaction to this, no CommandSet+ MinDelay = 120000+ MaxDelay = 120000+ CreateAtEdge = Yes ; as opposed to just creating on self++ FactionTriggered = Yes ; This requires a controlling player before it works+ FactionOCL = Faction:America OCL:OCL_ReinforcementPadUSAVehicle+ FactionOCL = Faction:AmericaSuperWeaponGeneral OCL:OCL_SWGen_ReinforcementPadUSAVehicle+ FactionOCL = Faction:AmericaLaserGeneral OCL:OCL_LGen_ReinforcementPadUSAVehicle+ FactionOCL = Faction:AmericaAirForceGeneral OCL:OCL_AFGen_ReinforcementPadUSAVehicle+ FactionOCL = Faction:Turkey OCL:OCL_ReinforcementPadUSAVehicle++ FactionOCL = Faction:China OCL:OCL_ReinforcementPadCHIVehicle+ FactionOCL = Faction:ChinaTankGeneral OCL:OCL_TnkGen_ReinforcementPadCHIVehicle+ FactionOCL = Faction:ChinaInfantryGeneral OCL:OCL_InfGen_ReinforcementPadCHIVehicle+ FactionOCL = Faction:ChinaNukeGeneral OCL:OCL_NukeGen_ReinforcementPadCHIVehicle++ FactionOCL = Faction:GLA OCL:OCL_ReinforcementPadGLAVehicle+ FactionOCL = Faction:GLAToxinGeneral OCL:OCL_ToxGen_ReinforcementPadGLAVehicle+ FactionOCL = Faction:GLADemolitionGeneral OCL:OCL_DemoGen_ReinforcementPadGLAVehicle+ FactionOCL = Faction:GLAStealthGeneral OCL:OCL_StlthGen_ReinforcementPadGLAVehicle+ End+ End+Enddiff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex 9ba1732cb..9e3cb1540 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -1750,3 +1750,21 @@ ENDCONTROLBAR:Demo_ToolTipGLAScienceRebelAmbush"Allows you to create a surprise ambush of Rebels anywhere \n \n Rank 1: 4 Rebels \n Rank 2: 6 Rebels \n Rank 3: 10 Rebels \n \n Deploy from: Command Center"END++// The Turkey faction (PlayerTemplateReforged.ini). Its units still wear the American names.++INI:FactionTurkey+"Turkey"+END++SIDE:Turkey+"Turkey"+END++TOOLTIP:BioStrategyLong_Turkey+"Turkey fields the American arsenal for now while its own army is being built"+END++GUI:BioFeatures_Turkey+"American units and powers \n Placeholder faction"+ENDdiff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex c445baa25..76c7e8583 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -16124,3 +16124,19 @@ ENDCONTROLBAR:Demo_ToolTipGLAScienceRebelAmbush"Her yerde Asilerle ani bir pusu kurmanızı sağlar \n \n Seviye 1: 4 Asi \n Seviye 2: 6 Asi \n Seviye 3: 10 Asi \n \n Çağrıldığı yer: Komuta Merkezi"END++INI:FactionTurkey+"Türkiye"+END++SIDE:Turkey+"Türkiye"+END++TOOLTIP:BioStrategyLong_Turkey+"Türkiye kendi ordusu hazırlanana kadar ABD cephaneliğiyle savaşır"+END++GUI:BioFeatures_Turkey+"ABD birlikleri ve güçleri \n Geçici taraf"+ENDdiff --git a/GeneralsMD/Code/GameEngine/Include/Common/PlayerTemplate.h b/GeneralsMD/Code/GameEngine/Include/Common/PlayerTemplate.hindex 68361715b..b0d4bdebf 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/PlayerTemplate.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/PlayerTemplate.h@@ -221,7 +221,10 @@ public:const PlayerTemplate* findPlayerTemplate(NameKeyType namekey) const;inline Int getPlayerTemplateCount() const { return m_playerTemplates.size(); }Int getTemplateNumByName(AsciiString name) const;-+ /// The Side of the original faction (OldFaction) built on this BaseSide - "America" for "USA". Data+ /// written per side (skirmish scripts, Eva lines, bar schemes) has nothing for the fork's own factions, so they borrow it.+ AsciiString getOldFactionSide(const AsciiString& baseSide) const;+// This function will fill outStringList with all the sides found in all the templatesvoid getAllSideStrings(AsciiStringList *outStringList);diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cppindex c85a11e90..8fd3b2714 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/GameEngine.cpp@@ -1100,6 +1100,8 @@ void GameEngine::init( int argc, char *argv[] )initSubsystem(TheCaveSystem,"TheCaveSystem", MSGNEW("GameEngineSubsystem") CaveSystem(), NULL);initSubsystem(TheRankInfoStore,"TheRankInfoStore", MSGNEW("GameEngineSubsystem") RankInfoStore(), &xferCRC, NULL, "Data\\INI\\Rank.ini");initSubsystem(ThePlayerTemplateStore,"ThePlayerTemplateStore", MSGNEW("GameEngineSubsystem") PlayerTemplateStore(), &xferCRC, "Data\\INI\\Default\\PlayerTemplate.ini", "Data\\INI\\PlayerTemplate.ini");+ // The fork's own factions: a new name is added after EA's, an existing one is edited in place+ ini.load( AsciiString( "Data\\INI\\PlayerTemplateReforged.ini" ), INI_LOAD_MULTIFILE, &xferCRC );initSubsystem(TheParticleSystemManager,"TheParticleSystemManager", createParticleSystemManager(), NULL);#ifdef DUMP_PERF_STATS///////////////////////////////////////////////////////////////////////////@@ -1149,6 +1151,8 @@ void GameEngine::init( int argc, char *argv[] )/* Mistakes in EA's data for the nine generals, patched the same way: a copy that missed theoriginal'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 );+ // Turkey's objects, reskins of the American ones, so they come after the balance and fixes they copy+ ini.load( AsciiString( "Data\\INI\\TurkeyReforged.ini" ), INI_LOAD_MULTIFILE, &xferCRC );#ifdef DUMP_PERF_STATS///////////////////////////////////////////////////////////////////////////GetPrecisionTimer(&endTime64);//////////////////////////////////////////////////////////////////@@ -1173,6 +1177,8 @@ void GameEngine::init( int argc, char *argv[] )initSubsystem(TheAI,"TheAI", MSGNEW("GameEngineSubsystem") AI(), &xferCRC, "Data\\INI\\Default\\AIData.ini", "Data\\INI\\AIData.ini");+ // SideInfo and SkirmishBuildList for the fork's factions: a side named again is edited, a new one added+ ini.load( AsciiString( "Data\\INI\\AIDataReforged.ini" ), INI_LOAD_MULTIFILE, &xferCRC );initSubsystem(TheGameLogic,"TheGameLogic", createGameLogic(), NULL);initSubsystem(TheTeamFactory,"TheTeamFactory", MSGNEW("GameEngineSubsystem") TeamFactory(), NULL);initSubsystem(TheCrateSystem,"TheCrateSystem", MSGNEW("GameEngineSubsystem") CrateSystem(), &xferCRC, "Data\\INI\\Default\\Crate.ini", "Data\\INI\\Crate.ini");diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cppindex 9f9f8bdc1..68ca4ae47 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp@@ -863,6 +863,29 @@ void Player::setDefaultTeam(void) {}}+//=============================================================================+static Int findSkirmishSideNamed(const AsciiString& side)+{+ for (Int i = 0; i < TheSidesList->getNumSkirmishSides(); ++i)+ {+ const PlayerTemplate* spt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(TheSidesList->getSkirmishSideInfo(i)->getDict()->getAsciiString(TheKey_playerFaction)));+ if (spt && spt->getSide() == side)+ return i;+ }+ return -1;+}++/* The skirmish player whose scripts and teams a computer seat of this side takes. A faction the+ map's skirmish scripts were never written for (the fork's own, Turkey) takes the scripts of the+ original faction it is built on. */+static Int findSkirmishSide(const AsciiString& side, const AsciiString& baseSide)+{+ Int i = findSkirmishSideNamed(side);+ if (i < 0)+ i = findSkirmishSideNamed(ThePlayerTemplateStore->getOldFactionSide(baseSide));+ return i;+}+//=============================================================================// This is called from PlayerList->newGame()//@@ -889,16 +912,7 @@ void Player::initFromDict(const Dict* d)// poorly-formed user maps might not, which would be bad, and could crash us later. so if it doesn't// actually have a skirmish player defined for this side, declare it nonskirmish... the player won't// really work, but it's better than crashing.- for (Int spIdx = 0; spIdx < TheSidesList->getNumSkirmishSides(); ++spIdx)- {- AsciiString spTemplateName = TheSidesList->getSkirmishSideInfo(spIdx)->getDict()->getAsciiString(TheKey_playerFaction);- const PlayerTemplate* spt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(spTemplateName));- if (spt && spt->getSide() == getSide())- {- skirmish = true;- break;- }- }+ skirmish = findSkirmishSide(getSide(), getBaseSide()) >= 0;DEBUG_ASSERTCRASH(skirmish, ("Could not find skirmish player for side %s... quietly making into nonskirmish.", getSide().str()));if (!skirmish)@@ -954,18 +968,12 @@ void Player::initFromDict(const Dict* d)// Copy and qualify scripts, and teams.AsciiString mySide = getSide();- Int i, skirmishNdx;- Bool found = false;+ Int i;+ Int skirmishNdx = findSkirmishSide(mySide, getBaseSide());+ Bool found = skirmishNdx >= 0;AsciiString qualTemplatePlayerName;- for (skirmishNdx=0; skirmishNdx<TheSidesList->getNumSkirmishSides(); skirmishNdx++) {- AsciiString templateName = TheSidesList->getSkirmishSideInfo(skirmishNdx)->getDict()->getAsciiString(TheKey_playerFaction);- pt = ThePlayerTemplateStore->findPlayerTemplate(NAMEKEY(templateName));- if (pt && pt->getSide() == mySide) {- qualTemplatePlayerName.format("%s%d", TheSidesList->getSkirmishSideInfo(skirmishNdx)->getDict()->getAsciiString(TheKey_playerName).str(), m_mpStartIndex);- found = true;- break;- }- }+ if (found)+ qualTemplatePlayerName.format("%s%d", TheSidesList->getSkirmishSideInfo(skirmishNdx)->getDict()->getAsciiString(TheKey_playerName).str(), m_mpStartIndex);Int diffInt = d->getInt(TheKey_skirmishDifficulty, &exists);GameDifficulty difficulty = TheScriptEngine->getGlobalDifficulty();if (exists)diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cppindex b3d42752b..808d746d6 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/PlayerTemplate.cpp@@ -314,6 +314,18 @@ Int PlayerTemplateStore::getTemplateNumByName(AsciiString name) constreturn -1;}+//-----------------------------------------------------------------------------+AsciiString PlayerTemplateStore::getOldFactionSide(const AsciiString& baseSide) const+{+ for (PlayerTemplateVector::const_iterator it = m_playerTemplates.begin(); it != m_playerTemplates.end(); ++it)+ {+ // Civilian and Observer are old factions with no BaseSide; a side with none borrows nothing+ if (it->isOldFaction() && !baseSide.isEmpty() && it->getBaseSide() == baseSide)+ return it->getSide();+ }+ return AsciiString::TheEmptyString;+}+//-----------------------------------------------------------------------------const PlayerTemplate* PlayerTemplateStore::findPlayerTemplate(NameKeyType namekey) const{diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Eva.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Eva.cppindex cb7226c80..a478b02e8 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Eva.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Eva.cpp@@ -31,6 +31,7 @@#include "Common/Player.h"#include "Common/PlayerList.h"+#include "Common/PlayerTemplate.h"#include "GameLogic/GameLogic.h"#ifdef _INTERNAL@@ -194,6 +195,15 @@ static void parseSideSoundsList( INI *ini, void *instance, void *store, const vosounds->push_back(newSounds);}+//-------------------------------------------------------------------------------------------------+static Int findSideSounds( const std::vector<EvaSideSounds> &sounds, const AsciiString &side )+{+ for (Int i = 0; i < (Int)sounds.size(); ++i)+ if (side.compareNoCase(sounds[i].m_side) == 0)+ return i;+ return -1;+}+//----------------------------------------------------------------------------------- EvaSideSoundsconst FieldParse EvaSideSounds::s_evaSideSounds[] ={@@ -529,22 +539,20 @@ void Eva::processPlayingMessages(UnsignedInt currentFrame)return;}- // We've got a winner!- AsciiString side = ThePlayerList->getLocalPlayer()->getSide();- Int numSides = storedIt->m_evaInfo->m_evaSideSounds.size();+ // We've got a winner! A side Eva.ini has no line for (the fork's own Turkey) speaks with the+ // original faction it is built on.+ const Player *localPlayer = ThePlayerList->getLocalPlayer();+ const std::vector<EvaSideSounds> &sideSounds = storedIt->m_evaInfo->m_evaSideSounds;+ Int found = findSideSounds(sideSounds, localPlayer->getSide());+ if (found < 0)+ found = findSideSounds(sideSounds, ThePlayerTemplateStore->getOldFactionSide(localPlayer->getBaseSide()));// clear it. If we can't find the side we want, don't play anythingm_evaSpeech.setEventName(AsciiString::TheEmptyString);- for (Int i = 0; i < numSides; ++i) {- if (side.compareNoCase(storedIt->m_evaInfo->m_evaSideSounds[i].m_side) == 0) {- // Its this one.- if (storedIt->m_evaInfo->m_evaSideSounds[i].m_soundNames.size() > 0) {- Int soundToPlay = GameClientRandomValue(0, storedIt->m_evaInfo->m_evaSideSounds[i].m_soundNames.size() - 1);- m_evaSpeech.setEventName(storedIt->m_evaInfo->m_evaSideSounds[i].m_soundNames[soundToPlay]);- }- break;- }+ if (found >= 0 && sideSounds[found].m_soundNames.size() > 0) {+ Int soundToPlay = GameClientRandomValue(0, sideSounds[found].m_soundNames.size() - 1);+ m_evaSpeech.setEventName(sideSounds[found].m_soundNames[soundToPlay]);}// Update the entrydiff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cppindex e337d0a5c..3837c0413 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarScheme.cpp@@ -1098,6 +1098,14 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayerTemplate( const PlayerT// picked again every time, even for the side on screen: a new resolution can want a different// scheme for it (findSchemeForSide), and the multiplier below is the screen'sControlBarScheme *tempScheme = findSchemeForSide( side );+ // a faction with no bar of its own (the fork's Turkey) wears the original faction's it is built on+ if(tempScheme == NULL)+ {+ side = ThePlayerTemplateStore->getOldFactionSide( pt->getBaseSide() );+ if(useSmall)+ side.concat("Small");+ tempScheme = findSchemeForSide( side );+ }DEBUG_LOG(("setControlBarSchemeByPlayer used %s as its side\n", side.str()));if(tempScheme)@@ -1139,6 +1147,12 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayer(Player *p)// picked again every time, even for the side on screen: a new resolution can want a different// scheme for it (findSchemeForSide), and the multiplier below is the screen'sControlBarScheme *tempScheme = findSchemeForSide( side );+ // a faction with no bar of its own (the fork's Turkey) wears the original faction's it is built on+ if(tempScheme == NULL)+ {+ side = ThePlayerTemplateStore->getOldFactionSide( p->getBaseSide() );+ tempScheme = findSchemeForSide( side );+ }DEBUG_LOG(("setControlBarSchemeByPlayer used %s as its side\n", side.str()));if(tempScheme)@@ -1157,7 +1171,7 @@ void ControlBarSchemeManager::setControlBarSchemeByPlayer(Player *p)}if(m_currentScheme)m_currentScheme->init();-}+}//-----------------------------------------------------------------------------diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cppindex 4943dbbb6..d568bd1ea 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/LoadScreen.cpp@@ -1369,13 +1369,13 @@ void MultiPlayerLoadScreen::init( GameInfo *game )}else{- // the main original factions don't have associated generals+ // the main original factions don't have associated generals; the fork's own (Turkey) wear the logo of the side they are built onAsciiString imageName;- if (pt->getName() == "FactionAmerica")+ if (pt->getBaseSide() == "USA")portrait = TheMappedImageCollection->findImageByName("SAFactionLogoLg_US");- else if (pt->getName() == "FactionGLA")+ else if (pt->getBaseSide() == "GLA")portrait = TheMappedImageCollection->findImageByName("SUFactionLogoLg_GLA");- else if (pt->getName() == "FactionChina")+ else if (pt->getBaseSide() == "China")portrait = TheMappedImageCollection->findImageByName("SNFactionLogoLg_China");elseDEBUG_ASSERTCRASH(NULL, ("Unexpected player template"));@@ -1654,13 +1654,13 @@ void GameSpyLoadScreen::init( GameInfo *game )}else{- // the main original factions don't have associated generals+ // the main original factions don't have associated generals; the fork's own (Turkey) wear the logo of the side they are built onAsciiString imageName;- if (pt->getName() == "FactionAmerica")+ if (pt->getBaseSide() == "USA")portrait = TheMappedImageCollection->findImageByName("SAFactionLogo144_US");- else if (pt->getName() == "FactionGLA")+ else if (pt->getBaseSide() == "GLA")portrait = TheMappedImageCollection->findImageByName("SUFactionLogo144_GLA");- else if (pt->getName() == "FactionChina")+ else if (pt->getBaseSide() == "China")portrait = TheMappedImageCollection->findImageByName("SNFactionLogo144_China");elseDEBUG_ASSERTCRASH(NULL, ("Unexpected player template"));