Skip to content

Bot Installation Setup Guide

Pbatch edited this page Aug 2, 2024 · 4 revisions

Wiki: Bot Installation Setup Guide


Prerequisites

  • Ensure PowerShell (Windows) or Bash (Linux) is ready to use.
  • Have administrative access if needed.

Step 1: Open a Shell

  • Windows: Open PowerShell.
  • Linux: Open Bash.

Step 2: Clone the Repository

  • Clone the repository using the command:
    git clone https://github.com/Pbatch/ClashRoyaleBuildABot.git

Step 3: Enter Repository Directory

  • Navigate to the bot directory:
    cd ClashRoyaleBuildABot

Step 4: Create a Virtual Environment

  • Set up a Python virtual environment to manage dependencies:
    python -m venv crbab-venv

Step 5: Activate the Virtual Environment

  • Activate the environment to isolate your project:
    • PowerShell (Windows):
      crbab-venv\Scripts\Activate.ps1
    • CMD (Windows):
      crbab-venv\Scripts\Activate.bat
    • This activation will modify your shell prompt to include (crbab-venv).

Step 6: Install Dependencies

  • Install the necessary project dependencies:
    pip install .[cpu]

If you are confident that your GPU will work with ONNX, then you can use .[gpu] instead of .[cpu].

  • For development purposes, install the pre-commit hooks:
    pre-commit install

Testing the Bot

Now, let’s verify that the bot operates correctly:

  • Ensure you're in the Clash Royale lobby.
  • Start the bot using:
    python main.py

Important Note

  • Always ensure your virtual environment (crbab-venv) is activated each time you start the bot.