Before reading the instructions, please be aware that this project is not maintained anymore. I found that after each update of Bloons TD 6, all images of buttons, heroes and skills would be outdated. To still use the bot, please create your own snippets of those images and replace the ones in ./resources/
. If the flow of the menus was not changed, this should still work with the new images.
The BloonsTD6Bot is a farming bot for the popular tower defence game Bloons TD 6. It is intended to be used to farm Insta-Monkeys during time-limited events such as Easter or Halloween. Bot navigation is done through fuzzy image matching.
The bot is able to finish the map Dark Castle on easy difficulty, standard mode in less than 6 minutes. At the time of creation, this was the fastest way to farm Insta-Monkeys.
- Bloons TD 6 on Steam
- Python3
- (OPTIONAL) Create a Python virtual environment:
$ python -m venv btd6bot
- (OPTIONAL) Activate the virtual environment
- Windows:
$ btd6bot\Scripts\activate.bat
- Unix & MacOS:
$ source btd6bot/bin/activate
- Windows:
- You might need to upgrade setuptools:
$ pip install setuptools -U
- Install requirements:
$ pip install -r requirements.txt
Starting the bot can be done using the following steps:
- Run Bloons TD 6 from Steam, windowed, with a resolution of 1600x900 and leave it at the home menu
- Run the bot:
$ python dark_castle.py
for map Dark Castle - During the initialisation of this bot, switch to the Bloons TD 6 game so it is the top most window and place your mouse on the top left corner of this window
The bot will now navigate the menu and start the game.
Remark: have the commandline and BTD6 open on the same monitor.
This is a known issue of pyautogui
.
Stopping this bot, while it is clicking or searching the screen, is done in two ways:
- Move mouse to the top-left corner of the screen. This activates the failsafe of
pyautogui
. You can read more about this failsafe here. Ctrl+C
in the commandline window
Enjoy!
- JSP