What is included
Getting resources seems trivial at first, but can become bothersome quickly. You keep building mining bots, assigning leaders and transports to them and eventually forget where they are? You are constantly worrying about which resource runs out next?
This setup controls the entire decision loop for the three basic resources Metal Ore, Crystal Chunks and Silicon. It can easily be adapted to the remaining resources.
Early in the game, build and send out cheap drones to automatically find and mark resources.
Build a storage area where the goodies will come in.
Have a controller figure out what’s running low and where to send the next miner.
Build miners that will automatically find spots to mine, determined by which resource you need most.
Build a few transports that will automatically find out which miner needs to be emptied and where to send the goods. When you update your storage depot, all transports will know and drop stuff off at the new location!
These little scouts run about the map and find resource nodes for you. They are dirt cheap and can be produced in bulk early in the game.
They follow a simple logic pattern:
- keep away from other resource signal bots, don’t mark the same resource
- find a resource node
- calculate the most abundant resource in mixed fields
- signal that resource and the amount you can see
When a resource node is mined dry, the signal bot will automatically relocate. It does not have a radar, so occasionally multiple bots will mark the same patch of resources. It will evade when it sees another signaling bot, though.
Use a worker as a chassis. Add a behaviour processor and a solar panel for power. Done.
Loop through the signals. Calculate the distance to each signal. If the signal is within visual range, evade and repeat from start. Once all signals are processed and you don’t have to evade, we can continue to look for resources.
Loop through all resource nodes you can see. Calculate the amount of each resource you see. Select the largest amount and signal that resource (with amount). If you see no resources, i.e. when you would signal an amount of 0, relocate and repeat from start.
The logic is pretty rough and can be improved.
This is the drop off point for your transports and the entrypoint for resources into your base. Distribute resources from here as you wish.
I prefer a chain of the largest warehouses I can build, but the system works with a single small storage. In that case you should outsource the second radio transmitter somewhere else and skip the item transporter.
This storage uses two radio transmitters, one behaviour controller and, of course, the item transporter.
One radio is controlled by the behaviour and broadcasts to tell the storage manager when it has space available. Since I build this on the actual head of the chain, where resources are distributed into the base, space available means the resource is about to run dry. If you chain multiple storages together, build this logic somewhere in the middle to react sooner to shortages.
The second radio can be placed anywhere and broadcasts the location of the dropoff point for a certain resource. The Radio Transporters will query this channel to determine where they should go. I point it at the tail end of my storage chain.
The logic simply determines if a locked slot (always lock your slots for these storages!) is empty. If that is the case, it sends the resource type and a predetermined number (infinity in my case) to the radio on a predetermined channel.
Not really necessary. Any warehouse with sufficient item slots will do.
Prioritize missing resource
This controller is the heart of the operation.
Warehouses send a radio signal when they are running low on their resource.
Scouts signal resource locations. This is the controller that sends the miners to the best resource spots.
It can be placed in any building. You will need a behaviour controller, a radio receiver and a radio transmitter.
In this example, the system manages the core resources metal ore, crystal chunks and silicon. For each of these, the corresponding warehouse sends a message on channel [resource]2 when it is running low.
The subroutine tunes the radio receiver to each of the three channels in turn. When a channel has a message, that resource is returned from the subroutine. If no warehouse is running low, the logic ends here and the prioritized resource remains the same.
When a resource is selected, the program iterates all signals for that signal from the scouts and finds the closest one. That scout’s location is then broadcast on the radio transmitter as the target for all miners seeking new orders.
It might take a while for miners to want new orders. If you need to address the shortage very quickly, build new radio miners or order some to an appropriate resource node manually. They will handle it.
The most complex part of the setup. These miners follow the pattern:
- If you see a resource node, go there
- if you don’t see a resource node, go to the mining location broadcast by the storage controller
- if you can’t fit the resource you want to mine, signal and wait for pickup
- when you can mine the resource, mine it
The order of the first two rules may seem wrong. It prevents the miners from running about whenever priorities change. They will stick to a spot and mine it dry. Once it is dry, they will get their directions from the controller.
You can build this on any chassis that can take the following:
- at least one mining tool or drone
- behaviour controller
- radio receiver
Since new locations are always ordered on the basis of least distance, it is pretty simple to keep them in power coverage. I use mostly twinbots with dual lasers.
These transports read pickup signals from your miners, grab the goodies and drop them off at the appropriate storage facility. They are not fast, but they are cheap.
Use a dashbot as the base. Add some storage – you’ll want to empty a miner in one go. Also, add the radio receiver and behaviour controller. Season it with some logic and you are good to go.
The logic circuit is fairly straightforward:
First, try to unload your items. For that, select the first item in storage. Tune the radio to the correct channel to find out where this item is stored. Drop it off there.
Once all items are stored, find the closest unit that is signaling for pickup. For that, we have to loop through all the signals and get the distance to their source. If the source is closer than the current minimum, it now becomes the pickup destination. When all signals are processed, we know where to go. We move with the async – option so that during the move, we will continuously recalculate the best destination – maybe a nearby miner signals for pickup as we move by or the destination is already serviced by another transport.
Optimizations: The logic begs to be sped up with the UNLOCK command followed by the WAIT TICKS (1) command right at the start. However, currently the game seems to have a memory leak in behaviour logic, so I’ll keep it locked until the bug is fixed.
That’s all we are sharing today in Desynced Radio Mining Guide, if you have anything to add, please feel free to leave a comment below, you can also read the original article here, all the credits goes to the original author NormalityBytes
- Desynced Text Formatting and Icons Guide
- Desynced Superfast Mining Team Guide
- Desynced Behavior of Waves in Aggressive Mode