Cyrexxis / RokTracker

Open Source Rise of Kingdoms Stats Management Tool. Track TOP X Players of kingdom / alliance / honor leaderboard.
MIT License
47 stars 18 forks source link

Bug Report & Request Features #5

Closed Citrona closed 1 year ago

Citrona commented 1 year ago

Hi,

First of all, congratulations and thank you for the code update that you did quickly, it works on my side. After testing the options of the script I noticed some problems.

  1. When a player is detected as inactive, he is counted twice, which means that he is captured twice. I noticed that the adb stops twice on the same person when it is inactive.
  2. I have scanned a player who has 4777297 T4 killed, but it shows 4177297

Now here are some ideas I had to improve the script:

  1. Store images of inactive people in a folder
  2. When in rok-scanner.log you get an error on a player, make a copy of the profile in a folder to be able to check manually more easily

Thank you very much for the work you do.

Cyrexxis commented 1 year ago

Hello,

Regarding the 2 bugs:

  1. I also noticed that inactives are counted twice because the scrip doesn't scroll enough. This is the same problem I faced with the alliance and honor scanner, but can be fixed by precise scrolling through event sending instead of normal input swipe. But before I switch the main scanner to sending events, I need to test if that works on different setups (currently I only know it working on my main PC. I at least want to know if it also works on my laptop. Maybe you also could help with that by testing the alliance-scanner.py script)
  2. When did that happen? I thought that kind of error got fixed by my preprocessing commit. So please reply if it happened with the script that also scans the rss gathered (that was the same commit). I tested that on my end and during scanning of TOP 600 I never got a Kills / Killpoint mismatch (before that commit I had around 20 people where that happened in the same range).

So now to the 2 improvements:

  1. Currently, there is an option where you get asked if you want to track inactives with screenshots. That saves the inactives in the main directory. If I understand your request correct, you want them in a dedicated folder. That should not be a problem, and I'll add that in the next few commits.
  2. That's a very nice idea to make manually correcting errors much easier. On top of that, it should also be very easy to implement. Probably this can also be achieved in the next few commits.

If you decide to test the alliance-scanner.py script, you can simply use these commands in your powershell (assuming you have your venv already setup and in the folder venv):

.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
python alliance-scanner.py

If you choose alliance as mode the script expects you to be on one of the alliance leaderboard pages, for honor it expects either the global honor per player or the alliance honor per player view.

Cyrexxis commented 1 year ago

Sorry i moved the alliance-scanner test to its own issue for testing (#6) so this issue doesn't get distracted. Please answer over there if you try it out.

Citrona commented 1 year ago

Hello,

Thank you for your complete answer.

Concerning the commit that includes the rss gathered, I got the read error 4177297 instead of 4177297 on this version. As for the errors in the ocr reading there are almost no more, except for some errors in the reading of the alliance tag but nothing disturbing for example: {[TAG] ([TAG]

Cyrexxis commented 1 year ago

Ah ok, well that is interesting, but I am not sure if it can be fixed in that case, because I tried many different things and the current settings and preprocessing worked the best of all. If it turns out that there are many errors, let's say more than 10 in a top 1000 scan I will look into it again, otherwise I think the manual correction should be enough. And yes i don't really know why the scanner sometimes invents new brackets for the tags, but i also would say it's not a big problem.

Thanks for your fast answer.

Citrona commented 1 year ago

Out of 600 entries I only see one error so it's very correct

Cyrexxis commented 1 year ago

Everything from this issue should be dealt with in commit eefa4eff925b56f0fdf58b18d62d08ba8de298e8.

To solve the double inactives, it is now possible to use the "new" scroll method from the alliance-scanner.py (this is the default). Regarding the screenshots, inactives will get saved in inactives/[yyyy-mm-dd]/[uuid]/inactive [000].png and for scan fails the profile and kills screenshot gets saved in manual_review/[yyyy-mm-dd]/[uuid]/[governor id] profil/kills.png.

The UUID is also something new I added just for that purpose, to be able to identify the screenshots that belong to a specific scan, and it also gets appended to the Excel sheet name and gets shown in the first line when starting the script. The side effect of that is also that scan should be overwritten nearly never (only in the very unlikly case that the uuid + kingdom + number of players are all the same)

Citrona commented 1 year ago

I am doing a scan (300/600 atm) with the new scroll method, for the moment no problem, everything works, the inactives are no longer doubled as with the previous scroll method

Edit: Everything went well with the new scoll method, I will try when I have time the old method to see if it is still functional

Cyrexxis commented 1 year ago

I did a scan with top 800 and it seems to work. For every person with wrong kills i got the images and also with the new scrolling method the inactives are only counted once. For the wrong kills it seems to be still the case that it makes more mistakes when the kills are in the range of 3-4 digits.