Space Engineers

Space Engineers

Not enough ratings
Easy Drone Wiring & Programming
By Drumkommandr
A step-by-step checklist to easily learn how to properly set up drones quickly.
3
   
Award
Favorite
Favorited
Unfavorite
Introduction

LET'S BEGIN.
I just learned drones!

And, boy, did it ever suck. The resources were split between three videos that all peripherally did what I wanted, but not quite, and one good Reddit post that gave me the last tidbit to make it all work right. All I wanted was a few simple things:
How do I build a combat drone?
How do I make it fight with me?
how do I make it stay in formation?
how do I make it come back without manually controlling them one at a time?
Ignorance kept me down for a bit. But, I did overcome it. Now, I know the formula, and so I get to pass it on to you. So, let's blow some stuff up automagically.
The Universal Drone [and all others too]
REQUIRED TO UNLOCK ALL FUNCTIONS

-1 AI Flight [Move]
-1 AI Basic [Task]
-2 AI Recorder
-3 Timer Block
-1 AI Combat [Defense]
-1 AI Combat [Offense]
-2 Event Controller
-1 Antenna
-1 Remote Control
-1 or more thrusters in each direction
-1 or more weapon blocks
-1 or more gyroscopes

Certain functions do not require all blocks. In these cases, only indicated blocks are required.

RECOMMENDED

-Armor Blocks
-Batteries
-Merge Block
-Connector
-Camera[s]

AVOID:
-Subgrids
-Welders & Grinders
-Grid turrets & weapons
-Klang drives of all types

All of these will cause errors in the software.
Preliminary Preparation for Punishing Pinheads with Predjudice
There's a few things to do before we can get started smoothly. First, let's get some proper names on these blocks:
-AI Recorder [Takeoff]
-AI Recorder [Landing]
-AI Basic [Patrol]
-Timer Block Patrol
-Timer Block Fight
-Timer Block RTB
-Event Controller Fuel
-Event Controller RTB

You're also going to go into the control panel for the AI Recorders, Defensive, and Basic [Task] blocks, and select their home beacon from the list. Just make sure it's highlighted with the selection, and you're good. Last firmware change: in the AI Flight [move], check the box that says 'precision mode'. This ensures you're aiming properly at things and destinations before moving.

Now, hop into the drone's remote control. Pop your G menu and pick a toolbar you won't look at again. I use 9, myself. Add these commands in an order that pleases you:
-AI Recorder [Takeoff]: Set Waypoint
-AI Recorder [Landing]: Set Wayppoint
-AI Recorder [Takeoff]: Play On/Off
-AI Recorder [Landing]: Play On/Off
-Connector: Switch Lock
-Connector: On/Off
-Timer Block RTB: Trigger Now
-AI Flight [Move]: AI Behavior On/Off

Now, we're wired up to start. Dock the drone. Make sure AI Flight[Move] is OFF in your toolbar.

Here, you're going to turn off the connector instead of undocking; you'll probably be here long enough for it to pull you in again. Sink into the connector a bit and add waypoint on both [as you will for the rest of these]. Then raise up out of range of the magnetic assist and repeat. Go away until you clear the nearest object by 30m and repeat. Move to the final desired undock position and set one last point. Turn the connector back on.

K menu time, now for the real wiring.
Time to Become a Hacker i Guess
As of now, your drone should have one populated toolbar at least, and now be hovering at its final undock point. Here's where we get all checklist-y. As if we haven't been the whole time. Whatever. I do what i want. Press K to continue.

First thing: go to the AI Recorder [docking] and hit 'Reverse Order'. This'll stop your drone from taking a core sample off the deck the first time you hit play. Now, for all you vanilla players, you can skip anything in {braces}, but I do know how prevalent Defense Shields is, so I'll include the steps to prevent your shields from interacting to throw your drone clear of control range before you can stop it.

Set up actions for these by clicking on the waypoint on the list, then hitting 'Setup Action'. your recorder blocks should look like this:

AI RECORDER [TAKEOFF]:
Waypoint 1
+Connector:Unlock
Waypoint 2
{+Shields: Up}
Waypoint 3
+AI Flight [Move]: Collision Avoidance On
Waypoint 4
+Timer Block[Patrol]: Trigger Now

AI RECORDER [DOCKING]
Waypoint 4
+AI Flight [Move]: Collision Avoidance Off
Waypoint 3
{+Shields: Down}
Waypoint 2
Waypoint 1
+Connector: Lock

Hit Play on the Docking recorder and check. After it docks, hit Play on the Takeoff recorder. Always check your work at each step possible. Having confirmed they both function as intended, hit Play on the landing sequence once more, and dock up.
Shoot, Move, and Communicate [ah-ha]
Now that we've got the precise stuff out of the way, time to get messy. What follows will be a list of:
BLOCK
-Settings
...-Wiring dump
...For each of the required blocks. Don't ask it to do anything that involves it going more than 2500m from the ship, as it'll lose signal and drift. This reveals our first strategic must: even under evasive maneuvers, one must watch to ensure their drones are still in range. {This means that, especially for shield users [more specifically how WC changes weapons], drone range is usually also turret duel range as well.} Vanilla, you'll instead want to up your PDC count by like a whole frickin lot- rockets will be your downfall just as much as grid missiles. Kill it with fire. Weapons fire.
That said, Go-Go Gadget Infodump!

AI BASIC [Patrol]:
-Select Objective: Follow Home
... -Home List: Select your carrier's beacon here.
-Min. Range from Home: Reasonable for you.
-Wander when Idle: Defensive drone, On- Attack drone, Off.
While testing, maybe keep it under 100m. If you want a cloud, or a solid orbit, set the min and max ranges within 50m of each other. Don't set the min under 40m, as collision avoidance will start making it break off and course correct instead of firing.

AI DEFENSIVE [Combat:]
-Defend against: Enemies
... -With Subsystem: Weapons
-Lock Target checked
-Target Characters checked at your discretion [not recommended for attack drones]
-Flee Trigger: Always
-Actions:
... -Timer Block Fight: Trigger Now
... -Second slot is specifically empty
-Flee Destination: To GPS/Home and select your carrier beacon
-Evasive Maneuvers checked
If the offense block gets sniped, the defense block will still get you close to your ship so you can manually hit dock on the autopilot. The wise builder does not place them adjacent to one another.

AI FLIGHT [Move]:
-Precision Mode: On
-Speed Limit: Vanilla AI gets weird above 300m/s. Definitely don't try to make your drones auto faster than 1km/s. Vanilla bois: just crank to max.
-Min. Altitude: 10m
-Max Pitch Angle: 45 or less under gravity for safety's sake; 90 in space.
-Max Roll Angle: Same text here.

AI OFFENSIVE [Combat]
-Attack: Enemies
-Target Priority: Closest
-Target Search Interval: 10 seconds
-Attack Pattern: Dictated by design
-Minimal Distance: As close as you're comfortable taking it, sniper drones 600m
-Maximal Distance: The range of the shortest weapon aboard, usually 800m
-Evasive Maneuvers checked

TIMER BLOCK LAUNCH
-Time: 0:01
-Actions:
... -AI Flight[Move]: AI Behavior On
... -AI Recorder [Takeoff]: AI Behavior On
... -AI Recorder [Takeoff]: Play On/Off

TIMER BLOCK FIGHT
-Time: 0:01
-Actions:
... -AI Offensive[Combat]: AI Behavior On
... -Timer Block RTB: Start

TIMER BLOCK RTB
-Time: as needed for sorties. This time will be how long before it breaks off and returns to dock.
-Actions:
... -AI Flight [Move]: AI Behavior On
... -AI Recorder [Docking]: AI Behavior On
... -AI Recorder [Docking]: Play On/Off
... -AI Offensive[Combat]: AI Behavior Off

EVENT CONTROLLER RTB
-Event: Block On/Off Switched
-Available Blocks: Pick a light on your carrier. Somewhere visible. Rename it so you know.
-Select Actions:
... -Timer Block RTB: Trigger Now

Take that, brain. you stared at this screen closer than your favorite porno. now, i need to explain myself, kinda a lot.
What Sorcery is This
What did all of that just do? It added in all your automatic functions, and it crosslinked it like japanese chainmail in the software, is what it did. Let's go down the list of things your drone will do now.

1.It'll take off on its own at a button press. In fact, the whole swarm will, or whichever ones you want.
Here's how: in the control panel, look for the AI Record[Takeoff] blocks of your drones. Group them however you like, into flights, all at once, in a pattern, whatever you like. Add that group to your carrier's toolbar. Bam: instant deployment.

DO NOT MOVE THE CARRIER WHILE DEPLOYING OR RECEIVING. YOUR DRONE WILL ABANDON ITS PATH AND RESUME ITS PREVIOUS PATH WITH ITS LANDING SETTINGS STILL HALF DONE.

2. It'll follow your ship and stay in something like a formation.
Pick a different light, in your sight-line. Make it blink once every 10 seconds. This will help you see how often the drone will look for the beacon. meaning, if you move away just after its scanning sweep, it'll stay there for an additional 10 seconds until it realizes you've moved. This can make you out-range your drones before they catch up, especially in speed-modified worlds. Tiny quality-of-life item: huge savings in materials on drifting drones.

3. IT FIGHTS!
{If you're using shields, it means you're also using WC. As such, the weapon list on the combat block is auto-populated and greyed out. ignore this. The old trick still works better: manually set its facing priority to Front and it'll be able to snipe again.} On a valid target lock [meaning within the parameters we've set: Enemies with Weapons on their grids], the drone will do its thing and go pew pew all on its own.

4. IT FLIES!
Evasive maneuvers are engaged at all times during sorties. It'll do its best to miss impacts by a planck length as it lines up is own shots. Gatlings will shoot rockets down, still, and it's unnervingly accurate in Precision mode- accurate enough in many cases to take down gridmissiles in flight.

5. IT F*UUUU***S...OFF. AND BACK!
it goes out. It flies until the sortie timer runs down. Then it returns. Nothing you do short of using Whip to SHART on it will make it come back before that timer block triggers, short of manually controlling it and hitting the Recorder.
That's stupid, though. So, let's apply liberally some Arcane Might.
Remember that light i had you name earlier? Heehee. Toss it in your toolbar, the On/Off switch for that one light. Deploy drones and let them finish the undock sequence. Then, turn that light off.
ohgodholycraptheycamebackrightaway.jpg
The Event Controller is feature/bugged in this way: it still monitors for its assigned part, even if it's not on the grid anymore. That's right, you heard me: you just used quantum entanglement as a means to recall your drone. Less to do, and cleaner than SHART.
Finally, Something that Works
Before you do anything else, do this.
-CTRL+B and get another.
-Erase All waypoints on the Recorder blocks.
-Delete the previous blueprint.
-CTRL+B the wiped one. This will be your BP for new drones, that are already wired up and ready to fight.

For this drone, from now on, here is your new drone procedure:
-Print new drone
-Dock to home point
-Record takeoff sequence
-Assign actions to waypoints
-Press dock

Your fully-functional drone is now ready to fight.

TO MAKE THIS A DEFENSIVE DRONE:
-Add another Event Controller. Two, if you wish to monitor both flight time and ammo.
-In the AI Task[Patrol]: Wander when Idle checked, and maximal range set to patrol perimeter width.
-Event Controller should be set to trigger Timer Block RTB when Batteries are below 15%, without the AND GATE box checked. Monitor the most ammo-hungry gun on the grid if you want it to return to reload when empty.

INSTAFIGHTERS
Print your first one on its deployment stand. Record the takeoff sequence and BP the prototype. Event Controller the merge block when it turns off to trigger Timer Block Fight. Replace Timer Block RTB in all wiring instances instead with the self-destruct. For kamikaze effect, erase Timer Block RTB's Actions and replace it with changes to the Offense AI to Approach; and the Defensive, and all the timers, off.

MINIMALIZATION
It is possible to do away with one of the recorders. However, this is for the advanced or the confident. Your RTB and Takeoff timers will include Reverse on the Recorder, and the Ons and Offs will now all be On/Offs. This is slightly more fiddly to reset after a software failure, but will reduce the number of blocks involved. With clever arrangement of tasks, it is also possible to eliminate two of the three timer blocks, but it will make it much more difficult to change or add functions. At least one extra seems good practice.

MAXIMALIZATION
Tiny, disposable drone swarms work best in Tyranid numbers. Heavy, fighter-strength brawlers pair up well with smaller ships as an augment. The larger the parent craft, the smaller the drone should be to pair effectively. After all, they're there to cover the gap in your tactical presence.

FINAL THOUGHTS
Do. Not. Forget. About. Decoys. Got a sniper cruiser and you want to carefully line up your shot? Getting outclassed by SPRTE with upgraded weapons? Reaver attack?
DECOY MISSILE. DECOY SWARM.
Suddenly enemy guns mean nothing to you. This is the vanilla shield: Decoy missile. It can't hit you if it can't hit what it's being forced to aim at. They can be gravity-gunned. Safezone launched. Bomber dropped. Gyro-scattered. Printed by the literal dozen. Replace your klang gun projectile with one. Stop sleeping on that sh*t. It's the actual most valuable block. And it's packing peanuts to what your lowliest PAM miner brings in. Okay, that's all the ranting I have on that. Get yourself a swarm and go find that dude who just griefed your cave base.

Let All Those who Oppose the Hive Feel the Wrath of the Swarm.
-Amtgard rules, V8 "Spicy"


Have ALL THE FUN!
2 Comments
SuperDk7 Jul 19 @ 7:39pm 
Thank you! This is WAY better than any video. Just a note on the Event Controller bug that monitors the original grid light. You can also use the Signal Action Relay. Have several on drone. Channel 1= return home and use the other two channels for other commands. Use an Event Controller to monitor the action relay. The Signal Action Relays work throughout antenna coverage, not limited to the 2.5km active player area, but the World default sets the distance to 200m if the player is offline. The offline default distance can be changed in the normal world option menu.
bihikoess Jul 7 @ 11:34am 
Impressive:steamthumbsup: