The launcher's main process can now install the game copy, driven over
IPC by the install wizard to come:
- install:checkPatches builds the copy in memory in a utility process
(workers/patch-check-worker.ts, a second main entry) and reports the
patches that do not fit, each marked essential or not. Nothing is
written.
- install:start checks first, on the stock files the copy would get, so
a game whose essential patches do not fit is refused before tens of
gigabytes are copied; other missing patches need the player's
acceptance. Then, for the copy method, it measures, checks the target
drive's free space (plus 1 GB) and copies; it keeps the four stock
files in <copy>/wtoffline/stock, never replacing a file already there;
and it writes <user data>/install.json. Patched files are written by
the build at every launch with that launch's port, not here.
- The copy leaves out the top-level folders that hold what the game
produced while played online (.game_logs, cache, Replays, Screenshots,
UserMissions). It copies in chunks through streams, so progress moves
within a large data pack and install:cancel stops at once; it never
overwrites a file, and after a failure or a cancel it removes what it
copied, which is safe because the target was new or empty. One failing
parallel copy stops the others before the cleanup starts.
- Progress goes to the window as event:install-progress, at most every
250 ms. install:getRecord returns the record and the default data
folder (<user data>/data).
- New error codes, translated in both languages: not_a_game_folder,
target_not_usable, steam_library_not_confirmed, not_enough_space,
essential_patches_unavailable, missing_features_not_accepted,
patch_check_failed, copy_failed, install_cancelled, install_busy.
Checked with the launcher typecheck and build, and the calls made from a
running launcher window on a 2 GB test game folder holding the real
stock files: the check (12 exe and 35 GUI patches ready), a copy
install (player data folders left out, stock files backed up, record
written, 51 progress events), a second install into the same folder
(not_empty), a cancel 36 MB into a copy (install_cancelled, the copy
removed), an in-place install of the copy (its backup used) and a
folder that is not a game.
The install wizard needs to tell whether the chosen folder is a War
Thunder installation, which version it is, whether it is a Steam
library, and whether the folder for the copy can take it.
The patcher reads the game version from win64/aces.exe (the
VS_FIXEDFILEINFO block of its version resource) and works out the
versions every exe and GUI patch was verified on, from their
verified_on lists, so the version check follows the patch definitions
instead of a constant.
The launcher gets four IPC calls, each validated against the contract:
- dialog:pickFolder, a folder picker titled by the window;
- install:inspectGameFolder: missing game files, version, verified
versions, Steam library;
- install:inspectTargetFolder: new or empty, not overlapping the stock
installation, Steam library, free space on its drive, and whether it
is on the stock installation's drive (the space saving copy needs
that);
- install:measureFolder: bytes and files of the stock installation,
regular files only, links not followed.
A folder that does not exist or cannot be read is the folder_unreadable
error code, translated in both languages. In development the patch
folders and the hook library come from this repository; the packaged
layout comes with the installer build.
Checked with both typechecks, the launcher build, and the calls made
from a running launcher window: the stock folder (2.61.0.37, verified),
a non-game folder, a missing path, a Steam library path, four target
folders (new, inside the stock folder, not empty, other drive) and the
size of the offline copy (96.9 GB in 10,972 files).
The launcher has to show the player which patches do not fit their game
build, let them go on without the features those patches cover, and
refuse when a patch that keeps the copy apart from the online game is
missing. The patcher could only refuse the whole build.
- GUI patches are applied one by one. A patch with an edit whose stock
text is not found exactly once, or whose script is missing, is left
out whole and reported with its features, like an unavailable exe
patch; the others are applied.
- patchExecutable always produces the executable with the available
patches; unavailable ones and those depending on them are listed.
- essential-features.ts names the features whose patches stop an
installation: A-离线启动, A-与正版隔离, A-不连 Gaijin (the copy does not
start, touches the online game's data or identity, or connects to
Gaijin without them). Patches tagged with them are 9 exe patches and
one GUI patch today.
- buildGameCopy builds every file of the copy in memory from the stock
files and the caller's inputs (patch folders, hook library, port,
store pack ids) and returns them with a structured report;
writeGameCopy writes them, replacing each file instead of writing
through a hard link. readStockGameFiles reads the four stock files.
- assertWritableCopy takes steamLibraryConfirmed for a Steam library the
player chose after the warning; isInSteamLibrary is exported.
scripts/build-game-copy.ts uses buildGameCopy and still writes nothing
when any patch is unavailable, unless --skip-unavailable is given and
none of the unavailable patches is essential.
Checked with the root typecheck and three runs of build-game-copy.ts
into scratch folders: all patches as they are (12 exe, 35 GUI, 496
bundle GUIDs, six files written); one ordinary exe patch and one GUI
patch broken (both reported with their features, nothing written, then
written with --skip-unavailable); the network hook patch broken (it and
the TLS patch depending on it reported as essential, nothing written
even with --skip-unavailable).
Comments where "local" and "service" fell on two lines, and the Chinese
titles of five patch definitions, still named the local service.
Checked with the root typecheck, check-patches and check-gui.
The installer and launcher is an Electron app in apps/launcher: main
process, a sandboxed preload that only forwards allowed channels, and a
React window translated into Chinese and English.
Every renderer -> main call is declared once in the IPC contract
(shared/ipc/contract.ts) with zod schemas for its input and output; the
main side validates both when it registers a handler. The main process
throws error codes only, and the window translates them. The launcher's
own settings (for now the window language) are kept in the user data
folder and written through a temporary file and a rename. Development
runs can point the user data folder elsewhere with
WTO_LAUNCHER_USER_DATA.
The workspace packages (@wto/patcher, @wto/server) stay external to the
bundle: they ship as TypeScript sources and will run in utility
processes, where Electron's Node strips the types and they find their
web pages, tuning and keys next to their sources as they do today.
The root typecheck leaves out the launcher, which has its own tsconfig
files for the main process and the window.
Checked with the launcher typecheck, electron-vite build, the root
typecheck, and a start on a scratch user data folder.
Everything sat in packages/: two programs next to the small libraries
they use, and the patch data loose at the root. The programs now live in
apps/ and the shared libraries in packages/:
apps/server the local server (was packages/local-service),
package @wto/server
packages/patcher builds the game copy (was packages/build),
package @wto/patcher
patches/exe exe patch definitions (was exe-patches)
patches/gui GUI script patches (was gui-patches)
Inside the server, the network layer folder becomes transport/ so it is
not server/server/, the entry module is server.ts, and startLocalService
and its types become startServer, ServerOptions and RunningServer. The
health answer names the app wto-server, and the TLS files in the data
folder are server.key and server.crt (made again on the next start).
Comments, logs and tool texts say "local server".
The patcher no longer reaches into the server's folder. It read the
default tuning/store.jsonc by a relative path to register bundle GUIDs
for the multi-vehicle packs, which also ignored the player's overrides
in <data>/tuning/. It now takes the pack ids from its caller; the
server exports multiVehiclePackIds(dataFolder), which reads them the way
the running server does. rebuildGuiPack takes the patch folder from its
caller as well.
The development build moves out of the patcher to
scripts/build-game-copy.ts, since it uses both the server and the
patcher. It needs --data (the folder the server will run with) and
defaults the patch folders and the hook library to this repository.
Checked with the root typecheck, check-patches, check-gui,
check-offsets, the native build, a run of build-game-copy.ts into a
scratch folder (12 exe patches, 35 GUI patches, 496 bundle GUIDs as
before) and a server start from apps/server answering wto-server.
BREAKING CHANGE: Use @wto/server and @wto/patcher from the new workspace paths. Run the development build with scripts/build-game-copy.ts and pass --data.
Clearing missionSupportUnitRef as soon as the support unit died kept the
player from getting the vehicle back: the unit update (2.61.0.37
0xfd1450, 0xfd2f01 / 0xfd25a7) recognises the player's dead support
unit by that reference (unit +0x88 == MPlayer +0xb58) and only then calls
setControlledUnit(mp, 0) (0x598a70) to return control. In game the
camera stayed on the wreck until the player respawned.
Remember the player and the dead unit's entity id at the death, and
clear the reference after setControlledUnit has run for that player
(new hook, LMP_SIG_SET_CONTROLLED_UNIT, 2.61.0.37 hit 0x598a70), as
long as it still names that unit.
Checked with the native build and check-offsets; not yet verified in
game.
After the first nuclear carrier was shot down, the next launch respawned
it in the air where it died and the player could not fly it. The host
gives a player a support unit only while missionSupportUnitRef (MPlayer
+0xb50 / +0xb58) is empty (2.61.0.37 0x59d9c8), and the client clears
the reference only when the player is re-initialised, never during a
battle. The second launch reused the dead unit: control was refused
("changed controlled unit to already dead unit"), and without an owner
the respawn (0xe4fdf0) placed it at its old position instead of an
airfield.
Clear a player's reference when the unit it names dies (in the existing
onUnitDeadOnce hook, host only), so the stock update creates a new
support unit the next time the spawn score threshold is reached.
Checked with the native build and check-offsets; not yet verified in
game.
The respawn screen showed an empty loadout for the nuclear carrier: a
preset is listed only when shop_is_weapon_available passes (2.61.0.37
0x17a38a0 -> 0x912d20 -> 0x90f2c0 / 0x9662f0), which needs every
reqModification of the preset and of its sum_weapons to be a bought
modification of the unit in the profile. The forced preset of
f_16a_block_15_adf_killstreak carries bombguns_us_b61_30kt with
reqModification us_500lb_mk82, and the player never owns that unit.
Derive the modifications of each missionSupportPlane unit's forced
preset from wpcost.blk and keep them in every profile as owned, in the
profile refresh. Only those killstreak units are touched.
Checked with typecheck and a run over the stock data (30 records, the
F-16 one included); not yet verified in game.
Online the time flown in the nuclear carrier (gameplay.blk
missionSupportPlane) and its kills are not settled, while other aircraft
are. Its lives were settled like any vehicle when it was spawned from
the lineup slot: battle time, research points and repair for a unit the
player does not own.
Collect the support plane units from missionSupportPlane and drop their
lives and combat events from the battle facts before the settlement and
the live award judging. The nuclear strike fact and its award are kept.
Checked with typecheck; not yet verified in game.
The MissionResult HUD event did not reach the scripts before the battle
was left (a nuclear win in game still settled as not won): the HUD can
hold the result back (2.61.0.37 0x183edc0, delay at Hud +0xb8). The
eventbus event onQuitToDebriefing, however, is raised both on the fade
to the debriefing after the battle ends and when leaving from the menu,
while the mission still exists; the stock debriefing gathers its result
on it too.
Record the end time, the closing life and the outcome there, from the
mission status (success / fail; a running battle records no outcome),
and drop the MissionResult subscription.
Checked with check-gui; not yet verified in game.
Online the battle server gives killStreak_bomber_nuclear_success (mode
killStreakNuclearSuccess, 10000 SL) when a player's nuclear bomb
explodes; the LocalMP host has no battle server, so the award was never
given.
The native nuke module now remembers whether the local player launched
the instant-win bomb and, when it explodes, raises the HUD script event
wtoLocalMpNuclearStrike. The battle record keeps it as a strike, sends
it live (wto_battle.fact kind "strike") and reports it after the battle
(strikes{}); the local service awards killStreakNuclearSuccess once per
strike, live as the award banner and in the settlement.
Checked with typecheck, check-gui, check-offsets and the native build;
not yet verified in game.
The settlement report read get_mission_status() when the debriefing
opened. By then the mission scene has been unloaded and the status reads
as running, so every battle that ended on its own (tickets or nuclear
strike) was settled as not won. The end time was lost the same way and
the last life was never closed: onQuitToDebriefing is only raised when
the battle is left from the menu, not by the automatic FadeToDebriefing.
AcesMission::endFinally (2.61.0.37 0x11203f0) raises the HUD event
MissionResult with the local team's result while the mission still
exists. Record the outcome, the end time and the closing life there;
leaving from the menu still records the end time without an outcome.
Checked with check-gui; not yet verified in game.
cta_logic_action walks the variable array with r15 = entry+8, compares the name
at [r15-8] and takes the value at r15+8 (0x11bd1a6), so the int value is at
entry+0x10; the nuclear win wrote the wrong field and the tickets stayed.
create_nuke_destr_area_es does not run on the LocalMP host. The projectile
explosion handler 0xbe7c00 gets the launch record's instant-win flag as its
8th argument (0x2fd778 / 0x2fd7c3) and is what plays the nuclear explosion,
so the winner is now taken there.
Online the battle server ends the battle when a bomb with isInstantWinOnExplode
explodes; the 2.61.0.37 client only flags the bomb, so the LocalMP host played on.
The host now remembers the team of a flagged bomb (0x1431c10), takes it as the
winner when create_nuke_destr_area_es runs (0x63caf0), and zeroes the loser's
mission ticket variable before cta_logic_action (0x11bc400), which then ends the
battle the stock way.
The 2.61.0.37 mission loader looks up the gameplay.blk missionSupportPlane
preset by the mission's gameModeName; without it the native nuclear carrier
is never assigned, so no action bar item and no instant-win bomb.
The 2.61.0.37 client reads customRules/customBots into its bot settings. Send the existing matchmaking pools and both country lists through that block. Verified both coalitions in an isolated Ground Realistic battle.
Pass the manifest path to the harness directly and require per-script success and a completion marker. The standalone interpreter can exit with status zero after a harness failure. Resolve merged interface exports and provide integer bindings for stock constant expressions.
Use baseReward for the reward amounts because Quirrel reserves base. The compile error interrupts post-login script loading before hangar selection and leaves the hangar waiting for its one-minute fallback.
The header of local_mp_loadout.c still named per-unit economic multipliers that
the economy rework removed from the module. It now says what the module does: on a
host the client has no receiver for its own vehicle change request, so the send
hook builds the ChangeUnitReflection and calls Unit::changeAircraft. Comment only.
Checked: native build, check-offsets.
Two exe patches (allow-local-host-bot-spawns, allow-local-host-player-respawn) and
four GUI patches (local-host-spawn-score, quit-local-host-to-debriefing,
quit-local-host-spectator-to-debriefing, ready-local-host-respawn) still carried
the migration placeholder comment and partly non-English titles. Each now has the
three header lines (what it changes, why the client, what happens without it), an
English title, feature tags that name existing feature inventory rows, and a note
that it is kept from the baseline without a re-review in the LocalMP rework.
No patch content changes.
Checked: check-patches (12 ready), check-gui (35 patches compile).
The unreviewed baseline shortened many file headers and dropped their sources: the
research notes sections, architecture sections, stock script paths and client
addresses. They are put back where the code still does what they describe, and the
headers of research, modification and research action files now also describe the
banked excess RP flow (cln_move_exp_to_unit, cln_move_exp_to_module) that the
baseline added. Comments only.
Checked: typecheck.
The client never raises a vehicle's hp by itself; the hangar shows (1 - hp) x the
full repair time as what is left (shop_time_until_repair, aces.exe 2.61.0.37
0x17a5040). The local service now restores hp whenever it hands out or changes a
profile: hp grows by the hours since it was last set over the full repair time, and
the damage is cleared at 1.
The full repair time follows the client (0x937330): repairTimeHrs<Mode> times the
repair cost's modification factor (0x964750 -> 0x964900) times a crew multiplier
when a crew has the vehicle as its current one, else repairTimeHrsNoCrew<Mode> (or
repairTimeHrs x rTimeNoCrewMul, 0x964e30). The crew multiplier runs from 1 to 1/3
(hangarRepairSpeed default, 0x95cee0) over the groundService/repair level plus the
specialization share of specialization<k>_add (0x95d200), and applies only when
repair_ranks covers the vehicle's rank for the crew's repairRank level (0x95d7b0).
The vehicle-repair dataset gains the repair times, rTimeNoCrewMul and these crew
skill values; RepairRules is built with the profiles so the refresh can use it.
Inferred: the skill fields the client divides are level and maximum level, the
rank compared is the tech tree rank, linear growth at the current crew's pace.
Checked: typecheck; full repair times for us_m1a1_abrams from the game data (no
crew 678 h, untrained 171 h, maxed ace 57 h) and the hp growth over time.
Settlement already added an expert crew's battle RP to expertToAceProgress but capped
it at train3Cost_exp and left the crew at expert. The stock tooltip says ace is
"obtained for free when the crew gets {expAmount} with the current vehicle"
(crew/qualification/specDescriptionPart), and the client's discount stages end at
75 % (wp_get_specialization_cost_gold -> aces.exe 2.61.0.37 0x9165f0). The crew now
becomes ace once the RP reaches the target and its progress entry is dropped, as
the client drops an empty expertToAceProgress block (0x93b4eb). The ace price no
longer has its own "free at 100 %" case, so it matches the price the client shows.
Checked: typecheck.
With "Research of helicopters by playing ground vehicles" on, the stock text says
ground vehicles are not researched and all their vehicle RP goes to helicopters
(lang shop/research_helicopters_by_ground_vehicles_tooltip). Settlement fell back
to the ground branch whenever the helicopter branch had no current research target;
now the RP stays in the destination branch (banked there until the player picks
the next helicopter) and returns to the vehicle's own branch only when the
destination has nothing left to research. The redirection moves from the profile
helper into the RP investment, which has the tech tree.
Checked: typecheck.
The client never downloads downloadable_decals.<hash>.blk: webdlcontent only looks
for it in its web cache folder (aces.exe 2.61.0.37 0xd3e710 -> 0xd3f610) and deletes
a file whose signature check fails (0xd383e0), so the index the local service served
never reached it and every decal was dropped for lack of a texture.
The build now stores dldata/downloadable_skins.blk and dldata/downloadable_decals.blk
in char.vromfs.bin. The client's vromfs index path (0xd3bc40 -> 0xd3cc60) loads both
without hash or signature checks and skips the download path. Each decal points at
a built-in decals.dxp.bin texture (star, or panther for wide decals) as placeholder;
the texture manager strips the "?options" suffix before the lookup (DagorEngine
TextureMetaData::decode), so the existing textures are used.
--decal-cache <folder> copies the cache/content folder of the player's online
installation into the game copy instead; the client then uses that signed index and
its cached textures, and falls back to the cached dldata_s.info because the local
service now answers the dldata hosts with 404. The service's index generation, the
content hash helper and the decal texture dataset are removed.
Checked: typecheck; client startup log shows 1598 decals registered from the vromfs index
with no missing textures.
The local service now settles vehicle repair after a battle and charges
hangar repairs at the price the client shows.
- New dataset vehicle-repair (wpcost.blk repairCost<Mode>,
repairCostPerMin<Mode>, modifications' repairCostCoef<Mode>) and
RepairRules, which follow the client's own formulas: full cost =
repairCost<Mode> x (1 + coefficients of the owned modifications)
(aces.exe 2.61.0.37 0x10517b0, 0x964900); current cost =
max(1, (1 - hp) x full cost) in the vehicle's lastGameMode
(getAircraftRepairCost 0x90e0b0).
- The price table now carries aircrafts/<vehicle>/repair/<mode>/cost,
where the client looks the full repair cost up; it read 0 before.
- After a battle each life costs the official lifetime share: destroyed
= repairCostPerMin x minutes started, at most the full cost; leaving
the vehicle (or the battle) early = full cost; surviving = nothing;
destroyed by an ally = nothing. The cost is written as hp,
lastGameMode and time on the hangar entry, so the client's own repair
cost matches it.
- Automatic repair (autoRepairAircrafts, on by default) pays for the
damaged vehicles the player can afford; premium accounts with
automatic repair and ammunition purchase get the expenses beyond the
battle's earnings back. The battle log gets aircrafts hp,
autoRepairWasOn, container.aircraftsRepaired and
wpExpensesCompensation; the debriefing gets the ExpensesCompensation
row.
- cln_prepare_aircraft, cln_repair_all and cln_repair_all_in_slots
carry no price; they now charge the current repair cost instead of
repairing for free.
Not yet verified in game.
Boosters (rateBooster items) now add to the settled battle as the stock
client and the official wiki describe: each booster adds its percent of
the base reward; boosters stack per event type and personal / all-allies
group with the client's calc_public_boost factors; a battle uses one
battle of a booster plus one per spentInSessionTimeMin span, and a
booster with R battles left covers the first R spans; kill, ground kill
and assist boosters add only to that event and end after their kill
count. The debriefing table gets the booster columns, the session log
lists affectedBoosters, the research breakdown carries boosterExpTotal,
progress is saved and used-up boosters are removed with an
EULT_REMOVE_ITEM log.
The active wager now moves with each battle that meets its active
conditions (lineup rank range, random battle, mission postfix): a stage
when its win condition holds (battle won, players killed, or the listed
battle awards, hidden ones included), otherwise a failed battle. It ends
at maxWins or maxFails and pays a x stake x stages^b + c of the reached
stage. Each counted battle logs EULT_CHARD_AWARD in the battle's room and
the session log lists affectedWagers, which the stock debriefing shows.
Hidden battle awards are now judged (not shown or logged) so wagers can
name them; awards of mode missionsWon are supported, and "unlocks"
awards honour num.
The new GUI patch battle/match-settled-battle-room-logs matches the
settled battle's logs by room id in isUserlogVisible, the one filter all
"this battle's logs" queries use; it replaces the two per-call edits in
use-settled-debriefing-stats.
Not yet verified in game.
The extra game modes now use the battle rating the matching server
computed for the lineup also out of a squad, so the local service decides
it and the client no longer recomputes the lineup's rank.
The scoreboard flag fallback and the countdown button patch keep their
behaviour; their comments now state what the stock code does, why the
fallback is needed before the first spawn, and that the countdown
flicker's trigger on the host is still to be found.
The battle awards (streaks) of unlocks.blk are now judged by the local
service from the battle's facts: the player's combat events, each life
and whether it ended in death, the HUD kill log and the final
scoreboard. The record patch also sends each fact live over the
matching connection (wto_battle.fact); the awards it completes come
back and are shown with the stock award banner and kill log entry.
After the battle the awards become EULT_NEW_STREAK logs, which the
stock debriefing lists on its left, and their Silver Lions are paid and
shown in the Unlocks row. Modes whose facts are not reported, and
best-player awards limited by battle rating, are never given.
Vehicle research points now follow rank.blk: the predecessor bonus
(expBonusPercentForChildForMode), the rank difference penalty
(expPenaltyPercentForHigherRank / LowerRank) and the Vehicle Research
Bonus (ExpNewNationBonus, five battles per nation and type per UTC day).
Modifications keep the research points before these terms.
The settlement records each vehicle's breakdown in the session log's
container.researchPoints, which the stock debriefing explains in its
research rows. The debriefing patch now selects the battle's logs by
room id, since a LocalMP host is in no matching room and the stock
current-room check cannot match them.
The live game draws one vehicle from each RandomSpawnUnits group at
launch and shows it as a plain lineup vehicle (a 12.7 US lineup gets an
M1A1 12.0 and an ADATS 12.0, no dice), so the random_units state and the
patch that filled it are gone. The strike UCAV costs 750 spawn points,
the live game's value, now in tuning/battle.jsonc.
- Scoreboard scores come from the local service: BattleEconomy
missionScores() writes the official mission scores into the stock
mission block customScoreParams, which the client copies into
MissionSettings+0x6d8 without reading it; local_mp_scores.c reads them
with DataBlock::getReal. The hardcoded scores and the death score go.
- countActivePlayers already counts players with a living vehicle; the
only LocalMP gap is its filter skipping bots (MPlayer+0x1d8 bit 7). A
one-byte exe patch drops that filter bit instead of a rewrite hook.
- ucavLaunch returns early on a host; an exe patch skips that return
instead of clearing the global host flag around the call.
- onBecameDead no longer runs with isLocalMP cleared: that only queued an
EventOnPlayerDeath stock LocalMP skips on purpose, and broke the local
player id remap inside the function.
- The host chat object keeps its two-field layout, now documented from
the host chat handler that reads it.
Rebuild the extra vehicles a battle adds to the player's lineup on the
game files and the official rules:
- Random vehicles (dice slots): one per gameplay.blk RandomSpawnUnits
group of the event economic name and country, offered from the
group's minPlayerMRank on, with no condition on the lineup. The option
window follows the official changelog examples (never the session's
top BR, lower BR when nothing fits); its formula is inferred from the
group parameters. Only the listed addModification items are enabled.
- Nuclear carrier: missionSupportPlane preset of the session rank, cost
spawnScoreToUse.
- Strike UCAV: offered by an offline tuning rule, priced by the stock
spawn score formula, no forced preset.
The spawn request enables exactly the slot's modifications, and every
forced weapon travels in the slot, so the event-name fallback is gone.
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.
The LocalMP host has no battle server, and the previous bridge filled the
gap by computing money in the client: the native ledger wrote invented
amounts into SessionStatsNet, the spawn patch derived reward rates from
warpoints.blk, and the settlement patch summed and rescaled the result.
Rewards came out as zero or several orders of magnitude too high.
Now the client reports facts and the local service prices them.
Native (wto_ws.dll):
- local_mp_ledger.c is removed together with its SessionStatsNet
offsets and four signatures (43 -> 39).
- local_mp_awards.c raises the HUD script event wtoLocalMpExpEvent for
every combat event of the local player (event code, victim expClass
and name, player or AI victim, friendly, naval damage). The DataBlock
helpers and the HUD event queue are resolved from call sites inside
GameSaveData::addScoreMessage, which already has a signature.
GUI patches:
- record-local-battle-awards records events and lives in nestdb and
raises the stock InBattleReward banner from launch-time parameters.
- report-local-battle-settlement sends only facts and rebuilds the
debriefing from the settled table; failures show the stock error box.
- use-settled-debriefing-stats makes gatherDebriefingResult read that
table instead of the empty stat_get_exp().
- pass-spawn-modifications-blk no longer computes economy factors.
Local service:
- battle-economy dataset reads every reward factor from wpcost.blk,
warpoints.blk and rank.blk; tuning/battle-economy.jsonc holds the
mission score per event with its source (official values where
published, otherwise marked).
- battle-economy.ts is the single pricing function, shared by the
banner parameters and the settlement; battle-rewards.ts adds battle
time, timed award, win/defeat bonus, activity, premium account,
talisman, skill bonus and free research points; the debriefing table
has the stat_get_exp() layout and travels in EULT_SESSION_RESULT.
- Crews earn skill points from the battle's research points.
- A battle left before it ends counts as a defeat.
Verified: npm run typecheck, check-gui (35 patches), check-patches,
check-offsets, native build. Not yet run in game.
The launch script patch used to assemble the whole MissionSettings block
on the client: reading the mission file for localization keys and ticket
rules, filling the AI vehicle pool, rank window and extra slot costs.
All of that is pre-battle data the local service already owns.
- multiplayer-missions dataset v3 keeps the scalar parameters of
mission_settings.mission and of each per-difficulty sub-block, with
their BLK types.
- battle-mission-settings.ts builds the complete MissionSettings block
from the launch plan (same parameters as before).
- battle-launch-notify.ts sends it as a typed tree, so ints and reals
keep the types the engine reads, plus the lobby settings and the
per-battle record the in-battle patches read from nestdb.
- The launch patch shrinks from 208 to about 70 lines: rebuild the
DataBlock, set _gameMode from the client's own native constant, enter
the session lobby and start the LocalMP battle.
Behaviour is unchanged; coalitions, extra slots and economy are reworked
in later commits. Verified: npm run typecheck, check-gui (33 patches).
Patch definitions under exe-patches/ and gui-patches/ move from
patch.json/locate.json to patch.jsonc/locate.jsonc. Each file now holds
only the data needed to apply the patch plus a short English comment
stating what it changes, why the local service cannot provide it, and
what happens without it. Every definition records the game versions it
was verified on (verified_on, required).
GUI patches keep their stock text and replacement in find.nut and
replace.nut next to patch.jsonc instead of escaped JSON strings, so the
script edits are readable, diffable and can carry Quirrel comments.
Matching treats CRLF and LF as the same line break because stock
scripts mix both; only the matched span is rewritten.
Loaders on both sides (packages/build, packages/exepatch, wtotools)
reject unknown keys so analysis text cannot creep back into the data.
JSONC parsing moves into a shared @wto/jsonc package; the build now
parses tuning/store.jsonc instead of scanning it with a regex.
Verified: npm run typecheck; check-patches (10/10 ready on 2.61.0.37);
check-gui (33 patches, 24 scripts compile); the TypeScript and Python
appliers produce identical scripts, byte-identical to the previous
definitions except one stock script with mixed line endings.
The 15 battle patches are migrated mechanically and still carry the
pending-review comment; they are rewritten by the LocalMP review.
BREAKING CHANGE: Patch loaders require JSONC definitions. Migrate patch.json and locate.json and move embedded GUI edits to separate Quirrel files.
Records the uncommitted battle-session work exactly as it was left
(local service matchmaking, settlement, chat, native LocalMP hooks,
battle gui/exe patches) so the following review and rework commits
show every correction as a diff against this state.
This commit is not reviewed and is known to be incomplete: in-game
testing reported wrong settlement rewards, single-country teams,
missing random/fixed supplement slots, misattributed hit messages and
other regressions. Do not merge this branch before the rework lands.
Cache allowlisted official media so the in-game browser can load it locally. Match the official catalog snapshot and start pack demos muted and looping on entry.
Save carts per account and settle each order in one profile update. Add featured packs, a screenshot and video gallery, and premium artwork from the game files.
Show the installed game artwork in the local store and marketplace. Use the official cover and gallery for each mapped product, with on-demand video playback. Include store cover images and screenshots in optional offline asset packs.
Verified TypeScript, browser script syntax, local service startup, game artwork endpoints, a sample image pack, and BMD-4M WebM byte-range delivery. In-game verification is pending.
Include the catalogue titles in the entitlement price data and select the matching language in the client receipt formatter. Checked TypeScript, the GUI pack rebuild, and the patched Quirrel script.