Space Engineers

Space Engineers

505 ratings
Gun Fire Control System Mk3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
16.859 KB
12 Sep, 2015 @ 2:44am
10 Nov, 2015 @ 4:13am
18 Change Notes ( view )

Subscribe to download
Gun Fire Control System Mk3

Description
Bugfix (again)
Update the script if your turrets aren't responding (with Auto Target off or without sensors).

> Read the full guide to the GFCS script here. <

Video example (old version)
Showcase/tutorial world (old version)

WHAT THIS SCRIPT DOES

This script lets you control multiple turrets in order to aim and shoot at a stationary or moving target, calculating the right lead if necessary. It can also control and fire the turrets autonomously.

This script works with both turret blocks and custom-built rotor-based turrets. It also works with gravity-based weapons.

This script is best used with the BlueG Radar mod, although it can work without it (with some limitations).

You can also use my own modified version of the BlueG Radar instead, which ignores ship debris.

HOW TO USE THIS SCRIPT

You'll need the following things (make sure that all blocks are set to the same ownership):
  • 1 programmable block with the script loaded
  • 1 timer block set to run the programmable block and to trigger itself (not start itself).
  • a text or LCD panel called “Text panel GFCS”
  • any number of turret blocks or rotor turrets (any combination)
  • any number of “director turrets” (see the section on director turrets)

And the BlueG Radar components:
  • 1 antenna
  • 1 beacon with [radar] in its name
  • up to 20 sensors. The first sensor should have [radarg] in its name, the second sensor should have [radarg1], the third [radarg2] and so on up to [radarg19] for the 20th sensor. Each sensor will detect one extra target.

To run the script, trigger the timer block. To stop the script, turn off the PB or the timer block.

Using the script without the BlueG Radar mod

Please refer to the GFCS full guide for this.

1. HOW TO BUILD THE DIRECTOR TURRET(S)

The director turret is a turret used to aim all other turrets. The script mirrors the movement of all other turrets to match the movement of the director. You may have multiple directors, although only one can be used at the same time. By default, controlling a director will shift control of the turrets to that director.

A director turret can be a custom rotor turret or a single turret block (like the vanilla Gatling Turret).

Rotor-based director

Example picture[i.imgur.com]

A rotor-based director must have a remote control block (to tell the script the orientation of the director) called “Director Remote Control”.

Additionally, you may place these blocks:

- a horizontal rotor called “Director RotorX”
- a vertical rotor called “Director RotorY”

If these blocks are found, the director's rotors will be locked in place (turned on) while the remote is not controlled and unlocked (turned off) while it's not controlled. You'll also want a gyroscope and camera to point the director.

If you want to have multiple directors, add the number after “Director”. For example, the second director would have these blocks: “Director2 Remote Control”, “Director2 RotorX”, and “Director2 RotorY”.

Turret block director

Example picture[i.imgur.com]

Turret block directors should simply be named “Director”. If you want to have multiple directors, name them “Director2”, “Director3”, and so on.

Known issue: modded turret block directors may have some aiming inaccuracy.

If you wish not to use any director, at the top of the script look for the line bool no_director = false; and replace false with true.

2. HOW TO BUILD THE GUN TURRETS

Each turret is identified by a letter and a number (like A1, D4 or G7). This is to make it easy to choose and edit settings for multiple turrets (as described in the next section). Like directors, turrets can also be rotor-based or consisting of a single turret block.

Rotor-based turrets

Example picture[i.imgur.com]

Rotor-based turret “A1” should have the following blocks:

  • “Turret A1 Remote Control” (exactly 1 remote control block, placed according to the orientation of the turret)
  • “Turret A1 RotorX” (up to 1 horizontal rotor)
  • “Turret A1 RotorY” (any number of vertical rotors)
  • “Turret A1 Gun” (any number of guns)
  • "Turret A1 Sensor" (any number of sensors)

For turrets with different identifiers (like A2 or B1), change the names accordingly (like “Turret B1 Remote Control”). You may use Digi's Conveyor Hinges instead of any rotor. If a rotor turns the wrong way, add “Reverse” to its name (for example “Turret A1 RotorY Reverse”).

If a turret's sensor detects something, the script will turn the turret's guns off.

Single block turrets

Example picture[i.imgur.com]

For single turrets, simply name them “Turret”+identifier. For example, “Turret A” or “Turret D”. Single turrets don't need to have a number, but you can add it if you want.

Known issue: single block turrets can shoot into your own ship. Unfortunately I can't fix it unless Keen updates the API. >_>

3. HOW TO USE THE GFCS TEXT PANEL

Example picture[i.imgur.com]

The GFCS text panel is used to tell the script which turret to control and which settings to use each of them. By default, its name should be "Text panel GFCS". You can use an LCD panel instead of a text panel.

Multiple turrets with the same letter (A1, A2, A3) form a turret group. You can pick settings for one turret group by typing into the text panel's public text a line with these values (separating each value with a comma):

<turret group letter>, <projectile velocity>, <range>, <horizontal rotor speed>, <vertical rotor speed>

For example

A, 300, 800, 4, 4

This line tells the script to look for all “A” turrets, turn them with rotor speeds of 4, calculate the lead accounting for a projectile velocity of 300m/s, and turn off the guns if the target is out of gun range (800 meters).

Type each turret group as a separate line. For single turret blocks (no rotors), omit the rotor speeds.

NB: make sure that the default convergence isn't greater than the range of your turrets.

See the FAQ thread for how to get the projectile velocity of a weapon.

EXTRA FEATURES AND SETTINGS

You can place timers and turn them on/off to change settings while the script is running. Name the timers like this:

  • "Timer Block Auto Lead": turn it on/off to toggle target lead calculation.
  • "Timer Block Auto Target": when it's on, turrets will automatically aim at the closest target.
  • "Timer Block Auto Aim": when it's on, turrets will aim at the center of mass of the target you're aiming at. This is aim assist for the director.
  • "Timer Block Auto Fire": when it's on, turrets will fire automatically if there's a target.
  • "Timer Block Idle": when it's on, all rotors will be turned to zero degrees or between the max/min angles.

See the full guide for more features.

CREDITS

Credit goes to BlueG for the BlueG Radar mod and code, and to robbym for the GetDirectionTo function.
Popular Discussions View All (4)
18
19 Feb, 2017 @ 4:34pm
PINNED: Suggestions & Feedback
imivi
4
28 Jul, 2016 @ 3:31pm
PINNED: FAQ/Troubleshooting & bug reports
imivi
3
29 Dec, 2015 @ 10:29am
Catalog of ships useing this.
Fantasy System
345 Comments
HighFlyer96 14 Nov, 2022 @ 9:35am 
@PATS3Y You can see for yourself, this mod has released and updated in 2015. The DLC you're asking about has been released in 2022 Your best chances are just trying it out. As previous commenters already stated two years ago, this mod hasn't been updated and that there are similar replacements for it.
PATS3Y 13 Nov, 2022 @ 9:05pm 
does this work with warfare 2?
SevenofThr4wn 19 Dec, 2020 @ 5:32pm 
I am going to try it out now so if it is well and truly dead then I will tell you if it doesn't I won't tell you.
Gryphon 25 May, 2020 @ 7:05am 
@maggotlord this is pretty much well and truly dead, hasnt been updated since 2015. there are modern examples of similar scripts though, just do a workshop search for whiplash141 or Rdav
Maggotlord 7 Mar, 2020 @ 10:00am 
I just explored this game and this mod/script is all i want in this game! PLEASE make an update <3 without it my work for an 600m Battleship was complete brainfree :`(
Hage Maoh 6 Jan, 2020 @ 11:33pm 
Any up-to-date version of this?
HighFlyer96 26 May, 2019 @ 6:47am 
Someone should fix the damn game first I guess
the fox 25 May, 2019 @ 5:34pm 
Please Update, Way to many compiler errors
Silver 25 May, 2019 @ 5:26pm 
Please update because it does not compiled too many errors
Mishka 11 Dec, 2017 @ 3:24am 
Any chance of this getting an update?