Viir / bots

Programming bots to play video games
https://botlab.org
MIT License
165 stars 135 forks source link

stuck on an action #51

Closed nathanmcr closed 1 year ago

nathanmcr commented 2 years ago

stuck on "Current activity: Waiting for completion of task 'setup-2': Setup: Search the address of the UI root in process 43684" will not change.

Viir commented 2 years ago

Is this related to any of the bots or other apps in this repository?

ls400hurdles commented 2 years ago

Whats happening is the asteroid selected gets mined out before you get to 99% The icon greys out but does not fully disappear from the console and when you right-click it nothing happens. this confuses the bot and keeps it in an endless look instead of selecting the next rock in the list to right-click and mine

Viir commented 2 years ago

Whats happening is the asteroid selected gets mined out before you get to 99% The icon greys out but does not fully disappear from the console and when you right-click it nothing happens.

@ls400hurdles What do you think about adapting your bot to filter the list of overview entries before picking one to click on? You could filter out the ones which appear "greyed out". Does that solve your issue?

Viir commented 1 year ago

We solved this with the additional filter in clickableAsteroidsFromOverviewWindow added in https://github.com/Viir/bots/commit/318273217db41b8f80110ad7e8dc40be937ec7ff

clickableAsteroidsFromOverviewWindow =
    overviewWindowEntriesRepresentingAsteroids
        >> List.filter (.uiNode >> uiNodeIsLargeEnoughForClicking)
        >> List.filter (.opacityPercent >> Maybe.map ((<=) 50) >> Maybe.withDefault True)
        >> List.sortBy (.uiNode >> .totalDisplayRegion >> .y)

image