Go to file
2020-06-01 21:25:32 -03:00
assets Fix: [EN] Fix commission reward stuck 2020-06-01 15:13:34 -03:00
campaign Merge remote-tracking branch 'origin/master' 2020-06-01 08:23:18 +08:00
cnocr_models Initial commit 2020-03-29 01:41:34 +08:00
config Add: Enhance module 2020-06-01 08:20:13 +08:00
dev_tools New assets 2020-05-28 18:37:17 -03:00
doc Update development_en.md 2020-05-30 16:02:40 -03:00
module Fix: [EN] Fix wrong filter in commission module, the commission Aiding Manne Island is categorized incorrectly in wiki 2020-06-01 21:25:32 -03:00
.gitignore Fix: [EN] Relogin is now working 2020-05-31 04:48:22 -03:00
alas_cn.pyw Add: multi-server support 2020-05-25 22:05:42 +08:00
alas_en.pyw Add: multi-server support 2020-05-25 22:05:42 +08:00
alas.bat Retirement assets 2020-05-28 22:08:21 -03:00
alas.py Add: 增加挂机收菜模式 2020-05-06 23:53:25 +08:00
LICENSE Create LICENSE 2020-04-26 17:12:05 +08:00
README_en.md Fix: [EN] Relogin is now working 2020-05-31 04:48:22 -03:00
README.md Doc: [CN] Fix mis-introduction in README.md 2020-06-01 20:22:04 +08:00
requirements.txt Fix: requirements.txt 2020-05-25 18:07:33 +08:00

AzurLaneAutoScript

Alas, an Azur Lane automation tool with GUI (For CN server, can support other server).

gui

Features

  • Campaign: Currently support the first 6 chapter and 7-2

  • Events: Support「Skybound Oratorio」, specifically map D1 and D3, supporting handling of 光之壁? (Fleet is unable to proceed into square that has 光之壁. Support 开荒)

  • Daily Mission: Able to finish everything in 30 minutes, repeated run will skip over what has been done on that day

    Daily Mission(Submarine not support). Hardmode(Currently only support 10-4). Exercise, Auto SL.

  • Events x3 PT: 30 minutes to finish A1-B3

  • Commissions: Dispatch commision every 20 minutes during campaign, accept commission rewards, research rewards, and daily mission rewards.

  • Misc Features

    Morale Control, Calculate Morale to prevent it from going sad, or to maintain Morale to earn experience

    HP Monitoring, Low HP Retire, Frontline HP Balancing

    Equipment Change

    Periodic Screeshot Record

    Auto Retire

    Map completion mode, when running new map, it will try to do 3 star clear

Installation

  • Clone this item

  • Installing dependacy using a virutal enviroment

pip install -r requirements.txt
Device Emulator Version Android Version ADB Screenshot UIAutomator2 Screenshot ADB Click UIAutomator2 Click
NemuPlayer 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
MuMuPlayer 2.3.1.0 6.0.1 0.368 0.701 0.358 0.148
Oneplus5 7.1.1 1.211 0.285 0.447 0.160

This are the common emulation setting that we have tested on, tested Platform Windows 10, I7-8700K, 1080ti, nvme SSD, emulator resolution 1280x720, Azur Lane 60FPS, tested on map 7-2, on average execute 100 commands in seconds.

As screenshot recognition has a high requirement needed to run, AzurLaneAutoScript currently does not support mobile devices, you MUST use an emulator.

  • Install an Android emulator
  • Set emulator resolution to 1280x720

ADB Setup

  • Install ADB
  • Add ADB to enviroment variables of the system and test wheather the configurationis successful using the below command
adb devices

Installing UIAutomator2

UIAutomator2, is a library for automation, it can be use to speedup screenshots and clicks. AzurLaneAutoScript can also use ADB to perform screenshots and clicks, but it will be slightly slower.

For performance optimisation, it is recommended to use ADB for screenshot, and UIautomator2 for clicks. (As U2 Screenshot is slightly faster compare to ADB screenshot, but CPU resource usage is doubled, while U2 click is superior in all ways compare to ADB)

  • Starting up
python -m uiautomator2 init

All connected devices will be install with uiautomator-server , atx-agent, minicap, minitouch . If the device is a emulator, UIautomator2 will skip over the installation of minicap.

  • Check if the installation of UIautomator 2 is successful

    Modify the serial in \dev_tools\emulator_test.py line 31 and, execute from root project directory (the same where you have the file alas.py)

    The default serial for some emulators:

    Device serial
    NoxPlayer 127.0.0.1:62001
    MuMuPlayer 127.0.0.1:7555
    NemuPlayer 127.0.0.1:21503
    LDPlayer emulator-5554

Usage

  • Double-click alas.pyw to run via graphical interface (GUI)
  • (Not Recommeneded) to run alas.pyw throught cmd even thought Alas is using Gooey a library that converts the command line to a GUI, Alas didnt have a method for running command line before using gooey. Alas was meant to be use with gooey, as such the command line function was create hastily. Therefore, using command line to run Alas will not be easy.
  • (Not Recommended) to modify the configuration file 'config'alas.ini' and relation function in 'alas.py'
  • Multi-usage: copy alas.pyw, and rename, double-click run on it. The settings of template.ini are copied when the first run runs. The script runtime uses the ini profile of the same name.

Known issue

Sort by frequency

  • GUI move slowly, UIautomator2 move slowly
  • Unable to deal with network issues Reconnect pop-up, little chick pop-up
  • It will display green face, yellow face, red face This is a bug, Alas will restart the game every 2 hour to update the affections level.
  • Exercise may fail SL
  • Under rare circumstance ABD and UIAutomator2 will have convulsive seizures
  • Screen draging will not work in rare circumstances

Doc

Map Perspective

Map Perspective is the core foundation of Azur scripts. If you simply use (Template Matching) to search for enemies, it is inevitable that in some rare cases, the BOSS will be blocked by mobs. AzurLaneAutoScript provides a better map recognition menthod in module.map, you will be able to get a more complete sea information such as:

2020-03-10 22:09:03.830 | INFO |    A  B  C  D  E  F  G  H
2020-03-10 22:09:03.830 | INFO | 1 -- ++ 2E -- -- -- -- --
2020-03-10 22:09:03.830 | INFO | 2 -- ++ ++ MY -- -- 2E --
2020-03-10 22:09:03.830 | INFO | 3 == -- FL -- -- -- 2E MY
2020-03-10 22:09:03.830 | INFO | 4 -- == -- -- -- -- ++ ++
2020-03-10 22:09:03.830 | INFO | 5 -- -- -- 2E -- 2E ++ ++

Development

  • How to add a button
  • How to adapt to a new map
  • How to support other server/language

Reference