diff --git a/README.md b/README.md index 6351898fb..31ecfef1a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ [English Readme](README_en.md) `Translation in progress` -[Download Easy Install-v2](https://github.com/LmeSzinc/AzurLaneAutoScript/raw/master/Easy_Install-V2.bat) +[Download Easy Install-v2](https://github.com/whoamikyo/AzurLaneAutoScript/releases) + # AzurLaneAutoScript Alas, an Azur Lane automation tool with GUI (Support CN, EN, JP, able to support other servers). @@ -55,104 +56,17 @@ JP support, Thanks **[@ferina8-14](https://github.com/ferina8-14)**, some featur ## 安装 Installation -- Clone 本项目 +详见 [中文安装教程](doc/Installation_cn.md) -- 安装依赖, 最好使用虚拟环境 - -``` -pip install -r requirements.txt -``` - -### 安装模拟器 Install an emulator - -| 设备 | Device | 模拟器版本 | 安卓版本 | adb截图 | u2截图 | adb点击 | u2点击 | -| ---------- | ---------- | ---------- | -------- | ------- | ------ | ------- | ------ | -| 逍遥模拟器 | MemuPlayer | 7.1.3 | 5.1.1 | 0.308 | 0.275 | 0.294 | 0.146 | -| 雷电模拟器 | LDPlayer | 3.83 | 5.1.1 | 0.329 | 0.313 | 0.291 | 0.146 | -| 夜神模拟器 | NoxPlayer | 6.6.0.0 | 5.1.1 | 0.339 | 0.313 | 0.505 | 0.141 | -| MuMu模拟器 | MuMuPlayer | 2.3.1.0 | 6.0.1 | 0.368 | 0.701 | 0.358 | 0.148 | -| 一加5 | Oneplus5 | | 7.1.1 | 1.211 | 0.285 | 0.447 | 0.160 | - -这里给出了一些常见模拟器的性能测试结果, 测试平台 Windows 10, I7-8700k, 1080ti, nvme SSD, 模拟器分辨率1280x720, 碧蓝航线 60帧开启, 进入地图 7-2, 执行100次取平均, 单位秒. - -2020.06, 对 [aScreenCap](https://github.com/ClnViewer/Android-fast-screen-capture) 和 蓝叠模拟器(BlueStacks) 追加测试. - -| 设备 | Device | 模拟器版本 | 安卓版本 | aScreenCap截图 | adb截图 | u2截图 | adb点击 | u2点击 | -| ---------------- | --------------- | ------------ | -------- | -------------- | ------- | ------ | ------- | ------ | -| 夜神模拟器 | NoxPlayer | 6.6.0.0 | 5.1.1 | 0.242 | 0.408 | 0.368 | 0.532 | 0.142 | -| 蓝叠模拟器(台湾) | BlueStacks (TW) | 4.205.0.1006 | 5.1.1 | 0.129 | 0.280 | 0.458 | 0.234 | 0.151 | - -> **结论** -> -> 推荐使用 蓝叠模拟器国际版 -> -> 推荐使用 aScreenCap 截图, uiautomator2点击 - -由于海图识别模块对截图质量有很高的要求, `AzurLaneAutoScript` 暂时不支持手机, 必须使用模拟器. (Alas其实是支持手机的, 远古版本的Alas也是在手机上测试的, 但是长时间运行会发热和假死, 就放弃了) - -- 安装一款安卓模拟器 -- 模拟器分辨率设置为 `1280x720` . - -### 配置ADB Set up ADB - -- 获取 [ADB](https://developer.android.com/studio/releases/platform-tools) - -- 将ADB配置于系统的环境变量中, 并测试是否配置成功. - -``` -adb devices -``` - -### 调教国产模拟器 Dealing with chinese emulator - -国产模拟器一般会使用自己的 ADB, 而不同的ADB之间会互相结束对方, 这里提供一个一劳永逸的方法: 直接替换. - -- 前往模拟器的安装目录, 搜索 `adb`, 备份这些文件 -- 将自己的 `adb.exe` 复制进安装目录, 并且把名字改成刚才备份的文件的名字. - -比如说夜神模拟器的安装目录有 `adb.exe` 和 `nox_adb.exe` , 备份它们. 把自己的 `adb.exe` 复制两份进来, 其中一份改名为 `nox_adb.exe` . - -这并不会影响模拟器运行, 还会带来方便. 每次打开模拟器的时候, 模拟器就会自动连接至ADB, 相当于执行了 - -``` -adb connect -``` - -### 安装 uiautomator2 Install uiautomator2 - -[uiautomator2](https://github.com/openatx/uiautomator2), 是一个自动化测试的库, 可以加快截图和点击的速度. `AzurLaneAutoScript` 也可以使用ADB来执行截图和点击, 就是慢一点而已. - -- 执行 - -``` -python -m uiautomator2 init -``` - - 会在所有连接的设备上安装 [uiautomator-server](https://github.com/openatx/android-uiautomator-server/releases) , [atx-agent](https://github.com/openatx/atx-agent), [minicap](https://github.com/openstf/minicap), [minitouch](https://github.com/openstf/minitouch) . 如果设备是模拟器, uiautomator2 将跳过 minicap 的安装. - -- 检查 uiautomator2 是否安装成功 - - 修改 `module.dev_tools` 下的 `emulator_test.py` 中的 `SERIAL`, 并执行. - - 一些模拟器的默认 serial: - - | 设备 | Device | serial | - | ---------- | ---------- | --------------- | - | 蓝叠模拟器 | BlueStacks | 127.0.0.1:5555 | - | 夜神模拟器 | NoxPlayer | 127.0.0.1:62001 | - | MuMu模拟器 | MuMuPlayer | 127.0.0.1:7555 | - | 逍遥模拟器 | MemuPlayer | 127.0.0.1:21503 | - | 雷电模拟器 | LDPlayer | emulator-5554 | +包含傻瓜式安装教程和高级用户安装教程. -## 使用方法 Usage +## 使用注意事项 Note -- 编辑`alas.bat`, 并双击运行 -- 创建快捷方式, 把目标修改为`<绝对路径至python虚拟环境> <绝对路径至alas.pyw>`, 把起始位置修改为 `<绝对路径至AzurLaneAutoScript的目录>`, 双击运行 -- (不推荐) 通过命令行运行. 虽然alas使用了 [Gooey](https://github.com/chriskiehl/Gooey), 一个将命令行转为GUI的库, 但是Alas并不是先有命令行方法运行再用gooey的, Alas是为了使用gooey快速编写GUI而去拼凑命令行参数的. 因此使用命令行会很难受. -- (不推荐) 修改配置文件 `config/alas.ini` , 在 `alas.py` 中调用相关函数 -- 多开运行, 复制 alas.pyw, 并重命名. 首次运行时会复制template.ini的设置. 脚本运行时会使用同名的ini配置文件. +- 当修改完设置后, 需要点击"开始"来保存选项, 然后点击"编辑"返回主界面. 因为位于左侧的每一项功能都是分别保存和运行的. + +- 在提问题前, 请先阅读 [常见问题(FAQ)](doc/FAQ_en_cn.md) @@ -161,10 +75,19 @@ python -m uiautomator2 init 按出现频率排列 - **GUI启动慢, uiautomator2启动慢** + - **无法处理网络波动** 重连弹窗, 跳小黄鸡 + +- **在极低配电脑上运行可能会出现各种问题** 缓慢修复中 + + 极低配, 指截图耗时大于1s. 一般电脑耗时约0.5s, 高配耗时约0.3s, 高配+aScreenCap截图耗时小于0.15s. + - **会显示绿脸黄脸红脸** 这个是瓜游心情值更新BUG, Alas会每隔2小时重启游戏来更新心情. + - **演习可能SL失败** 演习看的是屏幕上方的血槽, 血槽可能被立绘遮挡, 因此需要一定时间(默认1s)血量低于一定值(默认40%)才会触发SL. 一个血皮后排就有30%左右的血槽, 所以别以为在1s内被打掉40%是不可能的. 另外如果后排立绘过大且CD重叠严重, 建议增大确认时间(比如3s), 或者换皮肤, 这样可以减少误判. + - **极少数情况下ADB和uiautomator2会抽风** + - **拖动操作在极少数情况下无效** diff --git a/doc/README.assets/gui.png b/doc/README.assets/gui.png index be5f94200..5f50cfa45 100644 Binary files a/doc/README.assets/gui.png and b/doc/README.assets/gui.png differ diff --git a/module/config/argparser.py b/module/config/argparser.py index 8390e4f40..2c25ca147 100644 --- a/module/config/argparser.py +++ b/module/config/argparser.py @@ -26,7 +26,7 @@ except Exception: sidebar_title='功能', terminal_font_family='Consolas', language='chinese', - default_size=(850, 850), + default_size=(800, 850), navigation='SIDEBAR', tabbed_groups=True, show_success_modal=False,