Space Engineers

Space Engineers

72 ratings
Autopilot Mining Drone scripted with programmable block (Upd 4: can be used on remote servers)
   
Award
Favorite
Favorited
Unfavorite
Type: World
Mod category: Exploration
File Size
Posted
Updated
2.455 MB
27 Jan, 2015 @ 1:30pm
26 Feb, 2015 @ 9:47am
14 Change Notes ( view )

Subscribe to download
Autopilot Mining Drone scripted with programmable block (Upd 4: can be used on remote servers)

Description
Hello, engineers!

This is the third version of automated mining drone, programmed with ingame scripting.
The first one was:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=378190300

This version has some improvements, making it available for use in your own worlds.

It is not more divided in drone and carrier, it's all in one ship, and this is much more easy to use.
It still has merge block, which can be used for carrying drone with other ship. Drone has cockpit inside the ship. It is not for piloting actually, cause you see nothing from cockpit.

Drone has following functions:

A) Remember connector - You can set connector, you're docked to as your drone base connector, to which it will return to drop off ore. This function can be called from rear remote control.

How to do step by step:
1. Get in drones cockpit
2. Press "2" to activate rear control
3. Dock to connector, using camera (pres "1") or external view ("V"). This step can be tricky, because i've placed 4 landing gears around connector and they all should be locked before you connect. You must place your drone almost ideally coaxially to base connector to lock all 4 of them. These gears are supposed to prevent permanent connector crashing while drone is docking. Base connector "sucking force" is high enough to brake small ship connector exidentally after every 5-10 dockings, to avoid this drone locks landing gears first and only than turns connector on.
It means, base connector should be surrounded by some blocks to make landing gears lock possible. Use non-deforming blocks for this like glass or
catwalk plates.
4. Press "4" to remember this connector.
5. Unlock and disconnect, now drone will return to this connector.

B) Set drilling grid - It sets entry point and angles for your mining. This function can be called from front remote control.
How to do step by step:
1. Get in drones cockpit
2. Press "1" to activate front control
3. Align your ship in front of asteroid (stay approximately 50 m from asteroid surface), using camera "1" or external view.
4. Press "2" to set drilling grid. Drone starts aligning and mining automatically after that.
5. Get out of cockpit, drone will now do everything on its own.

C) Pause - this function simply pauses drone auto mode and returns control to pilot. Pause can be called from cockpit "3" or by pressing button under ship connector.

D) Throw out stone. This function is called by bot navigation script, while mining. It does not need any control.

Load world and watch 1 drone working. And second stayng idle near your base. You can bind it to any free connector on your base or even to connector of red ship, floating nearby.
Than you can go to second asteroid and set drone to auto-mining mode.
You can copy/paste it to your own world, or make blueprint. If you change ownership of drone, don't forget to recompile all programming blocks.
Important: Base or ship, to which drone drops off ore, must have some containers included in "BaseCargo" group.
You can also try to use it in multiplayer, but it won't work reliably. Maybe, in next update i'll fix most of issues and this will be useful for multiplayer too.

Of cause, this drone still needs many improvements, it has very "dirty & raw" scripting and does not handle most of exceptions.
If floating objects set to 256, sometimes floating stones block drone and it gets stuck. Docking to base connector is too slow. Optimal trajectory and speed will come later.

------------------------
Known issues and some repair shedules:
A )Landing gear exidetally explodes while undocking drone. I' put these landing gears to avoid connector crashing, but it seems, that exploding connector was replaced with exploding landing gears. To repair landing gear do following:
1. Place new landing gear
2. Include it in group "LandGears", so script can find it.
3. Recompile and launch "PBNavComp" programmable block.

Try lock/unlock landing gears 2-3 times before remember connector to check If gears will or not blow up.

B) Using Large thrusters on sides of mining ship is not a really good idea, but I'm testing this drone on server with thruster limit per ship, so i can not use small thrusters. To repair broken thruster:

1. Place new thruster
2. Include it in group "Thrusts"
3. Include it in group "UThrusts", "DThrusts", "LThrusts", "RThrusts", accordingly to it's direction ("LThrusts" for thruster which moves ship left and so on)
4. Recompile and launch "PBNavComp" programmable block.

Just try to experiment and comment what you think.
-----------------------------------------------------------------------------
Update 3 Notes:

1. Landing gears replaced with wheels. No more explosions while docking/undocking.
2. Large Thrusters replaced with small thrusters, cause they're more reliable.
3. Some changes in script to make it more universal for use in upcoming 4 and 2 drills versions.

100 shafts mined in auto mode without stucks and crit damage. It's about 26 megaliters of ore. Took about 8 hours for 2 drones to do that.
----
In next update i will try to make it useful on remote servers. Just need a bit more testing with system clock.
-----
Upd. 4

Here comes alpha version of mining robot adopted for using on remote servers.
There are some constants in the begining of "PBHrvNav" programmable block:

--------
string ShipName="Harvester5"; // Ship Name, should be the same as beacon.

int Clock=20; // This is system clock var determining how frequently navigation script will be executed. Use values from 1 to 60. For UPS=60 (Simulation speed = 1) 60 means 1 run/second, 20 - 3 runs per second. For lower server performance like "Space Central Europe" 20 can be 1 script run per second.

float SimSpeed=1f; // Simulation Speed, can be lower then displayed.

float GyroMult=1f; // Gyro values multyplier. Do not set over 1 if you are not sure what you do. Can be set to lower then 1 if on your serv harvester always misses connector and can't ajust for docking.

float ThrustMult=1f; // The same as GyroMult, but determines lateral thrusters power. Not recommended to set over 1, lower values if harvester misses connector.

float BrakingDist=500; //Braking distance. If serv has higher speed limit should be ajusted to higher values.

int BrakeDelay=10; // Time needed to fully stop harvester after flight.

float DockGyroPower= 0.5f; // This param lowers gyro power on last 20 meters of docking for more precize pointig to base connector.

float MaxCargo=5; // Cargo load in % of Max capacity on which harvester will return to base.
--------------------------------------

for "Space Central Europe" serv i've used folowing set:

string ShipName="Harvester5";
int Clock=20;
float SimSpeed=0.7f;
float GyroMult=1f;
float ThrustMult=1f;
float BrakingDist=500;
int BrakeDelay=10;
float DockGyroPower= 0.5f;
float MaxCargo=80;

for "FOHSE":

string ShipName="Harvester5";
int Clock=20;
float SimSpeed=0.8f;
float GyroMult=1f;
float ThrustMult=0.6f;
float BrakingDist=4200;
int BrakeDelay=20;
float DockGyroPower= 0.5f;
float MaxCargo=80;

As always your reports are welcome. Have fun and don't get servers admins too angry by breeding this molerat in high quantities.


------------

Upd. 4.1

Small 4-drills version of mining robot added. It's better for multyplayer because produces less system load. On many servs it does almost no effect on sim speed.
--------

Upd 4.2
4-drills version now uses Text panel to store data.
Also some text panel indicators added in front of cockpit.
285 Comments
Dots 2 Aug, 2018 @ 10:03pm 
This thing is totally broken with current game
Wictor_Little 10 May, 2017 @ 9:29am 
Can anyone confirm this, im going to make one for the server i am in and the admin is a slave driver :P we need more recourses... is this working on version 1.179
Blitz 22 Jan, 2017 @ 2:27pm 
Can you suggest a newer bot that works in current game with no mods? Thanks
Dirzylene 5 Sep, 2016 @ 4:40am 
Кто-нибудь знает, возможно ли создать полностью автоматический дрон - после активации сам вылетает, сам ищет близкие астероиды, сам добывает и сам разгружается/заряжается? И то же самое касательно боевых дронов - по активации вылетают и охраняют корабль?

Does anyone know it is possible to create a fully automatic drone - so it takes off after activation, looking for nearest asteroids, mine aster and return to station for unload/recharge? And the same thing about combat drones - to fly off after activation and protect the main ship/station?
Zarok 5 May, 2016 @ 10:36pm 
Жаль(
Pennywise  [author] 5 May, 2016 @ 7:42am 
Zarok это оооочень старый бот. он уже месяцев 8 не работает
Zarok 5 May, 2016 @ 5:07am 
Не загружается в игру
Pennywise  [author] 29 Feb, 2016 @ 2:13am 
xz You need linear algebra, if i name it correctly in english. Vector and matrix operations, transforming matrixes and stuff alike.
xz 28 Feb, 2016 @ 2:18pm 
Very interesting script. I want to understand but I do not know math. What a math section I need learn up to understand the formula of void GetCoordsRotMatrix () function? since the vector Z I have nothing to do not understand ,but I definitely need it to understand =))
Pennywise  [author] 19 Oct, 2015 @ 10:14pm 
they dont check collisions.
these drones are very old, only one which was updated and still works is here:
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=394837487