feat(saves): seed new saves and reveal eligible hidden vehicles

Set initial Silver Lions and Golden Eagles balances and add a save
editing command. Open rank I for each nation and branch and migrate
older saves to format 3. Reveal eligible hidden vehicles while keeping
split air-defense launchers out of the tech tree.

Document the currency, rank, and unit status fields observed in the offline client.
This commit is contained in:
N0VAN0M4LY committed 2026-11-24 14:45:28 +08:00
1 parent ed0136f5fc
commit e5452e925f
12 files changed
+282 -12

No files matched your search

+9 -3
View File
@@ -1,11 +1,13 @@
/**
* Rebuild char.vromfs.bin: config/network.blk pointed at the local service, and the offline
* version's features turned on in config/game_settings.blk.
* Rebuild char.vromfs.bin: config/network.blk pointed at the local service, the offline
* version's features turned on in config/game_settings.blk, and every vehicle shown in the
* tech tree (config/shop.blk).
*/
import { enableFeaturesForEveryone, GAME_SETTINGS_PATH, OFFLINE_FEATURES } from './features/offline-features.ts';
import type { LocalEndpoint } from './network/local-endpoint.ts';
import { redirectNetworkConfig, type NetworkRedirectReport } from './network/redirect-network-config.ts';
import { editPackBlks } from './pack-edit.ts';
import { revealHiddenVehicles, SHOP_PATH } from './tech-tree/reveal-hidden-vehicles.ts';
export const NETWORK_CONFIG_PATH = 'config/network.blk';
@@ -14,14 +16,18 @@ export interface CharPackResult {
readonly network: NetworkRedirectReport;
/** Features that are now on for every player. */
readonly features: readonly string[];
/** Vehicles that were hidden from players who had not researched or bought them. */
readonly revealedVehicles: number;
}
export function rebuildCharPack(stockPack: Uint8Array, endpoint: LocalEndpoint): CharPackResult {
let network: NetworkRedirectReport | undefined;
let features: string[] = [];
let revealedVehicles = 0;
const pack = editPackBlks(stockPack, [
{ path: NETWORK_CONFIG_PATH, edit: (root) => { network = redirectNetworkConfig(root, endpoint); } },
{ path: GAME_SETTINGS_PATH, edit: (root) => { features = enableFeaturesForEveryone(root, OFFLINE_FEATURES); } },
{ path: SHOP_PATH, edit: (root) => { revealedVehicles = revealHiddenVehicles(root); } },
]);
return { pack, network: network!, features };
return { pack, network: network!, features, revealedVehicles };
}