Turret

**Turrets** are articulating weapon emplacements that allow for a wider coverage than normal ship-borne weapons. While not necessary they will become invaluable as players build larger and larger structures.

## Overview

With the wide range of Weapons available, the Galaxy may seem quite tamable to a novice spacer. This is true in the sense that smaller entities such as personal ships may get away with using only their mounted weapons. This matter unfortunately becomes very muddied as players begin to build larger and larger creations. Mounting a weapon in specific hardpoints around a large vessel is serviceable but still leaves areas vulnerable. This is where **Turrets** come in to play.

Turrets are customizable weapons emplacements that allow players and NPCs alike the ability to attack and defend without necessarily having to face their targets. Turrets make use of rotating Mechanisms like Rotors and Hinges to properly bring their armaments to bear. Turrets can be designed to function like a natural extension of the ship they are placed on or be designed for non combat aesthetic purposes.

Turrets can be installed on every entity but if installed on Handhelds they will be non functional. Unlike docked ships, turrets are built out of the parent entity rather then installed through some additional system. Since they are considered part of the parent entity they will be covered by Shields and their weapons will draw power from Reactors. They will also contribute to the parent entity's hull points. Destroying an entity's turrets is very advantageous as it will both lower its offensive capabilities and directly damage the target's hull point pool.

## Player Turrets

Players can build a functional turret in any shape or size using the same system. The Turret Computer requires combination of two Rotors or Hinges. Direction requires a linked weapon to function, with the overall form and weapon armament up to you.

Turrets can either be controlled manually by the player or automatically. You can also choose to control the turret through a Camera via a Yoke or Monitor.

Here's what you need to set up your first manual turret:

### Manual Turret Setup Steps:

1. Place down your first Rotor. Place a cube block on top of it, then a second Rotor pointing off to the side. These are your turret axes.
2. Place another cube block on the second Rotor, and then your weapon on the side of that. The direction the weapon is pointing will determine the forward direction of the turret.
3. Place down a Turret Computer. You can place this anywhere you want, but it's best to keep it close to the turret for convenience. Using the Link Tool, draw a link (by holding the mouse button) between the Turret Computer and the first Rotor. Repeat this step for the second Rotor and the weapon brick. The Turret Computer will show you a list of these requirements on your HUD, and mark them green once they are met.
4. Place down a Yoke, and use the Link Tool to link it to the Turret Computer. Place down a Reactor for power. Now, you can interact **[F]** with the Yoke to control your turret.
5. To set up the weapon, place down the Event Gate, and link the Yoke to it, then link the Event Gate to the weapon. Interact with the Event Gate, and select "Is Primary Pressed" in the Event Registered to drop down menu. Now when you enter the yoke, you can fire the weapon by clicking **[LEFT MOUSE BUTTON]**.

**Optional** - You can add a Camera to your turret too. Place down your Camera where you would like perspective, and use the Link Tool to link the *controlling* Yoke to the Camera, or use a Monitor instead of a Yoke*.*

Now that you've completed your first turret, you can experiment with different arrangements. Hinges can be used as the Y axis on your turret, and you can also use multiple elevation axes for individual guns like a triple battleship turret using one Rotor to turn the turret, and one Hinge to elevate each of the 3 weapons.

### Auto Turrets

Turrets do not need a connected Yoke and Event Gate to function automatically. Once two Mechanisms and a weapon have been linked the turret will become autonomous. It will only seek out targets set by its targeting mode. Toggling on the "Auto Fire" setting will allow the auto turret to begin firing on its target without player involvement.

Auto turrets will only fire when the player is currently piloting the craft they are attached to. To get them to seek and destroy targets all on their own players will need to place down a Space Station Computer. In the Space station Computer there is a setting called "Control Turrets". Once activated all turrets on the entity that are set to "Auto" targeting will independently find and shoot enemy targets within range.

## Debugging

Turrets need enough room to move, and if their components are obstructed by something, they can get stuck.

You can debug your turret by using the Link Tool on the second (normally elevation) mechanism.
This will show a sphere of coloured circles, each indicating the chance of collision around the turrets arc. Green is least likely to collide, while red is most likely. You can see on the rightmost image that the turret has an near-free arc, but it cannot aim directly down otherwise it will collide with its base.

## Advanced Usage

While incredibly simple to setup, turrets can have an extreme amount of creative uses stemming from how they are built.

### Stationary Turrets

Stationary Turrets, also known as Autocannons, are auto turrets that are designed to remain completely stationary on an entity. What makes these turrets different from normal ship mounted weapons is that it takes advantages of the turret's auto fire setting. Stationary turrets will automatically attack any target within a set radius of its linked weapon(s) barrel. Making a Stationary Turret into a manual turret is redundant.

There are several ways to setup an Autocannon. Any design that manages to prevent the axis Mechanisms from moving will count as an Autocannon. The most reliable design is simply putting two rotors on top of each other with a weapon topping it all off. As of 22w33a, When the turret is active the rotors will spin endlessly in place clipping through other blocks in the process. The normal tracking ability of a turret are still present on stationary turrets and can be exploited to create auto detection systems with logic.

### Single Axis Turrets

Single Axis Turrets are turrets that are designed to only move along one axis instead of two. These turrets by design will have less coverage then a standard two axis turret. It can still be of use as a manual turret as weapons will have the gimble effect to increase its coverage.

Single axis turrets still have two Mechanisms however they will usually be of the same type. A simple design is two rotors stacked on top of each other with a weapon placed perpendicular to the rotors. This design only allows for movement along the *X* axis and is good for sweeping shots. Another design uses two hinges to create a "Snake" turret. This turret can only move along the *Y* axis.

### Gyroscopic Turrets

Gyroscopic Turrets are turrets that are designed to have no collisions allowing for full 360 degree coverage. These are considered the best turret designs as they can track targets no matter the angle. The only limitation is the parent entity that the turret is attached to. If the Gyroscopic turret is built in the center of an entity this limitation is mostly removed.

Gyro turrets take advantage of the fact that blocks built onto an entity do not need to be physically connected and will move along with it. To build a Gyroscopic Turret players will need to place two rotors perpendicular to each other. The weapon also needs to be placed perpendicular to the second rotor while making sure give enough space between the rotors.

### Multi-Axis Turrets

Turret Computers are capable of having more than two mechanisms and one weapon linked to them. This gives rise to an esoteric turret design called Multi-Axis Turrets. Multi-Axis Turrets are the most complex type of turret as they make use of more than two mechanisms in their designs. Due to their intricate designs they should be used sparingly as even the AI has difficulty using it. The most reliable turret designs use only three mechanisms since the AI starts to have serious trouble tracking targets with any more.

Multi-axis turrets as a whole are the most diverse in terms of design as they can be any combination of the previous turret types mashed together. The one consistent rule is that after the second mechanism every subsequent linked mechanism must also have a linked weapon attached to it. There is technically no limit to how many more axis's players can add however after the 3rd axis the AI starts to break down and has extreme difficulty in aligning to targets.

A separate but related type of multi-axis design is simply stacking turrets on top of each other. This has the benefit of more stability and reliability as each turret will operate as a normal two axis turret. The downsides is unique shape and articulations that normal multi-axis turrets tend to make when perusing targets.

### Robotics

Robotics is technically not a type of turret but more about utilizing the articulation of turrets to create robotic limbs. This is in no way related to Mechs but is a way to create mech-like features on other types of entities.

The most common type of robotic limb that players will try to create are robotic arms made out of a turret. By using all the knowledge of the previously mentioned turret types players can create a plethora of interesting and useful designs. The vast majority of designs will probably be manual turrets as players will want to take advantage of the gimble effect while simulating the movements of an actual robot. For this setting the turret's targeting mode to "None" will prevent it from making any unintentional movement.

### Non-Combat Turrets

Turrets need not only be used as weapons. Due to the way players can setup turrets they can have a multitude of cosmetic and non-combat uses in ship design.

The ability to toggle a turret's "Auto Fire" on or off allows turrets to point themselves at something without attacking it. Setting a turret to "Starship Target" mode with its auto fire off will cause it to "look" at a whatever the player has targeted. Aesthetic camera turrets and even robotic heads can be made with this setup.

The most likely type of non-combat turret will be manual turrets as players will have more direct control over the turret's articulation. Building mechanical limbs that have Mag-Locks at their ends are very useful. Building articulating thrusters into Ships is both practical and aesthetically pleasing. There is no end to the types of cosmetic uses for turrets; Its all up to the player's own imagination.

## Tips

* Manual Turrets will still be controlled even in Free-Look Mode. This allows players to home in targets without piloting their crafts.
* Players will still control manual turrets when they are docked and have the **"Repair"** and **"Undock"** menu on screen.
* Turrets will only return to their set resting position when the player has left controls of the entity.
	+ Individual mechanisms can have their resting positions manually set through their context menu or collectively set all linked mechanisms through the Turret Computer.
* Using the copy-paste tool players can make Prefabs out of turrets they design.
* The rotation speed of turrets is effected by the rotational speed setting of each linked mechanism.
* Auto Turrets can only make use of Logic based sequential fire arrays if the inciting signal comes from an Event Gate listening to a weapon linked to the Turret Computer.
* Turret Mechanisms will trigger linked Event Gates while pursuing targets.

## Media

**Turret Guide**

**Turret Guide**

1. ↑ 1.0 1.1 *Default Keybindings*