## 说明
多作业模式进入 H10-1 关卡详情页后,OCR 可能会把关卡名识别为 `H1O-1`。现有替换规则没有将它还原为 `H10-1`,而是处理成了
`-1`,导致关卡校验失败并重新开始导航。
本 PR 将 `ClickStageName` 和 `ClickedCorrectStage` 中的 `$010` 改为
`${1}0`,明确区分捕获组 1 和后面的字符 `0`。
## 原因
原规则的本意是保留捕获组 1,再补一个 `0`:
```json
["(H\\d+)O(?=-)", "$010"],
["(-\\d+)O", "$010"]
```
OCR 后处理使用 `boost::regex_replace`。这里的 `$010` 会被解析为捕获组 10,而不是捕获组 1 后接
`0`。这两个正则都没有第 10 个捕获组,因此 `H1O-1` 最终被处理成 `-1`。
修改后的规则使用无歧义写法:
```json
["(H\\d+)O(?=-)", "${1}0"],
["(-\\d+)O", "${1}0"]
```
## 验证
- `resource/tasks/tasks.json` 可以正常解析。
- 四处相关替换均已改为 `${1}0`,`git diff --check` 通过。
- 使用 MAA `v6.14.1`、明日方舟 PC 端、2560 × 1440 分辨率测试 H10-1 多作业导航。
修复前:
```text
CharOcr: H1O-1
Proceed: -1
confirm stage name failed after retrying 3 times, stage name: H10-1
```
修复后,同样的 OCR 输入可以正确进入编队流程:
```text
[2026-07-12 14:12:08.499][TRC] CharOcr: H1O-1
[2026-07-12 14:12:08.499][TRC] Proceed: H10-1
[2026-07-12 14:12:09.545][INF] task: BattleStartPre, text: 开始行动
[2026-07-12 14:12:11.670][INF] SubTaskStart: BattleFormationTask
```
本次测试中没有再出现 `confirm stage name failed`。
<details>
<summary>English</summary>
## Summary
In multi-copilot mode, the stage name on the H10-1 detail panel may be
recognized as `H1O-1`. The existing replacement rules turn it into `-1`
instead of restoring `H10-1`, so stage confirmation fails and navigation
starts over.
This PR changes `$010` to `${1}0` in both `ClickStageName` and
`ClickedCorrectStage`, making the boundary between capture group 1 and
the literal `0` explicit.
## Root cause
The original rules were intended to preserve capture group 1 and append
a literal `0`:
```json
["(H\\d+)O(?=-)", "$010"],
["(-\\d+)O", "$010"]
```
OCR post-processing uses `boost::regex_replace`, where `$010` is parsed
as capture group 10 rather than capture group 1 followed by `0`. Since
these expressions do not contain a tenth capture group, `H1O-1` is
reduced to `-1`.
The replacement now uses the unambiguous `${1}0` form.
## Verification
- Parsed `resource/tasks/tasks.json` successfully.
- Confirmed all four affected replacements use `${1}0`; `git diff
--check` passes.
- Tested H10-1 multi-copilot navigation with MAA `v6.14.1` on the
Arknights PC client at 2560 × 1440.
- The same `H1O-1` OCR result was corrected to `H10-1`, after which MAA
clicked `BattleStartPre` and entered `BattleFormationTask`.
- No `confirm stage name failed` entry was produced during the post-fix
attempt.
</details>
Refs #16888
## Summary by Sourcery
引入对新的 copilot ID 格式的支持,优化 UI 中 copilot
代码的路由逻辑,修复一些小的用户体验问题,刷新游戏资源数据,并添加用于分析 GitHub 发布下载统计并生成 HTML 报告的工具脚本。
New Features:
- 支持新的 `prts://` copilot 任务和任务集代码,同时兼容现有的 `maa://` 格式
- 添加发布下载统计工具,支持 HTML 报告输出以及 Windows 批处理封装
Bug Fixes:
- 确保在手动账号切换的启动流程中正确启用账号切换标记
- 禁止测试链接图片弹出窗口被调整大小
Enhancements:
- 改进 copilot 代码处理逻辑,通过集中解析、区分任务与任务集类型,并据此路由 UI 操作
Documentation:
- 更新本地化和 UI 文案,以反映新的 copilot 代码格式及相关 UI 变化
Chores:
- 更新关卡、肉鸽任务、物品和地块位置等游戏资源数据文件,包含新的活动和记忆地图
- 为发布下载统计工具添加本地 `.gitignore` 配置
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Introduce support for new copilot ID formats, refine copilot code
routing in the UI, fix small UX issues, refresh game resource data, and
add a tooling script to analyze GitHub release download statistics with
an HTML report.
New Features:
- Support new prts:// copilot job and job-set codes alongside existing
maa:// formats
- Add a release download statistics tool with HTML reporting and Windows
batch wrappers
Bug Fixes:
- Ensure manual account switch startup tasks enable account switching
flag
- Prevent test-link image popup window from being resizable
Enhancements:
- Improve copilot code handling by centralizing parsing, distinguishing
job vs job-set types, and routing UI actions accordingly
Documentation:
- Update localizations and UI strings to reflect new copilot code
formats and related UI changes
Chores:
- Update game resource data files for stages, roguelike tasks, items,
and tile positions, including new event and memory maps
- Add local .gitignore for the release download statistics tool
</details>
## Summary by Sourcery
为 6.14.0 版本发布做准备,提升配置健壮性、调整 Roguelike 任务参数,并在各语言版本中对齐文档与 schema。
Bug Fixes(错误修复):
- 防止新安装被错误标记为配置损坏,仅在从文件加载时对无效配置进行跟踪。
- 通过在列表导航后增加点击前延时,提高 Roguelike 铜币(copper)选择的可靠性。
Enhancements(增强功能):
- 当配置加载失败并初始化新的根配置时,确保会创建默认任务配置条目。
- 收紧任务设置的一般约束条件并微调控制器逻辑,以提升稳定性和可维护性。
Documentation(文档):
- 在所有支持的语言中,对齐回调 schema 和集成协议文档的格式与类型注解。
Chores(日常维护):
- 刷新全局资源数据、Roguelike 任务定义、本地化内容以及版本元数据,以适配新版本发布。
- 在控制器、视觉处理(vision)和 WPF 视图模型代码中进行小幅格式整理和日志消息清理。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Prepare 6.14.0 release with configuration robustness improvements,
roguelike task tuning, and documentation/schema alignment across
locales.
Bug Fixes:
- Prevent new installations from being marked as having broken
configuration by only tracking invalid configurations when loading from
file.
- Improve roguelike copper selection reliability by adding a delay
before clicking after list navigation.
Enhancements:
- Ensure default task configuration entries are created when
configuration load fails and a new root config is initialized.
- Tighten task settings generic constraints and minor controller logic
to improve stability and maintainability.
Documentation:
- Align callback schema and integration protocol documentation
formatting and type annotations across all supported languages.
Chores:
- Refresh global resource data, roguelike task definitions,
localizations, and version metadata for the new release.
- Apply small formatting and logging message cleanups in controller,
vision, and WPF view model code.
</details>
Bug Fixes(错误修复):
- 通过仅在从文件加载当前配置时追踪无效配置,避免在全新安装时将配置标记为损坏。
Enhancements(功能增强):
- 优化配置加载流程,以追踪设置是从主配置文件还是备份文件加载的。
Documentation(文档):
- 整理所有支持语言中的回调模式(callback schema)文档格式。
Chores(杂项):
- 为新版本更新全局资源数据、roguelike 任务定义、本地化字符串以及版本元数据。
- 在控制器和视觉组件中进行少量代码风格和格式清理。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
为 6.14.0 版本发布做准备,提升配置健壮性、调整 Roguelike 任务参数,并在各语言版本中对齐文档与 schema。
Bug Fixes(错误修复):
- 防止新安装被错误标记为配置损坏,仅在从文件加载时对无效配置进行跟踪。
- 通过在列表导航后增加点击前延时,提高 Roguelike 铜币(copper)选择的可靠性。
Enhancements(增强功能):
- 当配置加载失败并初始化新的根配置时,确保会创建默认任务配置条目。
- 收紧任务设置的一般约束条件并微调控制器逻辑,以提升稳定性和可维护性。
Documentation(文档):
- 在所有支持的语言中,对齐回调 schema 和集成协议文档的格式与类型注解。
Chores(日常维护):
- 刷新全局资源数据、Roguelike 任务定义、本地化内容以及版本元数据,以适配新版本发布。
- 在控制器、视觉处理(vision)和 WPF 视图模型代码中进行小幅格式整理和日志消息清理。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Prepare 6.14.0 release with configuration robustness improvements,
roguelike task tuning, and documentation/schema alignment across
locales.
Bug Fixes:
- Prevent new installations from being marked as having broken
configuration by only tracking invalid configurations when loading from
file.
- Improve roguelike copper selection reliability by adding a delay
before clicking after list navigation.
Enhancements:
- Ensure default task configuration entries are created when
configuration load fails and a new root config is initialized.
- Tighten task settings generic constraints and minor controller logic
to improve stability and maintainability.
Documentation:
- Align callback schema and integration protocol documentation
formatting and type annotations across all supported languages.
Chores:
- Refresh global resource data, roguelike task definitions,
localizations, and version metadata for the new release.
- Apply small formatting and logging message cleanups in controller,
vision, and WPF view model code.
</details>
</details>
## Summary by Sourcery
通过基于模板的关卡导航来处理活动关卡与支线关卡,当没有可用模板时回退到 OCR。
新功能:
- 添加一个辅助工具,用标准化关卡代码解析活动关卡模板路径,并在资源存在时使用模板匹配进行关卡导航。
- 为多协助作战关卡选择和支线复刻关卡选择启用基于模板的导航,以提升关卡识别的稳定性。
改进:
- 在资源加载阶段,按完整相对路径索引所有模板图片文件,以便在 C++ 代码中动态查找关卡导航模板。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Introduce template-based stage navigation for event and side-story
stages, falling back to OCR when no template is available.
New Features:
- Add a helper to resolve event stage template paths from standardized
stage codes and use template matching for stage navigation when
resources exist.
- Enable template-based navigation for multi-copilot stage selection and
side-story reopen stage selection to improve stage recognition
reliability.
Enhancements:
- Index all template image files by full relative path during resource
loading to allow dynamic lookup of stage navigation templates from C++
code.
</details>
新功能:
- 为事件关卡引入基于模板的导航机制,通过从标准化路径解析每个关卡的截图模板,并在可用时优先使用模板而不是 OCR。
- 将基于模板的导航应用于多协助器(multi-copilot)关卡选择以及支线故事重开关卡选择,以在这些流程中提供更稳健的关卡识别支持。
增强:
- 在加载模板资源时按相对路径索引所有模板图片文件,以便可以从 C++ 代码中动态查找关卡导航模板。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
通过基于模板的关卡导航来处理活动关卡与支线关卡,当没有可用模板时回退到 OCR。
新功能:
- 添加一个辅助工具,用标准化关卡代码解析活动关卡模板路径,并在资源存在时使用模板匹配进行关卡导航。
- 为多协助作战关卡选择和支线复刻关卡选择启用基于模板的导航,以提升关卡识别的稳定性。
改进:
- 在资源加载阶段,按完整相对路径索引所有模板图片文件,以便在 C++ 代码中动态查找关卡导航模板。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Introduce template-based stage navigation for event and side-story
stages, falling back to OCR when no template is available.
New Features:
- Add a helper to resolve event stage template paths from standardized
stage codes and use template matching for stage navigation when
resources exist.
- Enable template-based navigation for multi-copilot stage selection and
side-story reopen stage selection to improve stage recognition
reliability.
Enhancements:
- Index all template image files by full relative path during resource
loading to allow dynamic lookup of stage navigation templates from C++
code.
</details>
</details>
## Summary by Sourcery
引入基于模板的活动与支线关卡导航,改进仓库识别与界面行为,并为测试版添加性能遥测与配置迁移支持。
New Features:
- 为活动关卡添加基于模板的导航、多协助器关卡选择,以及支线剧情重开关卡的导航;在无模板可用时自动回退到 OCR。
- 支持从“全部”标签识别基础仓库物品,并整合最新活动内容的关卡模板与资源。
- 添加在启动任务中切换账号的开关选项,并自动迁移现有配置。
Enhancements:
- 将模拟器 FPS 检查改为异步非阻塞,同时确保安全关闭,并通过回调协议上报模拟器刷新率。
- 使用游戏定义的排序 ID 优化仓库识别顺序,并改进与仓库相关的成就追踪与缓存机制。
- 持久化并恢复 Monet 主题的主色,避免启动时的闪烁,并正确释放取色器相关资源。
- 按完整相对路径索引模板图片,以支持从 C++ 代码进行动态查找。
- 调整任务队列序列化逻辑以遵守新的账号切换标志,并改进 UI 对仓库数据变化的响应。
- 将 GitHub 发布准备工作流更新至较新的 checkout 动作版本。
CI:
- 将发布准备相关的 GitHub Actions 工作流更新为使用 `actions/checkout@v7`。
Documentation:
- 在所有支持的语言中记录新的回调消息类型,用于截图性能与模拟器 FPS。
- 扩展内部知识文档,增加关于 PC 客户端 UI 因鼠标位置导致视差问题的说明与指引。
Chores:
- 为最近的内容与界面选项(包括活动关卡与设置标签)添加新的资源与本地化条目。
<details>
<summary>Original summary in English</summary>
## Summary by Sourcery
Introduce template-based event and side-story stage navigation, improve
depot recognition and UI behavior, and add performance telemetry and
configuration migrations for a beta release.
New Features:
- Add template-based navigation for event stages, multi-copilot stage
selection, and side-story reopen stages with automatic fallback to OCR
when no template is available.
- Enable recognition of basic depot items from the "All" tab and
integrate new stage templates/resources for the latest event content.
- Add an option to toggle account switching in startup tasks with
automatic migration of existing configurations.
Enhancements:
- Make emulator FPS checks asynchronous and non-blocking while ensuring
safe shutdown, and report emulator refresh rate via callback schema.
- Refine depot recognition ordering using game-defined sort IDs and
improve depot-related achievement tracking and caching.
- Persist and restore Monet theme primary color to avoid flicker on
startup and dispose color picker resources correctly.
- Index template images by full relative path to support dynamic lookup
from C++ code.
- Adjust task queue serialization to respect the new account switching
flag and improve UI reactions to depot data changes.
- Update GitHub release-preparation workflow to a newer checkout action.
CI:
- Update the release-preparation GitHub Actions workflow to use
actions/checkout@v7.
Documentation:
- Document new callback message types for screenshot performance and
emulator FPS in all supported languages.
- Extend internal knowledge documentation with guidance on PC client UI
parallax issues caused by mouse position.
Chores:
- Add new resource and localization entries for recent content and UI
options, including event stages and settings labels.
</details>