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.

fix(balance): trainings and born veterans give grades, not a level

Olcay Seygan88e9498dbe35
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c43c48361..395bb8452 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,7 @@ found and fixed, EA's own, not port damage.**
- America, China and GLA units now get what their rank ladder on the website promises. Rank has always raised a unit's stats; now certain grades also add a perk of their own, and the officers and leaders further up the ladder carry an aura that helps friendly units around them.
- Perks work on the unit itself: a GLA Fighter starts mending itself at 0.5% of its health a second, a Hardened Raider carries 8% more health, an American Private First Class the same. Aura kinds are rate of fire, damage taken, mending, sight, speed, experience, detection, resistance to EMP and paralysis, capture time and a share of kill value. They never touch the leader, and auras of one kind do not add up: a unit near three leaders takes the strongest of each kind.
- Auras start at the Elite rank: an American Warrant Officer (grade 13), a Chinese Second Lieutenant or a GLA Raid Captain (grade 10). Below that, whole squads of corporals and sergeants carried rings and buffed each other. A sergeant's old aura is now the same bonus on himself: a Chinese Master Sergeant Second Class (grade 8) takes 7% less damage while he holds his ground, an American Command Sergeant Major (grade 11) fires 10% faster, a GLA Squadhand (grade 6) runs 8% faster. Drill, steady and spoils have nothing to turn into and are gone below the officers; America's steady aura moved up to the W-2 Chief Warrant Officer (grade 14).
-- Red Guard Training lifts a new Red Guard three grades, to Corporal, where it used to make him a Veteran Sergeant with the horde bonus from his first second. The Infantry General's version lifts his Mini-Gunners three grades above Sergeant, where it made them Elite.
+- Red Guard Training lifts a new Red Guard three grades, to Corporal, where it used to make him a Veteran Sergeant with the horde bonus from his first second. Every other unit that came off the line a level up now comes three grades up for EA's Veteran and six for its Elite: Technicals and Inferno and Nuke Cannons with their trainings, a Battlemaster with Battlemaster Training on grade 6, and the Tank General's tanks and the Infantry General's infantry, who start three grades up. Two on one unit add up, so the Tank General's trained Battlemaster starts on grade 9 and the Infantry General's Mini-Gunner with Mini-Gunner Training on grade 6, both still Veteran where EA made them Elite.
- An American Second Lieutenant (grade 18) gives every friendly unit within 140 of it +12% rate of fire; a Captain two grades later heals them 1% of their health a second. A GLA Field Commander (grade 13) heals 1% a second at a radius of 140, and a Warlord (grade 15) speeds up every unit near it by 12%.
- Every aura a ranked leader gives draws its own ring on the ground, out at that aura's radius, so you can see which units each one covers. The rings are always there, nothing to select, under your leaders and the enemy's alike, and an enemy leader hidden in the fog, or stealthed and not detected, shows no ring. The rings borrow Turkiye's five patterns and tell the kinds apart by tint where two share a pattern. Detection draws none.
- The full tables, grade by grade, are on the Rank ladder page of the website.
@@ -106,7 +106,7 @@ found and fixed, EA's own, not port damage.**
- Three chevrons are now a whole army's ladder. An American unit climbs 28 promotions from E-1 Private to General of the Army, a Chinese one 19 from Private to General, a GLA one 20 from Recruit to Supreme Liberator. Every unit starts unranked with a bare health bar and no bonus; from the first promotion on, each grade wears its own insignia beside the health bar and floats it up over the unit's head the moment it is earned. Hover the portrait for the rank's name and how far the next one is: "Next rank 340/420 XP".
- The climb is long. The first promotion is one kill of a unit like your own, every step after costs a fixed share more, and the top is 120 such kills on every side: 12,000 experience for a Crusader. One kill lifts a unit one grade at most, so a Ranger who kills a tank early gets two grades out of it, not five. Six kills used to make a tank Heroic; now they make it an American Corporal, a Chinese Staff Sergeant or a GLA Hardened Raider.
- Every grade makes a unit a little better, on one curve for all three armies: rate of fire times damage times health is 1.13 times a regular's after the first kill, about 1.25 at Veteran, 1.6 at Elite, 2 at Heroic and 2.4 at the very top, where EA's Heroic gave 3.1 after six kills. Each army takes it its own way: America in rate of fire, health and up to 7% more range, China in health and a 10% faster horde, GLA in rate of fire, up to 14% more speed and up to 2% of its health mended a second once it has gone five seconds unhurt.
-- Veteran, Elite and Heroic still exist and still bring their weapons, voices and upgrades: America turns Veteran at Corporal, Elite at Warrant Officer and Heroic at Lieutenant Colonel; China at Sergeant, Second Lieutenant and Colonel; GLA at Raider, Raid Captain and Warlord. The trainings other than Red Guard Training, a pilot climbing into a vehicle, map-placed veterans and the Heroic cheat land on those ranks. A veterancy crate is worth three grades, never past Heroic, since one EA level is up to 42 kills on this ladder.
+- Veteran, Elite and Heroic still exist and still bring their weapons, voices and upgrades: America turns Veteran at Corporal, Elite at Warrant Officer and Heroic at Lieutenant Colonel; China at Sergeant, Second Lieutenant and Colonel; GLA at Raider, Raid Captain and Warlord. A pilot climbing into a vehicle, map-placed veterans and the Heroic cheat land on those ranks. A veterancy crate is worth three grades, never past Heroic, since one EA level is up to 42 kills on this ladder.
- Burton, Black Lotus and Jarmen Kell climb like everyone else but wear high rank from the start: Burton is a Colonel on his first day and a General of the Army at the top, Lotus goes from Colonel to General, Kell from Warlord to Supreme Liberator.
- Every general's army takes its side's ladder; civilians and other armies keep EA's three ranks. Replays recorded before this change play out differently.
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index 780061643..7507c9cb3 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -1865,12 +1865,17 @@ Armor DemoGenTerroristArmor
Armor = POISON 50%
End
-; Red Guard Training made every Red Guard a Veteran, Sergeant on the ladder, with his rank perks and
-; the horde bonus from the first second; the owner found it too much. It now lifts him three grades
-; from where he starts, to Corporal. The Infantry General's own training lifted his Mini-Gunners from
-; the Veteran his ModuleTag_03 gives them to Elite; it now lifts them three grades from that pin, to
-; Master Sergeant Third Class. StartingGrades takes StartingLevel's place on a ladder side, so the
-; lines carry no StartingLevel and the build button shows no chevron the unit does not get.
+; Every unit EA builds a level up is built some grades up instead: three where EA made it Veteran,
+; six where it made it Elite, the same three grades a veterancy crate gives for a level. Red Guard
+; Training made every Red Guard a Veteran, Sergeant on the ladder, with his rank perks and the horde
+; bonus from the first second; the owner found it too much, and the other trainings and the generals'
+; born veterans follow it. Two sources on one unit add up: the Tank General's Battlemaster with
+; Battlemaster Training is 3 + 6 = grade 9, the Infantry General's Mini-Gunner with Mini-Gunner
+; Training 3 + 3 = grade 6. StartingGrades takes StartingLevel's place on a ladder side, so the lines
+; carry no StartingLevel and the build button shows no chevron the unit does not get. Every template
+; here is China's or GLA's, so each has a ladder. An ObjectReskin copied its source's modules when
+; it loaded, so each Technical chassis needs its own block. The pilots keep their own rank and the
+; China Agent stays as EA made it.
Object ChinaInfantryRedguard
ReplaceModule ModuleTag_03
Behavior = VeterancyGainCreate ModuleTag_RedGuardTraining
@@ -1905,6 +1910,373 @@ Object Infa_ChinaInfantryMiniGunner
ScienceRequired = Infa_SCIENCE_RedGuardTraining
End
End
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+; The Infantry General's and the Tank General's born veterans: three grades.
+
+Object Infa_ChinaInfantryBlackLotus
+ ReplaceModule ModuleTag_18
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Infa_ChinaInfantryHacker
+ ReplaceModule ModuleTag_15
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Infa_ChinaInfantryTankHunter
+ ReplaceModule ModuleTag_13
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Infa_ChinaTankGattling
+ ReplaceModule ModuleTag_23
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankBattleMaster
+ ReplaceModule ModuleTag_14
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+ ReplaceModule ModuleVet_01
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 6
+ ScienceRequired = SCIENCE_BattlemasterTraining
+ End
+ End
+End
+
+Object Tank_ChinaTankDragon
+ ReplaceModule ModuleTag_14
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankECM
+ ReplaceModule ModuleTag_24
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankEmperor
+ ReplaceModule ModuleTag_23
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankGattling
+ ReplaceModule ModuleTag_23
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankOverlordBattleBunker
+ ReplaceModule ModuleTag_05
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankOverlordGattlingCannon
+ ReplaceModule ModuleTag_07
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+Object Tank_ChinaTankOverlordPropagandaTower
+ ReplaceModule ModuleTag_06
+ Behavior = VeterancyGainCreate ModuleTag_BornGrades
+ StartingGrades = 3
+ End
+ End
+End
+
+; Battlemaster Training, which made a Battlemaster Elite: six grades.
+
+Object ChinaTankBattleMaster
+ ReplaceModule ModuleVet_01
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 6
+ ScienceRequired = SCIENCE_BattlemasterTraining
+ End
+ End
+End
+
+Object Nuke_ChinaTankBattleMaster
+ ReplaceModule ModuleVet_01
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 6
+ ScienceRequired = SCIENCE_BattlemasterTraining
+ End
+ End
+End
+
+; Artillery Training, Inferno and Nuke Cannons: three grades.
+
+Object ChinaVehicleInfernoCannon
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_ArtilleryTraining
+ End
+ End
+End
+
+Object ChinaVehicleNukeLauncher
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_ArtilleryTraining
+ End
+ End
+End
+
+Object Infa_ChinaVehicleInfernoCannon
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_ArtilleryTraining
+ End
+ End
+End
+
+Object Infa_ChinaVehicleNukeLauncher
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_ArtilleryTraining
+ End
+ End
+End
+
+Object Nuke_ChinaVehicleInfernoCannon
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_ArtilleryTraining
+ End
+ End
+End
+
+Object Nuke_ChinaVehicleNukeLauncher
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_ArtilleryTraining
+ End
+ End
+End
+
+; Technical Training, every Technical and each chassis it rolls: three grades.
+
+Object GLAVehicleTechnical
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GLAVehicleTechnicalChassisOne
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GLAVehicleTechnicalChassisTwo
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GLAVehicleTechnicalChassisThree
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Chem_GLAVehicleTechnical
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Chem_GLAVehicleTechnicalChassisOne
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Chem_GLAVehicleTechnicalChassisTwo
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Chem_GLAVehicleTechnicalChassisThree
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Demo_GLAVehicleTechnical
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Demo_GLAVehicleTechnicalChassisOne
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Demo_GLAVehicleTechnicalChassisTwo
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Demo_GLAVehicleTechnicalChassisThree
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Slth_GLAVehicleTechnical
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Slth_GLAVehicleTechnicalChassisOne
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Slth_GLAVehicleTechnicalChassisTwo
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object Slth_GLAVehicleTechnicalChassisThree
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GC_Slth_GLAVehicleTechnical
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GC_Slth_GLAVehicleTechnicalChassisOne
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GC_Slth_GLAVehicleTechnicalChassisTwo
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
+End
+
+Object GC_Slth_GLAVehicleTechnicalChassisThree
+ ReplaceModule ModuleTag_03
+ Behavior = VeterancyGainCreate ModuleTag_TrainingGrades
+ StartingGrades = 3
+ ScienceRequired = SCIENCE_TechnicalTraining
+ End
+ End
End
; ---- the rank ladder ------------------------------------------------------------------------------
@@ -1917,10 +2289,10 @@ End
; promotion is one same-class kill, and r is solved so the top grade costs Top x E. One gain, a kill
; or a heal, lifts one grade at most. docs/plans/RANK-LADDER.md in the wrapper has the tables.
;
-; EA's four levels follow the grade: a unit is Veteran from VeteranPin on, and so on. Crates, the
-; other trainings, map objects, the rank cheat and scripts land on a pin; a veterancy crate gives
-; CrateGrades grades instead of one level, never past the Heroic pin, and Red Guard Training gives
-; its StartingGrades (the blocks just above). A hero's insignia starts on
+; EA's four levels follow the grade: a unit is Veteran from VeteranPin on, and so on. A pilot, map
+; objects, the rank cheat and scripts land on a pin; a veterancy crate gives CrateGrades grades
+; instead of one level, never past the Heroic pin, and the trainings and the generals' born veterans
+; give their StartingGrades (the blocks just above). A hero's insignia starts on
; HeroStart and reaches the top with the hero's last grade; its stats are its grade's like anyone's.
;
; Stats come from the grade in place of EA's VETERAN, ELITE and HERO lines and HealthBonus_*. Worth
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.str
index 654769f3f..af54f25c5 100644
--- a/GeneralsMD/Code/Data/Patch.str
+++ b/GeneralsMD/Code/Data/Patch.str
@@ -3584,7 +3584,28 @@ GUI:FactionPickSideNameHint
"Click a side's name to play a random army of that side."
END
-// Red Guard Training gives three grades on the rank ladder instead of a whole level.
+// The trainings and the generals' born veterans give grades on the rank ladder instead of a whole
+// level: three for EA's Veteran, six for its Elite.
+
+CONTROLBAR:ToolTipChinaScienceARtilleryTraining
+"Nuke Cannons and Inferno Cannons are built three ranks up"
+END
+
+CONTROLBAR:ToolTipGLAScienceTechnicalTraining
+"All Technicals will be created three ranks up"
+END
+
+CONTROLBAR:ToolTipChinaScienceBattlemasterTraining
+"All Battlemasters will be built six ranks up"
+END
+
+GUI:BioFeatures_Pos4
+"Emperor Tank \n Tank Drop \n All tanks start three ranks up \n Tanks cost less \n Aircraft cost more \n No Nuke or Inferno Cannons"
+END
+
+GUI:BioFeatures_Pos7
+"Assault Troop Transport \n Assault Helix \n Attack Outpost \n Fortified Bunkers \n Mini-Gunner \n Black Lotus hacks faster \n Hackers hack faster \n Mini-Gunner Paradrop \n All Infantry start three ranks up"
+END
CONTROLBAR:ToolTipChinaScienceRedGuardTraining
"All Red Guard will be built three ranks up, as Corporals"
diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.str
index e85d233e8..cc4b750f7 100644
--- a/GeneralsMD/Code/Data/Turkish/Generals.str
+++ b/GeneralsMD/Code/Data/Turkish/Generals.str
@@ -7354,7 +7354,7 @@ CONTROLBAR:ToolTipChinaScienceClusterMines
END
CONTROLBAR:ToolTipChinaScienceARtilleryTraining
-"Nükleer Toplar ve Cehennem Topları kıdemli olarak üretilir"
+"Nükleer Toplar ve Cehennem Topları üç rütbe yukarıda üretilir"
END
CONTROLBAR:ToolTipChinaScienceArtilleryBarrage
@@ -7378,7 +7378,7 @@ CONTROLBAR:ToolTipGLaScienceMarauderTank
END
CONTROLBAR:ToolTipGLAScienceTechnicalTraining
-"Tüm Silahlı Pikaplar kıdemli olarak üretilir"
+"Tüm Silahlı Pikaplar üç rütbe yukarıda üretilir"
END
CONTROLBAR:ToolTipGLAScienceRebelAmbush
@@ -13198,7 +13198,7 @@ CONTROLBAR:ToolTipChinaScienceTankHunterTraining
END
CONTROLBAR:ToolTipChinaScienceBattlemasterTraining
-"Tüm Battlemaster'lar seçkin olarak üretilir"
+"Tüm Battlemaster'lar altı rütbe yukarıda üretilir"
END
CONTROLBAR:ToolTipChinaScienceOverlordTraining
@@ -14342,7 +14342,7 @@ GUI:BioFeatures_Pos3
END
GUI:BioFeatures_Pos4
-"Emperor Tankı \n Tank İndirme \n Tüm tanklar kıdemli başlar \n Tanklar daha ucuz \n Hava araçları daha pahalı \n Nükleer Top ve Cehennem Topu yok"
+"Emperor Tankı \n Tank İndirme \n Tüm tanklar üç rütbe yukarıda başlar \n Tanklar daha ucuz \n Hava araçları daha pahalı \n Nükleer Top ve Cehennem Topu yok"
END
GUI:BioFeatures_Pos5
@@ -14354,7 +14354,7 @@ GUI:BioFeatures_Pos6
END
GUI:BioFeatures_Pos7
-"Taarruz Birlik Taşıyıcısı \n Taarruz Helix'i \n Saldırı Karakolu \n Tahkimli Sığınaklar \n Minigun Eri \n Black Lotus daha hızlı hackler \n Hacker'lar daha hızlı hackler \n Minigun Eri İndirme \n Tüm piyadeler kıdemli başlar"
+"Taarruz Birlik Taşıyıcısı \n Taarruz Helix'i \n Saldırı Karakolu \n Tahkimli Sığınaklar \n Minigun Eri \n Black Lotus daha hızlı hackler \n Hacker'lar daha hızlı hackler \n Minigun Eri İndirme \n Tüm piyadeler üç rütbe yukarıda başlar"
END
GUI:BioFeatures_Pos8
diff --git a/GeneralsMD/Code/Tests/test_rank_ladder.cpp b/GeneralsMD/Code/Tests/test_rank_ladder.cpp
index 394b007eb..aaf409f00 100644
--- a/GeneralsMD/Code/Tests/test_rank_ladder.cpp
+++ b/GeneralsMD/Code/Tests/test_rank_ladder.cpp
@@ -10,6 +10,7 @@
#include <math.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "Common/GlobalData.h"
@@ -473,10 +474,11 @@ TEST(rank_ladder_no_aura_below_the_elite_pin)
}
}
-TEST(rank_ladder_red_guard_training_gives_three_grades)
+TEST(rank_ladder_trainings_and_born_veterans_give_grades)
{
- /* every object Red Guard Training reaches gives three grades through StartingGrades and names no
- StartingLevel, or the build button would show a Veteran chevron the unit no longer gets */
+ /* every unit EA built Veteran or Elite is built 3 or 6 grades up through StartingGrades, two sources
+ on one unit adding up, and no block names a StartingLevel, or the build button would show a
+ chevron the unit no longer gets. The pilots and the China Agent stay on EA's level. */
FILE *fp = fopen( BALANCE_REFORGED_INI, "rb" );
CHECK( fp != NULL );
if( fp == NULL )
@@ -484,30 +486,54 @@ TEST(rank_ladder_red_guard_training_gives_three_grades)
static char text[ 1 << 20 ];
text[ fread( text, 1, sizeof( text ) - 1, fp ) ] = '\0';
fclose( fp );
- const char *const trained[] =
+ struct Born { const char *name; Int grades; } const born[] =
{
- "ChinaInfantryRedguard", "Nuke_ChinaInfantryRedguard", "Tank_ChinaInfantryRedguard", "Infa_ChinaInfantryMiniGunner",
+ { "ChinaInfantryRedguard", 3 }, { "Nuke_ChinaInfantryRedguard", 3 }, { "Tank_ChinaInfantryRedguard", 3 },
+ { "Infa_ChinaInfantryMiniGunner", 6 }, { "Infa_ChinaInfantryBlackLotus", 3 }, { "Infa_ChinaInfantryHacker", 3 },
+ { "Infa_ChinaInfantryTankHunter", 3 }, { "Infa_ChinaTankGattling", 3 },
+ { "Tank_ChinaTankBattleMaster", 9 }, { "Tank_ChinaTankDragon", 3 }, { "Tank_ChinaTankECM", 3 },
+ { "Tank_ChinaTankEmperor", 3 }, { "Tank_ChinaTankGattling", 3 }, { "Tank_ChinaTankOverlordBattleBunker", 3 },
+ { "Tank_ChinaTankOverlordGattlingCannon", 3 }, { "Tank_ChinaTankOverlordPropagandaTower", 3 },
+ { "ChinaTankBattleMaster", 6 }, { "Nuke_ChinaTankBattleMaster", 6 },
+ { "ChinaVehicleInfernoCannon", 3 }, { "ChinaVehicleNukeLauncher", 3 }, { "Infa_ChinaVehicleInfernoCannon", 3 },
+ { "Infa_ChinaVehicleNukeLauncher", 3 }, { "Nuke_ChinaVehicleInfernoCannon", 3 }, { "Nuke_ChinaVehicleNukeLauncher", 3 },
+ { "GLAVehicleTechnical", 3 }, { "GLAVehicleTechnicalChassisOne", 3 }, { "GLAVehicleTechnicalChassisTwo", 3 },
+ { "GLAVehicleTechnicalChassisThree", 3 }, { "Chem_GLAVehicleTechnical", 3 }, { "Chem_GLAVehicleTechnicalChassisOne", 3 },
+ { "Chem_GLAVehicleTechnicalChassisTwo", 3 }, { "Chem_GLAVehicleTechnicalChassisThree", 3 },
+ { "Demo_GLAVehicleTechnical", 3 }, { "Demo_GLAVehicleTechnicalChassisOne", 3 }, { "Demo_GLAVehicleTechnicalChassisTwo", 3 },
+ { "Demo_GLAVehicleTechnicalChassisThree", 3 }, { "Slth_GLAVehicleTechnical", 3 }, { "Slth_GLAVehicleTechnicalChassisOne", 3 },
+ { "Slth_GLAVehicleTechnicalChassisTwo", 3 }, { "Slth_GLAVehicleTechnicalChassisThree", 3 },
+ { "GC_Slth_GLAVehicleTechnical", 3 }, { "GC_Slth_GLAVehicleTechnicalChassisOne", 3 },
+ { "GC_Slth_GLAVehicleTechnicalChassisTwo", 3 }, { "GC_Slth_GLAVehicleTechnicalChassisThree", 3 },
};
- for( const char *name : trained )
+ for( const Born &unit : born )
{
+ /* every block of that name: the file may edit one object in more than one place */
char header[ 96 ];
- snprintf( header, sizeof( header ), "\nObject %s", name );
- const char *block = strstr( text, header );
- while( block && strchr( "\r\n", block[ strlen( header ) ] ) == NULL ) // not a longer name
- block = strstr( block + 1, header );
- CHECK( block != NULL );
- if( block == NULL )
- continue;
- const char *end = strstr( block + 1, "\nEnd" ); // the object's own End; a module's is indented
- const char *grades = strstr( block, "StartingGrades = 3" );
- const char *level = strstr( block, "StartingLevel" );
- CHECK( end != NULL && grades != NULL && grades < end );
- CHECK( level == NULL || level > end );
+ snprintf( header, sizeof( header ), "\nObject %s", unit.name );
+ Int grades = 0;
+ for( const char *block = strstr( text, header ); block; block = strstr( block + 1, header ) )
+ {
+ if( strchr( "\r\n", block[ strlen( header ) ] ) == NULL ) // a longer name
+ continue;
+ const char *end = strstr( block + 1, "\nEnd" ); // the object's own End; a module's is indented
+ CHECK( end != NULL );
+ if( end == NULL )
+ break;
+ for( const char *at = strstr( block, "StartingGrades = " ); at && at < end; at = strstr( at + 1, "StartingGrades = " ) )
+ grades += atoi( at + strlen( "StartingGrades = " ) );
+ const char *level = strstr( block, "StartingLevel" );
+ CHECK( level == NULL || level > end );
+ }
+ if( grades != unit.grades )
+ printf( " %s gives %d grades, not %d\n", unit.name, grades, unit.grades );
+ CHECK_EQ( grades, unit.grades );
}
- /* a Red Guard lands on Corporal, short of the Veteran pin; the Infantry General's Mini-Gunner,
- always Veteran, three grades above the pin and short of Elite */
+ /* a Red Guard lands on Corporal, short of the Veteran pin; a Battlemaster with Battlemaster
+ Training on grade 6, still Veteran where EA made it Elite */
const RankLadder prc = china();
CHECK_EQ( prc.levelOf( 3 ), LEVEL_REGULAR );
- CHECK_EQ( prc.levelOf( prc.m_pin[LEVEL_VETERAN] + 3 ), LEVEL_VETERAN );
+ CHECK_EQ( prc.levelOf( 6 ), LEVEL_VETERAN );
+ CHECK_EQ( prc.levelOf( 9 ), LEVEL_VETERAN );
}