- Updated Alliance and Honor scanner and added GUI for those
- Improved GUI by showing the user messages if something isn't right
- Now checking if all files are at the expected places
- Improved logging to make error finding easier
Open Source Rise of Kingdoms Stats Management Tool. Track TOP X Players in kingdom / alliance / honor leaderboard. Depending on what you scan the resulting .xlsx will look different:
For kingdom rankings Governor Id, Governor Name, Power, Kill Points, Ranged Points, T1/T2/T3/T4/T5 Kills, Total kills, T4+T5 kills, Dead troops, RSS Gathered, RSS Assistance, Helps and Alliance name will get saved.
For the honor and alliance rankings only the governor name and the score will be saved. Because there is no guarantee that the name is correct a picture of the name will be saved in addition.
This is a heavily modified version of the original tool from nikolakis1919 in the repository https://github.com/nikolakis1919/RokTracker
There are two ways of installing and using the scanner. The first is an exe file with no need for other software to be installed. This approach is described under simple installation. The second way of using the scanner is by using the python files directly. However, for that approach you need to have a running python installation and have to install the dependencies manually. This is explained under advanced installation.
- Bluestacks 5 Installation https://www.bluestacks.com/de/bluestacks-5.html
- To use tesserocr you also need to download the trained tesseract models https://github.com/tesseract-ocr/tessdata
- Adb Platform Tools Download and Extract(See Important Notes) https://dl.google.com/android/repository/platform-tools_r31.0.3-windows.zip
- Tested on Windows 10 and 11, could work on Windows 7
- Download the latest release for your system here: Latest Release (choose RoK Tracker.zip)
- Extract the zip in the folder where you want the scanner to be installed in
- Download the requirements 2 (tessdata) and 3 (platform-tools) and extract them in the deps folder
- tesseract needs to go into
deps/tessdata/
- platform-tools need to go into
deps/platform-tools
- complete tree how the folder should look like are here
- tesseract needs to go into
- Configure your Bluestacks instance according to the instructions
- Adjust the default options in the
config.json
file to your liking - Double-click the exe like any normal program and enjoy the scanner
- The results of the scans can be found in the
scans-*
folder, where * is the type of scan you are doing
./
├─ _internal/
│ ├─ ...
├─ deps/
│ ├─ inputs/
│ ├─ tessdata/
│ │ ├─ *.traineddata
│ │ ├─ ...
│ ├─ platform-tools/
│ │ ├─ adb.exe
│ │ ├─ ...
├─ config.json
├─ *.exe
- Bluestacks 5 Installation https://www.bluestacks.com/de/bluestacks-5.html
- Python 3.11 Installation https://www.python.org/downloads/release/python-3110/
- To use tesserocr you also need to download the trained tesseract models https://github.com/tesseract-ocr/tessdata
- Adb Platform Tools Download and Extract(See Important Notes) https://dl.google.com/android/repository/platform-tools_r31.0.3-windows.zip
- On Windows "Microsoft Build Tools für C++" might be required for some python packages https://visualstudio.microsoft.com/de/visual-cpp-build-tools/
- Tested on Windows 10 and 11, could work on Windows 7. Tested with Python 3.11.0 and 3.11.7.
- Download the latest release for your system here: Latest Release (choose the source code option)
- Download and install Python and Build Tools for C++
- Download the requirements 3 (tessdata) and 4 (platform-tools) and extract them in the deps folder
- tesseract needs to go into
deps/tessdata/
- platform-tools need to go into
deps/platform-tools
- complete tree how the folder should look like are here
- tesseract needs to go into
- Open your terminal in this folder and create a venv via
python -m venv venv
- Activate that venv via
./venv/Scripts/activate
- Install the python requirements via
pip install -r requirements_win64.txt
- Configure your Bluestacks instance according to the instructions
- Open a terminal in your rok tracker folder
- Activate the venv via
./venv/Scripts/activate
- Start the scanner:
python kingdom_scanner_console.py
for the CLI version of the kingdom scannerpython kingdom_scanner_ui.py
for the GUI version of the kingdom scannerpython alliance_scanner_console.py
for the CLI version of the alliance scannerpython alliance_scanner_ui.py
for the GUI version of the alliance scannerpython honor_scanner_console.py
for the CLI version of the honor scannerpython honor_scanner_ui.py
for the GUI version of the honor scanner
- The results of the scans can be found in the
scans-*
folder, where * is the type of scan you are doing
./
├─ deps/
│ ├─ inputs/
│ ├─ tessdata/
│ │ ├─ *.traineddata
│ │ ├─ ...
│ ├─ platform-tools/
│ │ ├─ adb.exe
│ │ ├─ ...
├─ config.json
├─ *_scanner_console.py
├─ *_scanner_ui.py
├─ ...
- Complete kingdom ranking scan
- Detection for wrong kills based on if kills to kill points are correct
- In case something doesn't check out the corresponding images are saved in the
manual_review
-folder (prefix F) and a warning is logged in the log file.
- In case something doesn't check out the corresponding images are saved in the
- Option to try to recover kills if wrong kills are detected
- Nevertheless the same images as for a fail get copied to the
manual_review
-folder (prefix R) and an info is logged in the log file.
- Nevertheless the same images as for a fail get copied to the
- Detection of inactive accounts
- an inactive account is an account that cannot be clicked in the kingdom rankings
- those are skipped automatically, and it is optionally possible to save a screenshot of the name in the
inactives
-folder.
- complete alliance ranking scan
- complete personal honor ranking scan
- due to how the game works the names are very inaccurate, and it is not possible to track the governor ID
- Display Tab (Screenshot)
- Resolution: 1600x900
- DPI: Custom (450)
- Advanced Tab (Screenshot)
- Android Debug Bride: Turned on
- Change the entry
bluestacks_config
in theconfig.json
file of the scanner to match the location of your conf file- This file is located in your Bluestacks installation folder. If you don't know where you installed it, chances are good that it is located at
C:\ProgramData\Bluestacks_nxt\bluestacks.conf
- This file is located in your Bluestacks installation folder. If you don't know where you installed it, chances are good that it is located at
- Make sure to use the correct instance name. The scanner asks for a Bluestacks name and looks for that name in the config file
- If you don't find a
bluestacks.conf
file chances are high that your installation always uses the same port. The default should be 5555, that's also what the scanner assumes. If you change the port you have to manually change it in the scanner.
- It is recommended to use a venv to keep your global python installation clean of the dependencies. After setting up the venv and activating it, you can install the requirements with the requirements.txt file (more about that in the "Usage" section)
- The scanner does not need admin privilege to run
- Make sure your folder structure matches the expected structure
- Bluestacks settings must be the same as in pictures above. THIS IS VERY IMPORTANT!
- BE CAREFUL to always copy the .xlsx file from the scans folder when it is finished, because in the next capture, there is a chance for it to get overwritten (very low chance).
- Chinese letters might not be shown properly in CMD, but they are visible in the final .xlsx file.
- You can do whatever you want in your computer when tool is scanning. Only be warned that copying can result in wrong governor names if it coincides with the name copy of the script.
- Game Language has to be English. Anything else will cause trouble in detecting inactive governors. Change it only for scan, if yours is different and then switch back.
- In order to get only your kingdoms ranks, the character that is currently logged in game must be in HOME KINGDOM, else you will get all the players in your KvK including players from different kingdoms.
- The view before running the program should be at the top of power rankings or at the top of kill points rankings for the
rok-scanner.py
or at the top of an alliance leader board of your choice or at top of the personal honor rank for thealliance-scanner.py
. No move should be made in this window until scanning is done. - [Only for kingdom scan] Account must be lower in ranks than the amount of players you want to scan. e.g. Cannot scan top 100 when character's rank is 85. Use a farm account instead.
- [Only for kingdom scan] Resume Scan option starts scanning the middle governor that is displayed in screen. The 4th in order. So before starting the tool make sure that you are in the correct view in bluestacks.
Recently people started to random guess my discord name. So I'll just make it public here, it's simply cyrexxis same as my Github username.
I try my best to help those people, but I will set up some rules for help requests:
- Send me a message request (I am on the official RoK Server and the Chisgule server)
- In this message request explain your problem and post your log file.
- Simply saying it doesn't work is not enough, and you will get ignored
- If you respect that you should get an answer from me. But there is no guarantee, because I am doing this project fully in my free time.
A second way I will set up is Github discussions. The advantage with that is that other people see the mistakes and errors, maybe it helps them to fix them by their own.