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): rank perks and auras for america, china and gla
Olcay Seygand1f62807612b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5730edd35..6ba3bcce7 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,14 @@ found and fixed, EA's own, not port damage.**---+## What a rank gives++- 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.+- 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%.+- Select or hover a ranked leader and each aura it 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 borrow Turkiye's five patterns and tell the kinds apart by tint where two share a pattern. Detection draws none. Only you and your allies see them.+- The full tables, grade by grade, are on the Rank ladder page of the website.+## French- The language box under Options, Gameplay now offers Français after Русский. All 4722 lines the game shows are in French: menus, tooltips, briefings and subtitles in the words of EA's own French release, so unit names and orders read as French players have always known them, and every line Reforged added, its options, hotkeys, lobby, score screen and Turkiye included, translated to match.diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifestindex d450226cd..730ec51f4 100644--- a/GeneralsMD/Code/BuildFingerprint.manifest+++ b/GeneralsMD/Code/BuildFingerprint.manifest@@ -350,6 +350,7 @@ Data/Scenarios/rankauramaresal.txtData/Scenarios/rankauranight.txtData/Scenarios/rankaurareplay.txtData/Scenarios/rankaurasnow.txt+Data/Scenarios/rankaurawiki.txtData/Scenarios/rankladder.txtData/Scenarios/rankzero.txtData/Scenarios/reachshot.txtdiff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txtindex 4757f1c66..ae4247f77 100644--- a/GeneralsMD/Code/CMakeLists.txt+++ b/GeneralsMD/Code/CMakeLists.txt@@ -2412,6 +2412,9 @@ endif()add_lib_test(test_rank_ladder gameengine)target_sources(test_rank_ladder PRIVATE ${TESTS}/test_gameengine_stubs.cpp)set_target_properties(test_rank_ladder PROPERTIES CXX_STANDARD 17)+# the shipped Perk_ lines, read from the tracked master rather than Run/'s copy+target_compile_definitions(test_rank_ladder PRIVATE+ BALANCE_REFORGED_INI="${CMAKE_CURRENT_SOURCE_DIR}/Data/INI/BalanceReforged.ini")if(ZH_PLATFORM_POSIX)target_link_libraries(test_rank_ladder PRIVATE posixdevice w3ddevice)endif()diff --git a/GeneralsMD/Code/Data/French/Generals.str b/GeneralsMD/Code/Data/French/Generals.strindex 5ca2563f3..101fd9a62 100644--- a/GeneralsMD/Code/Data/French/Generals.str+++ b/GeneralsMD/Code/Data/French/Generals.str@@ -17846,7 +17846,7 @@ RANK:PerkSTILL_GUARDENDRANK:PerkMEND-"Hors combat : soigne %d %% par seconde"+"Hors combat : soigne %d,%02d %% par seconde"ENDRANK:PerkSPOTTERdiff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.iniindex 621ae09ea..b08a63dd9 100644--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini@@ -1891,11 +1891,14 @@ End; America: rate of fire and health, range to 107%.; China: health, and ranked men in a horde fire 10% faster.; GLA: rate of fire, speed to 114%, self repair to 2% a second.-; Turkiye: health first, then rate of fire, range to 112%, and the only side with perks so far.+; Turkiye: health first, then rate of fire, range to 112%.;-; A grade can carry perks besides its stats, one Perk_<side> line each: grade, kind, strength. A-; grade holds every perk of the grades below it, and of one kind the strongest, so Turkiye's sight-; goes 110%, 120%, 130% with each line replacing the last. A grade with no line is stats only.+; A grade can carry perks besides its stats, one Perk_<side> line each: grade, kind, strength, and+; for an aura its own radius and who it reaches. A grade holds every perk of the grades below it,+; and of one kind the strongest, so Turkiye's sight goes 110%, 120%, 130% with each line replacing+; the last. A line as strong as the one before replaces it with its radius and receivers; a line with+; no radius keeps the one before it. A grade with no line is stats only. The site's /wiki/ranks+; describes the America, China and GLA ladders below; all of it is here but GLA's Ambush.;; SIGHT 110% its own shroud clearing, past the half-again-its-weapon cap; STILL_GUARD 10% 10% less damage taken while it is not walking a path@@ -1904,15 +1907,33 @@ End; SCATTER 15% its own weapons scatter 15% less; DEATH_RALLY 15% when it dies, allies within its aura radius take 15% less damage for RallyTime; DETECT 100 stealthed enemies within 100 are detected-; AURA_RADIUS 200% its aura radius doubled-; AURA_<kind> n% friendly units within AuraRadius: RATE_OF_FIRE added to rate of fire (never-; past AuraRateOfFireCap), SIGHT on shroud clearing, GUARD off damage taken,-; RANGE on an artillery weapon's range (AcquiresBeyondVision, or a minimum range)+; AURA_RADIUS 200% every aura radius it gives doubled, DETECT's excepted+; RATE_OF_FIRE 5% its own rate of fire +5% on top of the grade's+; RANGE 3% its own range +3% on top of the grade's+; HEALTH 8% its max health +8% on top of the grade's+; SPEED 5% its speed +5% on top of the grade's+; LAST_STAND 25% its rate of fire +25% while under 35% health+; SCAVENGE 10% each kill it scores pays its player 10% of the victim's cost+; DESIGNATE 2 what it hurts wears FAERIE_FIRE for 2 s: everyone shooting at it fires at+; GameData's TARGET_FAERIE_FIRE rate (150%)+; DESIGNATE_REVEAL the mark detects a stealthed target for as long+; SALVAGE_CRATE on death it leaves a SalvageCrate+; AURA_<kind> n% [radius] [INFANTRY | STRUCTURES]+; friendly units within the radius (AuraRadius without one): RATE_OF_FIRE+; added to rate of fire (never past AuraRateOfFireCap), SIGHT on shroud+; clearing, GUARD off damage taken, RANGE on an artillery weapon's range+; (AcquiresBeyondVision, or a minimum range), MEND heals a second hurt or not,+; PACE on speed, DRILL n teaches DrillRate of a unit's E a second up to grade n+; of its own ladder, STEADY off a timed paralysis or EMP and on subdual wearing+; off, CAPTURE off the time to take a building, SPOILS a share of the victim's+; cost for each kill a unit in range scores (the larger of it and SCAVENGE);; Auras are refilled once a second. A unit in range of several leaders takes the strongest of each-; kind; kinds multiply. A leader's aura never reaches the leader, and buildings take none. AuraRadius-; is 150, the reach of a tank gun: a Maresal's 300 covers a company. Each kind draws a ring on the-; ground under a selected or hovered leader for its owner and allies (AuraRing_<kind>, client only).+; kind; kinds multiply. A leader's aura never reaches the leader, and buildings take none unless the+; line says STRUCTURES. Turkiye's AuraRadius is 150, the reach of a tank gun: a Maresal's 300 covers+; a company. The other three sides give each aura line its own radius, the wiki's. Each kind with an+; AuraRing_<kind> draws a ring on the ground under a selected or hovered leader for its owner and+; allies (client only).Veterancy; America China GLA Turkiye@@ -1949,11 +1970,89 @@ VeterancyPerk_Turkiye = 19 AURA_GUARD 10% ; KorgeneralPerk_Turkiye = 20 AURA_RANGE 5% ; OrgeneralPerk_Turkiye = 21 AURA_RADIUS 200% ; Maresal++ Perk_America = 1 RATE_OF_FIRE 5% ; E-2 Private: Drilled+ Perk_America = 2 RANGE 3% ; E-3 Private First Class: Steady hands+ Perk_America = 3 MEND 0.5% ; E-4 Specialist: Field kit+ Perk_America = 4 AURA_RATE_OF_FIRE 5% 80 ; E-4 Corporal: Fire team+ Perk_America = 5 SIGHT 120% ; E-5 Sergeant: Eyes+ Perk_America = 6 AURA_MEND 0.5% 80 INFANTRY ; E-6 Staff Sergeant: Combat lifesaver+ Perk_America = 7 AURA_RATE_OF_FIRE 8% 100 ; E-7 Sergeant First Class+ Perk_America = 8 AURA_DRILL 4 100 ; E-8 Master Sergeant: up to Corporal+ Perk_America = 9 AURA_STEADY 20% 100 ; E-8 First Sergeant+ Perk_America = 10 AURA_DRILL 6 120 ; E-9 Sergeant Major: up to Staff Sergeant+ Perk_America = 11 AURA_RATE_OF_FIRE 10% 120 ; E-9 Command Sergeant Major+ Perk_America = 12 AURA_STEADY 35% 140 ; E-9 Sergeant Major of the Army+ Perk_America = 13 AURA_MEND 0.75% 100 ; W-1 Warrant Officer: Technician, vehicles too+ Perk_America = 14 RANGE 6% ; W-2: Calibrated, 3% more+ Perk_America = 15 SCATTER 50% ; W-3: Precision+ Perk_America = 16 AURA_SIGHT 15% 120 ; W-4: Spotter+ Perk_America = 17 DETECT 75 ; W-5: Sensor+ Perk_America = 18 AURA_RATE_OF_FIRE 12% 140 ; O-1 Second Lieutenant+ Perk_America = 19 AURA_GUARD 5% 120 ; O-2 First Lieutenant+ Perk_America = 20 AURA_MEND 1% 140 ; O-3 Captain+ Perk_America = 21 AURA_SIGHT 25% 160 ; O-4 Major+ Perk_America = 21 DETECT 100+ Perk_America = 22 AURA_GUARD 8% 140 ; O-5 Lieutenant Colonel+ Perk_America = 23 AURA_RATE_OF_FIRE 15% 160 ; O-6 Colonel+ Perk_America = 24 DESIGNATE 2 ; O-7 Brigadier General: Designator+ Perk_America = 25 AURA_DRILL 13 180 ; O-8 Major General: up to Warrant Officer+ Perk_America = 26 AURA_GUARD 10% 180 ; O-9 Lieutenant General+ Perk_America = 27 AURA_RADIUS 125% ; O-10 General: Command net+ Perk_America = 28 DESIGNATE 4 ; General of the Army: Five stars+ Perk_America = 28 DESIGNATE_REVEAL+ Perk_America = 28 AURA_RATE_OF_FIRE 18% 200++ Perk_China = 2 HEALTH 8% ; Private First Class: Hardy+ Perk_China = 3 AURA_GUARD 4% 80 ; Corporal: Shoulder to shoulder+ Perk_China = 4 AURA_DRILL 4 100 ; Sergeant: Old soldier, up to Sergeant+ Perk_China = 5 AURA_STEADY 25% 100 ; Staff Sergeant Second Class+ Perk_China = 6 AURA_RATE_OF_FIRE 5% 100 ; Staff Sergeant First Class+ Perk_China = 7 AURA_MEND 0.5% 100 ; Master Sergeant Third Class+ Perk_China = 8 AURA_GUARD 7% 120 ; Master Sergeant Second Class+ Perk_China = 9 AURA_DRILL 6 120 ; Master Sergeant First Class: up to Staff Sergeant First Class+ Perk_China = 10 AURA_RATE_OF_FIRE 10% 140 ; Second Lieutenant: Rally+ Perk_China = 11 AURA_STEADY 50% 140 ; First Lieutenant: Fearless+ Perk_China = 12 AURA_CAPTURE 30% 140 ; Captain: Seize+ Perk_China = 13 AURA_MEND 1% 160 ; Major+ Perk_China = 14 AURA_GUARD 10% 160 ; Lieutenant Colonel+ Perk_China = 15 AURA_RATE_OF_FIRE 15% 180 ; Colonel+ Perk_China = 16 AURA_PACE 8% 180 INFANTRY ; Senior Colonel: Forced march+ Perk_China = 17 LAST_STAND 25% ; Major General: Last stand+ Perk_China = 18 AURA_DRILL 10 200 ; Lieutenant General: up to Second Lieutenant+ Perk_China = 19 AURA_RADIUS 125% ; General: People's army+ Perk_China = 19 AURA_RATE_OF_FIRE 18% ; the wiki gives no radius: rate-of-fire III's++ Perk_GLA = 2 SPEED 5% ; Irregular: Light feet+ Perk_GLA = 3 MEND 0.5% ; Fighter: Patch-up+ Perk_GLA = 4 SCAVENGE 10% ; Raider: Scavenger+ Perk_GLA = 5 HEALTH 8% ; Hardened Raider: Tough+ Perk_GLA = 6 AURA_PACE 8% 80 INFANTRY ; Squadhand: Move with me+ Perk_GLA = 7 AURA_SPOILS 5% 100 ; Squad Leader+ ; 8 Cell Leader's Ambush is not built: it needs a StealthUpdate on every GLA unit+ Perk_GLA = 9 AURA_MEND 0.5% 100 ; Senior Cell Leader: Scrap repair+ Perk_GLA = 10 AURA_PACE 8% 120 ; Raid Captain: every unit+ Perk_GLA = 11 AURA_CAPTURE 30% 120 ; Column Captain: Seize+ Perk_GLA = 12 AURA_RATE_OF_FIRE 8% 120 ; Strike Commander: First strike+ Perk_GLA = 13 AURA_MEND 1% 140 ; Field Commander+ Perk_GLA = 14 AURA_SPOILS 10% 140 ; Sector Commander+ Perk_GLA = 15 AURA_PACE 12% 160 ; Warlord+ Perk_GLA = 15 AURA_RATE_OF_FIRE 12% ; the wiki gives no radius: rate-of-fire I's+ Perk_GLA = 16 AURA_STEADY 30% 160 ; Regional Warlord: Fanatics+ Perk_GLA = 17 AURA_SPOILS 15% 180 STRUCTURES ; High Warlord: structures included+ Perk_GLA = 18 SALVAGE_CRATE ; General: Cell survives+ Perk_GLA = 19 AURA_MEND 1.25% 180 ; Grand General+ Perk_GLA = 20 AURA_RADIUS 125% ; Supreme Liberator: Liberation+ Perk_GLA = 20 AURA_RATE_OF_FIRE 15%+AuraRateOfFireCap = 18%+ DrillRate = 5% ; a drill aura teaches 5% of a unit's E a second+ SalvageCrate = SalvageCrate ; what SALVAGE_CRATE leaves, Crate.ini's GLA crateRallyTime = 10000- ; One dial: every ring is the full AuraRadius and each texture keeps to its own band of it- ; (Tools/aura_rings.py), rate of fire outermost, so any set of auras reads as one instrument. One+ ; One dial: every ring is drawn at its kind's radius and each texture keeps to its own band of it+ ; (Tools/aura_rings.py), rate of fire outermost. Turkiye's kinds share one AuraRadius, so any set+ ; of them reads as one instrument; the other sides' lines each carry a radius of their own. One; pale family with a slight tint each, no throb, the ticks and the scale turning very slowly.; Additive light reads louder the darker the ground, so the opacity is as written where flat ground; is lit LightReference bright (the map's ambient plus its sun on level ground, 0 to about 1.5) and@@ -2010,6 +2109,74 @@ VeterancyLightScaleMin = 0.25LightScaleMax = 1.2End+ ; America, China and GLA give six more kinds and only five patterns are drawn, so these borrow+ ; them. Each borrows the band of a kind it never meets at the same radius on any ladder. Mend+ ; takes the rally's wash and drill the range scale whole, tint included, since only Turkiye+ ; carries those two. Pace takes the notched line, steady and spoils the dotted one and capture+ ; the scale, each with a tint of its own, because China's guard and drill and America's sight can+ ; stand on the same leader beside them.+ AuraRing_Mend+ Texture = ReforgedAuraRally+ Style = SHADOW_ADDITIVE_DECAL+ Color = R:215 G:215 B:210+ OpacityMin = 30%+ OpacityMax = 30%+ LightReference = 0.75+ LightScaleMin = 0.25+ LightScaleMax = 1.2+ End+ AuraRing_Drill+ Texture = ReforgedAuraRange+ Style = SHADOW_ADDITIVE_DECAL+ Color = R:205 G:185 B:225+ OpacityMin = 32%+ OpacityMax = 32%+ SpinTime = -120000+ LightReference = 0.75+ LightScaleMin = 0.35+ LightScaleMax = 1.2+ End+ AuraRing_Pace+ Texture = ReforgedAuraGuard+ Style = SHADOW_ADDITIVE_DECAL+ Color = R:225 G:225 B:160+ OpacityMin = 40%+ OpacityMax = 40%+ LightReference = 0.75+ LightScaleMin = 0.35+ LightScaleMax = 1.2+ End+ AuraRing_Steady+ Texture = ReforgedAuraSight+ Style = SHADOW_ADDITIVE_DECAL+ Color = R:230 G:180 B:185+ OpacityMin = 40%+ OpacityMax = 40%+ LightReference = 0.75+ LightScaleMin = 0.35+ LightScaleMax = 1.2+ End+ AuraRing_Capture+ Texture = ReforgedAuraRange+ Style = SHADOW_ADDITIVE_DECAL+ Color = R:165 G:215 B:220+ OpacityMin = 32%+ OpacityMax = 32%+ SpinTime = -120000+ LightReference = 0.75+ LightScaleMin = 0.35+ LightScaleMax = 1.2+ End+ AuraRing_Spoils+ Texture = ReforgedAuraSight+ Style = SHADOW_ADDITIVE_DECAL+ Color = R:235 G:210 B:140+ OpacityMin = 40%+ OpacityMax = 40%+ LightReference = 0.75+ LightScaleMin = 0.35+ LightScaleMax = 1.2+ EndEnd; ---- a plane shot down blows up and burns where it lands -----------------------------------------diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.strindex d1593fd27..25d0cc7b9 100644--- a/GeneralsMD/Code/Data/Patch.str+++ b/GeneralsMD/Code/Data/Patch.str@@ -2470,7 +2470,7 @@ RANK:PerkSTILL_GUARDENDRANK:PerkMEND-"Out of combat: heals %d%% a second"+"Out of combat: heals %d.%02d%% a second"ENDRANK:PerkSPOTTER@@ -2509,6 +2509,66 @@ RANK:PerkAURA_RANGE"Aura: artillery range +%d%%"END+RANK:PerkRATE_OF_FIRE+"Rate of fire +%d%%"+END++RANK:PerkRANGE+"Range +%d%%"+END++RANK:PerkHEALTH+"Health +%d%%"+END++RANK:PerkSPEED+"Speed +%d%%"+END++RANK:PerkLAST_STAND+"Below 35%% health: rate of fire +%d%%"+END++RANK:PerkSCAVENGE+"Its kills pay %d%% of the victim's cost"+END++RANK:PerkDESIGNATE+"Marks what it hits for %d seconds: everyone fires 50%% faster at it"+END++RANK:PerkDESIGNATE_REVEAL+"Its mark reveals stealthed targets"+END++RANK:PerkSALVAGE_CRATE+"Leaves a salvage crate when it falls"+END++RANK:PerkAURA_MEND+"Aura: heals %d.%02d%% a second"+END++RANK:PerkAURA_PACE+"Aura: speed +%d%%"+END++RANK:PerkAURA_DRILL+"Aura: trains units up to grade %d"+END++RANK:PerkAURA_STEADY+"Aura: paralysis, EMP and subdual %d%% shorter"+END++RANK:PerkAURA_CAPTURE+"Aura: captures buildings %d%% faster"+END++RANK:PerkAURA_SPOILS+"Aura: kills nearby pay %d%% of the victim's cost"+END+RANK:America0"E-1 Private"ENDdiff --git a/GeneralsMD/Code/Data/Russian/Generals.str b/GeneralsMD/Code/Data/Russian/Generals.strindex 79e8aacbb..ddd74bab9 100644--- a/GeneralsMD/Code/Data/Russian/Generals.str+++ b/GeneralsMD/Code/Data/Russian/Generals.str@@ -17798,7 +17798,7 @@ RANK:PerkSTILL_GUARDENDRANK:PerkMEND-"Вне боя: лечится на %d%% в секунду"+"Вне боя: лечится на %d.%02d%% в секунду"ENDRANK:PerkSPOTTERdiff --git a/GeneralsMD/Code/Data/Scenarios/rankaurawiki.txt b/GeneralsMD/Code/Data/Scenarios/rankaurawiki.txtnew file mode 100644index 000000000..dd91b12e0--- /dev/null+++ b/GeneralsMD/Code/Data/Scenarios/rankaurawiki.txt@@ -0,0 +1,27 @@+# America's and GLA's rank auras from the wiki ladders (2026-10-26). A Crusader made E-8 Master+# Sergeant (grade 8: rate-of-fire aura II +8% at 100, mend aura I 0.5% at 80 for infantry only,+# drill aura I to Corporal at 100) stands beside a grade 0 Ranger and a grade 0 Humvee. At the first+# pass the Ranger logs rof=0.08 mend=0.0050 drill=4 and the Humvee rof=0.08 mend=0.0000 drill=4: the+# mend aura passes the vehicle by. The drill then teaches both 5% of their own E a second, so the+# Humvee logs "RANK ... grade 0 to 1" at frame 1020 and 1 to 2 at 2100, the Ranger (E 20) 0 to 1+# at frame 1200. Scenario frames are retail ones, half the logic frame the log prints.+#+# 550 east, out of the Crusader's reach, a Scorpion made GLA General (grade 18) stands beside a+# grade 0 Rebel, which logs rof=0.12 mend=0.0100 pace=0.12 steady=0.30 capture=0.30 spoils=0.15.+# Neither leader logs a line of its own: an aura never reaches its leader.+#+# generals.exe -headless -quickstart -noshellmap -observer -multiInstance -noFPSLimit+# -map "Maps\Twilight Flame\Twilight Flame.map" -autoskirmish 2 -takeover+# -side 0 FactionAmerica -side 1 FactionGLA -seed 1 -maxframes 2400 -scenario rankaurawiki -logPrefix rankaurawiki_++10 spawn 0 AmericaTankCrusader 1 3350 3640+10 spawn 0 AmericaInfantryRanger 1 3400 3640+10 spawn 0 AmericaVehicleHumvee 1 3420 3670+10 spawn 0 GLATankScorpion 1 3900 3640+10 spawn 0 GLAInfantryRebel 1 3950 3640+10 spawn 1 GLAVehicleTechnical 1 3330 4290++12 rank 0 AmericaTankCrusader grade 8+12 rank 0 GLATankScorpion grade 18++1150 tally 0 *diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.strindex 4125e63d0..da258925b 100644--- a/GeneralsMD/Code/Data/Turkish/Generals.str+++ b/GeneralsMD/Code/Data/Turkish/Generals.str@@ -16832,7 +16832,7 @@ RANK:PerkSTILL_GUARDENDRANK:PerkMEND-"Çatışma dışında saniyede %d%% iyileşir"+"Çatışma dışında saniyede %d.%02d%% iyileşir"ENDRANK:PerkSPOTTER@@ -16871,6 +16871,66 @@ RANK:PerkAURA_RANGE"Aura: topçu menzili +%d%%"END+RANK:PerkRATE_OF_FIRE+"Atış hızı +%d%%"+END++RANK:PerkRANGE+"Menzil +%d%%"+END++RANK:PerkHEALTH+"Can +%d%%"+END++RANK:PerkSPEED+"Hız +%d%%"+END++RANK:PerkLAST_STAND+"Canı 35%%'in altındayken atış hızı +%d%%"+END++RANK:PerkSCAVENGE+"Öldürdükleri, kurbanın bedelinin %d%%'ini öder"+END++RANK:PerkDESIGNATE+"Vurduğunu %d saniye işaretler: herkes ona 50%% daha hızlı ateş eder"+END++RANK:PerkDESIGNATE_REVEAL+"İşareti gizli hedefleri açığa çıkarır"+END++RANK:PerkSALVAGE_CRATE+"Düştüğünde hurda sandığı bırakır"+END++RANK:PerkAURA_MEND+"Aura: saniyede %d.%02d%% iyileştirir"+END++RANK:PerkAURA_PACE+"Aura: hız +%d%%"+END++RANK:PerkAURA_DRILL+"Aura: birimleri %d. rütbeye kadar eğitir"+END++RANK:PerkAURA_STEADY+"Aura: felç, EMP ve bastırma %d%% daha kısa"+END++RANK:PerkAURA_CAPTURE+"Aura: binaları %d%% daha hızlı ele geçirir"+END++RANK:PerkAURA_SPOILS+"Aura: yakındaki öldürmeler kurbanın bedelinin %d%%'ini öder"+END+RANK:America0"E-1 Er"ENDdiff --git a/GeneralsMD/Code/Data/Ukrainian/Generals.str b/GeneralsMD/Code/Data/Ukrainian/Generals.strindex 8161e862a..1028dfb27 100644--- a/GeneralsMD/Code/Data/Ukrainian/Generals.str+++ b/GeneralsMD/Code/Data/Ukrainian/Generals.str@@ -17798,7 +17798,7 @@ RANK:PerkSTILL_GUARDENDRANK:PerkMEND-"Поза боєм: лікується на %d%% за секунду"+"Поза боєм: лікується на %d.%02d%% за секунду"ENDRANK:PerkSPOTTERdiff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.hindex 62792876b..df4d64616 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h@@ -100,15 +100,44 @@ enum RankPerkRANK_PERK_SCATTER, ///< share of its own weapons' scatter taken awayRANK_PERK_DEATH_RALLY, ///< on death, allies within its aura radius take this share less damage for RallyTimeRANK_PERK_DETECT, ///< stealthed enemies within this radius are detected- RANK_PERK_AURA_RADIUS, ///< its aura radius, a multiplier+ RANK_PERK_AURA_RADIUS, ///< every aura radius it gives, a multiplier (DETECT's excepted)+ RANK_PERK_RATE_OF_FIRE, ///< added to its own weapons' rate of fire, on top of the grade's stat+ RANK_PERK_RANGE, ///< added to its own weapons' range, on top of the grade's stat+ RANK_PERK_HEALTH, ///< its max health times 1 + this, on top of the grade's stat+ RANK_PERK_SPEED, ///< its speed times 1 + this, on top of the grade's stat+ RANK_PERK_LAST_STAND, ///< added to its rate of fire while it is below RANK_LAST_STAND_HEALTH+ RANK_PERK_SCAVENGE, ///< each kill it scores pays its player this share of the victim's cost+ RANK_PERK_DESIGNATE, ///< seconds whatever it hurts wears FAERIE_FIRE, which everyone shooting at it fires faster on+ RANK_PERK_DESIGNATE_REVEAL, ///< its mark also detects a stealthed target for as long+ RANK_PERK_SALVAGE_CRATE, ///< on death it leaves the Veterancy block's SalvageCrateRANK_PERK_AURA_RATE_OF_FIRE, ///< the first of the aura perks, in RankAura orderRANK_PERK_AURA_SIGHT,RANK_PERK_AURA_GUARD,RANK_PERK_AURA_RANGE,+ RANK_PERK_AURA_MEND,+ RANK_PERK_AURA_PACE,+ RANK_PERK_AURA_DRILL,+ RANK_PERK_AURA_STEADY,+ RANK_PERK_AURA_CAPTURE,+ RANK_PERK_AURA_SPOILS,RANK_PERK_COUNT};+/// the share of max health under which the LAST_STAND perk fires faster+#define RANK_LAST_STAND_HEALTH 0.35f++/** Who an aura line reaches besides its leader's allies' units: Perk_<side> = grade AURA_<kind> value+ * radius INFANTRY, or STRUCTURES for units and buildings both. */+enum RankReach+{+ RANK_REACH_UNITS, ///< every allied unit, buildings left out+ RANK_REACH_INFANTRY, ///< allied infantry only+ RANK_REACH_STRUCTURES, ///< allied units and buildings++ RANK_REACH_COUNT+};+/** A leader's bonus to friendly units within its aura radius, refilled once a second. Of one kind a* unit takes the strongest leader's and nothing more. RALLY is the death rally, timed instead. */enum RankAura@@ -117,6 +146,12 @@ enum RankAuraRANK_AURA_SIGHT, ///< shroud clearing, 1 + thisRANK_AURA_GUARD, ///< damage taken, 1 - thisRANK_AURA_RANGE, ///< an artillery weapon's range, added+ RANK_AURA_MEND, ///< share of max health healed a second, hurt or not+ RANK_AURA_PACE, ///< speed, 1 + this+ RANK_AURA_DRILL, ///< experience a second (DrillRate) up to this grade of the unit's own ladder+ RANK_AURA_STEADY, ///< a timed paralysis or EMP runs 1 - this as long, subdual wears off 1 / (1 - this) as fast+ RANK_AURA_CAPTURE, ///< taking a building takes 1 - this as long+ RANK_AURA_SPOILS, ///< each kill it scores pays its player this share of the victim's costRANK_AURA_RALLY, ///< damage taken, 1 - this, until the rally runs outRANK_AURA_COUNT,@@ -125,6 +160,7 @@ enum RankAuraextern const char *const TheRankPerkNames[RANK_PERK_COUNT + 1];extern const char *const TheRankAuraNames[RANK_AURA_COUNT];+extern const char *const TheRankReachNames[RANK_REACH_COUNT + 1];/** One side's rank ladder, the Veterancy block in BalanceReforged.ini (docs/plans/RANK-LADDER.md).* A unit's grade is a pure function of its experience and its template's E, its regular@@ -140,12 +176,16 @@ struct RankLadderReal m_statTop[RANK_STAT_COUNT]; ///< each stat at the top of the ladderReal m_auraRadius; ///< a leader's aura radius before RANK_PERK_AURA_RADIUSReal m_perkAt[RANK_GRADES_MAX + 1][RANK_PERK_COUNT]; ///< the perks a grade's own lines name, 0 for none+ Real m_radiusAt[RANK_GRADES_MAX + 1][RANK_PERK_COUNT]; ///< an aura line's own radius, 0 for the one before it, or m_auraRadius+ RankReach m_reachAt[RANK_GRADES_MAX + 1][RANK_PERK_COUNT]; ///< an aura line's receivers// filled by finish()Real m_ratio;Real m_total[RANK_GRADES_MAX + 1]; ///< experience to hold grade g, in EReal m_stat[RANK_GRADES_MAX + 1][RANK_STAT_COUNT]; ///< each stat at grade gReal m_perk[RANK_GRADES_MAX + 1][RANK_PERK_COUNT]; ///< each perk grade g holds, the strongest of its grade and those below+ Real m_radius[RANK_GRADES_MAX + 1][RANK_PERK_COUNT]; ///< the radius that came with it, carried up the same way+ RankReach m_reach[RANK_GRADES_MAX + 1][RANK_PERK_COUNT]; ///< the receivers that came with itvoid clear();/** The ratio from m_grades and m_top, the totals, and the stats: worth (rate of fire times damage@@ -160,8 +200,16 @@ struct RankLadderInt clipGain( Int unitValue, Int experience, Int gain ) const;Int insigniaIndex( Int grade, Bool hero ) const; ///< a hero's insignia runs from m_heroStart to the top over its gradesReal perk( Int grade, RankPerk perk ) const; ///< what the grade holds of the kind, 0 for nothing- Real auraRadius( Int grade ) const; ///< m_auraRadius times the AURA_RADIUS perk+ /// a Perk_<side> line's tokens after the =: grade kind [value [radius [reach]]]+ void addPerkLine( const char *const *tokens, Int count );+ /** The aura's own radius at the grade (RALLY's is m_auraRadius, and so is a line that gave none on+ * a side with no radius before it), times the AURA_RADIUS perk. */+ Real auraRadius( Int grade, RankAura aura ) const;+ RankReach auraReach( Int grade, RankAura aura ) const; ///< who the aura reaches; RALLY reaches unitsReal aura( Int grade, RankAura aura ) const; ///< what a leader of this grade gives; RALLY is its death rally+ /** What a DRILL aura capped at capGrade adds to a unit with the experience this second: rate times+ * its E, at least 1, never past the cap's threshold, 0 once there. */+ Int drillGain( Int unitValue, Int experience, Int capGrade, Real rate ) const;static Int unitValue( const ThingTemplate *thing ); ///< E: the regular ExperienceValue, else half the Veteran threshold, at least 1};@@ -672,6 +720,8 @@ public:WeaponBonusSet* m_veterancyWeaponBonus[VETERANCY_SIDE_COUNT]; ///< NULL: nothing beyond the gradeUnsignedInt m_veterancySelfRepairDelay; ///< frames unhurt before self-repair startsReal m_rankAuraRateOfFireCap; ///< the most a rate-of-fire aura adds+ Real m_rankDrillRate; ///< what a drill aura adds a second, a share of the unit's E+ AsciiString m_rankSalvageCrate; ///< the crate a SALVAGE_CRATE perk leavesUnsignedInt m_rankRallyTime; ///< frames a death rally lastsRadiusDecalTemplate m_rankAuraRing[RANK_AURA_COUNT]; ///< the ground ring under a selected leader, one per aura kind (client)diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Player.h b/GeneralsMD/Code/GameEngine/Include/Common/Player.hindex a3ec64ef9..7ba9fbd64 100644--- a/GeneralsMD/Code/GameEngine/Include/Common/Player.h+++ b/GeneralsMD/Code/GameEngine/Include/Common/Player.h@@ -853,7 +853,7 @@ public:Real getCashBounty() const { return m_cashBountyPercent; }void setCashBounty(Real percentage) { m_cashBountyPercent = percentage; }- void doBountyForKill(const Object* killer, const Object* victim);+ void doBountyForKill(const Object* killer, const Object* victim, Real rankShare); ///< the bounty science's share plus the killer's rank share of the victim's costAcademyStats* getAcademyStats() { return &m_academyStats; }const AcademyStats* getAcademyStats() const { return &m_academyStats; }diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.hindex b810af54e..1a10576b1 100644--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h@@ -595,7 +595,7 @@ public:inline Real getPathExtraDistance() const { return m_pathExtraDistance; }virtual Bool chooseLocomotorSet(LocomotorSetType wst);- void refreshVeterancySpeed(); ///< the rank's speed bonus onto every locomotor in the set+ void refreshVeterancySpeed(); ///< the rank's speed bonus and pace aura onto every locomotor in the setvirtual CommandSourceType getLastCommandSource() const { return m_lastCommandSource; }diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.hindex 499218018..9a9e47471 100644--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h@@ -249,6 +249,7 @@ protected://Various steps of performing any special ability. Not all special abilities will use all of them.Bool approachTarget(); //Approaches the target before starting the special attack (if appropriate)void startPreparation(); //Begins the preparation of ability -- like firing off a hacker attack, or laser tracer, etc.+ static UnsignedInt capturePreparationFrames( const Object *taker, UnsignedInt frames ); ///< the taking of a building under the taker's seize auraBool continuePreparation(); //Updates the preparation of ability -- like recalculating tracer lines.void triggerAbilityEffect(); //After the preparation time has elapsed, this part actually triggers the desired effect of the special ability.void finishAbility();diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.hindex 1f65f1514..86d7cbe3b 100644--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h@@ -309,6 +309,7 @@ public:Bool isSpotter() const; ///< SpotterSight on the template, or the SPOTTER perkvoid onRankSightChanged( Real oldScalar ); ///< look again if the rank sight movedvoid giveRankRally(); ///< I fell: my death rally reaches the allies around me+ void dropRankSalvage(); ///< I fell: my SALVAGE_CRATE perk leaves a crate where I layvoid forgoRankRally() { m_forgoRankRally = TRUE; } ///< about to be killed inside a container that let go of me firstinline const AsciiString& getName() const { return m_name; }diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cppindex 32fe93975..8c36e88e5 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp@@ -119,24 +119,27 @@ static void parseLadderPercents( INI *ini, void *, void *store, const void *membconst char *const TheRankPerkNames[RANK_PERK_COUNT + 1] ={"SIGHT", "STILL_GUARD", "MEND", "SPOTTER", "SCATTER", "DEATH_RALLY", "DETECT", "AURA_RADIUS",- "AURA_RATE_OF_FIRE", "AURA_SIGHT", "AURA_GUARD", "AURA_RANGE", NULL+ "RATE_OF_FIRE", "RANGE", "HEALTH", "SPEED", "LAST_STAND", "SCAVENGE", "DESIGNATE", "DESIGNATE_REVEAL",+ "SALVAGE_CRATE",+ "AURA_RATE_OF_FIRE", "AURA_SIGHT", "AURA_GUARD", "AURA_RANGE", "AURA_MEND", "AURA_PACE", "AURA_DRILL",+ "AURA_STEADY", "AURA_CAPTURE", "AURA_SPOILS", NULL};-const char *const TheRankAuraNames[RANK_AURA_COUNT] = { "RateOfFire", "Sight", "Guard", "Range", "Rally" };+const char *const TheRankAuraNames[RANK_AURA_COUNT] =+{+ "RateOfFire", "Sight", "Guard", "Range", "Mend", "Pace", "Drill", "Steady", "Capture", "Spoils", "Rally"+};-// Perk_<side> = grade kind [value]: a percent, a plain number (DETECT's radius), or nothing for 1-// (SPOTTER). userData is the side, store is m_rankLadder.+const char *const TheRankReachNames[RANK_REACH_COUNT + 1] = { "UNITS", "INFANTRY", "STRUCTURES", NULL };++// Perk_<side> = grade kind [value [radius [reach]]]. userData is the side, store is m_rankLadder.static void parseLadderPerk( INI *ini, void *, void *store, const void *side ){- const Int grade = INI::scanInt( ini->getNextToken() );- const Int perk = INI::scanIndexList( ini->getNextToken(), TheRankPerkNames );- const char *token = ini->getNextTokenOrNull();- if( grade < 0 || grade > RANK_GRADES_MAX )- throw INI_INVALID_DATA;- Real value = 1.0f;- if( token )- value = token[ strlen( token ) - 1 ] == '%' ? INI::scanPercentToReal( token ) : INI::scanReal( token );- ( (RankLadder *)store + (size_t)side )->m_perkAt[ grade ][ perk ] = value;+ const char *tokens[ 5 ] = { ini->getNextToken(), ini->getNextToken() };+ Int count = 2;+ while( count < 5 && ( tokens[ count ] = ini->getNextTokenOrNull() ) != NULL )+ ++count;+ ( (RankLadder *)store + (size_t)side )->addPerkLine( tokens, count );}#define LADDER_FIELD( token, parser, member ) \@@ -164,12 +167,20 @@ static const FieldParse theVeterancyFieldParseTable[] ={ "Perk_GLA", parseLadderPerk, (const void *)VETERANCY_SIDE_GLA, offsetof( GlobalData, m_rankLadder ) },{ "Perk_Turkiye", parseLadderPerk, (const void *)VETERANCY_SIDE_TURKIYE, offsetof( GlobalData, m_rankLadder ) },{ "AuraRateOfFireCap", INI::parsePercentToReal, NULL, offsetof( GlobalData, m_rankAuraRateOfFireCap ) },+ { "DrillRate", INI::parsePercentToReal, NULL, offsetof( GlobalData, m_rankDrillRate ) },+ { "SalvageCrate", INI::parseAsciiString, NULL, offsetof( GlobalData, m_rankSalvageCrate ) },{ "RallyTime", INI::parseDurationUnsignedInt, NULL, offsetof( GlobalData, m_rankRallyTime ) },{ "AuraRing_RateOfFire", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_RATE_OF_FIRE] ) },{ "AuraRing_Sight", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_SIGHT] ) },{ "AuraRing_Guard", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_GUARD] ) },{ "AuraRing_Range", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_RANGE] ) },{ "AuraRing_Rally", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_RALLY] ) },+ { "AuraRing_Mend", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_MEND] ) },+ { "AuraRing_Pace", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_PACE] ) },+ { "AuraRing_Drill", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_DRILL] ) },+ { "AuraRing_Steady", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_STEADY] ) },+ { "AuraRing_Capture", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_CAPTURE] ) },+ { "AuraRing_Spoils", RadiusDecalTemplate::parseRadiusDecalTemplate, NULL, offsetof( GlobalData, m_rankAuraRing[RANK_AURA_SPOILS] ) },{ "WorthGain", INI::parseReal, NULL, offsetof( GlobalData, m_rankWorthGain ) },{ "CrateGrades", INI::parseInt, NULL, offsetof( GlobalData, m_rankCrateGrades ) },{ "WeaponBonus_America", parseVeterancyWeaponBonus, NULL, offsetof( GlobalData, m_veterancyWeaponBonus[VETERANCY_SIDE_AMERICA] ) },@@ -214,10 +225,32 @@ void RankLadder::clear()for( Int stat = 0; stat < RANK_STAT_COUNT; ++stat )m_stat[ grade ][ stat ] = stat == RANK_STAT_SELF_REPAIR ? 0.0f : 1.0f;for( Int perk = 0; perk < RANK_PERK_COUNT; ++perk )+ {m_perkAt[ grade ][ perk ] = m_perk[ grade ][ perk ] = 0.0f;+ m_radiusAt[ grade ][ perk ] = m_radius[ grade ][ perk ] = 0.0f;+ m_reachAt[ grade ][ perk ] = m_reach[ grade ][ perk ] = RANK_REACH_UNITS;+ }}}+//-------------------------------------------------------------------------------------------------+/** grade kind [value [radius [reach]]]: the value a percent, a plain number (DETECT's radius,+ * AURA_DRILL's grade, DESIGNATE's seconds), or nothing for 1 (SPOTTER); an aura line's own radius;+ * INFANTRY or STRUCTURES for who it reaches. A bad token throws, as the INI scanners do. */+//-------------------------------------------------------------------------------------------------+void RankLadder::addPerkLine( const char *const *tokens, Int count )+{+ const Int grade = INI::scanInt( tokens[ 0 ] );+ const Int perk = INI::scanIndexList( tokens[ 1 ], TheRankPerkNames );+ if( grade < 0 || grade > RANK_GRADES_MAX )+ throw INI_INVALID_DATA;+ const char *value = count > 2 ? tokens[ 2 ] : NULL;+ m_perkAt[ grade ][ perk ] = value == NULL ? 1.0f+ : value[ strlen( value ) - 1 ] == '%' ? INI::scanPercentToReal( value ) : INI::scanReal( value );+ m_radiusAt[ grade ][ perk ] = count > 3 ? INI::scanReal( tokens[ 3 ] ) : 0.0f;+ m_reachAt[ grade ][ perk ] = count > 4 ? (RankReach)INI::scanIndexList( tokens[ 4 ], TheRankReachNames ) : RANK_REACH_UNITS;+}+//-------------------------------------------------------------------------------------------------// The stat table needs a natural logarithm and an exponential. The CRT's differ by a bit between// Windows, macOS and Linux, and a player on any of them can join any other, so these two use only@@ -285,8 +318,18 @@ void RankLadder::finish( Real worthGain )for( Int stat = 0; stat < RANK_STAT_COUNT; ++stat )m_stat[ grade ][ stat ] = stat == RANK_STAT_SELF_REPAIR ? (Real)( m_statTop[ stat ] * share ): (Real)rankExp( share * rankLn( (double)m_statTop[ stat ] ) );+ // a line as strong as the one carried replaces it, and brings its own receivers and radius,+ // or keeps the radius before it when it names none (GLA's rate-of-fire aura II)for( Int perk = 0; perk < RANK_PERK_COUNT; ++perk )- m_perk[ grade ][ perk ] = MAX( m_perkAt[ grade ][ perk ], grade > 0 ? m_perk[ grade - 1 ][ perk ] : 0.0f );+ {+ const Real own = m_perkAt[ grade ][ perk ];+ const Real held = grade > 0 ? m_perk[ grade - 1 ][ perk ] : 0.0f;+ const Real heldRadius = grade > 0 ? m_radius[ grade - 1 ][ perk ] : 0.0f;+ const Bool replaces = own > 0.0f && own >= held;+ m_perk[ grade ][ perk ] = replaces ? own : held;+ m_radius[ grade ][ perk ] = replaces && m_radiusAt[ grade ][ perk ] > 0.0f ? m_radiusAt[ grade ][ perk ] : heldRadius;+ m_reach[ grade ][ perk ] = replaces ? m_reachAt[ grade ][ perk ] : ( grade > 0 ? m_reach[ grade - 1 ][ perk ] : RANK_REACH_UNITS );+ }}}@@ -338,15 +381,37 @@ Real RankLadder::perk( Int grade, RankPerk perk ) const}//--------------------------------------------------------------------------------------------------Real RankLadder::auraRadius( Int grade ) const+static RankPerk auraPerk( RankAura aura )+{+ return aura == RANK_AURA_RALLY ? RANK_PERK_DEATH_RALLY : (RankPerk)( RANK_PERK_AURA_RATE_OF_FIRE + aura );+}++//-------------------------------------------------------------------------------------------------+Real RankLadder::auraRadius( Int grade, RankAura aura ) const+{+ const Real own = aura == RANK_AURA_RALLY ? 0.0f : m_radius[ MIN( grade, MAX( m_grades, 0 ) ) ][ auraPerk( aura ) ];+ return ( own > 0.0f ? own : m_auraRadius ) * MAX( 1.0f, perk( grade, RANK_PERK_AURA_RADIUS ) );+}++//-------------------------------------------------------------------------------------------------+RankReach RankLadder::auraReach( Int grade, RankAura aura ) const{- return m_auraRadius * MAX( 1.0f, perk( grade, RANK_PERK_AURA_RADIUS ) );+ return m_reach[ MIN( grade, MAX( m_grades, 0 ) ) ][ auraPerk( aura ) ];}//-------------------------------------------------------------------------------------------------Real RankLadder::aura( Int grade, RankAura aura ) const{- return perk( grade, aura == RANK_AURA_RALLY ? RANK_PERK_DEATH_RALLY : (RankPerk)( RANK_PERK_AURA_RATE_OF_FIRE + aura ) );+ return perk( grade, auraPerk( aura ) );+}++//-------------------------------------------------------------------------------------------------+Int RankLadder::drillGain( Int unitValue, Int experience, Int capGrade, Real rate ) const+{+ // ponytail: whole points a second, so a small E (the Red Guard's 5) climbs faster than its share;+ // a fractional carry would need saving+ const Int room = threshold( unitValue, capGrade ) - experience;+ return room > 0 ? MIN( room, MAX( 1, REAL_TO_INT_FLOOR( unitValue * rate + 0.5f ) ) ) : 0;}//-------------------------------------------------------------------------------------------------@@ -1435,6 +1500,7 @@ GlobalData::GlobalData()m_rankCrateGrades = 3;m_veterancySelfRepairDelay = 0;m_rankAuraRateOfFireCap = 0.0f;+ m_rankDrillRate = 0.0f;m_rankRallyTime = 0;m_shellMapName.set("Maps\\ShellMap1\\ShellMap1.map");@@ -1640,7 +1706,9 @@ Real GlobalData::getRankStat( const ThingTemplate *thing, Int grade, RankStat st//-------------------------------------------------------------------------------------------------Real GlobalData::getRankHealthBonus( const ThingTemplate *thing, VeterancyLevel level, Int grade ) const{- return getRankLadder( thing ) ? getRankStat( thing, grade, RANK_STAT_HEALTH ) : m_healthBonus[ level ];+ const RankLadder *ladder = getRankLadder( thing );+ return ladder ? getRankStat( thing, grade, RANK_STAT_HEALTH ) * ( 1.0f + ladder->perk( grade, RANK_PERK_HEALTH ) )+ : m_healthBonus[ level ];}//-------------------------------------------------------------------------------------------------diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cppindex f30d2973e..2f51f51d7 100644--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp@@ -2640,7 +2640,7 @@ Bool Player::calcClosestConstructionZoneLocation( const ThingTemplate *construct}//=============================================================================-void Player::doBountyForKill(const Object* killer, const Object* victim)+void Player::doBountyForKill(const Object* killer, const Object* victim, Real rankShare){if (!killer || !victim)return;@@ -2653,7 +2653,7 @@ void Player::doBountyForKill(const Object* killer, const Object* victim)// Rounding up a product of two floats hands you an extra dollar whenever the multiplication// lands a hair above a whole number - a 10% bounty on a 1000 cost unit paid 101. Take an// epsilon off first, so only a genuine fraction rounds up.- Int bounty = REAL_TO_INT_CEIL((costToBuild * m_cashBountyPercent) - WWMATH_EPSILON);+ Int bounty = REAL_TO_INT_CEIL((costToBuild * (m_cashBountyPercent + rankShare)) - WWMATH_EPSILON);if( bounty ){diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cppindex c39cacbec..a1499d988 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp@@ -169,7 +169,8 @@ static void portraitRankTooltip( GameWindow *window, WinInstanceData *instData,UnicodeString text = TheGameText->fetch( label );// what the grade carries, one line a perk: RANK:Perk<kind> takes the strength as a whole percent- // (a radius for DETECT, a multiple's gain for SIGHT and AURA_RADIUS)+ // (a radius for DETECT, a grade for AURA_DRILL, seconds for DESIGNATE, a multiple's gain for SIGHT+ // and AURA_RADIUS)for( Int perk = 0; perk < RANK_PERK_COUNT; ++perk ){Real value = ladder->perk( grade, (RankPerk)perk );@@ -177,9 +178,17 @@ static void portraitRankTooltip( GameWindow *window, WinInstanceData *instData,continue;if( perk == RANK_PERK_SIGHT || perk == RANK_PERK_AURA_RADIUS )value -= 1.0f;+ const Bool plain = perk == RANK_PERK_DETECT || perk == RANK_PERK_AURA_DRILL || perk == RANK_PERK_DESIGNATE;label.format( "RANK:Perk%s", TheRankPerkNames[ perk ] );UnicodeString line;- line.format( TheGameText->fetch( label ), REAL_TO_INT( perk == RANK_PERK_DETECT ? value : value * 100.0f + 0.5f ) );+ if( perk == RANK_PERK_MEND || perk == RANK_PERK_AURA_MEND )+ {+ // a heal of 0.5% to 1.25% a second reads to two places+ const Int hundredths = REAL_TO_INT( value * 10000.0f + 0.5f );+ line.format( TheGameText->fetch( label ), hundredths / 100, hundredths % 100 );+ }+ else+ line.format( TheGameText->fetch( label ), REAL_TO_INT( plain ? value : value * 100.0f + 0.5f ) );text.concat( (WideChar)'\n' );text.concat( line );}diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cppindex 7b8e1083b..6ac9e2c6b 100644--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp@@ -1536,7 +1536,7 @@ void InGameUI::updateAuraRings()continue;wanted[ wantedCount ].id = obj->getID();wanted[ wantedCount ].kind = kind;- wanted[ wantedCount ].radius = ladder->auraRadius( grade );+ wanted[ wantedCount ].radius = ladder->auraRadius( grade, (RankAura)kind );wanted[ wantedCount ].pos = *draw->getPosition();++wantedCount;}diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cppindex 354212a0e..6f135f9e5 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp@@ -63,6 +63,7 @@#include "GameLogic/Module/ContainModule.h"#include "GameLogic/Module/DamageModule.h"#include "GameLogic/Module/DieModule.h"+#include "GameLogic/Module/StealthUpdate.h"#ifdef _INTERNAL@@ -624,8 +625,21 @@ void ActiveBody::attemptDamage( DamageInfo *damageInfo )// remember which enemy took how much health off, for splitting the kill (Object::scoreTheKill)if( !alreadyHandled && damageInfo->out.m_actualDamageClipped > 0.0f && damager && damager != obj&& damager->getRelationship( obj ) == ENEMIES )+ {obj->getExperienceTracker()->recordDamage( damager->getID(), REAL_TO_INT_CEIL( damageInfo->out.m_actualDamageClipped ) );+ // a designator's hit marks what it hurt: everyone shooting at it fires faster (GameData's+ // TARGET_FAERIE_FIRE), and a mark that reveals shows a stealthed target for as long+ const Real markSeconds = damager->getRankPerk( RANK_PERK_DESIGNATE );+ if( markSeconds > 0.0f && m_currentHealth > 0.0f )+ {+ const UnsignedInt markFrames = REAL_TO_UNSIGNEDINT( markSeconds * LOGICFRAMES_PER_SECOND );+ obj->doStatusDamage( OBJECT_STATUS_FAERIE_FIRE, markFrames );+ if( obj->getStealth() && damager->getRankPerk( RANK_PERK_DESIGNATE_REVEAL ) > 0.0f )+ obj->getStealth()->markAsDetected( markFrames );+ }+ }+// then copy the whole DamageInfo struct for easy lookup// (object pointer loses scope as soon as atteptdamage's caller ends)// m_lastDamageTimestamp is initialized to FFFFFFFFFF, so doing a < compare is problematic.diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cppindex 335ef4b2f..34a1f9271 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp@@ -65,7 +65,8 @@ UpdateSleepTime SubdualDamageHelper::update()DamageInfo removeSubdueDamage;removeSubdueDamage.in.m_damageType = DAMAGE_SUBDUAL_UNRESISTABLE;- removeSubdueDamage.in.m_amount = -body->getSubdualDamageHealAmount();+ // a steady aura on it wears the subdual off 1 / (1 - steady) as fast+ removeSubdueDamage.in.m_amount = -body->getSubdualDamageHealAmount() / ( 1.0f - getObject()->getRankAura( RANK_AURA_STEADY ) );body->attemptDamage(&removeSubdueDamage);if( body->hasAnySubdualDamage() )diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cppindex 7ab7683b7..9b0a2c7f3 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp@@ -2261,6 +2261,12 @@ void Object::setDisabledUntil( DisabledType type, UnsignedInt frame )return;}+ // a steady aura on it cuts a timed paralysis or EMP short+ const UnsignedInt now = TheGameLogic->getFrame();+ const Real steady = getRankAura( RANK_AURA_STEADY );+ if( steady > 0.0f && ( type == DISABLED_PARALYZED || type == DISABLED_EMP ) && frame != FOREVER && frame > now )+ frame = now + REAL_TO_UNSIGNEDINT( ( frame - now ) * ( 1.0f - steady ) );+//Handle audio events!AudioEventRTS sound;if( type == DISABLED_UNMANNED && !isKindOf( KINDOF_DRONE ) )@@ -3229,7 +3235,8 @@ void Object::scoreTheKill( const Object *victim ){controller->getScoreKeeper()->addObjectDestroyed(victim);controller->addSkillPointsForKill(this, victim);- controller->doBountyForKill(this, victim);+ // a rank's scavenging of its own kills or a leader's spoils aura, the larger, on top of the bounty+ controller->doBountyForKill(this, victim, MAX(getRankPerk(RANK_PERK_SCAVENGE), getRankAura(RANK_AURA_SPOILS)));}/* Now handle experience, if we can gain any.@@ -4533,13 +4540,14 @@ static void xferModule( Xfer *xfer, BehaviorModule *module, const Object *obj )* 12: the last threat and value sightings* 13: how many enemy jammers are cutting its sight* 14: the rank auras on it and when its death rally ends+ * 15: the six aura kinds mend, pace, drill, steady, capture and spoils*///-------------------------------------------------------------------------------------------------void Object::xfer( Xfer *xfer ){// version- const XferVersion currentVersion = 14;+ const XferVersion currentVersion = 15;XferVersion version = currentVersion;xfer->xferVersion( &version, currentVersion );@@ -5003,12 +5011,20 @@ void Object::xfer( Xfer *xfer )if( version >= 13 )xfer->xferInt( &m_sightJammerCount );- if( version >= 14 )+ // version 14 saved five kinds, the four before MEND and RALLY+ if( version >= 15 ){for( Int aura = 0; aura < RANK_AURA_COUNT; ++aura )xfer->xferReal( &m_rankAura[ aura ] );- xfer->xferUnsignedInt( &m_rankRallyUntil );}+ else if( version >= 14 )+ {+ for( Int aura = 0; aura < RANK_AURA_MEND; ++aura )+ xfer->xferReal( &m_rankAura[ aura ] );+ xfer->xferReal( &m_rankAura[ RANK_AURA_RALLY ] );+ }+ if( version >= 14 )+ xfer->xferUnsignedInt( &m_rankRallyUntil );} // end xfer@@ -5168,6 +5184,7 @@ void Object::onDie( DamageInfo *damageInfo )Bool selfInflicted = (damageInfo->in.m_sourceID == getID());giveRankRally();+ dropRankSalvage();//// FIRST, call our die modules - unless nothing has been built here yet, in which case they are@@ -5631,7 +5648,7 @@ void Object::giveRankRally()const Real strength = ladder->aura( grade, RANK_AURA_RALLY );if( strength <= 0.0f )return;- const Real radius = ladder->auraRadius( grade );+ const Real radius = ladder->auraRadius( grade, RANK_AURA_RALLY );const UnsignedInt until = TheGameLogic->getFrame() + TheGlobalData->m_rankRallyTime;for( Object *other = TheGameLogic->getFirstObject(); other; other = other->getNextObject() ){@@ -5645,6 +5662,34 @@ void Object::giveRankRally()getTemplate()->getName().str(), strength, radius));}+//-------------------------------------------------------------------------------------------------+/** The cell survives its general: a crate where it fell, placed the way CreateCrateDie places one,+ * clear of the hulk, for whoever can pick it up. */+//-------------------------------------------------------------------------------------------------+void Object::dropRankSalvage()+{+ if( m_containedBy || getRankPerk( RANK_PERK_SALVAGE_CRATE ) <= 0.0f )+ return;+ // a mod's data may lack the crate+ const ThingTemplate *crateType = TheThingFactory->findTemplate( TheGlobalData->m_rankSalvageCrate );+ if( crateType == NULL )+ return;++ Coord3D where = *getPosition(), clear;+ FindPositionOptions options;+ options.maxRadius = 5.0f;+ options.relationshipObject = this;+ options.flags = FPF_IGNORE_ALLY_OR_NEUTRAL_UNITS;+ if( getLayer() == LAYER_GROUND && ThePartitionManager->findPositionAround( getPosition(), &options, &clear ) )+ where = clear;++ Object *crate = TheThingFactory->newObject( crateType, NULL );+ crate->setPosition( &where );+ crate->setLayer( getLayer() );+ DEBUG_LOG(("RANK SALVAGE frame=%d template=%s crate=%d\n", TheGameLogic->getFrame(), getTemplate()->getName().str(),+ crate->getID()));+}+//-------------------------------------------------------------------------------------------------void Object::look(){diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cppindex d3c1b6464..fe460881e 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp@@ -1057,8 +1057,10 @@ Bool AIUpdateInterface::chooseLocomotorSetExplicit(LocomotorSetType wst)//-------------------------------------------------------------------------------------------------void AIUpdateInterface::refreshVeterancySpeed(){+ // the grade's speed, its own SPEED perk and a leader's pace aura, each multiplyingconst Object* obj = getObject();- m_locomotorSet.setSpeedFactor(TheGlobalData->getRankStat(obj->getTemplate(), obj->getRankGrade(), RANK_STAT_SPEED));+ m_locomotorSet.setSpeedFactor(TheGlobalData->getRankStat(obj->getTemplate(), obj->getRankGrade(), RANK_STAT_SPEED)+ * (1.0f + obj->getRankPerk(RANK_PERK_SPEED)) * (1.0f + obj->getRankAura(RANK_AURA_PACE)));}//-------------------------------------------------------------------------------------------------diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cppindex 803f9a29d..59fe5da69 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp@@ -625,10 +625,20 @@ Bool SpecialAbilityUpdate::getCaptureProgress( ObjectID *targetID, Real *progresif( total == 0 || m_prepFrames > total )return FALSE;- *progress = 1.0f - (Real)m_prepFrames / (Real)total;+ // against the taking a seize aura shortened, which may have moved since it started+ const UnsignedInt taking = MAX( capturePreparationFrames( getObject(), total ), 1u );+ *progress = MAX( 0.0f, 1.0f - (Real)m_prepFrames / (Real)taking );return TRUE;}+//-------------------------------------------------------------------------------------------------+/** A seize (capture) aura on the man taking a building cuts the taking short. */+//-------------------------------------------------------------------------------------------------+UnsignedInt SpecialAbilityUpdate::capturePreparationFrames( const Object *taker, UnsignedInt frames )+{+ return REAL_TO_UNSIGNEDINT( frames * ( 1.0f - taker->getRankAura( RANK_AURA_CAPTURE ) ) );+}+//-------------------------------------------------------------------------------------------------Bool SpecialAbilityUpdate::getCaptureTarget( ObjectID *targetID ) const{@@ -1036,6 +1046,9 @@ void SpecialAbilityUpdate::startPreparation()//Set the preparation timerm_prepFrames = data->m_preparationFrames;+ if( spTemplate->getSpecialPowerType() == SPECIAL_INFANTRY_CAPTURE_BUILDING+ || spTemplate->getSpecialPowerType() == SPECIAL_BLACKLOTUS_CAPTURE_BUILDING )+ m_prepFrames = capturePreparationFrames( getObject(), m_prepFrames );switch( spTemplate->getSpecialPowerType() ){diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cppindex 5f116b97c..d3ccecadf 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp@@ -2163,16 +2163,33 @@ void Weapon::computeBonus(const Object *source, WeaponBonusConditionFlags extraBconst WeaponBonusSet* sideSet = TheGlobalData->getVeterancyWeaponBonus(sourceTemplate, source->getVeterancyLevel());if (sideSet)sideSet->appendBonuses(flags, bonus);- const Real* stat = ladder->m_stat[MIN(source->getRankGrade(), ladder->m_grades)];- bonus.setField(WeaponBonus::RATE_OF_FIRE, bonus.getField(WeaponBonus::RATE_OF_FIRE) + stat[RANK_STAT_RATE_OF_FIRE] - 1.0f);+ const Int grade = source->getRankGrade();+ const Real* stat = ladder->m_stat[MIN(grade, ladder->m_grades)];+ // and its own perks on top: a steadier rate of fire and reach, a faster one when it is nearly dead+ Real rateOfFire = stat[RANK_STAT_RATE_OF_FIRE] - 1.0f + ladder->perk(grade, RANK_PERK_RATE_OF_FIRE);+ const Real lastStand = ladder->perk(grade, RANK_PERK_LAST_STAND);+ const BodyModuleInterface* body = source->getBodyModule();+ if (lastStand > 0.0f && body->getHealth() < RANK_LAST_STAND_HEALTH * body->getMaxHealth())+ rateOfFire += lastStand;+ bonus.setField(WeaponBonus::RATE_OF_FIRE, bonus.getField(WeaponBonus::RATE_OF_FIRE) + rateOfFire);bonus.setField(WeaponBonus::DAMAGE, bonus.getField(WeaponBonus::DAMAGE) + stat[RANK_STAT_DAMAGE] - 1.0f);- bonus.setField(WeaponBonus::RANGE, bonus.getField(WeaponBonus::RANGE) + stat[RANK_STAT_RANGE] - 1.0f);+ bonus.setField(WeaponBonus::RANGE, bonus.getField(WeaponBonus::RANGE) + stat[RANK_STAT_RANGE] - 1.0f+ + ladder->perk(grade, RANK_PERK_RANGE));}else if (TheGlobalData->m_weaponBonusSet)TheGlobalData->m_weaponBonusSet->appendBonuses(flags, bonus);- // a leader's auras reach any friendly unit, on a ladder or not; range only an artillery piece's- const Real auraRateOfFire = MIN(source->getRankAura(RANK_AURA_RATE_OF_FIRE), TheGlobalData->m_rankAuraRateOfFireCap);+ // a leader's auras reach any friendly unit, on a ladder or not; range only an artillery piece's.+ // The rate-of-fire aura and a Propaganda Tower's enthusiasm give the larger of the two, not both.+ Real auraRateOfFire = MIN(source->getRankAura(RANK_AURA_RATE_OF_FIRE), TheGlobalData->m_rankAuraRateOfFireCap);+ const WeaponBonusConditionFlags ENTHUSIASM = (1 << WEAPONBONUSCONDITION_ENTHUSIASTIC) | (1 << WEAPONBONUSCONDITION_SUBLIMINAL);+ if (auraRateOfFire > 0.0f && (flags & ENTHUSIASM) && TheGlobalData->m_weaponBonusSet)+ {+ WeaponBonus enthusiasm;+ enthusiasm.clear();+ TheGlobalData->m_weaponBonusSet->appendBonuses(flags & ENTHUSIASM, enthusiasm);+ auraRateOfFire -= MIN(auraRateOfFire, enthusiasm.getField(WeaponBonus::RATE_OF_FIRE) - 1.0f);+ }if (auraRateOfFire > 0.0f)bonus.setField(WeaponBonus::RATE_OF_FIRE, bonus.getField(WeaponBonus::RATE_OF_FIRE) + auraRateOfFire);const Real auraRange = source->getRankAura(RANK_AURA_RANGE);diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cppindex b218ffabd..a2bbc6cf4 100644--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp@@ -99,6 +99,7 @@#include "GameLogic/Object.h"#include "GameLogic/Module/AIUpdate.h"#include "GameLogic/Module/BodyModule.h"+#include "GameLogic/ExperienceTracker.h"#include "GameLogic/Module/CreateModule.h"#include "GameLogic/Module/DestroyModule.h"#include "GameLogic/Module/OpenContain.h"@@ -4066,9 +4067,10 @@ static void unitTimings(void)/** The rank auras, once a second (docs/plans/RANK-LADDER.md in the wrapper). Every unit's slots are* cleared, then each leader writes its strength into the slots of the friendly units within its* radius, keeping the larger, so three leaders of one kind give the strongest one's and the walk's- * order does not matter. A leader never reaches itself, and buildings take nothing. The DETECT- * perk works here too: a stealthed enemy within its radius stays detected until the next pass.- * A unit whose sight moved looks again. */+ * order does not matter. A leader never reaches itself; each kind has its own radius, and reaches+ * units, only infantry, or units and buildings as its line says. The DETECT perk works here too: a+ * stealthed enemy within its radius stays detected until the next pass. Afterwards a unit whose+ * sight moved looks again, one whose pace moved takes its new speed, and a drill aura teaches. *///-------------------------------------------------------------------------------------------------static void updateRankAuras( Object *objList ){@@ -4093,18 +4095,21 @@ static void updateRankAuras( Object *objList )|| leader->getContainedBy() )continue;const Int grade = leader->getRankGrade();- Real strength[ RANK_AURA_PASSED ];+ Real strength[ RANK_AURA_PASSED ], radiusSqr[ RANK_AURA_PASSED ];+ RankReach reach[ RANK_AURA_PASSED ];Bool gives = FALSE;for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura ){strength[ aura ] = ladder->aura( grade, (RankAura)aura );+ const Real radius = ladder->auraRadius( grade, (RankAura)aura );+ radiusSqr[ aura ] = radius * radius;+ reach[ aura ] = ladder->auraReach( grade, (RankAura)aura );gives = gives || strength[ aura ] > 0.0f;}const Real detect = ladder->perk( grade, RANK_PERK_DETECT );if( !gives && detect <= 0.0f )continue;- const Real radius = ladder->auraRadius( grade );const Coord3D *at = leader->getPosition();for( Object *other = objList; other; other = other->getNextObject() ){@@ -4135,11 +4140,12 @@ static void updateRankAuras( Object *objList )}other->getStealth()->markAsDetected( LOGICFRAMES_PER_SECOND + 1 );}- if( !gives || distSqr > radius * radius || other->isKindOf( KINDOF_STRUCTURE )- || leader->getRelationship( other ) != ALLIES )+ if( !gives || leader->getRelationship( other ) != ALLIES )continue;+ const Bool structure = other->isKindOf( KINDOF_STRUCTURE ), infantry = other->isKindOf( KINDOF_INFANTRY );for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )- if( strength[ aura ] > 0.0f )+ if( strength[ aura ] > 0.0f && distSqr <= radiusSqr[ aura ]+ && ( structure ? reach[ aura ] == RANK_REACH_STRUCTURES : reach[ aura ] != RANK_REACH_INFANTRY || infantry ) )other->raiseRankAura( (RankAura)aura, strength[ aura ] );}}@@ -4152,11 +4158,33 @@ static void updateRankAuras( Object *objList )for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )moved = moved || obj->getRankAura( (RankAura)aura ) != before[ index ].aura[ aura ];if( moved )- DEBUG_LOG(("RANK AURA frame=%d id=%d template=%s grade=%d rof=%.2f sight=%.2f guard=%.2f range=%.2f\n",+ DEBUG_LOG(("RANK AURA frame=%d id=%d template=%s grade=%d rof=%.2f sight=%.2f guard=%.2f range=%.2f"+ " mend=%.4f pace=%.2f drill=%.0f steady=%.2f capture=%.2f spoils=%.2f\n",TheGameLogic->getFrame(), obj->getID(), obj->getTemplate()->getName().str(), obj->getRankGrade(),obj->getRankAura( RANK_AURA_RATE_OF_FIRE ), obj->getRankAura( RANK_AURA_SIGHT ),- obj->getRankAura( RANK_AURA_GUARD ), obj->getRankAura( RANK_AURA_RANGE )));+ obj->getRankAura( RANK_AURA_GUARD ), obj->getRankAura( RANK_AURA_RANGE ),+ obj->getRankAura( RANK_AURA_MEND ), obj->getRankAura( RANK_AURA_PACE ), obj->getRankAura( RANK_AURA_DRILL ),+ obj->getRankAura( RANK_AURA_STEADY ), obj->getRankAura( RANK_AURA_CAPTURE ), obj->getRankAura( RANK_AURA_SPOILS )));obj->onRankSightChanged( before[ index ].sight );+ if( obj->getRankAura( RANK_AURA_PACE ) != before[ index ].aura[ RANK_AURA_PACE ] && obj->getAIUpdateInterface() )+ obj->getAIUpdateInterface()->refreshVeterancySpeed();+ }++ // a drill aura teaches a unit of a ladder up to its cap, through the one-grade clip; one that+ // passes its points on (a pilot's sink) learns nothing here. Apart from the walk above, since a+ // promotion may hand out an upgrade that makes an object.+ for( Object *obj = objList; obj; obj = obj->getNextObject() )+ {+ const Int drillCap = REAL_TO_INT_FLOOR( obj->getRankAura( RANK_AURA_DRILL ) );+ const RankLadder *ladder = drillCap > 0 ? TheGlobalData->getRankLadder( obj->getTemplate() ) : NULL;+ ExperienceTracker *tracker = obj->getExperienceTracker();+ if( ladder && !obj->isEffectivelyDead() && tracker->isTrainable() && tracker->getExperienceSink() == INVALID_ID )+ {+ const Int gain = ladder->drillGain( RankLadder::unitValue( obj->getTemplate() ), tracker->getCurrentExperience(),+ drillCap, TheGlobalData->m_rankDrillRate );+ if( gain > 0 )+ tracker->addExperiencePoints( gain, FALSE );+ }}}@@ -5294,20 +5322,23 @@ void GameLogic::update( void )// Faction veterancy's self-repair (GLA): once a second a ranked unit that has gone unhurt for// the Veterancy block's SelfRepairDelay heals its side's share of its max health. Healing itself earns it// nothing (Object::scoreTheHeal).- // A grade's MEND perk is the same heal at its own rate.+ // A grade's MEND perk is the same heal at its own rate. A leader's mend aura heals at once, hurt+ // recently or not, and a unit takes the larger of the two.if( m_frame % LOGICFRAMES_PER_SECOND == 0 ){updateRankAuras( m_objList );for( Object *obj = m_objList; obj; obj = obj->getNextObject() ){- const Real share = MAX( TheGlobalData->getRankStat( obj->getTemplate(), obj->getRankGrade(), RANK_STAT_SELF_REPAIR ),- obj->getRankPerk( RANK_PERK_MEND ) );- if( share <= 0.0f || obj->isEffectivelyDead() )+ const Real self = MAX( TheGlobalData->getRankStat( obj->getTemplate(), obj->getRankGrade(), RANK_STAT_SELF_REPAIR ),+ obj->getRankPerk( RANK_PERK_MEND ) );+ const Real aura = obj->getRankAura( RANK_AURA_MEND );+ if( ( self <= 0.0f && aura <= 0.0f ) || obj->isEffectivelyDead() )continue;const BodyModuleInterface *body = obj->getBodyModule();const UnsignedInt lastHurt = body->getLastDamageTimestamp();- if( body->getHealth() >= body->getMaxHealth()- || ( lastHurt <= m_frame && m_frame - lastHurt < TheGlobalData->m_veterancySelfRepairDelay ) )+ const Bool resting = !( lastHurt <= m_frame && m_frame - lastHurt < TheGlobalData->m_veterancySelfRepairDelay );+ const Real share = MAX( aura, resting ? self : 0.0f );+ if( share <= 0.0f || body->getHealth() >= body->getMaxHealth() )continue;obj->attemptHealing( body->getMaxHealth() * share, obj );}diff --git a/GeneralsMD/Code/Tests/test_rank_ladder.cpp b/GeneralsMD/Code/Tests/test_rank_ladder.cppindex 09c552151..08dcd8519 100644--- a/GeneralsMD/Code/Tests/test_rank_ladder.cpp+++ b/GeneralsMD/Code/Tests/test_rank_ladder.cpp@@ -1,7 +1,7 @@/** The rank ladder's arithmetic (RankLadder in GlobalData.h, docs/plans/RANK-LADDER.md in the* wrapper): the ratio each side's length and top give, the thresholds, the EA level on the pins, the- * one-grade clip and the stat split.+ * one-grade clip and the stat split, and the perks and auras each side's shipped Perk_ lines give.*//* crc.h pulls winsock2.h, so it has to come before anything that drags in windows.h */#include "Common/crc.h"@@ -9,6 +9,8 @@#include "test_harness.h"#include <math.h>+#include <stdio.h>+#include <string.h>#include "Common/GlobalData.h"@@ -193,8 +195,225 @@ TEST(rank_ladder_perks_carry_up_and_the_strongest_of_a_kind_holds)CHECK_NEAR( ladder.aura( 17, RANK_AURA_RALLY ), 0.15f, 1e-6f );CHECK_EQ( ladder.aura( 16, RANK_AURA_RALLY ), 0.0f );- /* the Maresal's double reach, and a grade past the top reads the top */- CHECK_NEAR( ladder.auraRadius( 20 ), 150.0f, 1e-3f );- CHECK_NEAR( ladder.auraRadius( 21 ), 300.0f, 1e-3f );- CHECK_NEAR( ladder.auraRadius( 40 ), 300.0f, 1e-3f );+ /* the Maresal's double reach, and a grade past the top reads the top; no line names a radius, so+ every kind and the rally take AuraRadius */+ CHECK_NEAR( ladder.auraRadius( 20, RANK_AURA_RATE_OF_FIRE ), 150.0f, 1e-3f );+ CHECK_NEAR( ladder.auraRadius( 21, RANK_AURA_RATE_OF_FIRE ), 300.0f, 1e-3f );+ CHECK_NEAR( ladder.auraRadius( 40, RANK_AURA_RATE_OF_FIRE ), 300.0f, 1e-3f );+ CHECK_NEAR( ladder.auraRadius( 21, RANK_AURA_RALLY ), 300.0f, 1e-3f );+}++/* The side's Perk_ lines as BalanceReforged.ini ships them, through the parser's own grammar+ (RankLadder::addPerkLine), on top of that side's stats. FALSE if the file is missing or a line+ will not parse. */+static Bool shippedLadder( RankLadder &ladder, const char *side )+{+ FILE *fp = fopen( BALANCE_REFORGED_INI, "rb" );+ if( fp == NULL )+ return FALSE;+ char key[ 32 ];+ snprintf( key, sizeof( key ), "Perk_%s", side );+ const size_t keyLength = strlen( key );+ Bool parsed = TRUE;+ char line[ 512 ];+ while( fgets( line, sizeof( line ), fp ) != NULL )+ {+ char *at = line;+ while( *at == ' ' || *at == '\t' )+ ++at;+ if( strncmp( at, key, keyLength ) != 0 || ( at[ keyLength ] != ' ' && at[ keyLength ] != '=' ) )+ continue;+ char *comment = strchr( at, ';' );+ if( comment )+ *comment = '\0';+ const char *tokens[ 6 ];+ Int count = 0;+ for( char *token = strtok( strchr( at, '=' ) + 1, " \t\r\n" ); token && count < 6; token = strtok( NULL, " \t\r\n" ) )+ tokens[ count++ ] = token;+ try+ {+ ladder.addPerkLine( tokens, count );+ }+ catch( ... )+ {+ printf( " %s line will not parse\n", key );+ parsed = FALSE;+ }+ }+ fclose( fp );+ ladder.finish( 1.4f );+ return parsed;+}++TEST(rank_ladder_america_ships_the_wiki_ladder)+{+ RankLadder usa = america();+ CHECK( shippedLadder( usa, "America" ) );++ /* self: Drilled at E-2, Steady hands then Calibrated, Precision, the Designator's 2 s then 4 s */+ CHECK_EQ( usa.perk( 0, RANK_PERK_RATE_OF_FIRE ), 0.0f );+ CHECK_NEAR( usa.perk( 1, RANK_PERK_RATE_OF_FIRE ), 0.05f, 1e-6f );+ CHECK_NEAR( usa.perk( 2, RANK_PERK_RANGE ), 0.03f, 1e-6f );+ CHECK_NEAR( usa.perk( 14, RANK_PERK_RANGE ), 0.06f, 1e-6f );+ CHECK_NEAR( usa.perk( 3, RANK_PERK_MEND ), 0.005f, 1e-6f );+ CHECK_NEAR( usa.perk( 15, RANK_PERK_SCATTER ), 0.50f, 1e-6f );+ CHECK_NEAR( usa.perk( 24, RANK_PERK_DESIGNATE ), 2.0f, 1e-6f );+ CHECK_EQ( usa.perk( 27, RANK_PERK_DESIGNATE_REVEAL ), 0.0f );+ CHECK_NEAR( usa.perk( 28, RANK_PERK_DESIGNATE ), 4.0f, 1e-6f );+ CHECK_NEAR( usa.perk( 28, RANK_PERK_DESIGNATE_REVEAL ), 1.0f, 1e-6f );++ /* the rate-of-fire aura I to VI, each with its own radius */+ CHECK_EQ( usa.aura( 3, RANK_AURA_RATE_OF_FIRE ), 0.0f );+ CHECK_NEAR( usa.aura( 4, RANK_AURA_RATE_OF_FIRE ), 0.05f, 1e-6f );+ CHECK_NEAR( usa.auraRadius( 4, RANK_AURA_RATE_OF_FIRE ), 80.0f, 1e-3f );+ CHECK_NEAR( usa.auraRadius( 10, RANK_AURA_RATE_OF_FIRE ), 100.0f, 1e-3f );+ CHECK_NEAR( usa.aura( 23, RANK_AURA_RATE_OF_FIRE ), 0.15f, 1e-6f );+ CHECK_NEAR( usa.auraRadius( 23, RANK_AURA_RATE_OF_FIRE ), 160.0f, 1e-3f );++ /* the mend aura reaches infantry at 80, then every unit at 100 from the Warrant Officer */+ CHECK_NEAR( usa.aura( 6, RANK_AURA_MEND ), 0.005f, 1e-6f );+ CHECK_EQ( (Int)usa.auraReach( 6, RANK_AURA_MEND ), (Int)RANK_REACH_INFANTRY );+ CHECK_NEAR( usa.auraRadius( 12, RANK_AURA_MEND ), 80.0f, 1e-3f );+ CHECK_NEAR( usa.aura( 13, RANK_AURA_MEND ), 0.0075f, 1e-6f );+ CHECK_EQ( (Int)usa.auraReach( 13, RANK_AURA_MEND ), (Int)RANK_REACH_UNITS );+ CHECK_NEAR( usa.auraRadius( 13, RANK_AURA_MEND ), 100.0f, 1e-3f );++ /* drill caps on the grade it names, detect is a radius, and the O-10's command net reaches 25%+ farther with every aura but not with its detection */+ CHECK_NEAR( usa.aura( 8, RANK_AURA_DRILL ), 4.0f, 1e-6f );+ CHECK_NEAR( usa.aura( 25, RANK_AURA_DRILL ), 13.0f, 1e-6f );+ CHECK_NEAR( usa.perk( 21, RANK_PERK_DETECT ), 100.0f, 1e-3f );+ CHECK_NEAR( usa.auraRadius( 26, RANK_AURA_GUARD ), 180.0f, 1e-3f );+ CHECK_NEAR( usa.auraRadius( 27, RANK_AURA_GUARD ), 225.0f, 1e-3f );+ CHECK_NEAR( usa.aura( 28, RANK_AURA_RATE_OF_FIRE ), 0.18f, 1e-6f );+ CHECK_NEAR( usa.auraRadius( 28, RANK_AURA_RATE_OF_FIRE ), 250.0f, 1e-3f );+ CHECK_NEAR( usa.perk( 28, RANK_PERK_DETECT ), 100.0f, 1e-3f );+ CHECK_EQ( usa.aura( 28, RANK_AURA_PACE ), 0.0f );+}++TEST(rank_ladder_china_ships_the_wiki_ladder)+{+ RankLadder prc = china();+ CHECK( shippedLadder( prc, "China" ) );++ /* self: Hardy, and Last stand from the Major General */+ CHECK_EQ( prc.perk( 1, RANK_PERK_HEALTH ), 0.0f );+ CHECK_NEAR( prc.perk( 2, RANK_PERK_HEALTH ), 0.08f, 1e-6f );+ CHECK_EQ( prc.perk( 16, RANK_PERK_LAST_STAND ), 0.0f );+ CHECK_NEAR( prc.perk( 17, RANK_PERK_LAST_STAND ), 0.25f, 1e-6f );++ /* guard I to III, steady to Fearless's -50%, seize, and forced march for infantry only */+ CHECK_NEAR( prc.aura( 3, RANK_AURA_GUARD ), 0.04f, 1e-6f );+ CHECK_NEAR( prc.auraRadius( 3, RANK_AURA_GUARD ), 80.0f, 1e-3f );+ CHECK_NEAR( prc.aura( 14, RANK_AURA_GUARD ), 0.10f, 1e-6f );+ CHECK_NEAR( prc.aura( 11, RANK_AURA_STEADY ), 0.50f, 1e-6f );+ CHECK_NEAR( prc.aura( 12, RANK_AURA_CAPTURE ), 0.30f, 1e-6f );+ CHECK_NEAR( prc.aura( 16, RANK_AURA_PACE ), 0.08f, 1e-6f );+ CHECK_EQ( (Int)prc.auraReach( 16, RANK_AURA_PACE ), (Int)RANK_REACH_INFANTRY );+ CHECK_NEAR( prc.aura( 18, RANK_AURA_DRILL ), 10.0f, 1e-6f );++ /* the General's rate-of-fire IV names no radius: III's 180, then People's army's 25% */+ CHECK_NEAR( prc.aura( 19, RANK_AURA_RATE_OF_FIRE ), 0.18f, 1e-6f );+ CHECK_NEAR( prc.auraRadius( 18, RANK_AURA_RATE_OF_FIRE ), 180.0f, 1e-3f );+ CHECK_NEAR( prc.auraRadius( 19, RANK_AURA_RATE_OF_FIRE ), 225.0f, 1e-3f );+ CHECK_EQ( prc.perk( 19, RANK_PERK_DETECT ), 0.0f );+}++TEST(rank_ladder_gla_ships_the_wiki_ladder)+{+ RankLadder gla_ = gla();+ CHECK( shippedLadder( gla_, "GLA" ) );++ /* self: Light feet, Patch-up, Scavenger, Tough, Cell survives */+ CHECK_NEAR( gla_.perk( 2, RANK_PERK_SPEED ), 0.05f, 1e-6f );+ CHECK_NEAR( gla_.perk( 3, RANK_PERK_MEND ), 0.005f, 1e-6f );+ CHECK_EQ( gla_.perk( 3, RANK_PERK_SCAVENGE ), 0.0f );+ CHECK_NEAR( gla_.perk( 4, RANK_PERK_SCAVENGE ), 0.10f, 1e-6f );+ CHECK_NEAR( gla_.perk( 5, RANK_PERK_HEALTH ), 0.08f, 1e-6f );+ CHECK_EQ( gla_.perk( 17, RANK_PERK_SALVAGE_CRATE ), 0.0f );+ CHECK_NEAR( gla_.perk( 18, RANK_PERK_SALVAGE_CRATE ), 1.0f, 1e-6f );++ /* pace I is infantry's, pace II as strong for every unit replaces it, III is stronger */+ CHECK_EQ( (Int)gla_.auraReach( 6, RANK_AURA_PACE ), (Int)RANK_REACH_INFANTRY );+ CHECK_EQ( (Int)gla_.auraReach( 10, RANK_AURA_PACE ), (Int)RANK_REACH_UNITS );+ CHECK_NEAR( gla_.auraRadius( 10, RANK_AURA_PACE ), 120.0f, 1e-3f );+ CHECK_NEAR( gla_.aura( 15, RANK_AURA_PACE ), 0.12f, 1e-6f );++ /* spoils I to III, the last one paying for buildings' kills too */+ CHECK_NEAR( gla_.aura( 7, RANK_AURA_SPOILS ), 0.05f, 1e-6f );+ CHECK_EQ( (Int)gla_.auraReach( 14, RANK_AURA_SPOILS ), (Int)RANK_REACH_UNITS );+ CHECK_NEAR( gla_.aura( 17, RANK_AURA_SPOILS ), 0.15f, 1e-6f );+ CHECK_EQ( (Int)gla_.auraReach( 17, RANK_AURA_SPOILS ), (Int)RANK_REACH_STRUCTURES );+ CHECK_NEAR( gla_.auraRadius( 17, RANK_AURA_SPOILS ), 180.0f, 1e-3f );++ /* the Warlord's rate-of-fire II keeps I's 120, Liberation's 25% on top at the end */+ CHECK_NEAR( gla_.aura( 15, RANK_AURA_RATE_OF_FIRE ), 0.12f, 1e-6f );+ CHECK_NEAR( gla_.auraRadius( 15, RANK_AURA_RATE_OF_FIRE ), 120.0f, 1e-3f );+ CHECK_NEAR( gla_.aura( 19, RANK_AURA_MEND ), 0.0125f, 1e-6f );+ CHECK_NEAR( gla_.auraRadius( 20, RANK_AURA_MEND ), 225.0f, 1e-3f );+ CHECK_EQ( gla_.aura( 20, RANK_AURA_GUARD ), 0.0f );+}++/* Every aura kind a shipped ladder gives draws a ring: the file has an AuraRing_<kind> block for it,+ or InGameUI::updateAuraRings skips the kind and the leader's aura goes unseen. */+TEST(rank_ladder_every_aura_given_has_a_ring)+{+ FILE *fp = fopen( BALANCE_REFORGED_INI, "rb" );+ CHECK( fp != NULL );+ if( fp == NULL )+ return;+ static char text[ 1 << 20 ];+ text[ fread( text, 1, sizeof( text ) - 1, fp ) ] = '\0';+ fclose( fp );++ struct Side { const char *name; RankLadder ladder; } sides[] =+ {+ { "America", america() }, { "China", china() }, { "GLA", gla() },+ { "Turkiye", makeLadder( 21, 4, 11, 16, 16, 1.42f, 1.19f, 1.42f ) },+ };+ for( Side &side : sides )+ {+ CHECK( shippedLadder( side.ladder, side.name ) );+ for( Int kind = 0; kind < RANK_AURA_COUNT; ++kind )+ {+ Bool given = FALSE;+ for( Int grade = 0; grade <= side.ladder.m_grades; ++grade )+ given = given || side.ladder.aura( grade, (RankAura)kind ) > 0.0f;+ char block[ 64 ];+ snprintf( block, sizeof( block ), "AuraRing_%s", TheRankAuraNames[ kind ] );+ Bool ringed = FALSE; // the block's own line, not a longer name that starts the same+ for( const char *at = strstr( text, block ); at && !ringed; at = strstr( at + 1, block ) )+ ringed = strchr( " \t\r\n", at[ strlen( block ) ] ) != NULL;+ if( given && !ringed )+ printf( " %s gives %s and no ring draws it\n", side.name, TheRankAuraNames[ kind ] );+ CHECK( !given || ringed );+ }+ }+}++TEST(rank_ladder_perk_line_grammar_refuses_what_it_does_not_know)+{+ RankLadder ladder;+ ladder.clear();+ const char *const unknownKind[] = { "3", "AURA_NOTHING", "5%" };+ const char *const unknownReach[] = { "3", "AURA_MEND", "1%", "100", "AIRCRAFT" };+ const char *const pastTheTop[] = { "33", "HEALTH", "8%" };+ Int threw = 0;+ try { ladder.addPerkLine( unknownKind, 3 ); } catch( ... ) { ++threw; }+ try { ladder.addPerkLine( unknownReach, 5 ); } catch( ... ) { ++threw; }+ try { ladder.addPerkLine( pastTheTop, 3 ); } catch( ... ) { ++threw; }+ CHECK_EQ( threw, 3 );+}++TEST(rank_ladder_drill_teaches_up_to_its_cap_and_no_further)+{+ const RankLadder usa = america();+ /* a Crusader, E 100, 5% a second under a drill aura I (Corporal, grade 4) */+ const Int corporal = usa.threshold( 100, 4 );+ CHECK_EQ( usa.drillGain( 100, 0, 4, 0.05f ), 5 );+ CHECK_EQ( usa.drillGain( 100, corporal - 2, 4, 0.05f ), 2 );+ CHECK_EQ( usa.drillGain( 100, corporal, 4, 0.05f ), 0 );+ CHECK_EQ( usa.drillGain( 100, corporal + 300, 4, 0.05f ), 0 );+ /* the Red Guard's E of 5 still learns a point a second */+ CHECK_EQ( china().drillGain( 5, 0, 4, 0.05f ), 1 );}diff --git a/GeneralsMD/Code/Tools/aura_rings.py b/GeneralsMD/Code/Tools/aura_rings.pyindex 7e4454d14..c810cfa91 100644--- a/GeneralsMD/Code/Tools/aura_rings.py+++ b/GeneralsMD/Code/Tools/aura_rings.py@@ -1,5 +1,6 @@"""The ground rings under a Turkiye leader, one texture per aura kind (BalanceReforged.ini,-AuraRing_<kind> in the Veterancy block).+AuraRing_<kind> in the Veterancy block). The other sides' six kinds borrow these five in their own+tints; the INI says which borrows which.Every ring is drawn at the full aura radius, and each kind owns a fixed band of that one disc, soany set of them lies as one dial: never on top of each other, the same line weight and spacing