fix(battle): use stock economy names for ground and naval modes

The per-event game tables (rank.blk ExpSkillBonus, gameplay.blk
RandomSpawnUnits) and the stock scripts that read them through
getEventEconomicName key ground and naval events as
tank_event_in_random_battles_arcade, tank_random_battles_historical_base,
tank_event_in_random_battles_simulation and
ship_event_in_random_battles_{arcade,realistic}. The catalogue used the
leaderboard mode ids instead, so the skill bonus and random spawn units
of those modes were never found.
This commit is contained in:
N0VAN0M4LY committed 2026-11-28 05:13:56 +08:00
1 parent 7c27d09f78
commit f7d495de5f
3 files changed
+15 -12

No files matched your search

@@ -2,9 +2,11 @@
* Random battles: shown in the game-mode selection. Names are the stock ones the UI scripts
* know (scripts/events/eventInfo.nut eventIdsForMainGameModeList,
* scripts/gameModes/gameModeManagerState.nut, scripts/gameModes/psnActivities.nut); display
* names are the game's "missions/<mode>_event_<difficulty>" texts (lang menu_events.csv);
* economic names of ground and naval modes are the ones the leaderboard scripts use
* (scripts/leaderboard/leaderboardCategoryType.nut).
* names are the game's "missions/<mode>_event_<difficulty>" texts (lang menu_events.csv).
* Economic names are the keys the game's per-event tables use: char.vromfs.bin config/rank.blk
* ExpSkillBonus{} and aces.vromfs.bin config/gameplay.blk RandomSpawnUnits{}, which the stock
* scripts read through getEventEconomicName (scripts/statistics/mpstatistics.nut,
* scripts/unit/randomunitsforceweapon.nut).
*
* `minMRankForSmallTeamsBattles` (27 = BR 10.0, Air RB) and `minMRankForNightBattles`
* (27 = BR 10.0, Ground RB) come from `scripts/events/secondgamemodesutils.nut:25-26`,
@@ -31,20 +33,20 @@ export const RANDOM_BATTLES: readonly GameModeDeclaration[] = [
minMRankForSmallTeamsBattles: AIR_REALISTIC_SMALL_TEAMS_MIN_MRANK, ...AIR,
},
{
gameModeId: 3, name: 'tank_event_in_random_battles_arcade', economicName: 'tank_arcade',
gameModeId: 3, name: 'tank_event_in_random_battles_arcade', economicName: 'tank_event_in_random_battles_arcade',
locName: 'missions/tank_event_in_random_battles_arcade', difficulty: 'arcade', displayType: 'random_battle', ...GROUND,
},
{
gameModeId: 4, name: 'tank_event_in_random_battles_historical', economicName: 'tank_realistic',
gameModeId: 4, name: 'tank_event_in_random_battles_historical', economicName: 'tank_random_battles_historical_base',
locName: 'missions/tank_event_in_random_battles_historical', difficulty: 'realistic', displayType: 'random_battle',
minMRankForNightBattles: GROUND_REALISTIC_NIGHT_MIN_MRANK, ...GROUND,
},
{
gameModeId: 5, name: 'ship_event_in_random_battles_arcade', economicName: 'test_ship_arcade',
gameModeId: 5, name: 'ship_event_in_random_battles_arcade', economicName: 'ship_event_in_random_battles_arcade',
locName: 'missions/ship_event_arcade', difficulty: 'arcade', displayType: 'random_battle', ...NAVAL,
},
{
gameModeId: 6, name: 'ship_event_in_random_battles_realistic', economicName: 'test_ship_realistic',
gameModeId: 6, name: 'ship_event_in_random_battles_realistic', economicName: 'ship_event_in_random_battles_realistic',
locName: 'missions/ship_event_historical', difficulty: 'realistic', displayType: 'random_battle', ...NAVAL,
},
];
@@ -6,7 +6,8 @@
* Air and ground use the stock names that have short display texts in the game
* ("missions/short/air_simulation_timeDelay_battles", "missions/short/tank_random_battles_simulation");
* the game has no stock name for naval simulator battles, so that one is named after its
* display text "missions/ship_event_simulator".
* display text "missions/ship_event_simulator". The ground economic name is the rank.blk
* ExpSkillBonus{} key (see random-battles.ts).
*/
import type { GameModeDeclaration } from './game-mode-declaration.ts';
import { AIR_BATTLE_MISSIONS, GROUND_BATTLE_MISSIONS, NAVAL_BATTLE_MISSIONS } from './mission-pools.ts';
@@ -20,7 +21,7 @@ export const SIMULATOR_BATTLES: readonly GameModeDeclaration[] = [
requiredClass: 'aircraft', allowedClasses: ['aircraft'], missions: AIR_BATTLE_MISSIONS,
},
{
gameModeId: 12, name: 'tank_random_battles_simulation', economicName: 'tank_simulation',
gameModeId: 12, name: 'tank_random_battles_simulation', economicName: 'tank_event_in_random_battles_simulation',
locName: 'missions/tank_event_in_random_battles_simulator', ...SIMULATOR,
requiredClass: 'tank', allowedClasses: ['tank', 'aircraft', 'helicopter'], missions: GROUND_BATTLE_MISSIONS,
},
@@ -33,7 +33,7 @@ export const SUB_GAME_MODES: readonly GameModeDeclaration[] = [
gameModeId: 101,
name: 'tank_event_in_random_battles_historical',
tag: 'regular_with_night_tank_realistic',
economicName: 'tank_realistic',
economicName: 'tank_random_battles_historical_base',
locName: 'missions/tank_event_in_random_battles_historical',
difficulty: 'realistic',
displayType: 'random_battle',
@@ -92,7 +92,7 @@ export const SUB_GAME_MODES: readonly GameModeDeclaration[] = [
gameModeId: 105,
name: 'ship_event_in_random_battles_arcade',
tag: 'naval_ec_ab_ship_arcade',
economicName: 'test_ship_arcade',
economicName: 'ship_event_in_random_battles_arcade',
locName: 'missions/ship_event_arcade',
difficulty: 'arcade',
displayType: 'random_battle',
@@ -106,7 +106,7 @@ export const SUB_GAME_MODES: readonly GameModeDeclaration[] = [
gameModeId: 106,
name: 'ship_event_in_random_battles_realistic',
tag: 'naval_ec_rb_ship_realistic',
economicName: 'test_ship_realistic',
economicName: 'ship_event_in_random_battles_realistic',
locName: 'missions/ship_event_historical',
difficulty: 'realistic',
displayType: 'random_battle',