Skip to content

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Growtopia Bots

Automation scripts for the repetitive parts of Growtopia: breaking, harvesting, collecting seeds and blocks, and planting them back.

Setup

pip install -r requirements.txt
python calibrate.py     # required, with Growtopia open
python get-block-v2.py  # then run whichever bot you want

Bots click fixed screen positions and match the images in assets/, so both are tied to your resolution, window mode and UI scale. Nothing works until you calibrate, and you must re-run calibrate.py whenever any of those change.

Stopping a bot

Switch to any other window. Alt-tab, click another app, or minimise the game and the bot stops within 150ms, releasing every key and button it was holding.

Closing the terminal works too, but skips that release, so a held key can stay stuck at the OS level. Prefer alt-tabbing.

The bots

Script What it does
break.py Breaks blocks
harvest-provider.py Harvests a provider
harvest-tree.py Harvests trees
get-seed-v1.py / get-block-v1.py Collects seeds / blocks, world TYANDEL
get-seed-v2.py / get-block-v2.py Collects seeds / blocks, world ANEDSD
put-seed-v1.py / put-block-v1.py Plants seeds / places blocks, world TYANDEL
put-seed-v2.py / put-block-v2.py Plants seeds / places blocks, world ANEDSD
wrench-marker.py Labels each platform level
wrench-portal.py Sets each portal's destination

The v1 bots are built for the world TYANDEL and the v2 bots for ANEDSD. The v2 bots also ask whether you are farming chand or ftank. The two worlds look like this:

ANEDSD TYANDEL
ANEDSD TYANDEL

Calibration

calibrate.py writes config.json and re-crops assets/. Hover over each target and press F8 to capture, F9 to keep the current value, Esc to quit (what you captured is still saved). Hotkeys are global, so the terminal does not need focus. Originals are backed up to assets/_backup/ the first time.

It opens with a menu so you can redo one part: 1 everything, 2 everything except images, 3 images only, 4 probes, 5 vend bands, 6 placement.

What ends up in config.json:

Key Meaning
points Click targets: respawn, tool slot, inventory, dialog buttons
probes A pixel and the colour that means "portal here", used to count levels
alignment The x-bounds to stand between to reach each vending machine
placement How far to the side a block is placed, and where along the platform
scroll Wheel notches needed to scroll a panel; find yours with tune-scroll.py

min_x and max_x are easiest to understand as pictures. They are the leftmost and rightmost points where placing is still allowed:

min_x max_x
min_x max_x

The committed values are windowed-mode leftovers and will not work in fullscreen.

Helper scripts

  • check-assets.py — which template images still match the screen
  • tune-scroll.py — sends wheel notches one at a time so you can count them
  • get-coordinates.py — mouse position
  • get-pixel.py — colour under the mouse
  • get-image.py — where a given asset currently matches

keyboard needs an elevated prompt on some setups.

About

Python screen-automation bots that farm, harvest, and build in Growtopia using template matching and calibrated click targets.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages