Name: Turret Command Suite v2.03 beta
Updated: 14/10/2007
Author: mrcann
Description: Provides a Military grade version of Turret Commands as well as a set of Hotkeys to manage them
==========================================================================================
Download:
=======================================
Important Info
=======================================
If you are using version prior to v2.00, it is recommended to uninstall it before installing a new one!
This version of script was specifically optimized for the Xtended MOD
It should work in Vanilla X3, however weapon prioritization logic would not be precise. It may still look and work OK half of the time, but no guarantees are given. Sorry!
I will probably make another version of the script tuned for the Vanilla X3 when i have a time and if there is a demand for this

It also requires EMP to function
However EMP is included in the Xtended MOD already, so no need to worry
This current beta is pretty much finished feature-wise. If no complains arise, it would be promoted into a release (with a few more optimisations i could think of added)
=======================================
Military Grade Turrets (Milspec)
=======================================
The Milspec Turret Upgrade MK1 - MK2 is an upgrade that enables an advanced weapon switching and target prioritization on a ship, either its a Destroyer blistering with turrets or fighter with just a few turrets. A fighter should have a MK1 ware onboard, while a Capship would need to have both MK1 and MK2 wares.
The upgrade is available from all good Split Equipment docks for a reasonable price.
Upon installing the Milspec Turret Upgrade MK1 on your ship, new turret commands will become available:
- MIL: Turret Attack Target
This command orders ship to shoot only Player's target and nothing else. It is ideal to be used against Enemy Capships, where all your ship's laser energy is diverted into killing an Enemy Destroyer without wasting it firing at the Enemy Fighter Escort or other Destroyers that are not immediate priority to you.
- MIL: Turret Attack Enemies
This command would prioritize for closest targets, based on their threat level. Ie: the Enemy Destroyer would be targeted first, followed by an Enemy Carrier, and so forth, and only if some of your ship's turrets have nothing to do they will track nearest enemy ship in their view. It will not track enemy missiles however.
Basically, this command is useful to be run on your Capship when you are planning to kill anything that moves, provided you have the laser energy. But target preferences are given to enemy Capships first. Your Capship has enough shields not to fear enemy missiles, so they are ignored (besides shooting down enemy missiles would take valuable time your ship would otherwise use to fire PPCs at the enemy)
- MIL: Turret Fighter Defence
This command simply orders turrets to fire at the nearest enemy and at the same time locate and shoot down any enemy missile fired at you. It is useful for clearing out Enemy Fighter Escorts, either its run on your Capship or on your favorite M3
- MIL: Turret Protect Ship
This command is similar to Ego's "Protect Ship" command. It won't attack enemy ships unless they attack first.
All commands will make your ship analyse target and choose an appropriate weapon for turret aiming at it. Different weapons will be selected based on target's class, distance to target and state of target's shields (as you know weapons have different damage against Shield and Hull)
Since version 2.02 it also allows you to switch ship's primary weapon, the same way it happens with turrets. It will have to be activated in Ship Command Menu using the TCS: Primary Weapon Switcher command. Your fighters, M6s and M7s are now deadlier then ever! Just make sure you have enough units of weapons in cargo bay to mount them in turrets and on primary weapon!
=======================================
Outfitting Ships for use with Milspec Turrets
=======================================
You can load your favorite ship with every type of weapon it can mount. Just make sure you have as many units of weapon in cargo bay as there are weapon slots for this type of weapon on a ship.
For example: your total number of weapon slots is 44, out of which you can mount only 28 APACs and only 18 BPACs. So carry 28 APACs and 18 BPACs in cargo bay.
Why carry weaker version of the same weapon, ie BPAC and APAC, AHEPT and BHEPT? - because APAC/AHEPT are faster, so it has a better chance of hitting agile fighters at a distance (though smaller range)
Also make sure you carry weapons with fast-moving projectiles such as IREs - PACs - PBEs or Kyons, as these will be used when trying to shoot down an enemy missile. (Prioritized by weapon range of course)
To sum it up:
- - against Capships your ship will try to use PPCs (or anything with the hardest punch), as target is large, slow moving and therefore hard to miss
- against Corvettes it will use powerful weapons and antifighter weapons, since its a relatively large target and it will have a hard time dodging your fire
- against Fighters it will try to use reasonably fast and reasonably powerful anti fighter weapons (depending on distance to target)
- against Missiles it will try to use fastest weapon you have to shoot them down, doesn't matter if weapon is weak
- APAC 6
BPAC 6
AHEPT 6
BHEPT 4
APSG 6
BPSG 4
APBE 6
AKYON 6
BKYON 4
It ususally starts by drilling enemies with APBEs, then switches to AKYONs (which are more powerful against hull then PBEs) when target's shields are down.
Ship's primary weapon usually swithes between BKYON-APBE-BHEPT-etc depending on target's parameters. Just point and shoot!

A Xenon LX has:
- AIRE 10 (used to shoot down enemy missiles, as its the fastest weapon this ship can mount)
BPAC 10
AHEPT 10
BHEPT 2
BPBE 8
- AIRE 12 (again, used against enemy missiles, as its the fastest weapon this ship can mount in its turret [also, could probably get by only using 4 units of AIRE, since if trying to shoot down enemy missile with your primary weapon it will switch to BPBEs, as its a lot faster, however following the rule of having enough units of weapon to be able to mount it on every turret, i made it 12 units])
BPAC 12
BPBE 8
AEMP 12
Ship's primary weapon usually switches between BPAC-BPBE-AEMP, depending on the situation.
A Pirate Reaver has:
- AIRE 28
BIRE 18
APAC 28
BPAC 24
AHEPT 24
BHEPT 14
APSG 24
BPSG 8
BPPC 6 (note no APPC there, though it can mount them - because PPC weapons are usually prioritized by their power and range)
AFFA 14
BFFA 6
APBE 24
BPBE 6
AKYON 10
BKYON 6
Using Milspec Turrets OOS
=======================================
If ship goes OOS while Milspec Turret or Primary Weapon Switcher commands are used, the weapons of the strongest possible type are chosen on a turret or on primary weapon.
I.e. if its a Destroyer, it will choose a PPC on a turret slot (given it exists in cargo bay of course).
Please note, that if you manually change weapon on a turret slot on an OOS ship, it will not auto-switch back until it goes back to In Sector mode, so be careful not to forget to change weapons back to the strongest type when you are done experimenting!
=======================================
Turret Command Hotkeys
=======================================
There are also additional hotkeys included in this package to help you out:
Hotkeys to set all turrets to perform one of these commands:
- standard Ego turrent commands that don't provide weapon switching:
Turret Attack Target
Turret Attack Enemies
Turret Missile Defence
- turret commands that provide weapon switching and intelligent target tracking:
MIL: Turret Attack Target
MIL: Turret Attack Enemies
MIL: Turret Fighter Defence
- misc. turrent commands:
Turrets Off
Turret State Restore
Every time you give a turret an order by using menu (not through the hotkey) it will save all current Turret Command Selections.
Known Issue:
Unfortunately the algorithm is not perfect - if you use hotkey to set Turret Commands and then jump to another sector, your user-defined Turret Command Selection will be overwritten by commands initiated by the hotkey.
And as a bonus, a few more hotkeys were included:
- - Target nearest Capship hotkey will save you precious seconds when you jump out and notice lots of enemy Capships in close proximity. Hit "Target nearest Capship" and then hit "MIL: Turret Attack Target" hotkey to start your Destroyer acting, then you can use external view to look around for better situation analysis.
- Target nearest Enemy hotkey will target nearest enemy ship that is in range of your ship's primary weapons. If no such target found it will just target nearest enemy ship. It is useful when you are flying a fighter.
- Target nearest Missile hotkey will target nearest missile aiming at you. Its useful when you are in a ship that doesn't have turrets (like Khaak M3), so you'll have to shot them down yourself.
- Area Effect Weapon Switch hotkey will globally (for all your ships) Enable/Disable the use of Area Effect weapons (PSG/ID) by your turrets. When Area Effect weapons are going to be disabled the onboard computer will say: "PSG Weapon Systems Not Working", and if enabled the Betty will say: "PSG Weapon Systems Working". This hotkey is useful to preserve valuable container drops or if you don't want to accidentally piss off races while hunting an enemy in crowded areas.
- Capture Mode hotkey. In Capture Mode the ship will strip enemy of its shields and will keep it alive for as long as possible, using only weakest weapons onboard to infict minimum damage to its hull (usually BRI weapons will be used). In case you forget to turn it off, it will automatically switch itself off when you change ships. This command is only available on Player-controlled ships.
Installation
=======================================
SPK: - run the turret_command_suite_<version_number>_install.spk
=======================================
Uninstallation
=======================================
SPK: - use the Remove Script Files command in Script Installer to uninstall current script package, then install the turret_command_suite_<version_number>_remove.spk and start X3. Wait a bit until the uninstallation script finishes and you get a logbook message. Then quit X3, go back to the Script Installer and use the Remove Script Files to remove the uninstallation SPK.
The reason for having to run a special uninstallation SPK is because the Script Installer has a bug that makes it produce unpredictable results when including uninstall files in the original spk :-\ Sorry about that!
ZIP: - launch this file: uninstall.mrcann.tcs.xml
=======================================
Technical Info
=======================================
t file reference\text page used:
Code: Select all
8445 - Turret Command Suite by mrcann
Code: Select all
<t id="930">COMMAND_TYPE_TURRET_34</t> : MIL: Turret Attack Enemies, Turret Command Suite by mrcann
<t id="931">COMMAND_TYPE_TURRET_35</t> : MIL: Turret Protect Ship, Turret Command Suite by mrcann
<t id="932">COMMAND_TYPE_TURRET_36</t> : MIL: Turret Attack Target, Turret Command Suite by mrcann
<t id="933">COMMAND_TYPE_TURRET_37</t> : MIL: Turret Fighter Defence, Turret Command Suite by mrcann
<t id="1244">COMMAND_TYPE_SHIP_44</t> : TCS: Primary Weapon Switcher, Turret Command Suite by mrcann
Code: Select all
309-316 ........ Turret Command Suite by mrcann
Code: Select all
28;0;0;0;0;176;11003;0;438508;1;1;0;438508;0;0;0;SS_WARE_SW_CUSTOM16_5;
28;0;0;0;0;174;10983;0;61428;1;1;0;61428;0;0;0;SS_WARE_SW_CUSTOM14_5;
=======================================
Requirements
=======================================
X3 v2.0.2
Xtended MOD. Should work without XTM, however prioritization would not be precise.
X - Plugin Manager, if you are installing the SPK version
EMP (built in XTM)
=======================================
Compatibility
=======================================
This script is not compatible with the "Capital Ship Crews by Cycrow", due to sharing the same command slot in Ship Command Menu
This version of script was specifically optimized for the Xtended MOD.
It should work in Vanilla X3, however weapon prioritization logic would not be precise. It may still look and work OK half of the time, but no guarantees are given. Sorry!
The script has no issues with the current version of the Xtended MOD, which is v0.7.3 at the time of writing this.
=======================================
Version History
=======================================
v2.03 beta
- - Added an upgrade module that automatically restarts TCS processes (turret commands and primary weapon switcher command in ship menu) on all your owned ships upon version upgrade
- Added a Milspec Turret Upgrade MK1 ware that is priced cheaply and should be installed on your fighters. In addition to MK1, you will still require to have the MK2 version on your Capships!
- Major performance optimizations. "Turret Fighter Defence" and general Weapon switching are now consuming considerably less resources. It is especially useful if run on fighters. As a trade-off, all on-board weapons are recognized and available to be used when your ships are either going to the In Sector mode from OOS mode, or had their Milspec Turret Commands started. So don't expect your ship to immediately start using new weapons trasferred to ship's cargo bay without restarting Turret Commands first!
- "Target Closest Enemy" hotkey is now optimized to target nearest enemy ship that is in range of your ship's primary weapons. If no such target found it will just target nearest enemy ship. It is useful when you are flying a fighter.
- A Capture Mode hotkey added. In Capture Mode the ship will strip enemy of its shields and will keep it alive for as long as possible, using only weakest weapons onboard to infict minimum damage to its hull (usually BRI weapons will be used). In case you forget to turn it off, it will automatically switch itself off when you change ships. This command is only available on Player-controlled ships.
- - Added ability to switch ship's primary weapon, the same way it happens with turrets. It will have to be activated in Ship Command Menu using the TCS: Primary Weapon Switcher command. Your fighters, M6s and M7s are now deadlier then ever! Just make sure you have enough units of weapons in cargo bay to mount them in turrets and on primary weapon!
- Major revise of the "Turret Fighter Defence" command's code. It should track enemy missiles much better now.
- Fixed bug/feature/unexpected cheat (depends on how you look at it) that would occure in certain situations and enables crazy-low refire delays on weapons (thanks to x0ne for finding it). Now the refire delays are back to normal, but at the same time script's responsiveness is still sharp
- Fixed bug when you could not activate Milspec Turret Commands on your other ships, while yourself being in a ship that does not have the Milspec Turret Upgrade MK2 ware in cargo bay
- - Area Effect weapons such as PSG and ID, as well as CIG and Heavy Missile Gun (HMG) were added
- A hotkey for quick Area Effect weapon on/off switching was added. It is useful to preserve container drops or if you don't want to accidentally piss off races while hunting an enemy in crowded areas
- Turret Attack Enemies command logic was improved to prioritize targets better
- A lot of other improvements to targeting logic!
- - My own weapon switching logic was introduced
- Targeting logic was changed to introduce "Turret Fighter Defence" command; "Turret Attack Enemies" command now prioritizes for large targets based on threat they possess; "Turret Attack Target" command orders ship to shoot only player's target and nothing else.
- 2 new hotkeys added: "Target nearest Missile" and "Target nearest Enemy"
- - Code was optimised so it should run smoother.
- Docked ships will now select best weapon loadout if went OOS.
- Fixed a slight chance of ship not selecting best weapon loadout if going OOS in fly-mode.
- Fixed bug that prevented ship from auto-switching weapons on a turret if not a single weapon was installed in any of the turret slots (ie a freshly bought\made ship would not auto-switch until you install at least one weapon per turret manually)
- Changed the way weapons are selected when no enemy is in sight - before, all weapon slots but one were stripped of weapons; now they are populated with weapons of maxium (or nearly best) possible type. (Thanks to Red Spot for the idea)
- SPK in the original release v1.00 did not include 2 of the 4 uninstall files due to the bug in the Script Packager that produces unpredictable results when including uninstall files. It is advised to upgrade to v1.01 and only then uninstall package from the Script Installer. ZIP version is unaffected.
Happy Hunting!