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:- Any static Block Weapons
- Block Tools such as drills, welders, grinders
- Magnetic Landing Gear, Collectors, Connectors
- Spotlights, Cameras, and more
- 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[]
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[]
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[]
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:
- Sit in any cockpit on the grid. Open the Control Panel Screen and make it the main cockpit.
- Consider whether you will need to connect one end of the turret to the grid's conveyor system (for ammo etc.) and plan accordingly.
- 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.
- 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:
- Under Assigned Azimuth Rotor, select the Rotor or Hinge that turns left/right.
- Under Assigned Elevation Rotor, select the Rotor or Hinge that turns up/down.
- Under Assigned Camera, select the Camera.
- 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.
- 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.
- Click Set up Actions.
- Keep Enable AI switched off for manual control, or switch it on for automatic AI aiming behaviour.
How to control turrets manually[]
For manual control, sit in the main cockpit.
- Press (G key) to open the Toolbar Configuration Screen.
- 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. - Under All Blocks, RMB-click the "Camera" block, and select View as function.
This adds viewing through the turret camera to toolbar slot 2. - Press (ESCAPE key) to close the Toolbar Configuration Screen.
With the set-up done, now on to how to use it:
- Press your toolbar slot that controls the turret. In this example, press (1 key). Your view changes to the view of the camera.
- Move the mouse left-right and forwards-backwards to control the turret.
- Click to shoot (or to activate the Block tool, respectively).
- 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). - Press (F key) a second time to leave turret control.
- 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:
- Give it a static weapon and an AI target for aiming - or a camera to aim at the sun.
- Attach two orthogonal rotors, one for CTC elevation and one for CTC azimuth.
- Attach a gyroscope to each rotor, and turn on share inertia tensor.
- Set the gyroscopes to a zero RPM override.
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
- building guided missiles/Player Built Weapons
- building seeker drones that follow players.
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[]
- Scriptless Vanilla Auto Tracking Attack Drone (custom turret controller demo blueprint)
- 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.