Repository navigation
Installation Instructions
Click the image below to watch the installation & tutorial video. The video covers every step of the process after installing Starcraft and Visual Studio.
- To download the source code, simply clone the repo to your machine
UAlbertaBot is currently being maintained using Visual Studio 2013, which is required to open the project file and build the source code. Visual Studio 2015 has been released, but UAlbertaBot has not yet been tested with it and the project file is still being actively maintained in Visual Studio 2013.
List of Prerequisites for Bot Compiling:
Note: Install BWAPI and BWTA after you have installed and patched Starcraft to version 1.16.1. The BWAPI installer copies files to the Starcraft directory which are required to run BWAPI bots, and this will not be performed if you install it first.
Note: I recommend installing BWAPI and BWTA to directories without spaces in the directory name. This is due to a Visual Studio error when including libraries from directories with spaces which come from windows environment variables. Please change the default BWAPI install location from Program Files to a folder that does contain any spaces. For ease of use I recommend creating a folder on your drive called c:\libraries\ and installing both BWAPI and BWTA to that location.
The UAlbertaBot project files use Windows Environment Variables to point to its required BWAPI and BWTA libraries. You must edit your windows environment variables to point to the installation directories chosen for those libraries.
List of Required Windows System Environment Variables:
-
BWAPI_DIR- BWAPI 4.1.2 installation root directory -
BWTA_DIR- BWTA 2.2 installation root directory
How to edit Windows environment variables
- Right click
My Computer(This PCin Windows 10) - Click
Properties - Click
Advanced System Settings - Click
Environment Variables - Click
New... - Enter the variable name on top and the associate directory on bottom

- Open
UAlbertaBot/VisualStudio/UAlbertaBot.slnin Visual Studio 2013 - Edit the
onStart()function inUAlbertaBotModule.cppso that the call toparseConfigFile()points to where the UAlbertaBot configuration file exists on your machine. If you do not point to the correct location, UAlbertaBot's default settings will be used and an error message will print on game start. - Select
Releasemode - Build the UAlbertaBot project (all projects will be built)
- Compiled .dll will go to the
UAlbertaBot/bindirectory
- Install Starcraft: Broodwar and upgrade it to version 1.16.1
- Install BWAPI 4.1.2 from the link above.
- Ensure
Chaoslauncher.exeandStarcraft.exeare set up to run as Administrator. Right click the .exe file, selectProperties>Compatibility> checkRun as Administrator - Run
Chaoslauncher.exe(comes with BWAPI) - Modify Chaoslauncher's BWAPI config to point to the compiled
UAlbertaBot.dll
- In Chaoslauncher click the
BWAPI 4.1.2 Injector [RELEASE]option and make sure that it is checked - Click the
Configbutton near the bottom - Edit the
aiparameter to point to yourpath/to/UAlbertaBot.dll - Make sure to save the text file after editing
- Edit the UAlbertaBot configuration file to your liking
- Run StarCraft using Chaoslauncher
- To test the bot, start a game using
Single Player>Expansion>Play Custom, select any standard multiplayer map and useMeleesettings to start. Note: The bot will not work with more than one opponent or in the single player campaign. Make sure to set the bot race to Protoss if you are using the default configuration.
Note: If when you run UAlbertaBot it seems to be hanging, this means BWTA is parsing the map file for the first time. Please leave a minute or two to finish its analysis. This will only happen one time per map, as BWTA will save the data locally on disk after it finishes.
Note: If you get an error message that libgmp-10.dll or libmpfr-4.dll as missing it's because you didn't copy the BWTA2 dll files into your Windows directory, go back and follow the installation instructions
If you run into any issues while running the bot, please check the Common Issues and Solutions page for help.
Debugging errors in a BWAPI bot can be very challenging. Luckily you can make use of Visual Studio's debugger to set break points and step through your code when errors occur. To debug UAlbertaBot:
- Follow the above
How to Compileinstructions but selectDebuginstead ofRelease - The debug version of UAlbertaBot will go to
UAlbertaBot\bin\UAlbertaBot_d.dll - Follow the above 'How to Run` instructions with the following modifications
- In Chaoslauncher click the
BWAPI 4.1.2 Injector [DEBUG]option and make sure that it is checked. Also make sure that the[RELEASE]option is unchecked - Click the
Configbutton near the bottom - Edit the
ai_dbgparameter to point to yourpath/to/UAlbertaBot_d.dll - Edit the
pause_dbgparameter toON. This will pause Starcraft at the menu until it detects that you have correctly attached the Visual Studio Debugger to the Starcraft process - Open the UAlbertaBot project as Administrator
- Under the
Debugmenu clickAttach to Process...while Starcraft is running - Select
Starcraft.exeand click theAttachbutton. This may take a minute the first time you do it as it is loading all the debug symbols - If you chose
auto_menuin the BWAPI configuration, Starcraft will detect that the debugger is attached and start the game. If you are not usingauto_menuyou can now start the game normally - The debugger is now attached, you should see a red
Stopbutton in Visual Studio. You can now create break points by clicking to the left of the line number in the text editor (a red dot should appear)
