Skip to content

Feature/bugs and extra modules#11

Open
ToonDawg wants to merge 8 commits intoSnoopLawg:mainfrom
ToonDawg:feature/bugs-and-extra-modules
Open

Feature/bugs and extra modules#11
ToonDawg wants to merge 8 commits intoSnoopLawg:mainfrom
ToonDawg:feature/bugs-and-extra-modules

Conversation

@ToonDawg
Copy link
Copy Markdown

@ToonDawg ToonDawg commented Jan 1, 2025

Yo! A bit of a bigger PR here that fixed 2 issues I was having. I wasn't able to comment on the PR lines to explain my thoughts, so Ill just do it here.

  1. Opening AutoPy script took about 1min because of the recursive search in APP Settings folder to get the "raid.exe" path. I got way to much junk in my app settings folder. I've changed it to search likely paths first before doing a search in the root app settings folder.
  2. The shop buy wasn't working because of UI updates for Christmas. I've changed the 'theMarket.png' image to just have the market text.
  3. I've added a text box to show logs in the TK UI so I can see whats going on easier.
  4. I've added modules for FW, Doom Tower and Iron Twins
  5. On original load it expects a box to come up before it will load the script. I was having issues when doing dev and the game was already open. I've added a check to see if we are in the bastion by looking for the battle button.
    image

Cheers mate!

Market wasn't searching becuase of the Christmas UI. AutoPY was taking 1min to load because I have millions of files in Local App Data
Comment thread Modules/PyAutoRaid.py
# Log screen resolution
logger.info(f"Detected screen resolution: width={self.width}, height={self.height}, primary={main}")

if main: # Only consider the primary monitor
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have two different sized monitors and this error kept kicking off for me even though my main is set to 1920x1080.
moving the main check up here fixed it for me.

Comment thread Modules/PyAutoRaid.py
logger.info("Starting focused search for Raid.exe...")
appdata_local = os.path.join(os.environ['LOCALAPPDATA'])
raid_feature = "Raid.exe"
for root, dirs, files in os.walk(appdata_local):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this change made my start up time go from 1min to 2s

Comment thread Modules/PyAutoRaid.py
try:
# Attempt to locate the image
if pyautogui.locateOnScreen(exit_add_image, confidence=0.7) is not None:
if pyautogui.locateOnScreen(exit_add_image, confidence=0.7) is not None or pyautogui.locateOnScreen(home_battle_button, confidence=0.7):
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If exit image wasn't on the screen it would loop here without the tk ui popping up. Now I also check for being on the bastion without a pop up by looking for the battle button

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've realised this one might not be the intention you had. Is it supposed to attempt to escape so the exit button comes up and then close to make sure we are in the bastion without popups?

@SnoopLawg
Copy link
Copy Markdown
Owner

@ToonDawg I appreciate the work , and am looking to refactor a lot of this very soon. I will review all of this and love your additions. Thanks for the help!

@ToonDawg
Copy link
Copy Markdown
Author

Hey man! No worries. I haven't looked at this or tried it in a while. It may be risky PR now. Specially with the shop updates and stuff. I'm happy to close it

@SnoopLawg
Copy link
Copy Markdown
Owner

No I pulled this PR and testing. I was wanting to do these things but got busy. Im sure we can get this working and add it to the functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants