steve1316 / granblue-automation-pyautogui

Educational application aimed at automating user-defined workflows for the mobile game, "Granblue Fantasy", using a variety of CV technologies in the backend such as OpenCV, PyAutoGUI and EasyOCR and a frontend coded in Typescript.
https://github.com/steve1316/granblue-automation-pyautogui/wiki
120 stars 36 forks source link

RoTB Farming Mode Exception #42

Closed PortablePanda closed 3 years ago

PortablePanda commented 3 years ago

Hello! When I try to use the RoTB Farming Mode, I get this error as the bot fails to find and click the event header.

0:00:04 [INFO] Initializing settings for Rise of the Beasts Extreme+...
0:00:04 [INFO] Initializing settings for Rise of the Beasts Extreme+...
0:00:04 [INFO] Settings initialized for Rise of the Beasts Extreme+...
0:00:04 [SUCCESS] Bot's current location is at HOME.
0:00:04 [INFO] Bot is at the Home screen.
0:00:05 [SUCCESS] Bot's current location is at HOME.
0:00:05 [DEBUG] Attempting to find and click the button: "home_menu".
0:00:05 [SUCCESS] Found the HOME_MENU button at Point(x=520, y=109).
0:00:07 [DEBUG] Failed to detect any occurrences of EVENT_BANNER images.
0:00:08 [DEBUG] Failed to detect any occurrences of EVENT_BANNER_BLUE images.

0:00:08 [ERROR] Bot encountered exception in Farming Mode: 
Traceback (most recent call last):
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\game.py", line 1239, in start_farming_mode
    self._map_selection.select_map(farming_mode, map_name, mission_name, difficulty)
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\map_selection.py", line 1076, in select_map
    self._navigate_to_rotb(mission_name, difficulty)
  File "D:\Desktop\granblue-automation-pyautogui-main\bot\map_selection.py", line 796, in _navigate_to_rotb
    self._game.mouse_tools.move_and_click_point(banner_locations[0][0], banner_locations[0][1], "event_banner")
IndexError: list index out of range

0:00:08 ################################################################################
0:00:08 ################################################################################
0:00:08 [FARM] Ending Farming Mode.
0:00:08 ################################################################################
0:00:08 ################################################################################
steve1316 commented 3 years ago

Oh, thats weird. Let me fix that real quick.

steve1316 commented 3 years ago

Okay, can you try again with this now? Did not realize that image asset was off a bit cause I was so used to using my Android bot instead.

PortablePanda commented 3 years ago

Well, now it seems as if it can't find the bottom of the summon page, so it won't ever reroll for a new summon. I was searching for Grimnir and there were multiple 0* copies, but none were chosen, and the bot didn't go to trial to refresh them.

I also can't post a log because I have to alt+tab and alt+f4 to kill the process when it gets stuck like that, sorry.

steve1316 commented 3 years ago

Thank you for reporting this. This was an old flaw related to the summon system that I already fixed in the Android version but forgot to port it back to this Python version. Fix will be out very soon.

steve1316 commented 3 years ago

Just updated the bot, bringing over the changes from the Android version to this. Let me know how it goes!

PortablePanda commented 3 years ago

Seems all good, thank you as always!