Space Engineers

Space Engineers

AI Mining Drone Script
172 条留言
Dots 2024 年 6 月 6 日 下午 9:45 
mod very outdated. has not been updated in 5+ years and you waist time if you try this
Omega1102 2019 年 4 月 7 日 上午 1:53 
I am working on a MiningDrone with Atmospheric Thrusters. The Script is showing some obsolet lines but they don't matter.
Now my problem is i have a Oxygen generator to fuel a Hydrogen Engine. The problem is that as long as ice is in the Oxygen generator the Drone Antenna shows "waiting for unloading cargo".
Dose someone know how to exclude the Oxygen generator from the Cargo?
Enigmus 2018 年 9 月 7 日 下午 12:05 
I would love to try out the updated version.
Devlah 2018 年 8 月 30 日 下午 10:19 
Thanks PirateRockabillyPunksInSpace! I remember spending hours at a time with DerLaCroix fine-tuning and working out bugs. It was a labor of love for me, as I really enjoy the automation aspect of this game. Please be sure to give us a link to the workshop when you eventually upload it. Meanwhile, I'll keep an eye out for any functional alternatives that pop up.
TheGoudaShoota 2018 年 8 月 29 日 上午 12:14 
@Graywolf After a bit of poking I got this to work, I still need to ensure it returns, but I at least got it to go to an asteroid, mine it, and start returning. Follow the directions exactly (especially the front and rear bit; I used a control panel, and the rear connector for them) it seems to work fine; barring code adjustments that is.

Since it seems the original person is no longer maintaining this, I might upload it with my adjustments (that will likely also become unmaintained because I just wanted this to work, and dont want to do maintaining on it).

Things of note:
ITS EXTREMELY SLOW. It takes a while for it to take off and move forward during mining. Watch your thruster group, you'll see that its slowly increasing speed when it says 'heading out'. You can hackify this by bumping the thrust, after a bit it will finally decide to start moving on its own. Same goes for mining. I'm gonna see what I can do about that because 130N is too damn slow to mine reasonably
Graywolf 2018 年 8 月 25 日 上午 1:57 
YEAH DOES NOT WORK :(
crafter360 2018 年 8 月 1 日 下午 7:22 
Like is there a specific code that works best?
crafter360 2018 年 8 月 1 日 下午 7:09 
What is the best set up of commands you have found?
Kam Solastor 2018 年 7 月 7 日 下午 12:59 
This seems to be broken at the moment. Throwing a few exceptions.
yankeevader 2017 年 11 月 29 日 下午 11:02 
Hmm. so I can get the ship to depart, it goes straight out for 2km stops, switches to heading out and slowly comes back to the ship. doesnt dock or anything just kinda floats lol.

any chance this will be getting updated or anyone know of a script that does what this one did?
supersquid2000 2017 年 10 月 12 日 下午 5:26 
Man I wish this worked. It would be perfect for the world I'm playing right now.
Gladi 2017 年 8 月 31 日 下午 2:21 
Hey any Update for this script?
Airomis 2017 年 8 月 20 日 上午 11:04 
Is there a test drone we can use? Like the ship that you made the script with?
Enigmus 2017 年 8 月 11 日 下午 1:48 
Touching base to see if a solution was in site. I also wanted to request a hydrogen tank refill option during docking. The script looks too good to be true. I'm looking forward to giving it a try.
DerLaCroix  [作者] 2017 年 7 月 29 日 下午 12:28 
It's currently broken due to new API. I'll try to fix it.
Seronjo 2017 年 7 月 27 日 上午 4:51 
Is this script still functioning with the last updates because i have this error : http://prntscr.com/g0y0l6
I dont know how to resolve this, if someone could help me I would greatly appreciat
antriot 2017 年 4 月 19 日 上午 9:18 
My drone keeps stucking at "Ship inizialized". I suppose I've done something wrong with the setup. Where do I have to add the comment line? Your description is not clear at this point.
Omen 2017 年 4 月 10 日 下午 1:16 
So i tried to use this but it keep bumping into the wall and get crocket and stuck.
Devlah 2017 年 3 月 11 日 下午 8:09 
It seems to be becomming popular to use GitHUB for these projects. I wonder if it might make it easier to collaborate?
c.olivie23 2017 年 3 月 11 日 下午 8:02 
any chance of a 2017 update of this script?
DerLaCroix  [作者] 2017 年 1 月 10 日 上午 9:35 
@ allbad - sorry, i only have it in plaintext, with occasional older saves when I do something bigger.

@blockdude - right now, I am not aware of access to the ore detector data, and if it would give you directions you could use. I'll look into it. the range would be much better than the detector, as well
allbad 2017 年 1 月 10 日 上午 4:24 
@DerLaCroix - Do you keep your script in source control? I'd like to contribute with merge requests.
Blockdude 2017 年 1 月 9 日 下午 7:25 
@DerLaCroix The sensor resets just before scanning, but couldnt you use an ore detector along with the sensor, see if there are any ores in it?
DerLaCroix  [作者] 2017 年 1 月 9 日 下午 3:40 
@ blockdude - The autopilot is a bit erratic sine the last update in reaching it's waypoints - I'll need to give it a bit of leeway to avoid the autopilot going in circles. The second one could be due to distance to the asteroid and the form . if it scans, it scans in a 50x50 area - if it turns around to mine, it will scan forward in a cone of the ship size diameter you specified. If that happens to point towards a hole or indentation of the asteroid and cannot detect the asteroid within 50 m, it can come to the conlusion the asteroid is too far gone to be mined properly and return home. I'm thinking about trying to add a camera rayscan into the mix to improve asteroid detection. Maybe it is time for a rewrite, like when the autopilot was introduced.
allbad 2017 年 1 月 9 日 上午 10:07 
Who has an example of a good mining drone/ship to use?
Blockdude 2017 年 1 月 7 日 下午 3:49 
Update2: Once the miner flies to the #TARGET, it sets the sensor to mining config, 'scans' for asteroid, then returns home after being unable to find it.
Blockdude 2017 年 1 月 7 日 下午 3:48 
Update: I have none of those bugs, but more have surfaced after modifying parts of the script to fix more bugs. Now when it is beging the dock prodcedure (dock1 and !dock2, aswelld as the rest). It goes to one of the waypoints, over shoots, corrects, repeat. After a few tries it claims it will attempt again after interuption, which it never recovers from.
DerLaCroix  [作者] 2017 年 1 月 7 日 下午 1:21 
I have encountered the same problem now, as well - but I realized that this is not a script issue. Seems the new update have changed something, so that on docking and undocking, the groups might occasionally get "forgotten", somehow. Not sure how to fix this - it went away after a couple of test tries. It's a new bug, and might go away in the next updates.
Blockdude 2017 年 1 月 4 日 下午 1:19 
The last message it shows states it recived my arguments correctly, it shows it was Re-init'd, recivied mining coords and just to be sure I added #go so it states it will undock aswell. It is somthing about the arguments
DerLaCroix  [作者] 2017 年 1 月 4 日 上午 10:34 
what is the last message the antenna shows ?
Blockdude 2017 年 1 月 3 日 下午 2:24 
I have all of these, The antennas name is changed, the MEMORY is written, and the SENSOR is named correctly, all should work.
DerLaCroix  [作者] 2017 年 1 月 3 日 上午 11:49 
Do you gave the sensor block named SENSOR? and an antenna? maybe you are missing the AI_MEMORY lcd panel?
Blockdude 2017 年 1 月 2 日 上午 11:56 
@DerKaCroix I have an issue with mine, it will run with the argument just fine, but when the timer runs it without any arguments, it throws a generic acception about how the blocks werent found, but they are all there. Thruster Groups, Remote, FRONT and REAR
DerLaCroix  [作者] 2016 年 12 月 28 日 上午 9:32 
have you initialized it while NOT being locked? You should - if it is docked while being initialized, it might confuse connectors, and is trying to unlock a different one.
Reptrillian 2016 年 12 月 27 日 下午 7:12 
The connector stays locked and the antennae says the batteries are 100% charged but it doesn't do anything after that, and yes I have my thruster groups made and my RC set to one way. Thanks for the reply!
DerLaCroix  [作者] 2016 年 12 月 24 日 下午 4:29 
Do you have the Thruster groups made? FORWARD/REVERSE?
Does it stay locked (greenlight) or does it turn yellow but doesn't leave, even though it is saying "Departing".

Do you have the remote control set to "One Way?"
Reptrillian 2016 年 12 月 24 日 下午 2:14 
Great work, I've had this script work with varying success but my biggest problem seems to be getting the ship to leave the connector after #reinit, it says the the batteries are 100% charged but it stays locked. The cargo is empty, I have all hardware requirements, and ownership sorted out. Any ideas?
DerLaCroix  [作者] 2016 年 12 月 22 日 上午 9:47 
It should work wherever you can use a remotecontrol autopilot and have something that registers as asteroid on a sensor. I don't know if the planet ground registers as such, but there is no "planet" setting.
kapperbeast 2016 年 12 月 22 日 上午 12:41 
would this work on a planet?
DerLaCroix  [作者] 2016 年 12 月 21 日 下午 2:58 
Update for new Beta Api. Some changes were scriptbreaking
LoveJoy 2016 年 12 月 8 日 下午 1:52 
"Sorry - Wife got a child"? LOL Stuff happends for a reason you know. :)
Congratulation to BOTH of you. (or is it just the wife)

Anyway, am going to try this out, and saw you happy announcement.
DerLaCroix  [作者] 2016 年 12 月 7 日 下午 3:21 
Sorry - wife got a child, and internet was offline for a month due to house renovation.

@Dampiir - Deprecated warning was no issue, script ran, anyway. Still, fixed in current version.

@Vilkacis - If you add an ejector system, renaming the actual ejectors(not the rest of the system) "GARBAGEDUMP", and using the GARBAGEDUMPON flag, the ship will use it to eject unwanted materials during mining (not during travel to and back, for this would clutter the area and cause issues with autopilot and other flying)
Alter 2016 年 11 月 12 日 上午 7:33 
What exactly does #GARBAGEDUMPON do? Is there some way to use the script to eject stone, rather than having a dedicated sort/eject system?

Thanks for the great code btw. Takes a little time to work out the kinks, but works really efficiently once you figure out what it's trying to do.
Dampiir 2016 年 11 月 9 日 下午 9:28 
Anyone know if this still works? I keep getting errors:
Line 1254 <IMyInventoryOwner> is deprecated and after googling I found I could replace it with:
<IMyCargoContainer>
It compiled ok but when I run it with:
#TARGET GPS:Asteroid:-55263.61:89909.51:-21471.21:
It says Object reference not set to an instance of an object.
Any ideas?
Vaagventje 2016 年 10 月 27 日 上午 5:10 
Ahh okey, ty for clearing that up :) to be honest. i havent looked at the drone for like the past 10 hours. its just doing its thing. love it.
DerLaCroix  [作者] 2016 年 10 月 26 日 下午 12:00 
The diameter is in meters - it needs to know how big of a tunnel it needs to dig to properly know if it can fit through a hole or not.
Vaagventje 2016 年 10 月 25 日 下午 4:17 
Really Really nice script, with the reinitialize its actually possible to move my mining ship and it wil just remeber its new docking location :D really nice. i had a little bit of a problem at first when i by accident named the Forward thrusters revers, and the reverse thrusters as forward. gave a very.. intresting result... but its all okey now. its awaiting go permission after its 5th run to a meteor.
uhhm the only question i got is... uhhm the script needs a diameter. and in the example on this page it "int shipDiameter = 8;" now iam just wondering... 8 what? meter? small/large blocks? (depending on ship) it is working now with the "factory" setting. but maybe i was just lucky with my ship design iam not sure. but that said, Really Really nice script. nicely done
Docalophagus 2016 年 10 月 8 日 下午 3:18 
Nice!
DerLaCroix  [作者] 2016 年 10 月 8 日 下午 3:05 
KaTsulChi has added a LCD save to the script, and I incorporated his changes in the new version.
DerLaCroix  [作者] 2016 年 10 月 2 日 上午 7:10 
Yeah, server reset does bad things to scripts. That solution would work fine. I might change it to that, some day.