← To other mrMad-Cat's AOECS projects
 




AGE OF EMPIRES: CASTLE SIEGE

 

BATTLE FINDER












General info:

Give more time to your loved ones and have more fun from gaming! Let the BATTLE FINDER search for you!
To obtain the full version please use the form below*:
Gametag: , Alliance name: , E-mail:
Currently Battle Finder is provided after a small donation, the reasons are explained in the letter you will receive.
* this info is collected for program's license purpose only, no spam.

Try the DEMO version now to see how it works (all targets' values are fixed to 50; no memory of 5 sets of settings).

BATTLE FINDER DEMO
(zip, 12.4MB, Downloaded: 1499 times)

  • You can continue doing other things on your PC while BATTLE FINDER is searching for you
  • Lightweight program (≈25Mb)
  • Quick algorithm using neural networks you won’t even notice
  • Search for up to 5 criteria at a time (resources types) in AND/OR logic
  • Use as an auto mouse clicker with timer
  • Play sounds you like when the match is found
  • Automatically saved settings
  • View log to see how the program works, or hide it to spare some place
  • Save pictures of recognized areas to be sure it works all right or to share with your friends
  • NEW! Memory of 5 sets of settings (not in Demo)

> About the program

BATTLE FINDER is a program that combines the two main functions: number recognition and mouse auto-clicker. It is close to game bot programs, though I prefer not to call it that way, as the latter I consider cheating. BATTLE FINDER was primarily made to help players of the Microsoft’s “Age of Empires: Castle Siege” game, but sure its functionality is much broader. Its limit for now is that it can read white fonts only.

This program was made as my response to the big flow in the game’s logic. Though in general the game was great (beautiful graphics, “gaming” gameplay), after a few months of playing the main time was spent on hours of “nexting”, searching for optimal opponent (while the real battle is just 5 minutes long). Sure it is not a gaming time. It is a stupid clicking and nobody gains from this. Only players instead of doing something useful to their society or family are wasting time and health on absurd clicking. Therefore, I decided to make a program, that could help gamers spend more time with the family or other things they want and have all the fun from gaming at the same time.

The main approach is not to mess up with the game directly (like intercepting its data packages), but to simply replace user in exactly the same way one plays. So it reads numbers from screen and, depending on their values, makes a mouse click or informs the user that this is what he/she wanted. As its side function, came the ability to use BATTLE FINDER as a simple mouse auto-clicker, which is also useful in some games that need players to stay online not to be attacked.

Finally, I can say that what came out exceed all my expectations! It is a very useful light program saving my time and I hope you’ll find this out too!

> Is this legal?

It was first strange to receive such questions from some users. However, as there are such, I will say a few words.
In my opinion, it is as illegal as to use a timer to remind you of your battles, or as to make your wife to search for battles for you. It is not hacking the game or intercepting its packages (so in general it’s even not traceable). It just replaces the user in stupid routine functions. In fact, it is the same user playing, because BATTLE FINDER does exactly what user wants to do and has no variations from that. Nevertheless, though I have a legal education, I do not find myself to be competent to say if Microsoft or any other entities one day wish BATTLE FINDER to be a banned program.
What I can say for sure, is that from the human moral point of view this is a must program for those who have families and friends. Spend more time with them or use it for your education, health improvement or entertainment.

I have also heard some stupid talks that giving you advantage over other users is making you a cheater. I find absurd to use this argument for calling someone a cheater. I have Razer Imperator mouse, so I do have an advantage over other players who have some office Logitech (I also have Goliathus mouse pad, damn, I like it! :) ). Someone doesn't work and can play all day, so he has an advantage over others who have go to work. Someone has a lot of money so he always buys troops and heroes, can have top defense in few days, while others have to spend a year to gain that level. Finally, some have a tablet with a huge touch screen, well this IS an advantage over me playing on my 5" lumia or my old laggy PC. There are millions of such things!
All this is no way cheating! This is just having some fair advantages in some things over others. And BATTLE FINDER is no different.

> Setting things up

The number recognition system is quite a sensitive function. So please read very carefully the following instructions to avoid any problems. You can try different settings yourself, but if you follow my instructions, I can guarantee you the quality of recognition with error of less than 1:1000 on monitors with resolution higher than 1024x768.

First Step:
Run BATTLE FINDER and the game. You can use the program’s “stay on top” setting to make it easier to set the things up. Position the game in a windowed but maximized mode (for Windows 8 please read the "FAQs and common issues" section below). Now start the battle (note that in AOE:CS replays have resources indicators positioned in different places than in normal battles).

Second Step:
Now set the coordinates of all the areas of your screen you want to recognize numbers from. Press in “Searching area” section. You will see your screen freeze. Now, using your mouse (click and hold), you can select an area with the red rectangle. The quality of the number recognition heavily depends on this step so be very precise! To help you make the selection the sensitivity of your mouse during the selection process is reduced by 4 times. Additionally, there appears a magnifying glass helping you to see pixels.
Please take into consideration the following:
  • The borders of the selection should be as close to the numbers as possible. Algorithm looks for bright white colors to try to recognize numbers in them. So the smaller the area is the less possible it is that some pixels from the background would be considered as numbers.
  • The width of the selection should take into the consideration the longest possible combination. Things to consider: some numbers are smaller than others so 111 111 would be shorter than 120 000; the numeric separators also consume some space; max of crowns is 1 200 with the separator, max apples and wood is 120 000, max stone is 65 000, max pennants is 770+.

If you have made a mistake, you can just mouse click again. If you decide not to continue you can press Esc on your keyboard.
When you are finished with selecting, press Enter on your keyboard. You’ll see that the coordinates have been fixed. These settings will be saved upon closing the program so you won’t need to set them again.
You can change these coordinates anytime later the same way. Only this time you’ll see the green area showing your current settings.
Now repeat this steps for all other searching areas you need. The basic idea is their use for 5 types of resources there are in the game: apples, wood, stone, pennants and crowns. You can set any of the fields active or inactive at any time by clicking the corresponding checkbox.

Third Step:
Set AND or OR operator active and input the minimum amount that would suit you for each field. The AND means that all the conditions have to be met at the same time, while the OR operator suggests that at least one condition is true.
In simple words, if you set crowns to 100 and apples to 50 000 and use AND operator, castles with only 50 000+ apples and 100+ crowns at the same time will be taken into consideration, while castles with only 50 000+ apples but with lesser than 100 crowns will be missed.

Fourth Step:
Set the coordinates of the left mouse button click in case the set conditions are NOT met. Basically it is considered to be the “Next” button of the game, so the program will continue “Nexting” until it finds the suitable castle. The setting procedure is the same way only this time instead of red rectangle it is a red dot.

Fifes Step:
Set the time period in seconds, which is the time that program waits after the last left mouse button click it has made. I consider it to be the average time the game loads next castle +1 sec. It depends on your system as well as your current internet connection. This should make it “next” through castles as quickly as possible. If by some reason the game won’t load until this time passes, the program will just recognize 0 for all the fields and “Next”, waiting again for the set amount of time afterwards.

Additional settings:
  • Stay on top – the app is always on top over the other windows if not full screen apps or other windows with the same function.
  • Save images – all the analyzed areas will be saved as *.png images in the “pic_log” folder of the program’s directory. The file names are in the YYYY.MM.DD HH-MM-SS nX format where X is 0-4 for the five analyzed fields respectively. It is great to use this function to check the quality of recognition with the log or to share with friends. Don’t forget to delate this images time from time.
  • Save debug images – this option saves 3 additional images the way the algorithm sees them. This is for debug purpose only. The files have endings tmp.png (the image as it is processed by the algorithm), lept (the image as it is loaded into the picture library) and tess (the image inside the recognition engine).
  • Adaptive rounding – while I do not recommend using this option (primarily because crowns and pennants are mostly always lower than 1000), it can be useful in case you sometimes have problems with recognition of other resources. It simply ignores all numbers after the coma rounding the number to 1000. For example, instead of 12,793 it shows 12000 ignoring 793 and anything that may come after and be considered as a number by the algorithm. Take into consideration that coma is not used in some regional standards as a separator (set in your Windows’ regional settings and game's language settings).

> Using the BATTLE FINDER

Starting and stopping:
After all the initial settings have been done, the program is ready to run. Just press and, after the set amount of time, it’ll perform the first recognition and continue working independently. You can see how the program is running in the log, which is hidden from the start.
You can change all the settings while the program is active and they will be used the moment you exit the setting field (click any other place of the program).
You can also the program anytime you want.
When the program finally finds the castle that matches your desire, it’ll stop searching, there will be a pop up window and music will start playing continuously until the OK button is pressed. You can change the music to your own by replacing the alarm.wav file with any *.wav or *.ogg file you like.
Then you can manually Start the program again.
You can also minimize the program while it is working.

Doing other things on your PC:
The good thing is that you can use your PC while the program is running. You can work, surf internet, watch films and even play other games. Only take into consideration the following:
  • The analyzed and the clicking areas of the game should ALWAYS be FULLY visible. All other windows always tend to close them and you have to pay a great attention to this.
  • Some heavy programs may make your PC lag, which may result in problems with the program. So better check what is happening there time from time.
  • If you hold your left button of your mouse at the moment when BATTLE FINDER clicks, the click will be unsuccessful and your holding will also be lost. Pay attention to this when doing something like drag-and-dropping, moving windows or selecting files/text etc.

In the picture below, you can see the proposed setting of your workspace. As you can see you can have lot of space for you, just be VERY attentive.


Using as auto-clicker:
As was said before, you can use BATTLE FINDER as a simple auto-clicker. Just run it the same way as usual, but this time make sure that there are no white digits in the area being read and that the clicking area is also free. I’ll just recommend to turn off saving images option and add more time between clicks.

> FAQs and common issues (please take into consideration to avoid the same mistakes)

  • When setting a desired amount of resources user can accidentally type extra or miss few “0”, like 120 000 0 instead of 120 000. Be attentive!
  • User sets for 120 000 but in reality 110 000 would suit him as well. Be wise and try to understand your necessities before setting them up.
  • Using AND operator instead of OR.
  • Not lowering time back after setting it for auto-clicker mode.
  • When setting an area for recognition, user selects area around actual digits which he sees, not taking into consideration that numbers can be bigger and area needs to be wider. This results in reading only part of the digits and missing appropriate castles.
  • Right:   Wrong:
  • The analyzed and the clicking areas of the game should ALWAYS be FULLY seen. Forgetting this when doing other things on PC can result in wrong window clicking or reading images from another window.
  • There is a short process of brightening up the picture when a castle is loaded. If it coincides with the recognition process the picture will be dark like this: . There are 3 possible outcomes: 1) the program will see 0 and try to click, but the “Next” button won’t be active yet so it’ll wait for the next cycle; 2) The same as before but “Next” button will be working so this castle will be missed; 3) the brightness will be sufficient for the algorithm to make the correct recognition. The only thing to prevent this if it happens too often is to increase time interval by 1 or more seconds.
  • The version for mobile devices is not currently planned, as this should be a much more complicated application.
  • This program can’t support recognition of alone standing castles, civilization or connection errors.
  • The recognition has its flows and there is nothing that can be done. I expect the error possibility to be 1:1000 or smaller.
  • Lunching Windows Task Manager and other pop-up windows and messages for unknown reasons sometimes makes BATTLE FINDER unable to make the click, so pay attention.
  • AOE:CS unfortunately doesn't support windowed mode in Windows 8. So option “Stay on top” won’t take any affect and you won’t be able to set up the coordinates. There is a workaround solution: run the game, make a screenshot, open the screenshot file in a program that can show it in the actual size and exactly in the same position as the actual game, now you can set the Battle Finder to use it later on the full-screen game. You can use ALT+TAB to switch between the apps. Unfortunately, you won’t be able to do other things on this PC like on Windows 10 because you’ll need to have the game running always on top to make it work.
  • There may be a SmartScreen block when you first run the Battle Finder. You have to allow it to work. It looks like a standard reaction of Windows to downloading *.exe files from internet. Nothing to worry about.

> Support and Updates

If any interesting ideas come around and I have time, I’ll be happy to update BATTLE FINDER with some improvements. So you can return here once in a while to check for a new version.

Please feel free to contact me with any suggestions or problems you have. I would also be thankful if you can send me pictures of problematic recognitions and all the bugs you encounter.
The official forum support topic (Ukr/Eng)
mrMad-Cat[@]i.ua

Good luck to you and let the BATTLE FINDER not only search but find everything you want!

> Version history

Version Date Changes
1.3 01.03.2017 - fixed bug with sometimes ignoring last digit (better stone recognition)
1.2 20.11.2016 - added 5 set memory of settings
1.1 30.08.2016 - default language set to English if cfg file doesn't exist
- small changes in english language
- added date info to the log
- fixed bug of mouse speed not returning to normal if another mouse click is registered during the area selection process
- implemented mechanism that will let in future check if program’s version is up-to-date when pressing help button
- fixed artefacts in the icon
1.0 25.07.2016 - initial release





mrMad-Cat
mrMad-Cat © 2016