Space Engineers

Space Engineers

Not enough ratings
NEST Pirate Design and workflow guide.
By Sabre One
This is a supplmental guide designed for our Community the Spokane Survalist Society. Here you will find a quick tutorial and explaination of how drones work and what you need to do in order to test your designs before final submission.
   
Award
Favorite
Favorited
Unfavorite
Pirate Drones 101
In a nutshell
Pirates as a AI is pretty simple by design. What gives them their complexity is the various programming scripts you can apply to them. This set up gives a massive flexibility and allows players of any skill level to design and create countless unique ships to enhance the PvE experience within Space Engineers.

There are two types of vanilla designs when creating pirates. The most interactive one is the drone. Drones seek out and attack players aggressively from long distances. The second design is a stationary ship or even a station that has spawn antennae on them to spawn drones to actively attack a player. These can be combined in various ways though.
N.E.S.T

------------========::::::::::Nefarious · Extraterrestrial · Space · Tyrants::::::::::=======------------



NEST is a mysterious pirate faction from outside the system. Little is known about them accept they are no rag tag pirate crew like SPAT. Featuring state of the art ships with shielding and modded weapons. They are a force to be reckoned with, and any engineer caught off guard is doomed to see their creations reduced to scrap.

Reports by Alpha Corp long range probes have indicated the few sightings and raids are just the tip of a much larger scale invasion. Raven Core has made several publication on military theory, and have suggested this is simply the vanguard of a very much bigger fleet.

NEST ships can be identified from SPAT ships by their red and white color scheme. Like other Pirates their fleet can vary wildly as they re-use captured ships and scrap. However, their designs clearly have more thought into them, implementing a high quality standard to even refurbish ships assuring even the smallest ships have shields.

The Vanguard

As theorized and now realized by Raven Core. The NEST ships showing up in the system are of a vanguard. The ships have enough supplies to last out alone. But are sleek and nimble with very little of heavy armor or big cannons. There seems to be no established stations or bases at that have been spotted, but mobile corvette sized ships have been seen that deploy various drones.
How to Build a Drone


A drone can be any shape or size, but like any grid using a remote block from navigation. You find that fine tuning the design can be tricky. Too much Gyroscopes will create instability as the fast turning is to much for the remote block to handle. Drones can also glitch if you max out power or thruster output just out of design due to mass.

To turn your ship or grid into a drone you need three componets.

  • Remote Control Block
  • Programming Block
  • Timer Block

Remote Control Block
The Remote Control Block needs to be placed in the direction you want to be forward. Like a pilot seat, the direction it's pointing determines which thruster are forward, back, ect. As you can see by these two pics, the Remote block can also be placed about anywhere you want on the grid. In best pactice though it's good to keep it some what centered to your grid at some axis.

A important note about pirate drones and remote block. The only real requirement is to assure that the remote block is set to One Way. Otherwise it will not function properly.


Program block
The programming block is the next important piece. As it will contain the core programming that makes a pirate drone seek out players. The programming block may be placed anywhere you wish it to be.


Timer Block
The Timer Block is the final block you need. This allows the programming block to loop and continue to seek out playes and targets. Like the programming block you can place it anywere you wish. The Timing block should be set up like this

  • Set delay to 2 seconds
  • Set the 1st action to run the Program block with default arguments
  • Set the 2nd action to start the timing block again
Programming Block Scripts.
These are the vanilla scripts for various drone behavior. Simply copy and paist these into your Programming Blocks to use.


Move to neariest player
void Main(string argument) { var list = new List<IMyTerminalBlock>(); GridTerminalSystem.GetBlocksOfType<IMyRemoteControl>(list); if (list.Count > 0) { var remote = list[0] as IMyRemoteControl; remote.ClearWaypoints(); Vector3D player = new Vector3D(0, 0, 0); bool success = remote.GetNearestPlayer(out player); if (success) { remote.AddWaypoint(player, "Player"); remote.SetAutoPilotEnabled(true); } } }
This one has the drone simply head to the player, good for no retreat drones such as kamakazi, or to use for additional functions.

Flee from neriest playert
void Main(string argument) { var list = new List<IMyTerminalBlock>(); GridTerminalSystem.GetBlocksOfType<IMyRemoteControl>(list); if (list.Count > 0) { var remote = list[0] as IMyRemoteControl; remote.ClearWaypoints(); Vector3D player = new Vector3D(0, 0, 0); Vector3D oppositedirection = new Vector3D(0, 0, 0); bool success = remote.GetNearestPlayer(out player); if (success) { oppositedirection = remote.GetPosition (); oppositedirection = oppositedirection + oppositedirection - player; remote.AddWaypoint(oppositedirection, "FleeDirection"); remote.SetAutoPilotEnabled(true); } } }
This script causes the drone to activly flee from any player. Works great for recon like drones who need time to summon new drones.

Due to a wierd glitch in how Steam formats it's guides, the last code here is a bit sloppy. I paisted it in this way as it was the only way to keep the format correct. This code is your basic fight and flight code that comes in most drones.
Attack/Retreat Script. Main Script!
Due to a format issue with Steam. This code will not paste in corrrectly so you can use it. I instead of uploaded it to the workshop for the sole intention for this guide.
http://steamcommunity.com/sharedfiles/filedetails/?id=904159027
Spawning Antenne
Spawning Antenne is how essentually bigger pirate ships create smaller drones to continue the attack. Any grid that has a powered antenne can be configured to spawn. Meaning you could also potentially make big carrier like ships that spawn smaller faster drones. Or you could create sucide torpedo like drones with the soul purpose of wrecking your ship. The choices are endless.
Example of a vanilla mining ship using one to summon help.

If you plan on having a spawning antenne on your ship. Don't worry about the finer details, simply name the antenne something appriopate to indicate it's for spawning purposes. Then be sure to mention which additional submissions will be added to each spawn antenne.
Testing Your Drone.
To maximize your workflow and to assure the drone functions well. I recommend two test before fully completing your design.

The first test is the simplest, and allows you to collect data from your drone on overrall peformence. Simply slap a antenne on the drone and fly it around via remote control. Take special note on it's overall power consumption, it's thruster use levels, and how well it turns. A drone needs to be overall well balanced, so try to make a peformence goal in mind and find something that is neither to weak or to high.

The next test is a bit more complex. This test will basically turn your drone against you and allow you to test how it peforms as a pirate AI.

To set it up, you need to create a world in creative mode. You need to turn the following on.
  • Drones
  • Random Encounters
  • Exploration

After instlaling the proper blocks as stated in the previous section. You will now need to add a few more things. If your using the fight and flight scipt(3rd script in this guide). You need ammo in the guns. Even though creative mode makes guns not run out of ammo, the drone programming doesn't know that. So it assumes it's out of ammo and will "retreat" to it's orrgin which is werre you first paisted it in.

After that you need to simply activate the timer block. Then give the entier grid to the pirrate faction. Congradulations you have a murderous atomated ship trying to kill you!

At this point, you might distance yourself, then use the free cam mode to watch your pirate behavior. If done correctly, they should head to you in a effecient matter, retreat when it's out of ammo or all the guns broken.
Advance building tips.
Drones can be configured in many ways that require very little coding. Adjustments to the remote control block, thrusters, and adding sensors can create some interesting builds.

Example: Light Attack Craft.


This drone uses forwarded mounted guns instead of a traditional turret. To make it function were it attempts to face the player as much as possible I added 2 sensors. The first sensor activates the guns when detecting a enemy in front at 50m. The second sensor disables the remote blocks ability to move with it's thrusters. This prevents the collision-avoid option from causing the drone to "spin" which is fine with turret based weapons, but not so well as fixed.

Other ideas: Just a small list of ideas you could possibly implement.

A suicide missile that spawns from a larger ship. With collision avoid off.

A small scout ship that retreats and activates a new spawn antennae with a timer block. Meaning players need to destroy it before it can summon reinforcements.
12 Comments
Sabre One  [author] May 1, 2021 @ 2:13pm 
Potentially, this guide is still can be of use, but doesn't cover any new PB features that probably would allow that.
Lead Hail May 1, 2021 @ 7:42am 
Is there a way to make this target Enemies of a specific faction?
Jack Apr 8, 2017 @ 9:28am 
Thank you so much...This works wonders :steamhappy:
Sabre One  [author] Apr 5, 2017 @ 10:37pm 
Just follow this list

Make sure the remote block is set to ONE WAY, if you want it to just run into things. Set the collision avoidence off.

Make sure to activate the timer BEFORE giving it to the pirates, otherwise it won't work.
Jack Apr 5, 2017 @ 6:32pm 
Does not move at all.
:steamsalty:
Jack Apr 5, 2017 @ 6:31pm 
yes
Sabre One  [author] Apr 5, 2017 @ 4:00pm 
Does it not move at all?
Jack Apr 5, 2017 @ 1:35pm 
i did everything you said in the guide but it is not working? I use the kamakaze script and my drone will not move...its set on pirate team...help please?
Sabre One  [author] Mar 27, 2017 @ 1:45am 
It can work in MP depending on the server settings.
Shiftend Mar 26, 2017 @ 9:15am 
This work only in singleplayer?