Closed Tilde88 closed 6 years ago
Sorry, forgot to include the other GIF with python running. Here it is
Hi, I need a screenshot of your phone with the calcy IV dialog showing.
Here is the screenshot... Sorry, forgot to send the main thing you asked for...
@Azelphur it's in the original zip file.
@Tilde88 it's the check_calcy_iv_img
that probably tries to find pixels with predefined grey values in the wrong zone. As I've understood it, it tries to detect those grey pixels in the bottom of the screen to check if icons are there (which means CalcyIV succeeded):
Simple solution is to change
y1
and y2
values, but in fact, there will still have some problems if one of those icons are "active" (with colors instead of grey). So a better solution would be to detect CalcyIV succeeded differently (I'm thinking trying to check if attack, defense and stamina icons are there).
@marob you are correct, that's exactly how it does it.
Detecting the Calcy IV dialog is a bit of a PITA.
Originally I was detecting the gray on one of the buttons (checking a single pixel) - this worked until my friend had a different UI scale on his phone, so the pixel wasn't in the same place.
Then I changed it to detecting the border around the Calcy IV dialog - so Calcy IV changed the border to rainbow, yay.
Then I've started using this new method searching for the colors within the box as you have shown, which I think works great but clearly needs a little tweaking in this case. I'll be running his screenshot through the calcy IV check and seeing why it fails, and then addressing the issue shortly. I imagine you're probably right and the bounding box just needs a little adjustment.
The check should still pass if one or more of the icons are active, it searches for a list of colors and as long as it finds at least one pixel with each of those colors, the check will pass. So as long as at least one of the buttons isn't active, it should be good.
Checking the defense and stamina icons probably isn't the best way to go about it, those attack/defense/health icons don't always appear, and even if they did, we'd still be using the same color detection method that I use on the icons I imagine. Searching for an image within an image is easy. Searching for a variable resolution image inside a variable resolution image, I don't know how to do that. :)
@Tilde88 issue was caused as your device has a software nav bar, so it pushed everything out of alignment. I just added something which should detect your nav bar and adjust everything to suit. Can you download the latest version and give it another test, and let us know if it's working now? :)
Thanks guys. I have been having quite a week, and not too much time. The moment I am able to test, I will report. I want to mention one more thing @Azelphur . I use KCAL on my phone (screen color control). However, this should be post-processing. Do you expect that to have some sort of issue with the pixel detection?(i saw what you were saying about detecting colors). I guess we won't know until I try
Thank you very much, as well as @marob for your input. Hopefully I can try today :)
That's interesting, it could we'll do - it depends if the screenshots are effected. If the screenshots have their colour altered then it would most likely break things
@Tilde88 based on the screenshot you provided, and on the code I'm currently working on for detection improving, it seems colors are not affected in the screenshot (I guess it is the same with the "night" feature that lowers blue on some phones).
@marob that's interesting, what are you planning to do detection wise?
@Azelphur So... I downloaded the latest version. Well now when it clicks the button... It works!!! :D
Well done, sir! I cannot thank you enough!
@Azelphur
x
coordinate depending on the pokemon name lengthy
position of the "rename button"I'll soon push everything to my github.
Regards
Greetings! I am the poster that was on youtube with the issue, where it simply continues to click the CalcyIV button over and over. Attached are 3 things:
A GIF of me at the terminal, showing ADB connectivity and python pillow is installed. Additionally, shows what I see as it loops the IV button.
A ZIP containing a recording of what I see on my phone. (I tried to send it direct as MP4, but it required to be a ZIP to attach).
And finally, a copy-paste of what is at my terminal.
Thank you so much for this project, and even more for your assistance. I highly appreciate it :)
VID-20180509-WA0003.zip
output.txt