Space Engineers

Space Engineers

1,073 ratings
Rdav's AI Autominer Script
5
2
2
5
4
2
   
Award
Favorite
Favorited
Unfavorite
Type: Blueprint
File Size
Posted
Updated
903.491 KB
8 Apr, 2018 @ 3:43pm
29 May, 2018 @ 8:54am
5 Change Notes ( view )

Subscribe to download
Rdav's AI Autominer Script

Description
Rdav's AI-Autominer Script allows any player to convert any vessel to a fully automatic mining ship capable of automatic resource gathering and drop off.

With fully kitted out software capable of easily being set up in survival worlds without having to blueprint or pre-prototype the script will guide you through the process of setting it up by itself and allow you to easily integrate it into your survival world workflow with easy and reconfigurable docking and adaptable mining from known ore gps coordinates.




What You Get:
==================================================
The code comes pre-packaged in a single-block module for people uncomfortable with using the ingame editor to paste it in, although the code can be directly copied and pasted in survival worlds with no required block naming or setup, if anything is missing from the vessel the code will help you out and tell you what's up, so remember to look in the terminal if things aren't going as they should.

Features:
- ANY ship can be converted to an AI-mining vessel
- Automatic bore mining for fast resource gathering
- Automatic drop-off when cargo is full
- Easily configurable advanced automatic docking
- Full range of collision detection
- Contingencies for damage and persistent mining



Setup:
==================================================
The system is designed to use a programmable block with the code (found in your f10 blueprints menu) which can be directly pasted, welded, or simply have the code from inside copied across.
The code will help you as best it can by guiding you with instructions in the terminal if it is missing pieces or needs assistance.

Miners will need to have:
- 1 programming block (from module or with code pasted in)
- drills (enough to bore a hole the ships size)
- a remote control
- a sensor
- a connector (on top, sides or bottom of miner)

After putting the code in the programmable block the code will immediately spring to life, firstly it runs some checks to see if all the necessary blocks are present, then it will ask you to dock the drone to a connector manually.
Connectors can be on the TOP, SIDES, OR BOTTOM of the miner.
the direction you dock in is considered the docking direction and it will launch and dock from that direction.
This connector is considered 'home' and it will return here to drop off resources or rest.
This connector can be re-designated by manually controlling the drone and docking it to a new connector.

AT ANY POINT
if the drone discovers that it is missing a component or needs your help it will display it in the p-blocks terminal so CHECK HERE if you don't know what's going on.




Usage:
==================================================
The miner is run by pasting GPS of known ore-filled asteroid locations into the CUSTOM DATA of the programmable block, inside the custom data are also some extra tips and tricks to help you get the most out of the script.

REMEMBER the gps pasted needs to be 30m from the asteroid, this gps is referred to as the 'start point' for the code, so the further from the asteroid the less risk of collisions and it scraping it's face across the surface of the asteroid.

AT ANY POINT
if you want the drone to finish it's current job and return to base 'Run' the p-block with the argument 'FIN' this finishes it's current job.


Behaviour:
==================================================
Once the drone has coordinates it will launch, travel to it's location given, detect the asteroid and begin mining, when the cargo is full it will return drop-off and go back to where it left off.

The drone will mine the asteroid to completion if left alone, HOWEVER it can be made to selectively mine ores by giving the start point specific to a certain ore, IE putting the start gps directly above some uranium and using the FIN command to return it to base.

The drone will dig tunnels through the asteroid as I have done some tests and this is the fastest way of working, so drills must be such that the miner can fit through it's own hole it digs.


Performance & Automatic Cutout Capability:
==================================================
To make this code especially friendly for performance I have LIMITED the number of thrusters a ship can have that uses the code, the code will flag up a 'too many thrusters error' and stop.

this means Server owners can rejoice knowing that the code is exceptionally friendly on performance, no more intensive than a real player-operated miner and will not effect simspeed.
In fact because miners are now no-longer player operated smaller miners with fewer drills are much more practical, so server simspeed might well increase when using this code!

HOWEVER if you use this in a single player world, or are otherwise unfussed about performance this can be disabled very easily, and the code will help you to do so.


FAQ:
==================================================
Q - Does it work on planets?:
A - No, my pc currently cannot handle planets so I physically can't test on them

Q - It's not working what do I do!
A - Check the terminal it might give some guidance, check all blocks are turned on.

Q - Can it dock to moving vehicles?
A - No, not at the moment, although the functionality is planned

Q - Does it work with Fleet-Command?
A - Not currently although I'm working on some ways to directly integrate it

Q - How Do I Use In Survival?
A - Open the blueprint in a creative world and copy the code (or blueprint just the p-block). In your survival world weld a new p-block (or the blueprinted p-block) onto your ship, and paste the code in (not necessary if you weld from a projection)

Q - Does it work with mods?
A - Yup, go nuts with them, although work of warning, some of the larger drill mods might not be fully utilized speedwise.

Q - My miner doesn't deposit resources!
A - In creative the miner will not see itself as full, thus will never go back and empty it's tank.


Thanks And Tip O' Da Hat:
==================================================
Thanks again to my discord community for helping me and supporting me along the way and VERY special thanks to my patreon supporters who have single handedly saved the life of my current computer!

I work on these codes in free time holidays, and evenings, and have spent a great deal of time making these shenanigans for people to enjoy, if you feel like slinging me a few quid to allow me to further fuel my scripting exploits I have a patreon which can be found here!: https://www.patreon.com/Rdav

Also massive thanks to all the beta testers and discussion that went down in my discord, check it out if you want to get in on the discussion!: https://discord.gg/MXz8Gkj

Splitsie recently made a great setup tutorial on the script highlightiing some great points where people commonly go wrong, so be sure to check it out! https://www.youtube.com/watch?v=GR-wOdzTxt8

Bugs And Issues:

Any bugs and issues please post in the Bugs-log discussion which can be found below, as always, these things are quite hard to test in their entirely so if anyone finds any issues please let me know!
Fastest way to get a response normally is via my discord (link above) throw me a mention and let me know what issues there are and I'll do my best to help you out!


Popular Discussions View All (18)
383
1
6 Apr, 2023 @ 7:14pm
PINNED: Bugs And Issues
Rdav
19
21 Jun @ 9:46am
Code update to recharge Battery
jfullernz
11
25 Oct, 2022 @ 8:25am
Miner goes backwards
DSavant
1,324 Comments
ARCHANGEL 25 Sep @ 10:47am 
Will the miner auto deposit its cargo or will I need to set up a conveyor sorter? Also does the script work as of sep2024?
[ST-R] Solutech [ST] 25 May @ 5:51pm 
Does anyone know if this script is still working . Tried it and no matter what I paste between the @@ all I get is an error that makes no sense at all saying

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
P1tt3r5 16 Apr @ 9:42am 
Question: does this script work in a scenario where multiple mining drones work out of one mothership? I know there are other scripts out there that do that but I’m finding all the options I can
Iron Duke 22 May, 2023 @ 6:00pm 
I don't suppose anyone could offer me some advice? For some absurd reason my miner when using this script simply won't dock with the home connector after filling up. It flies back and then stops a few metres above the connector and that's it. The p-block just says 'docking'.
AJ 3 Mar, 2023 @ 10:41am 
mine just slammed wondered up to the asteroid like a drunk going to a kebab shop then slammed itself into the ore completely dismantling the whole ship.
E-Man720 9 Jan, 2023 @ 6:06pm 
It's a blueprint.
Up1x 8 Jan, 2023 @ 5:36pm 
hey I can only see this script in F10 in survival and says it can only be opened in creative. In game scripts are enabled.
DarkBlaze 31 Dec, 2022 @ 7:12pm 
Running Thruster Control Program
135960078315825915/^/0^0^0^/X:0 Y:0 Z:0^X:0 Y:0 Z:0^X:0 Y:0 Z:0^X:0 Y:0 Z:0^X:0 Y:0 Z:0^/0^/True^True^True^

Paste Asteroid GPS Here:
===========================
@GPS:AutomineP1:9239.51:166992.82:-99113.09:#FF75C9F1:@
DarkBlaze 31 Dec, 2022 @ 7:08pm 
My miner just sits on the connector with 0 coordinates after giving it the coordinates in the custom data...
Audiacious 24 Dec, 2022 @ 8:56pm 
GPS keeps saying invalid format cant get it to run, any ideas?