Space Engineers

Space Engineers

Rdav's AI Autominer Script
Suicide_Jack 31 May, 2018 @ 1:42am
Feature wishes/suggestions
Hi Rdav,

first off, thank you for your incredible creations.
You and the other Scripters and Modder are the reason for nearly 7000 hours of fun me playing this game.

On to my suggestion:
1.
can you integrate a battery monitoring function?
something like return tobase if batteries fall under a certain threshhold, stay there for time x or wait till batteries are full and start again.

2.
after watching the script in action it seams quiet load heavy while mining.
maybe you could simplify the mining mechanic by locking the gyros with override and just use a constant speed of 0.3 to 0.5 m/s which is the ideal mining speed for vanilla drills at which the drills don´t touch the voxel.

here is a piece of code which i like to use for miners which works fine in space and on planets: https://pastebin.com/RqUT8MFV
the only thing which i didn´t implement yet is the autorepeat of the PB, this still uses a self trigger timer.

maybe it helps you a bit.
< >
Showing 1-9 of 9 comments
thefinn88 14 Jul, 2018 @ 2:34pm 
Suggestion: In the documentation you list all the sides a connector CAN be on, where you could simply say "Any side but the REAR".

As a reader you kind of end up playing a game of "What side didn't I mention?"

Just easier to list the exception instead.

Great script man.
thefinn88 17 Jul, 2018 @ 9:32am 
Would love to see some mass control of this. "All return" etc.. And maybe some LCD status display.

Great job.
Rock'N'Lol 26 Jul, 2018 @ 5:22am 
+1 for the battery monitoring. love the script!
.!.Kingfish 20 Aug, 2018 @ 11:02am 
I messed with the script a little and added something things that I think should be integrated.

Battery levels. if the levels get to a certain point, it thinks it's full and returns. Once docked, it won't take off unless Batteries reach 100%.

Landing Gear. I have landing gears, when it wants to launch, it makes sure they are unlocked. And locked when its FIN and connected.

Dock Positions. I wanted my ship to go up higher to clear something that it kept bouncing into. So I added position modifiers to mine.

LCD display. Instead of using the program block echo, I'm in the process of getting rid of that and just have everything go to an LCD screen.

Not sure if matters, but if it's close to a certain time, say a server restart, I want it to FIN. Not sure if this is really needed, but I'm finding my ships stuck after a server restart. or is that something else?

I really wanted everything be done in 1 program block instead of having 2-3 program blocks that could possibly cause lag. especially with displaying stuff on the LCD... and batteries.

I had issues with the battery part. the script would get stuck or something. It may have been the server because other known scripts that monitor batteries seem to have the same issue.

I'm no programmer. And I more than likely did things wrong, but they work for me, I think lol. I never really tested it much and pretty sure it has bugs.
Erelaszun 29 Aug, 2018 @ 9:37pm 
+1 for LCD Display, and if it would be possable to have a remote LCD Status display (say at my base, so I can see the status of the "Mining Drone")
Rantalunta 4 Sep, 2018 @ 4:50pm 
Firstly, let me say, I love this mod.

I tried successfully with smaller miners, but with larger ones and plain Shaped some issues arose:
1. If the Thrusters have to much force, the miner stays before the roid and dances around, since with the smallest step (1 thruster push) it misalligns in the other direction. It stays there dancing like forever.

2. Returning to base is some kind of an issue, I had the connector at the bottom of my sheet and it danced around the connector... For that I would like to manually tell it a Waypoint(or teaching, by moving it to the "garage entry point"). This waypoint is free for rotation and stuff, so the miner rotates to the pervious teached direction and only interpolates the way to the final docking point, without collision detection. Example: with the connector at the bottom I like to aproach from the top, so the garage wayoint is 100 m above. When landing, the ship moves freely with collision detection to the garage waypoint and then only decends to the connector - easy, no dancing involved.

3. Reset functionality: While dealing with the issues above, it came up that the miner, when manually moved, is sometimes in an confused state. For that it would be great to have a RESET comand, which starts fresh from the start. So: saves the connector it currently is attached to,
reloading all Thrusters, connectors, etc. parsing waypoint data from custom data. There is some data stored in the background, we dont have access to, so hitting recompile wont change the internal confused state. changing the gps does partly that.

4. Starting the drills on leaving the docking point killed me almost 2 times. Although it is a good indicator, whether the thing is working, but the drills could be started shortly before ariving at the roid.

I know the intention of this script is to be as simple as possible so that fresh uses can get started really quick, so i would wish for an expert version, where we have more control over the actual process:

5. Since the roid is devided into parts, based on the GPS, It would be nice to tell it, which cell it should take as a start (and in which range). so if i got 2 miner I tell one to take the left cells and one to take the right ones.

6. setting the amount of ore or fill status:
Lets say you got a lack of Nickel, but just need a small amount, You tell the miner to fly away, but it will only come back, if it is Full, so it would be nice to set a quota. like X% Filled or 50t Nickel Ore

7. Additional Waypoints, like above mentioned, some waypoints to guide between obstacles safely would be great, Optional without collision check(in controlled environments, like Dock)
This could look like that:
ToRoid:
GPS:...;Coll=on; // starting
Target: auto // script figures out the way to target up from here
ToBase
GPS:...;Coll=on; // move to garage waypoint
GPS:home;Coll=off; // move to connector without collision check

This could be done for precission mode aswell.


Well I hope I didnt run you over with my suggestions.
Thx for reading :)
Dagon M Dragoon 4 Mar, 2019 @ 9:43am 
A way to script this so it works on planets without needing planets to test on is use 2 GPS points to make a plane and a number to set depth in meters. just an idea.
Zdendys79 4 May, 2019 @ 2:33pm 
Hi everyone, have you any GIT page with this Rdav's AI Autominer Script? (Except pastebin)

I've created some user-friendly cosmetics enhancements, and I'd like to present them as a fork to the original script. I'm a C # beginner, but I have some experience with scripting languages. I only experienced C# thanks to SE.

I would like to contribute to the development of this sofisticated script.
Kylen 22 Feb, 2021 @ 4:22pm 
Could you add something that allows you to control all the miners and stuff from a LCD and to monitor what they are doing
i love your scripts
< >
Showing 1-9 of 9 comments
Per page: 1530 50