Kyrluckechuck / TFT-Bot

Automate Teamfight Tactics (TFT) for token/mission farming. Updated for Set 8.5!
GNU Affero General Public License v3.0
51 stars 7 forks source link
automation bot opencv pyautogui teamfighttactics teamfighttactics-bot tft tft-bot

Python TFT Auto Battler Bot

Imports: isort

[!NOTE] While this bot has served it's purpose, with the release of Vanguard it no longer makes sense and is actually a liability against any accounts it's run by, even when only run as source code.

As such, a few bot writters have joined forces to develop a new bot, that should be immune to most of the detection methods they employ thanks to it targetting TFT Mobile.

Please see Alune to continue your TFT botting needs!

While this bot should continue to work for the time being, it is unsafe and not recommended.

To everyone who has supported / followed this bot, I really apprecaite you and hope to see you in Alune!

This is an auto TFT bot, with some decent logic built in.

Some features of this bot:

How stable is this you might ask? I recorded this screenshot after a couple days if it running straight, and the battlepass XP matches 😜

image

Usage / Settings

Optional: Install Tesseract-OCR & Enable economic decision-making

By default, or if we could not find tesseract on your system, the bot will use a straight-forward logic of constantly leveling, rolling and buying units. To change this, we support economic decision-making backed by reading the accurate value of your gold from your screen. However, this requires Tesseract-OCR to be installed, which you can download a pre-built Windows installer for here. For this bots purpose, you can deselect everything in the components to install to only install the bare minimum.

After you have downloaded and installed Tesseract-OCR, set mode under economy to ocr_standard in the config.yaml.

The bot will (at its next start-up) attempt to detect where Tesseract is installed.

If that does not work, please manually override it in the config.yaml.

Configuration

If you want to use frequent settings / "set it and forget it", you can do so by editing the config.yaml file in the data folder (exe: %APPDATA%\TFT Bot, python/source: .\output\). If you don't see the file or folder, start the bot once, and it should be created.
You can set the following settings:

The settings are explained in more detail in the file itself.

The priority for configuration is as follows:

  1. CLI Arguments - Anything passed directly in the command-line takes the highest priority
  2. Configuration - Anything set in the configuration file
  3. Fallback default - Default values the developers deemed sensible

Installation (for source):

Note: The data folder is ./output when running the python script directly.

Troubleshooting:

Common Issues:

If running from source:

If your issue isn't listed here, please create an issue, including the log file located at
%APPDATA%\TFT Bot\tft-bot-debug-TIMESTAMP.log (running from release/executable) or
output\tft-bot-debug-TIMESTAMP.log (running from Python),
and any relevant screenshots or information that may help speed up resolving your issue.

Info / Why I forked it

I've fairly heavily forked this from what it originally was, but if you'd like to see the original, I'm not claiming to have made this from scratch:

I decided to fork this after being frustrated with the lack of updates and/or features, and the delay it would take in getting PRs merged even if the work is done by the community. I had been using this modified script for a while now, but realized I may as well formally fork & upload it since it's been fairly stable.

To be clear I don't blame Detergent13 at all, I just have different feelings about what belongs in the bot / envisions for what this could become.

For example:

On that note, if anyone has any suggestions / features they would like to see, please feel free to suggest in an issue, or by submitting your own PR to this!

Contributing

Please follow the steps in Installation (for source) first.

After you have installed the project locally and have made (and tested) your changes, please make sure that your changes are formatted correctly.

To do so, you can either permanently install a hook that runs before all of your commits with pre-commit install, or run it once with pre-commit run --all-files.

When opening a PR, please describe your changes and why you made them.