A Python-based tool for tracking resource nodes and mob locations in Pantheon using OCR and in-game macros. The script captures in-game data displayed on your screen and organizes it into CSV files. Additionally, it provides the option to upload resource node data to a REST API.
- Node Tracking: Captures harvested node data (e.g., wood, minerals) with location coordinates.
- Mob Tracking: Records mob locations in the game world.
- CSV Output: Saves node and mob data into separate CSV files.
- API Upload: Optionally uploads node data to a configurable API.
- Configurable: Settings such as monitor region, API key, and CSV file locations are saved in a configuration file for easy reloading.
- GUI Interface: User-friendly interface for setting up, starting, and stopping the tracking process.
- Python 3.8+
pytesseract(Tesseract OCR)pynput(for mouse input)pyautogui(for screenshots)Pillow(for image processing)requests(for API interaction)
Make sure Tesseract is installed and accessible on your system:
- Windows: Download Tesseract
- Linux: Install via your package manager (e.g.,
sudo apt install tesseract-ocr).
-
Clone the Repository:
git clone https://github.com/yourusername/pantheon-tracker.git cd pantheon-tracker -
Install Dependencies:
pip install -r requirements.txt
-
Setup Tesseract:
- Ensure Tesseract is installed.
- Update the
setup_tesseractfunction inmain.pyif Tesseract's path differs on your system.
-
Run the Script:
python main.py
-
Select Region:
- Click the "Select Region" button in the GUI.
- Click the top-left and bottom-right corners of the area where the game displays
Your locationand mob/node messages.
-
Set File Locations:
- Use the Settings tab to specify CSV file paths for node and mob data.
-
Enable/Disable Features:
- Use the checkboxes in the Settings tab to enable or disable API uploads, node tracking, and mob tracking.
-
Start Monitoring:
- Click "Start Monitoring" to begin capturing data.
-
Stop Monitoring:
- Click "Stop Monitoring" to end data capture.
The script generates a config.ini file to save your settings, such as:
- API Key: For uploading node data to an API.
- Monitor Region: The selected screen region for OCR.
- File Paths: Paths for node and mob CSV files.
- Feature Toggles: Enable or disable API upload, node tracking, or mob tracking.
Create a macro in-game:
/loc
/con
/loc
/zonename
Use a simple macro:
/loc
/zonename
- URL:
https://shalazam.info/api/v1/resources - Method:
POST - Authorization: Use an API key in the
Authorizationheader.
{
"resource": {
"loc_x": 3000,
"loc_y": 2000,
"loc_z": 500,
"name": "Apple Tree"
}
}| Item | X | Y | Z |
|---|---|---|---|
| Apple Tree | 3230.8 | 472.39 | 3672.02 |
| Mob Name | X | Y | Z |
|---|---|---|---|
| Fire Beetle Hatchling | 3230.8 | 472.39 | 3672.02 |
-
Tesseract Not Found:
- Ensure Tesseract OCR is installed and its path is configured correctly in the
setup_tesseractfunction.
- Ensure Tesseract OCR is installed and its path is configured correctly in the
-
Duplicate Entries:
- The script checks for duplicates using a threshold of ±10 units in coordinates.
-
Screen Region Issues:
- Use the "Select Region" feature to set the correct OCR area.
Feel free to submit issues or pull requests to improve this project.
This project is licensed under the MIT License.