M9A Documentation

website·Indexed 32 days ago

https://1999.fan/zh_cn

Documentation for M9A, a Reverse: 1999 assistant based on MaaFramework v5.1+. Includes user manuals for setup and connection settings, development guides for custom modules and pipeline writing, and detailed data protocols for combat, warehouse inventory, and activity data.

Tokens
33.4K
Snippets
108
Records
254
Agent score
51%

What's inside M9A

  1. Overview of M9A Automation Assistant

    M9A is an automation assistant for the game 'Reverse: 1999' (亿韭韭韭). It utilizes image recognition technology and simulated control to automate in-game tasks. The project is built upon the MaaFramework, an automation black-box testing framework based on image recognition. It is compatible with Windows, Linux, and macOS and is developed using Python.
    # GitHub Repository
    https://github.com/MAA1999/M9A
  2. Overview of Warehouse Inventory Task Architecture

    The WarehouseInventory task scans the materials page in the warehouse to identify the quantity of items based on pre-configured templates. The results are persisted to config/warehouse_inventory.json.

    Key Files

    • tasks/WarehouseInventory.json: Task entry definition (group: daily).
    • resource/base/pipeline/warehouse_inventory.json: Pipeline flow (Enter Warehouse → Confirm Tab → Scan → Exit → Return to Main).
    • agent/custom/action/warehouse_inventory.py: Core logic for WarehouseInventoryScan (scanning, OCR, and JSON output).
    • data/combat/items.json: Material data source (grouped by rarity).
    • resource/base/image/Warehouse/Item-<id>.png: Template images for TemplateMatch.
    • config/warehouse_inventory.json: Output snapshot of item counts (git-ignored).
  3. Overview of the Warehouse Inventory task

    The WarehouseInventory task scans the warehouse material page to identify all materials with available templates and records their quantities. The resulting data is written to config/warehouse_inventory.json, which serves as a snapshot for features like auto-replenish and material shortage hints.
  4. Overview of Mirror酱 distribution platform

    Mirror酱 is a third-party application distribution platform designed to simplify the update process for open-source applications. It operates on a paid model where revenue is shared with developers, and the platform itself is open-source.
  5. Overview of M9A Reverse: 1999 Assistant

    M9A is an automation assistant for Reverse: 1999 based on the MaaFramework. It utilizes image technology and analog control to automate gameplay. The project is cross-platform, supporting Windows, Linux, and macOS, and is developed using Python.
    # GitHub Repository
    https://github.com/MAA1999/M9A
  6. Download and Select the Correct M9A Version

    Download the latest release from the GitHub Releases page or via Mirror 酱. Select the package based on your OS and architecture:

    OSPackage Pattern
    WindowsM9A-win-x86_64-vXXX.zip
    macOS (Intel)M9A-macos-x86_64-vXXX.tar.gz
    macOS (Apple Silicon)M9A-macos-aarch64-vXXX.tar.gz
    Linux (x86_64)M9A-linux-x86_64-vXXX.tar.gz
    Linux (ARM64)M9A-linux-aarch64-vXXX.tar.gz
    Android (Physical Device)M9A-<version>-arm64-v8a.apk
    Android (Emulator/x86)M9A-<version>-x86_64.apk
    Android (Universal)M9A-<version>-universal.apk

    How to check macOS architecture: Go to Apple Menu $\rightarrow$ 'About This Mac'. If it says Intel, use x86_64; if it says M1, M2, etc., use aarch64.

  7. Warehouse Inventory system architecture

    The Warehouse Inventory system consists of the following components:

    • Task Definition: tasks/WarehouseInventory.json (grouped as a daily task).
    • Pipeline Flow: resource/base/pipeline/warehouse_inventory.json (handles navigation: enter warehouse → confirm tab → scan → exit → return to main).
    • Core Logic: agent/custom/action/warehouse_inventory.py (implements WarehouseInventoryScan including round-trip scanning, OCR, and majority voting).
    • Data Source: data/combat/items.json (defines which materials to scan, grouped by rarity).
    • Templates: resource/base/image/Warehouse/Item-<id>.png (used for TemplateMatch).
    • Output: config/warehouse_inventory.json (runtime quantity snapshot; gitignored).
  8. Select the correct M9A software package for installation

    When downloading M9A, ensure you select the package matching your platform and architecture. The full package follows the naming convention M9A-Platform-Architecture-Version.zip. For most Windows users, the x64 architecture package (M9A-win-x86_64-vXXX.zip) is required, rather than the ARM64 version (M9A-win-aarch64-vXXX.zip).
  9. Understand MaaFramework Pipeline v2 Structure

    A Pipeline describes the execution flow of automated tasks in JSON format. Each node in the pipeline defines three primary components: a recognition algorithm to identify targets, an execution action to perform, and a list of successor nodes to execute next.
    {
        "NodeName": {
            "recognition": {
                "type": "OCR",
                "param": {
                    "roi": [100, 100, 200, 50],
                    "expected": ["Confirm"]
                }
            },
            "action": {
                "type": "Click"
            },
            "next": ["NextNode"]
        }
    }
  10. Understand MaaFramework Pipeline v2 Structure

    A Pipeline is a JSON-based description of an automation workflow consisting of multiple nodes. Each node defines how to identify a target on screen, what action to take upon success, and which nodes to evaluate next. M9A uses the Pipeline v2 protocol (MaaFramework v5.1+), which unifies recognition and action parameters into type and param fields.
    {
        "NodeName": {
            "recognition": {
                "type": "OCR",
                "param": {
                    "roi": [100, 100, 200, 50],
                    "expected": ["确认"]
                }
            },
            "action": {
                "type": "Click"
            },
            "next": ["NextNode"]
        }
    }
  11. AutoPromotion and AutoTrail Architecture Overview

    The system is split into a fixed process layer and a configurable recognition layer. The following files define the system:

    • resource/base/pipeline/activity/auto_promotion.json: Entry scheduling, promotion loops, and auxiliary OCR nodes.
    • resource/base/pipeline/activity/auto_trail.json: Trail scheduling loops.
    • agent/custom/reco/auto_promotion.py: Recognition algorithms for APModeGate (map gates), APPhaseGate (task state reset), and APMapAnalyze (finding stages/stars/swiping).
    • agent/custom/reco/auto_trail.py: Recognition algorithms for ATTrailAnalyze (trail five-states).
    • deps/tools/custom.recognition.schema.json: The master list of all overridable parameters (keys, types, and defaults).
  12. Select the correct M9A download version by platform

    Choose the M9A archive based on your operating system and hardware architecture. For macOS and Linux, you must distinguish between x86_64 (Intel/AMD) and aarch64 (Apple Silicon/ARM). For Android, select the APK based on whether you are using a physical device or an emulator.
    PlatformDownload File Pattern
    WindowsM9A-win-x86_64-vXXX.zip
    macOS (Intel)M9A-macos-x86_64-vXXX.tar.gz
    macOS (Apple Silicon)M9A-macos-aarch64-vXXX.tar.gz
    Linux (x86_64)M9A-linux-x86_64-vXXX.tar.gz
    Linux (ARM)M9A-linux-aarch64-vXXX.tar.gz
    Android (Physical)M9A-<version>-arm64-v8a.apk
    Android (x86 Emulator)M9A-<version>-x86_64.apk
    Android (Universal)M9A-<version>-universal.apk