new metal spot finder class: http://www.fileuniverse.com/?p=download ... ip&ID=1619
Works better then anything yet released:)
for now just use Initialize() function and it will draw all the mexes on the map, and put sorted array of spots into metalpatch list. (might want to tweak with the minMetalOnSpot and minProduction variables if anything goes wrong)
Try on maps like small divide, redhaven.
Not optimized/not using caching yet/ better not use on metalmaps (I'll add this later) /function to include already builded mexes will be later
What's important here is the algorythm:
Goes through metal map, when finds a free spot(other mexes checking) checks all spots within radius on which a mex can be built with maximum production (checks other mexes intersecting for production).
This way it's very area-effective.
Might want to remove checking for mexes structures themselves intersecting as this shouldn't be needed.
new metal spot finder class
Moderators: hoijui, Moderators
forgot
Sorry, was 1 error in previous version here: http://fileuniverse.com/?p=showitem&ID=1621
somewhat updated metalspot finder class:
checks if the map is metalmap(most of metalsquares are metal), and only runs the second part if it's not: you could easyly add separate algorythm for metalmap.
Works better on "dirty" maps like greenhaven which have small traces of metal exept main deposits.
Also it takes some time to load on maps like small divide.
You can remove the drawing part after testing...
somewhat updated metalspot finder class:
checks if the map is metalmap(most of metalsquares are metal), and only runs the second part if it's not: you could easyly add separate algorythm for metalmap.
Works better on "dirty" maps like greenhaven which have small traces of metal exept main deposits.
Also it takes some time to load on maps like small divide.
You can remove the drawing part after testing...
I fiddled with your class. It is heavily base don JCAI, i ahd to spend a while editing and changing code to get it to just compile without the JCAI project present, then I found that the class didnt have the best functions for getting spots like cains does, and cains uses the same method fo storing and getting positions, so I deleted cains mex fidner core code and replaced it with a link to your class so I could use his interface.
I'll update that for the newer version you released and upload later.
I'll update that for the newer version you released and upload later.
http://taiskirmish.sourceforge.net/mexspot.rar
The modified version thats totally independant of JCAI, and has the nicer itnerface cain provided. Just create an instance of cains class and it'll do all the work for you.
The modified version thats totally independant of JCAI, and has the nicer itnerface cain provided. Just create an instance of cains class and it'll do all the work for you.