BTD6bot 1.0.0
BTD6bot v1.0.0
Features
-
new plans added + updated all the existing ones for BTD6 Update 54
- every single map has now a Chimps plan available, including the newest one (mushroom_grottoHardChimps)
- non-Chimps plans added (thanks @busy-duck )
- #ouchHardAlternate
- party_paradeHardAlternate
- party_paradeHardStandard
- all supported plans can be found here
-
added Linux support
- tested all core functionalities on Linux Mint 22.3 (Xfce) and Debian 13.4 (with GNOME)
- naturally testing hasn't been as thorough as it's been for Windows. However the code has also required very minimal changes which suggests the codebase is already quite stable for Linux
- updated the install markdown file from only scripts to a general install guide. It also includes a Linux section which lists some very important install/setup dependencies
- just like with Windows version, you can either follow manual installation steps or use the auto-install script file "install.sh"
- tested all core functionalities on Linux Mint 22.3 (Xfce) and Debian 13.4 (with GNOME)
Tooling
-
added simple internal debugging support which can be used in tooling scripts (see "debug_plan" tool below)
-
added support for easy sandbox difficulty plans with plan_nameEasySandbox. These should only be used for quick testing
-
added
debug_plantool and its script files:- has two modes: "static" for static tower position checks and "setup" for setting up static testing environment
- what do these mean:
- static = tower position don't change between round on map. This means maps like Geared or Sanctuary don't work
with this - setup = a bit complex and has its own readme file located in the tool directory. Idea is to be able to use challenge
editor to create a map state of any turn in a plan file and continue from there. For example instead of testing
why plan seems to fail at round 90 in Chimps by running the actual plan, tool will run all plan commands until the
desired round is reached while also skipping pauses, ability uses etc. making it very fast. However this isn't
still a perfect copy because- again only static positions are supported -> Gearer, Sanctuary and similar maps cannot be tested
- total income needs to be manually calculated and used as starting cash value
- heroes don't gain xp so they must be manually leveled up. Required cash needs to be added on top of
round cash. Also level up will only allow full levels while in-game there's also experience gained
between rounds. So exact level + xp is often impossible to match, but it's all that's available for now.
- static = tower position don't change between round on map. This means maps like Geared or Sanctuary don't work
- in the future it would be useful to add at least dynamic tower position checking.
- but dynamic setups are not really possible to automate unless sandbox mode adds automatically incrementing
rounds (stopping between rounds instead of auto-forward actually matters). Best way to simulate this would then
be to place towers down on start round, set sandbox round to desired round, use show_coordinates tool to save all
coordinates in a new plan file and use 'setup' or just do manual testing - finally: using debug_plan generates a super-simple DebugLogs.txt file into btd6bot root directory
TL;DR:
- use 'static' for testing static tower placements -> game state must be in main menu screen, then you just run
debug plan_name static - use 'setup' for starting plans from a specific round with static tower placements -> use challenge editor, setup starting round + cash, start challenge and run
debug plan_name start {start_round} {hero_level}where args with {} are optional - dynamic placements/setups currently not possible
Bug fixes
scripts
- tested .sh scripts on Linux and made following adjustments:
- remove chmod +x. This didn't make sense because it has to be called on a script before it can be even executed
- also fixed some typos to avoid errors with copying .sh files and running venv virtual environments
gui
- change gui icon from .ico to .png format to prevent missing icons + code-level issues on Linux platforms
- change main and monitoring window's width + height for Linux platforms in order to fit button and image elements properly
- fixed main and monitoring window image display black background bug if current map uses a png image but the next one doesn't
- fixed queue window 'add plan' hotkey. Should now properly check 'Shift' key condition before characters
- fixed roundplot errors on Linux by changing multiprocessing start method from "fork" to "spawn"
bot
- fixed crash when using numpad keys as hotkeys
Code
- github CI tools should now properly update plans and helpwindow images/readme automatically when changes are pushed into dev branch
- fixed some Python type and linting issues caused by differering github CI and local environments
- updated code base with Python's code formatting tool Black, specifically its Visual Studio Code extension, using 120
line length. This makes code more standardized + a bit easier to read and maintain.- most notably change is normalizing all single quote strings to double quote strings
- all of this has been applied to plan files as well. This however is not required nor enforced in future plan files:
these are pretty much just long if-elif blocks and don't need to follow strict formats.
So single quotes for example are perfectly fine: they're faster to write anyway. - code formatting might still be revisited in the future, but current style is good enough
- another linting tool called "ruff" is already used in CI, but it's mostly used to spot inconsistencies like bugs. Thus:
- black = standandized formatting
- ruff = additional linting/formatting checks to prevent uninteded code behavior,
- both enforce the maximum line length limit for this project which is 120
Other
-
added future updates section to README
TL;DR:- future updates will be just adding new maps/monkeys/heroes + making other UI changes (e.g. if text/button locations change)
- bot works just fine and has all the features it was originally meant to have + more. Any future updates would
instead fix some of the existing code + add a proper plan file format to replace Python files.
-
updated README.md in general. There's probably still some old information which is not relevant anymore, but at least the most important parts should be up-to-date now.
Full commit history can be found here
Older version notes and patches can be found under Pull Requests