Mindustry

Mindustry

83 ratings
Mining Drones
2
8
   
Award
Favorite
Favorited
Unfavorite
Tags: schematic
File Size
Posted
Updated
520.000 B
25 Dec, 2020 @ 2:01am
9 Mar, 2021 @ 12:00pm
7 Change Notes ( view )

Subscribe to download
Mining Drones

Description
Processor that controls your Polys and Megas to mine copper/lead/titanium, depending on what your core has the least of at any moment. Automatically pauses mining to repair/rebuild damaged/destroyed structures, resuming after.

Includes a switch to unbind Polys, to free them up to assist with construction or extra rebuilding.

If you don't have Megas yet, use the "Poly-only mining for early game/campaign" schematic at the bottom of this description.

Schematic code:
bXNjaAF4nAHjARz+AAIAAQIABG5hbWUADU1pbmluZyBEcm9uZXMAC2Rlc2NyaXB0aW9uAAACAA9taWNyby1wcm9jZXNzb3IABnN3aXRjaAAAAAIAAAAAAA4AAAGJeJx9U0tOwzAQTcUCKafwEdJWKV1Wgg17LjBxpqmRYxt/VHI+Loa/IRYItYqcN29m3vNMdk3z8GVQGKmJufs/s/S2JxcUMHAc23c3K9IT/HDAA+EK3GDrBiZGclGSLzXj4gSzRDjOE34iwO+wGNKRrmTNOEGbW1KrS9KFSmG15GvXjkwawaJ+u4FIzH3ruKQeI4NjfGRiIlRqTKp8Qnj5jM8lv5VGdlFYGoVzwZnF2awBaYG/BmTVBwoos0thBPpzxpLK4zFbT5VoFdyfqmBXygbNueKVaWNDz5RxOG9vrKhwyaa/IqVQF1gNGeYI42qUZdAyC4K5UveQlaSL+JmcD3A0Jt6xL2hZhp9+4FDSZbiv2B42aMlW258uMiXq/I+wai5jDmi008VjHG+crn9cfWbtLYJ5Q/M2EVBKS6C3TW6ftrEwZia2lbsYTbPtq/X9VXK7bueaEwb+oqVK6tc1SsWLuxFmmHAsDtNvnKfV2Tkbi5jVDuuvbTPLpml2zWP+fP2x+Qaub02cAQEAAQAACgEBRrvT+w==

Logic
Repair/rebuild is done by "unbinding" the units from the processor (by not binding them) so that they are able to perform their default function. They are rebound once no damaged blocks exist on the map.
sensor sw switch1 @enabled jump 5 equal sw false ubind @poly jump 5 equal @unit null jump 6 always 0 0 ubind @mega sensor ctrl @unit @controlled jump 0 greaterThan ctrl 1 ulocate building core false 0 corex corey 0 core sensor type @unit @type sensor items @unit @totalItems sensor capacity @unit @itemCapacity jump 33 equal items capacity jump 16 equal items 0 sensor ore @unit @firstItem jump 28 always 0 0 sensor cu core @copper sensor pb core @lead sensor ti core @titanium jump 22 equal type @poly jump 22 lessThan pb ti jump 27 lessThan ti cu jump 25 lessThan pb cu set ore @copper jump 28 always 0 0 set ore @lead jump 28 always 0 0 set ore @titanium ulocate ore core 0 ore orex orey oref 0 jump 22 equal oref false ucontrol approach orex orey 5 0 0 ucontrol mine orex orey 0 0 0 jump 35 always 0 0 ucontrol approach corex corey 8 0 0 ucontrol itemDrop core capacity 0 0 0 ulocate damaged core 0 0 0 0 dmgf 0 jump 8 equal dmgf true jump 5 equal type @poly

More efficient mining
The above logic in a faster processor, for more efficient mining when controlling many units.
bXNjaAF4nAHqARX+AAMAAgIABG5hbWUAE01pbmluZyBEcm9uZXMsIGZhc3QAC2Rlc2NyaXB0aW9uAAACAA9sb2dpYy1wcm9jZXNzb3IABnN3aXRjaAAAAAIAAAAAAA4AAAGKeJx9U0tugzAQddpFJU7hI5BEpFkitZvue4EBJsSVsV1/lHK+Xqz+ElCrCoTgzZuZ9zzDjpDHb4PCSE3Nzd/M9tc9bVFAx3GoPtykaEPx0wEPhAtwg5XrmBhoqySft4zWCWapcJwn/ESB32A2tKZ1yZpwhCq37K0uSW0vhdWSL11rOmoEi/r9CiIx95XjsvcY7RzjAxMj7aXGpMonhI+v+JzzV2lkZ4WlUXgvOLM4mSUgLfC3gCz6QEHP7FwYgf6SsaTyeMzWU6V+E9yfNsG6lA2ac8UL08aGninjcF6fWFHhkk1/REqhLrDqMswRhsUoy6BlFgRzpe4hK0kHcZ+cD3A0Jp6xL2hZhp/vcCjpMtxs2B42aOla258uMiXq/I+waC5jDmi0U8fXON44Xf+4+MyttwjmDc3bREEpLaG/rnKbtI2FMTGxrlzHaJpts1nfXyXX63becsLAX7VUSf2yRql4cTfABCMOxWG6hmlcnJ2zsYhZ7XD7t61mSQjZkaf8+5IHQn4ArnJNnQEBAAIAAAoBAZJs3yw=

Ground unit mining
Need even more mining units? Control Pulsars and/or Quasars as well to mine copper/lead/titanium. They will boost the entire time to fly. Included switch unbinds all ground units.
bXNjaAF4nAHjARz+AAMAAgIABG5hbWUAFU1pbmluZyBEcm9uZXMsIGdyb3VuZAALZGVzY3JpcHRpb24AAAIAD2xvZ2ljLXByb2Nlc3NvcgAGc3dpdGNoAAAAAgAAAAAADgAAAYF4nH1TW07EIBRl9MOkq2AJreOM418T/fHfDVDKzGAYQB4ZuyVXKY8L0mhMGlIO5x7OfbBB6PbLMmmVwfYaPu7oecAjk2QSbO7e/UXj7R6zD09EZByJsKzzE5czHrUXlphM2gFn9JI7LL0QGd9jIq5ksbjHfYkLxBgH91JnSthIlXRGiXp1j0+GEcfM25nIzBw6LxQNGJ48FzOXJ0yVYdlZCIibz7QusOs8yOJJKevwEL0kP+DALZoVB/G/4Nyxi60HyhHxGpFqnGhCuVsKI9KfAYPKPUBVshJdHQ6Pq8PqJiYDikdurIt35oj7p7aYxYXP+Yfaac1qVfUEsGBkrolyAB13RHJfdLfgJBeibWs4EszaVP4g6TjAhx84inqA9yt2gC1zuHX3Zx5ASU7/I1TXZQIimhLq02/qfGp8WI4hcp1dAmGAy0QQrY0i9NzE7vKoFsaFy1Y5D055F+1s/5JsJ/Gw5sSWvxils/s6SI347q+WIIQ26A5eKbpB6BvgTUWiAQEAAgAACgEBYsTSfQ==

Poly-only mining for early game/campaign
Controls Polys to mine copper/lead. When there are damaged blocks, half of them will repair, and the other half will rebuild. They will automatically replenish ammo from batteries for repairing.

Note that Monos already mine by default, and require no logic to do so.
bXNjaAF4nAEYAuf9AAIAAQIABG5hbWUADE1pbmluZyBQb2x5cwALZGVzY3JpcHRpb24AAAIAD21pY3JvLXByb2Nlc3NvcgAGc3dpdGNoAAAAAgAAAAAADgAAAb94nHVU0W7bMAx0gQED/BX8BDtNsTwG2Paw9/0AbSmJBlnSZAmN/34iRTt12wGJYJHHO+oo+6lpvrzM2s0+wvxafiaNtx7O2uFgtWr/5CnAM+i/GS0BUsy61U61eTBOwTl4u7RSP6Zo4ZydSXAevUvR242ig2vUmHT8fUNXkX3NnMD59JP5a+3FxDkVzgQGutYHmLyi/6HsD7S3WJTjYCWqpuuFwqhUQZiVt5OmGSix/rhrg7Ckw4pVvc3WjwUACie8agWjj7pwdSRzp2VhwdIZMx6OIiNBsQKnya9W0LOA+508g7pNccjGKuOuMGAqkAUuaGfSpv2d14U6abOYCxhC9DjedogTY3hEH3CPMxz3TAnjtRjxyPcfWSomsBldLX/fOZu1tk2bO6+L7FZ3TNLTvNqTfEL7iyLbPcKAoylHEQTBv0usGnk8iOuVadwln/fJbSbUmzDywElTKk6A9hWXmU+1dpHrccpVDkHHNRwGCVuN6+vxDayeZ54ppTNfqre1n6oIhHlWJykiN45WdlAM/Gzuj/zLHjEZ9676v3fi7ZhOexYy8Ecsrxa3tI2lsjVN89R8lQ9GeWz+Ae99cT4BAQABAAAKAQNB3PbI
43 Comments
Lucky_Theuzinho 14 Dec, 2024 @ 5:25am 
Muito bom, bem funcional.
ChatKat 6 Apr, 2022 @ 11:27am 
No problem. Thought I'd let you know so you could potentially fix it in some way. But yea a different blueprint is probably just the easiest
killall -q  [author] 6 Apr, 2022 @ 10:32am 
Ah, you're right. I had tried to fix the poly-only case, as I knew many new players would blindly hit subscribe without reading, and I thought it was working for poly-only mining, but it doesn't.

Players in early campaign with only polys should use the last schematic above, "Poly-only mining for early game/campaign".
ChatKat 6 Apr, 2022 @ 2:55am 
Hey Killall. I think I discovered why it was only making 1 poly mine. Since I've used it since the start I've had the issue up until the point I unlocked/started building the mega drones (don't know which one it could be because I did both before building the schematic). After that it started working fine. Hopefully you can find a solution for it somehow? Or you might need one that just controlls poly's since I think it just gets stuck on the "bind to mega" command?
Vel 17 Mar, 2022 @ 4:26pm 
yea same, only 1 poly mining and it's not touching any titanium, i haven't opted in for any betas
jglenn1562 10 Feb, 2022 @ 6:21pm 
That's a negative for me, I never opted in for v7.
killall -q  [author] 10 Feb, 2022 @ 12:57pm 
These are the actual lines which command units to go to the ore's location and mine it:

ucontrol approach orex orey 5 0 0
ucontrol mine orex orey 0 0 0

BTW, I'm reasonably certain that everyone having problems is trying to use this schematic on the v7 alpha.
ПростоМакарашка 10 Feb, 2022 @ 8:26am 
what line of code is responsible for digging drones?
Gurt 25 Jan, 2022 @ 7:22pm 
Works like a charm, binding a whole drone swarm. Not sure if it's version-wise or clientside issues that breaks it for all these other folks.
ShiZbanG 20 Jan, 2022 @ 10:51pm 
this only binds 1 poly and the poly will not mine whatever the core has least of, it is mining copper only even though i have max copper and max lead in the core and only 30% titanium in the core.