Here you can find our comprehensive guides to give you step by step details to get you and your Bot up and running. If you are going forward to post a Topic , make certain to post only official Bot related How To's.
For a several days after 1-2 hours bot working it stop dragging to dark troops side to train minions (same with v. 7.8.4 hotfix and v. 7.8.3)
2: L [2020-08-06 17:43:26.568] Chief, is your Army ready? No, not yet!
2: L [2020-08-06 17:43:26.571] Waiting for Troops, Heroes
2: L [2020-08-06 17:43:27.412] Checking Troop tab: 280/560
2: L [2020-08-06 17:43:27.415] Training 2nd Army...
2: L [2020-08-06 17:43:29.140] Training 30x Balloons
2: L [2020-08-06 17:43:42.882] Failed to Verify Troop Minion Position or Failed to Drag Successfully
2: D [2020-08-06 17:43:43.407] Checking troop tab: 430/560
2: L [2020-08-06 17:43:44.284] Checking Spell tab: 11/22
Just the same Dissociable.OCR not going to talk so much LOL
But it's a bit more complicated and needs more information than that one lol
Here we go.
I have coded a DLL file in C# to do Image Matching, Yes it is Dissociable.Matching.dll .
But why? why not just simply use ImgLoc? Here we go for some reasons:
Alpha Channel support (Ignore Transparent Pixels).
Three Pixel Comparison algorithms, Simple per-channel difference comparison, CIE1976 comparison and CIE2000
Boosted Multi-Threading. not processing several template files using Parallel, but processing pixels in a Multi-Threaded manner.
Smart! It detects if it costs less time by processing several template files using Parallel instead of Multi-Threaded Pixel Processing. like when the Source Image Height is less than 200.
GUI available to debug bunch of Images.
Bundling and Bundle extraction.
However, ImgLoc also was/is the result of @trlopes's hard work with so many functions that the BOT relying on.
Q: How can i get all these fantastic things?
A: Just click the text below!
Q: I'm getting a message regarding the name. why?
A: Because. never rename my boy's name.
--- End Q&A ---
The 'Find' function has 11 parameters!
Parameters and defaults: IntPtr sourceHandle, string templatePath, ushort levelStart = 0, ushort levelEnd = 0, ushort regionX = 0, ushort regionY = 0, ushort regionWidth = 0, ushort regionHeight = 0, ushort threads = 32, ushort limit = 0, bool saveDebugImage = false
sourceHandle: hBitmap of source image you willing to search images in.
templatePath: The Path to Directory or Bundle (.dmat) file containing template images to search in Source Image.
levelStart: The Starting level that the dll will start searching for. Default: 0 = No level limit
levelEnd: The Highest level that the dll can search for. Default: 0 = No level limit
regionX: The X point that the dll will start from in Source Image. Default: 0 = 0
regionY: The Y point that the dll will start from in Source Image. Default: 0 = 0
regionWidth: The Width of the Rectangle that the dll will search in within the Source Image. Default: 0 = Source Image's Width.
regionHeight: The Height of the Rectangle that the dll will search in within the Source Image. Default: 0 = Source Image's Height.
Threads: The amount of the threads that the dll will create to search within the pixels. Default = 32 - NOTE: Will not process pixels in a Multi-Threaded manner for Source Images with Height lower than 200.
Limit: Limit the number of matches. Improves the performance by not processing leftover template images or the leftover pixels if reached to the limit. Default: 0 = No limit.
saveDebugImage: Save Debug Images. If true, two images will be Saved in 'Dissociable.Imaging.DebugImages' Folder located in dll folder. The first one is the Source Image used to search templates in. The second one also is the Source Image, but with marked up found points. NOTE: Second Debug Image will be Saved "ONLY" if it get any matches.
NOTE: All parameters has to be passed to 'Find' function, but you can use their defaults.
The 'GetVersion' function has no parameters. this function returns the dll version.
CreateBundle / ExtractBundle
There are also 'CreateBundle' and 'ExtractBundle' functions. but i recommend you use the GUI. NOTE: GUI also uses those functions of the dll. but you don't need coding 🙂
They must be a 32-bit png files.
Their names must be in this format: ObjectName_MaxDiff_PixelComparisonAlgo_Level.png
After the level, you can include anything. doesn't make changes.
Available Pixel Comparison Algorithms:
S (NOTE: S Stands for Simple, anything else than CIE76 (or CIE1976)/CIE2000 will be compared by Per-Channel Difference Comparsion)
NOTE: S is so Simple, Fastest comparison. then we get CIE76, it has a few math BUT then we have CIE2000 comparison, its complicated so it is slowest.
Example .au3 file and bundle has included within the download archive.
Let me know if you have found issues or bugs right in here. Impossible🤴.
The GUI Mapping Files
Q: What is that?!
A: GUI can load a 'map' file so you can map your images to it.
Q: Whats the point of having map files and mapping images?!
A: The GUI will always check if that objects and that amount is found. then it will tell you if it Is a Match or Not. Matches are Colored green while NotMatches are Red!
Q: Wow! so it helps me debug thousands of images within a minute! right?
A: Yes! You don't need to see every image's points and debug image.
Q: Wait what? Debug Image? I still want to see that! where's it?
A: Click on the Source Image you want which is listed in the Grid. Surprise.
Q: How can i create map files?
A: place a 'dmat.map.txt' file in the same folder as your Source Images folder.
Q: Just that? will i have a map file by just creating that txt file?
A: No! Map files must have a line 'Per' Source Image, The line format is: FileNameWithExtension:ObjectName|ObjectLevel|ObjectCount
Q: Can you tell me an example of a line of a map file?
A: Why not. SourceImage.png:Elix-14-7|Inferno-6-2
Q: What if i don't care to the level or count of the objects?
A: Make it like Inferno-0-0
Q: Do i need to map all Source Images?
A: No, you can even map just one image! the others will have 'NoMap' in their Status column
Q: Is it even necessary, all these map file things?
A: No! It will get you the matches and debug images and all. but just it will not tell you if all required things been found or not, you will get 'NoMap' in status column.
Q: I'm amazed of all the works you did! what can i do for you?
A: Buy me a beer! 16Sod3Ak914m5kHWdDyshgf9k92qLKuCFY (BTC)