#Clearing out Large Areas with AAI Vehicles
1 messages · Page 1 of 1 (latest)
I don't know what "AAI" is. Does that prove I can't answer your question, or is it something simple?
AAI is a mod
wait a sec
Makes vehicles act like RTS units. Control them using a remote control handset, or program them with circuit conditions and zones. Can be used for base enemy base assault, patrols, friendly base navigation, vehicle-based mining, and more advanced applications. Works with vanilla and modded vehicles. Visit the mod portal page for a full feature l...
Here the Mods
It is rather simple, you do not use AAI programable vehicles. Do not take just my word for it, take the word of practically everyone who tried to use them, including pain lovers like Dosh Doshington. You can see his video to understand the issues with AAI programmable vehicles. No matter how smartly you try to use them, they will never work well and will end up tanking your update time if used at anything but the smallest scale.
If you are still insistent on trying to use AAI programable vehicles, I will write some hints on how you could possibly try to implement them as well as the likely pitfalls you will encounter.
First you need to determine the "Large Areas" you want to clean. This is usually done by manually painting over the ore patches you want to mine and then letting logic clean it up.
You can use the tile scanner to scan the painted tiles by using a counter to increment the painted index. This will be your approach to finding and cleaning up or tiles. If the scanned tile does not contain ore, you remove the paint from the tile. Removing paint removes the current index, so you usually end up skipping a tile doing so which can make cleaning up freshly painted ore patches quite slow. You also have a limited poll rate of 60 times a second, assuming 1 cycle per tile, so painting a lot of patches can be very slow to clean up.
You could then get your miners to mine random ore patches by using a pesudo random number generator to select a random tile index from the painted tiles, and using the X and Y of that tile as the target for one of your miners. You might also want to poll the area around your miners periodically to check if any ore to mine is in range, and if not, then send them to a new random location, unless there is a flag you can poll to see if anything is in range (not sure). Since the miners might take a very long time to arrive, you might want to only run the checks if the miner is not moving.
You then need to order transport trucks to collect from the miners. A good approach might be to poll the miners and check for any with ores above some threshold. If one is found, dispatch a truck towards it if the truck is not full and is not moving. You might want to assign 1 truck to every 3-5 miners by CnPing the logic, to avoid having to dynamically track pickup allocations. If the truck is full and not moving, you order it back to drop-off, possibly a dedicated one for every 2-4 trucks.
Due to the trucks using biter path finder, they can take a lot of time to respond to move orders, especially move orders over a long distance. As such the poll rate for issuing orders has to be quite slow, not more than a few times a minute for short distances and possibly every minute or longer for long distances.
Much like biters, the vehicles are very prone on getting stuck on the environment. It was fairly common to see them stuck on rocks, and they will likely not handle complex walls at all well, and are possibly incalable of pathing through gates.