Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea for custom team-comps #10

Open
RomeoAlphaEkko opened this issue May 2, 2024 · 12 comments
Open

Idea for custom team-comps #10

RomeoAlphaEkko opened this issue May 2, 2024 · 12 comments

Comments

@RomeoAlphaEkko
Copy link

teamplaner
2-star
3-star

instead of Checking for heavenly it checks for 2-star, 3-star and the green Penguin for those chosen champions from the teamplaner

why 2 and 3-star, cause the teamplaner is not shown once one needs to star up

@akshualy
Copy link
Contributor

akshualy commented May 2, 2024

Solid idea. For the "star up", I'd like to cut out the stars and see if we can get transparency to work. (IIRC you were able to do this with opencv and numpy, but I'd have to read up on it again.) Otherwise I feel like matching won't be clear enough.

@RomeoAlphaEkko
Copy link
Author

As they blink they might be overlooked once or twice but it worked prior to vanguard with those pings (not android)

@RomeoAlphaEkko
Copy link
Author

Solid idea. For the "star up", I'd like to cut out the stars and see if we can get transparency to work. (IIRC you were able to do this with opencv and numpy, but I'd have to read up on it again.) Otherwise I feel like matching won't be clear enough.

i wanted to try getting the images and test them but i didnt get the teamplaner working, i cut it out normally, next time i used gimp for the picture to have the dpi from the emulator settings worked neither, what can i do (to help)

@akshualy
Copy link
Contributor

You have to get an Emulator where you can take screenshots with the emulator, I know BlueStacks and LDPlayer have a "take a screenshot" button in the right navigation menu. Editing the images with GIMP is a good idea, other programs may remove some information. Other than that I can't really tell you what to do, as that's exactly what I do. In the actual logic, you can try to play around with the capture area and precision.

@RomeoAlphaEkko
Copy link
Author

RomeoAlphaEkko commented May 12, 2024

Tx I try it with the emulator screenshot tomorrow

edit: used the screenshot function of the emulator, once cut it to size with gimp the other train with paint, both didnt work T_T

@akshualy
Copy link
Contributor

Could you upload the images you're trying to use here?

@RomeoAlphaEkko
Copy link
Author

Screenshot_2024 05 14_08 50 17 603
renamed heavenly to just replace the image of the trait searched for and not mess witht he code (thought it was the easiest way to check if the image worked

@akshualy
Copy link
Contributor

akshualy commented May 14, 2024

Then the issue is probably that the trait check logic checks below the area where that icon would show, see here:

Alune/main.py

Lines 134 to 140 in 089b962

for trait in config.get_traits():
search_result = screen.get_on_screen(
image=screenshot,
path=trait,
bounding_box=BoundingBox(170, 110, 1250, 230),
precision=0.9,
)

Updating that bounding box to start from Y 0 will probably fix it

@RomeoAlphaEkko
Copy link
Author

well you know where to look 😒

well i fail either:

bounding_box=BoundingBox(0, 0, 0, 0),

or

bounding_box=BoundingBox(0),

let the program just close

@akshualy
Copy link
Contributor

akshualy commented May 14, 2024

It's X1 Y1 X2 Y2, so the fix would be BoundingBox(170, 0, 1250, 230). If you want to play it safe, double-check pixel positions on a screenshot taken by the emulator.

@RomeoAlphaEkko
Copy link
Author

tried counting it BoundingBox(170, 20, 1150, 70),

as it didnt shop first try neither do my values, i reduced the precision to 0.8 didnt work either T_T

@akshualy
Copy link
Contributor

akshualy commented May 14, 2024

Additionally, this line may be an issue, the store card boxes are not that big to avoid misclicks:

Alune/main.py

Line 147 in 089b962

if not store_card.click_box.is_inside(search_result.get_middle()):

You can instead of search_result.get_middle() try Coordinate(search_result.x + search_result.width, search_result.y + search_result.height) (or write a method inside of ImageSearchResult called get_bottom_right that returns that coordinate.)

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

No branches or pull requests

2 participants