-
Notifications
You must be signed in to change notification settings - Fork 159
feat(galgame): 新增首屏教程引导与进度持久化 #1179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wehos
merged 25 commits into
Project-N-E-K-O:main
from
MomiJiSan:feat/galgame-tutorial-guide
May 7, 2026
Merged
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
169b96b
- models.py / store.py:教程进度存储键和读写方法
MomiJiSan 16e69e5
- 新增 galgame 插件首屏教程进度持久化。
MomiJiSan 46b63b2
- 修正 quickstart.md 开头“三步”表述。
MomiJiSan 829f8f9
- N.E.K.O/plugin/plugins/galgame_plugin/install_routes.py:653
MomiJiSan 1c7c07e
- N.E.K.O/plugin/plugins/galgame_plugin/install_routes.py:600
MomiJiSan 04ee8f4
- N.E.K.O/plugin/plugins/galgame_plugin/install_routes.py:642
MomiJiSan dabb597
改动在 plugin/plugins/galgame_plugin/static/main.js:
MomiJiSan d67167a
处理内容:
MomiJiSan 4d7ad53
saveTutorialProgress 中:
MomiJiSan fbe1468
在 plugin/plugins/galgame_plugin/static/main.js:
MomiJiSan cc37c1e
在 resetTutorialGuide 中:
MomiJiSan 1384374
在 saveTutorialProgress 中删除了 POST 前的:
MomiJiSan 22155fb
fix(galgame): address review comments on tutorial onboarding PR
c922e93
Merge remote-tracking branch 'origin/main' into feat/galgame-tutorial…
0c5a266
feat(galgame): rapidocr multilingual + on-demand model download
e2b095b
feat(galgame-ui): tutorial-aware model download UX + skip-CTA DOM cle…
1b56486
Merge remote-tracking branch 'origin/main' into feat/galgame-tutorial…
12e1305
fix(galgame): address CodeRabbit review on rapidocr download UX
c2d25f5
fix(galgame): rapidocr_models button binding + pending_models placeho…
9df73c0
fix(galgame): legacy rapidocr install also surfaces missing_model_files
3e654b0
fix(galgame): missing-models check accepts all resolver-acceptable fi…
e9f9d4a
fix(galgame): scan legacy package models dir in missing-files check
744b622
fix(galgame-ui): tutorial CTA + scroll align with can_download_models
aebf86c
fix(galgame-ui): render rapidocr_models progress card in renderRapidOcr
5adecdf
fix(galgame): three follow-up state-leak fixes from CodeRabbit review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,129 @@ | ||
| # Galgame 游玩助手 - 快速开始 | ||
|
|
||
| 按步骤完成配置 OCR 截图识别,让猫娘陪你一起玩 Galgame。 | ||
|
|
||
| --- | ||
|
|
||
| ## 一、OCR 引擎与模型 | ||
|
|
||
| 插件需要 OCR 引擎来识别游戏画面中的文字。RapidOCR 与 DXcam 已经随主程序打包,**默认不需要单独安装**: | ||
|
|
||
| - **RapidOCR**(主后端):轻量 ONNX OCR,已打包;wheel 内置 **`ch + PP-OCRv4`** 三件模型,galgame 插件**默认识别组合**为 `lang_type=japan + ocr_version=PP-OCRv4` | ||
| - **Tesseract**(兼容兜底):传统 OCR,需要单独安装;只在 RapidOCR 不可用时才使用 | ||
|
|
||
| > **首次运行下载日文模型**:插件默认 `lang_type=japan`,但日文 rec 模型 (`japan_PP-OCRv4_rec_mobile.onnx`, ~10 MB) 不在 wheel 内。RapidOCR 横幅会提示"模型未下载",点击横幅上的「**立即下载模型**」按钮会从 RapidAI ModelScope 拉取,下载完成后立即生效。如果你只玩中文 galgame,把 `lang_type` 改成 `ch` 即可走 wheel 内置模型,不需要任何下载。 | ||
| > | ||
| > 想用其他语言(korean / en / v5 ch)也是同样的流程:在 `[rapidocr] lang_type` / `ocr_version` 改成你需要的组合,按横幅提示下载。 | ||
| > | ||
| > 如果下载失败,横幅会显示具体的错误(HTTP 状态、超时、校验和不匹配等)和恢复路径("国内可能需要代理;或手动从源 URL 下载到模型缓存目录后刷新")。 | ||
|
|
||
| --- | ||
|
|
||
| ## 二、截图后端 | ||
|
|
||
| OCR 需要稳定截取游戏画面。DXcam 已随主程序打包,截图后端可在 `auto / smart / DXcam / MSS / PyAutoGUI / PrintWindow` 中选择: | ||
|
|
||
| - **DXcam**(推荐):Windows 高性能截图,延迟低、帧率高 | ||
| - **MSS / PyAutoGUI**:跨平台兜底,无需额外安装 | ||
| - **PrintWindow**:可截取被遮挡的窗口,但部分 DirectX/Unity 游戏会拿到旧帧 | ||
|
|
||
| > 默认采用 smart 链:`DXcam → MSS → PyAutoGUI`。如果 DXcam 截图黑屏,可在「高级设置 → 截图后端」切到 MSS / PyAutoGUI / PrintWindow。 | ||
| > | ||
| > **Textractor 不是截图后端**,而是内存读取(Memory Reader)兜底方案。部分游戏引擎(如 Unity、Kirikiri)可在「高级设置 → 内存读取」中接入 Textractor,跳过截图直接提取文字。 | ||
|
|
||
| --- | ||
|
|
||
| ## 三、启动游戏 | ||
|
|
||
| 1. 打开你要玩的 Galgame | ||
| 2. 停在**有文字的画面**(对话、旁白均可) | ||
| 3. 回到插件页面 | ||
|
|
||
| 插件会自动检测运行中的游戏进程和窗口。 | ||
|
|
||
| --- | ||
|
|
||
| ## 四、刷新窗口列表 | ||
|
|
||
| 点击「刷新窗口」按钮,插件会扫描当前运行的所有窗口并匹配游戏进程。 | ||
|
|
||
| 如果自动匹配正确,窗口会自动选中,无需手动操作。 | ||
|
|
||
| --- | ||
|
|
||
| ## 五、选择游戏窗口 | ||
|
|
||
| 如果游戏窗口没有自动选中,可以手动选择: | ||
|
|
||
| 1. 点击「选择识别窗口」按钮 | ||
| 2. 在弹出列表中选择正确的游戏窗口 | ||
| 3. 确认后,该窗口将作为 OCR 识别目标 | ||
|
|
||
| > 如果窗口列表为空,请确认游戏已经启动并停在有文字的画面。 | ||
|
|
||
| --- | ||
|
|
||
| ## 六、校准截图区域 | ||
|
|
||
| 自动校准可以裁剪掉窗口边框、菜单栏等无关区域,让 OCR 更精准: | ||
|
|
||
| 1. 展开「高级设置」 | ||
| 2. 找到「OCR 截图校准」 | ||
| 3. 点击「自动校准」— 插件会根据当前窗口内容自动识别文字区域 | ||
|
|
||
| 也可以手动调整裁剪比例(上下左右边距)以适配不同游戏布局。 | ||
|
|
||
| --- | ||
|
|
||
| ## 七、开始识别 | ||
|
|
||
| 一切就绪后,插件会自动开始识别: | ||
|
|
||
| | 模式 | 说明 | | ||
| |------|------| | ||
| | 自动推进 | 持续识别画面文字,检测到新台词时推送给 AI | | ||
| | 静默模式 | 仅识别与展示,不执行自动推进 | | ||
| | 伴读模式 | 自动识别 + AI 根据台词生成陪伴对话 | | ||
|
|
||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| 当前识别到的文字会显示在「当前台词」区域,历史台词在「台词历史」中查看。 | ||
|
|
||
| --- | ||
|
|
||
| ## 八、主诊断面板 | ||
|
|
||
| 顶部卡片实时显示插件运行状态: | ||
|
|
||
| | 指标 | 含义 | | ||
| |------|------| | ||
| | 游戏会话 | 当前检测到的游戏进程/窗口 | | ||
| | OCR 状态 | OCR 引擎运行状态(就绪/识别中/错误) | | ||
| | 截图状态 | 截图工具状态(运行中/未安装) | | ||
| | 当前台词 | 最新识别到的台词内容 | | ||
| | 活跃模式 | 当前工作模式(自动/手动/伴读) | | ||
|
|
||
| --- | ||
|
|
||
| ## 九、高级设置 | ||
|
|
||
| 展开「高级设置」区域可以配置: | ||
|
|
||
| - **OCR 引擎选择**:RapidOCR / Tesseract 切换 | ||
| - **截图后端**:auto / smart / DXcam / MSS / PyAutoGUI / PrintWindow 切换 | ||
| - **内存读取**:Textractor 等内存读取方案的接入与开关(部分引擎可跳过截图) | ||
| - **轮询间隔**:OCR 识别和状态刷新的频率 | ||
| - **OCR 截图校准**:文字区域裁剪参数 | ||
| - **屏幕感知**:画面类型识别和场景切换检测 | ||
| - **依赖管理**:安装/更新 RapidOCR / DXcam / Tesseract / Textractor | ||
|
|
||
| --- | ||
|
|
||
| ## 常见问题 | ||
|
|
||
| | 问题 | 解决方法 | | ||
| |------|--------| | ||
| | OCR 安装失败 | 检查网络连接,确保可以访问 GitHub Release 页面 | | ||
| | 找不到游戏窗口 | 确认游戏已启动,窗口未最小化,点击「刷新窗口」重试 | | ||
| | 识别不出文字 | 检查截图区域是否正确,尝试重新校准;确认游戏文字在画面中可见 | | ||
| | DXcam 截图黑屏 | 部分游戏有反截图保护,可在「高级设置 → 截图后端」切换到 MSS / PrintWindow,或在「内存读取」中接入 Textractor 跳过截图 | | ||
| | AI 不回复 | 确认陪伴模式已开启,目标 AI 已配置,AI 服务正常运行 | | ||
| | 识别结果乱码 | 在 OCR 设置中调整识别语言(中文/日文/英文) | | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.