diff --git a/README.md b/README.md index e0de4e3..ec6509e 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,9 @@ Open up D2R and wait till you are at the hero selection screen. Make sure the ch ### 5) Start Botty Download the a prebuilt release [here](https://github.com/aeon0/botty/releases). Start `run.exe` in the botty folder, go to D2R window and press the "resume" key. Move to your D2R window and press "f11". You can always force stop botty with f12. +## Development +Check out the [development.md](development.md) docu for infos on how to build from source and details of the project structure and code. + ## param.ini [general] | Descriptions --------------------------------|--------------------------------------------- @@ -94,9 +97,9 @@ redemption | Hotkey for redemption --------------------------------|--------------------------------------------- item_type | Select "1" if item should be picked up, "0" if not. -# Some distant future plans +## Some distant future plans - Running chaos with AI algo - Emulating Keyboard and Mouse with Arduino -# Support this project +## Support this project This project is free. Support it by contributing in any technical way, giving feedback, PRs or by submitting issues. That being said, I am not above accepting some pixel currency :) So if you want to send some fg my way to keep my dopamine high, here is my jsp: [jojo22](https://forums.d2jsp.org/user.php?i=768967). diff --git a/assets/docs/coordinate_systems.png b/assets/docs/coordinate_systems.png new file mode 100644 index 0000000..fbd827b Binary files /dev/null and b/assets/docs/coordinate_systems.png differ diff --git a/assets/docs/logo.png b/assets/docs/logo.png index 4eff71f..534e9c1 100644 Binary files a/assets/docs/logo.png and b/assets/docs/logo.png differ diff --git a/development.md b/development.md index c700b60..40e68f7 100644 --- a/development.md +++ b/development.md @@ -1,4 +1,55 @@ # Dev Docu -Will come soon. In the meantime, here is a nice state diagram :) - +## 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
+