Terraria AutoFisher is an application designed for non-invasive automation of the fishing process in Terraria. It uses computer vision to look at a certain region of your screen, and virtually presses a mouse key when motion is detected.
This program was tested to be working on Windows 7, Windows 10 and GNU/Linux with XOrg 11. The pre-built Windows executable file should be published in GitHub releases. You can also run this program from source. You should have Python 3 installed.
Incomplete list of required libraries:
opencv-python
pyautogui
PyQt5
configparser
Pillow
To install dependencies run pip install -r requirements.txt
.
At the program startup, a retro-styled window appears.
- This window shows the region the program looks it.
- This window shows white sparkles at places where movement is detected.
- This is the motion sensor. Its value depends on motion preview. When the sensor shows 100%, it means the program thinks that the float is moving.
- Mouse coordinates. It helps you quickly find coordinates of the region of interest on your screen. When fishing starts, this label is replaced by the label of the current program state.
- Name of the currently selected preset. Closer to setting just so you don't overwrite a wrong preset.
- How much time is left until program presses button "drink all potions".
- The coordinates of the center of the scanned region. The size of this region is hardcoded to be 50x50px. Use mouse (4) mouse coordinated to find your region of interest faster.
- Movement threshold is a magic value that determines how much should a pixel change between frames in order to be even considered a movement. When pixel changes more than the threshold, this pixel appears white in the (2) motion preview.
- Sensitivity determines the behaviour of the (3) motion sensor. This is a multiple of the number of
white pixels on (2) motion preview. For example, when sensitivity is
1
, it means that every pixel should be white in (2) motion preview in order for the program to catch a fish. When sensitivity is50
, it means that only1/50
the of the (2) motion preview should turn white in order for program to understand it's time to catch a fish. - Program has functionality to periodically press
B
button in order for terraria character to drink all potions. This is useful for fishing and luck potions, but can be disabled by this checkbox. - Change interval in seconds between drinking potions. AFAIK, fisher potions last for 3 minutes, so I've set the default delay to 185 seconds.
- When you press this button, the program becomes dangerous, because it can now click your mouse. It has protection from spamming clicks, it can only click once per a couple of seconds. If something goes wrong, close the program or click "Stop fishing".
- Save preset to file. All the values we've talked about are saved into file with a name shown on (5) Current preset name label.
- Preset controls. It should be strainghtforward: you can create multiple presets and switch throught
them just by clicking their names. Don't forget to save current preset before switching to a new one,
deleting any preset or switching to other preset. Preset system is poorly tested, so I recommend backuping
the
config.ini
file if you are unsure. By the way, you can edit this file by hand.
DISCLAMER: I'm incredibly bad at fishing language.
- Start Terraria, open your world and head to your fishing site.
- Cast the line. Switch to a fishing rod and click on the water, I mean.
- Start AutoFisher and use its interface to find coordinates of the float (thing that goes blup-blup when a fish eats bait)
- Configure coordinates so that fishing rods' line, float and water surface are visible in preview window.
- Configure the movent treshold just so that small ripples on the water surface are considered as "movements", meaning that corresponding pixels on the movement preview are sometimes white.
- Configure sensivity so that water ripples don't cause 100% on the motion sensor.
- Remove the line from the water before starting AutoFisging.
- Save preset. (not necessary)
- Click "start fishing".
- Cast the line into the whater, but make sure that your mouse cursor doesn't get into the scanned region.
- Observe how AutoFisher behaves. Tweak settings if it doesn't work like expected.
- Equip anti-knockback shield just in case
- Build a fishing shelter so no one disturbs you
- Build a wall so that background doesn't interfere with the program
- Place a couple of torches so that they are not visible in preview area but also so that the room has enough light to be independent from the daylight cycle