hgjazhgj

FGO-py is an image-recognition bot that automates Fate/Grand Order battles and farming on the Chinese, Japanese, US, and Taiwanese servers from Windows or an adb-connected Android device.

v0.0.0
Published at
Apr 19, 2023
2,065
Stars
25,493
Download
Synced at
8h ago

The author no longer ships through GitHub Releases, but the repository is still active (last push Sep 19, 2026). Get the latest version from: Project homepage

Latest release

v0.0.0Apr 19, 2023, 12:29 PM
Downloads slow? Switch the source anytime above

README

Project Overview

Grinding Fate/Grand Order means tapping skills, picking cards, and refreshing supports for hours, and FGO-py replaces those fingers with image recognition. It captures the battle screen over adb, reads HP, NP, and skill cooldowns, then fires skills and Noble Phantasms, picks cards, and consumes apples as the fight develops. The same backend drives a Qt6 desktop window, a CLI, and a WebUI, and it covers the Chinese, Japanese, US, and Taiwanese clients.

Item Value
Platform Windows, Linux, macOS, Android via AidLux, Docker
Language Python 3.11
Interfaces Qt6 GUI, CLI, WebUI
Servers Chinese, Japanese, US, Taiwanese
License AGPLv3

Start the script, go to sleep, and let it spend the whole stamina bar.

Core Commands

  • python fgo.py: starts the Qt6 graphical interface
  • python fgo.py cli: opens the text interface with the full feature set
  • connect /bs5: connects to BlueStacks 5 and reads the adb port from the registry
  • main: farms the current node until stamina runs out
  • main -s 8:00:00: runs again eight hours after the current battle ends
  • 169: forces the device resolution to 16:9
  • screenshot: captures the current frame for building support templates

Key Features

  • Automatic combat: reads HP, NP, and cooldowns, then handles skills, Noble Phantasms, card selection, and apple use
  • Support filtering: matches friends against PNG templates in fgoImage/friend, falling back to the first entry
  • Planned sorties: works through a node queue with per-node run counts, where 0 means keep going until stamina is gone
  • Weekly missions: reads the weekly objectives and picks the cheapest node combination
  • Summons and mail: rolls the friend point and event pools, claims mail EXP cards, and upgrades Craft Essences
  • Three interfaces: the Qt6 GUI, CLI, and Flask WebUI share one backend
  • Multi-server: takes over the Chinese, Japanese, US, and Taiwanese clients
  • Localized UI: ships Chinese, English, and Japanese translation files

Target Audience

  • Players farming FGO materials long term
  • Users clearing stamina overnight
  • Players on Chinese, Japanese, US, or TW servers
  • Tinkerers extending the recognition rules
  • Players automating weekly missions

Quick Start

  1. Install Python 3.11 and run pip install -r requirements.txt in the project root
  2. Start an emulator or connect a phone, then confirm adb devices lists the target
  3. Disable skill use confirmation in game and put the target node first in the node list
  4. Run python fgo.py, pick the device, and press the farm button
  5. For unattended runs use python fgo.py cli, enter connect /bs5, then run main
  6. On non-16:9 screens run 169 to fix the resolution, then reconnect the device
  7. Edit fgoConfig.json to change retreat on defeat, bond Craft Essence handling, and push notifications

System Requirements

Item Requirement
OS Windows 10 and above, Linux, macOS, or Android via AidLux
Python 3.11 with UTF-8 mode
Game resolution 1280×720 or an integer scale of it
Connection adb over USB or TCP
Main dependencies PySide6, airtest, Flask, pulp, matplotlib
License AGPLv3

Notes

  • Fixed resolution: templates are cut at 1280×720, so other resolutions need the 169 command or the full-screen adaptation in the GUI
  • Game setting: skill use confirmation must be off, or the popup interrupts every skill
  • Weekly mission limits: automation only solves defeat-N-enemies objectives, while lineup and terrain missions stay manual
  • License obligations: AGPLv3 requires redistributed modifications to stay open, but the images and metadata are not released under it

Release history

Sort