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.

refactor(gamelogic): remove the rank ladder, EA's four levels return

Olcay Seygand3368206b1fe
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7d56b0e47..1b639a3ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,13 @@ found and fixed, EA's own, not port damage.**
---
+## EA's four ranks are back
+
+- The rank ladder is gone, every grade, perk and aura of it. A unit is Regular, Veteran, Elite or Heroic again, on the kills and the bonuses the 2003 game gave them, with EA's chevrons over the health bar and on the portrait. Six kills of its own kind make a Crusader Heroic, where an American one needed 66 on the ladder.
+- What EA built a level up is built a level up again. Red Guard Training makes a Veteran and Battlemaster Training an Elite, the Tank General's tanks and the Infantry General's men leave the factory Veteran, and the tooltips and general bios say so. A veterancy crate gives one whole level, and a hacker earns experience at EA's rate.
+- The rings under leaders went with it, and so did GLA's faster, self-mending veterans and each side's own bonus table. Turkiye, still an experiment, ranks up on EA's four levels too.
+- Replays recorded before this change play out differently.
+
## Five more colours
- Crimson, Azure, Salmon, Teal and Lavender join the colour box in every room. EA's list stopped at eight, so the last player into a full room took the one colour left; now he has six to pick from, and everyone's old colours stay as they were. A replay recorded before this change, with a random colour in it, plays out differently.
@@ -2457,6 +2464,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same
shadow trees have now is the opposite trick, and cost about thirty lines: the batch of triangles
the trees are already drawn from, drawn a second time with the tree laid flat on its own base and
slid along the sun. The shape comes free because it is the same triangles and the same texture.
+- The rank ladder, 28 American grades and their like on the other sides with perks and auras, shipped in v3.3.0 and came out again in November 2026 on the owner's word. Its long climb starved everything EA hangs on the levels: the Heroic weapon sets, voices and crate rules waited for 50 to 66 kills where six used to do. The entries about it further up this page stay as the record of what it was.
- A smoke and fire simulation was built on 28 to 30 October 2026, never reached a release and came out again. Smoke and flame ran as a moving body of air on the graphics card, and in a test fight of three nukes and a Scud Storm on an RTX 2060 the card's frame took 5.0 ms with it off, 9.9 on Low and 16.5 on High. The owner took it out for that cost, so the game keeps its sprites.
- Search and destroy, the order on F that walked a group round a circle and left it guarding there, went out in v2.4.0 and is taken out again. An attack move and a guard do the same two halves with keys players already know, and the F place is back for the unit's own buttons. The Strategy Center's Search and Destroy battle plan is untouched.
- Soldiers used to drop their posed shadow once the camera pulled far enough back to make each man a
diff --git a/GeneralsMD/Code/BuildFingerprint.manifest b/GeneralsMD/Code/BuildFingerprint.manifest
index c0fbbbbff..029e4d93f 100644
--- a/GeneralsMD/Code/BuildFingerprint.manifest
+++ b/GeneralsMD/Code/BuildFingerprint.manifest
@@ -1,9 +1,4 @@
CMakeLists.txt
-Data/Art/Textures/ReforgedAuraGuard.tga
-Data/Art/Textures/ReforgedAuraRally.tga
-Data/Art/Textures/ReforgedAuraRange.tga
-Data/Art/Textures/ReforgedAuraRateOfFire.tga
-Data/Art/Textures/ReforgedAuraSight.tga
Data/Art/Textures/ReforgedBarAmericaCenter.tga
Data/Art/Textures/ReforgedBarAmericaLeft.tga
Data/Art/Textures/ReforgedBarAmericaRight.tga
@@ -14,6 +9,7 @@ Data/Art/Textures/ReforgedBarChinaRight.tga
Data/Art/Textures/ReforgedBarGLACenter.tga
Data/Art/Textures/ReforgedBarGLALeft.tga
Data/Art/Textures/ReforgedBarGLARight.tga
+Data/Art/Textures/ReforgedFactionTurkiye.tga
Data/Art/Textures/ReforgedForceAttack.tga
Data/Art/Textures/ReforgedGuardCentre.tga
Data/Art/Textures/ReforgedGuardRing.tga
@@ -38,12 +34,6 @@ Data/Art/Textures/ReforgedMineGlowBlue.tga
Data/Art/Textures/ReforgedMineGlowRed.tga
Data/Art/Textures/ReforgedMineLedBlue.tga
Data/Art/Textures/ReforgedMineLedRed.tga
-Data/Art/Textures/ReforgedRankBar.tga
-Data/Art/Textures/ReforgedRankSkull.tga
-Data/Art/Textures/ReforgedRanksChina.tga
-Data/Art/Textures/ReforgedRanksGLA.tga
-Data/Art/Textures/ReforgedRanksTurkiye.tga
-Data/Art/Textures/ReforgedRanksUSA.tga
Data/Art/Textures/ReforgedSignalAttack.tga
Data/Art/Textures/ReforgedSignalDefend.tga
Data/Art/Textures/ReforgedSignalLook.tga
@@ -133,13 +123,6 @@ Data/Cinema/nohud.txt
Data/Cinema/nukedome.txt
Data/Cinema/nukefade.txt
Data/Cinema/nukewarp.txt
-Data/Cinema/rankaura.txt
-Data/Cinema/rankauramaresal.txt
-Data/Cinema/rankauranight.txt
-Data/Cinema/rankaurasnow.txt
-Data/Cinema/rankladder.txt
-Data/Cinema/rankringsall.txt
-Data/Cinema/rankzero.txt
Data/Cinema/reachhills.txt
Data/Cinema/readme_water.txt
Data/Cinema/rf_ai.txt
@@ -204,7 +187,6 @@ Data/Cinema/v240_hook.txt
Data/Cinema/v240_hook2.txt
Data/Cinema/v240_md.txt
Data/Cinema/v240_tank.txt
-Data/Cinema/vetranks.txt
Data/Cinema/wreckcheck.txt
Data/French/Generals.str
Data/German/Generals.str
@@ -232,11 +214,6 @@ Data/INI/MappedImages/HandCreated/ReforgedHudHelpbox.ini
Data/INI/MappedImages/HandCreated/ReforgedHudObsCommandBar.ini
Data/INI/MappedImages/HandCreated/ReforgedHudObsPlayerWindow.ini
Data/INI/MappedImages/HandCreated/ReforgedLobbySpot.ini
-Data/INI/MappedImages/HandCreated/ReforgedRankInsignia.ini
-Data/INI/MappedImages/HandCreated/ReforgedRanksChina.ini
-Data/INI/MappedImages/HandCreated/ReforgedRanksGLA.ini
-Data/INI/MappedImages/HandCreated/ReforgedRanksTurkiye.ini
-Data/INI/MappedImages/HandCreated/ReforgedRanksUSA.ini
Data/INI/ModernWater.ini
Data/INI/MultiplayerReforged.ini
Data/INI/ObjectCreationListReforged.ini
@@ -386,15 +363,6 @@ Data/Scenarios/particles100k.txt
Data/Scenarios/particles1m.txt
Data/Scenarios/particles1m_mixed.txt
Data/Scenarios/particles1m_smoke.txt
-Data/Scenarios/rankaura.txt
-Data/Scenarios/rankauramaresal.txt
-Data/Scenarios/rankauranight.txt
-Data/Scenarios/rankaurareplay.txt
-Data/Scenarios/rankaurasnow.txt
-Data/Scenarios/rankaurawiki.txt
-Data/Scenarios/rankladder.txt
-Data/Scenarios/rankringsall.txt
-Data/Scenarios/rankzero.txt
Data/Scenarios/reachhills.txt
Data/Scenarios/reachproof.txt
Data/Scenarios/reachshot.txt
@@ -485,7 +453,6 @@ Data/Scenarios/v240_tank.txt
Data/Scenarios/vehicleaccel.txt
Data/Scenarios/vehiclelean.txt
Data/Scenarios/vehicleturn.txt
-Data/Scenarios/vetranks.txt
Data/Scenarios/vision.txt
Data/Scenarios/wallgarrison.txt
Data/Scenarios/wreckcheck.txt
@@ -3267,7 +3234,6 @@ Tests/test_posixlocalfilesystem_stubs.cpp
Tests/test_posixpath.cpp
Tests/test_premain_strings.cpp
Tests/test_production_input.inc
-Tests/test_rank_ladder.cpp
Tests/test_registryfile.cpp
Tests/test_render_hooks.cpp
Tests/test_road_buffer.cpp
@@ -4099,7 +4065,6 @@ Tools/WorldBuilder/src/wbview3d.cpp
Tools/asan-check.sh
Tools/assetcull/assetcull.cpp
Tools/assetcull/assetcull.dsp
-Tools/aura_rings.py
Tools/bigfile.py
Tools/build-posix.sh
Tools/buildVersionUpdate/buildVersionUpdate.cpp
@@ -4264,12 +4229,6 @@ Tools/package-common.sh
Tools/packaging-resolution-check.sh
Tools/peacetime_layout.py
Tools/pink_laser.py
-Tools/rank_insignia.py
-Tools/rank_insignia_cells.py
-Tools/rank_insignia_china.py
-Tools/rank_insignia_gla.py
-Tools/rank_insignia_turkiye.py
-Tools/rank_insignia_usa.py
Tools/record-dx11-shaders.ps1
Tools/replay-check.sh
Tools/root-readonly-check.sh
diff --git a/GeneralsMD/Code/CMakeLists.txt b/GeneralsMD/Code/CMakeLists.txt
index 7352a7646..626e435ed 100644
--- a/GeneralsMD/Code/CMakeLists.txt
+++ b/GeneralsMD/Code/CMakeLists.txt
@@ -2423,17 +2423,6 @@ set_target_properties(test_water_grid PROPERTIES CXX_STANDARD 17)
if(ZH_PLATFORM_POSIX)
target_link_libraries(test_water_grid PRIVATE posixdevice w3ddevice)
endif()
-# The rank ladder's arithmetic (RankLadder, GlobalData.cpp): thresholds, pins, the one-grade clip, the
-# stat split. Linked like test_water_grid.
-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()
# Off Windows the device layer's hooks are the game's own: the renderer's from W3DDevice, the CD
# manager from PosixDevice. On Windows the test's own stubs stand in for gameenginedevice, which it
# does not link (B6).
@@ -2442,7 +2431,7 @@ if(ZH_PLATFORM_POSIX)
else()
# FunctionLexicon pulls in OptionsMenu, which queries the cloud capability.
# These tests omit gameenginedevice, so use its real no-backend entry points.
- foreach(name test_gameengine test_terrain_golden test_water_grid test_rank_ladder)
+ foreach(name test_gameengine test_terrain_golden test_water_grid)
target_sources(${name} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/GameEngineDevice/Source/W3DDevice/GameClient/HazardCloudUnsupported.cpp)
endforeach()
@@ -2467,10 +2456,10 @@ target_compile_definitions(test_gameengine PRIVATE
OPTIONS_MENU_WND="${CMAKE_CURRENT_SOURCE_DIR}/Data/Window/Menus/OptionsMenuClassic.wnd"
PLATE_TEXTURE_DIR="${CMAKE_CURRENT_SOURCE_DIR}/Data/Art/Textures")
-# W3: these four link the engine without its device and WinMain, whose Debug-only names it reads
+# W3: these three link the engine without its device and WinMain, whose Debug-only names it reads
# (Tests/debug_build_stubs.cpp; empty outside _DEBUG).
if(MSVC)
- foreach(name test_gameengine test_terrain_golden test_water_grid test_rank_ladder)
+ foreach(name test_gameengine test_terrain_golden test_water_grid)
target_sources(${name} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Tests/debug_build_stubs.cpp)
target_compile_definitions(${name} PRIVATE ZH_DEBUG_STUBS_ENGINE)
endforeach()
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraGuard.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraGuard.tga
deleted file mode 100644
index 3b06b81ba..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraGuard.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRally.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRally.tga
deleted file mode 100644
index b39fa0047..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRally.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRange.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRange.tga
deleted file mode 100644
index 9b52199e9..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRange.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRateOfFire.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRateOfFire.tga
deleted file mode 100644
index ff3b74b0d..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraRateOfFire.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraSight.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraSight.tga
deleted file mode 100644
index afa9a993d..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedAuraSight.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksTurkiye.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedFactionTurkiye.tga
similarity index 100%
rename from GeneralsMD/Code/Data/Art/Textures/ReforgedRanksTurkiye.tga
rename to GeneralsMD/Code/Data/Art/Textures/ReforgedFactionTurkiye.tga
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedRankBar.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedRankBar.tga
deleted file mode 100644
index 191568d3d..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedRankBar.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedRankSkull.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedRankSkull.tga
deleted file mode 100644
index f4e3083b1..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedRankSkull.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksChina.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksChina.tga
deleted file mode 100644
index ccb955749..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksChina.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksGLA.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksGLA.tga
deleted file mode 100644
index 753357aba..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksGLA.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksUSA.tga b/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksUSA.tga
deleted file mode 100644
index 98a374746..000000000
Binary files a/GeneralsMD/Code/Data/Art/Textures/ReforgedRanksUSA.tga and /dev/null differ
diff --git a/GeneralsMD/Code/Data/Cinema/rankaura.txt b/GeneralsMD/Code/Data/Cinema/rankaura.txt
deleted file mode 100644
index 9ae469e4c..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankaura.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Scenarios/rankaura.txt: the Albay Altay's two aura rings, radius 150, under a played seat 0
-# with the Altay selected by a -control click at the screen centre. hud on keeps the selection
-# and the rings. Zoom 0.55 relative put 100 world units at about 1090 px, the ring off frame.
-
-0.0 hud on
-0.3 cut 3450 3640 1.8 0 0
diff --git a/GeneralsMD/Code/Data/Cinema/rankauramaresal.txt b/GeneralsMD/Code/Data/Cinema/rankauramaresal.txt
deleted file mode 100644
index 12d3a781f..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankauramaresal.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Scenarios/rankauramaresal.txt: the Maresal Altay's five rings, radius 300, on the Twilight Flame
-# plateau. The first cut is rankaura.txt's framing, where a -control click at the screen centre
-# (after frame 360) selects the Altay; the selection survives the later cuts, which pull back and
-# tilt down so the whole ring fits: 2.4 at pitch -20 from 8 s, 2.0 at pitch -30 from 40 s. Under -noFPSLimit the logic runs
-# ahead of 60 a second and a socket screenshot lands several hundred frames after it is asked for,
-# so the two cuts sit far apart.
-# Zoom 3.6 at pitch 0 and 2.6 at heading 180 both showed the horizon and the shroud, the Altay off
-# screen: pulled back at the game's own pitch the camera looks past its target.
-
-0.0 hud on
-0.3 cut 3485 3960 1.8 0 0
-3.0 cut 3485 3960 1.8 0 0
-8.0 cut 3485 3960 2.4 0 -20
-40.0 cut 3485 3960 2.0 0 -30
diff --git a/GeneralsMD/Code/Data/Cinema/rankauranight.txt b/GeneralsMD/Code/Data/Cinema/rankauranight.txt
deleted file mode 100644
index e1ba720fe..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankauranight.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Scenarios/rankauranight.txt: the Maresal Altay's five rings, radius 300, in seat 0's base on Dark
-# Night, heading 45 looking north-east into the map. The first cut frames the Altay at the screen
-# centre for a -control click (after frame 360); the selection survives the later cuts, which pull
-# back and tilt down so the whole ring fits: 2.4 at pitch -20 from 8 s, 2.0 at pitch -30 from 40 s.
-# 3.3 at pitch 0 showed the horizon and a rock, the Altay off screen.
-
-0.0 hud on
-0.3 cut 904 905 1.8 45 0
-3.0 cut 904 905 1.8 45 0
-8.0 cut 904 905 2.4 45 -20
-40.0 cut 904 905 2.0 45 -30
diff --git a/GeneralsMD/Code/Data/Cinema/rankaurasnow.txt b/GeneralsMD/Code/Data/Cinema/rankaurasnow.txt
deleted file mode 100644
index 1422a028d..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankaurasnow.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Scenarios/rankaurasnow.txt: the Maresal Altay's five rings, radius 300, on Winter Wolf's snow. The
-# first cut frames the Altay at the screen centre for a -control click (after frame 360); the
-# selection survives the later cut, which pulls back and tilts down so the whole ring fits.
-
-0.0 hud on
-0.3 cut 900 1736 1.8 0 0
-3.0 cut 900 1736 1.8 0 0
-8.0 cut 900 1736 2.0 0 -30
diff --git a/GeneralsMD/Code/Data/Cinema/rankladder.txt b/GeneralsMD/Code/Data/Cinema/rankladder.txt
deleted file mode 100644
index fe9cf157b..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankladder.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Scenarios/rankladder.txt: one grid of every grade a side, at the game's own play distance
-# (zoom 1.03 relative logs about 1.27, what -camera opens at). hud on keeps the insignia, which
-# -cinema otherwise hides with the HUD. Run with a -video range so this clock is the logic frame
-# over 60: the drive east starts at 4.0 s, and each look point sits about 26 south of its grid's
-# middle so the grid rides above the control bar.
-
-0.0 hud on
-0.5 cut 3485 3726 1.03 0 0
-4.4 shot
-4.5 cut 3485 3961 1.03 0 0
-4.7 shot
-# the GLA grid has a fifth row (the grade 20 Technical at y 4290), so its look point sits 40
-# further north than the other two to keep that row clear of the top-left capture messages
-4.8 cut 3485 4191 1.03 0 0
-5.0 shot
-5.1 cut 3485 3965 1.6 0 0
-5.4 shot
diff --git a/GeneralsMD/Code/Data/Cinema/rankringsall.txt b/GeneralsMD/Code/Data/Cinema/rankringsall.txt
deleted file mode 100644
index f51b1c3c4..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankringsall.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Scenarios/rankringsall.txt: the America, China and GLA leaders' rings, one leader at a time on the
-# same spot, rankauramaresal's framing. Each leader gets the close cut at play zoom, where a -control
-# click at the screen centre selects it (logic frames 380, 1220, 2060), then the pull back to 2.0 at
-# pitch -30 that holds a ring of radius 300, and a still before it drives off.
-
-0.0 hud on
-0.3 cut 3485 3960 1.8 0 0
-9.3 cut 3485 3960 2.0 0 -30
-12.1 shot
-
-14.4 cut 3485 3960 1.8 0 0
-23.3 cut 3485 3960 2.0 0 -30
-26.1 shot
-
-28.4 cut 3485 3960 1.8 0 0
-37.3 cut 3485 3960 2.0 0 -30
-40.1 shot
diff --git a/GeneralsMD/Code/Data/Cinema/rankzero.txt b/GeneralsMD/Code/Data/Cinema/rankzero.txt
deleted file mode 100644
index fe4eba356..000000000
--- a/GeneralsMD/Code/Data/Cinema/rankzero.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Scenarios/rankzero.txt: the four structures and the unranked units between them, HUD on so the
-# health bars draw. Run with a -video range so this clock is the logic frame over 60; the units
-# start east at 2.0 s.
-
-0.0 hud on
-0.5 cut 3480 3920 1.3 0 0
-4.5 shot
-4.6 cut 3520 3930 0.8 0 0
-5.2 shot
diff --git a/GeneralsMD/Code/Data/Cinema/vetranks.txt b/GeneralsMD/Code/Data/Cinema/vetranks.txt
deleted file mode 100644
index 29003e850..000000000
--- a/GeneralsMD/Code/Data/Cinema/vetranks.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-# Scenarios/vetranks.txt: the three rows of rank insignia. No hud line: -cinema keeps the HUD
-# only when told, and the icons need it, since with the HUD hidden Drawable::drawIconUI draws no
-# health bar and no insignia. The cinema clock here reads about (logic frame + 14) / 60, so the
-# walk south starts near 3.8 s; each close cut sits a little south of its row's spawn line.
-# Pass 1 (zoom 0.4 relative, 0.49 absolute) was far too close: one tank in a corner.
-
-0.0 hud on
-# the rank-up float, about 110 logic frames after the rank lines (logic 24); it rises well above
-# its unit, so this looks further north than the overview to keep the GLA row's float in frame
-0.5 cut 3410 3990 1.4 0 0
-2.0 shot
-2.2 cut 3410 3930 1.25 0 0
-4.4 shot
-4.5 cut 3410 3780 0.7 0 0
-4.8 shot
-4.9 cut 3410 3925 0.7 0 0
-5.2 shot
-5.3 cut 3410 4075 0.7 0 0
-5.6 shot
diff --git a/GeneralsMD/Code/Data/French/Generals.str b/GeneralsMD/Code/Data/French/Generals.str
index 972508a39..98b596764 100644
--- a/GeneralsMD/Code/Data/French/Generals.str
+++ b/GeneralsMD/Code/Data/French/Generals.str
@@ -17845,426 +17845,6 @@ GUI:GraphNoData
"Rien n'a été enregistré pendant cette partie."
END
-RANK:NextRank
-"Grade suivant %d/%d XP"
-END
-
-RANK:PerkSIGHT
-"Vue +%d %%"
-END
-
-RANK:PerkSTILL_GUARD
-"À l'arrêt : %d %% de dégâts subis en moins"
-END
-
-RANK:PerkMEND
-"Hors combat : soigne %d,%02d %% par seconde"
-END
-
-RANK:PerkSPOTTER
-"Observe pour l'artillerie"
-END
-
-RANK:PerkSCATTER
-"Dispersion de l'artillerie -%d %%"
-END
-
-RANK:PerkDEATH_RALLY
-"Quand il tombe, les alliés proches subissent %d %% de dégâts en moins pendant 10 secondes"
-END
-
-RANK:PerkDETECT
-"Détecte les unités furtives à %d"
-END
-
-RANK:PerkAURA_RADIUS
-"Portée de l'aura +%d %%"
-END
-
-RANK:PerkAURA_RATE_OF_FIRE
-"Aura : cadence de tir +%d %%"
-END
-
-RANK:PerkAURA_SIGHT
-"Aura : vue +%d %%"
-END
-
-RANK:PerkAURA_GUARD
-"Aura : %d %% de dégâts subis en moins"
-END
-
-RANK:PerkAURA_RANGE
-"Aura : portée de l'artillerie +%d %%"
-END
-
-RANK:America0
-"E-1 Soldat"
-END
-
-RANK:America1
-"E-2 Soldat"
-END
-
-RANK:America2
-"E-3 Soldat de première classe"
-END
-
-RANK:America3
-"E-4 Spécialiste"
-END
-
-RANK:America4
-"E-4 Caporal"
-END
-
-RANK:America5
-"E-5 Sergent"
-END
-
-RANK:America6
-"E-6 Sergent-chef"
-END
-
-RANK:America7
-"E-7 Sergent de première classe"
-END
-
-RANK:America8
-"E-8 Sergent-major"
-END
-
-RANK:America9
-"E-8 Premier sergent"
-END
-
-RANK:America10
-"E-9 Sergent-major de bataillon"
-END
-
-RANK:America11
-"E-9 Sergent-major de commandement"
-END
-
-RANK:America12
-"E-9 Sergent-major de l'Armée"
-END
-
-RANK:America13
-"W-1 Adjudant"
-END
-
-RANK:America14
-"W-2 Adjudant-chef"
-END
-
-RANK:America15
-"W-3 Adjudant-chef"
-END
-
-RANK:America16
-"W-4 Adjudant-chef"
-END
-
-RANK:America17
-"W-5 Adjudant-chef"
-END
-
-RANK:America18
-"O-1 Sous-lieutenant"
-END
-
-RANK:America19
-"O-2 Lieutenant"
-END
-
-RANK:America20
-"O-3 Capitaine"
-END
-
-RANK:America21
-"O-4 Commandant"
-END
-
-RANK:America22
-"O-5 Lieutenant-colonel"
-END
-
-RANK:America23
-"O-6 Colonel"
-END
-
-RANK:America24
-"O-7 Général de brigade"
-END
-
-RANK:America25
-"O-8 Général de division"
-END
-
-RANK:America26
-"O-9 Général de corps d'armée"
-END
-
-RANK:America27
-"O-10 Général d'armée"
-END
-
-RANK:America28
-"Général de l'Armée"
-END
-
-RANK:China0
-"Sans grade"
-END
-
-RANK:China1
-"Soldat"
-END
-
-RANK:China2
-"Soldat de première classe"
-END
-
-RANK:China3
-"Caporal"
-END
-
-RANK:China4
-"Sergent"
-END
-
-RANK:China5
-"Sergent-chef de deuxième classe"
-END
-
-RANK:China6
-"Sergent-chef de première classe"
-END
-
-RANK:China7
-"Adjudant de troisième classe"
-END
-
-RANK:China8
-"Adjudant de deuxième classe"
-END
-
-RANK:China9
-"Adjudant de première classe"
-END
-
-RANK:China10
-"Sous-lieutenant"
-END
-
-RANK:China11
-"Lieutenant"
-END
-
-RANK:China12
-"Capitaine"
-END
-
-RANK:China13
-"Commandant"
-END
-
-RANK:China14
-"Lieutenant-colonel"
-END
-
-RANK:China15
-"Colonel"
-END
-
-RANK:China16
-"Colonel supérieur"
-END
-
-RANK:China17
-"Général de division"
-END
-
-RANK:China18
-"Général de corps d'armée"
-END
-
-RANK:China19
-"Général"
-END
-
-RANK:GLA0
-"Sans grade"
-END
-
-RANK:GLA1
-"Recrue"
-END
-
-RANK:GLA2
-"Irrégulier"
-END
-
-RANK:GLA3
-"Combattant"
-END
-
-RANK:GLA4
-"Pillard"
-END
-
-RANK:GLA5
-"Pillard aguerri"
-END
-
-RANK:GLA6
-"Équipier"
-END
-
-RANK:GLA7
-"Chef d'escouade"
-END
-
-RANK:GLA8
-"Chef de cellule"
-END
-
-RANK:GLA9
-"Chef de cellule principal"
-END
-
-RANK:GLA10
-"Capitaine de raid"
-END
-
-RANK:GLA11
-"Capitaine de colonne"
-END
-
-RANK:GLA12
-"Commandant d'assaut"
-END
-
-RANK:GLA13
-"Commandant de terrain"
-END
-
-RANK:GLA14
-"Commandant de secteur"
-END
-
-RANK:GLA15
-"Seigneur de guerre"
-END
-
-RANK:GLA16
-"Seigneur de guerre régional"
-END
-
-RANK:GLA17
-"Grand seigneur de guerre"
-END
-
-RANK:GLA18
-"Général"
-END
-
-RANK:GLA19
-"Grand général"
-END
-
-RANK:GLA20
-"Libérateur suprême"
-END
-
-RANK:Turkiye0
-"Sans grade"
-END
-
-RANK:Turkiye1
-"Er"
-END
-
-RANK:Turkiye2
-"Onbaşı"
-END
-
-RANK:Turkiye3
-"Çavuş"
-END
-
-RANK:Turkiye4
-"Uzman Çavuş"
-END
-
-RANK:Turkiye5
-"Astsubay Çavuş"
-END
-
-RANK:Turkiye6
-"Astsubay Kıdemli Çavuş"
-END
-
-RANK:Turkiye7
-"Astsubay Üstçavuş"
-END
-
-RANK:Turkiye8
-"Astsubay Kıdemli Üstçavuş"
-END
-
-RANK:Turkiye9
-"Astsubay Başçavuş"
-END
-
-RANK:Turkiye10
-"Astsubay Kıdemli Başçavuş"
-END
-
-RANK:Turkiye11
-"Teğmen"
-END
-
-RANK:Turkiye12
-"Üsteğmen"
-END
-
-RANK:Turkiye13
-"Yüzbaşı"
-END
-
-RANK:Turkiye14
-"Binbaşı"
-END
-
-RANK:Turkiye15
-"Yarbay"
-END
-
-RANK:Turkiye16
-"Albay"
-END
-
-RANK:Turkiye17
-"Tuğgeneral"
-END
-
-RANK:Turkiye18
-"Tümgeneral"
-END
-
-RANK:Turkiye19
-"Korgeneral"
-END
-
-RANK:Turkiye20
-"Orgeneral"
-END
-
-RANK:Turkiye21
-"Mareşal"
-END
-
INI:FactionTurkiye
"Turquie (expérimental)"
END
diff --git a/GeneralsMD/Code/Data/INI/BalanceReforged.ini b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
index 2cd373fe9..5b2271e38 100644
--- a/GeneralsMD/Code/Data/INI/BalanceReforged.ini
+++ b/GeneralsMD/Code/Data/INI/BalanceReforged.ini
@@ -2319,733 +2319,6 @@ Armor DemoGenTerroristArmor
Armor = POISON 50%
End
-; 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
- StartingGrades = 3
- ScienceRequired = SCIENCE_RedGuardTraining
- End
- End
-End
-
-Object Nuke_ChinaInfantryRedguard
- ReplaceModule ModuleTag_03
- Behavior = VeterancyGainCreate ModuleTag_RedGuardTraining
- StartingGrades = 3
- ScienceRequired = SCIENCE_RedGuardTraining
- End
- End
-End
-
-Object Tank_ChinaInfantryRedguard
- ReplaceModule ModuleTag_03
- Behavior = VeterancyGainCreate ModuleTag_RedGuardTraining
- StartingGrades = 3
- ScienceRequired = SCIENCE_RedGuardTraining
- End
- End
-End
-
-Object Infa_ChinaInfantryMiniGunner
- ReplaceModule ModuleTag_08
- Behavior = VeterancyGainCreate ModuleTag_RedGuardTraining
- StartingGrades = 3
- 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 ------------------------------------------------------------------------------
-;
-; Every rank in the art is a grade: 28 promotions for America (E-1 to General of the Army), 19 for
-; China (Private to General), 20 for GLA (Recruit to Supreme Liberator), 21 for Turkiye (Er to
-; Maresal). Grade 0 is unranked on every side, with no insignia and no bonus; America's E-1 and
-; Turkiye's Er wear nothing anyway, and China's Private and GLA's Recruit are a first promotion. The grade comes from a unit's experience and E, its own regular ExperienceValue
-; (what killing a regular copy of itself pays). The step to grade g costs E x r^(g-1), so the first
-; 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. 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
-; (rate of fire x damage x health) is 1 + WorthGain x sqrt(experience / Top E) at the grade's
-; experience, the same curve on every side, and each side splits it in its own proportions, reached
-; at the top: every stat at a grade is its top value raised to ln(worth) / ln(1 + WorthGain). Range
-; and Speed multiply as the others do; SelfRepair is the share of max health healed a second once the
-; unit has gone SelfRepairDelay milliseconds unhurt. A side's WeaponBonus lines add what a grade
-; does not carry and count from the Veteran pin on.
-;
-; 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%.
-;
-; 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. No aura sits below its
-; side's Elite pin: squads of corporals ringing and buffing each other read as noise, so a sergeant's
-; old aura is now the same bonus on himself, or gone where no self kind exists. The site's /wiki/ranks
-; describes the America, China and GLA ladders below.
-;
-; 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
-; MEND 1% heals 1% of max health a second once SelfRepairDelay unhurt
-; SPOTTER sees and is jammed the way the Gozcu timi is (SpotterSight)
-; 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% 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 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 every leader the player can see, selected or
-; not, friend or enemy (client only).
-
-Veterancy
- ; America China GLA Turkiye
- Grades = 28 19 20 21
- Top = 120 120 120 120
- VeteranPin = 4 4 4 4 ; E-4 Corporal, Sergeant, Raider, Uzman Cavus
- ElitePin = 13 10 10 11 ; W-1 Warrant Officer, Second Lieutenant, Raid Captain, Tegmen
- HeroicPin = 22 15 15 16 ; O-5 Lieutenant Colonel, Colonel, Warlord, Albay
- HeroStart = 23 15 15 16 ; O-6 Colonel (Burton), Colonel, Warlord, Albay (the Maroon Beret)
- RateOfFire = 142% 130% 148% 142%
- Damage = 119% 119% 114% 119%
- Health = 142% 155% 142% 142%
- Range = 107% 100% 100% 112%
- Speed = 100% 100% 114% 100%
- SelfRepair = 0% 0% 2% 0%
- AuraRadius = 0 0 0 150
- WorthGain = 1.4
- CrateGrades = 3
- SelfRepairDelay = 5000
- WeaponBonus_China = HORDE RATE_OF_FIRE 110%
-
- Perk_Turkiye = 3 SIGHT 110% ; Cavus
- Perk_Turkiye = 4 STILL_GUARD 10% ; Uzman Cavus
- Perk_Turkiye = 6 MEND 1% ; Astsubay Kidemli Cavus
- Perk_Turkiye = 8 SIGHT 120% ; Astsubay Kidemli Ustcavus
- Perk_Turkiye = 10 RATE_OF_FIRE 5% ; Astsubay Kidemli Bascavus
- Perk_Turkiye = 11 SPOTTER ; Tegmen
- Perk_Turkiye = 13 AURA_SIGHT 10% ; Yuzbasi
- Perk_Turkiye = 14 SCATTER 15% ; Binbasi
- Perk_Turkiye = 16 AURA_RATE_OF_FIRE 10% ; Albay
- Perk_Turkiye = 17 DEATH_RALLY 15% ; Tuggeneral
- Perk_Turkiye = 18 SIGHT 130% ; Tumgeneral
- Perk_Turkiye = 18 DETECT 100
- Perk_Turkiye = 19 AURA_GUARD 10% ; Korgeneral
- Perk_Turkiye = 20 AURA_RANGE 5% ; Orgeneral
- Perk_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
- ; 4 E-4 Corporal: stats only, its old rate-of-fire aura I is Drilled's 5% held from 1
- Perk_America = 5 SIGHT 120% ; E-5 Sergeant: Eyes
- ; 6 E-6 Staff Sergeant: stats only, its old mend aura I is Field kit's 0.5% held from 3
- Perk_America = 7 RATE_OF_FIRE 8% ; E-7 Sergeant First Class
- ; 8, 9, 10 and 12 are stats only: drill and steady have no self kind
- Perk_America = 11 RATE_OF_FIRE 10% ; E-9 Command Sergeant Major
- 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 = 14 AURA_STEADY 35% 140 ; W-2: the Sergeant Major of the Army's steady aura
- 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 STILL_GUARD 4% ; Corporal: Shoulder to shoulder
- ; 4, 5 and 9 are stats only: drill and steady have no self kind
- Perk_China = 6 RATE_OF_FIRE 5% ; Staff Sergeant First Class
- Perk_China = 7 MEND 0.5% ; Master Sergeant Third Class
- Perk_China = 8 STILL_GUARD 7% ; Master Sergeant Second 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 SPEED 8% ; Squadhand: Move with me
- ; 7 Squad Leader: stats only, its old spoils aura I is under Scavenger's 10% held from 4
- ; 8 Cell Leader: stats only
- ; 9 Senior Cell Leader: stats only, its old mend aura I is Patch-up's 0.5% held from 3
- 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 crate
- RallyTime = 10000
-
- ; 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
- ; scales with that light, never below LightScaleMin nor above LightScaleMax.
- AuraRing_RateOfFire
- Texture = ReforgedAuraRateOfFire
- Style = SHADOW_ADDITIVE_DECAL
- Color = R:230 G:205 B:165
- OpacityMin = 40%
- OpacityMax = 40%
- SpinTime = 90000
- LightReference = 0.75
- LightScaleMin = 0.35
- LightScaleMax = 1.2
- End
- AuraRing_Sight
- Texture = ReforgedAuraSight
- Style = SHADOW_ADDITIVE_DECAL
- Color = R:175 G:200 B:230
- OpacityMin = 40%
- OpacityMax = 40%
- LightReference = 0.75
- LightScaleMin = 0.35
- LightScaleMax = 1.2
- End
- AuraRing_Guard
- Texture = ReforgedAuraGuard
- Style = SHADOW_ADDITIVE_DECAL
- Color = R:180 G:215 B:180
- OpacityMin = 40%
- OpacityMax = 40%
- LightReference = 0.75
- LightScaleMin = 0.35
- LightScaleMax = 1.2
- End
- AuraRing_Range
- 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_Rally
- 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
- ; 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
- End
-End
-
; ---- a plane shot down blows up and burns where it lands -----------------------------------------
;
; ObjectCreationListReforged.ini says when a crash goes off; this is what goes off. All three
@@ -3679,9 +2952,7 @@ End
; an exit the player ordered keeps it standing until his next order. The computer already does this
; for its own (AIPlayer's putToHacking), so the module skips every non-human player.
;
-; Hacking pays 6 experience a payout instead of EA's 1. On the fork's rank ladder EA's 1 left a
-; hacker short of Heroic for the whole match; 6 puts it back near retail's 17 minutes. Every other
-; HackInternetAIUpdate field is EA's, the delay inside an Internet Center differing per general as
+; Every HackInternetAIUpdate field is EA's, the delay inside an Internet Center differing per general as
; it does in EA's data. No Locomotor line: a replaced AIUpdate keeps the object's sets.
Object ChinaInfantryHacker
@@ -3695,7 +2966,7 @@ Object ChinaInfantryHacker
VeteranCashAmount = 6
EliteCashAmount = 8
HeroicCashAmount = 10
- XpPerCashUpdate = 6
+ XpPerCashUpdate = 1
PackUnpackVariationFactor = 0.5
End
End
@@ -3718,7 +2989,7 @@ Object Tank_ChinaInfantryHacker
VeteranCashAmount = 6
EliteCashAmount = 8
HeroicCashAmount = 10
- XpPerCashUpdate = 6
+ XpPerCashUpdate = 1
PackUnpackVariationFactor = 0.5
End
End
@@ -3741,7 +3012,7 @@ Object Infa_ChinaInfantryHacker
VeteranCashAmount = 6
EliteCashAmount = 8
HeroicCashAmount = 10
- XpPerCashUpdate = 6
+ XpPerCashUpdate = 1
PackUnpackVariationFactor = 0.5
End
End
@@ -3764,7 +3035,7 @@ Object Nuke_ChinaInfantryHacker
VeteranCashAmount = 6
EliteCashAmount = 8
HeroicCashAmount = 10
- XpPerCashUpdate = 6
+ XpPerCashUpdate = 1
PackUnpackVariationFactor = 0.5
End
End
@@ -3787,7 +3058,7 @@ Object Boss_InfantryHacker
VeteranCashAmount = 6
EliteCashAmount = 8
HeroicCashAmount = 10
- XpPerCashUpdate = 6
+ XpPerCashUpdate = 1
PackUnpackVariationFactor = 0.5
End
End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedFactionPicker.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedFactionPicker.ini
index 2221ae9d8..08b6467ef 100644
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedFactionPicker.ini
+++ b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedFactionPicker.ini
@@ -1,10 +1,9 @@
; The lobby's army screen shows FactionPicker<template name> for an army when it is mapped, in place of
-; the template's GeneralImage. Turkiye's is its Maresal insignia (RankTurkiye_21 in
-; ReforgedRanksTurkiye.ini), since everywhere else it wears America's eagle. Mapped images are not in
-; the multiplayer INI checksum.
+; the template's GeneralImage. Turkiye's is a Maresal's insignia, since everywhere else it wears
+; America's eagle. Mapped images are not in the multiplayer INI checksum.
MappedImage FactionPickerFactionTurkiye
- Texture = ReforgedRanksTurkiye.tga
+ Texture = ReforgedFactionTurkiye.tga
TextureWidth = 512
TextureHeight = 192
Coords = Left:327 Top:136 Right:377 Bottom:182
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRankInsignia.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRankInsignia.ini
deleted file mode 100644
index 127aad1d2..000000000
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRankInsignia.ini
+++ /dev/null
@@ -1,19 +0,0 @@
-; The rank marks America and GLA wear beside a unit's health bar, one for each rank. Written by
-; Tools/rank_insignia.py with the textures it names; do not edit by hand. Mapped images are not in
-; the multiplayer INI checksum.
-
-MappedImage ReforgedRankBar
- Texture = ReforgedRankBar.tga
- TextureWidth = 32
- TextureHeight = 16
- Coords = Left:0 Top:0 Right:32 Bottom:16
- Status = NONE
-End
-
-MappedImage ReforgedRankSkull
- Texture = ReforgedRankSkull.tga
- TextureWidth = 32
- TextureHeight = 32
- Coords = Left:0 Top:0 Right:32 Bottom:32
- Status = NONE
-End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksChina.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksChina.ini
deleted file mode 100644
index c015ca673..000000000
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksChina.ini
+++ /dev/null
@@ -1,175 +0,0 @@
-; China's rank marks, one per PLA Ground Force rank, all in one texture. Written by
-; Tools/rank_insignia_china.py with the texture it names; do not edit by hand. Mapped images are
-; not in the multiplayer INI checksum.
-
-
-MappedImage RankChina_1
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:80 Top:21 Right:112 Bottom:43
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_2
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:144 Top:16 Right:176 Bottom:48
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_3
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:208 Top:21 Right:240 Bottom:43
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_4
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:272 Top:16 Right:304 Bottom:48
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_5
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:336 Top:11 Right:368 Bottom:53
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_6
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:388 Top:11 Right:433 Bottom:53
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_7
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:452 Top:11 Right:508 Bottom:53
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_8
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:4 Top:75 Right:60 Bottom:117
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_9
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:68 Top:75 Right:124 Bottom:117
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_10
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:148 Top:72 Right:172 Bottom:98
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_11
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:206 Top:72 Right:242 Bottom:98
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_12
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:270 Top:64 Right:306 Bottom:105
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankChina_13
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:340 Top:72 Right:364 Bottom:104
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_14
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:398 Top:72 Right:434 Bottom:104
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_15
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:462 Top:64 Right:498 Bottom:111
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_16
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:14 Top:128 Right:50 Bottom:176
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_17
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:86 Top:137 Right:106 Bottom:165
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_18
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:141 Top:137 Right:179 Bottom:165
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankChina_19
- Texture = ReforgedRanksChina.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:205 Top:129 Right:243 Bottom:173
- Status = NONE
- DisplayHeight = 14
-End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksGLA.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksGLA.ini
deleted file mode 100644
index 4f0fbf88f..000000000
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksGLA.ini
+++ /dev/null
@@ -1,184 +0,0 @@
-; GLA's rank marks, one cell of ReforgedRanksGLA.tga per rank from Recruit to Supreme Liberator. Written
-; by Tools/rank_insignia_gla.py with the texture it names; do not edit by hand. Mapped images are
-; not in the multiplayer INI checksum.
-
-
-MappedImage RankGLA_1
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:88 Top:8 Right:105 Bottom:56
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_2
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:146 Top:8 Right:174 Bottom:58
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_3
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:205 Top:6 Right:243 Bottom:57
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_4
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:263 Top:6 Right:312 Bottom:58
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_5
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:324 Top:6 Right:381 Bottom:58
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_6
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:392 Top:8 Right:439 Bottom:53
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_7
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:455 Top:11 Right:512 Bottom:51
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_8
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:6 Top:76 Right:64 Bottom:115
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_9
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:69 Top:76 Right:128 Bottom:115
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_10
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:139 Top:72 Right:181 Bottom:118
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_11
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:201 Top:74 Right:256 Bottom:116
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_12
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:263 Top:74 Right:312 Bottom:116
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_13
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:326 Top:73 Right:380 Bottom:121
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankGLA_14
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:386 Top:66 Right:446 Bottom:126
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankGLA_15
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:454 Top:64 Right:506 Bottom:127
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankGLA_16
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:5 Top:131 Right:64 Bottom:188
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankGLA_17
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:70 Top:132 Right:124 Bottom:187
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankGLA_18
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:130 Top:130 Right:190 Bottom:190
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankGLA_19
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:192 Top:128 Right:256 Bottom:192
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankGLA_20
- Texture = ReforgedRanksGLA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:256 Top:128 Right:320 Bottom:192
- Status = NONE
- DisplayHeight = 14
-End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksTurkiye.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksTurkiye.ini
deleted file mode 100644
index 8619074a5..000000000
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksTurkiye.ini
+++ /dev/null
@@ -1,185 +0,0 @@
-; Turkiye's rank marks, one per Turkish Land Forces rank, all in one texture. Written by
-; Tools/rank_insignia_turkiye.py with the texture it names; do not edit by hand. Mapped images are
-; not in the multiplayer INI checksum.
-
-
-
-MappedImage RankTurkiye_2
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:138 Top:22 Right:182 Bottom:42
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankTurkiye_3
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:202 Top:18 Right:246 Bottom:46
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankTurkiye_4
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:260 Top:14 Right:316 Bottom:50
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_5
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:324 Top:14 Right:380 Bottom:50
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_6
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:388 Top:14 Right:444 Bottom:50
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_7
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:452 Top:12 Right:508 Bottom:52
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_8
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:4 Top:73 Right:60 Bottom:119
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_9
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:68 Top:71 Right:124 Bottom:121
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_10
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:132 Top:68 Right:188 Bottom:124
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_11
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:214 Top:85 Right:234 Bottom:105
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankTurkiye_12
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:269 Top:85 Right:307 Bottom:105
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankTurkiye_13
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:333 Top:77 Right:371 Bottom:113
- Status = NONE
- DisplayHeight = 12
-End
-
-MappedImage RankTurkiye_14
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:400 Top:72 Right:432 Bottom:108
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_15
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:463 Top:72 Right:497 Bottom:108
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_16
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:15 Top:129 Right:49 Bottom:179
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_17
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:76 Top:135 Right:116 Bottom:175
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_18
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:140 Top:135 Right:180 Bottom:175
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_19
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:204 Top:135 Right:244 Bottom:175
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_20
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:264 Top:135 Right:312 Bottom:175
- Status = NONE
- DisplayHeight = 14
-End
-
-MappedImage RankTurkiye_21
- Texture = ReforgedRanksTurkiye.tga
- TextureWidth = 512
- TextureHeight = 192
- Coords = Left:327 Top:136 Right:377 Bottom:182
- Status = NONE
- DisplayHeight = 14
-End
diff --git a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksUSA.ini b/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksUSA.ini
deleted file mode 100644
index 32c8bba01..000000000
--- a/GeneralsMD/Code/Data/INI/MappedImages/HandCreated/ReforgedRanksUSA.ini
+++ /dev/null
@@ -1,285 +0,0 @@
-; Every rank of the United States Army, one mapped image per rank in one atlas. Written by
-; Tools/rank_insignia_usa.py with the texture it names; do not edit by hand. Mapped images are not
-; in the multiplayer INI checksum.
-
-; E-1, Private (PV1)
-
-; E-2, Private (PV2)
-MappedImage RankAmerica_1
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:64 Top:11 Right:128 Bottom:53
- Status = NONE
- DisplayHeight = 12
-End
-
-; E-3, Private First Class
-MappedImage RankAmerica_2
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:128 Top:9 Right:192 Bottom:55
- Status = NONE
- DisplayHeight = 12
-End
-
-; E-4, Specialist
-MappedImage RankAmerica_3
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:198 Top:1 Right:249 Bottom:63
- Status = NONE
- DisplayHeight = 12
-End
-
-; E-4, Corporal
-MappedImage RankAmerica_4
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:256 Top:5 Right:320 Bottom:59
- Status = NONE
- DisplayHeight = 12
-End
-
-; E-5, Sergeant
-MappedImage RankAmerica_5
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:323 Top:1 Right:381 Bottom:62
- Status = NONE
- DisplayHeight = 12
-End
-
-; E-6, Staff Sergeant
-MappedImage RankAmerica_6
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:386 Top:1 Right:446 Bottom:63
- Status = NONE
- DisplayHeight = 14
-End
-
-; E-7, Sergeant First Class
-MappedImage RankAmerica_7
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:456 Top:1 Right:504 Bottom:63
- Status = NONE
- DisplayHeight = 14
-End
-
-; E-8, Master Sergeant
-MappedImage RankAmerica_8
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:11 Top:65 Right:52 Bottom:127
- Status = NONE
- DisplayHeight = 14
-End
-
-; E-8, First Sergeant
-MappedImage RankAmerica_9
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:74 Top:65 Right:117 Bottom:127
- Status = NONE
- DisplayHeight = 14
-End
-
-; E-9, Sergeant Major
-MappedImage RankAmerica_10
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:138 Top:65 Right:181 Bottom:127
- Status = NONE
- DisplayHeight = 14
-End
-
-; E-9, Command Sergeant Major
-MappedImage RankAmerica_11
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:202 Top:65 Right:245 Bottom:127
- Status = NONE
- DisplayHeight = 14
-End
-
-; E-9, Sergeant Major of the Army
-MappedImage RankAmerica_12
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:266 Top:65 Right:309 Bottom:127
- Status = NONE
- DisplayHeight = 14
-End
-
-; W-1, Warrant Officer 1
-MappedImage RankAmerica_13
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:320 Top:75 Right:384 Bottom:117
- Status = NONE
- DisplayHeight = 12
-End
-
-; W-2, Chief Warrant Officer 2
-MappedImage RankAmerica_14
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:384 Top:75 Right:448 Bottom:117
- Status = NONE
- DisplayHeight = 12
-End
-
-; W-3, Chief Warrant Officer 3
-MappedImage RankAmerica_15
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:448 Top:75 Right:512 Bottom:117
- Status = NONE
- DisplayHeight = 12
-End
-
-; W-4, Chief Warrant Officer 4
-MappedImage RankAmerica_16
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:0 Top:139 Right:64 Bottom:181
- Status = NONE
- DisplayHeight = 12
-End
-
-; W-5, Chief Warrant Officer 5
-MappedImage RankAmerica_17
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:64 Top:139 Right:128 Bottom:181
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-1, Second Lieutenant
-MappedImage RankAmerica_18
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:128 Top:139 Right:192 Bottom:181
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-2, First Lieutenant
-MappedImage RankAmerica_19
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:192 Top:139 Right:256 Bottom:181
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-3, Captain
-MappedImage RankAmerica_20
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:256 Top:132 Right:320 Bottom:188
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-4, Major
-MappedImage RankAmerica_21
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:324 Top:129 Right:379 Bottom:192
- Status = NONE
- DisplayHeight = 14
-End
-
-; O-5, Lieutenant Colonel
-MappedImage RankAmerica_22
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:388 Top:129 Right:443 Bottom:192
- Status = NONE
- DisplayHeight = 14
-End
-
-; O-6, Colonel
-MappedImage RankAmerica_23
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:448 Top:139 Right:512 Bottom:182
- Status = NONE
- DisplayHeight = 14
-End
-
-; O-7, Brigadier General
-MappedImage RankAmerica_24
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:2 Top:195 Right:62 Bottom:253
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-8, Major General
-MappedImage RankAmerica_25
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:66 Top:197 Right:126 Bottom:251
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-9, Lieutenant General
-MappedImage RankAmerica_26
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:130 Top:196 Right:190 Bottom:253
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-10, General
-MappedImage RankAmerica_27
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:194 Top:194 Right:254 Bottom:254
- Status = NONE
- DisplayHeight = 12
-End
-
-; O-11, General of the Army
-MappedImage RankAmerica_28
- Texture = ReforgedRanksUSA.tga
- TextureWidth = 512
- TextureHeight = 256
- Coords = Left:256 Top:193 Right:320 Bottom:255
- Status = NONE
- DisplayHeight = 14
-End
diff --git a/GeneralsMD/Code/Data/Patch.str b/GeneralsMD/Code/Data/Patch.str
index 86c96ce34..dee70b4bb 100644
--- a/GeneralsMD/Code/Data/Patch.str
+++ b/GeneralsMD/Code/Data/Patch.str
@@ -2546,487 +2546,6 @@ GUI:GraphNoData
"Nothing was recorded in this match."
END
-RANK:NextRank
-"Next rank %d/%d XP"
-END
-
-RANK:PerkSIGHT
-"Sight +%d%%"
-END
-
-RANK:PerkSTILL_GUARD
-"Standing still: %d%% less damage taken"
-END
-
-RANK:PerkMEND
-"Out of combat: heals %d.%02d%% a second"
-END
-
-RANK:PerkSPOTTER
-"Spots for the artillery"
-END
-
-RANK:PerkSCATTER
-"Artillery scatter -%d%%"
-END
-
-RANK:PerkDEATH_RALLY
-"When it falls, allies nearby take %d%% less damage for 10 seconds"
-END
-
-RANK:PerkDETECT
-"Detects stealth within %d"
-END
-
-RANK:PerkAURA_RADIUS
-"Aura reach +%d%%"
-END
-
-RANK:PerkAURA_RATE_OF_FIRE
-"Aura: rate of fire +%d%%"
-END
-
-RANK:PerkAURA_SIGHT
-"Aura: sight +%d%%"
-END
-
-RANK:PerkAURA_GUARD
-"Aura: %d%% less damage taken"
-END
-
-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"
-END
-
-RANK:America1
-"E-2 Private"
-END
-
-RANK:America2
-"E-3 Private First Class"
-END
-
-RANK:America3
-"E-4 Specialist"
-END
-
-RANK:America4
-"E-4 Corporal"
-END
-
-RANK:America5
-"E-5 Sergeant"
-END
-
-RANK:America6
-"E-6 Staff Sergeant"
-END
-
-RANK:America7
-"E-7 Sergeant First Class"
-END
-
-RANK:America8
-"E-8 Master Sergeant"
-END
-
-RANK:America9
-"E-8 First Sergeant"
-END
-
-RANK:America10
-"E-9 Sergeant Major"
-END
-
-RANK:America11
-"E-9 Command Sergeant Major"
-END
-
-RANK:America12
-"E-9 Sergeant Major of the Army"
-END
-
-RANK:America13
-"W-1 Warrant Officer"
-END
-
-RANK:America14
-"W-2 Chief Warrant Officer"
-END
-
-RANK:America15
-"W-3 Chief Warrant Officer"
-END
-
-RANK:America16
-"W-4 Chief Warrant Officer"
-END
-
-RANK:America17
-"W-5 Chief Warrant Officer"
-END
-
-RANK:America18
-"O-1 Second Lieutenant"
-END
-
-RANK:America19
-"O-2 First Lieutenant"
-END
-
-RANK:America20
-"O-3 Captain"
-END
-
-RANK:America21
-"O-4 Major"
-END
-
-RANK:America22
-"O-5 Lieutenant Colonel"
-END
-
-RANK:America23
-"O-6 Colonel"
-END
-
-RANK:America24
-"O-7 Brigadier General"
-END
-
-RANK:America25
-"O-8 Major General"
-END
-
-RANK:America26
-"O-9 Lieutenant General"
-END
-
-RANK:America27
-"O-10 General"
-END
-
-RANK:America28
-"General of the Army"
-END
-
-RANK:China0
-"Unranked"
-END
-
-RANK:China1
-"Private"
-END
-
-RANK:China2
-"Private First Class"
-END
-
-RANK:China3
-"Corporal"
-END
-
-RANK:China4
-"Sergeant"
-END
-
-RANK:China5
-"Staff Sergeant Second Class"
-END
-
-RANK:China6
-"Staff Sergeant First Class"
-END
-
-RANK:China7
-"Master Sergeant Third Class"
-END
-
-RANK:China8
-"Master Sergeant Second Class"
-END
-
-RANK:China9
-"Master Sergeant First Class"
-END
-
-RANK:China10
-"Second Lieutenant"
-END
-
-RANK:China11
-"First Lieutenant"
-END
-
-RANK:China12
-"Captain"
-END
-
-RANK:China13
-"Major"
-END
-
-RANK:China14
-"Lieutenant Colonel"
-END
-
-RANK:China15
-"Colonel"
-END
-
-RANK:China16
-"Senior Colonel"
-END
-
-RANK:China17
-"Major General"
-END
-
-RANK:China18
-"Lieutenant General"
-END
-
-RANK:China19
-"General"
-END
-
-RANK:GLA0
-"Unranked"
-END
-
-RANK:GLA1
-"Recruit"
-END
-
-RANK:GLA2
-"Irregular"
-END
-
-RANK:GLA3
-"Fighter"
-END
-
-RANK:GLA4
-"Raider"
-END
-
-RANK:GLA5
-"Hardened Raider"
-END
-
-RANK:GLA6
-"Squadhand"
-END
-
-RANK:GLA7
-"Squad Leader"
-END
-
-RANK:GLA8
-"Cell Leader"
-END
-
-RANK:GLA9
-"Senior Cell Leader"
-END
-
-RANK:GLA10
-"Raid Captain"
-END
-
-RANK:GLA11
-"Column Captain"
-END
-
-RANK:GLA12
-"Strike Commander"
-END
-
-RANK:GLA13
-"Field Commander"
-END
-
-RANK:GLA14
-"Sector Commander"
-END
-
-RANK:GLA15
-"Warlord"
-END
-
-RANK:GLA16
-"Regional Warlord"
-END
-
-RANK:GLA17
-"High Warlord"
-END
-
-RANK:GLA18
-"General"
-END
-
-RANK:GLA19
-"Grand General"
-END
-
-RANK:GLA20
-"Supreme Liberator"
-END
-
-// Turkiye's ladder, the Turkish Land Forces' ranks under their Turkish names in every language
-RANK:Turkiye0
-"Unranked"
-END
-
-RANK:Turkiye1
-"Er"
-END
-
-RANK:Turkiye2
-"Onbaşı"
-END
-
-RANK:Turkiye3
-"Çavuş"
-END
-
-RANK:Turkiye4
-"Uzman Çavuş"
-END
-
-RANK:Turkiye5
-"Astsubay Çavuş"
-END
-
-RANK:Turkiye6
-"Astsubay Kıdemli Çavuş"
-END
-
-RANK:Turkiye7
-"Astsubay Üstçavuş"
-END
-
-RANK:Turkiye8
-"Astsubay Kıdemli Üstçavuş"
-END
-
-RANK:Turkiye9
-"Astsubay Başçavuş"
-END
-
-RANK:Turkiye10
-"Astsubay Kıdemli Başçavuş"
-END
-
-RANK:Turkiye11
-"Teğmen"
-END
-
-RANK:Turkiye12
-"Üsteğmen"
-END
-
-RANK:Turkiye13
-"Yüzbaşı"
-END
-
-RANK:Turkiye14
-"Binbaşı"
-END
-
-RANK:Turkiye15
-"Yarbay"
-END
-
-RANK:Turkiye16
-"Albay"
-END
-
-RANK:Turkiye17
-"Tuğgeneral"
-END
-
-RANK:Turkiye18
-"Tümgeneral"
-END
-
-RANK:Turkiye19
-"Korgeneral"
-END
-
-RANK:Turkiye20
-"Orgeneral"
-END
-
-RANK:Turkiye21
-"Mareşal"
-END
-
// The Turkiye faction (PlayerTemplateReforged.ini, TurkiyeReforged.ini). Units, buildings, buttons, upgrades.
INI:FactionTurkiye
@@ -3673,37 +3192,6 @@ GUI:FactionPickSideNameHint
"Click a side's name to play a random army of that side."
END
-// 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"
-END
-
-CONTROLBAR:Infa_ToolTipChinaScienceRedGuardTraining
-"All Mini-Gunners will be built three ranks above Veteran"
-END
-
// the fork's player colours (MultiplayerReforged.ini); EA's eight are in the CSF
Color:Crimson
"Crimson"
diff --git a/GeneralsMD/Code/Data/Russian/Generals.str b/GeneralsMD/Code/Data/Russian/Generals.str
index 1ed02e3cb..bf94f91b3 100644
--- a/GeneralsMD/Code/Data/Russian/Generals.str
+++ b/GeneralsMD/Code/Data/Russian/Generals.str
@@ -17797,426 +17797,6 @@ GUI:GraphNoData
"В этом матче ничего не записано."
END
-RANK:NextRank
-"Следующее звание %d/%d XP"
-END
-
-RANK:PerkSIGHT
-"Обзор +%d%%"
-END
-
-RANK:PerkSTILL_GUARD
-"Стоя на месте: получает на %d%% меньше урона"
-END
-
-RANK:PerkMEND
-"Вне боя: лечится на %d.%02d%% в секунду"
-END
-
-RANK:PerkSPOTTER
-"Корректирует огонь артиллерии"
-END
-
-RANK:PerkSCATTER
-"Разброс артиллерии -%d%%"
-END
-
-RANK:PerkDEATH_RALLY
-"Когда он гибнет, союзники рядом получают на %d%% меньше урона в течение 10 секунд"
-END
-
-RANK:PerkDETECT
-"Обнаруживает скрытых в радиусе %d"
-END
-
-RANK:PerkAURA_RADIUS
-"Радиус ауры +%d%%"
-END
-
-RANK:PerkAURA_RATE_OF_FIRE
-"Аура: скорострельность +%d%%"
-END
-
-RANK:PerkAURA_SIGHT
-"Аура: обзор +%d%%"
-END
-
-RANK:PerkAURA_GUARD
-"Аура: на %d%% меньше получаемого урона"
-END
-
-RANK:PerkAURA_RANGE
-"Аура: дальность артиллерии +%d%%"
-END
-
-RANK:America0
-"E-1 Рядовой"
-END
-
-RANK:America1
-"E-2 Рядовой"
-END
-
-RANK:America2
-"E-3 Рядовой первого класса"
-END
-
-RANK:America3
-"E-4 Специалист"
-END
-
-RANK:America4
-"E-4 Капрал"
-END
-
-RANK:America5
-"E-5 Сержант"
-END
-
-RANK:America6
-"E-6 Штаб-сержант"
-END
-
-RANK:America7
-"E-7 Сержант первого класса"
-END
-
-RANK:America8
-"E-8 Мастер-сержант"
-END
-
-RANK:America9
-"E-8 Первый сержант"
-END
-
-RANK:America10
-"E-9 Сержант-майор"
-END
-
-RANK:America11
-"E-9 Командир-сержант-майор"
-END
-
-RANK:America12
-"E-9 Сержант-майор армии"
-END
-
-RANK:America13
-"W-1 Уорент-офицер"
-END
-
-RANK:America14
-"W-2 Старший уорент-офицер"
-END
-
-RANK:America15
-"W-3 Старший уорент-офицер"
-END
-
-RANK:America16
-"W-4 Старший уорент-офицер"
-END
-
-RANK:America17
-"W-5 Старший уорент-офицер"
-END
-
-RANK:America18
-"O-1 Второй лейтенант"
-END
-
-RANK:America19
-"O-2 Первый лейтенант"
-END
-
-RANK:America20
-"O-3 Капитан"
-END
-
-RANK:America21
-"O-4 Майор"
-END
-
-RANK:America22
-"O-5 Подполковник"
-END
-
-RANK:America23
-"O-6 Полковник"
-END
-
-RANK:America24
-"O-7 Бригадный генерал"
-END
-
-RANK:America25
-"O-8 Генерал-майор"
-END
-
-RANK:America26
-"O-9 Генерал-лейтенант"
-END
-
-RANK:America27
-"O-10 Генерал"
-END
-
-RANK:America28
-"Генерал армии"
-END
-
-RANK:China0
-"Без звания"
-END
-
-RANK:China1
-"Рядовой"
-END
-
-RANK:China2
-"Рядовой первого класса"
-END
-
-RANK:China3
-"Капрал"
-END
-
-RANK:China4
-"Сержант"
-END
-
-RANK:China5
-"Штаб-сержант второго класса"
-END
-
-RANK:China6
-"Штаб-сержант первого класса"
-END
-
-RANK:China7
-"Мастер-сержант третьего класса"
-END
-
-RANK:China8
-"Мастер-сержант второго класса"
-END
-
-RANK:China9
-"Мастер-сержант первого класса"
-END
-
-RANK:China10
-"Второй лейтенант"
-END
-
-RANK:China11
-"Первый лейтенант"
-END
-
-RANK:China12
-"Капитан"
-END
-
-RANK:China13
-"Майор"
-END
-
-RANK:China14
-"Подполковник"
-END
-
-RANK:China15
-"Полковник"
-END
-
-RANK:China16
-"Старший полковник"
-END
-
-RANK:China17
-"Генерал-майор"
-END
-
-RANK:China18
-"Генерал-лейтенант"
-END
-
-RANK:China19
-"Генерал"
-END
-
-RANK:GLA0
-"Без звания"
-END
-
-RANK:GLA1
-"Новобранец"
-END
-
-RANK:GLA2
-"Ополченец"
-END
-
-RANK:GLA3
-"Боец"
-END
-
-RANK:GLA4
-"Рейдер"
-END
-
-RANK:GLA5
-"Закалённый рейдер"
-END
-
-RANK:GLA6
-"Помощник командира отряда"
-END
-
-RANK:GLA7
-"Командир отряда"
-END
-
-RANK:GLA8
-"Командир ячейки"
-END
-
-RANK:GLA9
-"Старший командир ячейки"
-END
-
-RANK:GLA10
-"Капитан рейдов"
-END
-
-RANK:GLA11
-"Капитан колонны"
-END
-
-RANK:GLA12
-"Командир ударных сил"
-END
-
-RANK:GLA13
-"Полевой командир"
-END
-
-RANK:GLA14
-"Командир сектора"
-END
-
-RANK:GLA15
-"Полевой военачальник"
-END
-
-RANK:GLA16
-"Региональный военачальник"
-END
-
-RANK:GLA17
-"Верховный военачальник"
-END
-
-RANK:GLA18
-"Генерал"
-END
-
-RANK:GLA19
-"Великий генерал"
-END
-
-RANK:GLA20
-"Верховный освободитель"
-END
-
-RANK:Turkiye0
-"Без звания"
-END
-
-RANK:Turkiye1
-"Er"
-END
-
-RANK:Turkiye2
-"Onbaşı"
-END
-
-RANK:Turkiye3
-"Çavuş"
-END
-
-RANK:Turkiye4
-"Uzman Çavuş"
-END
-
-RANK:Turkiye5
-"Astsubay Çavuş"
-END
-
-RANK:Turkiye6
-"Astsubay Kıdemli Çavuş"
-END
-
-RANK:Turkiye7
-"Astsubay Üstçavuş"
-END
-
-RANK:Turkiye8
-"Astsubay Kıdemli Üstçavuş"
-END
-
-RANK:Turkiye9
-"Astsubay Başçavuş"
-END
-
-RANK:Turkiye10
-"Astsubay Kıdemli Başçavuş"
-END
-
-RANK:Turkiye11
-"Teğmen"
-END
-
-RANK:Turkiye12
-"Üsteğmen"
-END
-
-RANK:Turkiye13
-"Yüzbaşı"
-END
-
-RANK:Turkiye14
-"Binbaşı"
-END
-
-RANK:Turkiye15
-"Yarbay"
-END
-
-RANK:Turkiye16
-"Albay"
-END
-
-RANK:Turkiye17
-"Tuğgeneral"
-END
-
-RANK:Turkiye18
-"Tümgeneral"
-END
-
-RANK:Turkiye19
-"Korgeneral"
-END
-
-RANK:Turkiye20
-"Orgeneral"
-END
-
-RANK:Turkiye21
-"Mareşal"
-END
-
INI:FactionTurkiye
"Turkiye (экспериментальная)"
END
diff --git a/GeneralsMD/Code/Data/Scenarios/rankaura.txt b/GeneralsMD/Code/Data/Scenarios/rankaura.txt
deleted file mode 100644
index 63b3eebb3..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankaura.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Turkiye's rank auras (2026-10-22): an Albay Altay (grade 16, rate of fire +10%, sight +10%) and an
-# Astsubay Kidemli Bascavus Sungur team (grade 10, rate of fire +5%) stand beside a grade 0
-# Mehmetcik. The Mehmetcik is in both leaders' 150 and must hold 0.10 rate of fire, the stronger
-# one, not 0.15. Each leader holds the other's and never its own: the Sungur 0.10 and sight 0.10,
-# the Altay 0.05 and no sight. The Cobra 500 east is out of reach and logs nothing. Each change is
-# one "RANK AURA" line in the log. The Kirpi is an ambulance and cannot be ranked.
-#
-# Inside anything, no auras either way. An Engineer beside the Altay climbs into the Kirpi before the
-# first pass and logs nothing all run. A Maroon Beret made Albay starts 330 east beside a spotter team
-# and the Cobra (both get its 0.10 at frame 60) and walks to the same Kirpi: beside the Altay it gives
-# the Altay 0.10 (frame 600), and once inside the Altay drops back to the Sungur's 0.05 (frame 960)
-# while the Beret itself holds nothing. The Kirpi, a vehicle outside, takes the Altay's 0.10.
-# Those frames are from when one pass did every object. Each now takes its aura on its own frame of
-# the second, so a line comes up to two seconds later, and the Engineer gets one before it climbs in.
-#
-# generals.exe -headless -quickstart -noshellmap -observer -multiInstance -noFPSLimit
-# -map "Maps\Twilight Flame\Twilight Flame.map" -autoskirmish 2 -takeover
-# -side 0 FactionTurkiye -side 1 FactionGLA -seed 1 -maxframes 1500 -scenario rankaura -logPrefix rankaura_
-
-10 spawn 0 TurkiyeInfantrySungur 1 3350 3640
-10 spawn 0 TurkiyeInfantryMehmetcik 1 3400 3640
-10 spawn 0 TurkiyeTankAltay 1 3450 3640
-10 spawn 0 TurkiyeVehicleCobra 1 3910 3640
-10 spawn 0 TurkiyeInfantryEngineer 1 3420 3670
-10 spawn 0 TurkiyeVehicleKirpi 1 3440 3690
-10 spawn 0 TurkiyeInfantryMaroonBeret 1 3780 3640
-10 spawn 0 TurkiyeInfantrySpotter 1 3760 3610
-10 spawn 1 GLAVehicleTechnical 1 3330 4290
-
-12 rank 0 TurkiyeInfantrySungur grade 10
-12 rank 0 TurkiyeTankAltay grade 16
-12 rank 0 TurkiyeInfantryMaroonBeret grade 16
-
-12 enter 0 TurkiyeInfantryEngineer 0 TurkiyeVehicleKirpi
-12 enter 0 TurkiyeInfantryMaroonBeret 0 TurkiyeVehicleKirpi
-
-600 tally 0 *
diff --git a/GeneralsMD/Code/Data/Scenarios/rankauramaresal.txt b/GeneralsMD/Code/Data/Scenarios/rankauramaresal.txt
deleted file mode 100644
index 832f95eb5..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankauramaresal.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Turkiye's Maresal rings on sand (2026-10-22): a grade 21 Altay carries all five auras (rate of
-# fire, sight, guard, range, rally) at radius 300 on the flat Twilight Flame plateau where the rank
-# ladder grid stood. A Sungur team and four Mehmetcik stand inside the ring as the company it
-# covers, two Kirpi drive through it east to west, and the GLA Technical waits off at its own start
-# so the match stays open. Select the Altay with a -control click at the screen centre once
-# Cinema/rankauramaresal.txt has cut to it; the rings draw only for the owner and allies, so no
-# -observer.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap
-# -multiInstance -fps 120 -noFPSLimit -map "Maps\Twilight Flame\Twilight Flame.map"
-# -autoskirmish 2 -takeover -side 0 FactionTurkiye -side 1 FactionGLA -seed 1
-# -scenario rankauramaresal -cinema rankauramaresal -control 8794 -logPrefix rankaura_b_
-
-10 spawn 0 TurkiyeTankAltay 1 3485 3960
-10 spawn 0 TurkiyeInfantrySungur 1 3365 3900
-10 spawn 0 TurkiyeInfantryMehmetcik 4 3600 3880 30
-10 spawn 0 TurkiyeVehicleKirpi 2 3800 4100 40
-10 spawn 1 GLAVehicleTechnical 1 start1:200:0
-
-12 rank 0 TurkiyeTankAltay grade 21
-
-200 move 0 TurkiyeVehicleKirpi 3150 4100
diff --git a/GeneralsMD/Code/Data/Scenarios/rankauranight.txt b/GeneralsMD/Code/Data/Scenarios/rankauranight.txt
deleted file mode 100644
index f77442ca0..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankauranight.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Turkiye's Maresal rings at night on grass (2026-10-22): the same company as rankauramaresal.txt on
-# Dark Night, in seat 0's own base north-east of its command center (start0 is 504,505), so the
-# five rings (radius 300) lie on moonlit ground the seat has already seen. Two Kirpi drive through
-# the ring east to west. Select the Altay with a -control click at the screen centre once
-# Cinema/rankauranight.txt has cut to it. Round the village square (1450,1280, 1500,1250,
-# 1600,1500, 2000,1750, 2200,1500) every spawn was refused as cliff, water or obstacle.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap
-# -multiInstance -fps 120 -noFPSLimit -map "Maps\Dark Night\Dark Night.map"
-# -autoskirmish 2 -takeover -side 0 FactionTurkiye -side 1 FactionChina -seed 1
-# -scenario rankauranight -cinema rankauranight -control 8796 -logPrefix rankaura2_c_
-
-10 spawn 0 TurkiyeTankAltay 1 904 905
-10 spawn 0 TurkiyeInfantrySungur 1 780 905
-10 spawn 0 TurkiyeInfantryMehmetcik 4 1020 850 30
-10 spawn 0 TurkiyeVehicleKirpi 2 1150 1100 40
-10 spawn 1 ChinaTankBattleMaster 1 start1:-260:0
-
-12 rank 0 TurkiyeTankAltay grade 21
-
-200 move 0 TurkiyeVehicleKirpi 650 1100
diff --git a/GeneralsMD/Code/Data/Scenarios/rankaurareplay.txt b/GeneralsMD/Code/Data/Scenarios/rankaurareplay.txt
deleted file mode 100644
index e1a370ab1..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankaurareplay.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-# Turkiye's perks under replay-check (2026-10-22): a Maresal Altay (every aura at 300, spotter, sight,
-# detect), a Tuggeneral Sungur team (death rally) and four Mehmetcik beside them, and a GLA column
-# sent at them, so auras, rally and the guard all move damage while both runs are compared. Seats are
-# placed off each start so it works on the generated maps replay-check plays.
-#
-# .\replay-check.ps1 -Seeds 0,1 -MaxFrames 12000 -ExtraArgs @('-side','0','FactionTurkiye','-side','1','FactionGLA','-scenario','rankaurareplay')
-
-10 spawn 0 TurkiyeTankAltay 1 start0:250:0
-10 spawn 0 TurkiyeInfantrySungur 1 start0:250:60
-10 spawn 0 TurkiyeInfantryMehmetcik 4 start0:300:30 20
-10 spawn 1 GLATankScorpion 6 start0:650:30 30
-
-12 rank 0 TurkiyeTankAltay grade 21
-12 rank 0 TurkiyeInfantrySungur grade 17
-
-60 attackmove 1 GLATankScorpion start0:250:30
diff --git a/GeneralsMD/Code/Data/Scenarios/rankaurasnow.txt b/GeneralsMD/Code/Data/Scenarios/rankaurasnow.txt
deleted file mode 100644
index f6f1d8be1..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankaurasnow.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-# Turkiye's Maresal rings on snow (2026-10-22): the same company as rankauramaresal.txt on Winter
-# Wolf, east of seat 0's start (438,1736), so the five rings (radius 300) lie on snow the seat has
-# already seen. Two Kirpi drive through the ring east to west. Select the Altay with a -control
-# click at the screen centre once Cinema/rankaurasnow.txt has cut to it.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap
-# -multiInstance -fps 120 -noFPSLimit -map "Maps\Winter Wolf\Winter Wolf.map"
-# -autoskirmish 2 -takeover -side 0 FactionTurkiye -side 1 FactionChina -seed 1
-# -scenario rankaurasnow -cinema rankaurasnow -control 8798 -logPrefix rankaura3_s_
-
-10 spawn 0 TurkiyeTankAltay 1 900 1736
-10 spawn 0 TurkiyeInfantrySungur 1 780 1680
-10 spawn 0 TurkiyeInfantryMehmetcik 4 1015 1660 30
-10 spawn 0 TurkiyeVehicleKirpi 2 1200 1900 40
-10 spawn 1 ChinaTankBattleMaster 1 start1:-260:0
-
-12 rank 0 TurkiyeTankAltay grade 21
-
-200 move 0 TurkiyeVehicleKirpi 650 1900
diff --git a/GeneralsMD/Code/Data/Scenarios/rankaurawiki.txt b/GeneralsMD/Code/Data/Scenarios/rankaurawiki.txt
deleted file mode 100644
index dd91b12e0..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankaurawiki.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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/Scenarios/rankladder.txt b/GeneralsMD/Code/Data/Scenarios/rankladder.txt
deleted file mode 100644
index c0f8a4f2b..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankladder.txt
+++ /dev/null
@@ -1,236 +0,0 @@
-# Every grade of the rank ladder on a unit, one grid a side (2026-10-21): seats 0-4 are allied
-# and are the grid's columns, each row is one template, and grade = 5 x row + seat, so a side's
-# grid reads row by row from grade 0 (no insignia) at top left. A grade lands on every matching
-# unit of a seat, which is why each row is its own template. Seat 5 is the lone enemy that keeps
-# the match open. Everything drives 300 east from scenario frame 120 (logic 240), and
-# Cinema/rankladder.txt shoots each grid in the first second of that drive, before the higher
-# grades' speed pulls their column ahead.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap -observer
-# -multiInstance -fps 120 -noFPSLimit -particlecap 2500
-# -map "Maps\Twilight Flame\Twilight Flame.map" -autoskirmish 6 -takeover
-# -team 0 0 -team 1 0 -team 2 0 -team 3 0 -team 4 0 -team 5 1 -seed 1
-# -scenario rankladder -cinema rankladder -video 260 340 rankladder -maxframes 360
-#
-# -video is there for its clock: while a range is set the shot list runs on the logic frame, not
-# the wall clock, so a slow load cannot fire every shot before the units exist.
-#
-# Columns x 3330 + 70 x seat, rows 45 apart: USA y 3640-3865 (29 grades, 0-28), China 3920-4055
-# (20, 0-19), GLA 4110-4290 (21, 0-20). Grade 0 is unranked on every side and wears nothing. South of y 3620 is cliff from x 3300 to 3440.
-
-# USA: rows are Crusader, Paladin, Humvee, Tomahawk, Ranger, Missile Defender
-10 spawn 0 AmericaTankCrusader 1 3330 3640
-10 spawn 1 AmericaTankCrusader 1 3400 3640
-10 spawn 2 AmericaTankCrusader 1 3470 3640
-10 spawn 3 AmericaTankCrusader 1 3540 3640
-10 spawn 4 AmericaTankCrusader 1 3610 3640
-10 spawn 0 AmericaTankPaladin 1 3330 3685
-10 spawn 1 AmericaTankPaladin 1 3400 3685
-10 spawn 2 AmericaTankPaladin 1 3470 3685
-10 spawn 3 AmericaTankPaladin 1 3540 3685
-10 spawn 4 AmericaTankPaladin 1 3610 3685
-10 spawn 0 AmericaVehicleHumvee 1 3330 3730
-10 spawn 1 AmericaVehicleHumvee 1 3400 3730
-10 spawn 2 AmericaVehicleHumvee 1 3470 3730
-10 spawn 3 AmericaVehicleHumvee 1 3540 3730
-10 spawn 4 AmericaVehicleHumvee 1 3610 3730
-10 spawn 0 AmericaVehicleTomahawk 1 3330 3775
-10 spawn 1 AmericaVehicleTomahawk 1 3400 3775
-10 spawn 2 AmericaVehicleTomahawk 1 3470 3775
-10 spawn 3 AmericaVehicleTomahawk 1 3540 3775
-10 spawn 4 AmericaVehicleTomahawk 1 3610 3775
-10 spawn 0 AmericaInfantryRanger 1 3330 3820
-10 spawn 1 AmericaInfantryRanger 1 3400 3820
-10 spawn 2 AmericaInfantryRanger 1 3470 3820
-10 spawn 3 AmericaInfantryRanger 1 3540 3820
-10 spawn 4 AmericaInfantryRanger 1 3610 3820
-10 spawn 0 AmericaInfantryMissileDefender 1 3330 3865
-10 spawn 1 AmericaInfantryMissileDefender 1 3400 3865
-10 spawn 2 AmericaInfantryMissileDefender 1 3470 3865
-10 spawn 3 AmericaInfantryMissileDefender 1 3540 3865
-
-# China: rows are Battlemaster, Gattling Tank, Red Guard, Tank Hunter
-10 spawn 0 ChinaTankBattleMaster 1 3330 3920
-10 spawn 1 ChinaTankBattleMaster 1 3400 3920
-10 spawn 2 ChinaTankBattleMaster 1 3470 3920
-10 spawn 3 ChinaTankBattleMaster 1 3540 3920
-10 spawn 4 ChinaTankBattleMaster 1 3610 3920
-10 spawn 0 ChinaTankGattling 1 3330 3965
-10 spawn 1 ChinaTankGattling 1 3400 3965
-10 spawn 2 ChinaTankGattling 1 3470 3965
-10 spawn 3 ChinaTankGattling 1 3540 3965
-10 spawn 4 ChinaTankGattling 1 3610 3965
-10 spawn 0 ChinaInfantryRedguard 1 3330 4010
-10 spawn 1 ChinaInfantryRedguard 1 3400 4010
-10 spawn 2 ChinaInfantryRedguard 1 3470 4010
-10 spawn 3 ChinaInfantryRedguard 1 3540 4010
-10 spawn 4 ChinaInfantryRedguard 1 3610 4010
-10 spawn 0 ChinaInfantryTankHunter 1 3330 4055
-10 spawn 1 ChinaInfantryTankHunter 1 3400 4055
-10 spawn 2 ChinaInfantryTankHunter 1 3470 4055
-10 spawn 3 ChinaInfantryTankHunter 1 3540 4055
-10 spawn 4 ChinaInfantryTankHunter 1 3610 4055
-
-# GLA: rows are Scorpion, Quad Cannon, Rebel, Tunnel Defender
-10 spawn 0 GLATankScorpion 1 3330 4110
-10 spawn 1 GLATankScorpion 1 3400 4110
-10 spawn 2 GLATankScorpion 1 3470 4110
-10 spawn 3 GLATankScorpion 1 3540 4110
-10 spawn 4 GLATankScorpion 1 3610 4110
-10 spawn 0 GLAVehicleQuadCannon 1 3330 4155
-10 spawn 1 GLAVehicleQuadCannon 1 3400 4155
-10 spawn 2 GLAVehicleQuadCannon 1 3470 4155
-10 spawn 3 GLAVehicleQuadCannon 1 3540 4155
-10 spawn 4 GLAVehicleQuadCannon 1 3610 4155
-10 spawn 0 GLAInfantryRebel 1 3330 4200
-10 spawn 1 GLAInfantryRebel 1 3400 4200
-10 spawn 2 GLAInfantryRebel 1 3470 4200
-10 spawn 3 GLAInfantryRebel 1 3540 4200
-10 spawn 4 GLAInfantryRebel 1 3610 4200
-10 spawn 0 GLAInfantryTunnelDefender 1 3330 4245
-10 spawn 1 GLAInfantryTunnelDefender 1 3400 4245
-10 spawn 2 GLAInfantryTunnelDefender 1 3470 4245
-10 spawn 3 GLAInfantryTunnelDefender 1 3540 4245
-10 spawn 4 GLAInfantryTunnelDefender 1 3610 4245
-10 spawn 0 GLAVehicleTechnical 1 3330 4290
-
-12 rank 1 AmericaTankCrusader grade 1
-12 rank 2 AmericaTankCrusader grade 2
-12 rank 3 AmericaTankCrusader grade 3
-12 rank 4 AmericaTankCrusader grade 4
-12 rank 0 AmericaTankPaladin grade 5
-12 rank 1 AmericaTankPaladin grade 6
-12 rank 2 AmericaTankPaladin grade 7
-12 rank 3 AmericaTankPaladin grade 8
-12 rank 4 AmericaTankPaladin grade 9
-12 rank 0 AmericaVehicleHumvee grade 10
-12 rank 1 AmericaVehicleHumvee grade 11
-12 rank 2 AmericaVehicleHumvee grade 12
-12 rank 3 AmericaVehicleHumvee grade 13
-12 rank 4 AmericaVehicleHumvee grade 14
-12 rank 0 AmericaVehicleTomahawk grade 15
-12 rank 1 AmericaVehicleTomahawk grade 16
-12 rank 2 AmericaVehicleTomahawk grade 17
-12 rank 3 AmericaVehicleTomahawk grade 18
-12 rank 4 AmericaVehicleTomahawk grade 19
-12 rank 0 AmericaInfantryRanger grade 20
-12 rank 1 AmericaInfantryRanger grade 21
-12 rank 2 AmericaInfantryRanger grade 22
-12 rank 3 AmericaInfantryRanger grade 23
-12 rank 4 AmericaInfantryRanger grade 24
-12 rank 0 AmericaInfantryMissileDefender grade 25
-12 rank 1 AmericaInfantryMissileDefender grade 26
-12 rank 2 AmericaInfantryMissileDefender grade 27
-12 rank 3 AmericaInfantryMissileDefender grade 28
-12 rank 1 ChinaTankBattleMaster grade 1
-12 rank 2 ChinaTankBattleMaster grade 2
-12 rank 3 ChinaTankBattleMaster grade 3
-12 rank 4 ChinaTankBattleMaster grade 4
-12 rank 0 ChinaTankGattling grade 5
-12 rank 1 ChinaTankGattling grade 6
-12 rank 2 ChinaTankGattling grade 7
-12 rank 3 ChinaTankGattling grade 8
-12 rank 4 ChinaTankGattling grade 9
-12 rank 0 ChinaInfantryRedguard grade 10
-12 rank 1 ChinaInfantryRedguard grade 11
-12 rank 2 ChinaInfantryRedguard grade 12
-12 rank 3 ChinaInfantryRedguard grade 13
-12 rank 4 ChinaInfantryRedguard grade 14
-12 rank 0 ChinaInfantryTankHunter grade 15
-12 rank 1 ChinaInfantryTankHunter grade 16
-12 rank 2 ChinaInfantryTankHunter grade 17
-12 rank 3 ChinaInfantryTankHunter grade 18
-12 rank 4 ChinaInfantryTankHunter grade 19
-12 rank 1 GLATankScorpion grade 1
-12 rank 2 GLATankScorpion grade 2
-12 rank 3 GLATankScorpion grade 3
-12 rank 4 GLATankScorpion grade 4
-12 rank 0 GLAVehicleQuadCannon grade 5
-12 rank 1 GLAVehicleQuadCannon grade 6
-12 rank 2 GLAVehicleQuadCannon grade 7
-12 rank 3 GLAVehicleQuadCannon grade 8
-12 rank 4 GLAVehicleQuadCannon grade 9
-12 rank 0 GLAInfantryRebel grade 10
-12 rank 1 GLAInfantryRebel grade 11
-12 rank 2 GLAInfantryRebel grade 12
-12 rank 3 GLAInfantryRebel grade 13
-12 rank 4 GLAInfantryRebel grade 14
-12 rank 0 GLAInfantryTunnelDefender grade 15
-12 rank 1 GLAInfantryTunnelDefender grade 16
-12 rank 2 GLAInfantryTunnelDefender grade 17
-12 rank 3 GLAInfantryTunnelDefender grade 18
-12 rank 4 GLAInfantryTunnelDefender grade 19
-12 rank 0 GLAVehicleTechnical* grade 20
-
-120 move 0 AmericaTankCrusader 3630 3640
-120 move 1 AmericaTankCrusader 3700 3640
-120 move 2 AmericaTankCrusader 3770 3640
-120 move 3 AmericaTankCrusader 3840 3640
-120 move 4 AmericaTankCrusader 3910 3640
-120 move 0 AmericaTankPaladin 3630 3685
-120 move 1 AmericaTankPaladin 3700 3685
-120 move 2 AmericaTankPaladin 3770 3685
-120 move 3 AmericaTankPaladin 3840 3685
-120 move 4 AmericaTankPaladin 3910 3685
-120 move 0 AmericaVehicleHumvee 3630 3730
-120 move 1 AmericaVehicleHumvee 3700 3730
-120 move 2 AmericaVehicleHumvee 3770 3730
-120 move 3 AmericaVehicleHumvee 3840 3730
-120 move 4 AmericaVehicleHumvee 3910 3730
-120 move 0 AmericaVehicleTomahawk 3630 3775
-120 move 1 AmericaVehicleTomahawk 3700 3775
-120 move 2 AmericaVehicleTomahawk 3770 3775
-120 move 3 AmericaVehicleTomahawk 3840 3775
-120 move 4 AmericaVehicleTomahawk 3910 3775
-120 move 0 AmericaInfantryRanger 3630 3820
-120 move 1 AmericaInfantryRanger 3700 3820
-120 move 2 AmericaInfantryRanger 3770 3820
-120 move 3 AmericaInfantryRanger 3840 3820
-120 move 4 AmericaInfantryRanger 3910 3820
-120 move 0 AmericaInfantryMissileDefender 3630 3865
-120 move 1 AmericaInfantryMissileDefender 3700 3865
-120 move 2 AmericaInfantryMissileDefender 3770 3865
-120 move 3 AmericaInfantryMissileDefender 3840 3865
-120 move 0 ChinaTankBattleMaster 3630 3920
-120 move 1 ChinaTankBattleMaster 3700 3920
-120 move 2 ChinaTankBattleMaster 3770 3920
-120 move 3 ChinaTankBattleMaster 3840 3920
-120 move 4 ChinaTankBattleMaster 3910 3920
-120 move 0 ChinaTankGattling 3630 3965
-120 move 1 ChinaTankGattling 3700 3965
-120 move 2 ChinaTankGattling 3770 3965
-120 move 3 ChinaTankGattling 3840 3965
-120 move 4 ChinaTankGattling 3910 3965
-120 move 0 ChinaInfantryRedguard 3630 4010
-120 move 1 ChinaInfantryRedguard 3700 4010
-120 move 2 ChinaInfantryRedguard 3770 4010
-120 move 3 ChinaInfantryRedguard 3840 4010
-120 move 4 ChinaInfantryRedguard 3910 4010
-120 move 0 ChinaInfantryTankHunter 3630 4055
-120 move 1 ChinaInfantryTankHunter 3700 4055
-120 move 2 ChinaInfantryTankHunter 3770 4055
-120 move 3 ChinaInfantryTankHunter 3840 4055
-120 move 4 ChinaInfantryTankHunter 3910 4055
-120 move 0 GLATankScorpion 3630 4110
-120 move 1 GLATankScorpion 3700 4110
-120 move 2 GLATankScorpion 3770 4110
-120 move 3 GLATankScorpion 3840 4110
-120 move 4 GLATankScorpion 3910 4110
-120 move 0 GLAVehicleQuadCannon 3630 4155
-120 move 1 GLAVehicleQuadCannon 3700 4155
-120 move 2 GLAVehicleQuadCannon 3770 4155
-120 move 3 GLAVehicleQuadCannon 3840 4155
-120 move 4 GLAVehicleQuadCannon 3910 4155
-120 move 0 GLAInfantryRebel 3630 4200
-120 move 1 GLAInfantryRebel 3700 4200
-120 move 2 GLAInfantryRebel 3770 4200
-120 move 3 GLAInfantryRebel 3840 4200
-120 move 4 GLAInfantryRebel 3910 4200
-120 move 0 GLAInfantryTunnelDefender 3630 4245
-120 move 1 GLAInfantryTunnelDefender 3700 4245
-120 move 2 GLAInfantryTunnelDefender 3770 4245
-120 move 3 GLAInfantryTunnelDefender 3840 4245
-120 move 4 GLAInfantryTunnelDefender 3910 4245
-120 move 0 GLAVehicleTechnical* 3630 4290
-
-200 tally 0 *
diff --git a/GeneralsMD/Code/Data/Scenarios/rankringsall.txt b/GeneralsMD/Code/Data/Scenarios/rankringsall.txt
deleted file mode 100644
index 584dae4e7..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankringsall.txt
+++ /dev/null
@@ -1,45 +0,0 @@
-# America's, China's and GLA's aura rings (2026-10-26, source d1f62807): three leaders at the top of
-# their ladders take the same spot on the Twilight Flame plateau in turn, so one camera framing,
-# rankauramaresal's, holds each of them. Every 14 s a new leader spawns at 3485,3960 and the last one
-# drives off east. A General of the Army Crusader (grade 28) gives rate of fire, mend, drill,
-# steady, sight, detect and guard; a General Battlemaster (grade 19) guard, drill, steady, rate of
-# fire, mend, capture and pace; a Supreme Liberator Scorpion (grade 20) pace, spoils, mend, capture,
-# rate of fire and steady. Detect has no ring. Each leader brings three infantry walking west and a
-# vehicle driving through the ring. Select each leader with a -control click at the screen centre
-# once Cinema/rankringsall.txt has cut to it (logic frames 380, 1220, 2060). Since 2026-10-26 the
-# rings draw for every leader the local player can see, so the click is no longer needed.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap
-# -multiInstance -fps 120 -noFPSLimit -particlecap 2500 -map "Maps\Twilight Flame\Twilight Flame.map"
-# -autoskirmish 2 -takeover -side 0 FactionAmerica -side 1 FactionGLA -seed 1
-# -scenario rankringsall -cinema rankringsall -control 8801 -logPrefix rankrings_d3d11_
-
-10 spawn 0 AmericaTankCrusader 1 3485 3960
-10 spawn 0 AmericaInfantryRanger 3 3620 3880 30
-10 spawn 0 AmericaVehicleHumvee 1 3800 4080
-10 spawn 1 GLAVehicleTechnical 1 start1:200:0
-12 rank 0 AmericaTankCrusader grade 28
-130 move 0 AmericaInfantryRanger 3300 3880
-190 move 0 AmericaVehicleHumvee 3150 4080
-370 move 0 AmericaTankCrusader 3950 4250
-370 move 0 AmericaInfantryRanger 3900 4300
-370 move 0 AmericaVehicleHumvee 3900 4300
-
-430 spawn 0 ChinaTankBattleMaster 1 3485 3960
-430 spawn 0 ChinaInfantryRedguard 3 3620 3880 30
-430 spawn 0 ChinaTankGattling 1 3800 4080
-432 rank 0 ChinaTankBattleMaster grade 19
-550 move 0 ChinaInfantryRedguard 3300 3880
-610 move 0 ChinaTankGattling 3150 4080
-790 move 0 ChinaTankBattleMaster 3950 4250
-790 move 0 ChinaInfantryRedguard 3900 4300
-790 move 0 ChinaTankGattling 3900 4300
-
-850 spawn 0 GLATankScorpion 1 3485 3960
-850 spawn 0 GLAInfantryRebel 3 3620 3880 30
-850 spawn 0 GLAVehicleQuadCannon 1 3800 4080
-852 rank 0 GLATankScorpion grade 20
-970 move 0 GLAInfantryRebel 3300 3880
-1030 move 0 GLAVehicleQuadCannon 3150 4080
-
-1150 tally 0 *
diff --git a/GeneralsMD/Code/Data/Scenarios/rankzero.txt b/GeneralsMD/Code/Data/Scenarios/rankzero.txt
deleted file mode 100644
index 0655f6be5..000000000
--- a/GeneralsMD/Code/Data/Scenarios/rankzero.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-# Grade 0 and structures wear no rank mark (2026-10-21): a Chinese command center and war
-# factory and a GLA command center and arms dealer on the open ground of Twilight Flame, with
-# unranked Battlemasters, Red Guard, Scorpions and Rebels driving between them, all seat 0's.
-# Health bars draw for everything with HealthBars = 0 (always) in Options.ini; the check is that
-# no bar has a mark at its right end. Cinema/rankzero.txt holds the frame.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap -observer
-# -multiInstance -fps 120 -noFPSLimit -map "Maps\Twilight Flame\Twilight Flame.map"
-# -autoskirmish 2 -takeover -seed 1 -scenario rankzero -cinema rankzero
-# -video 260 340 rankzero -maxframes 360
-
-10 spawn 0 ChinaCommandCenter 1 3360 3760
-10 spawn 0 ChinaWarFactory 1 3600 3760
-10 spawn 0 GLACommandCenter 1 3360 4120
-10 spawn 0 GLAArmsDealer 1 3600 4120
-
-10 spawn 0 ChinaTankBattleMaster 3 3300 3940 40
-10 spawn 0 ChinaInfantryRedguard 4 3330 3900 14
-10 spawn 0 GLATankScorpion 3 3300 3990 40
-10 spawn 0 GLAInfantryRebel 4 3330 4030 14
-
-60 move 0 ChinaTankBattleMaster 3800 3940
-60 move 0 ChinaInfantryRedguard 3800 3900
-60 move 0 GLATankScorpion 3800 3990
-60 move 0 GLAInfantryRebel 3800 4030
-
-100 tally 0 *
diff --git a/GeneralsMD/Code/Data/Scenarios/vetranks.txt b/GeneralsMD/Code/Data/Scenarios/vetranks.txt
deleted file mode 100644
index 080ef2760..000000000
--- a/GeneralsMD/Code/Data/Scenarios/vetranks.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-# Rank insignia of the three sides side by side (2026-10-21): seats 0-3 are allied, one seat a
-# rank (0 regular, 1 veteran, 2 elite, 3 heroic), and each spawns the same six units in its own
-# column, so a faction's row reads regular to heroic from left to right. The insignia follow the
-# template's side, not the seat's, so any seat can carry any faction's units. Seat 4 is the lone
-# enemy that keeps the match open. Everything walks 400 south from scenario frame 120 (logic 240),
-# and Cinema/vetranks.txt shoots each row in the first two seconds of that walk.
-#
-# generals.exe -win -borderless -xres 1920 -yres 1080 -msaa 0 -quickstart -noshellmap -observer
-# -multiInstance -fps 120 -noFPSLimit -particlecap 2500
-# -map "Maps\Twilight Flame\Twilight Flame.map" -autoskirmish 5 -takeover
-# -team 0 0 -team 1 0 -team 2 0 -team 3 0 -team 4 1 -seed 1
-# -scenario vetranks -cinema vetranks -maxframes 600
-#
-# Columns x 3300 / 3365 / 3430 / 3495, tank on the column and its infantry 25 east of it.
-# Rows: USA y 3800, China 3960, GLA 4120. The rank lines name exact templates, not America*:
-# a prefix would also take the seat's own command center, which has no experience tracker.
-
-10 spawn 0 AmericaTankCrusader 1 3300 3800
-10 spawn 0 AmericaInfantryRanger 1 3325 3800
-10 spawn 0 ChinaTankBattleMaster 1 3300 3960
-10 spawn 0 ChinaInfantryRedguard 1 3325 3960
-10 spawn 0 GLATankScorpion 1 3300 4120
-10 spawn 0 GLAInfantryRebel 1 3325 4120
-
-10 spawn 1 AmericaTankCrusader 1 3365 3800
-10 spawn 1 AmericaInfantryRanger 1 3390 3800
-10 spawn 1 ChinaTankBattleMaster 1 3365 3960
-10 spawn 1 ChinaInfantryRedguard 1 3390 3960
-10 spawn 1 GLATankScorpion 1 3365 4120
-10 spawn 1 GLAInfantryRebel 1 3390 4120
-
-10 spawn 2 AmericaTankCrusader 1 3430 3800
-10 spawn 2 AmericaInfantryRanger 1 3455 3800
-10 spawn 2 ChinaTankBattleMaster 1 3430 3960
-10 spawn 2 ChinaInfantryRedguard 1 3455 3960
-10 spawn 2 GLATankScorpion 1 3430 4120
-10 spawn 2 GLAInfantryRebel 1 3455 4120
-
-10 spawn 3 AmericaTankCrusader 1 3495 3800
-10 spawn 3 AmericaInfantryRanger 1 3520 3800
-10 spawn 3 ChinaTankBattleMaster 1 3495 3960
-10 spawn 3 ChinaInfantryRedguard 1 3520 3960
-10 spawn 3 GLATankScorpion 1 3495 4120
-10 spawn 3 GLAInfantryRebel 1 3520 4120
-
-12 rank 1 AmericaTankCrusader veteran
-12 rank 1 AmericaInfantryRanger veteran
-12 rank 1 ChinaTankBattleMaster veteran
-12 rank 1 ChinaInfantryRedguard veteran
-12 rank 1 GLATankScorpion veteran
-12 rank 1 GLAInfantryRebel veteran
-12 rank 2 AmericaTankCrusader elite
-12 rank 2 AmericaInfantryRanger elite
-12 rank 2 ChinaTankBattleMaster elite
-12 rank 2 ChinaInfantryRedguard elite
-12 rank 2 GLATankScorpion elite
-12 rank 2 GLAInfantryRebel elite
-12 rank 3 AmericaTankCrusader heroic
-12 rank 3 AmericaInfantryRanger heroic
-12 rank 3 ChinaTankBattleMaster heroic
-12 rank 3 ChinaInfantryRedguard heroic
-12 rank 3 GLATankScorpion heroic
-12 rank 3 GLAInfantryRebel heroic
-
-120 move 0 AmericaTankCrusader 3300 3400
-120 move 0 AmericaInfantryRanger 3325 3400
-120 move 0 ChinaTankBattleMaster 3300 3560
-120 move 0 ChinaInfantryRedguard 3325 3560
-120 move 0 GLATankScorpion 3300 3720
-120 move 0 GLAInfantryRebel 3325 3720
-120 move 1 AmericaTankCrusader 3365 3400
-120 move 1 AmericaInfantryRanger 3390 3400
-120 move 1 ChinaTankBattleMaster 3365 3560
-120 move 1 ChinaInfantryRedguard 3390 3560
-120 move 1 GLATankScorpion 3365 3720
-120 move 1 GLAInfantryRebel 3390 3720
-120 move 2 AmericaTankCrusader 3430 3400
-120 move 2 AmericaInfantryRanger 3455 3400
-120 move 2 ChinaTankBattleMaster 3430 3560
-120 move 2 ChinaInfantryRedguard 3455 3560
-120 move 2 GLATankScorpion 3430 3720
-120 move 2 GLAInfantryRebel 3455 3720
-120 move 3 AmericaTankCrusader 3495 3400
-120 move 3 AmericaInfantryRanger 3520 3400
-120 move 3 ChinaTankBattleMaster 3495 3560
-120 move 3 ChinaInfantryRedguard 3520 3560
-120 move 3 GLATankScorpion 3495 3720
-120 move 3 GLAInfantryRebel 3520 3720
-
-200 tally 0 *
diff --git a/GeneralsMD/Code/Data/Turkish/Generals.str b/GeneralsMD/Code/Data/Turkish/Generals.str
index a9c9718bf..03fd27624 100644
--- a/GeneralsMD/Code/Data/Turkish/Generals.str
+++ b/GeneralsMD/Code/Data/Turkish/Generals.str
@@ -7366,7 +7366,7 @@ CONTROLBAR:ToolTipChinaScienceNukeCannon
END
CONTROLBAR:ToolTipChinaScienceRedGuardTraining
-"Tüm Kızıl Muhafızlar üç rütbe yukarıda, Onbaşı olarak üretilir"
+"Tüm Kızıl Muhafızlar kıdemli olarak üretilir"
END
CONTROLBAR:ToolTipChinaScienceClusterMines
@@ -7374,7 +7374,7 @@ CONTROLBAR:ToolTipChinaScienceClusterMines
END
CONTROLBAR:ToolTipChinaScienceARtilleryTraining
-"Nükleer Toplar ve Cehennem Topları üç rütbe yukarıda üretilir"
+"Nükleer Toplar ve Cehennem Topları kıdemli olarak üretilir"
END
CONTROLBAR:ToolTipChinaScienceArtilleryBarrage
@@ -7398,7 +7398,7 @@ CONTROLBAR:ToolTipGLaScienceMarauderTank
END
CONTROLBAR:ToolTipGLAScienceTechnicalTraining
-"Tüm Silahlı Pikaplar üç rütbe yukarıda üretilir"
+"Tüm Silahlı Pikaplar kıdemli olarak üretilir"
END
CONTROLBAR:ToolTipGLAScienceRebelAmbush
@@ -13218,7 +13218,7 @@ CONTROLBAR:ToolTipChinaScienceTankHunterTraining
END
CONTROLBAR:ToolTipChinaScienceBattlemasterTraining
-"Tüm Battlemaster'lar altı rütbe yukarıda üretilir"
+"Tüm Battlemaster'lar seçkin olarak üretilir"
END
CONTROLBAR:ToolTipChinaScienceOverlordTraining
@@ -13902,7 +13902,7 @@ SCIENCE:Infa_ChinaRedGuardTraining
END
CONTROLBAR:Infa_ToolTipChinaScienceRedGuardTraining
-"Tüm Minigun Erleri kıdemliden üç rütbe yukarıda üretilir"
+"Tüm Minigun Erleri Seçkin olarak üretilir"
END
CONTROLBAR:ToolTipChinaBuildNuclearMissileLauncherBoss
@@ -14362,7 +14362,7 @@ GUI:BioFeatures_Pos3
END
GUI:BioFeatures_Pos4
-"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"
+"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"
END
GUI:BioFeatures_Pos5
@@ -14374,7 +14374,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 üç rütbe yukarıda 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 kıdemli başlar"
END
GUI:BioFeatures_Pos8
@@ -16928,402 +16928,6 @@ GUI:GraphNoData
"Bu maçta hiçbir şey kaydedilmedi."
END
-RANK:NextRank
-"Sonraki rütbe %d/%d XP"
-END
-
-RANK:PerkSIGHT
-"Görüş +%d%%"
-END
-
-RANK:PerkSTILL_GUARD
-"Dururken %d%% daha az hasar alır"
-END
-
-RANK:PerkMEND
-"Çatışma dışında saniyede %d.%02d%% iyileşir"
-END
-
-RANK:PerkSPOTTER
-"Topçuya gözcülük yapar"
-END
-
-RANK:PerkSCATTER
-"Topçu saçılması -%d%%"
-END
-
-RANK:PerkDEATH_RALLY
-"Düştüğünde yakındaki dostlar 10 saniye %d%% daha az hasar alır"
-END
-
-RANK:PerkDETECT
-"%d içindeki gizli birimleri görür"
-END
-
-RANK:PerkAURA_RADIUS
-"Aura menzili +%d%%"
-END
-
-RANK:PerkAURA_RATE_OF_FIRE
-"Aura: atış hızı +%d%%"
-END
-
-RANK:PerkAURA_SIGHT
-"Aura: görüş +%d%%"
-END
-
-RANK:PerkAURA_GUARD
-"Aura: %d%% daha az hasar"
-END
-
-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"
-END
-
-RANK:America1
-"E-2 Er"
-END
-
-RANK:America2
-"E-3 Birinci Sınıf Er"
-END
-
-RANK:America3
-"E-4 Uzman Er"
-END
-
-RANK:America4
-"E-4 Onbaşı"
-END
-
-RANK:America5
-"E-5 Çavuş"
-END
-
-RANK:America6
-"E-6 Kıdemli Çavuş"
-END
-
-RANK:America7
-"E-7 Birinci Sınıf Çavuş"
-END
-
-RANK:America8
-"E-8 Usta Çavuş"
-END
-
-RANK:America9
-"E-8 Bölük Başçavuşu"
-END
-
-RANK:America10
-"E-9 Başçavuş"
-END
-
-RANK:America11
-"E-9 Komuta Başçavuşu"
-END
-
-RANK:America12
-"E-9 Kara Kuvvetleri Başçavuşu"
-END
-
-RANK:America13
-"W-1 Teknik Subay"
-END
-
-RANK:America14
-"W-2 Kıdemli Teknik Subay"
-END
-
-RANK:America15
-"W-3 Kıdemli Teknik Subay"
-END
-
-RANK:America16
-"W-4 Kıdemli Teknik Subay"
-END
-
-RANK:America17
-"W-5 Kıdemli Teknik Subay"
-END
-
-RANK:America18
-"O-1 Teğmen"
-END
-
-RANK:America19
-"O-2 Üsteğmen"
-END
-
-RANK:America20
-"O-3 Yüzbaşı"
-END
-
-RANK:America21
-"O-4 Binbaşı"
-END
-
-RANK:America22
-"O-5 Yarbay"
-END
-
-RANK:America23
-"O-6 Albay"
-END
-
-RANK:America24
-"O-7 Tuğgeneral"
-END
-
-RANK:America25
-"O-8 Tümgeneral"
-END
-
-RANK:America26
-"O-9 Korgeneral"
-END
-
-RANK:America27
-"O-10 Orgeneral"
-END
-
-RANK:America28
-"Mareşal"
-END
-
-RANK:China0
-"Rütbesiz"
-END
-
-RANK:China1
-"Er"
-END
-
-RANK:China2
-"Birinci Sınıf Er"
-END
-
-RANK:China3
-"Onbaşı"
-END
-
-RANK:China4
-"Çavuş"
-END
-
-RANK:China5
-"İkinci Sınıf Kıdemli Çavuş"
-END
-
-RANK:China6
-"Birinci Sınıf Kıdemli Çavuş"
-END
-
-RANK:China7
-"Üçüncü Sınıf Usta Çavuş"
-END
-
-RANK:China8
-"İkinci Sınıf Usta Çavuş"
-END
-
-RANK:China9
-"Birinci Sınıf Usta Çavuş"
-END
-
-RANK:China10
-"Teğmen"
-END
-
-RANK:China11
-"Üsteğmen"
-END
-
-RANK:China12
-"Yüzbaşı"
-END
-
-RANK:China13
-"Binbaşı"
-END
-
-RANK:China14
-"Yarbay"
-END
-
-RANK:China15
-"Albay"
-END
-
-RANK:China16
-"Kıdemli Albay"
-END
-
-RANK:China17
-"Tümgeneral"
-END
-
-RANK:China18
-"Korgeneral"
-END
-
-RANK:China19
-"Orgeneral"
-END
-
-RANK:GLA0
-"Rütbesiz"
-END
-
-RANK:GLA1
-"Acemi"
-END
-
-RANK:GLA2
-"Düzensiz"
-END
-
-RANK:GLA3
-"Savaşçı"
-END
-
-RANK:GLA4
-"Akıncı"
-END
-
-RANK:GLA5
-"Pişkin Akıncı"
-END
-
-RANK:GLA6
-"Tim Eri"
-END
-
-RANK:GLA7
-"Tim Lideri"
-END
-
-RANK:GLA8
-"Hücre Lideri"
-END
-
-RANK:GLA9
-"Kıdemli Hücre Lideri"
-END
-
-RANK:GLA10
-"Baskın Yüzbaşısı"
-END
-
-RANK:GLA11
-"Kol Yüzbaşısı"
-END
-
-RANK:GLA12
-"Vuruş Komutanı"
-END
-
-RANK:GLA13
-"Saha Komutanı"
-END
-
-RANK:GLA14
-"Sektör Komutanı"
-END
-
-RANK:GLA15
-"Savaş Ağası"
-END
-
-RANK:GLA16
-"Bölgesel Savaş Ağası"
-END
-
-RANK:GLA17
-"Baş Savaş Ağası"
-END
-
-RANK:GLA18
-"General"
-END
-
-RANK:GLA19
-"Büyük General"
-END
-
-RANK:GLA20
-"Yüce Kurtarıcı"
-END
-
-RANK:Turkiye0
-"Rütbesiz"
-END
-
INI:FactionTurkiye
"Türkiye (Deneysel)"
END
diff --git a/GeneralsMD/Code/Data/Ukrainian/Generals.str b/GeneralsMD/Code/Data/Ukrainian/Generals.str
index 366447498..f68fa450c 100644
--- a/GeneralsMD/Code/Data/Ukrainian/Generals.str
+++ b/GeneralsMD/Code/Data/Ukrainian/Generals.str
@@ -17797,426 +17797,6 @@ GUI:GraphNoData
"У цьому матчі нічого не записано."
END
-RANK:NextRank
-"Наступне звання %d/%d досвіду"
-END
-
-RANK:PerkSIGHT
-"Огляд +%d%%"
-END
-
-RANK:PerkSTILL_GUARD
-"На місці: на %d%% менше отриманої шкоди"
-END
-
-RANK:PerkMEND
-"Поза боєм: лікується на %d.%02d%% за секунду"
-END
-
-RANK:PerkSPOTTER
-"Коригує артилерію"
-END
-
-RANK:PerkSCATTER
-"Розкид артилерії -%d%%"
-END
-
-RANK:PerkDEATH_RALLY
-"Коли він падає, союзники поруч отримують на %d%% менше шкоди протягом 10 секунд"
-END
-
-RANK:PerkDETECT
-"Виявляє маскування в радіусі %d"
-END
-
-RANK:PerkAURA_RADIUS
-"Радіус аури +%d%%"
-END
-
-RANK:PerkAURA_RATE_OF_FIRE
-"Аура: скорострільність +%d%%"
-END
-
-RANK:PerkAURA_SIGHT
-"Аура: огляд +%d%%"
-END
-
-RANK:PerkAURA_GUARD
-"Аура: на %d%% менше отриманої шкоди"
-END
-
-RANK:PerkAURA_RANGE
-"Аура: дальність артилерії +%d%%"
-END
-
-RANK:America0
-"E-1 Рядовий"
-END
-
-RANK:America1
-"E-2 Рядовий"
-END
-
-RANK:America2
-"E-3 Рядовий першого класу"
-END
-
-RANK:America3
-"E-4 Спеціаліст"
-END
-
-RANK:America4
-"E-4 Капрал"
-END
-
-RANK:America5
-"E-5 Сержант"
-END
-
-RANK:America6
-"E-6 Штаб-сержант"
-END
-
-RANK:America7
-"E-7 Сержант першого класу"
-END
-
-RANK:America8
-"E-8 Майстер-сержант"
-END
-
-RANK:America9
-"E-8 Перший сержант"
-END
-
-RANK:America10
-"E-9 Сержант-майор"
-END
-
-RANK:America11
-"E-9 Командний сержант-майор"
-END
-
-RANK:America12
-"E-9 Сержант-майор армії"
-END
-
-RANK:America13
-"W-1 Прапорщик"
-END
-
-RANK:America14
-"W-2 Старший прапорщик"
-END
-
-RANK:America15
-"W-3 Старший прапорщик"
-END
-
-RANK:America16
-"W-4 Старший прапорщик"
-END
-
-RANK:America17
-"W-5 Старший прапорщик"
-END
-
-RANK:America18
-"O-1 Молодший лейтенант"
-END
-
-RANK:America19
-"O-2 Лейтенант"
-END
-
-RANK:America20
-"O-3 Капітан"
-END
-
-RANK:America21
-"O-4 Майор"
-END
-
-RANK:America22
-"O-5 Підполковник"
-END
-
-RANK:America23
-"O-6 Полковник"
-END
-
-RANK:America24
-"O-7 Бригадний генерал"
-END
-
-RANK:America25
-"O-8 Генерал-майор"
-END
-
-RANK:America26
-"O-9 Генерал-лейтенант"
-END
-
-RANK:America27
-"O-10 Генерал"
-END
-
-RANK:America28
-"Генерал армії"
-END
-
-RANK:China0
-"Без звання"
-END
-
-RANK:China1
-"Рядовий"
-END
-
-RANK:China2
-"Рядовий першого класу"
-END
-
-RANK:China3
-"Капрал"
-END
-
-RANK:China4
-"Сержант"
-END
-
-RANK:China5
-"Штаб-сержант другого класу"
-END
-
-RANK:China6
-"Штаб-сержант першого класу"
-END
-
-RANK:China7
-"Майстер-сержант третього класу"
-END
-
-RANK:China8
-"Майстер-сержант другого класу"
-END
-
-RANK:China9
-"Майстер-сержант першого класу"
-END
-
-RANK:China10
-"Молодший лейтенант"
-END
-
-RANK:China11
-"Лейтенант"
-END
-
-RANK:China12
-"Капітан"
-END
-
-RANK:China13
-"Майор"
-END
-
-RANK:China14
-"Підполковник"
-END
-
-RANK:China15
-"Полковник"
-END
-
-RANK:China16
-"Старший полковник"
-END
-
-RANK:China17
-"Генерал-майор"
-END
-
-RANK:China18
-"Генерал-лейтенант"
-END
-
-RANK:China19
-"Генерал"
-END
-
-RANK:GLA0
-"Без звання"
-END
-
-RANK:GLA1
-"Новобранець"
-END
-
-RANK:GLA2
-"Ополченець"
-END
-
-RANK:GLA3
-"Боєць"
-END
-
-RANK:GLA4
-"Рейдер"
-END
-
-RANK:GLA5
-"Загартований рейдер"
-END
-
-RANK:GLA6
-"Помічник командира загону"
-END
-
-RANK:GLA7
-"Командир загону"
-END
-
-RANK:GLA8
-"Керівник осередку"
-END
-
-RANK:GLA9
-"Старший керівник осередку"
-END
-
-RANK:GLA10
-"Капітан рейдів"
-END
-
-RANK:GLA11
-"Капітан колони"
-END
-
-RANK:GLA12
-"Командувач ударів"
-END
-
-RANK:GLA13
-"Польовий командир"
-END
-
-RANK:GLA14
-"Командир сектору"
-END
-
-RANK:GLA15
-"Воєначальник"
-END
-
-RANK:GLA16
-"Регіональний воєначальник"
-END
-
-RANK:GLA17
-"Верховний воєначальник"
-END
-
-RANK:GLA18
-"Генерал"
-END
-
-RANK:GLA19
-"Великий генерал"
-END
-
-RANK:GLA20
-"Верховний визволитель"
-END
-
-RANK:Turkiye0
-"Без звання"
-END
-
-RANK:Turkiye1
-"Er"
-END
-
-RANK:Turkiye2
-"Onbaşı"
-END
-
-RANK:Turkiye3
-"Çavuş"
-END
-
-RANK:Turkiye4
-"Uzman Çavuş"
-END
-
-RANK:Turkiye5
-"Astsubay Çavuş"
-END
-
-RANK:Turkiye6
-"Astsubay Kıdemli Çavuş"
-END
-
-RANK:Turkiye7
-"Astsubay Üstçavuş"
-END
-
-RANK:Turkiye8
-"Astsubay Kıdemli Üstçavuş"
-END
-
-RANK:Turkiye9
-"Astsubay Başçavuş"
-END
-
-RANK:Turkiye10
-"Astsubay Kıdemli Başçavuş"
-END
-
-RANK:Turkiye11
-"Teğmen"
-END
-
-RANK:Turkiye12
-"Üsteğmen"
-END
-
-RANK:Turkiye13
-"Yüzbaşı"
-END
-
-RANK:Turkiye14
-"Binbaşı"
-END
-
-RANK:Turkiye15
-"Yarbay"
-END
-
-RANK:Turkiye16
-"Albay"
-END
-
-RANK:Turkiye17
-"Tuğgeneral"
-END
-
-RANK:Turkiye18
-"Tümgeneral"
-END
-
-RANK:Turkiye19
-"Korgeneral"
-END
-
-RANK:Turkiye20
-"Orgeneral"
-END
-
-RANK:Turkiye21
-"Mareşal"
-END
-
INI:FactionTurkiye
"Turkiye (експериментально)"
END
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
index cf8b3a201..ec32a75fc 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/GlobalData.h
@@ -44,7 +44,6 @@
#include "Common/GameCommon.h"
#include "Common/Money.h"
#include "Common/WindowMode.h"
-#include "GameClient/RadiusDecal.h"
// FORWARD DECLARATIONS ///////////////////////////////////////////////////////////////////////////
struct FieldParse;
@@ -52,168 +51,11 @@ enum _TerrainLOD : Int;
class GlobalData;
class INI;
class WeaponBonusSet;
-class ThingTemplate;
enum BodyDamageType : Int;
enum AIDebugOptions : Int;
// PUBLIC /////////////////////////////////////////////////////////////////////////////////////////
-/// the sides whose ranks carry their own bonuses (m_veterancyWeaponBonus and the rest)
-enum VeterancySide
-{
- VETERANCY_SIDE_NONE = -1,
- VETERANCY_SIDE_AMERICA,
- VETERANCY_SIDE_CHINA,
- VETERANCY_SIDE_GLA,
- VETERANCY_SIDE_TURKIYE,
-
- VETERANCY_SIDE_COUNT
-};
-
-/// America, China, GLA, Turkiye: the side in each rank insignia's image name and each rank's label
-extern const char *const TheVeterancySideNames[VETERANCY_SIDE_COUNT];
-
-enum { RANK_GRADES_MAX = 32 }; ///< promotions a side's ladder may have; America's 28 is the longest
-
-/// the stats a grade carries, each looked up per grade in RankLadder::m_stat
-enum RankStat
-{
- RANK_STAT_RATE_OF_FIRE,
- RANK_STAT_DAMAGE,
- RANK_STAT_HEALTH,
- RANK_STAT_RANGE,
- RANK_STAT_SPEED,
- RANK_STAT_SELF_REPAIR, ///< share of max health healed a second, not a multiplier
-
- RANK_STAT_COUNT
-};
-
-/** What a grade carries besides its stats, the Perk_<side> lines. A grade holds every perk of the
- * grades below it, and of one kind the strongest, so a later line of the same kind replaces an
- * earlier one by being larger. */
-enum RankPerk
-{
- RANK_PERK_SIGHT, ///< own shroud clearing, a multiplier
- RANK_PERK_STILL_GUARD, ///< share of damage taken away while standing still
- RANK_PERK_MEND, ///< share of max health healed a second once SelfRepairDelay unhurt
- RANK_PERK_SPOTTER, ///< sees as a spotter does (ThingTemplate SpotterSight), and is jammed as one
- RANK_PERK_SCATTER, ///< share of its own weapons' scatter taken away
- RANK_PERK_DEATH_RALLY, ///< on death, allies within its aura radius take this share less damage for RallyTime
- RANK_PERK_DETECT, ///< stealthed enemies within this radius are detected
- 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 SalvageCrate
- RANK_PERK_AURA_RATE_OF_FIRE, ///< the first of the aura perks, in RankAura order
- RANK_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
-{
- RANK_AURA_RATE_OF_FIRE, ///< added to weapon rate of fire, up to RankAuraRateOfFireCap
- RANK_AURA_SIGHT, ///< shroud clearing, 1 + this
- RANK_AURA_GUARD, ///< damage taken, 1 - this
- RANK_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 cost
- RANK_AURA_RALLY, ///< damage taken, 1 - this, until the rally runs out
-
- RANK_AURA_COUNT,
- RANK_AURA_PASSED = RANK_AURA_RALLY ///< the kinds the once-a-second pass writes
-};
-
-extern 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
- * ExperienceValue: the step to grade g costs E x ratio^(g-1), the ratio set so the top grade costs
- * m_top x E. EA's level follows the grade through the pins. Nothing here is saved; the grade is
- * recomputed from the experience whenever it is needed. */
-struct RankLadder
-{
- Int m_grades; ///< promotions; 0 is a side without a ladder, on EA's four levels
- Real m_top; ///< experience to the top grade, in same-class kills (E)
- Int m_pin[LEVEL_COUNT]; ///< the grade each EA level starts on; m_pin[LEVEL_REGULAR] is 0
- Int m_heroStart; ///< the insignia a hero wears at grade 0
- Real m_statTop[RANK_STAT_COUNT]; ///< each stat at the top of the ladder
- Real m_auraRadius; ///< a leader's aura radius before RANK_PERK_AURA_RADIUS
- Real 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 E
- Real m_stat[RANK_GRADES_MAX + 1][RANK_STAT_COUNT]; ///< each stat at grade g
- Real 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 it
-
- void clear();
- /** The ratio from m_grades and m_top, the totals, and the stats: worth (rate of fire times damage
- * times health) is 1 + worthGain x sqrt(experience / top) at each grade's experience, and every
- * stat is its top value raised to ln(worth) / ln(worth at the top), so the split holds all the way up. */
- void finish( Real worthGain );
- Int threshold( Int unitValue, Int grade ) const; ///< experience to hold the grade, rounded once
- Int gradeOf( Int unitValue, Int experience ) const; ///< the highest grade the experience holds
- VeterancyLevel levelOf( Int grade ) const; ///< the EA level whose pin the grade has passed
- /** A gain clipped one point short of the second threshold above the current grade, so one kill
- * lifts one grade at most. Experience past the next-to-last grade is not clipped. */
- Int 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 grades
- Real perk( Int grade, RankPerk perk ) const; ///< what the grade holds of the kind, 0 for nothing
- /// 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 units
- Real 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
-};
-
const Int MAX_GLOBAL_LIGHTS = 3;
//-------------------------------------------------------------------------------------------------
@@ -307,7 +149,6 @@ public:
Int getEffectiveGpuParticleCapacity() const { return (m_gpuParticleCapacityOverride >= 0) ? m_gpuParticleCapacityOverride : m_gpuParticleCapacity; }
static void parseGameDataDefinition( INI* ini );
- static void parseVeterancyDefinition( INI* ini ); ///< the Veterancy block, m_veterancy*
//-----------------------------------------------------------------------------------------------
struct TerrainLighting
@@ -723,28 +564,6 @@ public:
Int m_maxFieldParticleCount; ///< maximum number of field-type particles that can exist (roughly)
WeaponBonusSet* m_weaponBonusSet;
Real m_healthBonus[LEVEL_COUNT]; ///< global bonuses to health for veterancy.
-
- /** The rank ladders, the Veterancy block in BalanceReforged.ini. A unit whose template's Side starts
- * with America, China or GLA (so every general's copy too) climbs its side's ladder, and its stats
- * come from the grade instead of EA's VETERAN, ELITE and HERO lines and HealthBonus_*; Boss and
- * civilian units keep EA's. A side's weapon table holds what the grade does not (China's HORDE)
- * and counts from the Veteran pin on. */
- RankLadder m_rankLadder[VETERANCY_SIDE_COUNT];
- Real m_rankWorthGain; ///< worth at the top of every ladder is 1 + this
- Int m_rankCrateGrades; ///< grades a veterancy crate gives per EA level it would have
- WeaponBonusSet* m_veterancyWeaponBonus[VETERANCY_SIDE_COUNT]; ///< NULL: nothing beyond the grade
- UnsignedInt m_veterancySelfRepairDelay; ///< frames unhurt before self-repair starts
- Real 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 leaves
- UnsignedInt m_rankRallyTime; ///< frames a death rally lasts
- RadiusDecalTemplate m_rankAuraRing[RANK_AURA_COUNT]; ///< the ground ring under every visible leader, one per aura kind (client)
-
- static VeterancySide veterancySideOf( const ThingTemplate *thing );
- const RankLadder *getRankLadder( const ThingTemplate *thing ) const; ///< NULL: the thing's side keeps EA's levels
- const WeaponBonusSet *getVeterancyWeaponBonus( const ThingTemplate *thing, VeterancyLevel level ) const;
- Real getRankStat( const ThingTemplate *thing, Int grade, RankStat stat ) const; ///< the grade's stat, or none without a ladder
- Real getRankHealthBonus( const ThingTemplate *thing, VeterancyLevel level, Int grade ) const; ///< the grade's on a ladder, else HealthBonus_*
Real m_defaultStructureRubbleHeight; ///< for rubbled structures, compress height to this if none specified
AsciiString m_shellMapName; ///< Holds the shell map name
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/Player.h b/GeneralsMD/Code/GameEngine/Include/Common/Player.h
index 1915db1a1..cc7ba539b 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/Player.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/Player.h
@@ -880,7 +880,7 @@ public:
Real getCashBounty() const { return m_cashBountyPercent; }
void setCashBounty(Real percentage) { m_cashBountyPercent = percentage; }
- 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 cost
+ void doBountyForKill(const Object* killer, const Object* victim);
AcademyStats* getAcademyStats() { return &m_academyStats; }
const AcademyStats* getAcademyStats() const { return &m_academyStats; }
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h
index 48b05ae08..ea779e756 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Drawable.h
@@ -942,14 +942,6 @@ private:
//Perhaps we can move this out of Drawable???
public:
static void killStaticImages();
- /// one rank insignia of the thing's side (RankLadder::insigniaIndex), at `scale` times its health bar
- /// size; FALSE when there is none. `centred` puts its middle on `x`.
- static Bool drawRankInsignia( const ThingTemplate *thing, Int insignia, Int x, Int top, Bool centred, Real scale, Color color );
- static const Image *getRankInsignia( const ThingTemplate *thing, Int insignia ); ///< NULL: none drawn
- static const Image *getRankInsignia( const Object *obj ); ///< what obj wears now; NULL at grade 0 and for anything that cannot climb
- /// its health bar size: DisplayHeight high (12 when unset), width following up to 1.5 times the height, all times `scale`
- static void rankInsigniaSize( const Image *image, Real scale, Int *width, Int *height );
-
#ifdef DIRTY_CONDITION_FLAGS
// only for StDrawableDirtyStuffLocker!
static void friend_lockDirtyStuffForIteration();
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Image.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Image.h
index 668851e9e..79e211058 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Image.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Image.h
@@ -92,7 +92,6 @@ public:
UnsignedInt setStatus( UnsignedInt bit ); ///< set status bit
UnsignedInt clearStatus( UnsignedInt bit ); ///< clear status bit
UnsignedInt getStatus( void ) const; ///< get status bits
- Int getDisplayHeight( void ) const { return m_displayHeight; } ///< pixels to draw it high at the reference size, 0 when it fills what it is drawn in
// for parsing from INI
@@ -111,7 +110,6 @@ friend class ImageCollection;
ICoord2D m_imageSize; ///< dimensions of image
void *m_rawTextureData; ///< raw texture data
UnsignedInt m_status; ///< status bits from ImageStatus
- Int m_displayHeight; ///< DisplayHeight: the rank insignia's own size, height kept and width following
static const FieldParse m_imageFieldParseTable[]; ///< the parse table for INI definition
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
index a298707e4..b9b18179e 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
@@ -340,8 +340,6 @@ public:
UnsignedInt m_expireFrame; ///< frame we expire on
WorldAnimationOptions m_options; ///< options
Real m_zRisePerSecond; ///< Z units to rise per second
- const ThingTemplate *m_rankOf; ///< a grade gained: its insignia is drawn instead of the animation, when it has one
- Int m_rankInsignia; ///< the grade gained, as RankLadder::insigniaIndex
};
typedef std::list< WorldAnimationData *> WorldAnimationList;
@@ -1003,7 +1001,6 @@ public: // ********************************************************************
virtual Bool getInputEnabled( void ) { LOGIC_CENSUS( CENSUS_CLIENT_READ ); return m_inputEnabled; } ///< Get the current input status
virtual void disregardDrawable( Drawable *draw ); ///< Drawable is being destroyed, clean up any UI elements associated with it
- void noteRankChanged( ObjectID id ); ///< after the tick that moved its grade: it may lead now (updateAuraRings)
virtual void preDraw( void ); ///< Logic which needs to occur before the UI renders
virtual void draw( void ) = 0; ///< Render the in-game user interface
@@ -1217,9 +1214,7 @@ public:
const Coord3D *pos,
WorldAnimationOptions options,
Real durationInSeconds,
- Real zRisePerSecond,
- const ThingTemplate *rankOf = NULL,
- Int rankInsignia = 0 );
+ Real zRisePerSecond );
#if defined(_DEBUG) || defined(_INTERNAL)
virtual void DEBUG_addFloatingText(const AsciiString& text,const Coord3D * pos, Color color);
@@ -1272,7 +1267,6 @@ protected:
void destroyPlacementIcons( void ); ///< Destroy placement icons
void handleBuildPlacements( void ); ///< handle updating of placement icons based on mouse pos
void handleRadiusCursor(); ///< handle updating of "radius cursors" that follow the mouse pos
- void updateAuraRings(); ///< the ground ring of each aura every visible leader gives
/// frozen time runs the scripts with no new logic frame, so an overlay laid once a frame is laid every pass
Bool isTimeFrozenWithoutTick( void ) const;
@@ -1564,21 +1558,6 @@ protected:
RadiusDecal m_curRadiusCursorCentre; ///< the guard marker's shield, apart from its ring so it never stretches
RadiusCursorType m_curRcType;
- enum { AURA_RING_MAX = 256 }; // ponytail: past this many rings on the map the rest go undrawn; the slot match is n squared
- struct AuraRing
- {
- ObjectID id; ///< INVALID_ID: a free slot
- Int kind; ///< RankAura
- Real radius; ///< as drawn
- RadiusDecal decal;
- };
- AuraRing m_auraRings[AURA_RING_MAX];
- UnsignedInt m_auraRingsFrame = ~0u; ///< the logic frame the rings were last laid for
- const Player *m_auraRingsPlayer = NULL; ///< and the local player they were laid for
- Int m_auraRingsShroudIndex = -1; ///< and the player whose fog the screen showed
- std::vector<ObjectID> m_auraLeaders; ///< everything that gave an aura at its grade when last looked at
- Bool m_auraLeadersFound = FALSE; ///< m_auraLeaders came from a walk over every drawable
-
//Floating Text Data
FloatingTextList m_floatingTextList; ///< Our list of floating text
UnsignedInt m_floatingTextTimeOut; ///< Ini value of our floating text timeout
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h b/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h
index b7dcaa50b..82e4a5ded 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/RadiusDecal.h
@@ -107,12 +107,6 @@ private:
UnsignedInt m_opacityThrobTime;
Color m_color;
Bool m_onlyVisibleToOwningPlayer;
- Int m_spinTime; ///< milliseconds a turn takes, below 0 the other way; 0 stands still
- Real m_lightReference; ///< flat-ground light at which the opacity is as written; 0 leaves it unscaled
- Real m_lightScaleMin; ///< the opacity scale never falls below this (dark maps)
- Real m_lightScaleMax; ///< nor rises above this (bright maps)
-
- Real lightScale() const;
public:
RadiusDecalTemplate();
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h b/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h
index 590c9eb87..1ca382eed 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/Shadow.h
@@ -179,8 +179,8 @@ inline void Shadow::setOpacity(Int value)
{
Real fvalue=(Real)m_opacity/255.0f;
m_diffuse=REAL_TO_INT(((Real)(m_color & 0xff) * fvalue))
- |(REAL_TO_INT(((Real)((m_color >> 8) & 0xff) * fvalue)) << 8)
- |(REAL_TO_INT(((Real)((m_color >> 16) & 0xff) * fvalue)) << 16);
+ |REAL_TO_INT(((Real)((m_color >> 8) & 0xff) * fvalue))
+ |REAL_TO_INT(((Real)((m_color >> 16) & 0xff) * fvalue));
}
}
}
@@ -199,8 +199,8 @@ inline void Shadow::setColor(Color value)
{
Real fvalue=(Real)m_opacity/255.0f;
m_diffuse=REAL_TO_INT(((Real)(m_color & 0xff) * fvalue))
- |(REAL_TO_INT(((Real)((m_color >> 8) & 0xff) * fvalue)) << 8)
- |(REAL_TO_INT(((Real)((m_color >> 16) & 0xff) * fvalue)) << 16);
+ |REAL_TO_INT(((Real)((m_color >> 8) & 0xff) * fvalue))
+ |REAL_TO_INT(((Real)((m_color >> 16) & 0xff) * fvalue));
}
}
}
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ExperienceTracker.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ExperienceTracker.h
index e27f141d8..21470750c 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ExperienceTracker.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ExperienceTracker.h
@@ -85,7 +85,6 @@ public:
ExperienceTracker(Object *parent);
VeterancyLevel getVeterancyLevel() const { return m_currentLevel; } ///< What level am I?
- Int getGrade() const { return m_currentGrade; } ///< my grade on my side's rank ladder; 0 without one
Int getExperienceValue( const Object* killer ) const; ///< How much do give for being killed
Int getCurrentExperience( void ) const { return m_currentExperience; }; ///< How much experience do I have at the moment?
Bool isTrainable() const; ///< Can I gain experience?
@@ -94,12 +93,8 @@ public:
void setVeterancyLevel( VeterancyLevel newLevel, Bool provideFeedback = TRUE ); ///< Set Level to this
void setMinVeterancyLevel( VeterancyLevel newLevel ); ///< Set Level to AT LEAST this... if we are already >= this level, do nothing.
void addExperiencePoints( Int experienceGain, Bool canScaleForBonus = TRUE ); ///< Gain this many exp.
- /** Gain enough exp to gain a level. return false if can't gain a level. On a rank ladder a crate
- * gives CrateGrades grades a level, up to the Heroic pin, and byLevel (a pilot's own levels) lands
- * on the pin of the summed level. */
- Bool gainExpForLevel(Int levelsToGain, Bool canScaleForBonus = TRUE, Bool byLevel = FALSE );
+ Bool gainExpForLevel(Int levelsToGain, Bool canScaleForBonus = TRUE ); ///< Gain enough exp to gain a level. return false if can't gain a level.
Bool canGainExpForLevel(Int levelsToGain) const; ///< return same value as gainExpForLevel, but don't change anything
- void gainGrades( Int grades ); ///< on a rank ladder, this many grades up, never past the Heroic pin; nothing without one
void setExperienceAndLevel(Int experienceIn, Bool provideFeedback = TRUE );
void setExperienceSink( ObjectID sink ); ///< My experience actually goes to this person (loose couple)
@@ -117,14 +112,8 @@ public:
void loadPostProcess( void );
private:
- /** Set the experience, derive the grade and level from it (the ladder's, or EA's thresholds), and
- * tell the object when either moved. Nothing clips here; addExperiencePoints does. */
- void applyExperience( Int experience, Bool provideFeedback );
- void recomputeRank(); ///< m_currentGrade and m_currentLevel from m_currentExperience
-
Object* m_parent; ///< Object I am owned by
VeterancyLevel m_currentLevel; ///< Level of experience
- Int m_currentGrade; ///< grade on the side's rank ladder, from m_currentExperience; not saved
Int m_currentExperience; ///< Number of experience points
ObjectID m_experienceSink; ///< ID of object I have pledged my experience point gains to
Real m_experienceScalar; ///< Scales any experience gained by this multiplier.
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
index b61c80d4e..c9d06d709 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Locomotor.h
@@ -361,8 +361,6 @@ public:
DEBUG_ASSERTCRASH(!(speed <= 0.0f && m_template->m_appearance == LOCO_THRUST), ("THRUST locos may not have zero speeds!\n"));
m_maxSpeed = speed;
}
- /// the owner's rank bonus on the template's speed (GLA veterans), applied before the setMaxSpeed cap
- inline void setSpeedFactor(Real factor) { m_speedFactor = factor; }
inline void setMaxAcceleration(Real accel) { m_maxAccel = accel; }
inline void setMaxBraking(Real braking) { m_maxBraking = braking; }
inline void setMaxTurnRate(Real turn) { m_maxTurnRate = turn; }
@@ -530,7 +528,6 @@ private:
Real m_brakingFactor;
Real m_maxLift;
Real m_maxSpeed;
- Real m_speedFactor;
Real m_speedScale; ///< multiplies the template's speeds; 1 unless the owner's template sets SpeedScale
Real m_maxAccel;
Real m_maxBraking;
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h
index 4c15ee841..986724246 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/LocomotorSet.h
@@ -106,8 +106,6 @@ public:
Locomotor* findLocomotor(LocomotorSurfaceTypeMask t);
- void setSpeedFactor(Real factor); ///< Locomotor::setSpeedFactor on each
-
void xferSelfAndCurLocoPtr(Xfer *xfer, Locomotor** loco);
inline LocomotorSurfaceTypeMask getValidSurfaces() const { return m_validLocomotorSurfaces; }
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h
index 1a10576b1..c0d850f14 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/AIUpdate.h
@@ -595,7 +595,6 @@ public:
inline Real getPathExtraDistance() const { return m_pathExtraDistance; }
virtual Bool chooseLocomotorSet(LocomotorSetType wst);
- void refreshVeterancySpeed(); ///< the rank's speed bonus and pace aura onto every locomotor in the set
virtual 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.h
index 9a9e47471..499218018 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/SpecialAbilityUpdate.h
@@ -249,7 +249,6 @@ 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 aura
Bool 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/Module/VeterancyGainCreate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/VeterancyGainCreate.h
index 977216b5c..170600bfb 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/VeterancyGainCreate.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/VeterancyGainCreate.h
@@ -46,7 +46,6 @@ class VeterancyGainCreateModuleData : public CreateModuleData
public:
VeterancyLevel m_startingLevel; ///< Level to set Object at
ScienceType m_scienceRequired; ///< The science you must have to trigger this
- Int m_startingGrades; ///< on a rank ladder, grades given in place of StartingLevel; 0 lands on the level's pin
VeterancyGainCreateModuleData();
static void buildFieldParse(MultiIniFieldParse& p);
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h
index 4b9393b46..57a3d116f 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h
@@ -39,7 +39,6 @@
#include "Common/Snapshot.h"
#include "Common/SpecialPowerMaskType.h"
#include "Common/DisabledTypes.h"
-#include "Common/GlobalData.h" // RankPerk, RankAura
#include "Common/Thing.h"
#include "Common/ObjectStatusTypes.h"
#include "Common/Upgrade.h"
@@ -289,29 +288,11 @@ public:
void scoreTheKill( const Object *victim ); ///< I just killed this object.
void scoreTheHeal( const Object *patient, Real restored, Real maxHealth ); ///< I just put restored health back on this object
- /// my experience moved my grade or my level: max health follows the grade, then the level's own work
- void onRankChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Int oldGrade, Int newGrade, Bool provideFeedback );
- void floatRankGain( Int insignia ); ///< the promotion floating up: the ladder's insignia, or EA's chevrons for -1
void onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback = TRUE ); ///< I just achieved this level right this moment
ExperienceTracker* getExperienceTracker() {return m_experienceTracker;}
const ExperienceTracker* getExperienceTracker() const {return m_experienceTracker;}
VeterancyLevel getVeterancyLevel() const;
- Int getRankGrade() const; ///< my grade on my side's rank ladder; 0 without one
-
- // the ladder's perks and the auras leaders give (RankPerk, RankAura in GlobalData.h)
- Real getRankPerk( RankPerk perk ) const; ///< what my grade carries, 0 without a ladder
- Real getRankAura( RankAura aura ) const; ///< the strongest leader's on me now
- void takeGatheredRankAuras(); ///< my turn this second: what leaders gave me since my last turn is what I hold; RALLY runs on
- void raiseRankAura( RankAura aura, Real strength ); ///< a leader had me in range on its turn; the stronger stays until my next turn
- void raiseRankRally( Real strength, UnsignedInt until ); ///< a fallen leader's rally; the stronger stays, the later end
- Real getRankSightScalar() const; ///< my own sight perk times the sight aura on me
- Real getRankDamageTakenScalar() const; ///< guard, rally and the still guard perk, multiplied
- Bool isSpotter() const; ///< SpotterSight on the template, or the SPOTTER perk
- Bool leadsRankAuras() const; ///< FALSE for a hacker: its grade's AURA_ lines give nothing
- void onRankSightChanged( Real oldScalar ); ///< look again if the rank sight moved
- void giveRankRally(); ///< I fell: my death rally reaches the allies around me
- void dropRankSalvage(); ///< I fell: my SALVAGE_CRATE perk leaves a crate where I lay
- void forgoRankRally() { m_forgoRankRally = TRUE; } ///< about to be killed inside a container that let go of me first
+ Bool isSpotter() const; ///< SpotterSight on the template
inline const AsciiString& getName() const { return m_name; }
inline void setName( const AsciiString& newName ) { m_name = newName; }
@@ -816,10 +797,6 @@ private:
Real m_shroudClearingRange; ///< looking range for shroud ONLY
Real m_shroudRange; ///< like looking range, this is how far I shroud others' looks
Int m_sightJammerCount; ///< enemy jammers in whose field this stands; above zero its sight shrinks to a few feet
- Real m_rankAura[ RANK_AURA_COUNT ]; ///< the strongest leader's of each kind, refilled on my turn once a second
- Real m_rankAuraGathered[ RANK_AURA_PASSED ]; ///< what the leaders' turns have given me since my last turn
- UnsignedInt m_rankRallyUntil; ///< the frame the death rally on me ends
- Bool m_forgoRankRally; ///< set and read within one kill, so not saved
DisabledMaskType m_disabledMask;
UnsignedInt m_disabledTillFrame[ DISABLED_COUNT ];
diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h
index e0a0e8864..28cd65525 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/ScenarioDrill.h
@@ -94,7 +94,6 @@ enum ScenarioActionType
SCENARIO_ACTION_RESPOND, ///< respond <slot> <selector> <position>; from now, how long each unit takes to point its gun at the position, fire with it pointed there, and get closer to it
SCENARIO_ACTION_GUARD, ///< guard <slot> <selector> <targetSlot> <targetSelector>; a guard order on one object, as a script gives it
SCENARIO_ACTION_REPEAT, ///< repeat <slot> <building> <template> on|off; the Ctrl+Alt build key, as MSG_SET_REPEAT_UNIT onto the message stream
- SCENARIO_ACTION_RANK, ///< rank <slot> <selector> veteran|elite|heroic|xp N|grade N; a level as the rank cheat sets it (a ladder's pin), N same-class kills of experience, or a ladder grade
SCENARIO_ACTION_GIVEMONEY, ///< givemoney <slot> <targetSlot> <amount>; the Tab screen's Send, as MSG_TRANSFER_MONEY onto the message stream
SCENARIO_ACTION_CLICKSTOP, ///< clickstop <slot> <selector>; the Stop key, the group idle MSG_DO_STOP gives (CMD_FROM_PLAYER)
SCENARIO_ACTION_REACHPROOF, ///< reachproof <slot> <selector> <targetSlot> <probe> [samples]; every matching defence's reach overlay against the logic, the probe stood on each sample point (ReachOverlay_prove)
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
index f40dfc48e..279dfe68e 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/GlobalData.cpp
@@ -53,7 +53,6 @@
#include "Common/Monitors.h"
#include "Common/OptionsCatalog.h"
#include "Common/Registry.h"
-#include "Common/ThingTemplate.h"
#include "Common/UserPreferences.h"
#include "Common/version.h"
@@ -85,345 +84,6 @@ static void parseIgnoredField( INI *, void *, void *, const void * )
// millions of cells on a large map, a huge one leaves the whole map in a handful of cells.
static const INI::RealRange PARTITION_CELL_SIZE_RANGE = { 20.0f, 400.0f };
-// A side's weapon table exists from its first line on, so a side BalanceReforged.ini never names
-// keeps a NULL table and the global WeaponBonus lines.
-static void parseVeterancyWeaponBonus( INI *ini, void *, void *store, const void * )
-{
- WeaponBonusSet **table = (WeaponBonusSet **)store;
- if( *table == NULL )
- *table = newInstance( WeaponBonusSet );
- (*table)->parseWeaponBonusSet( ini );
-}
-
-const char *const TheVeterancySideNames[VETERANCY_SIDE_COUNT] = { "America", "China", "GLA", "Turkiye" };
-
-// A ladder line holds one value per side, America, China, GLA and Turkiye, written into the same RankLadder
-// member of each; the member's offset rides in userData and store is m_rankLadder.
-static void parseLadderInts( INI *ini, void *, void *store, const void *member )
-{
- for( Int side = 0; side < VETERANCY_SIDE_COUNT; ++side )
- *(Int *)( (char *)( (RankLadder *)store + side ) + (size_t)member ) = INI::scanInt( ini->getNextToken() );
-}
-
-static void parseLadderReals( INI *ini, void *, void *store, const void *member )
-{
- for( Int side = 0; side < VETERANCY_SIDE_COUNT; ++side )
- *(Real *)( (char *)( (RankLadder *)store + side ) + (size_t)member ) = INI::scanReal( ini->getNextToken() );
-}
-
-static void parseLadderPercents( INI *ini, void *, void *store, const void *member )
-{
- for( Int side = 0; side < VETERANCY_SIDE_COUNT; ++side )
- *(Real *)( (char *)( (RankLadder *)store + side ) + (size_t)member ) = INI::scanPercentToReal( ini->getNextToken() );
-}
-
-const char *const TheRankPerkNames[RANK_PERK_COUNT + 1] =
-{
- "SIGHT", "STILL_GUARD", "MEND", "SPOTTER", "SCATTER", "DEATH_RALLY", "DETECT", "AURA_RADIUS",
- "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", "Mend", "Pace", "Drill", "Steady", "Capture", "Spoils", "Rally"
-};
-
-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 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 ) \
- { token, parser, (const void *)offsetof( RankLadder, member ), offsetof( GlobalData, m_rankLadder ) }
-
-/** The Veterancy block, BalanceReforged.ini's: its own keyword rather than a second GameData block,
- * because parseGameDataDefinition also re-reads Options.ini, which would overrule the command line. */
-static const FieldParse theVeterancyFieldParseTable[] =
-{
- LADDER_FIELD( "Grades", parseLadderInts, m_grades ),
- LADDER_FIELD( "Top", parseLadderReals, m_top ),
- LADDER_FIELD( "VeteranPin", parseLadderInts, m_pin[LEVEL_VETERAN] ),
- LADDER_FIELD( "ElitePin", parseLadderInts, m_pin[LEVEL_ELITE] ),
- LADDER_FIELD( "HeroicPin", parseLadderInts, m_pin[LEVEL_HEROIC] ),
- LADDER_FIELD( "HeroStart", parseLadderInts, m_heroStart ),
- LADDER_FIELD( "RateOfFire", parseLadderPercents, m_statTop[RANK_STAT_RATE_OF_FIRE] ),
- LADDER_FIELD( "Damage", parseLadderPercents, m_statTop[RANK_STAT_DAMAGE] ),
- LADDER_FIELD( "Health", parseLadderPercents, m_statTop[RANK_STAT_HEALTH] ),
- LADDER_FIELD( "Range", parseLadderPercents, m_statTop[RANK_STAT_RANGE] ),
- LADDER_FIELD( "Speed", parseLadderPercents, m_statTop[RANK_STAT_SPEED] ),
- LADDER_FIELD( "SelfRepair", parseLadderPercents, m_statTop[RANK_STAT_SELF_REPAIR] ),
- LADDER_FIELD( "AuraRadius", parseLadderReals, m_auraRadius ),
- { "Perk_America", parseLadderPerk, (const void *)VETERANCY_SIDE_AMERICA, offsetof( GlobalData, m_rankLadder ) },
- { "Perk_China", parseLadderPerk, (const void *)VETERANCY_SIDE_CHINA, offsetof( GlobalData, m_rankLadder ) },
- { "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] ) },
- { "WeaponBonus_China", parseVeterancyWeaponBonus, NULL, offsetof( GlobalData, m_veterancyWeaponBonus[VETERANCY_SIDE_CHINA] ) },
- { "WeaponBonus_GLA", parseVeterancyWeaponBonus, NULL, offsetof( GlobalData, m_veterancyWeaponBonus[VETERANCY_SIDE_GLA] ) },
- { "SelfRepairDelay", INI::parseDurationUnsignedInt, NULL, offsetof( GlobalData, m_veterancySelfRepairDelay ) },
- { NULL, NULL, NULL, 0 }
-};
-
-#undef LADDER_FIELD
-
-/*static*/ void GlobalData::parseVeterancyDefinition( INI *ini )
-{
- ini->initFromINI( TheWritableGlobalData, theVeterancyFieldParseTable );
- for( Int side = 0; side < VETERANCY_SIDE_COUNT; ++side )
- {
- RankLadder &ladder = TheWritableGlobalData->m_rankLadder[ side ];
- if( ladder.m_grades > 0
- && ( ladder.m_grades > RANK_GRADES_MAX || ladder.m_pin[LEVEL_HEROIC] > ladder.m_grades || ladder.m_top < ladder.m_grades
- || ladder.m_pin[LEVEL_VETERAN] <= 0 || ladder.m_pin[LEVEL_VETERAN] >= ladder.m_pin[LEVEL_ELITE]
- || ladder.m_pin[LEVEL_ELITE] >= ladder.m_pin[LEVEL_HEROIC] || ladder.m_heroStart > ladder.m_grades ) )
- throw INI_INVALID_DATA;
- ladder.finish( TheWritableGlobalData->m_rankWorthGain );
- }
-}
-
-//-------------------------------------------------------------------------------------------------
-void RankLadder::clear()
-{
- m_grades = 0;
- m_top = 0.0f;
- for( Int level = 0; level < LEVEL_COUNT; ++level )
- m_pin[ level ] = level;
- m_heroStart = 0;
- m_ratio = 1.0f;
- for( Int stat = 0; stat < RANK_STAT_COUNT; ++stat )
- m_statTop[ stat ] = stat == RANK_STAT_SELF_REPAIR ? 0.0f : 1.0f;
- m_auraRadius = 0.0f;
- for( Int grade = 0; grade <= RANK_GRADES_MAX; ++grade )
- {
- m_total[ grade ] = (Real)grade;
- 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
-// + - * /, which are exact everywhere: ln by halving into [1, 2) and the atanh series, e by
-// Taylor's series on what is left over a whole number of ln 2.
-//-------------------------------------------------------------------------------------------------
-static const double RANK_LN2 = 0.69314718055994530942;
-
-static double rankLn( double x )
-{
- Int twos = 0;
- while( x >= 2.0 ) { x *= 0.5; ++twos; }
- while( x < 1.0 ) { x *= 2.0; --twos; }
- const double y = ( x - 1.0 ) / ( x + 1.0 ), y2 = y * y;
- double term = y, sum = 0.0;
- for( Int odd = 1; odd < 61; odd += 2, term *= y2 )
- sum += term / odd;
- return 2.0 * sum + twos * RANK_LN2;
-}
-
-static double rankExp( double x )
-{
- const Int twos = (Int)( x / RANK_LN2 );
- const double rest = x - twos * RANK_LN2;
- double term = 1.0, sum = 1.0;
- for( Int n = 1; n < 30; ++n )
- {
- term *= rest / n;
- sum += term;
- }
- for( Int i = 0; i < twos; ++i ) sum *= 2.0;
- for( Int i = 0; i > twos; --i ) sum *= 0.5;
- return sum;
-}
-
-//-------------------------------------------------------------------------------------------------
-// The ratio by halving, multiplication only, so every machine finds the same one.
-//-------------------------------------------------------------------------------------------------
-void RankLadder::finish( Real worthGain )
-{
- if( m_grades <= 0 )
- return;
-
- Real low = 1.0f, high = 2.0f;
- for( Int pass = 0; pass < 60; ++pass )
- {
- const Real ratio = ( low + high ) * 0.5f;
- Real sum = 0.0f, step = 1.0f;
- for( Int grade = 0; grade < m_grades; ++grade, step *= ratio )
- sum += step;
- ( sum < m_top ? low : high ) = ratio;
- }
- m_ratio = ( low + high ) * 0.5f;
-
- Real step = 1.0f;
- m_total[ 0 ] = 0.0f;
- for( Int grade = 1; grade <= RANK_GRADES_MAX; ++grade, step *= m_ratio )
- m_total[ grade ] = m_total[ grade - 1 ] + step;
-
- const Real topWorth = 1.0f + worthGain;
- for( Int grade = 0; grade <= RANK_GRADES_MAX; ++grade )
- {
- const Real held = MIN( m_total[ grade ], m_top );
- const double share = rankLn( 1.0 + worthGain * sqrt( (double)held / m_top ) ) / rankLn( (double)topWorth );
- 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 )
- {
- 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 );
- }
- }
-}
-
-//-------------------------------------------------------------------------------------------------
-Int RankLadder::threshold( Int unitValue, Int grade ) const
-{
- return REAL_TO_INT_FLOOR( unitValue * m_total[ MIN( grade, m_grades ) ] + 0.5f );
-}
-
-//-------------------------------------------------------------------------------------------------
-Int RankLadder::gradeOf( Int unitValue, Int experience ) const
-{
- Int grade = 0;
- while( grade < m_grades && experience >= threshold( unitValue, grade + 1 ) )
- ++grade;
- return grade;
-}
-
-//-------------------------------------------------------------------------------------------------
-VeterancyLevel RankLadder::levelOf( Int grade ) const
-{
- Int level = LEVEL_REGULAR;
- while( level < LEVEL_LAST && grade >= m_pin[ level + 1 ] )
- ++level;
- return (VeterancyLevel)level;
-}
-
-//-------------------------------------------------------------------------------------------------
-Int RankLadder::clipGain( Int unitValue, Int experience, Int gain ) const
-{
- const Int grade = gradeOf( unitValue, experience );
- if( grade + 2 > m_grades )
- return gain;
- return MIN( gain, MAX( 0, threshold( unitValue, grade + 2 ) - 1 - experience ) );
-}
-
-//-------------------------------------------------------------------------------------------------
-Int RankLadder::insigniaIndex( Int grade, Bool hero ) const
-{
- if( !hero )
- return grade;
- return m_heroStart + ( m_grades - m_heroStart ) * grade / m_grades;
-}
-
-//-------------------------------------------------------------------------------------------------
-Real RankLadder::perk( Int grade, RankPerk perk ) const
-{
- return m_perk[ MIN( grade, MAX( m_grades, 0 ) ) ][ perk ];
-}
-
-//-------------------------------------------------------------------------------------------------
-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_reach[ MIN( grade, MAX( m_grades, 0 ) ) ][ auraPerk( aura ) ];
-}
-
-//-------------------------------------------------------------------------------------------------
-Real RankLadder::aura( Int grade, RankAura aura ) const
-{
- 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;
-}
-
-//-------------------------------------------------------------------------------------------------
-/*static*/ Int RankLadder::unitValue( const ThingTemplate *thing )
-{
- Int value = thing->getExperienceValue( LEVEL_REGULAR );
- if( value <= 0 )
- value = thing->getExperienceRequired( LEVEL_VETERAN ) / 2;
- return MAX( value, 1 );
-}
-
///////////////////////////////////////////////////////////////////////////////////////////////////
// PRIVATE DATA ///////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1505,18 +1165,6 @@ GlobalData::GlobalData()
m_defaultStructureRubbleHeight = 1.0f;
m_weaponBonusSet = newInstance(WeaponBonusSet);
- for (i = 0; i < VETERANCY_SIDE_COUNT; ++i)
- {
- m_veterancyWeaponBonus[i] = NULL;
- m_rankLadder[i].clear();
- }
- m_rankWorthGain = 1.4f;
- m_rankCrateGrades = 3;
- m_veterancySelfRepairDelay = 0;
- m_rankAuraRateOfFireCap = 0.0f;
- m_rankDrillRate = 0.0f;
- m_rankRallyTime = 0;
-
m_shellMapName.set("Maps\\ShellMap1\\ShellMap1.map");
m_shellMapOn =TRUE;
m_playIntro = TRUE;
@@ -1658,12 +1306,6 @@ GlobalData::~GlobalData( void )
if (m_weaponBonusSet)
m_weaponBonusSet->deleteInstance();
- // a map's override is a memberwise copy sharing the original's side tables, so only the original
- // owns them
- for (Int side = 0; side < VETERANCY_SIDE_COUNT && m_theOriginal == this; ++side)
- if (m_veterancyWeaponBonus[side])
- m_veterancyWeaponBonus[side]->deleteInstance();
-
if( m_theOriginal == this ) {
m_theOriginal = NULL;
TheWritableGlobalData = NULL;
@@ -1671,57 +1313,6 @@ GlobalData::~GlobalData( void )
} // end ~GlobalData
-//-------------------------------------------------------------------------------------------------
-/** The side a unit's rank belongs to: its template's Side, so a general's copy (ChinaTankGeneral) is
- * China and a captured tank keeps the bonuses of the army that trained it. */
-//-------------------------------------------------------------------------------------------------
-/*static*/ VeterancySide GlobalData::veterancySideOf( const ThingTemplate *thing )
-{
- const AsciiString &side = thing->getDefaultOwningSide();
- if( side.startsWith( "America" ) )
- return VETERANCY_SIDE_AMERICA;
- if( side.startsWith( "China" ) )
- return VETERANCY_SIDE_CHINA;
- if( side.startsWith( "GLA" ) )
- return VETERANCY_SIDE_GLA;
- if( side.startsWith( "Turkiye" ) )
- return VETERANCY_SIDE_TURKIYE;
- return VETERANCY_SIDE_NONE;
-}
-
-//-------------------------------------------------------------------------------------------------
-const WeaponBonusSet *GlobalData::getVeterancyWeaponBonus( const ThingTemplate *thing, VeterancyLevel level ) const
-{
- if( level == LEVEL_REGULAR )
- return NULL;
- const VeterancySide side = veterancySideOf( thing );
- return side == VETERANCY_SIDE_NONE ? NULL : m_veterancyWeaponBonus[ side ];
-}
-
-//-------------------------------------------------------------------------------------------------
-const RankLadder *GlobalData::getRankLadder( const ThingTemplate *thing ) const
-{
- const VeterancySide side = veterancySideOf( thing );
- return side == VETERANCY_SIDE_NONE || m_rankLadder[ side ].m_grades <= 0 ? NULL : &m_rankLadder[ side ];
-}
-
-//-------------------------------------------------------------------------------------------------
-Real GlobalData::getRankStat( const ThingTemplate *thing, Int grade, RankStat stat ) const
-{
- const RankLadder *ladder = getRankLadder( thing );
- if( ladder )
- return ladder->m_stat[ MIN( grade, ladder->m_grades ) ][ stat ];
- return stat == RANK_STAT_SELF_REPAIR ? 0.0f : 1.0f;
-}
-
-//-------------------------------------------------------------------------------------------------
-Real GlobalData::getRankHealthBonus( const ThingTemplate *thing, VeterancyLevel level, Int grade ) const
-{
- const RankLadder *ladder = getRankLadder( thing );
- return ladder ? getRankStat( thing, grade, RANK_STAT_HEALTH ) * ( 1.0f + ladder->perk( grade, RANK_PERK_HEALTH ) )
- : m_healthBonus[ level ];
-}
-
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
Bool GlobalData::setTimeOfDay( TimeOfDay tod )
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp b/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp
index 3ba5018d2..2913c57d3 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/INI/INI.cpp
@@ -139,7 +139,6 @@ static const BlockParse theTypeTable[] =
{ "ShellMenuScheme", INI::parseShellMenuSchemeDefinition },
{ "Terrain", INI::parseTerrainDefinition },
{ "Upgrade", INI::parseUpgradeDefinition },
- { "Veterancy", GlobalData::parseVeterancyDefinition },
{ "Video", INI::parseVideoDefinition },
{ "WaterSet", INI::parseWaterSettingDefinition },
{ "WaterTransparency", INI::parseWaterTransparencyDefinition},
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
index 072e61aba..b97950c26 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/RTS/Player.cpp
@@ -2759,7 +2759,7 @@ Bool Player::calcClosestConstructionZoneLocation( const ThingTemplate *construct
}
//=============================================================================
-void Player::doBountyForKill(const Object* killer, const Object* victim, Real rankShare)
+void Player::doBountyForKill(const Object* killer, const Object* victim)
{
if (!killer || !victim)
return;
@@ -2772,7 +2772,7 @@ void Player::doBountyForKill(const Object* killer, const Object* victim, Real ra
// 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 + rankShare)) - WWMATH_EPSILON);
+ Int bounty = REAL_TO_INT_CEIL((costToBuild * m_cashBountyPercent) - WWMATH_EPSILON);
if( bounty )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
index 5d202ef79..0d525a3ea 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp
@@ -309,15 +309,6 @@ const Int MAX_ENABLED_MODULES = 16;
/*static*/ Int Drawable::s_modelLockCount = 0;
#endif
-/// Each ladder grade's insignia, Rank<Side>_<n> in ReforgedRanks<Side>.ini; NULL for a grade drawn bare
-/// (America's E-1)
-static const Image* s_rankInsignia[VETERANCY_SIDE_COUNT][RANK_GRADES_MAX + 1];
-
-/// An insignia drawn beside a health bar holds its DisplayHeight (12 unless its cell says otherwise)
-/// and lets its width follow, up to half again that height: wider marks made the bar look heavy
-static const Int RANK_INSIGNIA_DEFAULT_HEIGHT = 12;
-static const Real RANK_INSIGNIA_MAX_ASPECT = 1.5f;
-
// ------------------------------------------------------------------------------------------------
/*static*/ void Drawable::initStaticImages()
{
@@ -328,15 +319,6 @@ static const Real RANK_INSIGNIA_MAX_ASPECT = 1.5f;
s_veterancyImage[1] = TheMappedImageCollection->findImageByName("SCVeter1");
s_veterancyImage[2] = TheMappedImageCollection->findImageByName("SCVeter2");
s_veterancyImage[3] = TheMappedImageCollection->findImageByName("SCVeter3");
- for( Int side = 0; side < VETERANCY_SIDE_COUNT; ++side )
- {
- for( Int insignia = 0; insignia <= RANK_GRADES_MAX; ++insignia )
- {
- AsciiString name;
- name.format( "Rank%s_%d", TheVeterancySideNames[ side ], insignia );
- s_rankInsignia[ side ][ insignia ] = TheMappedImageCollection->findImageByName( name );
- }
- }
s_fullAmmo = TheMappedImageCollection->findImageByName("SCPAmmoFull");
s_emptyAmmo = TheMappedImageCollection->findImageByName("SCPAmmoEmpty");
@@ -4803,11 +4785,8 @@ void Drawable::drawVeterancy( const IRegion2D *healthBarRegion )
return;
}
- // a unit on a rank ladder wears its grade's insignia, a grade with no insignia nothing; anyone else
- // EA's chevron for the level
- const RankLadder *ladder = TheGlobalData->getRankLadder( obj->getTemplate() );
VeterancyLevel level = obj->getVeterancyLevel();
- const Image* image = ( ladder && !TheGlobalData->m_classicGraphics ) ? getRankInsignia( obj ) : s_veterancyImage[level];
+ const Image* image = s_veterancyImage[level];
if (!image)
return;
@@ -4839,86 +4818,11 @@ void Drawable::drawVeterancy( const IRegion2D *healthBarRegion )
screenCenter.x += healthBoxWidth * scale * 0.5f;
- // the insignia in line with the bar, just past its right end and centred on it: the ammo and
- // passenger pips start from the left end, and hanging under the bar it read as part of the unit
- if( ladder && !TheGlobalData->m_classicGraphics )
- {
- Int left = screenCenter.x + 2;
- Int middle = screenCenter.y;
- if( healthBarRegion )
- {
- left = healthBarRegion->hi.x + 2;
- middle = ( healthBarRegion->lo.y + healthBarRegion->hi.y ) / 2;
- }
- // image is the grade's insignia already (getRankInsignia), so it is drawn as drawRankInsignia would
- Int width, height;
- rankInsigniaSize( image, 1.0f, &width, &height );
- const Int top = middle - height / 2;
- TheDisplay->drawImage( image, left, top, left + width, top + height, GameMakeColor( 255, 255, 255, 255 ) );
- return;
- }
-
// draw the image
TheDisplay->drawImage(image, screenCenter.x + 1, screenCenter.y + 1, screenCenter.x + 1 + vetBoxWidth, screenCenter.y + 1 + vetBoxHeight);
} // end drawVeterancy
-// ------------------------------------------------------------------------------------------------
-/*static*/ const Image *Drawable::getRankInsignia( const ThingTemplate *thing, Int insignia )
-{
- const VeterancySide side = GlobalData::veterancySideOf( thing );
- if( side == VETERANCY_SIDE_NONE || insignia < 0 || insignia > RANK_GRADES_MAX )
- return NULL;
- return s_rankInsignia[ side ][ insignia ];
-}
-
-// ------------------------------------------------------------------------------------------------
-/** The insignia an object wears now, NULL for none: every unit starts unranked and bare, so grade 0
- * draws nothing on any side, and neither does anything that cannot climb (a structure, or an object
- * without a trainable tracker). The bar, the portrait and the promotion float all ask here. */
-// ------------------------------------------------------------------------------------------------
-/*static*/ const Image *Drawable::getRankInsignia( const Object *obj )
-{
- const RankLadder *ladder = TheGlobalData->getRankLadder( obj->getTemplate() );
- const ExperienceTracker *tracker = obj->getExperienceTracker();
- if( ladder == NULL || tracker == NULL || !tracker->isTrainable() || obj->isKindOf( KINDOF_STRUCTURE ) || obj->getRankGrade() <= 0 )
- return NULL;
- return getRankInsignia( obj->getTemplate(), ladder->insigniaIndex( obj->getRankGrade(), obj->isKindOf( KINDOF_HERO ) ) );
-}
-
-// ------------------------------------------------------------------------------------------------
-/*static*/ void Drawable::rankInsigniaSize( const Image *image, Real scale, Int *width, Int *height )
-{
- const Real high = ( image->getDisplayHeight() > 0 ? image->getDisplayHeight() : RANK_INSIGNIA_DEFAULT_HEIGHT ) * scale;
- Real wide = high * image->getImageWidth() / image->getImageHeight();
- Real tall = high;
- if( wide > high * RANK_INSIGNIA_MAX_ASPECT )
- {
- tall = high * high * RANK_INSIGNIA_MAX_ASPECT / wide;
- wide = high * RANK_INSIGNIA_MAX_ASPECT;
- }
- *width = REAL_TO_INT( wide );
- *height = REAL_TO_INT( tall );
-}
-
-// ------------------------------------------------------------------------------------------------
-/** One grade's insignia, cropped to its ink in the atlas: drawn beside the health bar and floating up
- * over a unit the moment it gains the grade. */
-// ------------------------------------------------------------------------------------------------
-/*static*/ Bool Drawable::drawRankInsignia( const ThingTemplate *thing, Int insignia, Int x, Int top, Bool centred, Real scale, Color color )
-{
- const Image *image = getRankInsignia( thing, insignia );
- if( image == NULL )
- return FALSE;
-
- Int width, height;
- rankInsigniaSize( image, scale, &width, &height );
- if( centred )
- x -= width / 2;
- TheDisplay->drawImage( image, x, top, x + width, top + height, color );
- return TRUE;
-}
-
// ------------------------------------------------------------------------------------------------
/** The capture clock, drawn under the health bar of the building being taken.
*
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
index c04ac8dac..b5b647a78 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBar.cpp
@@ -87,8 +87,6 @@
#include "GameClient/GadgetStaticText.h"
#include "GameClient/GadgetTextEntry.h"
#include "GameClient/InGameUI.h"
-#include "GameClient/Mouse.h"
-#include "GameLogic/ExperienceTracker.h"
#include "GameClient/WindowVideoManager.h"
#include "GameClient/GadgetListBox.h"
#include "GameClient/HotKey.h"
@@ -152,60 +150,6 @@ static void commandButtonTooltip(GameWindow *window,
TheControlBar->showBuildTooltipLayout(window);
}
-/** The portrait's tooltip for a unit on a rank ladder: its rank, and its way through the step to the
- * next one, experience since this grade's threshold over what the step costs. */
-static void portraitRankTooltip( GameWindow *window, WinInstanceData *instData, UnsignedInt mouse )
-{
- Drawable *draw = TheInGameUI->getFirstSelectedDrawable();
- const Object *obj = draw ? draw->getObject() : NULL;
- const RankLadder *ladder = obj ? TheGlobalData->getRankLadder( obj->getTemplate() ) : NULL;
- if( ladder == NULL || !obj->getExperienceTracker()->isTrainable() )
- return;
-
- const Int grade = obj->getRankGrade();
- AsciiString label;
- label.format( "RANK:%s%d", TheVeterancySideNames[ GlobalData::veterancySideOf( obj->getTemplate() ) ],
- ladder->insigniaIndex( grade, obj->isKindOf( KINDOF_HERO ) ) );
- 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 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 );
- if( value <= 0.0f || ( ( perk == RANK_PERK_AURA_RADIUS || perk >= RANK_PERK_AURA_RATE_OF_FIRE ) && !obj->leadsRankAuras() ) )
- 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;
- 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 );
- }
-
- if( grade < ladder->m_grades )
- {
- const Int unitValue = RankLadder::unitValue( obj->getTemplate() );
- const Int from = ladder->threshold( unitValue, grade );
- UnicodeString progress;
- progress.format( TheGameText->fetch( "RANK:NextRank" ), obj->getExperienceTracker()->getCurrentExperience() - from,
- ladder->threshold( unitValue, grade + 1 ) - from );
- text.concat( (WideChar)'\n' );
- text.concat( progress );
- }
- TheMouse->setCursorTooltip( text );
-}
-
//-------------------------------------------------------------------------------------------------
/** The place a command of `type` always stands at, or -1 for one that takes the next free place. */
//-------------------------------------------------------------------------------------------------
@@ -2708,7 +2652,6 @@ void ControlBar::initWindows( void )
id = TheNameKeyGenerator->nameToKey( "ControlBar.wnd:CameoWindow" );
m_rightHUDCameoWindow = TheWindowManager->winGetWindowFromId( NULL, id );
- m_rightHUDCameoWindow->winSetTooltipFunc( portraitRankTooltip );
for( i = 0; i < MAX_RIGHT_HUD_UPGRADE_CAMEOS; i++ )
{
windowName.format( "ControlBar.wnd:UnitUpgrade%d", i+1 );
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
index c3f9d6a84..b6892443a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GUI/ControlBar/ControlBarCommand.cpp
@@ -1106,11 +1106,6 @@ const Image* ControlBar::calculateVeterancyOverlayForObject( const Object *obj )
return NULL;
}
- // a unit on a rank ladder shows its grade's insignia, which the button draws in its corner
- const RankLadder *ladder = TheGlobalData->getRankLadder( obj->getTemplate() );
- if( ladder )
- return Drawable::getRankInsignia( obj );
-
VeterancyLevel level = obj->getVeterancyLevel();
//Return the appropriate image (including NULL if no veterancy levels)
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
index dd0372a9c..a7d666c1c 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
@@ -1698,18 +1698,6 @@ void GameClient::preloadAssets( TimeOfDay timeOfDay )
for (i=0; *textureNames[i]; ++i)
TheDisplay->preloadTextureAssets(textureNames[i]);
- // A ring's texture is otherwise read the frame the first ring of its kind lights, as much as
- // 125 ms off a cold disk in the middle of a battle. They are small and every match wants them.
- for (Int kind = 0; kind < RANK_AURA_COUNT; ++kind)
- {
- const RadiusDecalTemplate &ring = TheGlobalData->m_rankAuraRing[kind];
- if (!ring.valid())
- continue;
-
- AsciiString textureFile = ring.getTexture();
- textureFile.concat(".tga");
- TheDisplay->preloadTextureAssets(textureFile);
- }
getPreloadMemoryStatus(after);
DEBUG_LOG(("Preloading memory dwAvailPageFile %d --> %d : %d\n",
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index 79f993e3d..bdc5ac8d6 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -673,8 +673,7 @@ void InGameUI::xfer( Xfer *xfer )
// ------------------------------------------------------------------------------------------------
void InGameUI::loadPostProcess( void )
{
- // a loaded unit takes its grade from its experience, with no promotion to tell noteRankChanged
- m_auraLeadersFound = FALSE;
+
} // end loadPostProcess
// ------------------------------------------------------------------------------------------------
@@ -1069,9 +1068,6 @@ InGameUI::InGameUI()
{
Int i;
- for( i = 0; i < AURA_RING_MAX; ++i )
- m_auraRings[ i ].id = INVALID_ID;
-
for( i = 0; i < MAX_MOVE_HINTS; i++ )
{
m_moveHint[ i ].pos.zero();
@@ -1531,177 +1527,6 @@ Bool InGameUI::isTimeFrozenWithoutTick( void ) const
|| TheScriptEngine->isTimeFrozenDebug() || TheScriptEngine->isTimeFrozenScript();
}
-//-------------------------------------------------------------------------------------------------
-/** The aura kinds an object gives at its grade that have a ring to show, into kinds; 0 for one that
- * leads nobody. */
-//-------------------------------------------------------------------------------------------------
-static Int ringedAuraKinds( const Object *obj, Int kinds[ RANK_AURA_COUNT ] )
-{
- const RankLadder *ladder = TheGlobalData->getRankLadder( obj->getTemplate() );
- if( ladder == NULL || !obj->leadsRankAuras() )
- return 0;
- const Int grade = obj->getRankGrade();
- Int count = 0;
- for( Int kind = 0; kind < RANK_AURA_COUNT; ++kind )
- if( ladder->aura( grade, (RankAura)kind ) > 0.0f && TheGlobalData->m_rankAuraRing[ kind ].valid() )
- kinds[ count++ ] = kind;
- return count;
-}
-
-//-------------------------------------------------------------------------------------------------
-/** A promotion or a demotion, after its tick. One that now leads joins the leaders updateAuraRings
- * looks at; one that no longer does leaves there. */
-//-------------------------------------------------------------------------------------------------
-void InGameUI::noteRankChanged( ObjectID id )
-{
- // before the first walk, or with no rings drawn at all, the walk finds it
- if( !m_auraLeadersFound )
- return;
- const Object *obj = TheGameLogic->findObjectByID( id );
- Int kinds[ RANK_AURA_COUNT ];
- if( obj != NULL && ringedAuraKinds( obj, kinds ) > 0
- && std::find( m_auraLeaders.begin(), m_auraLeaders.end(), id ) == m_auraLeaders.end() )
- m_auraLeaders.push_back( id );
-}
-
-//-------------------------------------------------------------------------------------------------
-/** A leader's auras on the ground: one ring for each kind it gives, under every leader on the map,
- * selected or not, friend or enemy, while the player at this machine can see it: out of the fog and
- * shroud, and not a stealthed unit it has not detected (the test the drawable's own shadow obeys).
- * Every ring is the full aura radius; each kind's texture keeps to its own band of that disc
- * (Tools/aura_rings.py), so any set of them reads as one dial. Reads the logic's grades and draws;
- * nothing goes back. */
-//-------------------------------------------------------------------------------------------------
-void InGameUI::updateAuraRings()
-{
- // Who leads, where and through which fog moves with a tick, so the walk over every drawable runs
- // once a logic frame and again when the fog on the screen changes hands; on every pass it was 1.8%
- // of the main thread late in a match. Frozen time runs scripts with no new frame, and one may move
- // or hide a leader, so then it walks every pass. A ring's opacity follows the icon switch and
- // -cinema, which change between ticks, so every live ring is updated every pass.
- Player *local = ThePlayerList->getLocalPlayer();
- const UnsignedInt frame = TheGameLogic->getFrame();
- const Int shroudIndex = local != NULL ? TheObserverCamera.getShroudPlayerIndex() : -1;
- if( frame == m_auraRingsFrame && local == m_auraRingsPlayer && shroudIndex == m_auraRingsShroudIndex
- && !isTimeFrozenWithoutTick() )
- {
- for( Int slot = 0; slot < AURA_RING_MAX; ++slot )
- if( m_auraRings[ slot ].id != INVALID_ID )
- m_auraRings[ slot ].decal.update();
- return;
- }
- m_auraRingsFrame = frame;
- m_auraRingsPlayer = local;
- m_auraRingsShroudIndex = shroudIndex;
-
- struct Wanted { ObjectID id; Int kind; Real radius; Coord3D pos; };
- Wanted wanted[ AURA_RING_MAX ];
- Int wantedCount = 0;
-
- // the rings a leader puts down, unless the local player cannot see it
- auto want = [&]( Drawable *draw, const Object *obj )
- {
- Int kinds[ RANK_AURA_COUNT ];
- const Int kindCount = ringedAuraKinds( obj, kinds );
- if( kindCount == 0 || obj->isEffectivelyDead() || obj->getContainedBy()
- || draw->isDrawableEffectivelyHidden() || draw->getFullyObscuredByShroud()
- || obj->getShroudedStatus( local->getPlayerIndex() ) != OBJECTSHROUD_CLEAR )
- return;
- const RankLadder *ladder = TheGlobalData->getRankLadder( obj->getTemplate() );
- const Int grade = obj->getRankGrade();
- for( Int k = 0; k < kindCount && wantedCount < AURA_RING_MAX; ++k )
- {
- const Int kind = kinds[ k ];
- wanted[ wantedCount ].id = obj->getID();
- wanted[ wantedCount ].kind = kind;
- wanted[ wantedCount ].radius = ladder->auraRadius( grade, (RankAura)kind );
- wanted[ wantedCount ].pos = *draw->getPosition();
- ++wantedCount;
- }
- };
-
- // Who leads changes only with a grade, and a grade only with a promotion, which noteRankChanged
- // hears of after its tick; one walk over every drawable finds those already leading. The walk on
- // every logic frame cost a third of a millisecond late in a match, nearly all of it on units nowhere
- // near a leader's grade.
- if( local != NULL )
- {
- if( !m_auraLeadersFound )
- {
- m_auraLeaders.clear();
- for( Drawable *draw = TheGameClient->firstDrawable(); draw != NULL; draw = draw->getNextDrawable() )
- {
- Int kinds[ RANK_AURA_COUNT ];
- if( draw->getObject() && ringedAuraKinds( draw->getObject(), kinds ) > 0 )
- m_auraLeaders.push_back( draw->getObject()->getID() );
- }
- m_auraLeadersFound = TRUE;
- }
-
- // a leader gone from the game or back below a leader's grade leaves the list
- static std::vector<Drawable *> leaders;
- leaders.clear();
- for( size_t i = 0; i < m_auraLeaders.size(); )
- {
- const Object *obj = TheGameLogic->findObjectByID( m_auraLeaders[ i ] );
- Int kinds[ RANK_AURA_COUNT ];
- if( obj == NULL || ringedAuraKinds( obj, kinds ) == 0 )
- {
- m_auraLeaders[ i ] = m_auraLeaders.back();
- m_auraLeaders.pop_back();
- continue;
- }
- if( obj->getDrawable() )
- leaders.push_back( obj->getDrawable() );
- ++i;
- }
- // in the drawable list's order, newest first, as the walk met them, so the slots and the decals
- // are made in the order they always were
- std::sort( leaders.begin(), leaders.end(), []( const Drawable *a, const Drawable *b ) { return a->getID() > b->getID(); } );
- for( size_t i = 0; i < leaders.size(); ++i )
- want( leaders[ i ], leaders[ i ]->getObject() );
- }
-
- // a ring nobody wants goes; one whose radius changed goes too and comes back at the new size
- for( Int slot = 0; slot < AURA_RING_MAX; ++slot )
- {
- AuraRing &ring = m_auraRings[ slot ];
- if( ring.id == INVALID_ID )
- continue;
- Bool keep = FALSE;
- for( Int i = 0; i < wantedCount && !keep; ++i )
- keep = wanted[ i ].id == ring.id && wanted[ i ].kind == ring.kind && wanted[ i ].radius == ring.radius;
- if( !keep )
- {
- ring.decal.clear();
- ring.id = INVALID_ID;
- }
- }
-
- for( Int i = 0; i < wantedCount; ++i )
- {
- Int slot = -1, freeSlot = -1;
- for( Int s = 0; s < AURA_RING_MAX; ++s )
- {
- if( m_auraRings[ s ].id == wanted[ i ].id && m_auraRings[ s ].kind == wanted[ i ].kind )
- slot = s;
- else if( m_auraRings[ s ].id == INVALID_ID && freeSlot < 0 )
- freeSlot = s;
- }
- if( slot < 0 )
- {
- slot = freeSlot;
- AuraRing &ring = m_auraRings[ slot ];
- ring.id = wanted[ i ].id;
- ring.kind = wanted[ i ].kind;
- ring.radius = wanted[ i ].radius;
- TheGlobalData->m_rankAuraRing[ ring.kind ].createRadiusDecal( wanted[ i ].pos, ring.radius, local, ring.decal );
- }
- m_auraRings[ slot ].decal.setPosition( wanted[ i ].pos );
- m_auraRings[ slot ].decal.update();
- }
-}
-
//-------------------------------------------------------------------------------------------------
/** handle updating of "radius cursors" that follow the mouse pos */
//-------------------------------------------------------------------------------------------------
@@ -2524,8 +2349,6 @@ void InGameUI::preDraw( void )
// handle radius-cursors, if any
handleRadiusCursor();
- updateAuraRings();
-
// where the selection is headed, read fresh from the units themselves
updateOrderHints();
@@ -2929,16 +2752,6 @@ void InGameUI::reset( void )
}
m_nextMoveHint = 0;
- for( Int i = 0; i < AURA_RING_MAX; ++i )
- {
- m_auraRings[ i ].id = INVALID_ID;
- m_auraRings[ i ].decal.clear();
- }
- m_auraRingsFrame = ~0u;
- m_auraRingsPlayer = NULL;
- m_auraLeaders.clear();
- m_auraLeadersFound = FALSE;
-
m_isQuitMenuVisible = FALSE;
TheObserverCamera.reset();
CinemaDirector_forgetHudHidden();
@@ -10308,8 +10121,6 @@ WorldAnimationData::WorldAnimationData( void )
m_expireFrame = 0;
m_options = WORLD_ANIM_NO_OPTIONS;
m_zRisePerSecond = 0.0f;
- m_rankOf = NULL;
- m_rankInsignia = 0;
} // end WorldAnimationData
@@ -10320,14 +10131,12 @@ void InGameUI::addWorldAnimation( Anim2DTemplate *animTemplate,
const Coord3D *pos,
WorldAnimationOptions options,
Real durationInSeconds,
- Real zRisePerSecond,
- const ThingTemplate *rankOf,
- Int rankInsignia )
+ Real zRisePerSecond )
{
if( LogicThread::defersEffects() && pos != NULL )
{
const Coord3D at = *pos;
- LogicThread::callAfterTick( [=]() { addWorldAnimation( animTemplate, &at, options, durationInSeconds, zRisePerSecond, rankOf, rankInsignia ); } );
+ LogicThread::callAfterTick( [=]() { addWorldAnimation( animTemplate, &at, options, durationInSeconds, zRisePerSecond ); } );
return;
}
LOGIC_CENSUS( CENSUS_INGAMEUI );
@@ -10351,8 +10160,6 @@ void InGameUI::addWorldAnimation( Anim2DTemplate *animTemplate,
wad->m_options = options;
wad->m_worldPos = *pos;
wad->m_zRisePerSecond = zRisePerSecond;
- wad->m_rankOf = rankOf;
- wad->m_rankInsignia = rankInsignia;
// add to list
m_worldAnimationList.push_front( wad );
@@ -10475,16 +10282,6 @@ void InGameUI::updateAndDrawWorldAnimations( void )
const Real WORLD_ANIM_ZOOM_REFERENCE = 1.3f;
Real zoomScale = WORLD_ANIM_ZOOM_REFERENCE / TheTacticalView->getZoom();
- // a grade gained floats up as its insignia, half again its health bar size, centred where the
- // chevron would have been
- const Real RANK_GAIN_SCALE = 1.5f;
- if( wad->m_rankOf && !TheGlobalData->m_classicGraphics && Drawable::drawRankInsignia( wad->m_rankOf, wad->m_rankInsignia, screen.x, screen.y - REAL_TO_INT( height * zoomScale / 2 ),
- TRUE, RANK_GAIN_SCALE * zoomScale, GameMakeColor( 255, 255, 255, REAL_TO_INT( 255 * alpha ) ) ) )
- {
- ++it;
- continue;
- }
-
width *= zoomScale;
height *= zoomScale;
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp
index c914d7893..365c8a14e 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/RadiusDecal.cpp
@@ -56,40 +56,10 @@ RadiusDecalTemplate::RadiusDecalTemplate() :
m_opacityThrobTime(LOGICFRAMES_PER_SECOND),
m_color(0),
m_onlyVisibleToOwningPlayer(true),
- m_spinTime(0),
- m_lightReference(0.0f),
- m_lightScaleMin(1.0f),
- m_lightScaleMax(1.0f),
m_name(AsciiString::TheEmptyString) // Added By Sadullah Nader for Init purposes
{
}
-// ------------------------------------------------------------------------------------------------
-/** How bright flat ground is lit at the map's time of day against LightReference, clamped to
- * LightScaleMin..LightScaleMax. An additive mark adds the same light whatever lies under it, so on a
- * night map it reads far louder than by day; scaling by the ground's own light keeps it as quiet.
- * The light the terrain shades a flat cell with (BaseHeightMap's doTheLight): the first light's
- * ambient, plus each light's diffuse by how steeply it falls. */
-// ------------------------------------------------------------------------------------------------
-static Real groundLight()
-{
- RGBColor shade = TheGlobalData->m_terrainAmbient[0];
- for (Int i = 0; i < TheGlobalData->m_numGlobalLights; ++i)
- {
- const Real down = MIN(1.0f, MAX(0.0f, -TheGlobalData->m_terrainLightPos[i].z));
- shade.red += TheGlobalData->m_terrainDiffuse[i].red * down;
- shade.green += TheGlobalData->m_terrainDiffuse[i].green * down;
- shade.blue += TheGlobalData->m_terrainDiffuse[i].blue * down;
- }
- // each channel saturates at 1 as the terrain's own vertex shade does
- return 0.30f * MIN(1.0f, shade.red) + 0.59f * MIN(1.0f, shade.green) + 0.11f * MIN(1.0f, shade.blue);
-}
-
-Real RadiusDecalTemplate::lightScale() const
-{
- return MIN(m_lightScaleMax, MAX(m_lightScaleMin, groundLight() / m_lightReference));
-}
-
// ------------------------------------------------------------------------------------------------
void RadiusDecalTemplate::createRadiusDecal(const Coord3D& pos, Real radius, const Player* owningPlayer, RadiusDecal& result, const char* texture) const
{
@@ -125,8 +95,6 @@ void RadiusDecalTemplate::createRadiusDecal(const Coord3D& pos, Real radius, con
const ShadowType shadowType = m_shadowType;
const Real size = radius*2;
const Color color = m_color == 0 ? clientPlayerColor(owningPlayer) : m_color;
- if (m_lightReference > 0.0f)
- DEBUG_LOG(("AURA RING LIGHT %s ground=%.3f scale=%.2f\n", m_name.str(), groundLight(), lightScale()));
LogicThread::callAfterTick( [cell, name, shadowType, size, color]()
{
Shadow::ShadowTypeInfo decalInfo;
@@ -173,6 +141,10 @@ void RadiusDecalTemplate::xferRadiusDecalTemplate( Xfer *xfer )
xfer->xferBool(&m_onlyVisibleToOwningPlayer);
}
+static void parseRetiredField( INI *, void *, void *, const void * )
+{
+}
+
// ------------------------------------------------------------------------------------------------
/*static*/ void RadiusDecalTemplate::parseRadiusDecalTemplate(INI* ini, void *instance, void * store, const void* /*userData*/)
{
@@ -185,10 +157,11 @@ void RadiusDecalTemplate::xferRadiusDecalTemplate( Xfer *xfer )
{ "OpacityThrobTime", INI::parseDurationUnsignedInt,NULL, offsetof( RadiusDecalTemplate, m_opacityThrobTime ) },
{ "Color", INI::parseColorInt, NULL, offsetof( RadiusDecalTemplate, m_color ) },
{ "OnlyVisibleToOwningPlayer", INI::parseBool, NULL, offsetof( RadiusDecalTemplate, m_onlyVisibleToOwningPlayer ) },
- { "SpinTime", INI::parseInt, NULL, offsetof( RadiusDecalTemplate, m_spinTime ) },
- { "LightReference", INI::parseReal, NULL, offsetof( RadiusDecalTemplate, m_lightReference ) },
- { "LightScaleMin", INI::parseReal, NULL, offsetof( RadiusDecalTemplate, m_lightScaleMin ) },
- { "LightScaleMax", INI::parseReal, NULL, offsetof( RadiusDecalTemplate, m_lightScaleMax ) },
+ // the aura rings' fields; a mod written for them may name them, and an unknown field throws
+ { "SpinTime", parseRetiredField, NULL, 0 },
+ { "LightReference", parseRetiredField, NULL, 0 },
+ { "LightScaleMin", parseRetiredField, NULL, 0 },
+ { "LightScaleMax", parseRetiredField, NULL, 0 },
{ 0, 0, 0, 0 }
};
@@ -270,8 +243,6 @@ void RadiusDecal::update()
if( TheGameLogic->getDrawIconUI() && !CinemaDirector_hidesHud() )
{
Real opacity = m_template->m_minOpacity + percent * (m_template->m_maxOpacity - m_template->m_minOpacity);
- if (m_template->m_lightReference > 0.0f)
- opacity *= m_template->lightScale();
opac = REAL_TO_INT(opacity * 255.0f);
}
else
@@ -280,14 +251,6 @@ void RadiusDecal::update()
opac = 0;
}
decal->setOpacity(opac);
-
- // a turn every SpinTime, on the logic clock like the throb, so a paused game holds it still
- if (m_template->m_spinTime != 0)
- {
- const UnsignedInt period = MAX(1, abs(m_template->m_spinTime) * LOGICFRAMES_PER_SECOND / 1000);
- const Real angle = (2*PI) * (Real)(now % period) / (Real)period;
- decal->setAngle(m_template->m_spinTime > 0 ? angle : -angle);
- }
}
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/System/Image.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/System/Image.cpp
index 4be5582fb..7e755363a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/System/Image.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/System/Image.cpp
@@ -45,8 +45,12 @@
#include "GameClient/Image.h"
#include "Common/NameKeyGenerator.h"
+static void parseRetiredField( INI *, void *, void *, const void * )
+{
+}
+
// PRIVATE DATA ///////////////////////////////////////////////////////////////////////////////////
-const FieldParse Image::m_imageFieldParseTable[] =
+const FieldParse Image::m_imageFieldParseTable[] =
{
{ "Texture", INI::parseAsciiString, NULL, offsetof( Image, m_filename ) },
@@ -54,7 +58,7 @@ const FieldParse Image::m_imageFieldParseTable[] =
{ "TextureHeight", INI::parseInt, NULL, offsetof( Image, m_textureSize.y ) },
{ "Coords", Image::parseImageCoords, NULL, offsetof( Image, m_UVCoords ) },
{ "Status", Image::parseImageStatus, NULL, offsetof( Image, m_status ) },
- { "DisplayHeight", INI::parseInt, NULL, offsetof( Image, m_displayHeight ) },
+ { "DisplayHeight", parseRetiredField, NULL, 0 }, // a stale rank insignia .ini on a player's disk still names it; an unknown field throws
{ NULL, NULL, NULL, 0 }
@@ -159,7 +163,6 @@ Image::Image( void )
m_imageSize.y = 0;
m_rawTextureData = NULL;
m_status = IMAGE_STATUS_NONE;
- m_displayHeight = 0;
} // end Image
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp
index 3c2c33bd1..519946485 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Body/ActiveBody.cpp
@@ -63,7 +63,6 @@
#include "GameLogic/Module/ContainModule.h"
#include "GameLogic/Module/DamageModule.h"
#include "GameLogic/Module/DieModule.h"
-#include "GameLogic/Module/StealthUpdate.h"
#ifdef _INTERNAL
@@ -402,9 +401,9 @@ void ActiveBody::attemptDamage( DamageInfo *damageInfo )
{
if( !damageInfo->in.m_kill )
{
+ // Healing and Damage are separate, so this shouldn't happen
// A healing weapon's amount is flat; the one healed takes his own handicap, never the healer's.
damageInfo->in.m_amount *= getObject()->getHandicapHealthFactor();
- // Healing and Damage are separate, so this shouldn't happen
attemptHealing( damageInfo );
}
return;
@@ -564,8 +563,6 @@ void ActiveBody::attemptDamage( DamageInfo *damageInfo )
// Apply the damage scalar (extra bonuses -- like strategy center defensive battle plan)
// And remember not to adjust unresistable damage, just like the armor code can't.
amount *= m_damageScalar;
- // a leader's guard aura, a fallen leader's rally, a rank's guard standing still
- amount *= obj->getRankDamageTakenScalar();
}
// one hit kill: anything that got through the armour at all takes the whole bar
@@ -627,21 +624,8 @@ 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.
@@ -1585,8 +1569,18 @@ void ActiveBody::onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLeve
} );
}
- // the health bonus moves with the grade as well as the level, so Object::onRankChanged scales max
- // health for both
+ Real oldBonus = TheGlobalData->m_healthBonus[oldLevel];
+ Real newBonus = TheGlobalData->m_healthBonus[newLevel];
+ Real mult = newBonus / oldBonus;
+
+ // get this before calling setMaxHealth, since it can clip curHealth
+ //Real newHealth = m_currentHealth * mult;
+
+ // change the max
+ setMaxHealth(m_maxHealth * mult, PRESERVE_RATIO );
+
+ // now change the cur (setMaxHealth now handles it)
+ //internalChangeHealth( newHealth - m_currentHealth );
switch (newLevel)
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Collide/CrateCollide/VeterancyCrateCollide.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Collide/CrateCollide/VeterancyCrateCollide.cpp
index 28a9899de..ae7b98d1a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Collide/CrateCollide/VeterancyCrateCollide.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Collide/CrateCollide/VeterancyCrateCollide.cpp
@@ -141,7 +141,7 @@ Bool VeterancyCrateCollide::executeCrateBehavior( Object *other )
// do just the collider
if (other != NULL)
{
- other->getExperienceTracker()->gainExpForLevel( levelsToGain, ( ! md->m_isPilot), md->m_isPilot );
+ other->getExperienceTracker()->gainExpForLevel( levelsToGain, ( ! md->m_isPilot) );
}
}
else
@@ -155,7 +155,7 @@ Bool VeterancyCrateCollide::executeCrateBehavior( Object *other )
for( Object *potentialObject = iter->first(); potentialObject; potentialObject = iter->next() )
{
// This function will give just enough exp for the Object to gain a level, if it can
- potentialObject->getExperienceTracker()->gainExpForLevel( levelsToGain, ( ! md->m_isPilot), md->m_isPilot );
+ potentialObject->getExperienceTracker()->gainExpForLevel( levelsToGain, ( ! md->m_isPilot) );
}
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp
index 17a2f7c31..14f55cf26 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Contain/OpenContain.cpp
@@ -504,7 +504,6 @@ void OpenContain::killAllContained( void )
onRemoving( rider );
rider->onRemovedFrom( getObject() );
- rider->forgoRankRally(); // it dies inside, though no longer counted in
rider->kill();
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/VeterancyGainCreate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/VeterancyGainCreate.cpp
index ec52d138b..94f536929 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/VeterancyGainCreate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/VeterancyGainCreate.cpp
@@ -43,7 +43,10 @@ VeterancyGainCreateModuleData::VeterancyGainCreateModuleData()
{
m_startingLevel = LEVEL_REGULAR;
m_scienceRequired = SCIENCE_INVALID;
- m_startingGrades = 0;
+}
+
+static void parseRetiredField( INI *, void *, void *, const void * )
+{
}
//-------------------------------------------------------------------------------------------------
@@ -56,7 +59,7 @@ void VeterancyGainCreateModuleData::buildFieldParse(MultiIniFieldParse& p)
{
{ "StartingLevel", INI::parseIndexList, TheVeterancyNames, offsetof( VeterancyGainCreateModuleData, m_startingLevel ) },
{ "ScienceRequired", INI::parseScience, NULL, offsetof( VeterancyGainCreateModuleData, m_scienceRequired ) },
- { "StartingGrades", INI::parseInt, NULL, offsetof( VeterancyGainCreateModuleData, m_startingGrades ) },
+ { "StartingGrades", parseRetiredField, NULL, 0 }, // a mod written for the rank ladder may name it; an unknown field throws
{ 0, 0, 0, 0 }
};
@@ -94,10 +97,7 @@ void VeterancyGainCreate::onCreate( void )
if( myExp && myExp->isTrainable() )
{
// srj sez: use "setMin" here so that we never lose levels
- if( md->m_startingGrades > 0 )
- myExp->gainGrades( md->m_startingGrades );
- else
- myExp->setMinVeterancyLevel( md->m_startingLevel );// sVL can override isTrainable, but this module should not.
+ myExp->setMinVeterancyLevel( md->m_startingLevel );// sVL can override isTrainable, but this module should not.
}
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ExperienceTracker.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ExperienceTracker.cpp
index 7ab20a45c..99e2bfd4a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ExperienceTracker.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/ExperienceTracker.cpp
@@ -30,7 +30,6 @@
#include "PreRTS.h" // This must go first in EVERY cpp file int the GameEngine
-#include "Common/GlobalData.h"
#include "Common/Xfer.h"
#include "Common/ThingTemplate.h"
#include "GameLogic/ExperienceTracker.h"
@@ -48,7 +47,6 @@
ExperienceTracker::ExperienceTracker(Object *parent) :
m_parent(parent),
m_currentLevel(LEVEL_REGULAR),
- m_currentGrade(0),
m_experienceSink(INVALID_ID),
m_experienceScalar( 1.0f ),
m_currentExperience(0), // Added By Sadullah Nader
@@ -172,14 +170,6 @@ void ExperienceTracker::setMinVeterancyLevel( VeterancyLevel newLevel )
// This does not check for IsTrainable, because this function is for explicit setting,
// so the setter is assumed to know what they are doing. The game function
// of addExperiencePoints cares about Trainability.
- const RankLadder *ladder = TheGlobalData->getRankLadder( m_parent->getTemplate() );
- if (ladder)
- {
- // a ladder unit lands on the level's pin, from where it climbs on
- if (m_currentLevel < newLevel)
- applyExperience( ladder->threshold( RankLadder::unitValue( m_parent->getTemplate() ), ladder->m_pin[newLevel] ), TRUE );
- return;
- }
if (m_currentLevel < newLevel)
{
VeterancyLevel oldLevel = m_currentLevel;
@@ -188,7 +178,7 @@ void ExperienceTracker::setMinVeterancyLevel( VeterancyLevel newLevel )
if (m_parent)
{
m_currentExperience = m_parent->getTemplate()->getExperienceRequired(m_currentLevel); //Minimum for this level
- m_parent->onRankChanged( oldLevel, newLevel, 0, 0, TRUE );
+ m_parent->onVeterancyLevelChanged( oldLevel, newLevel );
}
}
}
@@ -199,13 +189,6 @@ void ExperienceTracker::setVeterancyLevel( VeterancyLevel newLevel, Bool provide
// This does not check for IsTrainable, because this function is for explicit setting,
// so the setter is assumed to know what they are doing. The game function
// of addExperiencePoints cares about Trainability, if flagged thus.
- const RankLadder *ladder = TheGlobalData->getRankLadder( m_parent->getTemplate() );
- if (ladder)
- {
- if (m_currentLevel != newLevel)
- applyExperience( ladder->threshold( RankLadder::unitValue( m_parent->getTemplate() ), ladder->m_pin[newLevel] ), provideFeedback );
- return;
- }
if (m_currentLevel != newLevel)
{
VeterancyLevel oldLevel = m_currentLevel;
@@ -214,32 +197,17 @@ void ExperienceTracker::setVeterancyLevel( VeterancyLevel newLevel, Bool provide
if (m_parent)
{
m_currentExperience = m_parent->getTemplate()->getExperienceRequired(m_currentLevel); //Minimum for this level
- m_parent->onRankChanged( oldLevel, newLevel, 0, 0, provideFeedback );
+ m_parent->onVeterancyLevelChanged( oldLevel, newLevel, provideFeedback );
}
}
}
//-------------------------------------------------------------------------------------------------
-Bool ExperienceTracker::gainExpForLevel(Int levelsToGain, Bool canScaleForBonus, Bool byLevel)
+Bool ExperienceTracker::gainExpForLevel(Int levelsToGain, Bool canScaleForBonus)
{
Int newLevel = (Int)m_currentLevel + levelsToGain;
if (newLevel > LEVEL_LAST)
newLevel = LEVEL_LAST;
-
- // a ladder unit is set straight onto a grade, unclipped and unscaled: a crate's grades short of the
- // Heroic pin, or a pilot's summed level's pin
- const RankLadder *ladder = TheGlobalData->getRankLadder( m_parent->getTemplate() );
- if (ladder)
- {
- if (newLevel <= m_currentLevel)
- return false;
- const Int grade = byLevel ? ladder->m_pin[newLevel]
- : MIN( m_currentGrade + levelsToGain * TheGlobalData->m_rankCrateGrades, ladder->m_pin[LEVEL_LAST] );
- const Int experience = ladder->threshold( RankLadder::unitValue( m_parent->getTemplate() ), grade );
- if (experience > m_currentExperience)
- setExperienceAndLevel( experience );
- return true;
- }
// gain what levels we can, even if we can't use 'em all
if (newLevel > m_currentLevel)
{
@@ -250,19 +218,6 @@ Bool ExperienceTracker::gainExpForLevel(Int levelsToGain, Bool canScaleForBonus,
return false;
}
-//-------------------------------------------------------------------------------------------------
-void ExperienceTracker::gainGrades( Int grades )
-{
- // a unit of no side in the ladder (a mod faction, a civilian) has no grades to gain
- const RankLadder *ladder = TheGlobalData->getRankLadder( m_parent->getTemplate() );
- if (ladder == NULL)
- return;
- const Int grade = MIN( m_currentGrade + grades, ladder->m_pin[LEVEL_LAST] );
- const Int experience = ladder->threshold( RankLadder::unitValue( m_parent->getTemplate() ), grade );
- if (experience > m_currentExperience)
- setExperienceAndLevel( experience );
-}
-
//-------------------------------------------------------------------------------------------------
Bool ExperienceTracker::canGainExpForLevel(Int levelsToGain) const
{
@@ -291,54 +246,32 @@ void ExperienceTracker::addExperiencePoints( Int experienceGain, Bool canScaleFo
if( !isTrainable() )
return; //safety
+ VeterancyLevel oldLevel = m_currentLevel;
+
Int amountToGain = experienceGain;
if ( canScaleForBonus )
amountToGain *= m_experienceScalar;
- // on a rank ladder one gain, a kill or a heal, lifts one grade at most
- const RankLadder *ladder = TheGlobalData->getRankLadder( m_parent->getTemplate() );
- if( ladder )
- amountToGain = ladder->clipGain( RankLadder::unitValue( m_parent->getTemplate() ), m_currentExperience, amountToGain );
- applyExperience( m_currentExperience + amountToGain, TRUE );
-}
+ m_currentExperience += amountToGain;
-//-------------------------------------------------------------------------------------------------
-void ExperienceTracker::recomputeRank()
-{
- const ThingTemplate *thing = m_parent->getTemplate();
- const RankLadder *ladder = TheGlobalData->getRankLadder( thing );
- if( ladder )
- {
- m_currentGrade = ladder->gradeOf( RankLadder::unitValue( thing ), m_currentExperience );
- m_currentLevel = ladder->levelOf( m_currentGrade );
- return;
- }
-
- m_currentGrade = 0;
Int levelIndex = 0;
while( ( (levelIndex + 1) < LEVEL_COUNT)
- && m_currentExperience >= thing->getExperienceRequired(levelIndex + 1)
+ && m_currentExperience >= m_parent->getTemplate()->getExperienceRequired(levelIndex + 1)
)
{
// If there is a higher level to qualify for, and I qualify for it, advance the index
levelIndex++;
}
- m_currentLevel = (VeterancyLevel)levelIndex;
-}
-//-------------------------------------------------------------------------------------------------
-void ExperienceTracker::applyExperience( Int experience, Bool provideFeedback )
-{
- const VeterancyLevel oldLevel = m_currentLevel;
- const Int oldGrade = m_currentGrade;
+ m_currentLevel = (VeterancyLevel)levelIndex;
- m_currentExperience = experience;
- recomputeRank();
+ if( oldLevel != m_currentLevel )
+ {
+ // Edge trigger special level gain effects.
+ m_parent->onVeterancyLevelChanged( oldLevel, m_currentLevel );
+ }
- // Edge trigger special level gain effects; a grade moving inside one level counts too.
- if( oldLevel != m_currentLevel || oldGrade != m_currentGrade )
- m_parent->onRankChanged( oldLevel, m_currentLevel, oldGrade, m_currentGrade, provideFeedback ); //<<== this may be a level lost
}
//-------------------------------------------------------------------------------------------------
void ExperienceTracker::setExperienceAndLevel( Int experienceIn, Bool provideFeedback )
@@ -358,7 +291,27 @@ void ExperienceTracker::setExperienceAndLevel( Int experienceIn, Bool provideFee
if( !isTrainable() )
return; //safety
- applyExperience( experienceIn, provideFeedback );
+ VeterancyLevel oldLevel = m_currentLevel;
+
+ m_currentExperience = experienceIn;
+
+ Int levelIndex = 0;
+ while( ( (levelIndex + 1) < LEVEL_COUNT)
+ && m_currentExperience >= m_parent->getTemplate()->getExperienceRequired(levelIndex + 1)
+ )
+ {
+ // If there is a level to qualify for, and I qualify for it, advance the index
+ levelIndex++;
+ }
+
+ m_currentLevel = (VeterancyLevel)levelIndex;
+
+ if( oldLevel != m_currentLevel )
+ {
+ // Edge trigger special level gain effects.
+ m_parent->onVeterancyLevelChanged( oldLevel, m_currentLevel, provideFeedback ); //<<== paradox! this may be a level lost!
+ }
+
}
//-----------------------------------------------------------------------------
@@ -406,13 +359,6 @@ void ExperienceTracker::xfer( Xfer *xfer )
// current experience
xfer->xferInt( &m_currentExperience );
- // the grade is not saved; it follows from the experience
- if( xfer->getXferMode() == XFER_LOAD )
- {
- const RankLadder *ladder = TheGlobalData->getRankLadder( m_parent->getTemplate() );
- m_currentGrade = ladder ? ladder->gradeOf( RankLadder::unitValue( m_parent->getTemplate() ), m_currentExperience ) : 0;
- }
-
// experience sink
xfer->xferObjectID( &m_experienceSink );
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp
index 34a1f9271..335ef4b2f 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Helper/SubdualDamageHelper.cpp
@@ -65,8 +65,7 @@ UpdateSleepTime SubdualDamageHelper::update()
DamageInfo removeSubdueDamage;
removeSubdueDamage.in.m_damageType = DAMAGE_SUBDUAL_UNRESISTABLE;
- // 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 ) );
+ removeSubdueDamage.in.m_amount = -body->getSubdualDamageHealAmount();
body->attemptDamage(&removeSubdueDamage);
if( body->hasAnySubdualDamage() )
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp
index 934b09514..ab5b3c91a 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Locomotor.cpp
@@ -811,7 +811,6 @@ Locomotor::Locomotor(const LocomotorTemplate* tmpl)
m_brakingFactor = 1.0f;
m_maxLift = BIGNUM;
m_maxSpeed = BIGNUM;
- m_speedFactor = 1.0f;
m_speedScale = 1.0f;
m_maxAccel = BIGNUM;
m_maxBraking = BIGNUM;
@@ -852,7 +851,6 @@ Locomotor::Locomotor(const Locomotor& that)
m_brakingFactor = that.m_brakingFactor;
m_maxLift = that.m_maxLift;
m_maxSpeed = that.m_maxSpeed;
- m_speedFactor = that.m_speedFactor;
m_speedScale = that.m_speedScale;
m_maxAccel = that.m_maxAccel;
m_maxBraking = that.m_maxBraking;
@@ -884,7 +882,6 @@ Locomotor& Locomotor::operator=(const Locomotor& that)
m_brakingFactor = that.m_brakingFactor;
m_maxLift = that.m_maxLift;
m_maxSpeed = that.m_maxSpeed;
- m_speedFactor = that.m_speedFactor;
m_speedScale = that.m_speedScale;
m_maxAccel = that.m_maxAccel;
m_maxBraking = that.m_maxBraking;
@@ -927,13 +924,14 @@ void Locomotor::crc( Xfer *xfer )
* 3: m_diveDistance
* 4: m_yawRate, m_driveAccelX, m_driveAccelY
* 5: m_driveSpeed, m_driveFrame
- * 6: m_speedFactor
- * 7: m_speedScale */
+ * 6: m_speedFactor, a rank's speed; versions 6 and 7 read it and throw it away
+ * 7: m_speedScale
+ * 8: no m_speedFactor */
// ------------------------------------------------------------------------------------------------
void Locomotor::xfer( Xfer *xfer )
{
// version
- const XferVersion currentVersion = 7;
+ const XferVersion currentVersion = 8;
XferVersion version = currentVersion;
xfer->xferVersion( &version, currentVersion );
@@ -974,8 +972,11 @@ void Locomotor::xfer( Xfer *xfer )
xfer->xferUnsignedInt(&m_driveFrame);
}
- if (version >= 6)
- xfer->xferReal(&m_speedFactor);
+ if (version >= 6 && version <= 7)
+ {
+ Real discardSpeedFactor;
+ xfer->xferReal(&discardSpeedFactor);
+ }
if (version >= 7)
xfer->xferReal(&m_speedScale);
@@ -1008,7 +1009,6 @@ Real Locomotor::getMaxSpeedForCondition(BodyDamageType condition) const
speed = m_template->m_maxSpeedDamaged;
speed *= m_speedScale;
- speed *= m_speedFactor;
if (speed > m_maxSpeed)
speed = m_maxSpeed;
@@ -4079,11 +4079,4 @@ Locomotor* LocomotorSet::findLocomotor(LocomotorSurfaceTypeMask t)
return NULL;
}
-//-------------------------------------------------------------------------------------------------
-void LocomotorSet::setSpeedFactor(Real factor)
-{
- for (LocomotorVector::iterator it = m_locomotors.begin(); it != m_locomotors.end(); ++it)
- (*it)->setSpeedFactor(factor);
-}
-
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
index eb86e89c6..0bf256534 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp
@@ -326,12 +326,6 @@ Object::Object( const ThingTemplate *tt, const ObjectStatusMaskType &objectStatu
m_shroudClearingRange = m_visionRange;// Backwards compatible, and perfectly logical default to assign
m_shroudRange = 0.0f;
m_sightJammerCount = 0;
- for( Int aura = 0; aura < RANK_AURA_COUNT; ++aura )
- m_rankAura[ aura ] = 0.0f;
- for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )
- m_rankAuraGathered[ aura ] = 0.0f;
- m_rankRallyUntil = 0;
- m_forgoRankRally = FALSE;
m_singleUseCommandUsed = false;
@@ -2336,12 +2330,6 @@ 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 ) )
@@ -3308,8 +3296,7 @@ void Object::scoreTheKill( const Object *victim )
{
controller->getScoreKeeper()->addObjectDestroyed(victim);
controller->addSkillPointsForKill(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)));
+ controller->doBountyForKill(this, victim);
}
/* Now handle experience, if we can gain any.
@@ -3371,13 +3358,6 @@ VeterancyLevel Object::getVeterancyLevel() const
return m_experienceTracker ? m_experienceTracker->getVeterancyLevel() : LEVEL_REGULAR;
}
-//-------------------------------------------------------------------------------------------------
-// the AI module picks its locomotors, and reads the speed bonus, before the tracker exists
-Int Object::getRankGrade() const
-{
- return m_experienceTracker ? m_experienceTracker->getGrade() : 0;
-}
-
//-------------------------------------------------------------------------------------------------
void Object::friend_bindToDrawable( Drawable *draw )
{
@@ -3565,73 +3545,6 @@ Bool Object::hasAnySpecialPower() const
return SPECIALPOWERMASK_ANY_SET( m_specialPowerBits );
}
-//-------------------------------------------------------------------------------------------------
-void Object::onRankChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Int oldGrade, Int newGrade, Bool provideFeedback )
-{
- if( isEffectivelyDead() )
- return;
-
- // max health carries the grade's bonus on a ladder and the level's anywhere else
- BodyModuleInterface* body = getBodyModule();
- const Real oldBonus = TheGlobalData->getRankHealthBonus( getTemplate(), oldLevel, oldGrade );
- const Real newBonus = TheGlobalData->getRankHealthBonus( getTemplate(), newLevel, newGrade );
- if( body && oldBonus != newBonus )
- body->setMaxHealth( body->getMaxHealth() * newBonus / oldBonus, PRESERVE_RATIO );
-
- if( oldLevel != newLevel )
- onVeterancyLevelChanged( oldLevel, newLevel, provideFeedback );
- else if( m_ai )
- m_ai->refreshVeterancySpeed();
-
- const RankLadder *ladder = TheGlobalData->getRankLadder( getTemplate() );
- if( ladder == NULL || newGrade == oldGrade )
- return;
-
- DEBUG_LOG(("RANK frame=%d template=%s grade %d to %d xp=%d\n", TheGameLogic->getFrame(), getTemplate()->getName().str(),
- oldGrade, newGrade, getExperienceTracker()->getCurrentExperience()));
-
- // the sight and spotter perks change how far it looks; one born on a pin has not looked yet
- if( !m_partitionLastLook->isInvalid()
- && ( ladder->perk( oldGrade, RANK_PERK_SIGHT ) != ladder->perk( newGrade, RANK_PERK_SIGHT )
- || ladder->perk( oldGrade, RANK_PERK_SPOTTER ) != ladder->perk( newGrade, RANK_PERK_SPOTTER ) ) )
- handleShroud();
-
- if( newGrade > oldGrade && provideFeedback && TheGameLogic->getDrawIconUI() && isLogicallyVisible() && !isKindOf( KINDOF_IGNORED_IN_GUI )
- && Drawable::getRankInsignia( this ) != NULL )
- floatRankGain( ladder->insigniaIndex( newGrade, isKindOf( KINDOF_HERO ) ) );
-
- // the portrait shows the grade, so a selected unit's bar redraws, and the aura rings look for a new
- // leader; the selection and the rings are the client's, so the client asks after the tick
- const ObjectID objID = getID();
- LogicThread::callAfterTick( [objID]()
- {
- TheInGameUI->noteRankChanged( objID );
- Drawable *draw = TheInGameUI->getFirstSelectedDrawable();
- if( draw && draw->getObject() && draw->getObject()->getID() == objID )
- TheControlBar->markUIDirty();
- } );
-}
-
-//-------------------------------------------------------------------------------------------------
-/** The promotion floating up over the unit: a rank ladder's insignia, or EA's chevron animation for
- * insignia -1. */
-//-------------------------------------------------------------------------------------------------
-void Object::floatRankGain( Int insignia )
-{
- if( TheAnim2DCollection == NULL || TheGlobalData->m_levelGainAnimationName.isEmpty() )
- return;
-
- Anim2DTemplate *animTemplate = TheAnim2DCollection->findTemplate( TheGlobalData->m_levelGainAnimationName );
- Coord3D pos = *getPosition();
- pos.add(&m_healthBoxOffset);
- TheInGameUI->addWorldAnimation( animTemplate,
- &pos,
- WORLD_ANIM_FADE_ON_EXPIRE,
- TheGlobalData->m_levelGainAnimationDisplayTimeInSeconds,
- TheGlobalData->m_levelGainAnimationZRisePerSecond,
- insignia < 0 ? NULL : getTemplate(), insignia );
-}
-
//-------------------------------------------------------------------------------------------------
void Object::onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel newLevel, Bool provideFeedback )
{
@@ -3654,9 +3567,6 @@ void Object::onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel ne
if (body)
body->onVeterancyLevelChanged( oldLevel, newLevel, provideFeedback );
- if (m_ai)
- m_ai->refreshVeterancySpeed();
-
// Whether the promotion shows is simply whether this watcher can see the unit. The rule used
// to be spelled out here as "mine, or not stealthed, or detected, or disguised", which reads
// the same for a player but is wrong for everyone else at the table: an ally who shares your
@@ -3710,9 +3620,19 @@ void Object::onVeterancyLevelChanged( VeterancyLevel oldLevel, VeterancyLevel ne
if( doAnimation && TheGameLogic->getDrawIconUI() && provideFeedback )
{
- // a unit on a rank ladder floats each grade's insignia from onRankChanged instead
- if( TheGlobalData->getRankLadder( getTemplate() ) == NULL )
- floatRankGain( -1 );
+ if( TheAnim2DCollection && TheGlobalData->m_levelGainAnimationName.isEmpty() == FALSE )
+ {
+ Anim2DTemplate *animTemplate = TheAnim2DCollection->findTemplate( TheGlobalData->m_levelGainAnimationName );
+
+ Coord3D pos = *getPosition();
+ pos.add(&m_healthBoxOffset);
+
+ TheInGameUI->addWorldAnimation( animTemplate,
+ &pos,
+ WORLD_ANIM_FADE_ON_EXPIRE,
+ TheGlobalData->m_levelGainAnimationDisplayTimeInSeconds,
+ TheGlobalData->m_levelGainAnimationZRisePerSecond);
+ }
AudioEventRTS soundToPlay = TheAudio->getMiscAudio()->m_unitPromoted;
soundToPlay.setObjectID( getID() );
@@ -4616,13 +4536,14 @@ static void xferModule( Xfer *xfer, BehaviorModule *module, const Object *obj )
* 14: the rank auras on it and when its death rally ends
* 15: the six aura kinds mend, pace, drill, steady, capture and spoils
* 16: the auras gathered since its last turn of the once-a-second pass
+ * 17: the rank auras gone; versions 14 to 16 are read and thrown away
*/
//-------------------------------------------------------------------------------------------------
void Object::xfer( Xfer *xfer )
{
// version
- const XferVersion currentVersion = 16;
+ const XferVersion currentVersion = 17;
XferVersion version = currentVersion;
xfer->xferVersion( &version, currentVersion );
@@ -5086,25 +5007,18 @@ void Object::xfer( Xfer *xfer )
if( version >= 13 )
xfer->xferInt( &m_sightJammerCount );
- // 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 ] );
- }
- else if( version >= 14 )
+ // a save from when the rank ladder lived: five aura kinds at 14, eleven at 15 and 16, the rally's
+ // end, and at 16 the ten gathered since the unit's last turn
+ if( version >= 14 && version <= 16 )
{
- 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 );
-
- if( version >= 16 )
- {
- for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )
- xfer->xferReal( &m_rankAuraGathered[ aura ] );
+ Real discardAura;
+ UnsignedInt discardFrame;
+ const Int savedAuras = ( version == 14 ? 5 : 11 ) + ( version == 16 ? 10 : 0 );
+ for( Int i = 0; i < ( version == 14 ? 5 : 11 ); ++i )
+ xfer->xferReal( &discardAura );
+ xfer->xferUnsignedInt( &discardFrame );
+ for( Int i = ( version == 14 ? 5 : 11 ); i < savedAuras; ++i )
+ xfer->xferReal( &discardAura );
}
} // end xfer
@@ -5264,9 +5178,6 @@ 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
// exactly what must not run: the die modules are the explosion, the collapse and the rubble of a
@@ -5649,138 +5560,10 @@ void Object::removeSightJammer()
handleShroud();
}
-//-------------------------------------------------------------------------------------------------
-Real Object::getRankPerk( RankPerk perk ) const
-{
- const RankLadder *ladder = TheGlobalData->getRankLadder( getTemplate() );
- return ladder ? ladder->perk( getRankGrade(), perk ) : 0.0f;
-}
-
-//-------------------------------------------------------------------------------------------------
-Real Object::getRankAura( RankAura aura ) const
-{
- // nothing reaches a man inside a building, a bunker or a transport, a rally already on him included
- if( m_containedBy || ( aura == RANK_AURA_RALLY && TheGameLogic->getFrame() >= m_rankRallyUntil ) )
- return 0.0f;
- return m_rankAura[ aura ];
-}
-
-//-------------------------------------------------------------------------------------------------
-void Object::takeGatheredRankAuras()
-{
- for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )
- {
- m_rankAura[ aura ] = m_rankAuraGathered[ aura ];
- m_rankAuraGathered[ aura ] = 0.0f;
- }
-}
-
-//-------------------------------------------------------------------------------------------------
-void Object::raiseRankAura( RankAura aura, Real strength )
-{
- m_rankAuraGathered[ aura ] = MAX( m_rankAuraGathered[ aura ], strength );
-}
-
-//-------------------------------------------------------------------------------------------------
-void Object::raiseRankRally( Real strength, UnsignedInt until )
-{
- m_rankAura[ RANK_AURA_RALLY ] = MAX( getRankAura( RANK_AURA_RALLY ), strength );
- m_rankRallyUntil = MAX( m_rankRallyUntil, until );
-}
-
-//-------------------------------------------------------------------------------------------------
-Real Object::getRankSightScalar() const
-{
- return MAX( 1.0f, getRankPerk( RANK_PERK_SIGHT ) ) * ( 1.0f + m_rankAura[ RANK_AURA_SIGHT ] );
-}
-
-//-------------------------------------------------------------------------------------------------
-/** Standing still is not walking a path: a tank turning its turret on the spot holds its guard. */
-//-------------------------------------------------------------------------------------------------
-Real Object::getRankDamageTakenScalar() const
-{
- Real scalar = ( 1.0f - m_rankAura[ RANK_AURA_GUARD ] ) * ( 1.0f - getRankAura( RANK_AURA_RALLY ) );
- const Real still = getRankPerk( RANK_PERK_STILL_GUARD );
- if( still > 0.0f && !( m_ai && m_ai->isMoving() ) )
- scalar *= 1.0f - still;
- return scalar;
-}
-
//-------------------------------------------------------------------------------------------------
Bool Object::isSpotter() const
{
- return getTemplate()->hasSpotterSight() || getRankPerk( RANK_PERK_SPOTTER ) > 0.0f;
-}
-
-//-------------------------------------------------------------------------------------------------
-/** A hacker climbs the ladder on its payouts alone and sits at the back keyboarding, so it leads
- * nobody: no aura, no ring, whatever its grade. */
-//-------------------------------------------------------------------------------------------------
-Bool Object::leadsRankAuras() const
-{
- return !( m_ai && m_ai->getHackInternetAIInterface() );
-}
-
-//-------------------------------------------------------------------------------------------------
-void Object::onRankSightChanged( Real oldScalar )
-{
- if( getRankSightScalar() != oldScalar && !m_partitionLastLook->isInvalid() )
- handleShroud();
-}
-
-//-------------------------------------------------------------------------------------------------
-/** A fallen leader's last order: the allies within its aura radius take less damage for RallyTime.
- * The list walk is the object list's own order; the strongest rally stays, so order is moot. */
-//-------------------------------------------------------------------------------------------------
-void Object::giveRankRally()
-{
- const RankLadder *ladder = TheGlobalData->getRankLadder( getTemplate() );
- if( ladder == NULL || m_containedBy || m_forgoRankRally ) // one who falls inside a building or a transport rallies nobody
- return;
- const Int grade = getRankGrade();
- const Real strength = ladder->aura( grade, RANK_AURA_RALLY );
- if( strength <= 0.0f )
- return;
- 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() )
- {
- if( other == this || other->isEffectivelyDead() || other->isKindOf( KINDOF_STRUCTURE ) || other->getContainedBy()
- || getRelationship( other ) != ALLIES
- || ThePartitionManager->getDistanceSquared( this, other, FROM_CENTER_2D ) > radius * radius )
- continue;
- other->raiseRankRally( strength, until );
- }
- DEBUG_LOG(("RANK RALLY frame=%d template=%s strength=%.2f radius=%.0f\n", TheGameLogic->getFrame(),
- 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()));
+ return getTemplate()->hasSpotterSight();
}
//-------------------------------------------------------------------------------------------------
@@ -5821,8 +5604,6 @@ void Object::look()
Real shroudClearingRange = getShroudClearingRange();
if( !isKindOf( KINDOF_STRUCTURE ) && !isKindOf( KINDOF_DOZER ) && !isSpotter() )
shroudClearingRange = Object_armedShroudClearingRange( shroudClearingRange, getLargestWeaponRange() );
- // a rank's eyes and a leader's sight aura reach past the weapon cap; onRankSightChanged looks again
- shroudClearingRange *= getRankSightScalar();
if( isSightJammed() )
shroudClearingRange = min( shroudClearingRange, JAMMED_SHROUD_CLEARING_RANGE );
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
index b4c4da90c..20ef020dc 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp
@@ -1056,21 +1056,11 @@ Bool AIUpdateInterface::chooseLocomotorSetExplicit(LocomotorSetType wst)
}
m_locomotorSet.setSpeedScale(obj->getTemplate()->getSpeedScale());
m_curLocomotorSet = wst;
- refreshVeterancySpeed();
return TRUE;
}
return FALSE;
}
-//-------------------------------------------------------------------------------------------------
-void AIUpdateInterface::refreshVeterancySpeed()
-{
- // the grade's speed, its own SPEED perk and a leader's pace aura, each multiplying
- const Object* obj = getObject();
- 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)));
-}
-
//-------------------------------------------------------------------------------------------------
void AIUpdateInterface::chooseGoodLocomotorFromCurrentSet( void )
{
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp
index 72a8868b6..238d44908 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/SpecialAbilityUpdate.cpp
@@ -625,20 +625,10 @@ Bool SpecialAbilityUpdate::getCaptureProgress( ObjectID *targetID, Real *progres
if( total == 0 || m_prepFrames > total )
return FALSE;
- // 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 );
+ *progress = 1.0f - (Real)m_prepFrames / (Real)total;
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
{
@@ -1046,9 +1036,6 @@ void SpecialAbilityUpdate::startPreparation()
//Set the preparation timer
m_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/Upgrade/MaxHealthUpgrade.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Upgrade/MaxHealthUpgrade.cpp
index fd46b8354..ad81fa535 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Upgrade/MaxHealthUpgrade.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Upgrade/MaxHealthUpgrade.cpp
@@ -91,7 +91,7 @@ void MaxHealthUpgrade::upgradeImplementation( )
// to carry the promotion's bonus too. Without it an Elite Paladin that researched Composite
// Armor ended on 750 where one armored first and promoted later ended on 780.
// The lobby's handicap is a multiplier that is already in the max health too.
- Real add = data->m_addMaxHealth * TheGlobalData->getRankHealthBonus( obj->getTemplate(), obj->getVeterancyLevel(), obj->getRankGrade() )
+ Real add = data->m_addMaxHealth * TheGlobalData->m_healthBonus[ obj->getVeterancyLevel() ]
* obj->getHandicapHealthFactor();
body->setMaxHealth( body->getMaxHealth() + add, data->m_maxHealthChangeType );
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp
index e19c35599..32615692d 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Weapon.cpp
@@ -1107,10 +1107,6 @@ UnsignedInt WeaponTemplate::fireWeaponTemplate
//victimObj = NULL; // his position is already in victimPos, if he existed
- // a rank's steadier hand on the guns
- if( sourceObj )
- scatterRadius *= 1.0f - sourceObj->getRankPerk( RANK_PERK_SCATTER );
-
//Randomize the scatter radius (sometimes it can be more accurate than others)
scatterRadius = GameLogicRandomValueReal( 0, scatterRadius );
Real scatterAngleRadian = GameLogicRandomValueReal( 0, 2*PI );
@@ -2133,7 +2129,6 @@ static Bool lobbyHandicapScalesDamage( DamageType type )
}
}
-//-------------------------------------------------------------------------------------------------
void Weapon::computeBonus(const Object *source, WeaponBonusConditionFlags extraBonusFlags, WeaponBonus& bonus) const
{
bonus.clear();
@@ -2149,51 +2144,8 @@ void Weapon::computeBonus(const Object *source, WeaponBonusConditionFlags extraB
flags |= theirContain->getWeaponBonusPassedToPassengers();
}
- // a unit on a rank ladder takes its grade's rate of fire, damage and range instead of the global
- // VETERAN, ELITE and HERO lines, and from the Veteran pin its side's own lines (China's horde)
- const ThingTemplate* sourceTemplate = source->getTemplate();
- const RankLadder* ladder = TheGlobalData->getRankLadder(sourceTemplate);
- if (ladder)
- {
- const WeaponBonusConditionFlags RANK_FLAGS = (1 << WEAPONBONUSCONDITION_VETERAN)
- | (1 << WEAPONBONUSCONDITION_ELITE) | (1 << WEAPONBONUSCONDITION_HERO);
- TheGlobalData->m_weaponBonusSet->appendBonuses(flags & ~RANK_FLAGS, bonus);
- const WeaponBonusSet* sideSet = TheGlobalData->getVeterancyWeaponBonus(sourceTemplate, source->getVeterancyLevel());
- if (sideSet)
- sideSet->appendBonuses(flags, bonus);
- 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
- + ladder->perk(grade, RANK_PERK_RANGE));
- }
- else if (TheGlobalData->m_weaponBonusSet)
+ 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.
- // 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);
- if (auraRange > 0.0f && (sourceTemplate->acquiresBeyondVision() || m_template->getMinimumAttackRange() > 0.0f))
- bonus.setField(WeaponBonus::RANGE, bonus.getField(WeaponBonus::RANGE) + auraRange);
-
const WeaponBonusSet* extra = m_template->getExtraBonus();
if (extra)
extra->appendBonuses(flags, bonus);
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
index 951cd2a0c..869b8719e 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp
@@ -48,7 +48,6 @@
#include "Common/LatchRestore.h"
#include "Common/MapObject.h"
#include "Common/MatchHistory.h"
-#include "Common/MiscAudio.h"
#include "Common/MultiplayerSettings.h"
#include "Common/PerfTimer.h"
#include "Common/Player.h"
@@ -72,7 +71,6 @@
#include "GameClient/ControlBar.h"
#include "GameClient/Drawable.h"
-#include "GameClient/Eva.h"
#include "GameClient/GameClient.h"
#include "GameClient/GameText.h"
#include "GameClient/GUICallbacks.h"
@@ -99,7 +97,6 @@
#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"
@@ -4081,120 +4078,6 @@ static void unitTimings(void)
}
#endif
-//-------------------------------------------------------------------------------------------------
-/** The rank auras (docs/plans/RANK-LADDER.md in the wrapper), each object on its own frame of the second
- * (oncePerSecondTurn), so a late game's leaders do not all walk the object list on one frame. A
- * leader's turn writes its strength into the gathered slots of the friendly units within
- * its radius, keeping the larger, so three leaders of one kind give the strongest one's and the
- * order of the turns does not matter. A unit's own turn takes what was gathered since its last one,
- * every leader's once, as what it holds. 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 leader's next turn.
- * A unit whose sight moved looks again, one whose pace moved takes its new speed, and a drill aura
- * teaches. */
-//-------------------------------------------------------------------------------------------------
-static void rankAuraTake( Object *obj )
-{
- const Real sightBefore = obj->getRankSightScalar();
- Real before[ RANK_AURA_PASSED ];
- for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )
- before[ aura ] = obj->getRankAura( (RankAura)aura );
- obj->takeGatheredRankAuras();
-
- // a unit that came into or left a leader's reach logs what it holds now
- Bool moved = FALSE;
- for( Int aura = 0; aura < RANK_AURA_PASSED; ++aura )
- moved = moved || obj->getRankAura( (RankAura)aura ) != before[ aura ];
- if( moved )
- 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_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( sightBefore );
- if( obj->getRankAura( RANK_AURA_PACE ) != before[ 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
- const Int drillCap = REAL_TO_INT_FLOOR( obj->getRankAura( RANK_AURA_DRILL ) );
- const RankLadder *drillLadder = drillCap > 0 ? TheGlobalData->getRankLadder( obj->getTemplate() ) : NULL;
- ExperienceTracker *tracker = obj->getExperienceTracker();
- if( drillLadder && !obj->isEffectivelyDead() && tracker->isTrainable() && tracker->getExperienceSink() == INVALID_ID )
- {
- const Int gain = drillLadder->drillGain( RankLadder::unitValue( obj->getTemplate() ), tracker->getCurrentExperience(),
- drillCap, TheGlobalData->m_rankDrillRate );
- if( gain > 0 )
- tracker->addExperiencePoints( gain, FALSE );
- }
-}
-
-static void rankAuraGive( Object *leader )
-{
- const RankLadder *ladder = TheGlobalData->getRankLadder( leader->getTemplate() );
- // a leader inside a building, a bunker or a transport leads nobody and spots nothing
- if( ladder == NULL || leader->isEffectivelyDead() || leader->testStatus( OBJECT_STATUS_UNDER_CONSTRUCTION )
- || leader->getContainedBy() )
- return;
- const Int grade = leader->getRankGrade();
- 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;
- }
- gives = gives && leader->leadsRankAuras();
- const Real detect = ladder->perk( grade, RANK_PERK_DETECT );
- if( !gives && detect <= 0.0f )
- return;
-
- const Coord3D *at = leader->getPosition();
- for( Object *other = TheGameLogic->getFirstObject(); other; other = other->getNextObject() )
- {
- if( other == leader || other->isEffectivelyDead() || other->getContainedBy() )
- continue;
- const Real dx = other->getPosition()->x - at->x, dy = other->getPosition()->y - at->y;
- const Real distSqr = dx * dx + dy * dy;
- if( detect > 0.0f && distSqr <= detect * detect && other->getStealth()
- && other->testStatus( OBJECT_STATUS_STEALTHED ) && leader->getRelationship( other ) == ENEMIES )
- {
- // a fresh find pings the leader's owner the way StealthDetectorUpdate does, after the tick
- if( !other->testStatus( OBJECT_STATUS_DETECTED ) && ThePlayerList->getLocalPlayer() == leader->getControllingPlayer() )
- {
- const Coord3D found = *other->getPosition();
- const Int playerIndex = leader->getControllingPlayer()->getPlayerIndex();
- const EvaMessage message = other->getStealth()->getEnemyDetectionEvaEvent();
- LogicThread::callAfterTick( [found, playerIndex, message]()
- {
- if( !TheRadar->tryEvent( RADAR_EVENT_STEALTH_DISCOVERED, &found ) )
- return;
- static AudioEventRTS discoveredSound = TheAudio->getMiscAudio()->m_stealthDiscoveredSound;
- discoveredSound.setPlayerIndex( playerIndex );
- TheAudio->addAudioEvent( &discoveredSound );
- TheInGameUI->message( TheGameText->fetch( "MESSAGE:StealthDiscovered" ) );
- if( message != EVA_Invalid && TheEva != NULL )
- TheEva->setShouldPlay( message );
- } );
- }
- other->getStealth()->markAsDetected( LOGICFRAMES_PER_SECOND + 1 );
- }
- 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 && distSqr <= radiusSqr[ aura ]
- && ( structure ? reach[ aura ] == RANK_REACH_STRUCTURES : reach[ aura ] != RANK_REACH_INFANTRY || infantry ) )
- other->raiseRankAura( (RankAura)aura, strength[ aura ] );
- }
-}
-
DECLARE_PERF_TIMER(GameLogic_update)
DECLARE_PERF_TIMER(GameLogic_update_normal)
DECLARE_PERF_TIMER(GameLogic_update_sleepy)
@@ -4792,28 +4675,6 @@ static void salvageCrateCall( Object *crate )
same turns on the same frames. */
static void oncePerSecondTurn( Object *obj )
{
- rankAuraTake( obj );
- rankAuraGive( obj );
-
- // Faction veterancy's self-repair (GLA): 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 leader's mend aura heals at once, hurt
- // recently or not, and a unit takes the larger of the two.
- const UnsignedInt now = TheGameLogic->getFrame();
- 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() )
- {
- const BodyModuleInterface *body = obj->getBodyModule();
- const UnsignedInt lastHurt = body->getLastDamageTimestamp();
- const Bool resting = !( lastHurt <= now && now - lastHurt < TheGlobalData->m_veterancySelfRepairDelay );
- const Real share = MAX( aura, resting ? self : 0.0f );
- if( share > 0.0f && body->getHealth() < body->getMaxHealth() )
- obj->attemptHealing( body->getMaxHealth() * share, obj );
- }
-
neutralBuildingRepair( obj );
salvageCrateCall( obj );
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
index f6069607f..179cb25c9 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/ScenarioDrill.cpp
@@ -252,8 +252,6 @@ static Bool parseActionType( const AsciiString &token, ScenarioActionType *actio
*action = SCENARIO_ACTION_REPEAT;
else if (token == "givemoney")
*action = SCENARIO_ACTION_GIVEMONEY;
- else if (token == "rank")
- *action = SCENARIO_ACTION_RANK;
else if (token == "reachproof")
*action = SCENARIO_ACTION_REACHPROOF;
else if (token == "topup")
@@ -358,7 +356,6 @@ static Int tokensNeededFor( ScenarioActionType action )
case SCENARIO_ACTION_PRODUCE: return SCENARIO_TOKENS_ATTACK;
case SCENARIO_ACTION_REPEAT: return SCENARIO_TOKENS_ATTACK;
case SCENARIO_ACTION_GIVEMONEY: return SCENARIO_TOKENS_STANCE;
- case SCENARIO_ACTION_RANK: return SCENARIO_TOKENS_STANCE;
case SCENARIO_ACTION_REACHPROOF: return SCENARIO_TOKENS_ATTACK;
case SCENARIO_ACTION_STOP: return SCENARIO_TOKENS_STOP;
case SCENARIO_ACTION_CLICKSTOP: return SCENARIO_TOKENS_STOP;
@@ -506,21 +503,6 @@ ScenarioParseResult ScenarioDrill_parseLine( const char *line, ScenarioAction *a
return SCENARIO_PARSE_BAD_ACTION;
break;
- case SCENARIO_ACTION_RANK:
- action->name = tokens[ SCENARIO_STANCE_NAME_TOKEN ];
- // xp N: N same-class kills of experience; grade N: the ladder's grade N
- if (action->name == "xp" || action->name == "grade")
- {
- if (count <= SCENARIO_STANCE_NAME_TOKEN + 1)
- return SCENARIO_PARSE_MISSING_ARGS;
- if (!parseWholeNumber( tokens[ SCENARIO_STANCE_NAME_TOKEN + 1 ], &action->count ))
- return SCENARIO_PARSE_BAD_COUNT;
- break;
- }
- if (action->name != "veteran" && action->name != "elite" && action->name != "heroic")
- return SCENARIO_PARSE_BAD_ACTION;
- break;
-
case SCENARIO_ACTION_PRODUCE:
{
action->targetSelector = tokens[ 4 ]; // what to make
@@ -1957,32 +1939,6 @@ static Bool executeOrder( const ScenarioAction &action, Player *player, const Co
return TRUE;
}
- case SCENARIO_ACTION_RANK:
- {
- const VeterancyLevel level = action.name == "veteran" ? LEVEL_VETERAN
- : action.name == "elite" ? LEVEL_ELITE : LEVEL_HEROIC;
- const VecObjectID &ids = group->getAllIDs();
- for (VecObjectID::const_iterator it = ids.begin(); it != ids.end(); ++it)
- {
- Object *obj = TheGameLogic->findObjectByID( *it );
- ExperienceTracker *tracker = obj->getExperienceTracker();
- const RankLadder *ladder = TheGlobalData->getRankLadder( obj->getTemplate() );
- const Int unitValue = RankLadder::unitValue( obj->getTemplate() );
- if (action.name == "xp")
- tracker->setExperienceAndLevel( action.count * unitValue );
- else if (action.name == "grade" && ladder)
- tracker->setExperienceAndLevel( ladder->threshold( unitValue, action.count ) );
- else if (action.name != "grade")
- tracker->setVeterancyLevel( level );
- DEBUG_LOG(("SCENARIO: frame %d rank slot %d '%s' %s xp=%d grade=%d level=%d\n", action.frame, action.slot,
- obj->getTemplate()->getName().str(), action.name.str(), tracker->getCurrentExperience(),
- tracker->getGrade(), (Int)tracker->getVeterancyLevel()));
- }
- DEBUG_LOG(("SCENARIO: frame %d rank slot %d '%s' x%d %s %d\n",
- action.frame, action.slot, action.selector.str(), taken, action.name.str(), action.count));
- break;
- }
-
case SCENARIO_ACTION_STOP:
{
group->groupIdle( CMD_FROM_SCRIPT );
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp
index d0f1de746..023992548 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/Gadget/W3DPushButton.cpp
@@ -122,31 +122,6 @@ static const Real CLASSIC_KEY_BADGE_DESIGN_POINTS = 12.0f;
* 800 and height over 600 - so the wider the screen against its height, the faster the lettering
* grew away from the buttons it sits on. At 2560x1080 the markings came out half again too big.
* One design size, times the bar's own scale, and a cameo looks the same on every monitor. */
-//=============================================================================
-/** EA's overlays (the chevrons) are drawn over the whole button. An image with its own DisplayHeight,
- * a rank insignia cropped to its ink, keeps its shape in the top left corner instead: that many
- * forty-eighths of the button's height, as wide as its shape says, up to half again its height and
- * half the button. Every rank cell carries a DisplayHeight for this; one without it was stretched
- * over the whole portrait. */
-static void drawOverlayImage( const Image *image, Int x, Int y, Int width, Int height )
-{
- if( image->getDisplayHeight() <= 0 )
- {
- TheDisplay->drawImage( image, x, y, x + width, y + height );
- return;
- }
- Real high = height * image->getDisplayHeight() / 48.0f;
- Real wide = high * image->getImageWidth() / image->getImageHeight();
- const Real widest = MIN( high * 1.5f, width * 0.5f );
- if( wide > widest )
- {
- high *= widest / wide;
- wide = widest;
- }
- const Int inset = 2;
- TheDisplay->drawImage( image, x + inset, y + inset, x + inset + REAL_TO_INT( wide ), y + inset + REAL_TO_INT( high ) );
-}
-
//=============================================================================
static GameFont *getBadgeFont( GameWindow *window, Real designPoints = BADGE_DESIGN_POINTS )
{
@@ -532,7 +507,7 @@ void W3DGadgetPushButtonDraw( GameWindow *window, WinInstanceData *instData )
if( pData->overlayImage )
{
//Render the overlay image now.
- drawOverlayImage( pData->overlayImage, origin.x, origin.y, size.x, size.y );
+ TheDisplay->drawImage( pData->overlayImage, origin.x, origin.y, origin.x + size.x, origin.y + size.y );
}
if( pData->drawClock )
@@ -709,7 +684,7 @@ void W3DGadgetPushButtonImageDrawOne( GameWindow *window,
if( pData->overlayImage )
{
//Render the overlay image now.
- drawOverlayImage( pData->overlayImage, start.x, start.y, size.x, size.y );
+ TheDisplay->drawImage( pData->overlayImage, start.x, start.y, start.x + size.x, start.y + size.y );
}
if( pData->drawClock )
@@ -977,7 +952,7 @@ void W3DGadgetPushButtonImageDrawThree(GameWindow *window, WinInstanceData *inst
if( pData->overlayImage )
{
//Render the overlay image now.
- drawOverlayImage( pData->overlayImage, origin.x, origin.y, size.x, size.y );
+ TheDisplay->drawImage( pData->overlayImage, origin.x, origin.y, origin.x + size.x, origin.y + size.y );
}
if( pData->drawClock )
diff --git a/GeneralsMD/Code/Tests/test_rank_ladder.cpp b/GeneralsMD/Code/Tests/test_rank_ladder.cpp
deleted file mode 100644
index aaf409f00..000000000
--- a/GeneralsMD/Code/Tests/test_rank_ladder.cpp
+++ /dev/null
@@ -1,539 +0,0 @@
-/*
- * 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, 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"
-
-#include "test_harness.h"
-
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "Common/GlobalData.h"
-
-/* BalanceReforged.ini's Veterancy block, one side at a time */
-static RankLadder makeLadder( Int grades, Int veteran, Int elite, Int heroic, Int heroStart,
- Real rateOfFire, Real damage, Real health )
-{
- RankLadder ladder;
- ladder.clear();
- ladder.m_grades = grades;
- ladder.m_top = 120.0f;
- ladder.m_pin[LEVEL_VETERAN] = veteran;
- ladder.m_pin[LEVEL_ELITE] = elite;
- ladder.m_pin[LEVEL_HEROIC] = heroic;
- ladder.m_heroStart = heroStart;
- ladder.m_statTop[RANK_STAT_RATE_OF_FIRE] = rateOfFire;
- ladder.m_statTop[RANK_STAT_DAMAGE] = damage;
- ladder.m_statTop[RANK_STAT_HEALTH] = health;
- ladder.finish( 1.4f );
- return ladder;
-}
-
-static RankLadder america() { return makeLadder( 28, 4, 13, 22, 23, 1.42f, 1.19f, 1.42f ); }
-static RankLadder china() { return makeLadder( 19, 4, 10, 15, 15, 1.30f, 1.19f, 1.55f ); }
-static RankLadder gla() { return makeLadder( 20, 4, 10, 15, 15, 1.48f, 1.14f, 1.42f ); }
-
-TEST(rank_ladder_ratio_puts_every_top_at_120_kills)
-{
- /* grade 0 is unranked on every side, so China's Private and GLA's Recruit are grade 1 */
- CHECK_NEAR( america().m_ratio, 1.0935f, 0.0005f );
- CHECK_NEAR( china().m_ratio, 1.1775f, 0.0005f );
- CHECK_NEAR( gla().m_ratio, 1.1633f, 0.0005f );
-
- /* a Crusader, E 100: 12,000 to General of the Army, one kill to E-2 */
- const RankLadder usa = america();
- CHECK_NEAR( usa.threshold( 100, 28 ), 12000, 1 );
- CHECK_EQ( usa.threshold( 100, 1 ), 100 );
- CHECK_EQ( usa.threshold( 100, 0 ), 0 );
- /* the doc's table: Corporal 4.6 E, Warrant Officer 23.5 E, Lieutenant Colonel 65.7 E */
- CHECK_NEAR( usa.threshold( 100, 4 ), 460, 1 );
- CHECK_NEAR( usa.threshold( 100, 13 ), 2350, 3 );
- CHECK_NEAR( usa.threshold( 100, 22 ), 6570, 5 );
- /* the Heroic pins: China's Colonel 59.7 E, GLA's Warlord 53.1 E */
- CHECK_NEAR( china().threshold( 100, 15 ), 5972, 5 );
- CHECK_NEAR( gla().threshold( 100, 15 ), 5308, 5 );
- CHECK_EQ( china().threshold( 100, 1 ), 100 );
- CHECK_EQ( gla().threshold( 100, 1 ), 100 );
-}
-
-TEST(rank_ladder_small_values_round_once_and_never_fall_back)
-{
- /* the Red Guard's E of 5: each threshold is rounded from the sum, never step by step */
- const RankLadder ladder = china();
- for( Int grade = 1; grade <= ladder.m_grades; ++grade )
- CHECK( ladder.threshold( 5, grade ) >= ladder.threshold( 5, grade - 1 ) );
- CHECK_NEAR( ladder.threshold( 5, 19 ), 600, 1 );
-}
-
-TEST(rank_ladder_grade_and_level_follow_experience_and_pins)
-{
- const RankLadder usa = america();
- const Int corporal = usa.threshold( 100, 4 );
- CHECK_EQ( usa.gradeOf( 100, corporal - 1 ), 3 );
- CHECK_EQ( usa.gradeOf( 100, corporal ), 4 );
- CHECK_EQ( usa.gradeOf( 100, 0 ), 0 );
- CHECK_EQ( usa.gradeOf( 100, 1000000 ), 28 );
-
- CHECK_EQ( (Int)usa.levelOf( 3 ), (Int)LEVEL_REGULAR );
- CHECK_EQ( (Int)usa.levelOf( 4 ), (Int)LEVEL_VETERAN );
- CHECK_EQ( (Int)usa.levelOf( 12 ), (Int)LEVEL_VETERAN );
- CHECK_EQ( (Int)usa.levelOf( 13 ), (Int)LEVEL_ELITE );
- CHECK_EQ( (Int)usa.levelOf( 21 ), (Int)LEVEL_ELITE );
- CHECK_EQ( (Int)usa.levelOf( 22 ), (Int)LEVEL_HEROIC );
- CHECK_EQ( (Int)usa.levelOf( 28 ), (Int)LEVEL_HEROIC );
- CHECK_EQ( (Int)china().levelOf( 0 ), (Int)LEVEL_REGULAR );
- CHECK_EQ( (Int)china().levelOf( 3 ), (Int)LEVEL_REGULAR );
- CHECK_EQ( (Int)china().levelOf( 4 ), (Int)LEVEL_VETERAN );
- CHECK_EQ( (Int)china().levelOf( 14 ), (Int)LEVEL_ELITE );
- CHECK_EQ( (Int)china().levelOf( 15 ), (Int)LEVEL_HEROIC );
- CHECK_EQ( (Int)gla().levelOf( 9 ), (Int)LEVEL_VETERAN );
- CHECK_EQ( (Int)gla().levelOf( 10 ), (Int)LEVEL_ELITE );
-}
-
-TEST(rank_ladder_one_gain_lifts_one_grade_at_most)
-{
- const RankLadder usa = america();
-
- /* a Ranger (E 20) at grade 0 kills a Crusader worth 100: he stops one point short of grade 2 */
- const Int ranger = usa.clipGain( 20, 0, 100 );
- CHECK_EQ( ranger, usa.threshold( 20, 2 ) - 1 );
- CHECK_EQ( usa.gradeOf( 20, ranger ), 1 );
-
- /* a gain that fits is untouched */
- CHECK_EQ( usa.clipGain( 100, 0, 150 ), 150 );
-
- /* halfway through a grade the cap is still the second threshold above it */
- const Int mid = usa.threshold( 100, 10 ) + 50;
- CHECK_EQ( usa.clipGain( 100, mid, 100000 ), usa.threshold( 100, 12 ) - 1 - mid );
- CHECK_EQ( usa.gradeOf( 100, mid + usa.clipGain( 100, mid, 100000 ) ), 11 );
-
- /* from the next-to-last grade on nothing is clipped, and experience keeps growing past the top */
- CHECK_EQ( usa.clipGain( 100, usa.threshold( 100, 27 ), 100000 ), 100000 );
- CHECK_EQ( usa.clipGain( 100, usa.threshold( 100, 28 ) + 5, 777 ), 777 );
-}
-
-TEST(rank_ladder_stats_split_one_worth_curve)
-{
- const RankLadder ladders[] = { america(), china(), gla() };
- for( Int side = 0; side < 3; ++side )
- {
- const RankLadder &ladder = ladders[ side ];
- const Real *bottom = ladder.m_stat[ 0 ];
- CHECK_NEAR( bottom[RANK_STAT_RATE_OF_FIRE] * bottom[RANK_STAT_DAMAGE] * bottom[RANK_STAT_HEALTH], 1.0f, 0.0001f );
- const Real *top = ladder.m_stat[ ladder.m_grades ];
- CHECK_NEAR( top[RANK_STAT_RATE_OF_FIRE] * top[RANK_STAT_DAMAGE] * top[RANK_STAT_HEALTH], 2.40f, 0.01f );
- /* worth = 1 + 1.4 sqrt(total / 120) at every grade */
- for( Int grade = 1; grade <= ladder.m_grades; ++grade )
- {
- const Real *stat = ladder.m_stat[ grade ];
- const Real worth = stat[RANK_STAT_RATE_OF_FIRE] * stat[RANK_STAT_DAMAGE] * stat[RANK_STAT_HEALTH];
- CHECK_NEAR( worth, 1.0f + 1.4f * sqrtf( ladder.m_total[ grade ] / 120.0f ), 0.01f );
- CHECK( stat[RANK_STAT_HEALTH] >= ladder.m_stat[ grade - 1 ][RANK_STAT_HEALTH] );
- }
- }
- /* the hand-rolled ln and e agree with the CRT's: each stat is its top value to ln(worth) / ln(2.4) */
- const RankLadder &usa = ladders[ 0 ];
- for( Int grade = 0; grade <= usa.m_grades; ++grade )
- {
- const double share = log( 1.0 + 1.4 * sqrt( ( usa.m_total[ grade ] < 120.0f ? usa.m_total[ grade ] : 120.0f ) / 120.0 ) ) / log( 2.4 );
- CHECK_NEAR( usa.m_stat[ grade ][RANK_STAT_HEALTH], pow( 1.42, share ), 0.00001 );
- CHECK_NEAR( usa.m_stat[ grade ][RANK_STAT_RANGE], 1.0, 0.00001 );
- }
- CHECK_NEAR( usa.m_stat[ usa.m_grades ][RANK_STAT_RATE_OF_FIRE], 1.42f, 0.0005f );
-
- /* the first kill is worth 1.13 everywhere */
- const Real *first = ladders[ 0 ].m_stat[ 1 ];
- CHECK_NEAR( first[RANK_STAT_RATE_OF_FIRE] * first[RANK_STAT_DAMAGE] * first[RANK_STAT_HEALTH], 1.13f, 0.005f );
-}
-
-TEST(rank_ladder_hero_insignia_runs_from_its_start_to_the_top)
-{
- const RankLadder usa = america();
- CHECK_EQ( usa.insigniaIndex( 0, TRUE ), 23 );
- CHECK_EQ( usa.insigniaIndex( 28, TRUE ), 28 );
- CHECK_EQ( usa.insigniaIndex( 14, TRUE ), 25 );
- CHECK_EQ( usa.insigniaIndex( 14, FALSE ), 14 );
- CHECK_EQ( gla().insigniaIndex( 20, TRUE ), 20 );
- CHECK_EQ( china().insigniaIndex( 0, TRUE ), 15 );
- CHECK_EQ( china().insigniaIndex( 19, TRUE ), 19 );
-}
-
-TEST(rank_ladder_perks_carry_up_and_the_strongest_of_a_kind_holds)
-{
- /* Turkiye's Perk_ lines: sight 110%, 120%, 130% at 3, 8, 18; the rate-of-fire aura 10% at 16, and
- a 5% one at 10 as the Bascavus carried before auras moved above the Elite pin */
- RankLadder ladder;
- ladder.clear();
- ladder.m_grades = 21;
- ladder.m_top = 120.0f;
- ladder.m_pin[LEVEL_VETERAN] = 4;
- ladder.m_pin[LEVEL_ELITE] = 11;
- ladder.m_pin[LEVEL_HEROIC] = 16;
- ladder.m_auraRadius = 150.0f;
- ladder.m_perkAt[ 3 ][ RANK_PERK_SIGHT ] = 1.10f;
- ladder.m_perkAt[ 8 ][ RANK_PERK_SIGHT ] = 1.20f;
- ladder.m_perkAt[ 18 ][ RANK_PERK_SIGHT ] = 1.30f;
- ladder.m_perkAt[ 10 ][ RANK_PERK_AURA_RATE_OF_FIRE ] = 0.05f;
- ladder.m_perkAt[ 16 ][ RANK_PERK_AURA_RATE_OF_FIRE ] = 0.10f;
- ladder.m_perkAt[ 17 ][ RANK_PERK_DEATH_RALLY ] = 0.15f;
- ladder.m_perkAt[ 21 ][ RANK_PERK_AURA_RADIUS ] = 2.0f;
- ladder.finish( 1.4f );
-
- CHECK_EQ( ladder.perk( 2, RANK_PERK_SIGHT ), 0.0f );
- CHECK_NEAR( ladder.perk( 3, RANK_PERK_SIGHT ), 1.10f, 1e-6f );
- CHECK_NEAR( ladder.perk( 7, RANK_PERK_SIGHT ), 1.10f, 1e-6f );
- CHECK_NEAR( ladder.perk( 8, RANK_PERK_SIGHT ), 1.20f, 1e-6f );
- CHECK_NEAR( ladder.perk( 21, RANK_PERK_SIGHT ), 1.30f, 1e-6f );
-
- /* the Albay's 10% replaces the 5% below it, it does not add to it */
- CHECK_EQ( ladder.aura( 9, RANK_AURA_RATE_OF_FIRE ), 0.0f );
- CHECK_NEAR( ladder.aura( 10, RANK_AURA_RATE_OF_FIRE ), 0.05f, 1e-6f );
- CHECK_NEAR( ladder.aura( 16, RANK_AURA_RATE_OF_FIRE ), 0.10f, 1e-6f );
- 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; 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, raised at 7 and 11 where the NCOs' rate-of-fire auras were, 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( 6, RANK_PERK_RATE_OF_FIRE ), 0.05f, 1e-6f );
- CHECK_NEAR( usa.perk( 7, RANK_PERK_RATE_OF_FIRE ), 0.08f, 1e-6f );
- CHECK_NEAR( usa.perk( 11, RANK_PERK_RATE_OF_FIRE ), 0.10f, 1e-6f );
- CHECK_NEAR( usa.perk( 28, RANK_PERK_RATE_OF_FIRE ), 0.10f, 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 III from the Second Lieutenant, each with its own radius */
- CHECK_EQ( usa.aura( 17, RANK_AURA_RATE_OF_FIRE ), 0.0f );
- CHECK_NEAR( usa.aura( 18, RANK_AURA_RATE_OF_FIRE ), 0.12f, 1e-6f );
- CHECK_NEAR( usa.auraRadius( 18, RANK_AURA_RATE_OF_FIRE ), 140.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 starts on the Warrant Officer and reaches every unit; the steady aura is the W-2's */
- CHECK_EQ( usa.aura( 12, RANK_AURA_MEND ), 0.0f );
- 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 );
- CHECK_EQ( usa.aura( 13, RANK_AURA_STEADY ), 0.0f );
- CHECK_NEAR( usa.aura( 14, RANK_AURA_STEADY ), 0.35f, 1e-6f );
- CHECK_NEAR( usa.auraRadius( 14, RANK_AURA_STEADY ), 140.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_EQ( usa.aura( 24, RANK_AURA_DRILL ), 0.0f );
- 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, the NCOs' old auras on the man himself (shoulder to shoulder 4% then 7% while he
- stands, rate of fire, mend), 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_NEAR( prc.perk( 3, RANK_PERK_STILL_GUARD ), 0.04f, 1e-6f );
- CHECK_NEAR( prc.perk( 8, RANK_PERK_STILL_GUARD ), 0.07f, 1e-6f );
- CHECK_NEAR( prc.perk( 6, RANK_PERK_RATE_OF_FIRE ), 0.05f, 1e-6f );
- CHECK_NEAR( prc.perk( 7, RANK_PERK_MEND ), 0.005f, 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 from the Lieutenant Colonel, steady at Fearless's -50%, seize, and forced march for
- infantry only */
- CHECK_EQ( prc.aura( 13, RANK_AURA_GUARD ), 0.0f );
- CHECK_NEAR( prc.aura( 14, RANK_AURA_GUARD ), 0.10f, 1e-6f );
- CHECK_NEAR( prc.auraRadius( 14, RANK_AURA_GUARD ), 160.0f, 1e-3f );
- CHECK_EQ( prc.aura( 10, RANK_AURA_STEADY ), 0.0f );
- 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, then Move with me's 8% on the Squadhand himself, Patch-up, Scavenger, Tough,
- Cell survives */
- CHECK_NEAR( gla_.perk( 2, RANK_PERK_SPEED ), 0.05f, 1e-6f );
- CHECK_NEAR( gla_.perk( 6, RANK_PERK_SPEED ), 0.08f, 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 from the Raid Captain for every unit, II stronger */
- CHECK_EQ( gla_.aura( 9, RANK_AURA_PACE ), 0.0f );
- CHECK_NEAR( gla_.aura( 10, RANK_AURA_PACE ), 0.08f, 1e-6f );
- 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 and II from the Sector Commander, the last one paying for buildings' kills too */
- CHECK_EQ( gla_.aura( 13, RANK_AURA_SPOILS ), 0.0f );
- CHECK_NEAR( gla_.aura( 14, RANK_AURA_SPOILS ), 0.10f, 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 capped at 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 );
-}
-
-TEST(rank_ladder_drill_caps_below_the_grade_that_gives_it)
-{
- /* a cap at the giver's own grade feeds itself: China's Sergeant drilling up to Sergeant made every
- Sergeant a new drill leader, and Red Guard Training lands each Red Guard on that pin */
- 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 grade = 1; grade <= side.ladder.m_grades; ++grade )
- CHECK( side.ladder.aura( grade, RANK_AURA_DRILL ) < (Real)grade );
- }
-}
-
-TEST(rank_ladder_no_aura_below_the_elite_pin)
-{
- /* squads of corporals and sergeants ringing and buffing each other: auras are for officers */
- 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 grade = 0; grade < side.ladder.m_pin[LEVEL_ELITE]; ++grade )
- for( Int kind = 0; kind < RANK_AURA_COUNT; ++kind )
- {
- if( side.ladder.aura( grade, (RankAura)kind ) > 0.0f )
- printf( " %s grade %d gives %s\n", side.name, grade, TheRankAuraNames[ kind ] );
- CHECK_EQ( side.ladder.aura( grade, (RankAura)kind ), 0.0f );
- }
- }
-}
-
-TEST(rank_ladder_trainings_and_born_veterans_give_grades)
-{
- /* 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 )
- return;
- static char text[ 1 << 20 ];
- text[ fread( text, 1, sizeof( text ) - 1, fp ) ] = '\0';
- fclose( fp );
- struct Born { const char *name; Int grades; } const born[] =
- {
- { "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 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", 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; 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( 6 ), LEVEL_VETERAN );
- CHECK_EQ( prc.levelOf( 9 ), LEVEL_VETERAN );
-}
diff --git a/GeneralsMD/Code/Tools/aura_rings.py b/GeneralsMD/Code/Tools/aura_rings.py
deleted file mode 100644
index c810cfa91..000000000
--- a/GeneralsMD/Code/Tools/aura_rings.py
+++ /dev/null
@@ -1,99 +0,0 @@
-"""The ground rings under a Turkiye leader, one texture per aura kind (BalanceReforged.ini,
-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, so
-any set of them lies as one dial: never on top of each other, the same line weight and spacing
-whichever grades are there. The kinds are told apart by pattern, the colour only tints them:
-
- rate of fire 0.935-0.970 sixty short even ticks; every leader with an aura has it, so the
- outermost band is the reach itself
- sight 0.875 a fine dotted line
- guard 0.805 a thin line broken by eight small notches
- range 0.695-0.765 a graduated scale: a line with a long mark every sixth tick
- rally inside 0.66 a faint wash rising toward its edge, the middle left clear
-
-They are drawn white on black for SHADOW_ADDITIVE_DECAL; the INI's Color and Opacity set how much
-light each adds. The texture edge stays black, or clamping smears it across the ground.
-
- python Tools/aura_rings.py # writes Data/Art/Textures/ReforgedAura<Kind>.tga
-
-Drawn four times too big and brought down, which is the antialiasing."""
-import math
-import os
-import sys
-
-import numpy as np
-from PIL import Image
-
-SHIPPED = 512
-DRAWN = SHIPPED * 4
-LINE = 0.011 # every line's width, as a share of the radius
-OUT_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "Data", "Art", "Textures")
-
-
-def polar():
- c = (DRAWN - 1) / 2.0
- y, x = np.mgrid[0:DRAWN, 0:DRAWN].astype(np.float64)
- x = (x - c) / (DRAWN / 2.0)
- y = (y - c) / (DRAWN / 2.0)
- return np.hypot(x, y), np.arctan2(y, x)
-
-
-def arc_to_nearest(r, a, count):
- """Distance along the circle from each pixel to the nearest of count evenly spaced spokes."""
- step = 2 * math.pi / count
- return np.abs(a - np.round(a / step) * step) * r
-
-
-def ring(r, at):
- return np.abs(r - at) < LINE / 2
-
-
-def ramp(e0, e1, x):
- t = np.clip((x - e0) / (e1 - e0), 0.0, 1.0)
- return t * t * (3.0 - 2.0 * t)
-
-
-def rate_of_fire(r, a):
- return (r > 0.935) & (r < 0.970) & (arc_to_nearest(r, a, 60) < LINE / 2)
-
-
-def sight(r, a):
- at, count = 0.875, 96
- step = 2 * math.pi / count
- nearest = np.round(a / step) * step
- return np.hypot(r * np.cos(a) - at * np.cos(nearest), r * np.sin(a) - at * np.sin(nearest)) < LINE * 0.7
-
-
-def guard(r, a):
- return ring(r, 0.805) & (arc_to_nearest(r, a + math.pi / 8, 8) > 0.02)
-
-
-def range_scale(r, a):
- tick = np.round(a / (2 * math.pi / 72)).astype(np.int64) % 72
- inner = np.where(tick % 6 == 0, 0.695, 0.735)
- marks = (r > inner) & (r < 0.765) & (arc_to_nearest(r, a, 72) < LINE / 2)
- return marks | ring(r, 0.765)
-
-
-def rally(r, a):
- return 0.25 * ramp(0.30, 0.62, r) * (1.0 - ramp(0.62, 0.66, r))
-
-
-KINDS = (("RateOfFire", rate_of_fire), ("Sight", sight), ("Guard", guard), ("Range", range_scale), ("Rally", rally))
-
-
-def main():
- out_folder = sys.argv[1] if len(sys.argv) > 1 else OUT_FOLDER
- r, a = polar()
- for name, draw in KINDS:
- big = Image.fromarray(np.round(draw(r, a).astype(np.float64) * 255).astype(np.uint8), "L")
- grey = big.resize((SHIPPED, SHIPPED), Image.BOX)
- path = os.path.join(out_folder, "ReforgedAura%s.tga" % name)
- Image.merge("RGBA", (grey, grey, grey, grey)).save(path, compression="tga_rle")
- print(path)
-
-
-if __name__ == "__main__":
- main()
diff --git a/GeneralsMD/Code/Tools/rank_insignia.py b/GeneralsMD/Code/Tools/rank_insignia.py
deleted file mode 100644
index 498fd76b7..000000000
--- a/GeneralsMD/Code/Tools/rank_insignia.py
+++ /dev/null
@@ -1,101 +0,0 @@
-"""The rank marks America and GLA wear beside a unit's health bar, one for each rank: a gold bar for
-America, stacked one under the other, and a skull for GLA, laid out like China's gold stars.
-
-Both have a black edge and no background, so they read over any ground the way the score screen's
-star does. The game draws them twelve to fourteen pixels across, so the shapes are few and blunt.
-
- python Tools/rank_insignia.py
- writes Data/Art/Textures/ReforgedRankBar.tga, ReforgedRankSkull.tga and the
- ReforgedRankInsignia.ini that maps both.
-
-Drawn sixteen times too big and brought down, which is the antialiasing."""
-import os
-
-from PIL import Image, ImageChops, ImageDraw, ImageFilter
-
-HERE = os.path.dirname(os.path.abspath(__file__))
-SCALE = 16
-OUTLINE = 41 # a MaxFilter size, odd: the black edge round every mark, 20 drawn pixels
-BONE = (236, 228, 204)
-GOLD_TOP = (255, 232, 120)
-GOLD_BOTTOM = (196, 134, 24)
-TEXTURES = os.path.join(HERE, "..", "Data", "Art", "Textures")
-INI_PATH = os.path.join(HERE, "..", "Data", "INI", "MappedImages", "HandCreated", "ReforgedRankInsignia.ini")
-INI_HEADER = """; The rank marks America and GLA wear beside a unit's health bar, one for each rank. Written by
-; Tools/rank_insignia.py with the textures it names; do not edit by hand. Mapped images are not in
-; the multiplayer INI checksum.
-"""
-INI_ENTRY = """
-MappedImage %s
- Texture = %s.tga
- TextureWidth = %d
- TextureHeight = %d
- Coords = Left:0 Top:0 Right:%d Bottom:%d
- Status = NONE
-End
-"""
-
-
-def scaled(box):
- """A box or point in shipped pixels, in drawn pixels."""
- return tuple(round(value * SCALE) for value in box)
-
-
-def skull():
- """The bone of a 32-pixel skull with its holes cut, and its colour."""
- size = scaled((32, 32))
- bone = Image.new("L", size, 0)
- draw = ImageDraw.Draw(bone)
- draw.ellipse(scaled((4, 2, 28, 24)), fill=255) # cranium
- draw.rounded_rectangle(scaled((9, 17, 23, 29)), radius=3 * SCALE, fill=255) # jaw
- holes = Image.new("L", size, 0)
- draw = ImageDraw.Draw(holes)
- # big sockets: at twelve pixels the eyes are what makes it a skull and not a white dot
- draw.ellipse(scaled((6.5, 9, 14.5, 17.5)), fill=255)
- draw.ellipse(scaled((17.5, 9, 25.5, 17.5)), fill=255)
- draw.polygon([scaled((16, 17.5)), scaled((13.5, 21.5)), scaled((18.5, 21.5))], fill=255) # nose
- for x in (13, 16, 19): # gaps between the teeth
- draw.rectangle(scaled((x - 0.75, 24, x + 0.75, 29)), fill=255)
- shape = ImageChops.subtract(bone, holes)
- colour = Image.new("RGB", size, BONE)
- return shape, colour
-
-
-def bar():
- """A 32 by 16 gold bar, light along the top and dark along the bottom like struck metal."""
- size = scaled((32, 16))
- shape = Image.new("L", size, 0)
- ImageDraw.Draw(shape).rounded_rectangle(scaled((3, 3, 29, 13)), radius=2 * SCALE, fill=255)
- colour = Image.new("RGB", size)
- draw = ImageDraw.Draw(colour)
- for y in range(size[1]):
- share = min(1.0, max(0.0, (y - 3 * SCALE) / (10 * SCALE)))
- draw.line((0, y, size[0], y), fill=tuple(round(top + (bottom - top) * share)
- for top, bottom in zip(GOLD_TOP, GOLD_BOTTOM)))
- return shape, colour
-
-
-def finish(shape, colour):
- """The mark on black where the edge goes; holes stay inside the edge, so they come out black."""
- alpha = shape.filter(ImageFilter.MaxFilter(OUTLINE))
- black = Image.new("RGB", shape.size, (0, 0, 0))
- art = Image.composite(colour, black, shape)
- art.putalpha(alpha)
- return art.resize((shape.width // SCALE, shape.height // SCALE), Image.LANCZOS)
-
-
-def main():
- ini_text = INI_HEADER
- for name, (shape, colour) in (("ReforgedRankBar", bar()), ("ReforgedRankSkull", skull())):
- art = finish(shape, colour)
- path = os.path.join(TEXTURES, name + ".tga")
- art.save(path)
- print(path)
- ini_text += INI_ENTRY % (name, name, art.width, art.height, art.width, art.height)
- with open(INI_PATH, "w", newline="\r\n") as ini:
- ini.write(ini_text)
- print(INI_PATH)
-
-
-if __name__ == "__main__":
- main()
diff --git a/GeneralsMD/Code/Tools/rank_insignia_cells.py b/GeneralsMD/Code/Tools/rank_insignia_cells.py
deleted file mode 100644
index de7d9307a..000000000
--- a/GeneralsMD/Code/Tools/rank_insignia_cells.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""The rank atlases' mapped images as the game reads them, shared by the three rank_insignia_*.py
-generators: each cell cropped to its ink, so a row of stars or a warrant bar draws at its own shape
-instead of squeezed into a square; named for its grade, Rank<Side>_<n> in the order the atlas holds
-them, which is the order of the side's ladder; and every cell given its DisplayHeight, 14 for the
-stacked or busy ones and 12 for the rest. A cell with no ink (America's E-1) gets no image and draws nothing."""
-import re
-
-ENTRY = re.compile(r"MappedImage (\S+)\n(.*?)Coords = Left:(\d+) Top:(\d+) Right:(\d+) Bottom:(\d+)\n(.*?)End\n", re.S)
-INK = 16 # alpha under this is the antialiasing's fringe, not ink
-TALL = " DisplayHeight = 14\n"
-# written on every cell, not only the tall ones: the command bar draws an overlay with no DisplayHeight
-# over the whole button the way EA's chevrons go, which stretched a 12-high insignia over the portrait
-SHORT = " DisplayHeight = 12\n"
-
-
-def ink_entries(atlas, ini_text, side, tall=()):
- """ini_text with every entry renamed, cropped and sized; tall holds the grades drawn 14 high."""
- alpha = atlas.getchannel("A").point(lambda v: 255 if v >= INK else 0)
- grades = iter(range(len(ENTRY.findall(ini_text))))
-
- def rewrite(match):
- grade = next(grades)
- left, top, right, bottom = (int(v) for v in match.group(3, 4, 5, 6))
- box = alpha.crop((left, top, right, bottom)).getbbox()
- if box is None:
- return ""
- return "MappedImage Rank%s_%d\n%sCoords = Left:%d Top:%d Right:%d Bottom:%d\n%s%sEnd\n" % (
- side, grade, match.group(2), left + box[0], top + box[1], left + box[2], top + box[3],
- match.group(7), TALL if grade in tall else SHORT)
-
- return ENTRY.sub(rewrite, ini_text)
-
-
-if __name__ == "__main__":
- from PIL import Image
- test = Image.new("RGBA", (128, 64), (0, 0, 0, 0))
- test.paste((255, 255, 255, 255), (70, 10, 90, 20))
- entry = "MappedImage A\n Texture = t.tga\n Coords = Left:%d Top:0 Right:%d Bottom:64\n Status = NONE\nEnd\n"
- out = ink_entries(test, "; x\n" + entry % (0, 64) + entry % (64, 128), "Test", tall=(1,))
- assert "RankTest_0" not in out, out
- assert "MappedImage RankTest_1" in out and "Left:70 Top:10 Right:90 Bottom:20" in out and TALL in out, out
- short = ink_entries(test, "; x\n" + entry % (0, 64) + entry % (64, 128), "Test")
- assert SHORT in short, short
- print("ok")
diff --git a/GeneralsMD/Code/Tools/rank_insignia_china.py b/GeneralsMD/Code/Tools/rank_insignia_china.py
deleted file mode 100644
index 840311a59..000000000
--- a/GeneralsMD/Code/Tools/rank_insignia_china.py
+++ /dev/null
@@ -1,244 +0,0 @@
-"""Rank marks for China, one for every rank of the PLA Ground Force, from private to general.
-
-Each mark is the shoulder board's sign without the board, simplified for twelve to fourteen pixels
-high: silver chevrons for conscripts, gold for sergeants, the senior sergeants' pine branches traded
-for one to four pips beside three chevrons, stars in a tight cluster (two side by side, three in a
-triangle, four two over two) over one short stripe for company officers and two for field officers,
-and the generals' stars cupped by a laurel arc. Chevrons are steep and narrow and no mark is wider
-than half again its height, since wide marks made the health bar look heavy. A dark red edge and no
-background, so they read over sand and grass the way the America and GLA marks do.
-
-The ranks are the 2022 ones. The reform renamed two sergeant grades and kept their boards:
-二级上士 was 上士 and 一级上士 was 四级军士长, so those two marks serve the old names as well.
-
- python Tools/rank_insignia_china.py
- writes Data/Art/Textures/ReforgedRanksChina.tga, one 64-pixel cell per rank, and the
- ReforgedRanksChina.ini that names each cell RankChina_<code>.
-
- python Tools/rank_insignia_china.py preview <png>
- also writes a labelled sheet of every mark at game size and at full size.
-
-Drawn eight times too big and brought down, which is the antialiasing."""
-import math
-import os
-import sys
-
-from PIL import Image, ImageDraw, ImageFilter, ImageFont
-
-from rank_insignia_cells import ink_entries
-
-HERE = os.path.dirname(os.path.abspath(__file__))
-SCALE = 8
-CELL = 64
-COLUMNS = 8
-ROWS = 4
-OUTLINE = 21 # a MaxFilter size, odd: the dark edge round every mark, 10 drawn pixels
-EDGE = (40, 6, 4)
-GOLD_TOP = (255, 226, 110)
-GOLD_BOTTOM = (200, 128, 20)
-NAME = "ReforgedRanksChina"
-TEXTURE_PATH = os.path.join(HERE, "..", "Data", "Art", "Textures", NAME + ".tga")
-INI_PATH = os.path.join(HERE, "..", "Data", "INI", "MappedImages", "HandCreated", NAME + ".ini")
-INI_HEADER = """; China's rank marks, one per PLA Ground Force rank, all in one texture. Written by
-; Tools/rank_insignia_china.py with the texture it names; do not edit by hand. Mapped images are
-; not in the multiplayer INI checksum.
-"""
-INI_ENTRY = """
-MappedImage RankChina_%s
- Texture = %s.tga
- TextureWidth = %d
- TextureHeight = %d
- Coords = Left:%d Top:%d Right:%d Bottom:%d
- Status = NONE
-End
-"""
-
-CHEVRON = 6.5 # every chevron one weight: the board's thin and thick came out alike at game size
-GAP = 3.0
-RISE = 12.0 # steep and narrow, so a lone chevron is no wider than half again its height
-CHEVRON_HALF_WIDTH = 14
-PIP = 5.0 # radius of a senior sergeant's pip
-PIP_PITCH = 11.5
-SILVER_TOP = (252, 252, 252)
-SILVER_BOTTOM = (138, 146, 160)
-
-# code, English, Chinese, what the mark is: chevrons with their count, pips beside and metal;
-# conscripts wear silver so a private and a corporal part by colour, not by a chevron's thickness,
-# and the senior sergeants keep three chevrons and count pips instead of pine needles
-RANKS = (
- ("NONE", "Unranked", "", ("none",)), # grade 0 on every side: no mark, so the cell stays empty
- ("PVT", "Private", "列兵", ("chevrons", 1, 0, "silver")),
- ("PFC", "Private First Class", "上等兵", ("chevrons", 2, 0, "silver")),
- ("CPL", "Corporal", "下士", ("chevrons", 1, 0, "gold")),
- ("SGT", "Sergeant", "中士", ("chevrons", 2, 0, "gold")),
- ("SSG2", "Staff Sergeant 2nd Class (was Staff Sergeant 上士)", "二级上士", ("chevrons", 3, 0, "gold")),
- ("SSG1", "Staff Sergeant 1st Class (was Master Sergeant 4th Class 四级军士长)", "一级上士",
- ("chevrons", 3, 1, "gold")),
- ("MSG3", "Master Sergeant 3rd Class", "三级军士长", ("chevrons", 3, 2, "gold")),
- ("MSG2", "Master Sergeant 2nd Class", "二级军士长", ("chevrons", 3, 3, "gold")),
- ("MSG1", "Master Sergeant 1st Class", "一级军士长", ("chevrons", 3, 4, "gold")),
- ("2LT", "Second Lieutenant", "少尉", ("officer", 1, 1)),
- ("1LT", "First Lieutenant", "中尉", ("officer", 1, 2)),
- ("CPT", "Captain", "上尉", ("officer", 1, 3)),
- ("MAJ", "Major", "少校", ("officer", 2, 1)),
- ("LTC", "Lieutenant Colonel", "中校", ("officer", 2, 2)),
- ("COL", "Colonel", "上校", ("officer", 2, 3)),
- ("SCOL", "Senior Colonel", "大校", ("officer", 2, 4)),
- ("MG", "Major General", "少将", ("general", 1)),
- ("LTG", "Lieutenant General", "中将", ("general", 2)),
- ("GEN", "General", "上将", ("general", 3)),
-)
-
-
-def scaled(points):
- """Points in shipped pixels, in drawn pixels."""
- return [(x * SCALE, y * SCALE) for x, y in points]
-
-
-def star(draw, cx, cy, radius):
- """A five-pointed star, point up."""
- points = []
- for i in range(10):
- r = radius if i % 2 == 0 else radius * 0.5
- angle = math.radians(-90 + 36 * i)
- points.append((cx + r * math.cos(angle), cy + r * math.sin(angle)))
- draw.polygon(scaled(points), fill=255)
-
-
-def stars(draw, count, cy, radius, pitch):
- """count stars in a tight cluster centred across the cell on cy: two side by side, three in a
- triangle, four two over two, so no mark runs wider than half again its height. Returns the
- cluster's half width and its bottom."""
- layout = {1: [(0, 0)],
- 2: [(-0.5, 0), (0.5, 0)],
- 3: [(0, -0.45), (-0.5, 0.45), (0.5, 0.45)],
- 4: [(-0.5, -0.5), (0.5, -0.5), (-0.5, 0.5), (0.5, 0.5)]}[count]
- for x, y in layout:
- star(draw, 32 + x * pitch, cy + y * pitch, radius)
- half_width = max(x for x, _ in layout) * pitch + radius * 0.95
- return half_width, cy + max(y for _, y in layout) * pitch + radius * 0.81
-
-
-def chevron(draw, cx, top, half_width):
- """A chevron pointing up, its apex at (cx, top)."""
- draw.polygon(scaled([(cx, top), (cx + half_width, top + RISE), (cx + half_width, top + RISE + CHEVRON),
- (cx, top + CHEVRON), (cx - half_width, top + RISE + CHEVRON),
- (cx - half_width, top + RISE)]), fill=255)
-
-
-def pips(draw, count, cx, cy):
- """Up to four pips two by two, the top row filled first."""
- rows = [min(count, 2), count - 2] if count > 2 else [count]
- for r, in_row in enumerate(rows):
- y = cy + (r - (len(rows) - 1) / 2) * PIP_PITCH
- for c in range(in_row):
- x = cx + (c - 0.5) * PIP_PITCH
- draw.ellipse(scaled([(x - PIP, y - PIP), (x + PIP, y + PIP)]), fill=255)
-
-
-def mark(kind):
- """The shape of one rank's mark, white on black, CELL by CELL in drawn pixels."""
- shape = Image.new("L", (CELL * SCALE, CELL * SCALE), 0)
- draw = ImageDraw.Draw(shape)
- if kind[0] == "chevrons":
- _, count, pip_count, _ = kind
- height = count * CHEVRON + (count - 1) * GAP + RISE
- top = (CELL - height) / 2
- cx = 32 - (PIP_PITCH + 2 * PIP + 3) / 2 if pip_count else 32
- for i in range(count):
- chevron(draw, cx, top + i * (CHEVRON + GAP), CHEVRON_HALF_WIDTH)
- if pip_count:
- pips(draw, pip_count, cx + CHEVRON_HALF_WIDTH + 3 + PIP + PIP_PITCH / 2, top + height / 2)
- elif kind[0] == "none":
- pass
- elif kind[0] == "officer":
- # stars over the board's stripe, one for company officers and two for field officers, the
- # stripe only as wide as the stars
- _, stripe_count, count = kind
- half, bottom = stars(draw, count, 18, 8.5, 16)
- half = max(half, 10)
- for i in range(stripe_count):
- y = bottom + 3 + 6.5 * i
- draw.rectangle(scaled([(32 - half, y), (32 + half, y + 4)]), fill=255)
- else:
- # bigger stars cupped by a plain thick laurel arc for the wreath
- _, count = kind
- cy = 20
- half, bottom = stars(draw, count, cy, 9, 17)
- drop = bottom - cy + 8
- draw.arc(scaled([(32 - half, cy - drop), (32 + half, cy + drop)]),
- start=15, end=165, fill=255, width=round(4 * SCALE))
- return shape
-
-
-def finish(shape, kind):
- """The mark in its metal, light at the top and dark at the bottom, on its dark edge."""
- size = shape.size
- colour = Image.new("RGB", size)
- draw = ImageDraw.Draw(colour)
- top_colour, bottom_colour = (SILVER_TOP, SILVER_BOTTOM) if kind[-1] == "silver" else (GOLD_TOP, GOLD_BOTTOM)
- for y in range(size[1]):
- share = y / (size[1] - 1)
- draw.line((0, y, size[0], y), fill=tuple(round(top + (bottom - top) * share)
- for top, bottom in zip(top_colour, bottom_colour)))
- art = Image.composite(colour, Image.new("RGB", size, EDGE), shape)
- art.putalpha(shape.filter(ImageFilter.MaxFilter(OUTLINE)))
- return art.resize((CELL, CELL), Image.LANCZOS)
-
-
-def cell_origin(index):
- return (index % COLUMNS) * CELL, (index // COLUMNS) * CELL
-
-
-def build():
- atlas = Image.new("RGBA", (COLUMNS * CELL, ROWS * CELL), (0, 0, 0, 0))
- cells = []
- ini_text = INI_HEADER
- for index, (code, _, _, kind) in enumerate(RANKS):
- art = finish(mark(kind), kind)
- x, y = cell_origin(index)
- atlas.paste(art, (x, y))
- cells.append(art)
- ini_text += INI_ENTRY % (code, NAME, atlas.width, atlas.height, x, y, x + CELL, y + CELL)
- return atlas, cells, ini_text
-
-
-def preview(cells, path):
- """Every mark at 16 and 64 pixels on sand and on grass, with its name in both languages."""
- font = ImageFont.truetype("msyh.ttc", 15)
- small_font = ImageFont.truetype("msyh.ttc", 12)
- row_h, width = 76, 900
- sheet = Image.new("RGB", (width, 40 + row_h * len(RANKS)), (30, 32, 34))
- draw = ImageDraw.Draw(sheet)
- draw.text((10, 10), "China ranks RankChina_<code> (16 px game size and 64 px cell, on sand and grass)",
- font=font, fill=(230, 230, 230))
- for i, ((code, english, chinese, _), art) in enumerate(zip(RANKS, cells)):
- top = 40 + i * row_h
- for j, ground in enumerate(((196, 170, 112), (78, 106, 48))):
- left = 10 + j * 120
- draw.rectangle((left, top, left + 112, top + row_h - 6), fill=ground)
- small = art.resize((16, 16), Image.LANCZOS)
- sheet.paste(small, (left + 6, top + 28), small)
- sheet.paste(art, (left + 40, top + 3), art)
- draw.text((260, top + 10), "%s %s" % (chinese, english), font=font, fill=(240, 240, 240))
- draw.text((260, top + 36), "RankChina_" + code, font=small_font, fill=(170, 170, 170))
- os.makedirs(os.path.dirname(os.path.abspath(path)), exist_ok=True)
- sheet.save(path)
- print(path)
-
-
-def main():
- atlas, cells, ini_text = build()
- # the three-chevron sergeants, the two-stripe field officers and the generals draw 14 high
- ini_text = ink_entries(atlas, ini_text, "China", tall=list(range(5, 10)) + list(range(13, 20)))
- atlas.save(TEXTURE_PATH)
- print(TEXTURE_PATH)
- with open(INI_PATH, "w", newline="\r\n") as ini:
- ini.write(ini_text)
- print(INI_PATH)
- if len(sys.argv) == 3 and sys.argv[1] == "preview":
- preview(cells, sys.argv[2])
-
-
-if __name__ == "__main__":
- main()
diff --git a/GeneralsMD/Code/Tools/rank_insignia_gla.py b/GeneralsMD/Code/Tools/rank_insignia_gla.py
deleted file mode 100644
index f0eb687de..000000000
--- a/GeneralsMD/Code/Tools/rank_insignia_gla.py
+++ /dev/null
@@ -1,348 +0,0 @@
-"""GLA's rank ladder: twenty marks for an army that never had a regulation one, from a recruit's
-single scratch to the Supreme Liberator's toothed plate.
-
-Five families, each a step up from the last, and inside a family bars or a backing plate count the
-grades:
- fighters scratched tally strokes, one to four, then the struck five
- unit leaders crossed machetes, then one to three upright rust bars beside them
- commanders the skull, then a bar, then blades or rifles behind it, then a rust plate
- warlords the scorpion, then a bar, then rifles behind it
- generals the scorpion on a round plate, then on a toothed one, then the skull on the
- toothed plate with rifles behind
-
-Bone, rust and khaki on a dark edge with no background, so a mark reads over any ground. The game
-draws these twelve to fourteen pixels high, so every stroke is blunt and the dark edge is thick.
-
- python Tools/rank_insignia_gla.py
- writes Data/Art/Textures/ReforgedRanksGLA.tga, one 64-pixel cell per rank, and the
- ReforgedRanksGLA.ini that names each cell RankGLA_<n>_<name>.
- python Tools/rank_insignia_gla.py preview <png>
- also writes a labelled sheet of every mark at game size and full size.
-
-Drawn eight times too big and brought down, which is the antialiasing. Same bytes on every run."""
-import math
-import os
-import random
-import sys
-
-from PIL import Image, ImageChops, ImageDraw, ImageFilter, ImageFont
-
-from rank_insignia_cells import ink_entries
-
-import rank_insignia
-
-HERE = os.path.dirname(os.path.abspath(__file__))
-CELL = 64
-COLUMNS = 8
-ROWS = 4
-SCALE = 8
-EDGE = 3.2 # the dark edge round every element, in shipped pixels
-DARK = (24, 18, 12)
-BONE = (236, 228, 204)
-RUST = (178, 76, 36)
-KHAKI = (196, 174, 116)
-SAND = (150, 128, 84)
-NAME = "ReforgedRanksGLA"
-TEXTURE_PATH = os.path.join(HERE, "..", "Data", "Art", "Textures", NAME + ".tga")
-INI_PATH = os.path.join(HERE, "..", "Data", "INI", "MappedImages", "HandCreated", NAME + ".ini")
-INI_HEADER = """; GLA's rank marks, one cell of %s.tga per rank from Recruit to Supreme Liberator. Written
-; by Tools/rank_insignia_gla.py with the texture it names; do not edit by hand. Mapped images are
-; not in the multiplayer INI checksum.
-""" % NAME
-INI_ENTRY = """
-MappedImage %s
- Texture = %s.tga
- TextureWidth = %d
- TextureHeight = %d
- Coords = Left:%d Top:%d Right:%d Bottom:%d
- Status = NONE
-End
-"""
-
-
-class Pen:
- """Maps the 64-unit design square into drawn pixels, moved by (dx, dy) and shrunk by s round
- the cell centre, so a symbol can make room for the bars under it."""
-
- def __init__(self, dx=0.0, dy=0.0, s=1.0):
- self.dx, self.dy, self.s = dx, dy, s
-
- def point(self, x, y):
- return (round(((x - 32) * self.s + 32 + self.dx) * SCALE),
- round(((y - 32) * self.s + 32 + self.dy) * SCALE))
-
- def box(self, x0, y0, x1, y1):
- return self.point(x0, y0) + self.point(x1, y1)
-
- def width(self, units):
- return max(1, round(units * self.s * SCALE))
-
-
-def blank():
- return Image.new("L", (CELL * SCALE, CELL * SCALE), 0)
-
-
-def placed(points, angle, cx, cy):
- """Local points turned by angle degrees and moved to (cx, cy)."""
- c, s = math.cos(math.radians(angle)), math.sin(math.radians(angle))
- return [(cx + x * c - y * s, cy + x * s + y * c) for x, y in points]
-
-
-def polygon(pen, mask, points):
- ImageDraw.Draw(mask).polygon([pen.point(x, y) for x, y in points], fill=255)
-
-
-def strokes(pen, count, struck):
- """count scratched upright strokes, uneven like a knife cut them; struck adds the slash that
- closes a five."""
- mask = blank()
- rng = random.Random(count * 7 + struck)
- spacing = 11
- first = 32 - spacing * (count - 1) / 2
- for i in range(count):
- x = first + spacing * i + rng.uniform(-0.8, 0.8)
- lean = rng.uniform(-2.5, 2.5)
- top, bottom = 10 + rng.uniform(-1, 1.5), 54 + rng.uniform(-1.5, 1)
- polygon(pen, mask, [(x - 2.4 + lean, top), (x + 3.2 + lean, top + 1.2),
- (x + 3.6 - lean, bottom), (x - 3.0 - lean, bottom - 1.0)])
- if struck:
- polygon(pen, mask, [(6, 44), (9, 40), (58, 21), (57, 26)])
- return [(mask, BONE)]
-
-
-def blade(pen, angle, cx=32, cy=32):
- """A machete pointing along angle: bone blade, rust grip and guard."""
- metal, grip = blank(), blank()
- polygon(pen, metal, placed([(-4, -6), (19, -6.5), (28, -1), (20, 6), (-4, 6)], angle, cx, cy))
- polygon(pen, grip, placed([(-22, -4.2), (-5, -4.2), (-5, 4.2), (-22, 4.2)], angle, cx, cy))
- polygon(pen, grip, placed([(-8, -9), (-3.5, -9), (-3.5, 9), (-8, 9)], angle, cx, cy))
- return [(metal, BONE), (grip, RUST)]
-
-
-def rifle(pen, angle, cx=32, cy=32):
- """A rifle silhouette pointing along angle, magazine curling under, all khaki."""
- mask = blank()
- for part in ([(-27, -3), (-14, -4), (-14, 4), (-27, 7)], # stock
- [(-15, -4), (10, -4), (10, 3), (-15, 3)], # receiver
- [(9, -3), (28, -3), (28, 1), (9, 1)], # barrel
- [(-5, 2), (1, 2), (5, 11), (-1, 12)]): # magazine
- polygon(pen, mask, placed(part, angle, cx, cy))
- return [(mask, KHAKI)]
-
-
-def crossed(item, pen, spread, cx=32, cy=32):
- """Two of item crossed at +-spread degrees, the second drawn over the first."""
- return item(pen, 180 + spread, cx, cy) + item(pen, -spread, cx, cy)
-
-
-def skull(pen, size, cx=32, cy=32):
- """rank_insignia's skull, size units across, centred on (cx, cy)."""
- shape, _ = rank_insignia.skull()
- drawn = pen.width(size)
- shape = shape.resize((drawn, drawn), Image.LANCZOS).point(lambda v: 255 if v > 127 else 0)
- mask = blank()
- x, y = pen.point(cx - size / 2, cy - size / 2)
- mask.paste(shape, (x, y))
- return [(mask, BONE)]
-
-
-def scorpion(pen, colour, cx=32, cy=30, k=1.0):
- """A scorpion seen from above, head up, pincers forward and the tail curling round its right.
- No legs and no jaw gaps: at twelve pixels they were the scribble round a blob, and the body, the
- two claws and the hooked tail are what reads."""
- mask = blank()
- draw = ImageDraw.Draw(mask)
-
- def at(x, y):
- return cx + x * k, cy + y * k
-
- def ellipse(x0, y0, x1, y1):
- draw.ellipse(pen.box(*at(x0, y0), *at(x1, y1)), fill=255)
-
- def line(points, width):
- draw.line([pen.point(*at(x, y)) for x, y in points], fill=255, width=pen.width(width * k),
- joint="curve")
-
- for side in (-1, 1):
- line([(side * 4, -6), (side * 14, -10), (side * 16, -17)], 5) # arm
- ellipse(side * 16 - 6.5, -27, side * 16 + 6.5, -14) # claw
- ellipse(-8, -5, 8, 14) # body
- ellipse(-6.5, -13, 6.5, -1) # head
- tail = [(0, 16), (3, 22), (8, 25), (14, 24), (18, 19)]
- for (x, y), r in zip(tail, (5.2, 5.0, 4.8, 4.6, 4.4)):
- ellipse(x - r, y - r, x + r, y + r)
- draw.polygon([pen.point(*at(x, y)) for x, y in ((15, 16), (22, 9), (23, 19))], fill=255) # sting
- return [(mask, colour)]
-
-
-ROOM_LEFT, ROOM_RIGHT = 3.5, 60.5 # inside the dark edge's reach of the cell's sides
-BAR_PITCH, BAR_WIDTH = 8, 4.4
-
-
-def bars(count):
- """count upright rust bars at the cell's right, rough at the ends like cut cloth, each its own
- layer so the dark edge parts it from the next."""
- layers = []
- pen = Pen()
- for i in range(count):
- mask = blank()
- right = ROOM_RIGHT - BAR_PITCH * (count - 1 - i)
- left = right - BAR_WIDTH
- polygon(pen, mask, [(left + 0.5, 15), (right, 16), (right - 0.4, 48), (left, 47.5)])
- layers.append((mask, RUST))
- return layers
-
-
-def plate(teeth):
- """The rust disc the top ranks stand on; teeth gives it a saw rim of scrap metal, few and deep
- so the rim still reads as teeth at twelve pixels."""
- mask = blank()
- pen = Pen()
- if teeth:
- points = []
- for i in range(teeth * 2):
- r = 29 if i % 2 == 0 else 21.5
- a = math.pi * i / teeth - math.pi / 2
- points.append((32 + r * math.cos(a), 32 + r * math.sin(a)))
- polygon(pen, mask, points)
- else:
- ImageDraw.Draw(mask).ellipse(pen.box(6, 6, 58, 58), fill=255)
- return [(mask, RUST)]
-
-
-def with_bars(symbol, count):
- """symbol moved left and shrunk only as far as the count bars beside it need: under it they
- squeezed the symbol to two thirds and the bars to slivers."""
- bar_room = BAR_PITCH * count
- centre = (ROOM_LEFT + ROOM_RIGHT - bar_room) / 2
- scale = (ROOM_RIGHT - ROOM_LEFT - bar_room) / (ROOM_RIGHT - ROOM_LEFT - 2)
- return symbol(Pen(centre - 32, 0, scale)) + bars(count)
-
-
-RANKS = (
- ("Unranked", "grade 0 on every side: no mark, so the cell stays empty", lambda: [(blank(), BONE)]),
- ("Recruit", "one scratched stroke", lambda: strokes(Pen(), 1, False)),
- ("Irregular", "two scratched strokes", lambda: strokes(Pen(), 2, False)),
- ("Fighter", "three scratched strokes", lambda: strokes(Pen(), 3, False)),
- ("Raider", "four scratched strokes", lambda: strokes(Pen(), 4, False)),
- ("HardenedRaider", "four strokes struck through, the tally of five",
- lambda: strokes(Pen(), 4, True)),
- ("Squadhand", "crossed machetes", lambda: crossed(blade, Pen(), 45)),
- ("SquadLeader", "crossed machetes over one rust bar",
- lambda: with_bars(lambda pen: crossed(blade, pen, 45), 1)),
- ("CellLeader", "crossed machetes over two rust bars",
- lambda: with_bars(lambda pen: crossed(blade, pen, 45), 2)),
- ("SeniorCellLeader", "crossed machetes over three rust bars",
- lambda: with_bars(lambda pen: crossed(blade, pen, 45), 3)),
- ("RaidCaptain", "the skull", lambda: skull(Pen(), 46)),
- ("ColumnCaptain", "the skull over one rust bar",
- lambda: with_bars(lambda pen: skull(pen, 46), 1)),
- ("StrikeCommander", "the skull on crossed machetes",
- lambda: crossed(blade, Pen(), 40) + skull(Pen(), 38)),
- ("FieldCommander", "the skull on crossed rifles",
- lambda: crossed(rifle, Pen(), 40) + skull(Pen(), 38)),
- ("SectorCommander", "the skull on crossed rifles and a rust plate",
- lambda: plate(0) + crossed(rifle, Pen(), 40) + skull(Pen(), 42)),
- ("Warlord", "the khaki scorpion", lambda: scorpion(Pen(), KHAKI)),
- ("RegionalWarlord", "the khaki scorpion over one rust bar",
- lambda: with_bars(lambda pen: scorpion(pen, KHAKI), 1)),
- ("HighWarlord", "the bone scorpion on crossed rifles",
- lambda: crossed(rifle, Pen(), 40) + scorpion(Pen(), BONE, 32, 30, 0.85)),
- ("General", "the bone scorpion on a round rust plate",
- lambda: plate(0) + scorpion(Pen(), BONE, 32, 30, 0.8)),
- ("GrandGeneral", "the bone scorpion on a toothed rust plate",
- lambda: plate(8) + scorpion(Pen(), BONE, 32, 30, 0.72)),
- ("SupremeLiberator", "the skull on a toothed rust plate with crossed rifles behind it",
- lambda: crossed(rifle, Pen(), 40) + plate(8) + skull(Pen(), 40)),
-)
-
-
-def dilated(mask):
- """mask grown by EDGE shipped pixels with round corners: a blur thresholded just above zero."""
- radius = EDGE * SCALE / 2
- return mask.filter(ImageFilter.GaussianBlur(radius)).point(lambda v: 255 if v > 6 else 0)
-
-
-def finish(layers):
- """Layers painted bottom up, each over a dark edge of its own, so crossing parts stay apart."""
- size = layers[0][0].size
- art = Image.new("RGB", size, DARK)
- alpha = Image.new("L", size, 0)
- dark = Image.new("RGB", size, DARK)
- for mask, colour in layers:
- edge = dilated(mask)
- art.paste(dark, (0, 0), edge)
- art.paste(Image.new("RGB", size, colour), (0, 0), mask)
- alpha = ImageChops.lighter(alpha, edge)
- art.putalpha(alpha)
- return art.resize((CELL, CELL), Image.LANCZOS)
-
-
-def image_name(index, name):
- return "RankGLA_%d_%s" % (index + 1, name)
-
-
-def build():
- """The atlas and the INI text."""
- atlas = Image.new("RGBA", (CELL * COLUMNS, CELL * ROWS), DARK + (0,))
- ini_text = INI_HEADER
- for index, (name, _, draw) in enumerate(RANKS):
- left, top = index % COLUMNS * CELL, index // COLUMNS * CELL
- atlas.paste(finish(draw()), (left, top))
- ini_text += INI_ENTRY % (image_name(index, name), NAME, atlas.width, atlas.height,
- left, top, left + CELL, top + CELL)
- return atlas, ini_text
-
-
-def preview(atlas, path):
- """Every mark at 12 and 16 pixels, as the game minifies it, and at its full 64, over dark
- ground and sand, with its name."""
- font = ImageFont.truetype("arialbd.ttf", 15)
- small = ImageFont.truetype("arial.ttf", 12)
- card_w, card_h, columns = 380, 92, 4
- sheet = Image.new("RGB", (card_w * columns, card_h * math.ceil(len(RANKS) / columns)), (40, 38, 34))
- draw = ImageDraw.Draw(sheet)
- for index, (name, about, _) in enumerate(RANKS):
- x0, y0 = index % columns * card_w, index // columns * card_h
- cell = atlas.crop((index % COLUMNS * CELL, index // COLUMNS * CELL,
- index % COLUMNS * CELL + CELL, index // COLUMNS * CELL + CELL))
- draw.rectangle((x0 + 4, y0 + 4, x0 + 76, y0 + 76), fill=(70, 74, 58))
- sheet.paste(cell, (x0 + 8, y0 + 8), cell)
- for column, ground in enumerate(((70, 74, 58), (200, 180, 140))):
- gx = x0 + 84 + column * 44
- draw.rectangle((gx, y0 + 4, gx + 40, y0 + 76), fill=ground)
- for size, gy in ((16, y0 + 12), (12, y0 + 46)):
- icon = cell.resize((size, size), Image.LANCZOS)
- sheet.paste(icon, (gx + 20 - size // 2, gy), icon)
- draw.text((x0 + 178, y0 + 10), "%d. %s" % (index + 1, name), fill=(240, 232, 210), font=font)
- draw.text((x0 + 178, y0 + 32), image_name(index, name), fill=(180, 170, 150), font=small)
- words, line = about.split(), ""
- lines = []
- for word in words:
- if draw.textlength(line + " " + word, font=small) > card_w - 186:
- lines.append(line)
- line = word
- else:
- line = (line + " " + word).strip()
- lines.append(line)
- for i, text in enumerate(lines[:2]):
- draw.text((x0 + 178, y0 + 50 + i * 14), text, fill=(200, 190, 160), font=small)
- sheet.save(path)
- print(path)
-
-
-def main():
- atlas, ini_text = build()
- # the plates and the scorpions, busiest at twelve, draw 14 high
- ini_text = ink_entries(atlas, ini_text, "GLA", tall=range(14, 21))
- atlas.save(TEXTURE_PATH)
- print(TEXTURE_PATH)
- with open(INI_PATH, "w", newline="\r\n") as ini:
- ini.write(ini_text)
- print(INI_PATH)
- if len(sys.argv) == 3 and sys.argv[1] == "preview":
- preview(atlas, sys.argv[2])
-
-
-if __name__ == "__main__":
- main()
diff --git a/GeneralsMD/Code/Tools/rank_insignia_turkiye.py b/GeneralsMD/Code/Tools/rank_insignia_turkiye.py
deleted file mode 100644
index 5384fe135..000000000
--- a/GeneralsMD/Code/Tools/rank_insignia_turkiye.py
+++ /dev/null
@@ -1,408 +0,0 @@
-"""Rank marks for Turkiye, one for every rank of the Turkish Land Forces the ladder climbs, from Er to
-Mareşal, drawn after the army's own insignia and cut down for twelve to fourteen pixels high. Each
-mark is the sign without the board or patch it sits on; a dark red edge stands in for the board and
-lets it read over sand and grass the way the other sides' marks do.
-
-What each grade wears, and where it parts from the real one:
-
- Er nothing, as in the army.
- Onbaşı one red chevron, point down; Çavuş two. The army's are red on black, wide and shallow
- with square ends, and so are these.
- Uzman Çavuş the astsubay pattern in red: crescent and star with two chevrons. Drawn from the
- Gendarmerie's uzman çavuş badge, the one in vector; the army's own (TR-Army-OR5a) is a
- raster that could not be read here, so this grade is the least certain of the set.
- Astsubay yellow on black: the crescent, horns up, with the star upside down in its cup, two or
- three chevrons whose arms come down from the corners to the crescent, then U-shaped
- bands under the crescent and straight bars under those. The lines count up the grade,
- two for Çavuş to seven for Kıdemli Başçavuş: 2 chevrons; 3; 3 and a band; 3 and 2
- bands; 3, 2 bands and a bar; 3, 2 bands and 2 bars. At 14 pixels the stripes merge: the
- crescent and star on top and the length of the tail under it carry the order, the
- count of lines only reads in the 64-pixel cell.
- Officers gold five-pointed stars with the ridge of every point shaded, one to three for Teğmen,
- Üsteğmen, Yüzbaşı. The board stacks them along its length; here two sit side by side
- and three in a triangle, so a mark is never three times wider than high.
- Field Binbaşı, Yarbay, Albay: one to three stars over the laurel sprays that cup a small
- star. The emblem's coloured ground on the board is left out.
- Generals one to four stars in a row over the laurel sprays round crossed sabers on red. The
- sabers survive only as a light cross on the red disc at 14 pixels.
- Mareşal no stars; the laurel closes round the red disc and the crossed sabers. The Commons
- drawing's central emblem could not be made out, so the general's emblem stands in.
-
-Sources, read on 2026-10-22: en.wikipedia.org/wiki/Military_ranks_of_Turkey (the ladder and its
-image names); the Wikimedia Commons drawings it uses, Army-TUR-OR-04 and -05 (erbaş chevrons,
-#d93a36 on black), Army-TUR-OR-06a, -06b, -07, -07a, -07-1, -07-2 (the six astsubay badges,
-#F4DC11 on black), Uzman_Çavuş_(Jandarma), Turkey-army-OF-1b, OF-3, OF-6, OF-10 (the officers'
-boards: gold #F1D743 faceted stars, laurel sprays, the general's red ground and crossed blades);
-kadimhukuk.com.tr's astsubay table ("Ay Yıldız + 2 Çizgi" for Çavuş up to "+ 7 Çizgi" for Kıdemli
-Başçavuş); tr.wikipedia.org/wiki/Uzman_çavuş for which drawing is the army's uzman çavuş.
-
- python Tools/rank_insignia_turkiye.py
- writes Data/Art/Textures/ReforgedRanksTurkiye.tga, one 64-pixel cell per rank, and the
- ReforgedRanksTurkiye.ini that names each cell RankTurkiye_<grade>.
-
- python Tools/rank_insignia_turkiye.py preview <png>
- also writes a labelled sheet of every mark at game size and at full size.
-
-Drawn eight times too big and brought down, which is the antialiasing."""
-import math
-import os
-import sys
-
-from PIL import Image, ImageChops, ImageDraw, ImageFilter, ImageFont
-
-from rank_insignia_cells import ink_entries
-
-HERE = os.path.dirname(os.path.abspath(__file__))
-SCALE = 8
-CELL = 64
-COLUMNS = 8
-ROWS = 3
-OUTLINE = 21 # a MaxFilter size, odd: the dark edge round every mark, 10 drawn pixels
-EDGE = (48, 4, 6)
-# metal: (top colour, bottom colour); the layers paint in this order, later over earlier
-METALS = {
- "red": ((236, 78, 68), (160, 30, 26)), # erbaş chevrons and the uzman çavuş badge, #d93a36
- "yellow": ((255, 240, 96), (214, 176, 10)), # astsubay badges, #F4DC11
- "field": ((214, 26, 24), (128, 6, 6)), # the general's red ground
- "gold": ((255, 230, 120), (204, 140, 24)), # officers' stars and laurel, #F1D743
- "gold_dark": ((214, 170, 40), (150, 92, 10)), # the shaded ridge of a star's points, #DBB110
- "silver": ((252, 252, 252), (150, 156, 168)), # crossed sabers
-}
-NAME = "ReforgedRanksTurkiye"
-TEXTURE_PATH = os.path.join(HERE, "..", "Data", "Art", "Textures", NAME + ".tga")
-INI_PATH = os.path.join(HERE, "..", "Data", "INI", "MappedImages", "HandCreated", NAME + ".ini")
-INI_HEADER = """; Turkiye's rank marks, one per Turkish Land Forces rank, all in one texture. Written by
-; Tools/rank_insignia_turkiye.py with the texture it names; do not edit by hand. Mapped images are
-; not in the multiplayer INI checksum.
-"""
-INI_ENTRY = """
-MappedImage RankTurkiye_%d
- Texture = %s.tga
- TextureWidth = %d
- TextureHeight = %d
- Coords = Left:%d Top:%d Right:%d Bottom:%d
- Status = NONE
-End
-"""
-
-# the erbaş chevron in Army-TUR-OR-04's proportions: square ends, shallow V, thin arms
-CHEVRON_HALF_WIDTH = 20
-CHEVRON_DROP = 11.7
-CHEVRON = 5.0
-CHEVRON_PITCH = 8.0
-# the astsubay badge in the units of the Commons drawings (444 wide, crescent on x 222)
-BADGE = 0.12 # shipped pixels per unit
-ARM_TOP = 38
-LINE = 31 # every stripe, chevron arm, band and bar is this thick
-LINE_PITCH = 44
-
-# grade, name, mark, the real insignia it follows; grade 0 is unranked on every side and the Er wears
-# nothing, so both cells stay empty
-RANKS = (
- (0, "Rütbesiz", ("none",), "no rank"),
- (1, "Er", ("none",), "no insignia"),
- (2, "Onbaşı", ("chevrons", 1), "1 red chevron (OR-04)"),
- (3, "Çavuş", ("chevrons", 2), "2 red chevrons (OR-05)"),
- (4, "Uzman Çavuş", ("astsubay", "red", 2, 0, 0), "red crescent, star, 2 chevrons (Jandarma)"),
- (5, "Astsubay Çavuş", ("astsubay", "yellow", 2, 0, 0), "crescent, star + 2 lines (OR-06b)"),
- (6, "Astsubay Kıdemli Çavuş", ("astsubay", "yellow", 3, 0, 0), "crescent, star + 3 lines (OR-06a)"),
- (7, "Astsubay Üstçavuş", ("astsubay", "yellow", 3, 1, 0), "crescent, star + 4 lines (OR-07a)"),
- (8, "Astsubay Kıdemli Üstçavuş", ("astsubay", "yellow", 3, 2, 0), "crescent, star + 5 lines (OR-07)"),
- (9, "Astsubay Başçavuş", ("astsubay", "yellow", 3, 2, 1), "crescent, star + 6 lines (OR-07-2)"),
- (10, "Astsubay Kıdemli Başçavuş", ("astsubay", "yellow", 3, 2, 2), "crescent, star + 7 lines (OR-07-1)"),
- (11, "Teğmen", ("officer", 1), "1 gold star (OF-1b)"),
- (12, "Üsteğmen", ("officer", 2), "2 gold stars (OF-1)"),
- (13, "Yüzbaşı", ("officer", 3), "3 gold stars (OF-2)"),
- (14, "Binbaşı", ("field", 1), "1 star over laurel (OF-3)"),
- (15, "Yarbay", ("field", 2), "2 stars over laurel (OF-4)"),
- (16, "Albay", ("field", 3), "3 stars over laurel (OF-5)"),
- (17, "Tuğgeneral", ("general", 1), "1 star, laurel, sabers on red (OF-6)"),
- (18, "Tümgeneral", ("general", 2), "2 stars, laurel, sabers on red (OF-7)"),
- (19, "Korgeneral", ("general", 3), "3 stars, laurel, sabers on red (OF-8)"),
- (20, "Orgeneral", ("general", 4), "4 stars, laurel, sabers on red (OF-9)"),
- (21, "Mareşal", ("marshal",), "closed laurel, no stars (OF-10)"),
-)
-
-
-def scaled(points):
- """Points in shipped pixels, in drawn pixels."""
- return [(x * SCALE, y * SCALE) for x, y in points]
-
-
-def box(cx, cy, rx, ry):
- return scaled([(cx - rx, cy - ry), (cx + rx, cy + ry)])
-
-
-def star_points(cx, cy, radius, turn=-90):
- points = []
- for i in range(10):
- r = radius if i % 2 == 0 else radius * 0.5
- angle = math.radians(turn + 36 * i)
- points.append((cx + r * math.cos(angle), cy + r * math.sin(angle)))
- return points
-
-
-class Layers:
- """One white-on-black mask per metal, CELL by CELL in drawn pixels."""
-
- def __init__(self):
- self.masks = {}
-
- def draw(self, metal):
- if metal not in self.masks:
- self.masks[metal] = Image.new("L", (CELL * SCALE, CELL * SCALE), 0)
- return ImageDraw.Draw(self.masks[metal])
-
- def paste(self, metal, shape):
- self.draw(metal)
- self.masks[metal].paste(255, (0, 0), shape)
-
-
-def blank():
- return Image.new("L", (CELL * SCALE, CELL * SCALE), 0)
-
-
-def star(layers, cx, cy, radius):
- """A gold five-pointed star, point up, the right half of every point in shadow like the struck
- metal ones."""
- points = star_points(cx, cy, radius)
- layers.draw("gold").polygon(scaled(points), fill=255)
- shade = layers.draw("gold_dark")
- for i in range(0, 10, 2):
- shade.polygon(scaled([(cx, cy), points[i], points[i + 1]]), fill=255)
-
-
-def stars(layers, count, cy, radius, pitch):
- """count stars in a tight cluster centred across the cell on cy: two side by side, three in a
- triangle. Returns the cluster's bottom."""
- layout = {1: [(0, 0)],
- 2: [(-0.5, 0), (0.5, 0)],
- 3: [(0, -0.45), (-0.5, 0.45), (0.5, 0.45)]}[count]
- for x, y in layout:
- star(layers, 32 + x * pitch, cy + y * pitch, radius)
- return cy + max(y for _, y in layout) * pitch + radius * 0.81
-
-
-def chevron_down(draw, top):
- """The erbaş chevron, point down, square ends, its arms' tops on top."""
- w, d, t = CHEVRON_HALF_WIDTH, CHEVRON_DROP, CHEVRON
- draw.polygon(scaled([(32 - w, top), (32, top + d), (32 + w, top), (32 + w, top + t),
- (32, top + d + t), (32 - w, top + t)]), fill=255)
-
-
-def astsubay(layers, metal, chevrons, bands, bars):
- """The astsubay badge after the Commons drawings, in their units: the inverted star in the cup of
- the crescent, the chevrons' arms coming down from the corners, the bands under the crescent and the
- bars under the bands. The crescent alone has no line in the count."""
- bottom = 301
- if bands:
- bottom = 339 + LINE_PITCH * (bands - 1)
- if bars:
- bottom = 393 + LINE_PITCH * (bars - 1) + LINE
- oy = 32 - (ARM_TOP + bottom) / 2 * BADGE
-
- def at(x, y):
- return 32 + (x - 222) * BADGE, oy + y * BADGE
-
- def ellipse(shape, cx, cy, rx, ry, fill):
- x0, y0 = at(cx - rx, cy - ry)
- x1, y1 = at(cx + rx, cy + ry)
- ImageDraw.Draw(shape).ellipse(scaled([(x0, y0), (x1, y1)]), fill=fill)
-
- draw = layers.draw(metal)
- sx, sy = at(222, 131)
- draw.polygon(scaled(star_points(sx, sy, 36 * BADGE, turn=90)), fill=255)
- moon = blank()
- ellipse(moon, 222, 229, 72, 72, 255)
- ellipse(moon, 222, 211, 58, 58, 0)
- layers.paste(metal, moon)
- for i in range(chevrons):
- top = ARM_TOP + i * LINE_PITCH
- for outer, inner in ((8, 148), (436, 296)):
- draw.polygon(scaled([at(outer, top), at(inner, top + 63), at(inner, top + 63 + LINE),
- at(outer, top + LINE)]), fill=255)
- for j in range(bands):
- cy = 170 + j * LINE_PITCH
- band = blank()
- ellipse(band, 222, cy, 207, 169, 255)
- ellipse(band, 222, cy, 207 - LINE, 169 - LINE, 0)
- x0, y0 = at(0, 0)
- x1, y1 = at(444, cy)
- ImageDraw.Draw(band).rectangle(scaled([(x0, y0), (x1, y1)]), fill=0)
- layers.paste(metal, band)
- for k in range(bars):
- y = 393 + k * LINE_PITCH
- draw.rectangle(scaled([at(15, y), at(429, y + LINE)]), fill=255)
-
-
-def laurel(layers, cx, cy, radius, sweep):
- """Two laurel sprays rising from the bottom of a circle round (cx, cy), each through sweep degrees,
- their leaves along the stem and pointing up it."""
- draw = layers.draw("gold")
- stem = box(cx, cy, radius, radius)
- draw.arc(stem, start=90, end=90 + sweep, fill=255, width=round(1.2 * SCALE))
- draw.arc(stem, start=90 - sweep, end=90, fill=255, width=round(1.2 * SCALE))
- for side in (1, -1):
- for step in range(1, int(sweep // 22) + 1):
- angle = math.radians(90 + side * step * 22)
- x, y = cx + radius * math.cos(angle), cy + radius * math.sin(angle)
- tangent = angle + side * math.pi / 2 # up the stem, away from the bottom
- for lean in (-0.55, 0.55):
- a = tangent + lean
- points = [(x + 2.2 * math.cos(a) + 2.6 * math.cos(t) * math.cos(a) - 1.0 * math.sin(t) * math.sin(a),
- y + 2.2 * math.sin(a) + 2.6 * math.cos(t) * math.sin(a) + 1.0 * math.sin(t) * math.cos(a))
- for t in (i * math.pi / 8 for i in range(16))]
- draw.polygon(scaled(points), fill=255)
-
-
-def saber(layers, cx, cy, half, flip):
- """A curved saber across the disc, hilt low, tip high, crossing its twin."""
- start = (cx - flip * half, cy + half)
- end = (cx + flip * half, cy - half)
- nx, ny = flip * 0.7, 0.7 # the bow, away from the twin's
- left, right = [], []
- for i in range(13):
- t = 0.22 + 0.78 * i / 12
- bow = 2.0 * math.sin(math.pi * t)
- px = start[0] + (end[0] - start[0]) * t + nx * bow
- py = start[1] + (end[1] - start[1]) * t + ny * bow
- w = 1.5 * (1 - t) + 0.3 # across the blade, which runs (flip, -1)
- left.append((px - 0.7 * w, py - flip * 0.7 * w))
- right.append((px + 0.7 * w, py + flip * 0.7 * w))
- draw = layers.draw("silver")
- draw.polygon(scaled(left + right[::-1]), fill=255)
- gx = start[0] + (end[0] - start[0]) * 0.22
- gy = start[1] + (end[1] - start[1]) * 0.22
- draw.line(scaled([(gx - 2.2 * 0.7, gy - 2.2 * 0.7 * flip), (gx + 2.2 * 0.7, gy + 2.2 * 0.7 * flip)]),
- fill=255, width=round(1.2 * SCALE))
- draw.line(scaled([start, (gx, gy)]), fill=255, width=round(1.4 * SCALE))
-
-
-def sabers_on_red(layers, cx, cy, radius):
- layers.draw("field").ellipse(box(cx, cy, radius, radius), fill=255)
- saber(layers, cx, cy, radius * 0.6, 1)
- saber(layers, cx, cy, radius * 0.6, -1)
-
-
-def mark(kind):
- """The masks of one rank's mark."""
- layers = Layers()
- if kind[0] == "chevrons":
- count = kind[1]
- height = (count - 1) * CHEVRON_PITCH + CHEVRON + CHEVRON_DROP
- top = (CELL - height) / 2
- for i in range(count):
- chevron_down(layers.draw("red"), top + i * CHEVRON_PITCH)
- elif kind[0] == "astsubay":
- astsubay(layers, *kind[1:])
- elif kind[0] == "officer":
- stars(layers, kind[1], 32, 9, 17)
- elif kind[0] == "field":
- bottom = stars(layers, kind[1], 18, 8, 15)
- cy = bottom + 6
- star(layers, 32, cy + 5, 3.2)
- laurel(layers, 32, cy, 11, 105)
- elif kind[0] == "general":
- count = kind[1]
- pitch = 11
- for i in range(count):
- star(layers, 32 + (i - (count - 1) / 2) * pitch, 14, 5.5)
- sabers_on_red(layers, 32, 34, 9)
- laurel(layers, 32, 30, 15, 120)
- elif kind[0] == "marshal":
- sabers_on_red(layers, 32, 32, 12)
- laurel(layers, 32, 32, 20, 165)
- return layers
-
-
-def gradient(colours):
- size = CELL * SCALE
- image = Image.new("RGB", (size, size))
- draw = ImageDraw.Draw(image)
- top_colour, bottom_colour = colours
- for y in range(size):
- share = y / (size - 1)
- draw.line((0, y, size, y), fill=tuple(round(top + (bottom - top) * share)
- for top, bottom in zip(top_colour, bottom_colour)))
- return image
-
-
-def finish(layers):
- """The mark in its metals, light at the top and dark at the bottom, on its dark edge."""
- size = (CELL * SCALE, CELL * SCALE)
- art = Image.new("RGB", size, EDGE)
- shape = blank()
- for metal, colours in METALS.items():
- if metal in layers.masks:
- art = Image.composite(gradient(colours), art, layers.masks[metal])
- shape = ImageChops.lighter(shape, layers.masks[metal])
- art.putalpha(shape.filter(ImageFilter.MaxFilter(OUTLINE)))
- return art.resize((CELL, CELL), Image.LANCZOS)
-
-
-def cell_origin(index):
- return (index % COLUMNS) * CELL, (index // COLUMNS) * CELL
-
-
-def build():
- atlas = Image.new("RGBA", (COLUMNS * CELL, ROWS * CELL), (0, 0, 0, 0))
- cells = []
- ini_text = INI_HEADER
- for index, (grade, _, kind, _) in enumerate(RANKS):
- assert grade == index, "the atlas holds the ladder in order"
- art = finish(mark(kind))
- x, y = cell_origin(index)
- atlas.paste(art, (x, y))
- cells.append(art)
- ini_text += INI_ENTRY % (grade, NAME, atlas.width, atlas.height, x, y, x + CELL, y + CELL)
- return atlas, cells, ini_text
-
-
-def preview(cells, path):
- """Every mark at 14 and 64 pixels on sand and on grass, with its grade, name and the real insignia
- it follows, two columns."""
- font = ImageFont.truetype("arial.ttf", 15)
- small_font = ImageFont.truetype("arial.ttf", 12)
- row_h, column_w = 76, 640
- rows = (len(RANKS) + 1) // 2
- sheet = Image.new("RGB", (2 * column_w + 10, 40 + row_h * rows), (30, 32, 34))
- draw = ImageDraw.Draw(sheet)
- draw.text((10, 10), "Turkiye ranks RankTurkiye_<grade> (14 px game size and 64 px cell, on sand and grass;"
- " grey line: the real insignia it follows)", font=font, fill=(230, 230, 230))
- for i, ((grade, name, _, real), art) in enumerate(zip(RANKS, cells)):
- left0 = 10 + (i // rows) * column_w
- top = 40 + (i % rows) * row_h
- for j, ground in enumerate(((196, 170, 112), (78, 106, 48))):
- left = left0 + j * 120
- draw.rectangle((left, top, left + 112, top + row_h - 6), fill=ground)
- # the game crops a cell to its ink and draws it 12 or 14 high (rank_insignia_cells.py)
- ink_box = art.getchannel("A").point(lambda v: 255 if v >= 16 else 0).getbbox()
- if ink_box:
- ink = art.crop(ink_box)
- small = ink.resize((max(1, round(ink.width * 14 / ink.height)), 14), Image.LANCZOS)
- sheet.paste(small, (left + 6, top + 28), small)
- sheet.paste(art, (left + 40, top + 3), art)
- draw.text((left0 + 250, top + 10), "%d %s" % (grade, name), font=font, fill=(240, 240, 240))
- draw.text((left0 + 250, top + 34), "RankTurkiye_%d" % grade, font=small_font, fill=(170, 170, 170))
- draw.text((left0 + 250, top + 50), real, font=small_font, fill=(150, 150, 150))
- os.makedirs(os.path.dirname(os.path.abspath(path)), exist_ok=True)
- sheet.save(path)
- print(path)
-
-
-def main():
- atlas, cells, ini_text = build()
- # the astsubay and uzman çavuş badges, the field officers, generals and the Mareşal draw 14 high
- ini_text = ink_entries(atlas, ini_text, "Turkiye", tall=list(range(4, 11)) + list(range(14, 22)))
- assert "RankTurkiye_0\n" not in ini_text and "RankTurkiye_1\n" not in ini_text, "grade 0 and the Er wear nothing"
- atlas.save(TEXTURE_PATH)
- print(TEXTURE_PATH)
- with open(INI_PATH, "w", newline="\r\n") as ini:
- ini.write(ini_text)
- print(INI_PATH)
- if len(sys.argv) == 3 and sys.argv[1] == "preview":
- preview(cells, sys.argv[2])
-
-
-if __name__ == "__main__":
- main()
diff --git a/GeneralsMD/Code/Tools/rank_insignia_usa.py b/GeneralsMD/Code/Tools/rank_insignia_usa.py
deleted file mode 100644
index fc18ab225..000000000
--- a/GeneralsMD/Code/Tools/rank_insignia_usa.py
+++ /dev/null
@@ -1,376 +0,0 @@
-"""Every rank of the United States Army as a small game icon, for a rank system with more steps than
-the three veterancy levels: enlisted E-1 to E-9 with Specialist and the E-8 and E-9 variants,
-warrant officers W-1 to W-5, officers O-1 to O-10, and General of the Army.
-
-Same look as rank_insignia.py: no plate, a black edge round every mark so it reads on sand and
-grass, metal lit from the top. Enlisted chevrons are gold stripes on a black patch cut to their
-shape, the Army's dress pattern. The game draws these twelve to fourteen pixels high beside the
-health bar, no wider than half again their height, so each mark is fitted to fill its 64-pixel cell
-and cut to what survives that: steep chevrons and fat rockers, the E-8 and E-9 devices big in the
-middle of the stack in a colour each (silver, gold, red, blue), a solid eagle, veinless leaves,
-short warrant bars with solid black squares, stars in clusters rather than rows, and one ringed
-gold star for General of the Army.
-
- python Tools/rank_insignia_usa.py
- writes Data/Art/Textures/ReforgedRanksUSA.tga, an 8 by 4 atlas of 64-pixel cells, and
- Data/INI/MappedImages/HandCreated/ReforgedRanksUSA.ini that names each cell.
- python Tools/rank_insignia_usa.py preview <png>
- also writes a labelled sheet, every icon at 64, 16 and 12 pixels on sand and on grass.
-
-Drawn big, fitted, outlined at eight times size and brought down, which is the antialiasing."""
-import math
-import os
-import sys
-
-from PIL import Image, ImageChops, ImageDraw, ImageFilter, ImageFont
-
-from rank_insignia_cells import ink_entries
-
-HERE = os.path.dirname(os.path.abspath(__file__))
-NAME = "ReforgedRanksUSA"
-CELL = 64
-COLUMNS, ROWS = 8, 4
-SCALE = 8 # outline and fit happen at CELL * SCALE
-UNIT = 16 # design pixels per design unit; designs live in -32..32 units
-OUTLINE = 3 # shipped pixels of black edge
-MARGIN = 1
-GOLD = ((255, 232, 120), (196, 134, 24))
-SILVER = ((252, 252, 252), (138, 146, 160))
-TEXTURE_PATH = os.path.join(HERE, "..", "Data", "Art", "Textures", NAME + ".tga")
-INI_PATH = os.path.join(HERE, "..", "Data", "INI", "MappedImages", "HandCreated", NAME + ".ini")
-INI_HEADER = """; Every rank of the United States Army, one mapped image per rank in one atlas. Written by
-; Tools/rank_insignia_usa.py with the texture it names; do not edit by hand. Mapped images are not
-; in the multiplayer INI checksum.
-"""
-INI_ENTRY = """
-; %s, %s
-MappedImage %s
- Texture = %s.tga
- TextureWidth = %d
- TextureHeight = %d
- Coords = Left:%d Top:%d Right:%d Bottom:%d
- Status = NONE
-End
-"""
-
-
-def canvas():
- return Image.new("L", (64 * UNIT, 64 * UNIT), 0)
-
-
-def px(points):
- """Design units to design pixels."""
- return [((x + 32) * UNIT, (y + 32) * UNIT) for x, y in points]
-
-
-def box(x0, y0, x1, y1):
- return tuple(v for point in px([(x0, y0), (x1, y1)]) for v in point)
-
-
-STAR_WAIST = 0.48 # inner radius over outer; the true 0.382 thins to a speck at twelve pixels
-
-
-def star(draw, cx, cy, r, fill=255):
- points = []
- for i in range(10):
- angle = math.radians(-90 + 36 * i)
- reach = r if i % 2 == 0 else r * STAR_WAIST
- points.append((cx + reach * math.cos(angle), cy + reach * math.sin(angle)))
- draw.polygon(px(points), fill=fill)
-
-
-def eagle(draw, cx, cy, s, fill=255):
- """A displayed eagle, wings raised, head turned to its right (the viewer's left)."""
- def at(points):
- return px([(cx + x * s, cy + y * s) for x, y in points])
- # solid wings and no beak: at twelve pixels the feathers and the turned head were a smudge
- for side in (-1, 1):
- wing = [(3, -3), (22, -14), (22, -2), (14, 2), (5, 6)]
- draw.polygon(at([(x * side, y) for x, y in wing]), fill=fill)
- draw.ellipse(box(cx - 5.5 * s, cy - 5 * s, cx + 5.5 * s, cy + 10 * s), fill=fill)
- draw.ellipse(box(cx - 4 * s, cy - 13 * s, cx + 4 * s, cy - 4 * s), fill=fill)
- draw.polygon(at([(-5, 8), (5, 8), (8, 15), (-8, 15)]), fill=fill) # tail
-
-
-# Enlisted stripes. Chevrons alone are steep and narrow, so a lone chevron is no wider than half again
-# its height; over rockers they flatten and widen, since the stack is tall already and the rockers
-# need the width. Rockers are fat with a wide gap, so one, two and three count at fourteen pixels.
-STEEP, FLAT = (14, 14), (18, 7) # half width and drop of a chevron arm
-T, PITCH = 4.5, 6
-ROCKER_GAP, ROCKER_T, ROCKER_PITCH, SAG = 3, 7, 11, 4
-# E-8 and E-9: the device is what tells them apart, so it goes big in the middle of the stack, in a
-# colour of its own, on one deep rocker that cradles it, in place of three rockers it had no room
-# among
-DEVICE_R = 11 # the device's half size
-CRADLE_SAG = 15
-RED = ((255, 120, 100), (170, 34, 24))
-BLUE = ((150, 200, 255), (40, 86, 190))
-
-
-def chevron(apex, w, d):
- return [(-w, apex + d), (0, apex), (w, apex + d), (w, apex + d + T), (0, apex + T), (-w, apex + d + T)]
-
-
-def curve(end_y, w, sag=SAG, steps=24):
- return [(-w + 2 * w * i / steps, end_y + sag * (1 - ((-w + 2 * w * i / steps) / w) ** 2))
- for i in range(steps + 1)]
-
-
-def stripes(chevrons, rockers, device=None):
- """Gold chevrons and rockers on their black patch, or with a device: three chevrons, the device
- under them and one deep rocker round it."""
- w, d = FLAT if rockers or device else STEEP
- gold, back = canvas(), canvas()
- g, b = ImageDraw.Draw(gold), ImageDraw.Draw(back)
- top = -30
- for k in range(chevrons):
- g.polygon(px(chevron(top + PITCH * k, w, d)), fill=255)
- low = top + PITCH * (chevrons - 1)
- if device:
- cy = low + T + d + ROCKER_GAP + DEVICE_R
- tips = cy - DEVICE_R * 0.3
- g.polygon(px(curve(tips, w, CRADLE_SAG) + curve(tips + ROCKER_T, w, CRADLE_SAG)[::-1]), fill=255)
- b.polygon(px([(-w, top + d), (0, top), (w, top + d)] + curve(tips + ROCKER_T, w, CRADLE_SAG)[::-1]),
- fill=255)
- layer = canvas()
- draw_device, colours = device
- draw_device(ImageDraw.Draw(layer), cy)
- return gold, back, GOLD, layer, colours
- first_rocker = low + d + T + ROCKER_GAP
- for j in range(rockers):
- end_y = first_rocker + ROCKER_PITCH * j
- g.polygon(px(curve(end_y, w) + curve(end_y + ROCKER_T, w)[::-1]), fill=255)
- if rockers:
- bottom = curve(first_rocker + ROCKER_PITCH * (rockers - 1) + ROCKER_T, w)[::-1]
- else:
- bottom = [(w, low + d + T), (0, low + T), (-w, low + d + T)]
- b.polygon(px([(-w, top + d), (0, top), (w, top + d)] + bottom), fill=255)
- return gold, back, GOLD
-
-
-def lozenge(draw, cy):
- r = DEVICE_R * 1.1
- draw.polygon(px([(0, cy - r), (r * 0.75, cy), (0, cy + r), (-r * 0.75, cy)]), fill=255)
-
-
-def sgm_star(draw, cy):
- star(draw, 0, cy + 1, DEVICE_R * 1.1)
-
-
-def csm_wreath(draw, cy):
- r = DEVICE_R
- draw.ellipse(box(-r, cy - r, r, cy + r), outline=255, width=round(3 * UNIT))
- star(draw, 0, cy + 0.5, r * 0.62)
-
-
-def sma_stars(draw, cy):
- for x in (-7, 7):
- star(draw, x, cy + 1, DEVICE_R * 0.75)
-
-
-def specialist():
- """The Specialist's eagle, big, on a tall patch with a pointed top and a round bottom, gold
- edged: the eagle fills the patch so the badge reads as a bird and not a disc."""
- gold, back = canvas(), canvas()
- bottom = [(x, 8 + 12 * (1 - (x / 18) ** 2)) for x, _ in curve(0, 18)][::-1]
- outer = [(0, -26), (18, -14), (18, 8)] + bottom + [(-18, 8), (-18, -14)]
- inner = [(x * 0.88, y * 0.9) for x, y in outer]
- ImageDraw.Draw(back).polygon(px(outer), fill=255)
- g = ImageDraw.Draw(gold)
- g.polygon(px(outer), fill=255)
- g.polygon(px(inner), fill=0)
- eagle(g, 0, 0, 0.68)
- return gold, back, GOLD
-
-
-def bar(metal, holes=0, line=False):
- """A lieutenant's or warrant officer's bar; warrant bars carry black squares or a black line,
- solid black on the patch rather than holes the edge half filled in."""
- gold, back = canvas(), canvas()
- g = ImageDraw.Draw(gold)
- outline = box(-16.5, -10, 16.5, 10)
- g.rounded_rectangle(outline, radius=3 * UNIT, fill=255)
- ImageDraw.Draw(back).rounded_rectangle(outline, radius=3 * UNIT, fill=255)
- pitch, size = 7, 5.5
- for i in range(holes):
- x = (i - (holes - 1) / 2) * pitch
- g.rectangle(box(x - size / 2, -size / 2, x + size / 2, size / 2), fill=0)
- if line:
- g.rectangle(box(-13, -2.5, 13, 2.5), fill=0)
- return gold, back, metal
-
-
-def captain():
- """Two silver bars joined at the ends, laid flat like the lieutenants' bars."""
- gold = canvas()
- g = ImageDraw.Draw(gold)
- for y in (-7, 7):
- g.rounded_rectangle(box(-13, y - 4.5, 13, y + 4.5), radius=2 * UNIT, fill=255)
- for x in (-8.5, 8.5):
- g.rectangle(box(x - 1.8, -3, x + 1.8, 3), fill=255)
- return gold, gold, SILVER
-
-
-def oak_leaf(metal):
- gold = canvas()
- g = ImageDraw.Draw(gold)
- # squat and lobed, no midrib: the slim leaf with its vein came down to a dot
- g.ellipse(box(-12, -20, 12, 16), fill=255)
- for x, y, r in ((9, -14, 6), (13, -5, 7.5), (14, 5, 7.5), (11, 13, 6)):
- for side in (-1, 1):
- g.ellipse(box(side * x - r, y - r, side * x + r, y + r), fill=255)
- g.ellipse(box(-6, -25, 6, -14), fill=255)
- g.polygon(px([(-3, 16), (3, 16), (4, 25), (-4, 25)]), fill=255) # stem
- return gold, gold, metal
-
-
-def colonel():
- gold = canvas()
- eagle(ImageDraw.Draw(gold), 0, 0, 1.4)
- return gold, gold, SILVER
-
-
-def stars(count):
- gold = canvas()
- g = ImageDraw.Draw(gold)
- # a tight cluster rather than a row: two on a slant, three in a triangle, four two over two
- layout = {1: [(0, 0)],
- 2: [(-0.4, -0.3), (0.4, 0.3)],
- 3: [(0, -0.45), (-0.5, 0.45), (0.5, 0.45)],
- 4: [(-0.5, -0.5), (0.5, -0.5), (-0.5, 0.5), (0.5, 0.5)]}[count]
- pitch = 15
- for x, y in layout:
- star(g, x * pitch, y * pitch, 8.2)
- return gold, gold, SILVER
-
-
-def general_of_the_army():
- """One big gold star in a thick ring: the real five-star circle came down to a grey disc."""
- gold = canvas()
- g = ImageDraw.Draw(gold)
- g.ellipse(box(-20, -20, 20, 20), outline=255, width=round(5 * UNIT))
- star(g, 0, 1.5, 13)
- return gold, gold, GOLD
-
-
-def empty():
- """A Private (E-1) wears no insignia."""
- return canvas(), canvas(), GOLD
-
-
-# image name, grade, title, design; the atlas fills row by row in this order
-RANKS = [
- ("RankUSA_E1", "E-1", "Private (PV1)", empty),
- ("RankUSA_E2", "E-2", "Private (PV2)", lambda: stripes(1, 0)),
- ("RankUSA_E3", "E-3", "Private First Class", lambda: stripes(1, 1)),
- ("RankUSA_E4", "E-4", "Specialist", specialist),
- ("RankUSA_E4_CPL", "E-4", "Corporal", lambda: stripes(2, 0)),
- ("RankUSA_E5", "E-5", "Sergeant", lambda: stripes(3, 0)),
- ("RankUSA_E6", "E-6", "Staff Sergeant", lambda: stripes(3, 1)),
- ("RankUSA_E7", "E-7", "Sergeant First Class", lambda: stripes(3, 2)),
- ("RankUSA_E8", "E-8", "Master Sergeant", lambda: stripes(3, 3)),
- ("RankUSA_E8_1SG", "E-8", "First Sergeant", lambda: stripes(3, 1, (lozenge, SILVER))),
- ("RankUSA_E9", "E-9", "Sergeant Major", lambda: stripes(3, 1, (sgm_star, GOLD))),
- ("RankUSA_E9_CSM", "E-9", "Command Sergeant Major", lambda: stripes(3, 1, (csm_wreath, RED))),
- ("RankUSA_E9_SMA", "E-9", "Sergeant Major of the Army", lambda: stripes(3, 1, (sma_stars, BLUE))),
- ("RankUSA_W1", "W-1", "Warrant Officer 1", lambda: bar(SILVER, 1)),
- ("RankUSA_W2", "W-2", "Chief Warrant Officer 2", lambda: bar(SILVER, 2)),
- ("RankUSA_W3", "W-3", "Chief Warrant Officer 3", lambda: bar(SILVER, 3)),
- ("RankUSA_W4", "W-4", "Chief Warrant Officer 4", lambda: bar(SILVER, 4)),
- ("RankUSA_W5", "W-5", "Chief Warrant Officer 5", lambda: bar(SILVER, line=True)),
- ("RankUSA_O1", "O-1", "Second Lieutenant", lambda: bar(GOLD)),
- ("RankUSA_O2", "O-2", "First Lieutenant", lambda: bar(SILVER)),
- ("RankUSA_O3", "O-3", "Captain", captain),
- ("RankUSA_O4", "O-4", "Major", lambda: oak_leaf(GOLD)),
- ("RankUSA_O5", "O-5", "Lieutenant Colonel", lambda: oak_leaf(SILVER)),
- ("RankUSA_O6", "O-6", "Colonel", colonel),
- ("RankUSA_O7", "O-7", "Brigadier General", lambda: stars(1)),
- ("RankUSA_O8", "O-8", "Major General", lambda: stars(2)),
- ("RankUSA_O9", "O-9", "Lieutenant General", lambda: stars(3)),
- ("RankUSA_O10", "O-10", "General", lambda: stars(4)),
- ("RankUSA_O11_GA", "O-11", "General of the Army", general_of_the_army),
-]
-
-
-def icon(design):
- """One 64-pixel cell: the design fitted to the cell, lit, edged in black."""
- gold, back, colours, *device = design()
- silver, device_colours = device if device else (canvas(), SILVER)
- size = CELL * SCALE
- union = ImageChops.lighter(ImageChops.lighter(gold, back), silver)
- bbox = union.getbbox()
- if bbox is None:
- return Image.new("RGBA", (CELL, CELL), (0, 0, 0, 0))
- room = (CELL - 2 * (OUTLINE + MARGIN)) * SCALE
- fit = room / max(bbox[2] - bbox[0], bbox[3] - bbox[1])
- w, h = round((bbox[2] - bbox[0]) * fit), round((bbox[3] - bbox[1]) * fit)
- left, upper = (size - w) // 2, (size - h) // 2
- shapes = []
- for layer in (gold, silver, union):
- placed = Image.new("L", (size, size), 0)
- placed.paste(layer.crop(bbox).resize((w, h), Image.LANCZOS), (left, upper))
- shapes.append(placed)
- gold, silver, union = shapes
-
- def lit(top, bottom):
- metal = Image.new("RGB", (size, size))
- draw = ImageDraw.Draw(metal)
- for y in range(size):
- share = min(1.0, max(0.0, (y - upper) / h))
- draw.line((0, y, size, y), fill=tuple(round(a + (b - a) * share) for a, b in zip(top, bottom)))
- return metal
-
- # the black edge: a blur thresholded about two sigmas out, so OUTLINE pixels wide
- alpha = union.filter(ImageFilter.GaussianBlur(OUTLINE * SCALE / 2)).point(lambda v: 255 if v >= 6 else 0)
- art = Image.composite(lit(*colours), Image.new("RGB", (size, size), (0, 0, 0)), gold)
- art = Image.composite(lit(*device_colours), art, silver)
- art.putalpha(ImageChops.lighter(alpha, union))
- return art.resize((CELL, CELL), Image.LANCZOS)
-
-
-def preview(atlas, path):
- """Each icon at 64, 16 and 12 pixels, on sand and on grass, with its grade and title."""
- tile_w, tile_h, columns = 330, 84, 3
- rows = (len(RANKS) + columns - 1) // columns
- sheet = Image.new("RGB", (tile_w * columns, tile_h * rows), (40, 40, 44))
- font = ImageFont.load_default(13)
- bold = ImageFont.load_default(15)
- draw = ImageDraw.Draw(sheet)
- for index, (name, grade, title, _) in enumerate(RANKS):
- x, y = (index % columns) * tile_w, (index // columns) * tile_h
- cell = atlas.crop(((index % COLUMNS) * CELL, (index // COLUMNS) * CELL,
- (index % COLUMNS + 1) * CELL, (index // COLUMNS + 1) * CELL))
- for ground, gx in (((196, 172, 120), x + 4), ((78, 104, 52), x + 74)):
- draw.rectangle((gx, y + 4, gx + 66, y + tile_h - 5), fill=ground)
- sheet.paste(cell, (x + 5, y + 10), cell)
- for size, sy in ((16, y + 14), (12, y + 50)):
- small = cell.resize((size, size), Image.LANCZOS)
- for gx in (x + 76, x + 112):
- sheet.paste(small, (gx + (16 - size) // 2, sy), small)
- draw.text((x + 148, y + 12), grade + " " + name, fill=(255, 255, 255), font=bold)
- draw.text((x + 148, y + 36), title, fill=(210, 210, 210), font=font)
- os.makedirs(os.path.dirname(path), exist_ok=True)
- sheet.save(path)
- print(path)
-
-
-def main():
- atlas = Image.new("RGBA", (CELL * COLUMNS, CELL * ROWS), (0, 0, 0, 0))
- ini_text = INI_HEADER
- for index, (name, grade, title, design) in enumerate(RANKS):
- x, y = (index % COLUMNS) * CELL, (index // COLUMNS) * CELL
- atlas.paste(icon(design), (x, y))
- ini_text += INI_ENTRY % (grade, title, name, NAME, atlas.width, atlas.height, x, y, x + CELL, y + CELL)
- # E-6 to E-9 (chevrons over rockers), the leaves, the eagle and the ringed star draw 14 high
- ini_text = ink_entries(atlas, ini_text, "America", tall=list(range(6, 13)) + [21, 22, 23, 28])
- atlas.save(TEXTURE_PATH)
- print(TEXTURE_PATH)
- with open(INI_PATH, "w", newline="\r\n") as ini:
- ini.write(ini_text)
- print(INI_PATH)
- if len(sys.argv) == 3 and sys.argv[1] == "preview":
- preview(atlas, sys.argv[2])
-
-
-if __name__ == "__main__":
- main()
diff --git a/README.md b/README.md
index 29ee409ee..03ad6baaf 100644
--- a/README.md
+++ b/README.md
@@ -50,7 +50,6 @@ to the same checksum, and a Mac and a Linux PC have played a LAN match without o
| A tank shell on a soldier | 6 damage, 30 hits to kill a Ranger | 60 damage, three hits | 3.2.0 |
| A Raptor's half circle at cruise | `1.7 s`, sliding sideways | `3.2 s`, banked | 3.2.0 |
| A kill's veterancy | all of it to the last shot | a quarter to the last shot, the rest shared by damage done in the last ten seconds | 2.4.0 |
-| Ranks | three chevrons on every side | USA 28 grades, China 19, GLA 20 | `main` |
| Maps a network room lists | 100, and 300 in skirmish | 4,096 | `main` |
| First toxin cloud on a fresh install | a `3.5 s` freeze | no freeze, its shaders ship with the game | `main` |
| First superweapon strike on a fresh install | a `110` to `130 ms` hitch each | none | `main` |
@@ -104,7 +103,6 @@ yet. [CHANGELOG.md](CHANGELOG.md) has the measurements behind every line.
| A jet shot down hits for 80 where it lands, 160 for a B-52 or a cargo plane, and leaves fire for about six seconds; its owner and allies are spared | 3.2.0 |
| A tank shell that hits a soldier does the 60 it does to a tank, where it did 6 | 3.2.0 |
| Missiles weave a few degrees in flight, the weave fading as they close in | 3.2.0 |
-| A rank ladder for every army: 28 American grades from E-1 Private to General of the Army, 19 Chinese, 20 GLA, each with its insignia beside the health bar; the top is 120 kills of a unit like your own | `main` |
| A hacker left without orders for ten seconds walks into an Internet Center with a free seat or opens its laptop where it stands | `main` |
### The computer opponent
@@ -480,7 +478,7 @@ them, and any source change separates them.
- The Windows ARM64 build has not run on an ARM64 machine, and the macOS and Linux packages carry no
upscaled art. A match between Windows and a Mac has not been played.
- Replays and mid-match saves from before 3.0.0's 60-step battle do not load. Replays recorded before
- the rank ladder and the other `main` changes to the battle play out differently.
+ the `main` changes to the battle play out differently.
- SafeDisc stays stubbed.
## Help out
diff --git a/Tools/Balance/vetduel.py b/Tools/Balance/vetduel.py
deleted file mode 100644
index 73757a6c0..000000000
--- a/Tools/Balance/vetduel.py
+++ /dev/null
@@ -1,129 +0,0 @@
-"""A ranked army against a bigger regular one; run it once with each rank ladder and compare.
-
-Every side's veterans fight regular armies of both other sides, tanks against tanks and infantry
-against infantry, at each experience point, from both start points and on two seeds. A point is N
-same-class kills of experience (the scenario's `rank ... xp N`, docs/plans/RANK-LADDER.md's
-experience duels), auras off. The regular army's money is the ranked army's times three quarters of
-the ladder's stat worth at that point (rate of fire x damage x health, 1 + 1.4 sqrt(N / 120)), so a
-fight is close when the grade gives what the curve says and a change to the split moves it. Every
-side should agree within 0.1 at the same point.
-
-The answer per fight is the ranked army's health left as a fraction of its own at the start, minus
-the regular army's: +1 the ranked army lost nothing and wiped the other, -1 the reverse. The report
-averages it per side and point over the side's 16 fights (4 pairs, 2 start points, 2 seeds).
-
- python vetduel.py <exe name in Run> <tag> [pair filter]
- python vetduel.py --report <tag> [<tag> ...]
-"""
-
-import concurrent.futures
-import json
-import re
-import subprocess
-import sys
-
-import siege
-
-TANK_BUDGET = 4800
-INFANTRY_BUDGET = 1800
-MAX_FRAMES = 3000 * siege.LOGIC_FPS // siege.SCENARIO_FPS
-SPAWN_FRAME = 30
-RANK_FRAME = 40
-ATTACK_FRAME = 60
-TALLY_FRAME = 2950
-LEFT_AT = (500, 1100) # open ground on generated map 1 small: a block of 42 Rebels or 19 Overlords
-RIGHT_AT = (1250, 1100) # stands whole at either
-SPACING = 25
-HANDICAP = 0.75 # the regular army's money as a share of an even fight's
-SEEDS = (1, 2)
-
-RANKS = {"xp%d" % kills: 1 + 1.4 * (kills / 120) ** 0.5 for kills in (2, 5, 10, 20, 30, 45, 60, 80, 100, 120)}
-UNITS = { # side: (tank, its price, infantry, its price)
- "USA": ("AmericaTankCrusader", 900, "AmericaInfantryRanger", 225),
- "China": ("ChinaTankBattleMaster", 800, "ChinaInfantryRedguard", 300),
- "GLA": ("GLATankScorpion", 600, "GLAInfantryRebel", 150),
-}
-PAIRS = [(side, UNITS[side][kind], UNITS[side][kind + 1], UNITS[other][kind], UNITS[other][kind + 1])
- for side in UNITS for other in UNITS if other != side for kind in (0, 2)]
-
-
-def run_one(exe: str, tag: str, index: int, pair: tuple, rank: str, swapped: bool, seed: int) -> dict:
- side, ranked, ranked_price, regular, regular_price = pair
- ranked_at, regular_at = (RIGHT_AT, LEFT_AT) if swapped else (LEFT_AT, RIGHT_AT)
- budget = INFANTRY_BUDGET if "Infantry" in ranked else TANK_BUDGET
- ranked_count = round(budget / ranked_price)
- regular_count = round(budget * RANKS[rank] * HANDICAP / regular_price)
- name = "vd%s%03d" % (tag, index)
- lines = [
- "%d spawn 0 %s %d %d %d %d" % (SPAWN_FRAME, ranked, ranked_count, *ranked_at, SPACING),
- "%d spawn 1 %s %d %d %d %d" % (SPAWN_FRAME, regular, regular_count, *regular_at, SPACING),
- "%d rank 0 %s xp %s" % (RANK_FRAME, siege.selector(ranked), rank[2:]),
- "%d attackmove 0 %s %d %d" % (ATTACK_FRAME, siege.selector(ranked), *regular_at),
- "%d attackmove 1 %s %d %d" % (ATTACK_FRAME, siege.selector(regular), *ranked_at),
- ]
- for frame in (ATTACK_FRAME, TALLY_FRAME):
- lines.append("%d tally 0 %s" % (frame, siege.selector(ranked)))
- lines.append("%d tally 1 %s" % (frame, siege.selector(regular)))
- scenario = siege.SCENARIO_DIR / (name + ".txt")
- scenario.write_text("\n".join(lines) + "\n", encoding="ascii")
- log = siege.RUN_DIR / (name + "_DebugLogFile.txt")
- log.unlink(missing_ok=True)
- arguments = [str(siege.RUN_DIR / exe), "-headless", "-quickstart", "-noshellmap", "-observer", "-multiInstance",
- "-noFPSLimit", "-randommap", "1", "2", "small", "-autoskirmish", "2", "-takeover",
- "-side", "0", "FactionAmerica", "-side", "1", "FactionChina", "-seed", str(seed),
- "-maxframes", str(MAX_FRAMES), "-scenario", name, "-logPrefix", name + "_"]
- process = subprocess.Popen(arguments, cwd=siege.RUN_DIR, creationflags=subprocess.ABOVE_NORMAL_PRIORITY_CLASS)
- try:
- process.wait(timeout=siege.TIMEOUT_SECONDS)
- except subprocess.TimeoutExpired:
- process.kill()
- scenario.unlink()
- health = {}
- for match in siege.TALLY.finditer(log.read_text(encoding="latin-1", errors="replace")):
- health[(int(match.group(1)), int(match.group(2)))] = int(match.group(5))
- log.unlink()
- return {"side": side, "ranked": ranked, "regular": regular, "rank": rank, "swapped": swapped, "seed": seed,
- "rankedStart": health.get((ATTACK_FRAME, 0)), "rankedEnd": health.get((TALLY_FRAME, 0)),
- "regularStart": health.get((ATTACK_FRAME, 1)), "regularEnd": health.get((TALLY_FRAME, 1))}
-
-
-def net(row: dict) -> float:
- return row["rankedEnd"] / row["rankedStart"] - row["regularEnd"] / row["regularStart"]
-
-
-def report(tags: list) -> None:
- tables = {}
- for tag in tags:
- cells = {}
- for row in json.loads((siege.OUT_DIR / ("vetduel_" + tag + ".json")).read_text()):
- if None not in (row["rankedStart"], row["rankedEnd"], row["regularStart"], row["regularEnd"]):
- cells.setdefault((row["side"], row["rank"]), []).append(net(row))
- tables[tag] = {key: (sum(v) / len(v), len(v)) for key, v in cells.items()}
- print("%-6s %-8s" % ("side", "rank") + "".join("%14s" % tag for tag in tags))
- for side in UNITS:
- for rank in RANKS:
- print("%-6s %-8s" % (side, rank) + "".join(
- "%14s" % ("%+.2f (%d)" % tables[tag][(side, rank)] if (side, rank) in tables[tag] else "-")
- for tag in tags))
-
-
-def main() -> int:
- if sys.argv[1] == "--report":
- report(sys.argv[2:])
- return 0
- exe, tag = sys.argv[1], sys.argv[2]
- runs = [(pair, rank, swapped, seed) for pair in PAIRS for rank in RANKS for swapped in (False, True)
- for seed in SEEDS if len(sys.argv) < 4 or re.search(sys.argv[3], pair[1] + " " + pair[3])]
- results = []
- with concurrent.futures.ThreadPoolExecutor(siege.PARALLEL_RUNS) as pool:
- for row in pool.map(lambda item: run_one(exe, tag, item[0], *item[1]), enumerate(runs)):
- results.append(row)
- print("%-24s %-8s %s/%s vs %-24s %s/%s" % (row["ranked"], row["rank"], row["rankedEnd"], row["rankedStart"],
- row["regular"], row["regularEnd"], row["regularStart"]), flush=True)
- siege.OUT_DIR.mkdir(exist_ok=True)
- (siege.OUT_DIR / ("vetduel_" + tag + ".json")).write_text(json.dumps(results, indent=1), encoding="utf-8")
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())