AI DRONES AND MISSILES!💥 - The ULTIMATE GUIDE to building in Space Engineers

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
want to know how to use the new AI blocks editor space engineers and use them to build all kinds of drones and missiles then sit back and relax as we go through all of the area blocks and how to use them so you can become a master of building your automated allies there are five AO blocks as of recording plus an additional very useful block with the event controller here you can see that I built a little drone that has thrust Us in all Direction a gyroscope and power and as we go through each AI block and explain their features and their functions I'll be then adding them to this drone in order to demonstrate how they can be set up and used so let's have a look at the first of the AI blocks the AI flight's move is an AI block that you'll need on pretty much all of your drones as it is what controls the movement of the Drone once you've placed it down you'll be able to see the settings a bit and as you can see on the right hand side if there's any problems with it it will show you in red on the right hand side now this one has a lot of errors on it as I've placed it on a static grid with no thrusters so obviously it's not going to work as this grid can't fly but I'm going to ignore this for now and I'll show you on a drone later the AI Behavior option here is what toggles the AI behavior on so if you want to toggle the AI behavior on and off from your Hotbar you'd add this option to it and you can see you can toggle collision avoidance on and off potentially useful for missiles now there's four options at the bottom here the speed limit obviously dictates the speed limit that your drone can move so by default it's 10 meters per second it can go to a maximum of 100 meters per second and a minimum of zero meters per second the next option is aligned to P gravity which basically means when you're within a gravity field I.E on a planet the Drone will stay upright relative to gravity it's also worth noting that the AI move flight has orientation so this is the front of it and it has an L on the side so this is the left side side then you have the back and then you have the right hand side so obviously you want to orientate this the way you want your drone to face minimum altitude also only works within gravity and this is how low you want the Drone to fly to the ground obviously depending on the size and shape of the Drone you don't want it to fly too close to the ground in case it hits it but in other circumstances you might not care about this as much and the final two options are Max pitch angle and Max roll angle and you probably don't need to mess with these options unless you haven't built enough thrusters in all directions these settings control the maximum angles your ship can rotate to but as long as you have enough thrust to keep you upright in all directions these options shouldn't matter so let's place our air flight move on our testing drone making sure it's facing the right way around and then configure it right first you want to toggle on AI behavior on collision avoidance obviously on by default as we don't really want our drone crashing into anything yet position mode will leave off but now and we'll come to the main options which is the speed limit the altitude align to P gravity and the pitch and roll speed limit I'm going to set it to 50 for now and will increase and decrease depending on how stable our drone is minimum altitude I'm going to set this down to 4 follow me later so I want it to follow quite close to the ground so I'm going to set it to quite a low value if you see where the slide is it's quite difficult to get a valley if you control click you can manually set the value so I'm going to set this to one meter for now which is roughly half my engineer's height we'll see how that goes and we'll change it if we need to obviously the collision avoidance will kick in anyway if it does get too close to anything and we'll push it back up so it won't matter too much if this is too low to the ground align to P gravity we want on so our drone sticks up the right way and as I said earlier we won't need to mess around with the max pitch angle and the max roll angle as those are only really relevant if you don't have enough thrust in all directions and I know for a fact as I've tested it but this thing has enough for us to keep itself upright in all orientations right that's the move AI configured but before a drone can actually do anything we'll need the next AI block as I said it takes two AI blocks to build a flying drone so the next one you're probably going to need is the AI basic task which is indicated by this globe symbol here and if you go into the terminal for it you see once again it has toggle AI behavior on and off so if you didn't want this specific task active you could toggle that off and by default it's on follow player so you can see it's got the follow me button so if I click that this grid if it could move would follow me and if at the distance I can demo this with this cargo drone I've created here which is set to follow me at all times and follow me as close as possible as you can see as I've said it to fly as close as possible it might rub against the ground a little bit if I turn around it will now turn around to face me and I can always access the storage it has on board the other options are follow home and autopilot follow home allows you to select a list of homes for it to have so these range from static grids to other ships to waypoints so if I were to create a new marker over here and call it home if I paste back in my cargo drone set it to follow home and say it's home to home you can see that now it's trying to get to its home Point here and I think because it's close to a block it's struggling as it's trying to avoid the Block it's going into yep now it's going underneath to get as close to home as possible you can see now that it's got a new home it's going for that instead as I said home doesn't have to just be a waypoint or a static grid you can see that the starting atmospheric Miner is here which means you can have ships following other ships for this and at the bottom as you can see you can set the minimum range it can be from home at the maximum range it can be from home so if you wanted to be closer or further away we wanted to fly around idly around the home base that's how you do it for example you have your Fighters flying around your carrier and you have a minimum range you can go from the carrier and then a maximum range it can go from the carrier so let's place down our AI basic task on our drone and configure it to follow me I'm not going to toggle on the AI yet as I don't want it to move for like configuring it actually what would be a good idea so I grabbed a button panel it's a button on the front and then configured that to toggle the AI behavior on and off there you go you can see it changing when I press the button we're going to set it to a very basic task to follow player so we've got follow player selected I'm going to click follow me I'm going to set the follow distance to one meter Again by control clicking to set the value and then I'm going to come out and press the button and it appears we don't have enough power on our drone let me just fix that there you go that's the power issue sorted and now our drone is going to follow us around and then I can press the button on the front of it oh it does get very close toggle the AI Behavior off so then I can configure the next AIR block however before I do that I think there's something missing from this drone there you go that's much better I've increasing follow distance to three meters so it flies slightly further away and isn't right up in my face all the time and I gotta be honest I feel like I've created some sleep paralysis demon to follow me around it's absolutely terrifying with that smiley face on it like this needs some like horror music playing behind us this thing stalks me around hello anyway next AI block the next AI block is the AI recorder task and this one's a bit more complicated than all the other AI blocks so it might be easy if you just get straight in and place this on the Drone and I'll explain how it works so like the AI flight move you can see that this block has orientation so you want to make sure that the F or front is placed facing the front of your drone in order to make sure it has the correct orientation I'm also going to grab an antenna placed on my drone and I'll place it here there you go and the reason we need that is if you go into the terminal go into info and you can see what this option here toggle AI functions I want to toggle that on and then if I go back to control panel go to my AI recorder I've got a show on heard here and if I scroll down to the bottom I've got show path on HUD so the reason we've done this is because the air recorder as the name suggests can be used to record paths and tasks and the reason we want to show it on the HUD is so that we can visualize the path we've created so I'm going to place a cockpit down on my drone just so I can control it briefly although I will need to turn off my AI Behavior or my flight so I can control it there you go I want to take my air record on my Hotbar and the function I want is ADD Waypoint now if we go back to the terminal for the air recorder you can see that the add Waypoint button is here however you can see you've also got the record option this means you can click record and then fly along a path and it record your position on that path every 1.7 seconds now this is the lowest it can go as you can see I'm dragging it can't go any lower if I set it to zero you can see it says the amount needs between 1.7 ish and 30. so he wants a very precise path we want to place all the waypoints down manually so let's create some waypoints so I fly away from the base and then I'm going to press one here to add my Waypoint and you can see it's added onto my HUD as we toggled on the AI functions in my terminal and on the AI recorder itself so we fly forward a little bit I'm going to get roughly above where my connector is and press it again you can see we've got our path so we've got Waypoint zero over here and if I fly back over here we'll have Waypoint one inside our drone if you go into our terminal go back to our AI recorder you'll be able to see Waypoint zero one are here so now if I toggle my AI behavior on for my AI flight move and then press play you should see that my drone will now follow the path so you can see it's got to point zero and now it should turn around and fly to 0.1 and when it gets there it should stop and as with all other things pertaining to the terminal you can add the play option to your Hotbar so at the Press of a button you can toggle the play on for the area recorder and then it will fly to the points that you've specified now that's just the basics of it you can do things that are much more complicated if you go back to our AI recorder go right down and let's delete all waypoints and then we're going to create some new waypoints let's have Point number one right above our connector so I've just added the Waypoint you can see if I go down Waypoint zero is now there I'm going to keep going down actually I'm going to get out and place a connector on the bottom of my drone as so then keep going down and then I'm going to place my next Waypoint right above the connector so you can see there and I'm going to go down the position where I can lock to the connector place my next one so there you can see we've got zero above us one there and two there and then I'm gonna fly away because I don't need this anymore let's go to our control panel go to AI recorder and then if you click on Waypoint 2 which as we know is the Waypoint on the connector you can see we've got excessive action so here we want to go to our connector and we want to switch lock so it will lock the connector when we get there and then you can see after Waypoint two we now have switch lock so if we now play our task you should now go up to zero which is good it should fly down to one perfect and then fly down to two and lock there you go that worked much better than I expected it was going to now the possibilities of the AR recorder are pretty much endless as you can basically program it to do whatever you want so as you can see I use this to make a docking sequence I've seen people use this to make mining drones and I've seen this used by people to make AI Rovers so the possibilities of it are pretty much endless the last thing I should probably mention about the AI recorder is that you have the option to repeat the task so that it will keep cycling through all these waypoints you have the option to reverse order so if I press reverse order now you'll see that it goes in the opposite direction and you can see because I reversed it and it was already enabled it disconnected from the connector as that was the first thing in its list and then flew to the waypoints in order which is the last Waypoint of being up here so if I now reverse it again it should now fly back down and dock there you go ah a little bit of an angle but better than I could do in that time and then finally you can see it's got reference Beacon So currently we're docking to a base which is obviously a static location it's never going to move well hopefully it won't anyway so the waypoints that it's going to are static ones however this was a ship you would place a beacon on your ship set the reference Waypoint to the beacon and then each of these waypoints would be relative to the position of the ship so if your ship was moving and you set your AI to dock it would then node to dock where the connector is on the ship as the Waypoint would be following that connector rather than being in a static location in space the AI defensive combat is one of two combat AI blocks added in this update and this one being more defensive than the one we will cover later serves more of a utility purpose I'm actually using one of my cargo drone here and I'll show you why now I see defensive AI has a flee option here so you can see when I hover over it it gives you a list of when to flee by default it's never so it will fight the target when it gets to it always means that if it Attacks An Enemy Within 2500 meters it will run away to whatever the Waypoint is set to here so if I get to my drone here I like your defensive and say it's home to home you can see I've got a hostile shipping coming in a second it should go oh no there's a hostile shipping coming they are now it's detected it and it's flying away bye bye so it should fly all the way back to the base and you can see here it's made it back to the base and it now considers it safe there's another really useful feature of the AI defensive block and that's the automatic targeting log feature whilst this is useful to help you automatically get Target locks on hostile ships its main interaction comes with the artillery and assault Cannon the built-in AI on the turret versions of these blocks has a maximum range of 800 meters however both these weapons have an effective range of 1 400 meters if you have Target lock on something if your weapons are in range they will override the 800 meter AI range and fire on the target effectively doubling the range of these weapons this is more useful for things like bases where you aren't manually targeting ships but it's still a very useful feature nonetheless also I've just had a thought does this work with custom turret controllers as well they have a maximum range of 800 meters so can you use this to make an automatic Rogue on turret that fires at 2 000 meters I tell you what why don't you guys try it and let me know if it works anyway I won't be placing an AO defensive Combat on my test room as there's a much more interesting combat AI I'd like to place on it the AI offensive combat is the final AI block available to us and as you can imagine it is used for offensive combat now this one has a lot more options than any of the other AI blocks so far and that's for good reason because this one has a lot to do as always it has the ability to toggle the AI behavior on and off in Jesus let's target enemies on enemies and neutrals you can choose it to Target players you can choose his targeting priority whether it be the closest the largest or the smallest you select how often it chooses new targets so if you wanted to check for new targets every five seconds you can you can choose which subsystems is targets and then you have the most interesting options the attack patterns those being Circle orbits stay at range hit and run and intercept each of these come with their own options below so let's look through each of them Circle and orbit is the one I've tested the most and this is where the ship will stay at a certain range and it will fly around the Target in a circle in that range and fire at it now if you're in gravity you want to select this option here which means that it says it in a circle within gravity and then you can choose which weapons it has using this option here facing mode it will then face the direction of static weapons you can change this option here choose the manual facing priority and choose it to face front or if you want to do a broadside you can choose the face to the left or the right and that way it will Point whatever side of the ship towards wherever the target is now we also have stay at range which is very similar whereas the ship will try and stay at a certain range from the Target and then we'll attack them at the Target so if you want to use Gatling guns for example you might want to set the minimum range to like 700 meters and the maximum to 800 and then it will always stay at the maximum range of the Gatling guns or even if you have weapons at a longer range in Gatling guns you can set it out of the range of Gatling guns and then the ship will stay out of that range attacking the enemy Target and if they have Gatling guns they just won't be able to hit you there's also the option for evasive maneuvers something I haven't tested personally but it sounds very useful for dodging things like Rockets next you have hit and run which is shown off on a teaser a couple of months ago and this is basically your fighter hit and run tactics where it flies towards the Target and then when it gets a certain distance it then breaks off and flies away turns around and then flies back in you can choose the distance that it breaks off you can choose the distance it retreats to you can choose how long it is before the next Retreat and you can choose the angle it Retreats at once again you can assign the weapons it has and this attack pattern is very useful building things like Fighters where it flies in gets a couple of shots up and then flies away finally the attack pattern you're probably most interested in is intercept intercept is quite simply the attack pattern for missiles all this attack pattern does is slide towards your Target and crash into them at the bottom it has the option to override collision avoidance which overrides the setting on the AI move blocks that try to avoid hitting things you also have two different types of targeting basic and Target prediction basic just points your missile towards your target at all times and then flies directly towards it however Target prediction will try and predict where your target is moving and then intercept it moving to where it all thinks it will be rather than where it actually is so now that we know how they work let's upgrade our drone into both a fighter using the hit and run tactic and then a missile using the intercept tactic right let's start by converting our drone into a combat drone first of all let's place our combat AI on our grid let's get some weapons I'm thinking Auto cannons as we're in Creative we don't need to pipe these into anything we'll just put three down there perfectly acceptable and there is one other change we quickly need to make there you go perfect now he's an angry drone let's go to our terminal search for our offensive combat AI so we wanted to Target enemies there's no other characters in the world so there's no point setting it up I'm going to set the target priority to closest and then I'm going to set it to switch targets every five seconds specifically because when we use this we're going to go to the Drone base that spawns on the easier start and that will spawn additional drones so we want it to attack whatever's closest to it and then switch every five seconds I'm going to leave the targeting subsistence on default I'm going to set our attack pattern to hit and run as that's the fighter attack pattern we're going to set the break-off distance to so we say 400 meters so that's half the range of the assault cannons Retreat difference we're going to leave on default at a thousand meters Retreat timeout I'm gonna leave that as default and Retreat angle we'll leave it 90 as that means it should kind of fly over the target but we'll see we can tweak this later we'll select our three Auto cannons and add them as weapons and there you go that's pretty much set up in the distance you can see the space pirate facility I mentioned earlier and you can see it's just spawned in a drone so when we get into range of it which is 2500 meters I will spawn an odd drone up again combat there you go I've pasted in our combat drone and he's clearly flying away from something but because he's on Hit and Run he's trying to get out of range of the Drone and now he's finally at the maximum range now you should fly in for an attack run there you go he's flying away again might reconfigure the AI to be a bit more aggressive it's going in for another attack run and it gets within 400 meters and now he turns around wow this is absolutely riveting that drone can't hit me because it's only got a weapon below it and this thing can't seem to do enough damage to that thing to actually defeat it come on you can do it I believe it broke the engine off if I needed it yeah we did it oh I won't tell you how long that took right I've built a very nice looking and resource efficient missality test and if I go over to the control panel go to my AI blocks I've gone to the AI flight move on it obviously where air behavior on I've got toggle collision avoidance off it is overridden by the setting here on the AI offensive combat when you have this attack pass and set to intercept but I figured it can't hurt to have it off in both places I've also set the speed limit to 100 meters a second as it's a missile I wanted to be going fast the minimum altitude I don't want it near the ground but it's not really going to make any difference if it is and I've turned off a line to p-ravity as it's a missile I wanted to point towards the target not to stay in line with gravity my AI offensive combat because it's a missile and it's got a very sneaky surprise inside I set these Targets in priority to largest and because once this is launched it's probably not coming back I don't really want it to be reselecting a Target so I've set it the maximum targeting time so that I won't try and switch Target once it's fired it will just pick a Target and fly towards it I don't really mind what it hits so I've set threatening subsystem to default obviously the tap pattern is intercept because it's a missile and I've set the guidance type to basic as our Target as you'll see in a minute it's a static base so we won't need to be predicting where it's going to move because it won't so that's a copy of our missile and let's fly over to our lovely base over here so you can see it's there it's 1.28 kilometers away from me and our little friend has come over to greet us I'm going to paste it on missile and he should acquire a Target he should begin flying towards it it seems to be right dead on target oh missile getting shot come on you can do it I believe oh I didn't quite see it but it definitely hit his Target right let's Pace in a few more and there you go they did a nice bit of damage I'm sure with a bit of refinement I could make a much more effective missile with lots more explosives but in principle they work and now you too can build a missile just build a better one than I did whilst I won't be going in depth on the usage of the event controller and the sensor we'll be saving those for future videos like And subscribe if you'd like to see that I want to bring up these two blocks here as they both pair well with the other AI blocks both of these blocks can trigger actions based on conditions and you could use them to trigger changes in the ai's behavior for example the event controller can trigger an action based on the level of hydrogen in the tank or the amount of charge in a battery so you could use the event controller to detect when you're about to run out of fuel or charge and then trigger our AI recorder to perform the docking sequence we recorded earlier for a basic example of using the sensor one of the things I find annoying about the drones is that they continue to move about when they're trying to access them especially if they're on followers they keep getting closer and closer to you so what you could do is you could place a sensor on your drone make it attacked when there's a friendly player nearby and then you could either change or disable the AI Behavior so you're able to interact with them or you can just make a remote control for them and make those changes remotely but you know that seems too easy the AI blocks themselves are fairly simple to use but in order to master their usage and build the best drones possible you need to be automating their actions using the event controller and sensor with all that in mind what kinds of AI drones will you be building using the AI blocks let me know with a comment below and as always like And subscribe for more space engineered content a special thanks to the Wildcat splurgeberger QWERTY the pro Gregor athakee Summit tarantula fudge Pascal Roland red sky and Death Valley Dave if you'd like to support the channel you can do so by clicking the links in the description to become a member or patreon or you can like this video And subscribe to this channel for more space engineers content
Info
Channel: Zer0's Legion
Views: 50,285
Rating: undefined out of 5
Keywords: space engineers, engineers, space engineers warfare 2, space engineers tutorial, space engineers guide, space engineers survival, space engineers beginner, space engineers first day, space engineers ep 1, space engineers new player, space engineers tips, space, Space Engineers Tutorials, Space Engineers ships, Ships, space engineers warfare, warfare 2, space engineers battle, space engineers update, space engineers ai, Automatons, Space Engineers Drone, space engineers automatons
Id: Z95FdeD2OBY
Channel Id: undefined
Length: 19min 55sec (1195 seconds)
Published: Sat Apr 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.