PVPokeLossBot icon indicating copy to clipboard operation
PVPokeLossBot copied to clipboard

Bot revamp

Open daminokun opened this issue 4 months ago • 0 comments

This pull request introduces major improvements to the bot's reliability, image matching, user experience, and documentation, especially around ADB (Android Debug Bridge) connectivity and usage. The highlights include robust ADB status checking, refactoring of ADB command execution, enhanced documentation for Windows users, and improved bot logic for image matching and tapping. These changes make the bot easier to set up and less error-prone, especially for new users.

ADB Connectivity Improvements

  • Added src/adb_checker.py with functions to check ADB installation, connected devices, and device communication, including comprehensive status messages and a device wait loop. This allows the bot to verify ADB readiness before running, reducing setup errors.
  • Refactored src/adb_commands.py to use subprocess.run for all ADB commands (tap, keyevent, screen off), with proper error handling and logging for failures/timeouts, improving reliability and debuggability.

Bot Logic and Usability

  • Updated src/bot.py to support skipping ADB checks (for advanced users), implemented frame-skipping via screenshot hashes to avoid redundant actions, and improved image matching/tapping logic to select the best match with y > 296. [1] [2]

Documentation and User Guidance

  • Expanded README.md with detailed Windows setup instructions for adding ADB to PATH, clarified bot startup and connectivity requirements, described new command-line options (--skip-adb-check), and provided updated output examples and troubleshooting tips. [1] [2]
  • Added instructions for customizing the forfeit delay and clarified known issues (e.g., bot not catching Pokémon after encounters).

Platform Tools and CI

  • Added configuration files for platform tools (platform-tools/mke2fs.conf, platform-tools/source.properties) and a GitHub Actions workflow for deploying the Jekyll site to GitHub Pages, including Google site verification. [1] [2] [3]

These changes collectively improve the bot's robustness, make setup easier for new users, and add advanced options for experienced users.

daminokun avatar Sep 08 '25 11:09 daminokun