# Dev Docu
## Dependencies
- Install miniconda (https://docs.conda.io/en/latest/miniconda.html)
- Install git (https://gitforwindows.org/)
## Getting started
```
git clone https://github.com/aeon0/botty.git
cd botty
conda env create environment.yml
python src/run.py
```
## Building from source
If you want to build a .exe from source you will have to first add the cv2 path to your PYTHONPATH:
Edit System environment variables -> Enfironment Vriables... -> PYTHONPATH -> C:\Users\$USER\miniconda3\envs\botty\lib\site-packages\cv2
```python
# building .exe and bundeling all needed resource into one folder
python release.py
```
## Folder Structure
**/**
In the root is docu, param files and development specific stuff such as .gitignore
**assets**
Contains all data for the project that is not source code
**assets/docs**
Images you can see in the .md files and logos
**assets/items**
Screenshot of item names that should be picked up. The filename must then be added to the param.ini
**assets/npc**
Templates of npcs in different poses
**assets/templates**
Templates for different UIs and key points. Also contains folders of "pathes" that were generated with the utils/node_creator.py
**src**
All python source files go here
**src/char**
Want to implement a new char or build. Check this folder out. You will have to inherit from IChar and go from there
**src/char**
Utilities functions and scripts e.g. for easily creating templates to traverse nodes and automatically generate code for it
## State Diagram
The core logic of the bot is determined by a state machine with these states and transations. The bot.py which contains all of the transitions should have little implementation code which should be hidden as much as possible in the "manager" classes.
## Coordinate System
There are different coordinate systems used and I tried my best to add these to the variable names.
**Monitor**: It will have the origin at the top left of the first monitor
**Screen**: Same as monitor for single monitor setups, otherwise origin at top left of the screen
**Absolute**: Has its origin at the center of the screen, thus at the footpoint of your char
**Relative**: Relative coordinates as the name suggest are relative to something. It is mostly used to express relative coordinates in relation to a tempalte that is found