239 Commits
Author SHA1 Message Date
N0VAN0M4LY 594ff5ab54 feat(launcher): add project homepage link to About page
Add a Project homepage card and button pointing to https://wto-project.net on the launcher About page with matching zh-CN and en locale entries. Root typecheck, launcher typecheck, electron-vite build, and locale key parity checks passed.
2026-12-03 04:34:22 +08:00
N0VAN0M4LY 41088d5377 docs(mods): use neutral, self-contained phrasing in mod developer documentation 2026-12-03 03:45:13 +08:00
N0VAN0M4LY d94c8fe687 feat(mods): merge additive mod system, official map selector, and mod-dev-docs
# Conflicts:
#	apps/launcher/src/main/workers/build-worker.ts
#	apps/launcher/src/renderer/src/i18n/locales/en.json
#	apps/launcher/src/renderer/src/i18n/locales/zh-CN.json
2026-12-03 03:43:56 +08:00
N0VAN0M4LY de967dd993 feat(repo): add R2 release staging, download page, and S3 publish script
Add scripts/publish-r2-releases.ts with a zero-dependency SigV4 R2 client and bilingual static index.html generator. Staged launcher releases and adaptation packs are verified against the committed Ed25519 public key and SHA-256 digests before publishing, assets are uploaded ahead of the releases feed with SHA-256 skip checks, and .env*.local is gitignored for local R2 credentials. Verified with root typecheck, local staging, and live R2 upload.
2026-12-03 03:03:14 +08:00
N0VAN0M4LY dc5e637e20 fix(mods): track additive pack overlay folders inside mod templates 2026-12-03 03:02:19 +08:00
N0VAN0M4LY 240ee81712 feat(launcher): use dl.wto-project.net as primary release source with GitHub fallback
Replace the single GitHub repository field in release-channels.jsonc with primary_source (https://dl.wto-project.net) and ordered fallback_sources (GitHub), and update withReleaseSources to walk the deduplicated primary, player mirror, and fallback list while keeping preferred-source downloads and Ed25519 signature verification intact. Verified with root and launcher typecheck and launcher production build.
2026-12-03 03:02:14 +08:00
N0VAN0M4LY 6e65cec4c0 feat(mods): add official map selector mod template and move templates into mod-dev-docs 2026-12-03 03:01:18 +08:00
N0VAN0M4LY aa952e7cca docs(mods): add standalone mod-dev-docs handbook and launcher quick-open button 2026-12-03 02:51:54 +08:00
N0VAN0M4LY 5983e3f3e2 feat(mods): add battle.onFilterMissions hook and per-template bundled seeding 2026-12-03 02:40:38 +08:00
N0VAN0M4LY 662e837ab2 fix(patcher): support regional.vromfs.bin decal and skin indexes on cache import
Modern online War Thunder clients (verified on 2.61.0.58) ship their decal and
skin indexes (dldata/downloadable_decals.blk and dldata/downloadable_skins.blk)
inside cache/binary.<ver>/regional.vromfs.bin rather than downloading
downloadable_decals.<hash>.blk into cache/content/. Requiring
downloadable_decals.<hash>.blk rejected every live 2.61 cache/content folder.

- Accept modern online caches containing cached .ddsx textures alongside a
  sibling binary.<ver>/regional.vromfs.bin (as well as selecting the parent
  cache folder or legacy downloadable_decals.<hash>.blk caches).
- Extract both dldata/downloadable_decals.blk and dldata/downloadable_skins.blk
  into a self-contained .wto-index snapshot on launcher import (excluded from
  the copied game cache/content folder) and embed them into char.vromfs.bin
  during copy build so webdlcontent::init mounts cache/content and resolves
  cached real decals and downloadable skins natively without client patches.
- Log the specific rejection reason in launcher decal import and clarify the
  en/zh-CN prompts.

Verified with root and launcher npm run typecheck, launcher electron-vite
build, and an end-to-end temporary import + char.vromfs.bin build against a
read-only 2.61.0.58 online cache (4,080 decals / 1,930 skins embedded).
In-game acceptance pending on an isolated 2.61.0.58 client copy.
2026-12-03 01:58:28 +08:00
N0VAN0M4LY 8636d0b71d fix(mods): serialize initial example seeding and refresh on window focus 2026-12-03 01:55:20 +08:00
N0VAN0M4LY 97707f533d feat(launcher): bundle example mod templates and seed fresh mods folder once 2026-12-03 01:51:43 +08:00
N0VAN0M4LY ada635ecc7 refactor(launcher): move experimental mod notice to hover tooltip chip 2026-12-03 01:48:47 +08:00
N0VAN0M4LY deffcd6dde feat(saves): merge bulk research and purchase into one launcher action
In the launcher's Saves -> Vehicles & Research page, "Research all" only
filled vehicle RP without purchasing them, requiring players to buy each
vehicle manually in-game while a separate "Grant regular vehicles" button
already added them to the hangar.

Merge the two actions into a single "Research and buy all" (`purchase`) action
alongside "Unlock modifications" (`equipment`), and switch bulk modification
unlocking in save-research.ts to ProfileEquipmentIndex so large saves stay
O(N) and write cleanly across chunked modification blocks.

Verified with root and launcher npm run typecheck, launcher electron-vite
build, and en/zh-CN locale key parity (631 keys).
2026-12-03 01:19:20 +08:00
N0VAN0M4LY 4e72bf3746 fix(profile): split modifications across sibling blocks at 65,535 entries
Dagor's binary DataBlock stores child block counts in a uint16 (65,535 max),
and the full 2.61.0.58 vehicle catalogue contains 76,041 modifications. Writing
all owned modifications into a single `modifications` block caused encodeBlk to
throw BlkFormatError once a save crossed 65,535 entries, preventing saving and
login.

Match aces.exe's native multi-block layout (2.61.0.37 0x938fae..0x9397e6,
2.61.0.58 0x93ba70 / 0x93bb53), which splits modifications across up to 3
sibling top-level `modifications` blocks of at most 65,535 entries each:

- Add allModificationBlocks, appendModificationEntry, and
  normalizeModificationBlocks in profile-modifications.ts and span all chunks
  in modificationRecord, ownsModification, and writeModificationRecord.
- Index and append across sibling chunks in ProfileEquipmentIndex and
  grantSupportPlaneModifications.
- Filter all sibling chunks in prepareTransferredProfile and normalize before
  encoding in SaveStore.saveProfile.

Verified with root npm run typecheck and a 2.61.0.58 temporary save check
encoding, decoding, and filtering >65,535 modifications across sibling chunks.
In-game acceptance pending on an isolated 2.61.0.58 client copy.
2026-12-03 01:18:14 +08:00
N0VAN0M4LY 3aac60c8a3 docs(mods): add bilingual mod authoring guide and runnable example mod templates 2026-12-03 00:41:47 +08:00
N0VAN0M4LY dbc21182a2 feat(launcher): add Mods page, per-client presets, custom repo folder, and launch integration 2026-12-03 00:34:07 +08:00
N0VAN0M4LY 5c09c4e47a fix(battle): enable limited fuel in LocalMP versus battles
MissionSettings initializes isLimitedFuel to false by default (2.61.0.37
0x12620af), leaving LocalMP versus battles with infinite fuel, no fuel
burn weight reduction, and no HUD fuel timer. Set isLimitedFuel=true in
battleMissionSettings across all versus modes to match live behavior.

Verified with root npm run typecheck. In-game acceptance pending on an
isolated 2.61.0.58 client copy.
2026-12-03 00:31:35 +08:00
N0VAN0M4LY dce9b59765 fix(battle): match native modification inversion and bullet belt filtering on spawn
Align battle/pass-spawn-modifications-blk with the native UnitModifications
construction rules verified on 2.61.0.37 and 2.61.0.58:

- Filter effects.bulletMod belts against the spawn request's selected
  bullets0..N so unlocked belts (whose last wpcost.blk entry is usually
  *_stealth) do not overwrite single-belt aircraft guns with non-tracer
  stealth belts.
- Resolve invertEnableLogic (unit BLK overriding config/modifications.blk)
  so spaded vehicles move inverted performance modifications to disabledMods
  instead of applying stock penalties (and arcade double-inversion) in
  LocalMP battles.
- Include unequipped modifications in disabledMods only when they define
  disableModEffects (e.g. stock fire extinguisher / repair kit), keeping
  unequipped normal modifications out of disabledMods.

Verified with full Quirrel bytecode check-gui on 2.61.0.37 and 2.61.0.58
(49 GUI patches across 37 .nut files). In-game acceptance pending on an
isolated 2.61.0.58 client copy.
2026-12-03 00:29:51 +08:00
N0VAN0M4LYandAlem Bek e8122d7c6b fix(battle): restore LocalMP Ground Arcade air events
Copy allowedKillStreaks and set useKillStreaks for Ground Arcade in battle-mission-settings.ts, and add a dedicated dynamic native module (local_mp_air_events) that preserves MissionSettings.useKillStreaks across prepare_local_mission, credits local player AI kills toward native killstreak counters, delivers UnitRespawn (0xf030) to the LocalMP host via shared unit_on_event, and recovers invalid surface poses from gameplay.blk spawnPos parameters for the match rank.

Based on PR #3 by Rivfflot, who diagnosed the LocalMP Ground Arcade air-event gaps and verified the fix in-game; refactored here onto patches/native dynamic resolution for cross-version and MSVC build compatibility.

Checked: root and launcher typecheck, MSVC native/wto-net/build.ps1, native resolution across 2.61.0.37 and 2.61.0.58 (12/12 modules), 2.61.0.58 check-patches (14/14), and temporary 2.61.0.58 copy build all passed. Pending in-game acceptance on the refactored module.

Co-authored-by: Alem Bek <[email protected]>
2026-12-03 00:14:32 +08:00
N0VAN0M4LY aa7a6e7d02 feat(server): add experimental JS/TS mod runtime, hooks, tuning list ops, and isolated mod storage 2026-12-03 00:00:36 +08:00
N0VAN0M4LY fd9d25d346 feat(patcher): support additive mod pack overlays, addon mounts, and protected exe patches 2026-12-02 23:48:34 +08:00
N0VAN0M4LY 8fbaeb4228 feat(mods): add core mod manifest, resolver, BLK/CSV patchers, and server API types 2026-12-02 23:42:26 +08:00
N0VAN0M4LY 4999c7f5a3 fix(native): assign local player squad ID for yellow squad target mark
Pressing ID_SQUAD_TARGET_DESIGNATION ("Set target for squad") checks
MPlayer+0xab0 (squadId) and returns early when it is zero (2.61.0.58
0x1600a4f). The LocalMP host already retains the 0xf10f relay and
0xf142 HUD indicator path (0xcb045c -> 0xcb1646 -> 0xcafffb ->
0x19a65e0), which also requires a non-zero squadId from matchingInfo+0x0.

Set matchingInfo+0x0 (squadId) to 1 for the local player when zero in
hook_mplayer_init_from_matching so MPlayer::initFromMatching (0x59e660
on 2.61.0.37, 0x59f370 on 2.61.0.58) copies it into MPlayer+0xab0 and
restores the yellow squad target marker without extra hooks or exe patches.

Verified with native wto_ws.dll build; pending in-game verification.
2026-12-02 23:16:49 +08:00
N0VAN0M4LY d0e4797fe7 feat(battle): add Nuclear Escalation tactical and strategic nuclear carriers
Connect stage-unlocked nuclear carriers to Air Realistic sub-mode 103
(Nuclear Escalation) and expose a player toggle for stage-3 megaton
strategic bombers:

- Dataset & profile grants: extract tactical killstreak nuclear carriers
  (5 kt / 30 kt Nuclear Escalation presets) and megaton strategic bombers
  (nt_b_52h / nt_tu_95m) from wpcost.blk in battle-spawn-rules (v4), and
  grant their required weapon/modification records in
  support-plane-modifications.ts.
- Server slot selection & tuning: add nuclearEscalationStrategicBombers
  (default true) in tuning/battle.jsonc, battle-tuning.ts, and
  launcher-tuning.ts; add one nation-matched tactical carrier per session
  rank bracket (with allowedWeapons limited to its Nuclear Escalation
  presets) and, when enabled, one stage-3 strategic bomber to
  extraBattleSlots; include modeTag in battle launch notifications.
- GUI patch & launcher UI: add battle/filter-extra-slot-weapons on
  scripts/weaponry/weaponryinfo.nut to filter extra-slot presets by
  allowedWeapons (hiding Ground RB zero-yield presets at stage 0) and to
  fall back to LocalMP launch metadata for GameModeRestrictions; expose
  the strategic bomber toggle in the launcher Battle tuning section.

Verified with root and launcher typechecks, launcher build, full
check-gui on 2.61.0.37 and 2.61.0.58 (49 patches across 37 .nut files),
and slot selection check across all 10 nations on 2.61.0.58 stock data;
pending in-game verification.
2026-12-02 23:03:15 +08:00
N0VAN0M4LY f1ec034994 feat(battle): wire Nuclear Escalation launch and airfield cooldowns
Connect Air Realistic sub-mode 103 (Nuclear Escalation) mission launch
settings and LocalMP respawn/airfield-cooldown handling:

- Server: support mode-level maxRespawns (UNLIMITED_RESPAWNS = -2) and
  per-mode missionRuleKeys so Nuclear Escalation forwards customHUD,
  stage thresholds, useSpawnDelay, afterRespawnDelaySec, and battle
  display flags from the stock missions; reject queues when no candidate
  mode is eligible for the lineup; disable spares and emit
  wtoUnlimitedRespawns for unlimited-respawn modes.
- Native: keep slots usable when wtoUnlimitedRespawns is set and emit
  wtoLocalMpAirfieldSpawn with the unit name and spawn base ID when the
  local player actually enters pilot control.
- GUI patches: track confirmed LocalMP airfield departures in
  scripts/respawn/respawnbases.nut and feed the computed per-base delays
  into scripts/respawn/respawn.nut slot countdowns and spawn checks.

Stage-unlocked dedicated event aircraft allocation by faction and room
BR is not yet wired and remains pending research. Verified with root and
launcher typechecks, check-patches and check-gui on 2.61.0.37 and
2.61.0.58, and native wto_ws.dll build; pending in-game verification.
2026-12-02 21:35:17 +08:00
N0VAN0M4LY 646be7afb9 fix(battle): load player crew skills on LocalMP host
Unit::loadCrew previously skipped reading the player's equipped crew from
the profile whenever Multiplayer+0x60 (host flag) was non-zero, leaving
human players with default skills and no Expert/Ace bonuses. Calling
UnitCrewSkills::initFromSave after Unit::changeAircraft in the native
loadout hook ran too late to affect live vehicle crew state.

Add exe patch battle/load-local-host-player-crew to check both the host
and LocalMP flags (+0x60 and +0x61) in Unit::loadCrew so only non-LocalMP
hosts skip directly to the default crew while preserving the owner check.
Remove the late initFromSave workaround from local_mp_loadout.c (keeping
its native patch sites for compatibility with 0.1.2 hook DLLs) and add
the E-Crew skills in battle feature labels to the launcher locales.

Verified with check-patches on 2.61.0.37 (0x10025dd) and 2.61.0.58
(0x100700d), native wto_ws.dll build, launcher typecheck and build;
pending in-game verification.
2026-12-02 21:33:46 +08:00
N0VAN0M4LY 7bd17c4f74 fix(battle): enable in-flight reload in air arcade
Air arcade battles previously set isLimitedAmmo=true via VERSUS_SWITCHES.
Both the native in-flight rearm request and its host handler require
unlimited reserve ammunition, which prevented airborne reloading in Air AB.

Move isLimitedAmmo out of VERSUS_SWITCHES and set it to false only when
modeName is air_arcade, keeping limited ammunition for all other modes.

Verified with root npm run typecheck; pending in-game verification.
2026-12-02 21:32:42 +08:00
N0VAN0M4LY be772c0cea fix(launcher): keep copy maintenance progress across tab switches 2026-12-02 20:24:30 +08:00
N0VAN0M4LY fa7f68b942 feat(launcher): use two-column About layout and add Discord link 2026-12-02 20:06:51 +08:00
N0VAN0M4LY 899fb5d91b fix(server): persist selectable battle ratings
Validate the selected rank against owned modifications and return the saved profile.

Use the saved rank delta for mode eligibility and room matchmaking.

Verified with typecheck and a local 2.61.0.58 server run using temporary data. In-game acceptance is pending.
2026-12-02 19:55:41 +08:00
N0VAN0M4LY 3f0e08c5b7 docs(repo): add Discord community links to README 2026-12-02 19:19:41 +08:00
N0VAN0M4LY fb7d07f4f9 feat(launcher): add About log export shortcut and runtime logging toggle
Launcher release / release (push) Waiting to run
Add a quick ZIP log export button to the About page (also bundling the latest embedded browser -browser.log while excluding player saves) and add a runtime logging toggle under Settings -> Diagnostics that controls launcher file logs, local server traffic logs, and wto_ws.log via log=0 in wto_ws.cfg. Update the v0.1.2 release note accordingly.
v0.1.2
2026-12-02 17:41:49 +08:00
N0VAN0M4LY 2d5e268083 chore(launcher): bump version to 0.1.2 and add release note
Bump @wto/launcher to 0.1.2 in apps/launcher/package.json and package-lock.json, and add the bilingual release note in .github/release-notes/v0.1.2.md.
2026-12-02 17:23:13 +08:00
N0VAN0M4LY 66bbdf7192 fix(launcher): prevent false maintenance_location errors and log details
Exclude stray top-level wtoffline folders when scanning stock sources, block selecting a data folder that equals or contains the client folder during installation (with inline Step 3 feedback), avoid false maintenance_location blocks when an existing installation placed dataPath at an ancestor of copyPath while still protecting nested data folders and data entries, and log the specific reason and paths on every maintenance_location failure.
2026-12-02 17:10:58 +08:00
N0VAN0M4LY bf2ce539e7 feat(launcher): use version-independent rules for space-saving copies
Replace the single-version 2.61.0.43 SHA-256 hardlink manifest with declarative read-only asset rules in packages/patcher/tuning/hardlink-resources.jsonc (content/ and content.hq/ .dxp.bin and .grp archives with no minimum size cutoff). Space-saving installs and conversions now work across minor updates, and updating a space-saving client from a same-volume source preserves or creates hard links instead of detaching them into full copies.
2026-12-02 17:04:36 +08:00
N0VAN0M4LY 3ed41bdd60 feat(patches): add 2.61.0.58 version check record
Adaptation pack / release (push) Waiting to run
Verified all 13 exe patches, 46 GUI patches (Quirrel bytecode check), and 11 native modules against Steam 2.61.0.58 with zero struct offset changes from 2.61.0.55 and a clean temporary copy build.
patches-2026.12.02
2026-12-02 16:54:56 +08:00
N0VAN0M4LY a23629fe69 docs(release): refine wording in v0.1.1 release notes
Launcher release / release (push) Waiting to run
v0.1.1
2026-12-02 10:46:46 +08:00
N0VAN0M4LY 1535bd032b docs(release): emphasize v0.1.1 upgrade for standalone and official-launcher users 2026-12-02 10:33:28 +08:00
N0VAN0M4LY de9ba52b85 fix(isolation): skip package validation and block official launcher spawns
Add -skip_pkg_validation to the shared offline launch arguments so aces.exe
skips the startup content/warthunder.blk file-size check, and add the
isolation/never-launch-official-launcher exe patch to NOP the os_shell_execute
call in the official launcher spawner while preserving its exit logging and
ExitProcess(1).
2026-12-02 10:18:54 +08:00
N0VAN0M4LY 82ec1c47ff feat(launcher): support signed in-place updates for portable builds 2026-12-02 09:37:05 +08:00
N0VAN0M4LY e284ea7ed6 chore(launcher): bump version to 0.1.1 and add release note
Bump @wto/launcher to 0.1.1 in apps/launcher/package.json and package-lock.json, and add the bilingual release note in .github/release-notes/v0.1.1.md.

Checked: root and launcher typechecks pass.
2026-12-02 09:21:35 +08:00
N0VAN0M4LY ae1e5ec65b feat(repo): package portable zip in local Windows builds
Clean and generate wtoffline-launcher-<version>-win-x64-portable.zip from win-unpacked directly inside scripts/build-windows-installer.ts so local package:win builds produce both the NSIS installer and the portable archive.

Checked: root and launcher typechecks pass.
2026-12-02 09:20:32 +08:00
N0VAN0M4LY c55ec4ed57 fix(launcher): detect stale stock backups and distinguish missing backups on launch
Read the live executable version in inspectGameFolder instead of masking externally updated folders behind an older wtoffline/stock backup, and atomically refresh stale or unreadable backups during install, external stock import, and relocation. Log exact copy/stock/recorded versions on launch mismatches and report a dedicated launch_stock_missing error when wtoffline/stock/win64/aces.exe is missing or unreadable.

Checked: root typecheck, launcher typecheck, zh-CN/en locale key parity (616/616), and launcher electron-vite build.
2026-12-02 09:06:28 +08:00
N0VAN0M4LY f3d04d137f fix(native): filter avionics damage notices and enemy parts feedback
Replace the ineffective hero_unit comparison with producer-side hooks on the two stock LocalMP leaks:
1) Avionics/electronics failure dispatcher (2.61.0.37 0xfca8b0, .43 0xfce8e0): track the damaged Unit* from [component + unit] on the current thread and suppress HUD_MSG_DAMAGE notices and optic-view exits (0x15cd9c0) for non-local units while keeping native failure effects intact.
2) Unit::onEvent hit-parts fallthrough (2.61.0.37 0x103fbc0, .43 0x1043fe0): track the hit event on the current thread and filter enqueue_enemy_parts, hit_cam_important, and naval_hit_state to attacks from the local controlled unit, local MPlayer's units (in-flight munitions after switching), or the watched spectator unit.

Checked: native/wto-net/build.ps1 compiles with zero warnings in project sources; checkPatchSet, root and launcher typechecks, 2.61.0.37 check-patches, and native module resolution on both 2.61.0.37 and 2.61.0.43 (11/11 modules ready, 0 failures) pass. In-game verification pending.
2026-12-02 08:14:54 +08:00
N0VAN0M4LY 96077153c6 refactor(native): batch MinHook enable calls and log status codes
Switch ws2_32 and LocalMP hook installers to MH_QueueEnableHook with two MH_ApplyQueued passes (mandatory network hooks first, then all LocalMP modules), reducing DllMain thread-freeze cycles from 26 to 2. Roll back partial module hooks on error and log MH_StatusToString diagnostics to wto_ws.log.

Checked: native/wto-net/build.ps1 compiles cleanly with zero warnings in project sources, and PE inspection confirms WS2_32/KERNEL32 imports and 49 exports. In-game verification pending.
2026-12-02 07:24:27 +08:00
N0VAN0M4LY 90bd5a315d fix(patcher): replace built game files atomically with retry
Write rebuilt game files to sibling temporary files, flush to disk, and replace targets via rename with bounded retries on transient EPERM/EBUSY/EACCES errors (clearing read-only attributes when needed). This prevents antivirus scans or interrupted writes from leaving missing or truncated client files while keeping hard-linked stock files untouched.

Checked: root typecheck, launcher typecheck, and atomic replacement runtime check on read-only and new files.
2026-12-02 07:20:43 +08:00
N0VAN0M4LY 1c6f5c9fc4 feat(launcher): verify launch files and log post-exit diagnostics
Check that win64/aces.exe, wto_ws.dll, and wto_ws.cfg exist and are readable immediately before spawning the game, surfacing a dedicated error when security software removes them. On unexpected non-zero exits, log a compact read-only snapshot of hook file presence, wto_ws.log tail lines, and newly created .game_logs entries.

Checked: root typecheck, launcher typecheck, and zh-CN/en locale key parity.
2026-12-02 07:18:27 +08:00
N0VAN0M4LY cab73f92f9 feat(launcher): include client logs in diagnostics and format exit codes
Export the active client's wto_ws.log, latest .clog (bounded to 16 MiB), and a client-logs/summary.json metadata snapshot in diagnostics ZIPs without touching player saves. Log build completion, game launch arguments, PID, runtime duration, and hex-annotated Windows NTSTATUS/HRESULT exit codes in the launcher log and status bar.

Checked: root typecheck, launcher typecheck, launcher electron-vite build, and exit code formatter runtime check.
2026-12-02 07:15:37 +08:00
N0VAN0M4LY 1c24adbd83 feat(repo): attach a portable zip to launcher releases
Adaptation pack / release (push) Waiting to run
Zip the unpacked app after packaging and upload it as a fourth release asset for manual download. The zip is unsigned; only the installer is Ed25519-signed for the update check.
patches-2026.12.01.3
2026-12-01 22:37:07 +08:00