BloonsTD6_Farming is a fully automated toolkit designed for resource farming in Bloons Tower Defense 6. This Python-based tool leverages PyAutoGUI and OpenCV to perform efficient in-game actions and image recognition, enabling streamlined gathering of monkey money and leveling up for monkey knowledge.
Inspired by the strategy outlined in "BEST Way To AFK FARM Monkey Money - BTD6" by GameSteed, this tool adapts and enhances the method for improved efficiency and compatibility with the latest version of BTD6.
- Python 3.x: Ensure you have Python 3.x installed. Python installation tutorial.
- macOS environment: This toolkit is designed to run on macOS.
- Bloons Tower Defense 6 game: Have the game installed.
- Screen resolution: Set to 1280 x 720.
- Game Mode: Unlock Expert - RAVINE map's Easy Mode's DEFLATION mode.
- Monkey Upgrades: Unlock Monkey Village 3-2-2, Monkey Ace 2-0-3, Alchemist 4-0-1, and Bomb Shooter 0-3-1.
- Hotkeys: Use default hotkeys in BTD6 for consistency.
- Give Permission: Ensure your Python environment or IDE has the necessary permissions to control your computer. This includes enabling both Accessibility and Screen Recording under the Security & Privacy settings in macOS.
- Sound and Graphics (Optional): Mute game sounds and reduce graphics effects for a smoother experience.
- Install Git (if not installed) from git-scm.com.
- Clone the repository:
git clone https://github.com/zw-g/BloonsTD6_Farming.git
. - Install required Python packages:
pip install -r requirements.txt
.
Follow these steps to automate resource farming in BloonsTD6:
- Start the Game: Launch BloonsTD6 and ensure you're on the screen with the "Play" button visible.
- Run the Script: Execute the
/macOS/main
or/windows/main
script from your Python IDE. - Let It Run: Sit back and allow the script to automate gameplay. Ensure BloonsTD6 remains the active window.
- Stopping the Script: To stop the automation, use
Command + C
in your terminal or click the stop button in your IDE.
Important Note: After initiating the script, avoid interacting with your computer. The script requires BloonsTD6 to be the focused window and will automatically select it at the start.
This script has a pre-configured setup for DEFLATION mode in BloonsTD6. You can customize the monkey placement and upgrades in the setup_monkeys(self)
method within main.py
. If you're unfamiliar with these settings, it's advisable to use the default configuration. Experienced players may wish to experiment with different settings.
- Change Monkey: Use
pyautogui.press('hotkey')
where 'hotkey' is the keyboard shortcut for the desired monkey (e.g., 'k' for Monkey Village). - Change Placement: Modify the
x, y
coordinates in the script to reposition the monkey. - Upgrade Skills: Utilize the keys
,
,.
and/
for upgrade paths 1, 2, and 3 respectively. - Number of Upgrades: Alter the
presses
parameter to set the number of skill upgrades.
# Example showing how to place the Monkey Village's at x=2830, y=800 and upgrade paths
# Note: In BTD6, you can only upgrade two paths for each monkey.
pyautogui.press('k')
pyautogui.click(x=2830, y=800, clicks=2, interval=0.5)
pyautogui.press(',', presses=3, interval=0.5)
pyautogui.press('.', presses=3, interval=0.5)
pyautogui.press('/', presses=3, interval=0.5)
This tool is intended for educational purposes. Users should employ it responsibly and in accordance with the game's terms of service.
- Enjoying BloonsTD6_Farming? Share it with your friends!
- We value your input! Share your experiences, report issues, or make suggestions for improvements by joining the discussion. Your feedback is instrumental in making this tool better for everyone.