Space Engineers Wiki

New Official Space Engineers wiki

A new official wiki is now available! - at https://spaceengineers.wiki.gg/

This wiki is deprecated in favour of it.

READ MORE

Space Engineers Wiki
Advertisement
Icon Block Custom Turret Controller

The Custom Turret Controller lets you construct and steer custom subgrid turrets, robot arms, or cranes with your mouse. The Controller is easy to use and straightforward to set up -- neither mods nor scripts are required. You can control the turret/arm manually or use the game's built-in automatic AI ("artificially intelligent") targeting.

Usage Examples[]

  • The Controller lets you manually control a wrist-like movement of a custom subgrid "arm" with your mouse.
  • The Controller lets you activate Block Tools/Weapons on the subgrid by mouse click.
    The subgrid arm can be equipped with functional blocks of your choice, for military and civilian applications:
  • In automatic mode, you can tell the AI to aim its tool at chosen targets (stations, ships, players); weapons can lock on to specific subsystems (enemy weapons, propulsion, or power).

From the Automaton update on, while flying/driving, the pilot will be able to take manual control of a Custom Turret with the mouse, and still steer the ship/rover with the WASD keys, just as with Block Weapons.

Custom Turrets - pros and cons[]

  • The advantage of a CTC over a weapon block is of course that you can build the custom one out of any blocks (weapons or tools) you like, and aim multiple weapons at the same time.
  • One disadvantage of CTCs is that they are bulkier than block weapons and slower to build, because projectors and 3D Printers cannot project grids with the necessary Rotor/Hinge subgrids.
  • CTC AI is also not effective for building automatic welders or grinders with autonomous seeking behaviour, because the CTC AI cannot aim at individual blocks, only whole grids.
  • A CTC is best for wrist-like movements with one hinge and one rotor. For more complex controls that combine multiple mechanical blocks including pistons, you need to either configure the Tool Bar or use a script.

Construction[]

Custom Turret Controller (small grid)

The small-grid variant of the Custom Turret Controller Block

The Custom Turret Controller block itself takes up 1x1x1 blocks in large grid and 1x1x2 in small grid size, with attachment points on all sides. The small grid variant has one tiny LCD, and the large grid variant's front console has four LCDs that can display scripts, images, or text of your choice.

When set to automatic, the small grid variant has a maximum AI Aiming Radius of 600 metres and the large grid variant has 800 metres. The distance that the projectile travels can be longer than that, and if the turret is locked on to the target, you have a chance of getting the full effective range of the weapon.

This block doesn't do anything by itself and only makes sense when used together with other blocks, as described here. In short: For each pair of mechanical blocks to control, you need one Custom Turret Controller on your grid.

How the rotation works[]

Trivial-custom-turret

A minimalist custom built turret with Battery, Cargo, Advanced Rotor, Hinge, Artillery, Camera

In the context of turret control,

  • Azimuth means turning left and right horizontally, in a head-shaking motion
  • Elevation means turning up and down vertically, in a head-nodding motion.

You must build your turret so that the "business end" can rotate and aim along these two directions.

You can easily see that, in Space Engineers, the corresponding blocks that perform these motions are Rotors and Hinges — these two mechanical blocks are essential parts of every Custom Turret. The simplest example of a Custom Turret is an Advanced Rotor on the bottom, a Hinge on it, with a block weapon on top, and a Camera facing the same way as the weapon.

The weapon can be placed upright or at a 90-degree angle, depending on the range where you want to aim.

  • On a rover or station your priority is to be able to aim down when you are on the high ground, so you attach the weapon at a 90 degree angle.
  • On a spaceship, your priority is to limit the Hinge range to not shoot your own ship, because you can easily turn the whole ship towards the attacker (unlike a rover or station), so you attach the weapon block upright.

Putting a Hinge on a Rotor is a good starting point because then the azimuth stays horizontal and the elevation stays vertical relative to the horizon, which makes it intuitive to control. Depending on your desired positioning and orientation of the Custom Turret, the game is not stopping you from putting a rotor on a hinge, or from using two hinges, or two rotors! Just be aware that these variants can make Turret Control less intuitive for beginners.

How to build the Custom Turret[]

Custom-turret-controller-as-crane

A custom turret controller can be used to mouse-control rotation (rotor) and inclination (hinge) of a simple crane. (Image credit: Splitsie)

You can build the main grid (the station, ship, rover, or what ever) and the subgrid turret (or crane, or robot leg, or what ever) out of any blocks, and the business end can be any Block Tool, Block Weapon, or functional block.

If you add Pistons and Magnetic Landing Gears etc., remember that you control them through the toolbar, as usual.

If the Block Weapon needs to pull ammo, or if the Block Tool needs to convey components or ores, remember to connect the turret to the grid's conveyor system by using an Advanced Rotor. Spotlight turrets or magnetic cranes, on the other hand, obviously don't need conveyor access, and can use standard rotors.

The following description only mentions the minimum of essential blocks:

  1. Sit in any cockpit on the grid. Open the Control Panel Screen and make it the main cockpit.
  2. Consider whether you will need to connect one end of the turret to the grid's conveyor system (for ammo etc.) and plan accordingly.
  3. Build your custom subgrid:
    • Build Rotors and/or Hinges for the desired turning motion. (The blocks don't need to touch each other.)
    • Add desired tools on the moving "business end" of the turret:
      • Block Weapons, or
      • Block Tools, or
      • Gyroscopes, or Magnetic Landing Gear, etc. ...
    • Add a Camera with a suitable view direction for manual aiming or solar tracking.
  4. Build the Custom Turret Controller block.

Next you need to configure the CTC block.

How to set up the controls[]

Open the Control Panel Screen of the Custom Turret Controller:

  1. Under Assigned Azimuth Rotor, select the Rotor or Hinge that turns left/right.
  2. Under Assigned Elevation Rotor, select the Rotor or Hinge that turns up/down.
  3. Under Assigned Camera, select the Camera.
  4. Add the manual mouse-click functionality, if desired:
    • To add block functionality, select one or more entries from Available Tools and Weapons and click Add Tool or Weapon. It will appear under "Selected Tools and Weapons".
    • To remove functionality, select the entry under Selected Tools and Weapons and click Remove Tool or Weapon.
  5. Add automatic block actions, if desired:
    • Click Set up Actions.
      You'll see two slots where you configure what happens if AI is enabled.
    • To the first slot, assign a block action (or Timer Block with actions) that should be triggered when the AI detects its target.
    • To the second slot, assign the block action (or Timer Block with actions) that should be triggered when the AI detects no target.
    • (If Camera selected) Enable always aim at sun to make the turret auto-rotate to follow the sun, which is useful for solar panels and looks cool with radar dishes.
  6. Keep Enable AI switched off for manual control, or switch it on for automatic AI aiming behaviour.
Custom-turret-controller-rotor-multigrid

A custom turret with large-grid rotor and hinge with a small-grid hinge part holding small-grid weapons (image credit: Splitsie)

How to control turrets manually[]

For manual control, sit in the main cockpit.

  1. Press (G key) to open the Toolbar Configuration Screen.
  2. Under All Blocks, RMB-click the "Custom Turret Controller" block, and select Control as function.
    This adds manual control of the turret to toolbar slot 1.
  3. Under All Blocks, RMB-click the "Camera" block, and select View as function.
    This adds viewing through the turret camera to toolbar slot 2.
  4. Press (ESCAPE key) to close the Toolbar Configuration Screen.

With the set-up done, now on to how to use it:

  1. Press your toolbar slot that controls the turret. In this example, press (1 key). Your view changes to the view of the camera.
  2. Move the mouse left-right and forwards-backwards to control the turret.
  3. Click to shoot (or to activate the Block tool, respectively).
  4. Press (F key) to close the Camera view.
    Note: You are still in turret control! If you want back to turret view, activate your Camera View toolbar slot. In this example, press (2 key).
  5. Press (F key) a second time to leave turret control.
  6. Press (F key) a third time to leave the cockpit.

How to set up automatic turret AI[]

If you keep the AI disabled on the Custom Turret Controller's control panel, the turret will only move and shoot when player-controlled.

If you activate Enable AI, your custom turret will shoot at chosen targets like a standard automatic turret. You can automatically aim at player characters, large ships, small ships, and so on.

For general AI targeting options of automatic turrets, see the article about Block_Weapons#How_to_configure_automatic_aiming_(AI) -- they use the same AI settings.

Target Locking[]

Custom Turrets can use Target Locking to benefit from an extended targeting range and autonomous tracking and firing.

Wobbliness and Speed[]

No matter whether automatic or manual, here some general configuration tips: If aiming moves too sluggishly or too twitchy around one axis, change the velocity multipliers. If an automatic turret is much too hesitant or too trigger-happy, adjust Angle Deviation.

You find these settings in the Custom Turret Controller's control panel:

  • Azimuth velocity multiplier -- Increasing the absolute value makes the rotor turn faster left/right, values between 1.0 and 0 slow it down. Negative numbers invert the direction. Default is 9.0.
  • Elevation velocity multiplier-- Increasing the absolute value makes it tilt faster up/down, values between 1.0 and 0 slow it down. Negative numbers invert the direction. Default is 9.0.
  • Angle deviation -- How tolerant the automatic aiming should be. Decrease it to aim precisely but slowly. Increase it to aim fast but sloppily. Default is 5.0.

You find the following setting in the Control Panel of the Hinges, Rotors, and Pistons:

  • Share Inertia Tensor -- Enable this on all upper mechanical blocks of the turret. But keep it disabled on the one Rotor/Hinge/etc. that is attached to the base or ship.

Space Drones and Guided Missiles[]

A grid floating in zero gravity without a cockpit/remote control but with a turret controller can rotate itself:

  1. Give it a static weapon and an AI target for aiming - or a camera to aim at the sun.
  2. Attach two orthogonal rotors, one for CTC elevation and one for CTC azimuth.
  3. Attach a gyroscope to each rotor, and turn on share inertia tensor.
  4. Set the gyroscopes to a zero RPM override.
Custom-turret-controller-with-gyroscope-stabilisers

Player-built missile in space: Two orthogonal CTC-controlled rotors carry gyroscopes on zero-RPM override, static weapon for CTC aiming, forward thrusters on override. Image source: Evan

If the grid additionally has forward thrusters set to override, it will turn and fly towards its AI target. Use the Set Up Action button to tell the drone what to do when it detects the target (fly and shoot) or loses sight of it (wait and stop wasting ammo), respectively. To trigger close-range actions, use a Sensor!

Using Gyroscope Overrides to stabilise an AI Turret Controlled grid is useful when

For tutorial videos, see below.

Best Practices[]

In general, Turrets work most reliably on static grids (stations), and on mobile grids that are locked down (using landing gear, connectors, etc.) to the ground or to an asteroid. For a mobile grid, use gyroscopes to stabilise the turret. Heavy turrets on fast moving mobile grids have the worst automatic aim.

If the AI controls a slow precise weapon (railgun or missile launcher) on a fixed station, decrease the Angle Deviation to make the AI shoot only at targets that are truly right in front of it. It will shoot less often, but with much higher precision.

If the AI controls fast spray-and-pray gatling-style weapons on a mobile grid, it has to constantly re-aim to compensate. If the Angle Deviation is too low, the AI will never shoot, because the target is never "in front" of it long enough. Increase the Angle Deviation a bit to make the AI more tolerant to motion, at the cost of precision.

Very massive Turrets need higher Velocity Multipliers to even get into gear, and may not be able to rotate themselves towards the target very precisely, so increase the allowed Deviation a bit. Light-weight turrets need lower Velocity Multipliers to be able to aim precisely, otherwise they over-/undershoot.

The same holds for civilian custom turrets used to control Block Tools:

  • Drills, Welders, and Grinders are heavy and need higher velocity multipliers. Tools have a wide area of effect and can handle a much higher Angle Deviation than weapons.
  • Spotlights and Cameras are light-weight, so lower the Velocity Multiplier. Lower the Angle Deviation to keep a much closer eye on the target.


Troubleshooting Tips[]

Q: Why is my manual mouse steering inverted? -- A: Likely you placed the Hinge or Rotor the "wrong" way round, which accidentally inverted your manual controls. You don't always need to dismantle everything, first try a negative value such as -9.0 for the Velocity Multiplier of the affected axis.

Q: I set the turret up on a base, why does the turret not move? / Why does the turret move my spaceship? A: In this case, make sure in the Control Panel Screen that you disable Share Inertia Tensor for the mechanical block that is directly attached to the station or ship. You do not want the turret to share the inertia of the whole base or ship!

Q: How do I tell whether a Turret is set up properly? -- A: Open the Control Panel Screen of the Custom Turret Controller and look at the info area on the bottom right side. It contains status information and helpful error messages, such as:

  • ERROR: Missing elevation or azimuth Rotor/Hinge
  • ERROR: Must have a linked Weapon tool or camera
  • If it says "NOMINAL", that means you're good.

Run the "Targeting Info" script on an LCD panel for more information. It gives you helpful messages such as:

  • Main Cockpit not set
  • No locked target

Q: How do I test the turret AI without setting it to destroy my own grids? -- A: Click Add new enemy Identity in the Control Panel Screen of the Custom Turret Controller. It adds a virtual NPC to the game that you can make the owner of any dummy grid that you can use for target practice.

Tutorial Videos[]

  • How to make drones using the turret controller video by DaddyDamo
  • Rover Drone Guide by Halipatsui
  • Turret controller guided missile for vanilla space engineers by Evan


Related Workshop Scripts[]

The PARK script by Trekker provides similar but more advanced functionality: Instead of mouse control for two mechanical blocks, it lets you assign custom WASD keybinds to whole groups of pistons and rotors.


Blocks

Functional Blocks

Cockpits & Control
Icon Block Cockpit Cockpit, Icon Block Fighter Cockpit Fighter Cockpit, Icon Block Control Station Control Station, Icon Block Flight Seat Flight Seat, Icon Block Helm Helm, Icon Block Saddle Cockpit Saddle Cockpit, Icon Block Saddle Cockpit Compact Saddle Cockpit Compact, Icon Block Cab Cockpit Cab Cockpit, Icon Block Buggy Cockpit Buggy Cockpit, Icon Block Rover Cockpit Rover Cockpit, Icon Block Passenger Seat Passenger Seat, Icon Block Control Panel Control Panel, Icon Block Control Panel Pedestal Control Panel Pedestal, Icon Block Vertical Button Panel Vertical Button Panel, Icon Block Sci-Fi One-Button Terminal Sci-Fi One-Button Terminal, Icon Block Sci-Fi Four-Button Panel Sci-Fi Four-Button Panel, Icon Block Sci-Fi Control Panel Sci-Fi Control Panel, (Icon Block Inset Button Panel Inset) Icon Block Button Panel Button Panel, Icon Block Button Panel Pedestal Button Panel Pedestal, Icon Block Remote Control Remote Control, Icon Block Custom Turret Controller Custom Turret Controller

Automation
Icon Block Sensor Sensor, Icon Block Timer Block Timer Block, Icon Block Programmable Block Programmable Block, Icon Block Event Controller Event Controller, Icon Block Emotion Controller Emotion Controller, Icon Block AI Basic AI Basic, Icon Block AI Flight AI Flight, Icon Block AI Defensive AI Defensive, Icon Block AI Offensive AI Offensive, Icon Block AI Recorder AI Recorder

Communication
Icon Block Antenna Antenna, Icon Block Beacon Beacon, Icon Block Round Beacon Round Beacon, (Icon Block Top Mounted Camera Top Mounted) Icon Block Camera Camera, Icon Block Laser Antenna Laser Antenna, Icon Block LCD Panel LCD Panel, Icon Block Corner LCD Corner LCD, Icon Block Text Panel Text Panel, Icon Block Wide LCD Panel Wide LCD Panel, Icon Block Transparent LCD Transparent LCD, Icon Block Sci-Fi LCD Panel Sci-Fi LCD Panel, Icon Block Holo LCD Holo LCD, Icon Block Inset LCD Panel Inset LCD Panel, Icon Block Sloped LCD Panel Sloped LCD Panel, Icon Block Curved LCD Panel Curved LCD Panel, Icon Block Ore Detector Ore Detector, Icon Block Sound Block Sound Block

Defense & Offense
Icon Block Decoy Decoy, Icon Block Gatling Gun Gatling Gun, Icon Block Gatling Turret Gatling Turret, Icon Block Interior Turret Interior Turret, Icon Block Rocket Turret Rocket Turret, Icon Block Reloadable Rocket Launcher Reloadable Rocket Launcher, Icon Block Rocket Launcher Rocket Launcher, Icon Block Artillery Artillery, Icon Block Autocannon Autocannon, Icon Block Artillery Turret Artillery Turret, Icon Block Autocannon Turret Autocannon Turret, Icon Block Railgun Railgun, Icon Block Assault Cannon Assault Cannon, Icon Block Assault Cannon Turret Assault Cannon Turret, Icon Block Target Dummy Target Dummy, Icon Block Warhead Warhead, Icon Block Explosive Barrel Explosive Barrel

Power
Icon Block Battery Battery, Icon Block Small Battery Small Battery, Icon Block Large Reactor Large Reactor, Icon Block Small Reactor Small Reactor, Icon Block Solar Panel Solar Panel, Icon Block Colorable Solar Panel Colorable Solar Panel, Icon Block Hydrogen Engine Hydrogen Engine, Icon Block Wind Turbine Wind Turbine, Icon Block Twin-Blade Wind Turbine Twin-Blade Wind Turbine

Life Support
Icon Block Medical Room Medical Room, Icon Block Corner Medical Room Corner Medical Room, Icon Block Survival Kit Survival Kit, Icon Block Cryo Chamber Cryo Chamber, Icon Block Inset Cryo Room Inset Cryo Room, Icon Block Oxygen Farm Oxygen Farm, Icon Block Interior Light Interior Light, Icon Block Offset Light Offset Light, Icon Block Spotlight Spotlight, Icon Block Offset Spotlight Offset Spotlight, Icon Block Inset Light Inset Light, Icon Block Air Vent Air Vent (Icon Block Air Vent Full Full), Icon Block Air Vent Fan Air Vent Fan (Icon Block Air Vent Fan Full Full)

Mobility
Icon Block Gyroscope Gyroscope, Icon Block Atmospheric Thruster Atmospheric Thruster, Icon Block Ion Thruster Ion Thruster, Icon Block Hydrogen Thruster Hydrogen Thruster, Icon Block Parachute Hatch Parachute Hatch, Icon Block Short Wheel Suspension 1x1 (Short) Icon Block Wheel Suspension 1x1 Wheel Suspension 1x1, Icon Block Short Wheel Suspension 2x2 (Short) Icon Block Wheel Suspension 2x2 Wheel Suspension 2x2, Icon Block Short Wheel Suspension 3x3 (Short) Icon Block Wheel Suspension 3x3 Wheel Suspension 3x3, Icon Block Short Wheel Suspension 5x5 (Short) Icon Block Wheel Suspension 5x5 Wheel Suspension 5x5, Icon Block Offroad Wheels Offroad Wheels

Mining & Manufacturing
Icon Block Basic Refinery Basic Refinery, Icon Block Refinery Refinery, Icon Block Basic Assembler Basic Assembler, Icon Block Assembler Assembler, Icon Block Drill Drill, Icon Block Grinder Block Grinder Block, Icon Block Welder Block Welder Block, Icon Block Projector Projector, Icon Block O2 H2 Generator O2/H2 Generator, Icon Block Oxygen Farm Oxygen Farm, Icon Block Yield Module Yield Module, Icon Block Power Efficiency Module Power Efficiency Module, Icon Block Speed Module Speed Module

Storage
Icon Block Large Cargo Container Large Cargo Container, Icon Block Medium Cargo Container Medium Cargo Container, Icon Block Small Cargo Container Small Cargo Container, Icon Block Oxygen Tank Oxygen Tank, Icon Block Hydrogen Tank Hydrogen Tank, Icon Block Store Store, Icon Block Contracts Block Contracts Block

Inventory Management
Icon Block Connector Connector, Icon Block Small Connector Small Connector/Ejector, Icon Block Collector Collector, Icon Block Conveyor Junction Conveyor Junction, Icon Block Conveyor Tube Conveyor Tube Icon Block Reinforced Conveyor Tube (Reinforced), Icon Block Curved Conveyor Tube Curved Conveyor Tube Icon Block Reinforced Curved Conveyor Tube (Reinforced), Icon Block Conveyor Tube T Junction Conveyor Tube T Junction Icon Block Reinforced Conveyor Tube T Junction (Reinforced), Icon Block Conveyor Sorter Conveyor Sorter; Icon Block Small Conveyor Small Conveyor, Icon Block Small Conveyor Tube Small Conveyor Tube Icon Block Small Reinforced Conveyor Tube (Reinforced), Icon Block Small Curved Conveyor Tube Small Curved Conveyor Tube Icon Block Small Reinforced Curved Conveyor Tube (Reinforced), Icon Block Small Conveyor Tube T Junction Small Conveyor Tube T Junction Icon Block Small Reinforced Conveyor Tube T Junction (Reinforced), Icon Block Conveyor Sorter Small Conveyor Sorter; Icon Block Conveyor Frame Conveyor Frame, Icon Block Conveyor Converter Conveyor Converter

Mechanical Blocks & Gravity Control
Icon Block Advanced Rotor Advanced Rotor, Icon Block Rotor Rotor, Icon Block Piston Piston, Icon Block Hinge Hinge, Icon Block Landing Gear Landing Gear, Icon Block Magnetic Plate Magnetic Plate, Icon Block Merge Block Merge Block, Icon Block Artificial Mass Artificial Mass, Icon Block Gravity Generator Gravity Generator, Icon Block Spherical Gravity Generator Spherical Gravity Generator, Icon Block Safe Zone Safe Zone


Advertisement