### Run Alas Application Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Instructions on how to run the Alas application after manual installation, including creating a shortcut and setting the 'Start in' directory. ```bash cd AzurLaneAutoScript python gui.py ``` -------------------------------- ### Manual Installation: Creating a Shortcut Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn When using a manually cloned Alas repository, create a shortcut to toolkit/WebApp/alas.exe. Modify the shortcut's 'Start in' property to point to your cloned Alas directory. This bypasses the launcher but requires manual updates. ```text Shortcut Target: path/to/your/Alas/toolkit/WebApp/alas.exe Start in: path/to/your/Alas/ ``` -------------------------------- ### Install Requirements Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Installs all necessary Python packages listed in the 'requirements.txt' file using pip. ```python pip install -r requirements.txt ``` -------------------------------- ### Install ADB on macOS using Homebrew Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Provides commands to install Homebrew on macOS and then use it to install the android-platform-tools, which includes ADB. This is an alternative to manual ADB setup. ```shell # Install Homebrew (or use the Chinese mirror) /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Or for Chinese mirror: # /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" # Install android-platform-tools brew install android-platform-tools --cask ``` -------------------------------- ### Run Alas Application Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn This command starts the Alas application after activating the virtual environment. The application will be accessible via a local web address. ```python python gui.py ``` -------------------------------- ### Azur Lane Auto Script Installation Guide Source: https://github.com/lmeszinc/azurlaneautoscript/blob/master/README.md Provides information on installation, including links to Chinese tutorials covering automatic, manual, and remote control installation, as well as device support for emulators and cloud phones. ```English [Chinese Installation Tutorial](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/Installation_cn) Includes automatic installation, usage, manual installation, and remote control tutorials. [Device Support Documentation](https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/Emulator_cn) Covers emulator operation, cloud phone operation, and unlocking various running methods. ``` -------------------------------- ### ARM Mac Environment Setup with Conda Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Steps to set up a virtual environment for ARM Macs using Conda and a provided environment file. This ensures all necessary dependencies are installed correctly for the project. ```bash cd AzurLaneAutoScript conda env create -f environment-arm-mac.yml conda activate alas ``` -------------------------------- ### Build Desktop Client Dependencies Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Installs the necessary dependencies for building the cross-platform desktop client from the 'webapp' directory. ```javascript yarn ``` -------------------------------- ### Setup Python Environment (macOS) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Guides users through setting up a Python virtual environment on macOS using the built-in venv module. It specifies using Python 3.7.6 and installing dependencies from requirements-in.txt using the Tsinghua source. ```shell cd AzurLaneAutoScript python3 -m venv alas_venv source alas_venv/bin/activate pip3 install -r requirements-in.txt -i https://pypi.tuna.tsinghua.edu.cn/simple ``` -------------------------------- ### Install Dependencies (Windows/Linux) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Installs project dependencies from the requirements.txt file using pip, specifying the Douban source for faster downloads. Includes a note on upgrading pip if necessary. ```shell pip install -r D:\AzurLaneAutoScript\requirements.txt -i https://pypi.douban.com/simple/ # Optional: Upgrade pip python -m pip install --upgrade pip ``` -------------------------------- ### Build Desktop Client Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Compiles the desktop client application. The output will be found in the 'webapp/dist/{platform}' directory. ```javascript yarn run compile ``` -------------------------------- ### Manual Installation Configuration: Executable Paths Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn For developers or users performing a manual installation by cloning the repository, it's crucial to update the paths for Git, Python, and ADB executables within the config/deploy.yaml file. This ensures Alas uses your specific installations. ```yaml GitExecutable: 'path/to/your/git.exe' PythonExecutable: 'path/to/your/python.exe' AdbExecutable: 'path/to/your/adb.exe' ``` -------------------------------- ### Configure Repository and Pypi Mirror Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Users installing from the Chinese package need to edit the config/deploy.yaml file to set the repository and Pypi mirror for optimal performance in China. These settings ensure that the script fetches necessary files from local mirrors. ```yaml Repository: 'git://git.lyoko.io/AzurLaneAutoScript' PypiMirror: 'https://pypi.tuna.tsinghua.edu.cn/simple' ``` -------------------------------- ### Example with Server Setting and Module Imports Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/2.2.-Multi-server-support An example demonstrating the correct order of operations: setting the server first, then importing necessary modules. This ensures that server-specific configurations are applied correctly. ```python import numpy as np from tqdm import tqdm import module.config.server as server server.server = 'cn' # Edit your server here. from module.logger import logger from module.statistics.battle_status import BattleStatusStatistics from module.statistics.get_items import GetItemsStatistics from module.statistics.utils import * ``` -------------------------------- ### Setup Python Environment (ARM Mac) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Instructions for setting up the environment on ARM Macs using Conda and a provided environment file. It specifies using Python 3.8 as the minimum version for ARM compatibility. ```shell cd AzurLaneAutoScript conda env create -f environment-arm-mac.yml conda activate alas ``` -------------------------------- ### Running the AzurLaneAutoScript GUI Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Command to launch the graphical user interface for AzurLaneAutoScript after the environment has been set up. The script will then be accessible via a local web address. ```bash python gui.py ``` -------------------------------- ### Repository Setup and Commands Source: https://github.com/lmeszinc/azurlaneautoscript/blob/master/webapp/contributing.md Instructions for setting up the repository and common development commands. Requires npm v7 or later. ```bash npm run watch # Start electron app in watch mode. npm run compile # Build app for local debugging only. npm run lint # Lint your code. npm run typecheck # Run typescript check. npm run test # Run app tests. ``` -------------------------------- ### Emulator Preparation and ADB Configuration Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Instructions for preparing the Android emulator, including setting resolution, enabling ADB, and replacing the emulator's ADB with the latest version to avoid conflicts. This section also covers testing the ADB replacement. ```bash adb devices ``` -------------------------------- ### Clone AzurLaneAutoScript Repository Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Instructions for cloning the AzurLaneAutoScript repository using Git. This is the recommended method for obtaining the source code, especially for manual installations. ```bash git clone https://github.com/LmeSzinc/AzurLaneAutoScript ``` -------------------------------- ### Project Setup and Configuration Source: https://github.com/lmeszinc/azurlaneautoscript/blob/master/webapp/README.md Instructions for setting up the project, including cloning, package manager considerations, and peer dependency management. ```bash git clone https://github.com/cawa-93/vite-electron-builder.git cd vite-electron-builder npm install ``` -------------------------------- ### Install Dependencies Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Command to install all necessary Python dependencies for AzurLaneAutoScript from the requirements.txt file. Includes guidance on upgrading pip and installing specific wheels if compilation fails. ```bash pip install -r D:\AzurLaneAutoScript\requirements.txt ``` ```bash python -m pip install --upgrade pip ``` ```bash pip install python_Levenshtein-0.12.0-cp37-cp37m-win_amd64.whl ``` -------------------------------- ### AzurLaneAutoScript Desktop App Build Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Steps to build the cross-platform desktop application for AzurLaneAutoScript. This involves installing dependencies in the 'webapp' directory and running the build command. ```javascript yarn yarn run compile ``` -------------------------------- ### Clone AzurLaneAutoScript Repository Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Instructions for cloning the AzurLaneAutoScript project using Git. It's recommended to use Git clone instead of downloading a zip archive. ```shell git clone https://github.com/LmeSzinc/AzurLaneAutoScript ``` -------------------------------- ### Run AzurLaneAutoScript with Podman Compose Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en_docker Starts the AzurLaneAutoScript application using Podman Compose. Assumes configuration files have been set up. ```sh podman-compose up ``` -------------------------------- ### Install uiautomator2 Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn This command installs the uiautomator2 library, a crucial component for automated testing with the script. Ensure your emulator is running before executing this command. ```python python -m uiautomator2 init ``` -------------------------------- ### Install Python-Levenshtein Wheel (Windows) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Provides instructions for installing the Python-Levenshtein wheel file if a Microsoft Visual C++ 14.0 is required during installation. This is a common issue on Windows. ```shell pip install python_Levenshtein-0.12.0-cp37-cp37m-win_amd64.whl ``` -------------------------------- ### uiautomator2 Initialization Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Command to initialize the uiautomator2 library, which is required for automated testing. This step installs the necessary ATX app on the emulator. ```python python -m uiautomator2 init ``` -------------------------------- ### Access Alas Remotely Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Details on how to access the Alas application remotely via a web interface. This involves starting the web server and accessing it through a browser using the default port. ```bash python gui.py http://127.0.0.1:22267 ``` -------------------------------- ### Examples of Effective Help Requests Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Home Provides guidance on how to properly ask for help or report issues, including necessary details like logs and version information. ```text Examples of how to ask for help or report an issue correctly - Always post some log, in some cases ALAS saves the specific error log. Inside that folder you will find a .txt file with the most recent log and the latest screenshots of the game, for some errors it will be necessary to upload the entire folder, by default always send the last image in the folder (it is in chronological order) > 2020-07-27 13:50:37.588 | INFO | Saving error: ./log/error/1595883037588` - Check if you are using the most recent version, many users report problems that have already been fixed, avoid doing this, check github feed or in doubt run updater in alas.bat, sometimes we're updating several times per day, stay tuned. - Give as much information as possible ``` -------------------------------- ### Mac ARM Architecture Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Instructions for running Alas on Mac with ARM architecture, recommending specific emulators and linking to a detailed guide. ```APIDOC Mac (ARM Architecture): Support: Supported, but requires configuration. Guide: Refer to binss's blog post: https://www.binss.me/blog/run-azurlaneautoscript-on-arm64/ Recommended Emulators: - BlueStacks Air: https://www.bluestacks.com/mac - MuMu Simulator PRO (Paid): https://mumu.163.com/mac/ - AVD: https://developer.android.com/studio/run/managing-avds ``` -------------------------------- ### Install Alas Autoscript Source: https://github.com/lmeszinc/azurlaneautoscript/blob/master/deploy/Readme.md Instructions for installing the Alas autoscript by running the installer module from the root folder. ```python python -m deploy.installer ``` -------------------------------- ### Docker Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Information on running Alas within a Docker container. ```APIDOC Docker: Support: Supported, but requires configuration. Guide: https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/Installation_en_docker ``` -------------------------------- ### Replace Emulator ADB (Windows) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn This section details how to replace the default ADB executable in emulators with a standardized version to prevent conflicts. It involves backing up existing ADB files, replacing them, and verifying the connection. ```bash adb devices ``` -------------------------------- ### Mac x86 Architecture Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Guidance for running Alas on Mac with x86 architecture, directing users to manual installation instructions. ```APIDOC Mac (x86 Architecture): Support: Supported, but requires configuration. Instructions: Follow the manual installation guide, specifically the Mac installation section: https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/Installation_cn#%E6%89%8B%E5%8A%A8%E5%AE%89%E5%85%A8%E8%A3%85%E6%95%99%E7%A8%8B ``` -------------------------------- ### Python Virtual Environment Creation Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Demonstrates how to create a Python virtual environment using the 'venv' module. This isolates project dependencies. ```python python -m venv path_to_your_folder\venv ``` -------------------------------- ### Check Python Version Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Displays the installed Python version. Ensures compatibility with the project requirements. ```python python --version ``` -------------------------------- ### Alas Supported Page Warnings Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/FAQ_en_cn Log output indicating that the script does not support starting from the current UI page and lists the supported pages. ```log INFO | <<< UI ENSURE >>> INFO | Unknown ui page INFO | Unable to goto page_main WARNING | Starting from current page is not supported WARNING | Supported page: ['page_main', 'page_campaign', 'page_fleet', 'page_exercise', 'page_daily', 'page_event', 'page_sp', 'page_mission', 'page_raid'] WARNING | Supported page: Any page with a "HOME" button on the upper-right ``` -------------------------------- ### Examples of Ineffective Help Requests Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Home Illustrates common ways users ask for help that are not useful for troubleshooting. ```text Self-help Use these sources first, it's very likely that your issue is covered already. - Guides on wiki: - Installation: https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/Installation_en - FAQ: https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/FAQ_en_cn - Video tutorial: https://www.youtube.com/watch?v=bp4kd8P1qT4 - Research filter string guide: https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/filter_string_en - Other guides and info: https://github.com/LmeSzinc/AzurLaneAutoScript/wiki Examples of how NOT to ask for help or report a issue - was using and stopped working - there was an error here, help - when i'm going to farm the xyz map it gives an error - i can't update ``` -------------------------------- ### Traditional Cloud Phone + Cloud Server Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Instructions for running Alas with traditional cloud phones and cloud servers, noting limitations and recommendations against this setup. ```APIDOC Traditional Cloud Phone + Cloud Server: Support: Supported, but requires configuration and is not recommended. Setup: Requires virtual LAN setup between the cloud phone and cloud server. Reference: https://www.perfare.net/archives/1804 Limitations: - Cannot use Alas's 'Restart Emulator' function as cloud phones are not local emulators. ``` -------------------------------- ### Waydroid Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Details on running Alas with Waydroid, including requirements for x86 architecture and permission adjustments for game launch issues. ```APIDOC Waydroid: Support: Supported, but requires configuration. x86 Architecture: Requires 'houdini/libndk' translator for installation and game launch. Troubleshooting: - Black Screen/Crashes: Set permissions for data/obb to 777 to resolve initial launch or update issues. - Window Mode: May sometimes revert to window mode after reboot. ``` -------------------------------- ### Create and Activate Conda Environment (Windows/Linux) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Steps to create a Python virtual environment named 'alas' with Python version 3.7.6 using Anaconda, and then activate it. This is crucial for managing project dependencies. ```shell conda create -n alas python==3.7.6 -y conda activate alas ``` -------------------------------- ### Nox Emulator Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Information on running Alas with Nox emulator, noting performance considerations based on hardware. ```APIDOC Nox Emulator: Support: Supported. Performance Note: Performance may degrade significantly on average-spec devices, but is largely unaffected on high-spec devices. Download: - CN: https://www.yeshen.com/ - International: https://www.bignox.com/ ``` -------------------------------- ### Replace Emulator ADB (Mac) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn Instructions for replacing the ADB executable on macOS, specifically for Mumu Player. It involves locating the emulator's ADB, replacing it with a compatible version, and confirming the successful replacement. ```bash /Applications/NemuPlayer.app/Contents/MacOS/adb ``` ```bash adb devices ``` -------------------------------- ### Cloud Server Setup (No GPU) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Explanation on why running Alas on cloud servers without a GPU is not feasible and the limitations of CPU-only rendering. ```APIDOC Cloud Server (No GPU): Support: Not supported. Reasoning: - Emulators require a GPU, with costs starting around 600 CNY/month for GPU-enabled servers. - Many cloud providers prohibit secondary virtualization, preventing emulator use. - Waydroid with CPU-only rendering is too slow and may fail due to missing Ashmem/MemFD and Binder modules (common in LXC-based architectures). Recommendation: Refer to sections on Cloud Phone + Cloud Server setups. ``` -------------------------------- ### XingjieLian Cloud Phone Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Guidance on using the Alas version provided by XingjieLian Cloud Phone, including a referral code. ```APIDOC XingjieLian Cloud Phone (Alas Version): Support: Supported. Reference: https://www.chinac.com/docs/help/anc/content/third/Alas Features: Built-in Alas service connects to the cloud phone's internal network for seamless cloud deployment. Referral Code: qpCoSu (can be used three times per account for a discount on top-ups). ``` -------------------------------- ### Emulator Configuration: Resolution and Mode Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn For optimal performance with Alas, it's recommended to set your emulator's resolution to 1280x720 and enable 'Tablet Mode'. This ensures consistent scaling and input recognition. ```text Resolution: 1280x720 Mode: Tablet Mode ``` -------------------------------- ### Initialize uiautomator2 Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Initializes the uiautomator2 library, which is used for automated testing, screenshots, and clicks on Android devices/emulators. ```python python -m uiautomator2 init ``` -------------------------------- ### Memu Play Emulator Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Guidance for Memu Play emulator, including a specific control setting for input issues. ```APIDOC Memu Play Emulator: Support: Supported, but not recommended. Troubleshooting: If clicks are unresponsive, set control mode to 'MaaTouch'. Download: - CN: https://www.xyaz.cn/ - International: https://www.memuplay.com/ ``` -------------------------------- ### Activate Python Virtual Environment Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Shows the command to activate a Python virtual environment on Windows. This ensures that project-specific Python packages are used. ```batch .\venv\scripts\activate.bat ``` -------------------------------- ### Android Virtual Device (AVD) Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Information on using Alas with Android Virtual Devices (AVDs). ```APIDOC Android Virtual Device (AVD): Support: Supported, but requires configuration. Reference: https://developer.android.com/studio/run/managing-avds ``` -------------------------------- ### Build and Run AzurLaneAutoScript with Podman Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en_docker Builds the Docker image for AzurLaneAutoScript and then runs it using Podman with host networking and volume mounts for persistent data and configuration. ```sh podman build -t alas -f deploy/docker/Dockerfile deploy/docker podman run --net=host -it -v '.:/app/AzurLaneAutoScript:rw' -v '/etc/localtime:/etc/localtime:ro' --name alas alas ``` -------------------------------- ### Multi-Usage Configuration Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Demonstrates how to set up multiple instances of the Azur Lane Auto Script by copying and renaming the main script file. Each instance will use its own configuration profile based on its filename. ```batch copy alas_en.pyw my_custom_script.pyw REM Then double-click and run my_custom_script.pyw ``` -------------------------------- ### Uninstalling Alas Commands Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Provides commands to forcefully stop Alas processes and ADB server, useful when files are occupied during uninstallation. ```batch adb kill-server taskkill /f /im alas.exe taskkill /f /im python.exe ``` -------------------------------- ### Normal Log Output Example Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/debug_perspective_en This snippet shows a typical log output during normal operation, indicating detected vanishing points, distant points, and grid line information. ```log 2020-06-03 00:44:46.221 | INFO | vanish_point: ( 646, -1736) 2020-06-03 00:44:46.222 | INFO | distant_point: (-2321, -1736) 2020-06-03 00:44:46.266 | INFO | 0.235s _ Horizontal: 5 (7 inner, 3 edge) 2020-06-03 00:44:46.266 | INFO | Edges: / \ Vertical: 9 (10 inner, 3 edge) 2020-06-03 00:44:46.273 | INFO | Center grid: (3, 1) 2020-06-03 00:44:46.493 | INFO | -- -- -- -- -- 2M -- -- 2020-06-03 00:44:46.501 | INFO | MY -- -- MY -- -- 3M -- 2020-06-03 00:44:46.501 | INFO | -- -- FL -- -- -- -- -- 2020-06-03 00:44:46.501 | INFO | -- 1L -- MY -- 2L -- ``` -------------------------------- ### Troubleshooting: Alas.exe Antivirus Detection Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn If your antivirus software flags Alas.exe as a virus, you can add it to the whitelist. Alternatively, you can use the Alas.bat script located in deploy/install/Alas.bat, which performs the same function as Alas.exe. ```batch taskkill /f /im alas.exe taskkill /f /im python.exe ``` -------------------------------- ### Emulator Configuration: Disabling Keep-Alive for MuMu12 Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn For MuMu12 users, it is advised to disable the 'keep-alive' feature in the emulator's settings. This prevents potential conflicts with Alas's process management. ```text Keep-Alive: Disabled ``` -------------------------------- ### Android Development Board Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Detailed instructions for running Alas on Android development boards, outlining two distinct methods involving Termux, Ubuntu, and Docker. ```APIDOC Android Development Boards (e.g., Raspberry Pi, Orange Pi, RK3588): Support: Supported, but requires significant technical skill. Methods: 1. Onboard Android System: - Install Termux. - Install Ubuntu 20.04 via Androinix within Termux. - Install Alas within Ubuntu (avoid direct Termux installation). - Pros: Similar user experience to standard Android devices. Cons: Cannot run multiple instances. 2. Linux System on Board: - Flash a Linux distribution. - Run games via Waydroid or Redroid. - Run Alas via Docker. - Reference for RK3588 Redroid crash fix: https://www.nyanners.moe/post/fix-rk3588-redroid-azur-lane-crash.html - Pros: Standard technical stack, supports multiple instances. Cons: More complex setup. ``` -------------------------------- ### Emulator Configuration: Enabling ADB Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn If you are using BlueStacks or NoxPlayer, you need to explicitly enable ADB (Android Debug Bridge) within the emulator's settings. This allows Alas to communicate with the emulator. ```text Enable ADB: True ``` -------------------------------- ### Troubleshooting: File In Use During Deletion Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn If you encounter issues deleting Alas files due to them being in use, you can use the console.bat script to forcefully terminate related processes. This includes the ADB server, Alas.exe, and Python processes. ```batch adb kill-server taskkill /f /im alas.exe taskkill /f /im python.exe ``` -------------------------------- ### Create and Activate Python Virtual Environment (Anaconda) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_en Steps to create a dedicated Python virtual environment using Anaconda, specifically for AzurLaneAutoScript. It emphasizes using Python version 3.7.6 to avoid compatibility issues. ```bash conda create -n alas python==3.7.6 -y conda activate alas ``` -------------------------------- ### Run Azur Lane Auto Script (Command Line) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Quick_guide Launch the Azur Lane Auto Script's graphical user interface from the command line using Python. This is an alternative method if the batch file is not used. ```python py alas_en.pyw ``` -------------------------------- ### Alas Settings: Emulator Serial and Game Client Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Installation_cn When configuring Alas, you need to specify the emulator's Serial number and the game client. For MuMu12, the Serial can be found in the MuMu12 Multi-Instance Manager. Alas can often auto-detect these settings. ```text Emulator Serial: Game Client: Game Server: ``` -------------------------------- ### BlueStacks Emulator Setup Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn Instructions for running Alas on BlueStacks emulator. Covers ADB debugging and discusses version differences (CN vs. International, BS4 vs. BS5). ```APIDOC BlueStacks Emulator: Support: Supported. Enable 'ADB debugging' in emulator settings. Version Recommendation: BlueStacks 5 International version is preferred for fewer ads. Both CN and International versions can be set to Simplified Chinese. Download: - CN: https://www.bluestacks.cn/ - International: https://www.bluestacks.com/ Note: Avoid BlueStacks X (cloud gaming). Be aware of variations in ADB setting names/locations across different BlueStacks versions (BS4, BS5, Hyper-V, non-Hyper-V). ``` -------------------------------- ### General UI Control Functions Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/4.2.-UI-control Provides core functions for interacting with the game UI, including automatic and pathfinding-based screen transitions. These functions handle retries and can start from various game states. Key functions include `ui_click` for button presses and screen transitions, `ui_get_current_page` to identify the active screen, `ui_goto` for navigating between screens, `ui_ensure` for getting and going to a screen, `ui_ensure_index` for paginating through numbered items, `ui_goto_main` to return to the main screen, `ui_back` to use the back button, and `ui_additional` to handle unexpected pop-ups. ```python ### ui_click() 点击 UI 上的按钮,切换至下一界面。相当于是封装了: ```python while 1: self.device.screenshot() if self.appear(appear_button): self.device.click(click_button) if self.appear(check_button): break ``` - **appear_button** 如果出现了这个按钮,就点击 click_button - **click_button** 需要点击的按钮,为设置时,等于 appear_button - **check_button** 如果出现了这个按钮,认为界面切换完成 - **additional** 点击可能会出现的按钮,例如弹窗确认 ### ui_get_current_page() 获取当前界面。`self.ui_current` 即是当前界面。 Alas 启动时会调用这个方法,如果游戏未启动,抛出 `GameNotRunningError`,被顶层捕获后,启动游戏并继续。 ### ui_goto() 沿最短路径切换到指定界面,即便歪去别的界面也能自动纠正。 ### ui_ensure() 相当于 ui_get_current_page() + ui_goto() ### ui_ensure_index() 地图章节翻页,包含重试以防止没翻到或者翻过头。使用场景:设置地图章节,选择队伍,设置猫箱购买数量等。 - **index** 目标数字 - **letter** 当前数字,可以是获取当前数字的方法,也可以是 OCR 类 - **prev_button** 往前的按钮 - **next_button** 往后的按钮 - **fast** True则一次性点完,不对再重试。False则点一下识别一下。False用在队伍选择上,因为如果少了一队,数字就不连续了。 ### ui_goto_main() 前往主界面 ### ui_back() 点返回箭头 ### ui_additional() 处理各种可能在界面切换期间出现的弹窗。 ``` -------------------------------- ### Example Commission Filter Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/filter_string_cn An example of a commission filter that selects 8-hour gem commissions, 6-hour box commissions, any daily commission, 8-hour night oil commissions, and any extra oil commission. ```python commission_filter = "gem-8 > box-6 > daily > night-oil-8 > extra-oil" ``` -------------------------------- ### Onepush Provider Parameter Example (Bark) Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Onepush-configuration-[CN] Example demonstrating how to identify required parameters for an Onepush provider by inspecting the provider's Python code. ```python _params = { 'required': ['key'], ``` -------------------------------- ### Discord Server Link Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Home Provides a direct link to join the AzurLaneAutoScript Discord server via a badge. ```markdown [![](https://img.shields.io/discord/720789890354249748?logo=discord)](https://discord.gg/c3WwYWf) ``` -------------------------------- ### Example Research Filter Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/filter_string_cn An example of a research filter that selects a 0.5-hour ship equipment analysis, a 0.5-hour Drake-type research, a 2.5-hour directed research, resets the research list, and then selects the shortest duration research. ```python research_filter = "Q-0.5 > Drake-0.5 > D-2.5 > reset > shortest" ``` -------------------------------- ### Alas UI Startup Issues Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/FAQ_jp This log output shows that Alas is unable to determine the current UI page and cannot navigate to the main page. It lists supported pages and a general condition for supported pages (presence of a 'HOME' button). Starting Alas on a loading screen is not supported. ```log INFO | <<< UI ENSURE >>> INFO | Unknown ui page INFO | Unable to goto page_main WARNING | Starting from current page is not supported WARNING | Supported page: ['page_main', 'page_campaign', 'page_fleet', 'page_exercise', 'page_daily', 'page_event', 'page_sp', 'page_mission', 'page_raid'] WARNING | Supported page: Any page with a "HOME" button on the upper-right ``` -------------------------------- ### Emulator Configuration Notes Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/Emulator_cn General recommendations for configuring emulators to run the Azur Lane Auto Script, including resolution settings and game-specific adjustments. It highlights the importance of setting up in-game formations (Meta) locally. ```APIDOC Emulator Configuration: Resolution: Set to 1280x720. Incorrect resolution may cause screenshot errors. Game Settings: Adjust according to specific requirements (refer to provided link). In-Game Formations: Configure current and past Meta formations locally, as they are not cloud-synced. This is crucial to prevent errors after migrating to a new device. ``` -------------------------------- ### OCR Class Usage Example Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/4.3. OCR Example of how to create and use the generic OCR class for recognizing text, such as a campaign name, from an image. It demonstrates initializing the Ocr object with buttons, a name, color, threshold, and alphabet, and then calling the ocr method. ```python # 创建 Ocr 对象 # 可以是个 button,也可以是一个 list 的 button ocr = Ocr(buttons, name='campaign', letter=(255, 255, 255), threshold=128, alphabet='0123456789ABCDEFGHIJKLMNPQRSTUVWXYZ-') # 获取识别结果 result = ocr.ocr(image) ``` -------------------------------- ### Python: Wall Data Configuration Example Source: https://github.com/lmeszinc/azurlaneautoscript/wiki/5.2. Create globe Map Shows how to define 'light walls' using `wall_data`. These walls block fleet movement between adjacent grid cells, represented by '|' for vertical walls and '-' for horizontal walls. The example uses D2 as a reference point. ```python MAP.wall_data = """ · · | · · · · · · · · · , + , · · · · · · · · · · | · , + + + + + , · · | · · | · | · · · · | · · , +---+---+ | | + , · · · | · · | · · · · | · | · , +---+ +---+ +---+ +-- , · · · · · · · · · · · , , · · · · · · · · · · · , , · · · · · · · · · · · , """ ```