Commit Graph
30 Commits
Author SHA1 Message Date
Riddle c68d92c8e1 Merge branch 'master' of https://github.com/aeon0/botty into nip-to-bnip 2022-06-24 13:36:53 -04:00
Riddle 076737672e Merge branch 'master' into nip-to-bnip 2022-06-24 13:36:31 -04:00
Gleed c62c237442 Bugfix: template_finder.search_all() messing with input arguments (#931)
* init

* remove print
2022-06-23 14:53:58 -04:00
Gleed 197ff41e69 Fix Fix: template_finder.search() tests were terminating after first "assert" 2022-06-23 13:42:39 -04:00
Riddle d5bdb769b3 Replace nip with bnip 2022-06-22 05:37:54 -04:00
Riddle 24d2da8e67 Added better expections for bnip 2022-06-22 04:24:04 -04:00
Gleed 4a0396fe81 Enhancement: Replace pather.adjust_abs_range_to_screen() with ui_manager.get_closest_non_hud_pixel() (#908) 2022-06-19 15:06:15 -04:00
Gleed 5127417bd3 Major feature: NTIP pickit syntax integration, OCR pickit, OCR item property filtering (#724)
By @Riddle1001 @Ezro @mgleed @D2RLegit Sosa
2022-06-16 09:46:14 -04:00
mgleed 27ebd1b4db Refactor: TemplateFinder() (#770)
* init, wip

* time to test

* remove unused dataclass

* tests passing, just need to run in-game

* fix wait logic

* add threading lock, delete excess funcs

* start putting best_match back in to search_and_wait()

* bugfixes, found a bad template

* scope

* fix npc detect
2022-05-18 01:35:27 -04:00
mgleed 99778ea51f Refactor: Use class objects for mobs for mob checking (#767)
* init, wip

* refactor mob_check, wip

* update hammerdin

* fix hammerdin
2022-05-13 16:18:13 -04:00
mgleed 3e6521c2e6 Bugfix: Fix local pather pytest, update log to accommodate mob detect change (#766)
* init

* fix

* refactor
2022-05-13 16:15:43 -04:00
jobithuandmgleed 648d42ed84 Feature: Mob Detection for Chaos Sanctuary Hammerdin (#598)
* added mob detection to CS to speed up runs

* refactoring - redemption does not work

* remove unused filterimage param for template_finder.search_and_wait

* get rid of selfs, add live view within mob_detection.py

* mobcheck(self) -> mobcheck()

* cleanup, img as an arg to mobcheck

* prefix functions for encapsulation, cleanup redundant code

* simplify further

* trim

* simplify live-viewer, move

* corrected liveviewer -- opencv hue ranges to 180 not to 255

* rename funcs

* consolidate live-view into target_detect.py

* silly ide

* fix nonetype error

fox nonetype error - but no mobs are detected anymore :(

* script runs, but fails to deteect mobs

* add pytest for target detection, fix target sorting

* revert info_ss

* running now! added "mercwait" to debug runtime

* added testing back to pather.py

* update pytest, discrete blue/green filtering, cleanup code

* fix NoneType, add negative test

* consolidate tests

* fix oopsie

* add config param

* fix config param

* fixed atk sequences & logging spam

ready to merge after my final 2 tests

* undo bad import

Co-authored-by: mgleed <[email protected]>
2022-05-12 07:03:29 -04:00
mgleed e879514846 Tests: Added template match tests (#753)
* init

* rename vars

* fix best match

* update per review
2022-05-09 05:00:15 -04:00
mgleed 9b22917660 Refactor: UI overhaul (#558)
Summary of changes:
-Rearranged many UI-related functions across the codebase (particularly in ui_manager.py) into individual components. See src/ui_components/. Functions related to components can be called like if waypoint.use_wp("Arcane Sanctuary"): or loading.wait_for_loading_screen(2.0)
-Removed Screen and TemplateFinder dependencies across the codebase
-Screen functions separated from class
-TemplateFinder made into a singleton
-Added generic ScreenObject UI functions to simply detect UI elements on screen; e.g., detect_screen_object(ScreenObjects.TownPortal), wait_for_screen_object(ScreenObjects.Loading, 2). Also included related functions like select_screen_object_match(template_match) to automatically select the match.
-Consolidated assets. Organized templates folder into components. Adjusted some asset ROI's and alpha channels.
-Changed some template searches to grayscale for speed
-Reworked save/exit routine, should now be more consistent and faster with normal exit, chicken exit, and death exit.
-Got rid of unused and consolidated duplicate game.ini parameters
-spelling fix _last_merc_healh
-NPC manager class removed and replaced with functions
-D2 window detection now runs on its own thread for semi-live window position offsets.
-Character selection reworked. OCR your selected character for fun (not that accurate, lol)
-Simplified game start and difficulty select
-Added a get experience function, but this is not called anywhere yet
-Reworked corpse pickup. pickup_corpse is no longer a necessary argument/parameter throughout the codebase (bot.py, game_controller.py, runs, etc.)
2022-02-20 18:49:04 -05:00
Vladimir MakaevandVladimir Makayev 6b1e155197 Support Gem Transmuting (#491)
Co-authored-by: Vladimir Makayev
2022-02-04 17:58:41 -05:00
RB-Developmentaeon0mgleed
551a547ddb Advanced pickit (#383)
* logic for ident, first attr. advanced pickit

* logic advanced vs normal pickit

* logic_empty_ID_Tome

* small adj. to fit PR

* converted yaml to ini. changed some val.

* changed param to auto_ident

* pickit integration

* added set in routine

* reset bot init value

* bugfix

* removed old id logic

* added_nested_filter

* changed pickit

* bugfix replace

* added some more props

* Cleanup

* cleanup

* cleanup

* started unittests

* unittest

* small pickit adjustments

* Added missing fct. after merge

* bugfix due to static method in config.py

* added comments in pickit.ini

* Update pickit.ini

* Update params.ini

* Update ui_manager.py

* Update pickit.ini

Co-authored-by: aeon0
Co-authored-by: mgleed
2022-01-30 19:40:36 -05:00
aeon0 27f0e3d793 Revert "Add Linting (#487)" (#490)
This reverts commit 5e1a783394.
2022-01-28 18:24:47 +01:00
aeon0 5e1a783394 Add Linting (#487)
* add black linting

* fix linting

* doc update
2022-01-28 17:47:03 +01:00
aeon0 2eb9f84520 Make config static and global (#451) 2022-01-14 23:22:22 +01:00
aeon0 39dd868a34 Fix testing (#437)
* test

* with coverage

* add back coverage

* actually fixing test

* ups typo
2022-01-12 19:52:26 +01:00
aeon0 c8b59c338b Startup speedup (#432)
* etheral

* devision by zero

* force move in a2

* Only one template finder instance
2022-01-11 21:21:19 +01:00
aeon0 9339a3b432 Test utils misc load_template() (#396) 2022-01-05 11:42:34 +01:00
egut125 430b6f5394 Forgot the test name change 2021-12-30 23:52:09 -05:00
aeon0 69ba480c08 Add ItemFinder unittests (#342)
* Sort items by relevance

* add item finder test
2021-12-28 15:56:06 +01:00
aeon0 7eef36c2df Add Tests and Coverage report (#341) 2021-12-28 14:40:28 +01:00
aeon0 aaae0ac41c Dont click on merc icon (#331) 2021-12-25 08:08:41 +01:00
aeon0 ea74a3b43f Only use stash tab and wp tab if needed (#259)
* Clean up imports & move files

* Only use stash tab and wp tab if needed

* break circular imports
2021-12-11 11:50:35 +01:00
aeon0 71debec858 Run Health and Death Manager parallel to Bot (#160)
* Run Health and Death Manager parallel to Bot

* fix test
2021-12-01 17:45:05 +01:00
mgleedandaeon0 fdcdd90b43 Auto offset (#120)
* automatically calculate offsets, not-yet working

* space

* space

* float to int

* working

* clean

* clean2

* auto adjust windowed mode depending on screen res and botty res

* clean screen instance, fix tests

* remove test png

Co-authored-by: aeon0 <[email protected]>
2021-11-26 23:26:42 +01:00
aeon0 ce498893d3 add first test 2021-11-14 07:51:40 +01:00