Simple StarCraft 2 Python Bot Template To Get Started

Drekken
December 8, 2024

If you’ve watched ProBots and thought, “I’d love to build a bot, but where do I even start?” you’re in the right place. The new python bot template makes it dead simple to jump into StarCraft 2 bot development—even if you’ve never touched game AI before.

This template won’t take you straight to the finals, but it’s a launchpad: fast setup, simple config, and you’ll be mining minerals with your own bot in minutes.


Quick Start

Prerequisites

Linux with Lutris?

Set these environment variables for best results (replace paths as needed):

export SC2PF=WineLinux
export SC2PATH="/home/YOUR_USERNAME/Games/battlenet/drive_c/Program Files (x86)/StarCraft II/"
export WINE="/home/YOUR_USERNAME/.local/share/lutris/runners/wine/YOUR_WINE_VERSION/bin/wine"

1. Clone the Template


2. Set Up Your Environment


3. Configure Your Bot


4. Run Your Bot

python run.py

If setup is correct, SC2 will launch and your bot starts mining minerals.


Customizing and Competing


Upgrade Path: Ares Framework

Want more advanced strategy and control? Upgrade to Ares-sc2 with one command:

python upgrade_to_ares.py

You’ll need to update your bot class and use super() calls in your hooks. Full guide in the repo README.


Questions? Hit reply. Happy bot building.