Skip to content
whoamikyo edited this page Aug 2, 2020 · 30 revisions

Easy Install Method

You can check that video too:

Youtube

The following guide describes how to install ALAS using the easy install method

  1. Download the easy install package

    Click here, to find the latest installation package.

    Download AzurLaneAutoScript.zip, don't download Source code.

    install_release

  2. Unzip Unzip to a directory, such as D:\AzurLaneAutoScript, make sure there is at least 1.5 GB of space.

    You will see a folder toolkit, and a batch file named Easy_Install-V2.bat.

    folder_unzip

  3. Right-click Easy_Install-V2.bat, select "Run as administrator""

    When you see these prompts, it means that you have obtained the administrator permission, press Enter to continue

    install_admin

    In the interface below, type start, to start the installation, and then press Enter.

    install_batch

    When you see the following message, the installation is successful.

    install_batch_finish

    Press enter again, it will return to the initial screen.

    Then you can close this window.

  4. Run alas.bat

    After the installation is complete, you will see many files and folders in the directory.

    folder_install_finish

    Now right click on alas.bat and select "Run as administrator"

    You will see a Prompt Command line

    alas_adb

    When running for the first time, it is required to enter the SERIAL (IP:PORT) of your Android Emulator.

    The following are the default SERIAL of some common emulators. (If you have multiple emulator instances, their serials may not be listed here), If your not in the list below, you may have to use google to try to figure out which adb port it uses, if not find, I suggest using some emulator from that list.

    Emulator Emulator 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

    After the input is complete, press Enter

    You will see some flashing messages

    alas_u2_init

    alas_main

    Press the number referring to the server you will play, then press Enter.

    Then, ALAS GUI will show up.

    alas_gui

  5. Check the emulator connection

    Click in Emulator on the left menu.

    • Check if the SERIAL is correct, if it is not set up correctly

    • Click in Start, this will save the options and check the ADB connection, then click Edit to return to the main interface

    alas_emulator_settings

    When you see the following message, everything is normal.

    alas_emulator_save

    Now you can click Edit to return to the main interface and start using Alas.

Easy Update Tutorial

Right-click on alas.bat, select "Run as administrator" to enter in the main interface of alas.bat.

alas_main

Press the number 4, which is to update, and then press Enter.

Here will ask how to update.

alas_update_method

Generally select 1, which means to overwrite the existing files (user settings will be maintained). If you manually modify some files, such as writing your own map logic, and want to keep it, select 2.

Enter the selected number, and then press Enter.

alas_update

Enter the number 1 and choose to update from the default mirror. If Alas has a major update, it may be necessary to update some dependencies, enter the number 5 to update environment.

Then press enter

When you see the following message, the update is complete

alas_update_finish

Press enter again, it will return to the main interface

Then you can close this window

Advanced installation method

Advanced users here refer to people who have a certain understanding of python and can use search engines to solve problems independently.

What's in the easy installation package?

WinPython Winpython64-3.7.6.0dot

Pre-installed dependencies

PortableGit

Easy_Install-V2.bat, Used to execute git pull

  • Clone This project

Create a virtual environment

The python version in the virtual environment must be 3.7.6

Activate the virtual environment and install dependencies

pip install -r requirements.txt

If you get a Microsoft Visual C++ 14.0 is required when installing Python-Levenshtein, you can click here here Download this wheel file and install it with pip

pip install python_Levenshtein-0.12.0-cp37-cp37m-win_amd64.whl

Install emulator

Device Emulator version Android version adb screenshot u2 screenshot adb click u2 click
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
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

Here are the performance test results of some common emulators. Test platform Windows 10, I7-8700k, 1080ti, nvme SSD, emulator resolution 1280x720, Azur Lane at 60fps, enter map 7-2, execute 100 times and calculate the average.

2020.06, additional tests for aScreenCap and BlueStacks emulator (BlueStacks).

Device Emulator version Android version aScreenCap screenshot adb screenshot u2 screenshot adb click u2 click
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

Conclusion

It is recommended to use the International Version of BlueStacks Emulator

It is recommended to use aScreenCap to take screenshots, uiautomator2 click

Since the recognition module has high requirements for the quality of screenshots, AzurLaneAutoScript does not support officially mobile phones for the time being, and an emulator must be used. (Alas actually supports mobile phones, and the ancient version of Alas was also tested on mobile phones, but for a long time is not recommended and we do not support it.

  • Install an Android emulator
  • The emulator resolution is set to 1280x720.

Configure ADB

  • Download ADB

  • Configure ADB in the system environment variables (PATH), and test whether the configuration is successful.

adb devices

uiautomator2 install

uiautomator2, is a library for automated testing, which can speed up screenshots and clicks. AzurLaneAutoScript can also use ADB to perform screenshots and clicks, which is just slower

  • Just
python -m uiautomator2 init

This will install uiautomator-server, [atx-agent](https://github.com/openatx/

  • Check if uiautomator2 is installed successfully

Modify SERIAL in emulator_test.py under module/dev_tools, and execute it in a virtual environment.

python -m dev_tools.emulator_test

一 The default serial of some simulators:

If you have multiple simulators, you need to execute adb devices to view the corresponding serial

Emulator serial
BlueStacks 127.0.0.1:5555
NoxPlayer 127.0.0.1:62001
MuMuPlayer 127.0.0.1:7555
MemuPlayer 127.0.0.1:21503
LDPlayer emulator-5554

Upon runtime, it will print the average time of the current screenshot method.

After printing for a few seconds, it means no problem, and you can end it.

The difference between different screenshot methods

aScreenCap is much faster than uiautomator2 and ADB. But the CPU usage is high, and it will get errors when running in some emulators, if you get any errors, we don't support it, just use another method.

uiautomator2 is faster than ADB on Emulators that use VirtualBox kernel (Night God Emulator, Xiaoyao Emulator, lightning Emulator), but slower than ADB on Emulators that use BlueStacks kernel (BlueStacks Emulator, MuMu Emulator).

ADB has the best compatibility.

Alas uses ADB screenshots by default, and if aScreenCap is available, it is recommended.

The difference between different click methods

The minitouch used by uiautomator2 crushes ADB in terms of click speed and gesture operation.

Alas uses uiautomator2 to click by default, and uiautomator2 is also recommended.

start up

  • How to create a shortcut to run

    Right click on alas.pyw to create a shortcut

    Right-click the shortcut you just created, click Properties, and change the Target to

    "<absolute path of your virtual environment>\pythonw.exe" "<absolute path of your Alas installation directory>\alas_en.pyw"
    

    Click OK

    Now, you can move this shortcut to any place, such as the desktop

    This startup method is the best, it will not appear as a command line window like using alas.bat, just double-click to run

    But if there is an error during GUI startup, no window will appear, and there will be no error message

  • Multi-instance support

    Copy alas.pyw and rename it. The template.ini settings will be copied the first time it is run. The script will run with the same name ini configuration file.

    For example, copy alas.pyw to alas2.pyw, create a shortcut to run, and use config\alas2.ini.

  • Other operating modes (not recommended)

    • Run through the command line. Although Alas uses Gooey, a library that converts the command line to a GUI, Alas does not have a command line method to run first and then use gooey
    • Modify the configuration file config/alas.ini and call related functions in alas.py

Getting Started

  • When opening the ALAS GUI you will see a number of different functions on the left side. Setting and Reward are where you can configure how the script runs. In Setting you can choose which fleet is the mob fleet or the boss fleet, retirement and enhancing preferences and you even choose what level of ship morale you would like to farm with. In Reward you set when the script will collect oil and coins from your canteen and market and mission rewards. You can also tell the script what commissions you would like to run and what tactical training to do. All of the settings here will be used when you select a function to farm. Before choosing a function to farm, please press start to save your settings, so if you go to function setting and modify some things and dont click in start nothing there you change will be write on alas.ini, and not run ALAS with alas.ini opened, this can cause issues when saving changes to the file.

  • The current functions are Daily where the script will run your daily missions and hard mode maps of your choice. Main Campaign where the script will complete story stages. Event where it will run event maps. 7-2 Mystery Farming will run 7-2 to farm for gold. 12-2 and 12-4 Levelling will run those maps for exp.

  • After you have tweaked your settings and saved them, select a function and press start again and the script will run. For example if you select the event function, then press start it will farm an event map of your choice.

  • Dont use submarines, When switching the submarine zone, the icon in the strategy don't change because a in-game bug, it's not just to checking do_not_use in ALAS, dont have any submarine fleet mounted while using the ALAS.

  • Do not try any trick to use only 1 Fleet, the logic is hardcoded, to avoid errors use mob fleet and boss fleet

Clone this wiki locally