diff --git a/docs/en/guide/maa.md b/docs/en/guide/maa.md index 52dabcc..47717c4 100644 --- a/docs/en/guide/maa.md +++ b/docs/en/guide/maa.md @@ -25,12 +25,17 @@ In MAA, go to "Settings → Connection" and set, in order: 4. "MuMu Installation Path": `\mumu-shim`, for example `D:\ModAVD\mumu-shim`. - MAA rejects the path if `shell\sdk\external_renderer_ipc.dll` is not under it. - MAA may have filled in a real MuMu path from the registry when you ticked the option. Replace it with the one above. -5. Tick "MuMu Network Bridge Connection", click "Confirm" in the warning, then fill in "Instance Number" with the ModAVD instance number (0, 1, 2, ...: the number on the manager card). +5. Tick "MuMu Network Bridge Connection", click "Confirm" in the warning, then fill in "Instance Number" with the instance's console port, which is the connection address port minus 1: for `127.0.0.1:20041`, fill in `20040`. - If you leave it off, MAA works out MuMu's instance number from the connection address port. The result is wrong and screenshots fail. + - The number on the manager card (0, 1, 2, ...) works too. 6. "Touch Mode": "MaaTouch (Experimental)". 7. "Connection address": `127.0.0.1:`, the adb address shown on the manager card. The default is `20001 + 10 × number`; if you changed the port range of the root, use what the manager shows. 8. "ADB path": `\sdk\platform-tools\adb.exe`. +Filled in, it looks like this (MAA's connection settings are at the bottom right, in the Chinese interface: ModAVD in `D:\ModAVD`, instance 4; "Screenshot test" picks MumuExtras, 6 ms): + +![MAA set up as MuMu, connected to ModAVD instance 4](/images/maa-mumu-shim.webp) + ## Check that it works After MAA connects: diff --git a/docs/guide/maa.md b/docs/guide/maa.md index fddf5d2..2119c5f 100644 --- a/docs/guide/maa.md +++ b/docs/guide/maa.md @@ -25,12 +25,17 @@ ModAVD 带一个 MuMu 兼容外壳,在 `\mumu-shim\`。MAA 4. 「MuMu 安装路径」填 `\mumu-shim`,例如 `D:\ModAVD\mumu-shim`。 - 路径下没有 `shell\sdk\external_renderer_ipc.dll` 时,MAA 会拒绝这个路径。 - 勾上截图增强时 MAA 可能已按注册表填了真 MuMu 的路径,改成上面这个。 -5. 勾上「MuMu 网络桥接模式」,在警告里点「确认」,再填「实例编号」:ModAVD 里的实例编号(0、1、2……,就是管理器卡片上的编号)。 +5. 勾上「MuMu 网络桥接模式」,在警告里点「确认」,再填「实例编号」:这台实例的控制台端口,就是连接地址的端口减 1,比如连接地址是 `127.0.0.1:20041`,就填 `20040`。 - 不勾的话,MAA 会按连接地址的端口去推 MuMu 的实例号,推出来是错的,截图会失败。 + - 填管理器卡片上的编号(0、1、2……)也认。 6. 「触控模式」选「MaaTouch(实验功能)」。 7. 「连接地址」填 `127.0.0.1:<端口>`,就是管理器卡片上显示的 adb 地址。默认是 `20001 + 10 × 编号`;根目录改过端口段的,以管理器显示的为准。 8. 「ADB 路径」填 `\sdk\platform-tools\adb.exe`。 +填好以后大致是这样(右下角是 MAA 的连接设置:ModAVD 装在 `D:\ModAVD`,连 4 号实例;点「截图测试」,选中的是 MumuExtras,6 ms): + +![MAA 按 MuMu 配,连 ModAVD 4 号实例](/images/maa-mumu-shim.webp) + ## 确认生效 MAA 连接成功后: diff --git a/docs/public/images/maa-mumu-shim.webp b/docs/public/images/maa-mumu-shim.webp new file mode 100644 index 0000000..d7492f6 Binary files /dev/null and b/docs/public/images/maa-mumu-shim.webp differ diff --git a/scripts/i18n.py b/scripts/i18n.py index c9eb08e..b43adfa 100644 --- a/scripts/i18n.py +++ b/scripts/i18n.py @@ -60,10 +60,13 @@ def parse(path): def resolve(page, target): - """The page a link points to, relative to docs/; None for links to other sites.""" + """The page a link points to, relative to docs/; None for links to other sites and to files that are not pages.""" if re.match(r"^[a-z]+:", target): return None path = target.split("#")[0] + # Images and other files from docs/public are shared by both languages. + if re.search(r"\.(?!md$|html$)[A-Za-z0-9]+$", path): + return None if not path: return page parts = [] if path.startswith("/") else page.split("/")[:-1]