Skip to main content

Automation helpers for the Revomon Android game running under BlueStacks, built on top of the Bluepyll automation framework.

Project description

RevomonAuto

A powerful automation framework for the Revomon Android game, built on top of the Bluepyll automation framework. RevomonAuto provides comprehensive UI automation, battle intelligence, and game data access for Revomon.

Python Version License

๐ŸŽฎ Features

Automation Capabilities

  • Full App Lifecycle Management: Automated app opening, closing, and login sequences
  • Menu Navigation: Navigate all main menus and submenus (Wardrobe, Bag, Friends, Settings, Revodex, Market, Discussion, Clan)
  • PVP Queue Management: Enter and exit PVP queues automatically
  • Battle Automation:
    • OCR-based move extraction with PP tracking
    • Health monitoring via pixel analysis
    • Pluggable battle strategies (Random, Custom AI)
    • Auto-run from battles (background thread)
  • TV/PC Navigation: Search and select Revomon in storage
  • Action Tracking: Full audit trail with state diffs for debugging

Battle Intelligence

  • Real-time OCR: Extract mon names, levels, HP percentages, and moves
  • Move Validation: Filter moves by PP availability
  • Strategy Pattern: Extensible battle AI system
  • Health Bar Analysis: Pixel-based HP calculation

Game Data Access

17+ specialized client libraries for querying game data:

  • RevomonClient: Search by name, type, ability
  • MovesClient: Physical, special, and status moves
  • BattleMechanicsClient: Damage calculation, type effectiveness, team coverage analysis
  • EvolutionClient: Evolution trees and optimal path finding
  • WeatherClient: Weather synergy analysis
  • StatusEffectsClient: Status condition strategy
  • TypesClient, ItemsClient, NaturesClient, LocationsClient, and more

๐Ÿ“‹ Requirements

  • Python: 3.13 or higher
  • Operating System: Windows (BlueStacks integration)
  • BlueStacks: Android emulator
  • ADB: Android Debug Bridge (included with BlueStacks)

๐Ÿš€ Installation

We recommend using uv for package management.

Install as a dependency

uv add revomonauto

Development Setup

# Clone the repository
git clone https://github.com/IAmNo1Special/RevomonAuto.git
cd RevomonAuto

# Install dependencies with uv
uv sync

# Run the example
uv run examples/main.py

Using pip

# Clone the repository
git clone https://github.com/IAmNo1Special/RevomonAuto.git
cd RevomonAuto

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
pip install -e .

# Run the example
python examples/main.py

๐ŸŽฏ Quick Start

Basic Automation

from bluepyll import BluePyllController
from revomonauto.models.revomon_app import RevomonApp

# Initialize
revomon_app = RevomonApp()
controller = BluePyllController(apps=[revomon_app])

# Start BlueStacks and open app
controller.bluestacks.open()
controller.revomon.open_revomon_app()

# Login sequence
controller.revomon.start_game()
controller.revomon.login()

# Navigate menus
controller.revomon.open_main_menu()
controller.revomon.open_menu_bag()
controller.revomon.close_menu_bag()
controller.revomon.close_main_menu()

# Enter PVP queue
controller.revomon.enter_pvp_queue()

Battle Automation

# Wait for battle to start, then automate
while True:
    if controller.revomon.is_in_battle_scene():
        # Open attacks menu
        controller.revomon.open_attacks_menu()
        
        # Choose a random move
        controller.revomon.choose_move()
        
        # Or use a custom strategy
        from revomonauto.models.strategies import BattleStrategy
        
        class AlwaysFirstMove(BattleStrategy):
            def select_move(self, valid_move_names):
                return valid_move_names[0]
        
        controller.revomon.choose_move(strategy=AlwaysFirstMove())

Auto-Run from Battles

# Enable auto-run (runs from all battles automatically)
controller.revomon.toggle_auto_run()

# Your automation continues while battles are automatically escaped
# ...

# Disable when done
controller.revomon.toggle_auto_run()

Game Data Access

from revomonauto.data.gradex_clients import (
    RevomonClient,
    MovesClient,
    BattleMechanicsClient,
    EvolutionClient
)

# Initialize clients
revomon_client = RevomonClient()
moves_client = MovesClient()
battle_client = BattleMechanicsClient()

# Find Revomon by type
fire_types = revomon_client.get_revomon_by_type("fire")
print(f"Fire types: {[r['name'] for r in fire_types[:5]]}")

# Get all status moves
status_moves = moves_client.get_status_moves()

# Analyze team type coverage
team = [
    revomon_client.get_revomon_by_name("gorcano"),
    revomon_client.get_revomon_by_name("blizzora")
]
coverage = battle_client.analyze_type_coverage(team)
print(f"Type coverage: {coverage['overall_coverage']:.1%}")

# Find optimal evolution path
evolution_client = EvolutionClient()
paths = evolution_client.find_optimal_evolution_path(
    target_stats={"spa": 1.0, "spe": 0.7},
    max_evolutions=3
)

๐Ÿ“ Project Structure

RevomonAuto/
โ”œโ”€โ”€ src/revomonauto/
โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”œโ”€โ”€ revomon_app.py       # Main automation controller
โ”‚   โ”‚   โ”œโ”€โ”€ states.py            # GameState and BattleState enums
โ”‚   โ”‚   โ”œโ”€โ”€ action.py            # Action tracking system
โ”‚   โ”‚   โ”œโ”€โ”€ strategies.py        # Battle strategy implementations
โ”‚   โ”‚   โ””โ”€โ”€ revomon_ui/          # UI element definitions
โ”‚   โ”‚       โ”œโ”€โ”€ assets/          # Image assets for UI matching
โ”‚   โ”‚       โ”œโ”€โ”€ elements/        # UI element definitions
โ”‚   โ”‚       โ””โ”€โ”€ screens/         # Screen object models
โ”‚   โ””โ”€โ”€ data/
โ”‚       โ””โ”€โ”€ gradex_clients/      # Game data client libraries
โ”œโ”€โ”€ examples/
โ”‚   โ”œโ”€โ”€ main.py                  # Full automation workflow
โ”‚   โ””โ”€โ”€ example_client_usage.py # Data client examples
โ”œโ”€โ”€ tests/                       # Unit tests
โ”œโ”€โ”€ pyproject.toml               # Project configuration
โ””โ”€โ”€ README.md                    # This file

๐Ÿง  State Management

RevomonAuto uses a dual state machine system for robust automation:

GameState

  • NOT_STARTED, STARTED - Login flow
  • OVERWORLD - Free roaming
  • MAIN_MENU - Menu overlay
  • MENU_BAG, WARDROBE, FRIENDS_LIST, SETTINGS, REVODEX, MARKET, DISCUSSION, CLAN - Submenus
  • PVP_QUEUE - Waiting for PVP match
  • BATTLE - In combat
  • TV - PC/storage interface

BattleState (Sub-state when in BATTLE)

  • IDLE - Can attack, use bag, or run
  • ATTACKS_MENU_OPEN - Move selection visible
  • BAG_OPEN - Bag menu visible
  • WAITING_FOR_OPPONENT - Turn being processed

State validation is enforced via the @requires_state decorator:

@requires_state(GameState.BATTLE)
@action
def choose_move(self, strategy=None):
    # Only executes if in BATTLE state
    ...

๐ŸŽฒ Creating Custom Battle Strategies

Extend the BattleStrategy abstract base class:

from revomonauto.models.strategies import BattleStrategy
from revomonauto.data.gradex_clients import MovesClient, TypesClient

class SuperEffectiveStrategy(BattleStrategy):
    def __init__(self, opponent_type):
        self.opponent_type = opponent_type
        self.moves_client = MovesClient()
        self.types_client = TypesClient()
    
    def select_move(self, valid_move_names):
        # Get move objects
        moves = [self.moves_client.get_move_by_name(name) 
                 for name in valid_move_names]
        
        # Find super-effective moves
        for move in moves:
            effectiveness = self.types_client.get_effectiveness(
                move['type'], self.opponent_type
            )
```python
# Execute actions
controller.revomon.open_main_menu()
controller.revomon.enter_pvp_queue()

# Review action history
for action in controller.revomon.actions:
    print(f"Action: {action['action_name']}")
    print(f"Status: {action['status']}")
    print(f"State changes: {action['state_diff']}")

Example output:

Action: open_main_menu
Status: True
State changes: {
    'game_state': {'prev': 'OVERWORLD', 'new': 'MAIN_MENU'}
}

๐Ÿงช Testing

# Run tests with uv
uv run pytest

# Run specific test
uv run pytest tests/test_choose_move.py

# Run with coverage
uv run pytest --cov=src/revomonauto

๐Ÿ”ง Configuration

Create a .env file in the project root (not tracked by git):

# BlueStacks configuration
BLUESTACKS_PATH=C:\Program Files\BlueStacks_nxt\HD-Player.exe
ADB_PATH=C:\Program Files\BlueStacks_nxt\HD-Adb.exe

# Game credentials (optional, for auto-login)
REVOMON_USERNAME=your_username
REVOMON_PASSWORD=your_password

โš ๏ธ Important Notes

Game Terms of Service

  • Use at your own risk: Automation may violate Revomon's Terms of Service
  • Account safety: No guarantees against detection or bans
  • Recommendation: Use on alternate accounts and add human-like delays

Limitations

  • Scene detection: May require manual intervention in some scenarios
  • OCR accuracy: ~95% accuracy, occasional errors in move/name detection
  • State synchronization: Uses fixed delays (1 second) which may need adjustment
  • Battle end detection: Manual input currently required to detect battle completion

๐Ÿ—บ๏ธ Roadmap

  • Background scene detection thread
  • Robust PVP queue state detection
  • Battle end detection
  • Error recovery and retry logic
  • Comprehensive test suite
  • CI/CD pipeline
  • Performance optimization (reduce sleep delays)
  • Docker support

๐Ÿค Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Follow existing code style and patterns
  4. Add tests for new functionality
  5. Update documentation as needed
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

Development Setup

# Clone your fork
git clone https://github.com/YOUR_USERNAME/RevomonAuto.git
cd RevomonAuto

# Install development dependencies
uv sync --all-extras

# Run tests
uv run pytest

# Run linter
uv run ruff check .

# Format code
uv run ruff format .

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Bluepyll Framework: Core automation capabilities
  • Revomon Community: Game data and mechanics information
  • Contributors: All those who have contributed to this project

๐Ÿ“ž Support

โšก Advanced Examples

Multi-Account Farming

accounts = [
    {"username": "account1", "password": "pass1"},
    {"username": "account2", "password": "pass2"}
]

for account in accounts:
    # Login with different account
    controller.revomon.login(account)
    
    # Enable auto-run
    controller.revomon.toggle_auto_run()
    
    # Farm for 1 hour
    time.sleep(3600)
    
    # Logout
    controller.revomon.quit_game()

Team Optimization

from revomonauto.data.gradex_clients import (
    RevomonClient, EvolutionClient, BattleMechanicsClient
)

# Find Revomon with best special attack evolution path
evolution_client = EvolutionClient()
paths = evolution_client.find_optimal_evolution_path(
    target_stats={"spa": 1.0, "spe": 0.8, "spd": 0.6},
    max_evolutions=3
)

# Build a balanced team
battle_client = BattleMechanicsClient()
team = build_balanced_team(paths[:6])

# Analyze coverage
coverage = battle_client.analyze_type_coverage(team)
print(f"Team covers {coverage['covered_types']}/{coverage['total_types']} types")

Disclaimer: This project is not affiliated with or endorsed by Revomon. Use at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revomonauto-0.3.2.tar.gz (63.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

revomonauto-0.3.2-py3-none-any.whl (63.9 MB view details)

Uploaded Python 3

File details

Details for the file revomonauto-0.3.2.tar.gz.

File metadata

  • Download URL: revomonauto-0.3.2.tar.gz
  • Upload date:
  • Size: 63.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for revomonauto-0.3.2.tar.gz
Algorithm Hash digest
SHA256 06f26d540cf065cf2d52bf49cbc1021f7224d5d385affa827a8ee7531eefdde8
MD5 109d1d30910253f22100bad80a4acc5a
BLAKE2b-256 4acaace0f93ef4c935e2386d44d850075bb85e79e289bf57842a37bee0fd24fe

See more details on using hashes here.

File details

Details for the file revomonauto-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for revomonauto-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4dd5733b22ec97cae2d07766e683c2af9ddfcaa4848e9f17348eab40f42e34b
MD5 cf6cb10414ce6eeca496f06f92e6c7ed
BLAKE2b-256 8a5347b0f45296cda57a26121b3fad901ee06844a52c03c4136fd43058e484d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page