Commit Graph
23 Commits
Author SHA1 Message Date
sganggs bb88031256 0.2.5-dev: merge claude/036-scene
# Conflicts:
#	CHANGELOG.md
#	docs/history/0.2.5.md
2026-10-12 15:00:10 +08:00
sganggs d482fbb8ba 0.2.5-dev: official battlefield scenes on the 3D board — a local fetch / extract step for the season scene bundles, per-field scene rendering with the metal board as fallback, the full bundle can include the extracted scenes and setup can fetch them (--scenes); nothing official is stored in the repository (PR #533 by @andrew05060414, ported; the owner's decision of 2026-10-12); golden: unchanged 2026-10-12 14:59:20 +08:00
sganggs 52b70434d0 0.2.5-dev: a restore-defaults loadout sync is never overwritten by an older in-flight sync (PR #540 by @Xinglan233, ported); importing a loadout with ops is refused before writing when the DIY data is missing (PR #538 by @Xinglan233, ported); the player package's package.json keeps only scripts whose files ship (#531) and its docs link unshipped files to the release tag on GitHub (#530); golden: unchanged 2026-10-12 14:45:01 +08:00
sganggs fbcbfdffbc feedback7: merge fb7-voices — the 选中干员 line on every tap (prep / shop / hand, official FOCUS_CHAR: priority 10, cooldown 0, no gap restart), the Japanese voice tree (audio.voiceJp, 2674 files, setting 语音语言 中文 / 日本語, CN fallback), the full zip ships both
- Conflict: public/js/ui/settings.js imports (store from #321 + VOICE_LANGS) — both kept. test/ui/playtest6-elite.test.js's
  source pin of the onDetail line allows the new tap counter (bcee737f).
- Grok review: MERGE AFTER FIXES — the three findings fixed on the branch (bcee737f). Golden unchanged; broad node --test
  5334 (the one failure was that source pin, fixed), i18n strict clean, lint 0 errors, typecheck.
2026-10-08 20:35:26 +08:00
sganggs ddf8c39ed0 feedback7 R22-VOICES: the Japanese voice dub as a second tree beside the Chinese one — audio.voiceJp (the same slots and file names from ArknightsAssets2 voice/: 2674 files, 89.4 MB, for the 191 voiced operators), 设置 → 语音语言 中文 / 日本語 (default 中文, not tied to the interface language), a JP line the manifest or the host lacks plays the Chinese one; the full zip ships both dubs (one switch, tools/package.mjs FULL_ZIP_JP_VOICE), the lite zip stays art-free (the owner's request of 2026-10-08 「全套的日配语音」); golden: unchanged
- tools/assets/plan.mjs: one voiceTree() per dub — audio.voice (--voice-lang, cn by default) and audio.voiceJp
  (VOICE_JP_LANG, always the JP dub, audio/voice/jp/<charId>/cn_nnn.mp3); fetch-assets plans and downloads both
  (stats.voiceJpChars), so setup (checkAssets walks every listed URL) fetches both too.
- data/assets.json regenerated with the project's tool (node tools/fetch-assets.mjs --add-only, raw.githubusercontent.com,
  107 s): the only change is audio.voiceJp + stats (+2674 files, +89,388,041 bytes, voiceJpChars 191) + hash — the rest
  is byte-identical; the JP tree is the Chinese one with the folder swapped (191 × 14 files, every file a valid MP3).
  The audio files are not committed (public/assets/ is git-ignored).
- public/js/audio.js voiceLine(): 'jp' draws from voiceJp and falls back to the Chinese line per slot (a JP entry the
  manifest lacks) and per line at play time (the Chinese file of the same name when the host lacks the JP one —
  same token, same gate); operators without voice (stand-ins, 盟约·辅助干员, summons) stay silent. setVoiceLang().
- settings: voiceLang 'cn' | 'jp' (VOICE_LANGS, sanitizeSettings), the 语音语言 row under 干员语音 (each dub named in
  its own language, like the language switch), 语音语言 in the en / ja / ko / zh-TW packs.
- tools/package.mjs FULL_ZIP_JP_VOICE (true): false holds the JP files out of the full zip (and its update zip) —
  not missing, not orphans, never in an update's `removed`; setup then downloads them.
- Sizes measured: art download 548 MiB (was 463), full zip ≈ 505 MB (0.2.1: 428 MiB + 76 MiB of zipped JP voice),
  unzipped 711 MB (package --dry-run); lite zip unchanged. README, DEPLOY, ASSETS, setup's fallback size updated;
  PLAYING voice paragraph; §21.30 "Changed in 0.2.2" note.
Tests: test/feedback7-voices.test.js (new: plan, manifest, settings, package switch), test/ui/audio.test.js (voiceLine,
the manager's dub choice and fallback), test/ui/gameLogic.test.js, test/docs-consistency.test.js — all fail on the parent.
2026-10-08 19:09:52 +08:00
LimitlessHPPK 51c53de189 feedback7 G-TOOLS: listen on :: by default so one socket serves IPv6 and IPv4 (PR #291 by @LimitlessHPPK)
Ported only the dual-stack listen from PR #291 (the change accepted as #188). With HOST unset the server binds :: and, if that fails with EAFNOSUPPORT, EADDRNOTAVAIL or EINVAL, retries 0.0.0.0. An explicit HOST, including 0.0.0.0 and 127.0.0.1, is tried once. The boot banner and doctor list shareable IPv6 addresses in brackets, skip fe80::, and keep one URL per /64. An explicit IPv6 literal in the local URL is bracketed. The Windows service listing no longer drops those bracketed lines.

Not ported: /dev/grant, the settings-default migration, and the firewall scripts. The Docker image stays on 0.0.0.0; the alpine fallback was not booted.

Tests: node --test test/ipv6-bind.test.js test/doctor.test.js test/ci.test.js — 20 pass, 0 fail (8 bind, 4 doctor, 8 ci).
2026-10-08 18:53:24 +08:00
sganggs 79fc442f8e fb5-patch-pkg: docs for the update package — README「方式一」gets the third bullet (Stronghold-Protocol-v<版本>-update.zip from 0.2.1: only the files changed since the earlier 0.2.x, for a full or lite 0.2.x install; stop the server, merge the zip's Stronghold-Protocol folder into the install, start; a mismatched install is refused) and the English summary a clause; DEPLOY §1.5 the bundle update (Expand-Archive / Explorer / unzip -o, not a Finder drag; what the first start does, the refusal, docs-only warnings, lite installs and local art, doctor's row) with the old copy-to-a-new-folder way kept; DEPLOY §7 the maintainer side (--update --from every earlier 0.2.x full zip, MANIFEST.json in every zip, the checks, --keep-stage); ARCHITECTURE names server/update.js and tools/package-update.mjs 2026-10-07 11:30:02 +08:00
sganggs 0b306baa49 feedback5: version 0.2.0 — three stale size / content lines: the README English summary names the 39 summon models the local client provides, DEPLOY §7's comparison with the 0.1.x whole-tree layout re-measured, setup's art-download fallback 270 MB → 460 MB; golden unchanged
- README English summary: the official 3D board, some HUD icons, two enemy models and 39 summon models come from a
  local client; without one the summons show their avatars (as the Chinese 本地客户端素材 line says).
- DEPLOY §7: measured on this tree (cee16a9, both zips built, deleted after): the 0.2.0 full zip 448 534 389 bytes,
  16 031 files; the 0.1.x layout of the same tree (every tracked file plus all of public/assets: the 0.2.0 stage with
  the 602 tracked files it leaves out and the 38 art files nothing lists) 457 108 488 bytes, 16 671 files — about 640
  files, 26 MB unpacked (27 047 047 bytes) and 8 MB of zip less (was ~570 / 25 / 8 from W5U's tree).
- tools/setup.mjs: the download size shown when data/assets.json gives none (missing, unreadable, no stats.bytes) is
  ART_DOWNLOAD_FALLBACK, 460 MB — the 0.2.0 manifest's stats.bytes (463 MB) as README and DEPLOY quote it; the
  manifest's own size is still shown whenever it has one. The header comment says ~460 MB.
- Tests: version 6 / 6, docs-consistency 24 / 24, docs-paths 7 / 7, package 10 / 10, client-static 313 / 313,
  i18n 10 / 10, i18n-data 8 / 8, i18n-packs 12 / 12, i18n-server 5 / 5, doctor 4 / 4, assets 47 / 47,
  asset-network 21 / 21, static-local-art 3 / 3; npm run golden ok; lint 0 errors.
2026-10-07 06:41:06 +08:00
sganggs 6aeee5ff70 feedback5: version 0.2.0 — package.json / package-lock.json / APP_VERSION (DEV_BUILD turns false, so the title-screen dev tag and the boot warning go too), README (the dev-branch warning removed, the badge, the version line), CHANGELOG 0.2.0 dated 2026-10-07, the zip and download sizes re-measured; golden unchanged
- CHANGELOG 0.2.0: the integrator's draft brought up to date with what merged after it (30d9a41..2e83a6b and
  DESIGN §25.13–§25.21): the language packs and the ja / ko / zh-TW game texts (§25.20), the rebindable shortcuts
  (§25.15), the community reports of W5AA (§25.14) and CB1–CB5 (§25.16–§25.19, §25.21) under the draft's sections
  (rules, UI, lobby; the official behaviours and the reports not reproduced under 核实后不是问题), the owner's
  乌尔比安 revive-tile decision of 2026-10-07 under the deviations section (renamed 有意与官方不同的调整, the intro
  points at it); PRs #189 / #191 credited to @2321Robin as reused ideas; the draft's notes block left out.
- Sizes (tools/package.mjs, a real build of both zips, deleted after measuring): full zip 448 525 731 bytes
  (~430 MB, 16 031 files, 625 MB unpacked; was ~400 / 590), lite zip 22 927 271 bytes (~22 MB; was ~21), the setup
  download 463 MB (~460 MB; was ~440: the 自选 voices) — README 方式一 / 方式二 / 系统要求 / English summary,
  DEPLOY §0 / §1.1 / §3, the CHANGELOG's lite size.
- DESIGN §25 intro, §25.19 and §25.19.7: the custom-hotkey request (item 48) was built in §25.15, the battle-history
  request (item 22) stays postponed by the owner; §25.20: with five languages the menu is a list (buttons up to four).
- Tests: version 6 / 6, docs-consistency 24 / 24, docs-paths 7 / 7, package 10 / 10, client-static 313 / 313,
  i18n 10 / 10, i18n-data 8 / 8, i18n-packs 12 / 12, i18n-server 5 / 5; npm run golden ok (roster 49, bonds 46,
  fields 22, matches 18, standins 10, diy 138); lint 0 errors.
2026-10-07 06:41:06 +08:00
sganggs 1ee39a79b5 feedback5 WAD: docs for language packs and content packs — docs/PACKS.md (the manifest, the two layouts, discovery and the index, what is served, the types and how a later type plugs in), docs/I18N.md §5 "Adding a language" (step by step for a translator) with the fallback chain, placeholder validation and plural categories, CONTRIBUTING / README pointers, DEPLOY §7 (packs/ and packs/index.json in the zips), ARCHITECTURE, docs/history/0.2.0.md §25.16; build-i18n --dict (a community dictionary for a language without an official client); the browser check of a pack file and a pack folder dropped in while the server runs (test/ui/i18n.e2e.test.js); golden unchanged 2026-10-07 02:39:11 +08:00
sganggs 575333137c feedback5 WX: the 39 summon models no web dump carries come from the local client (extract.py TOKEN_SPINES) and are drawn instead of the avatar diamond when data/local-assets.json lists them
- tools/local-extract/extract.py TOKEN_SPINES (`--only spine/token`): each token's battle prefab in the
  battle token packs (pkgrps/btl_pfb_tokens_*.ab; the Windows build has all 39, the iOS build lacks
  btl_pfb_tokens_0), the skeleton of its Front (or only) Spine renderer, written to
  public/assets/local/spine/token/<id>/ like the enemy models (sized pma atlas, premultiplied pages;
  the newer RGBA pages keep their own alpha). The enemy writer is shared (write_spine; the two enemy
  models re-extract byte for byte). The skinpack job of 乌尔比安's block is gone: it extracted
  nothing, and that token draws no model in the game (nor do 圣聆初雪's, 酒神's, 贝洛内's and
  予愿安洁莉娜's hidden tokens: no Spine renderer, no avatar in either install).
- tools/assets/local-token-spines.json (committed, `fetch-assets --local-spines`) → data/assets.json
  tokens[id].spineLocal for 35 自选 summons, 凯瑟琳's 爬行号·防护单元 and 凛御银灰's three 风雪之眼; the
  manifest is the same with or without the extraction (JSON diff: only the 39 spineLocal entries and
  the hash). spine.mjs LOCAL_SPINE_ROLES maps clips the resolver cannot read (电弧's 戴乌 C_Skill1_*,
  酒神's 本能的召唤 Loop / End, 白铁's platforms End, 战术锚点 on its Default pose) [ASSUMED where named].
- assets.js spineEntry: a token resolves its spineLocal like an enemy (no web model behind it: the
  diamond stays when it is not listed or fails to load). Scale as the web tokens (UNIT.modelScale).
- setup reports an extraction without the summon models; docs: ASSETS.md "Token models from the local
  client", DEPLOY.md §6, DESIGN §13 (design/client.md), README.
- Tests: test/local-token-models.test.js (new), test/local-extract.test.js (job table, prefab walk,
  alpha merge), test/assets.test.js (the local token models load like the client does),
  test/package.test.js (the full zip ships them), test/static-local-art.test.js. Golden unchanged.
2026-10-06 20:16:20 +08:00
sganggs d148b3065d feedback5 WU: README and DEPLOY say which zip to pick (完整包 / 精简包) and what setup downloads; DEPLOY §7 packaging
README「方式一」lists the two zips: 完整包 Stronghold-Protocol-v<版本>.zip (about 400 MB, 590 MB unpacked, all the art)
and 精简包 …-lite.zip (about 21 MB: setup downloads the art, Spine models, audio, fonts, emotes and 玩法说明 pages on the
first start, about 440 MB, resumable; the local-client art is not in it), and what both leave out; the disclaimer says
only the full zip carries the art; setup's download is about 440 MB (the 0.2.0 manifest, was 270 MB); the disk row and
the English summary follow.

docs/DEPLOY.md: §0 disk (440 MB of art, 65 MB of runtime dependencies in a zip), §1.1 three ways to get the game (full,
lite, git clone) and what the first start does with each, §1.5 updating with the lite zip, §3 Docker builds from a git
clone (the zips have no Dockerfile; 440 MB), §6 a lite install has no local-client art, §7 the packaging tool for
maintainers: what ships, what is left out and why, the checks, what it needs.

tools/setup.mjs LOCAL_ART_COPY_HINT (shown by doctor): copy the local art from the same version's 整合包(完整包) — the
lite zip has none.
2026-10-06 18:09:21 +08:00
sganggs 7059528c47 feedback5: merge feedback4 (3af5b84) — PRs #186 / #134 / #185 / #24 / #183 ported to the split layout (terrainInfo / TERRAIN_TIPS into a new ui/gameLogic/terrain.js re-exported by the gameLogic.js barrel, closesOnFieldPress into ui/gameLogic/shortcuts.js, the rest in place; 42 strings through t(), #183's 设置 too); golden unchanged
Ported by hand:
- public/js/ui/gameLogic.js is a re-export shim on feedback5: #185's TERRAIN_TIPS / terrainInfo went into the new
  public/js/ui/gameLogic/terrain.js (the barrel gains one re-export line); closesOnFieldPress 'terrain' into
  ui/gameLogic/shortcuts.js.
- i18n (docs/I18N.md): every new user-visible string goes through t() with an English entry in public/i18n/en.json
  (42, after the 补位 strings): the terrain names / tags / fact table are N_() and translated where terrainInfo hands
  them out, the mechanism lines are msgids with their numbers as params (a line with an optional half is two whole
  msgids, the list joins use an array param), the card's 地形机制 / 这一格 titles in ui/detailPanel.js. Official EN
  terms where the EN client has them (stage_table tileInfo: Active Originium, Mire, Exhaust Grille, Deep Water Zone,
  Incursion Point, Protection Objective, Tunnel Entry / Exit, High Ground; Camouflage). The Chinese output is
  byte-identical to feedback4's terrainInfo on all 5187 tiles of the 13 stages and on synthetic stages.
- public/js/screens/game.js (MatchScreen still lives there): the import keeps feedback5's names plus terrainInfo /
  fieldTile; the terrain stage is the one view.setStage gets, so it includes feedback5's fieldStage — a 联防 field is
  played on its own map (GitHub #41), and a tap there explains that map's tile, not the round stage's. The tileClick
  handler and render/app.js emitTileClick / ui/fallbackField.js auto-merged in place. terrainInfo reads the stage only,
  so a 补位 / 自选 board explains its tiles the same way (their pieces only change a piece's art and name).
- public/js/ui/detailPanel.js: the terrain branch of resolveDetail before feedback5's stand-in / 自选 helpers.
- public/js/screens/title.js (#183): feedback5's LangToggle / t() imports plus GIcon / SettingsModal; the gear
  button's aria-label / title are t('设置') (en.json already has "Settings").
- tools/fetch-assets.mjs / tools/assets/downloader.mjs: --add-only (keepExisting, the font skip) beside #24's
  --asset-source / SP_ASSET_SOURCE and the shared MirrorPolicy; feedback5's extraOperators / moduleTypes and the
  voice plan unchanged.
- data/assets.json: feedback5's manifest plus #134's audio.sfx.battle.leak (after heal, the plan order); stats files
  6993 → 6994 and bytes +23 240 as measured on feedback4; the hash recomputed with the generator's contentHash
  (c01aa739a2d3 → 6a547fc5c937). A field-wise JSON diff against feedback5 shows only those four fields.
- docs: DESIGN §24 intro and §24.5 / §24.6 as on feedback4 (the rest of DESIGN.md is feedback5's); ASSETS.md,
  DEPLOY.md, PLAYING.md auto-merged.
- Auto-merged and checked: audio.js (the sim still emits ['leak', id], server/sim/battle/deploy.js), render/style.js,
  textures.js, tiles.js, board3d/materials.js, boardArt.js, tools/assets/*, tools/setup.mjs, extract.py, the tests.

Checks: the PRs' unit tests (audio 22, gameLogic 44, terrain-detail 1, originium-art 4, boardart 15,
board3d-extract 9, asset-network 21, fetch-assets-shrink 4), i18n 9 / i18n-data 8 / i18n-server 4, client-static 313,
docs-consistency 24, kits_layout 6 pass; lint 0 errors (no new warnings), check:imports, typecheck; golden: all 283
scenarios match, nothing regenerated.
2026-10-06 14:41:40 +08:00
Tome Chen f6794a2f2c Asset downloads can use a gh-proxy mirror when chosen by hand (--asset-source / SP_ASSET_SOURCE): one try per URL, the original source as fallback, the mirror off for the run after 3 failures in a row (#24)
Off by default; the original sources, retries, skipped files and the manifest-shrink guard are unchanged. Contributed by @NekoTC.
2026-10-06 14:18:30 +08:00
Cloudnyco a9dfd17bee The 3D board textures can be extracted as WebP: each player downloads about 4.7 MB less on a cold start (#186)
Only the extraction (tools/local-extract) and the manifest pointer change; no official textures are committed and nothing in play changes. Contributed by @Cloudnyco.
2026-10-06 05:05:42 +08:00
sganggs 25821d3494 feedback5: DEPLOY recommends HTTP/2 at the reverse proxy — since 0.2.0 a match loads about 340 small script modules (measured: 13.4 s vs 9.8 s cold at 100 ms latency over HTTP/1.1; the browser sim warms up during the band draft, so play is not delayed) 2026-10-05 19:28:44 +08:00
sganggs 351ead3603 feedback3: 0.1.3 design notes, changelog and version 2026-10-04 22:13:05 +08:00
sganggs 59e5ff0cb1 feedback2 docs: version 0.1.2 — package.json, package-lock.json, APP_VERSION, README badge and sentences, DEPLOY, CHANGELOG entry
The CHANGELOG 0.1.2 entry covers GitHub #16, #25, #32, #33, #35, #38, #42, #43, #44, #51, #52 and PR #27, #28, #29, #48 (and #40's test case);
#58 / #60 / #64 (DESIGN §22.14–§22.16) are added when their subsections land.
2026-10-04 02:40:55 +08:00
sganggs 2f0a980b2e feedback2 WE: README, DEPLOY.md (new §6), setup and doctor say what falls back without the local-client art instead of 不影响游戏, and that a server without the client can copy public/assets/local + data/local-assets.json from the same version's bundle; DESIGN §22.5 (#42) 2026-10-03 23:13:23 +08:00
sganggs f6ba83922b feedback1 integrate: DEPLOY troubleshooting says a failed asset download keeps data/assets.json 2026-10-03 14:01:21 +08:00
sganggs 308444ef29 feedback1 integrate: version 0.1.1 and CHANGELOG.md
- package.json, package-lock.json and APP_VERSION (title screen, server banner, /healthz) at 0.1.1
- CHANGELOG.md (Simplified Chinese): the player-visible fixes of 0.1.1 by area, the reports checked and found not
  to be bugs, and 0.1.0; linked from the README's 文档 table; README / DEPLOY name the current version
- version.test.js checks the CHANGELOG heading and the README badge
2026-10-03 08:22:31 +08:00
sganggs a1b1b1ae51 Open-source release 0.1.0: GPL-3.0, notices, README 2026-10-02 15:32:31 +08:00
sganggs 01a44cd288 卫戍协议:盟约 web remake — initial import
Online co-op browser remake of Arknights' Stronghold Protocol: Alliance
(client-simulated combat, official waves/bonds/items/strategies, 3D board,
facing wheel, operator loadout, official emotes, deployment scripts).
2026-09-29 16:21:31 +08:00