Space Engineers

Space Engineers

Not enough ratings
Automatic Defense Drone
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
159.775 KB
12 Feb, 2022 @ 1:53pm
14 Mar, 2022 @ 2:16pm
14 Change Notes ( view )

Subscribe to download
Automatic Defense Drone

Description
Script for an automatic defense drone.
Patrol route capabilities, Deploying other drones and sending them to enemy position, Engaging detected enemies, automatic docking and recharging batteries.

Setup guide: (allways ignore parantheses)
Buildphase

Build a drone with a downward facing connector, one remote control directly above such connector, thrusters for all six sides, programmable block, at least one turret and at least one battery, gyro, and an antenna for setup.

*After latest update there is no need to give specific group and block names.*

Or just use this one which is ready for setup made by -GB-Polda

https://steamproxy.net/sharedfiles/filedetails/?id=2774703346

Setup- Patrol mode

Use remote control for moving drone around during setup.

1) Put the script into the programmable block
2) Dock your drone
3) Run the script with an argument "SETB"
4) Move your drone at least 40m directly above the connector
5) Run the script with an argument "SETB1"
6) Move your drone to a patrol position 1
7) Run the script with an argument "SETP"
8) Repeat 6) and 7) for more patrol positions (drone will patrol them in order)
9) After you are done setting patrol route run the script with an argument "SETPD"
10) *optional* if you want use comms to deploy other drones Run the script with an argument "IGC" (And set other drones)
10) Disengage the remote control
11) Run the script with an argument "ON"

*Drone should start working*

If you want to pause the drone run the script with an argument "OFF"


Setup - Deploy mode

Use remote control for moving drone around during setup.

1) Put the script into the programmable block
3) Dock your drone
4) Run the script with an argument "SETB"
5) Move your drone at least 40m directly above the connector
6) Run the script with an argument "SETB1"
7) Run the script with an argument "SWITCH"
8) Disengage the remote control
9) Run the script with an argument "ON"

*Drone should start docking. Then it waits until it gets a signal from other drone on patrol*

You can even switch drones between jobs, but you have to have a patrol route set to switch from Deploy to Patrol mode.


All kind comments and constructive critique is appreciated. It helps a lot.

Currently searching for volunteers to test my codes. Please check this mod´s discussion.

Have fun ;)

PS.: To do: Automatic ammo replenishment
Sending info about detected enemies to base

WIP - Please be patient and comment issues you find
(My first big script, so expect a lot of bugs)

I have irregularly busy work and this is only a passion project. Sometimes there might be long breaks between updates, but I hope to come back to it as much as I can.

Popular Discussions View All (1)
2
8 Dec, 2022 @ 2:28pm
Help needed
-GB-RedBull CZ
30 Comments
Dots 9 Aug, 2023 @ 12:56pm 
is there any updates planned or is there a video tutorial on how to set it up?
-GB-RedBull CZ  [author] 22 Jan, 2023 @ 11:08am 
Thanks everyone for patience and awesome feedback. I am right now very busy and hope i can get back to the project as soon as possible.

@Sir Connery; @[BR]SharkStrike;
Yes I am aware that Keen is adding AI blocks to the game. This was always a pation project so I dont mind working on it even if it will be rendered useless. As SharkStrike says I too think that scripts will be needed, If my script will be rendered useless, I will surely get a new idea and create a new project.
[BR]SharkStrike 7 Jan, 2023 @ 1:18pm 
@Sir Connery
The new AI blocks still won't do everything that is expected for this purpose of automatically defending bases and especially ships.
Scripts will still be needed anyway.
This project (and others that will arise) should actually be redirected to work with the new blocks.
Sir Connery 6 Jan, 2023 @ 7:21pm 
This scripts functionality will effectively be replaced at the next Keen update with the Grid AI blocks.
I don't think anyone should invest time into this.
skiittz 6 Jan, 2023 @ 7:20pm 
welp. ignore me. after picking through your code, adding additional debug statements and reverse engineering your script for like 2 hours....i realized the upward facing thrusters were damaged and that was freaking out the remote control block (which appears to be a keen issue not yours).

Sorry for the false alarm -- good job!
skiittz 5 Jan, 2023 @ 8:07pm 
Ok so I recompiled the script after setting up, and now testing in the presence of natural gravity and no longer get the nose dive behavior....but now they stall over the connector....

I must be doing something wrong, I just don't know what I've messed up yet.
skiittz 5 Jan, 2023 @ 12:10pm 
additionally, after being deployed and destroying the enemy, the drones seem to just wander off into the void instead of returning to dock
skiittz 5 Jan, 2023 @ 8:11am 
When attempting to dock, instead of using the downward facing connector, it appears to try to put its nose into the station connector. anyone else having this issue? Remote control is oriented forward.
royalrollin 28 Dec, 2022 @ 3:55pm 
Works well, but is there a option to tell the drone go home? With "OFF" it´s just stopping.
Nullblaster 19 Dec, 2022 @ 9:42am 
This. This is exactly what I've been looking for. And I'm not even worried about ammo replenishing, Isy's Inventory Manager can take care of that as long as everything is piped. As long as they recharge on their own, it's fine.