[SCRIPT] x0ne Turret Control System (TCS) 1.02 [UPDATED 31/12/2010]

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Post Reply
x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

[SCRIPT] x0ne Turret Control System (TCS) 1.02 [UPDATED 31/12/2010]

Post by x0ne » Tue, 12. Jun 07, 01:57

==============================
1. INFO
==============================


STATUS: NEW VERSION! 3.00 for XTM is available! Please see this thread for more information.

Name: x0ne Turret Control System (TCS)
Version: 1.02
Type: combat/turret plugin
Last updated: 12/08/2007
Download from: http://www.waxbox.myzen.co.uk/categories/waxboxX/


==============================
2. REQUIREMENTS
==============================


X3: Reunion version 2.0.x

Cycrow's X Plugin Manager to install.

Extended Mod Pack (EMP). Note: Some mods already have the EMP built in to them (like The Xtended Mod for example). Please check this first before installing the EMP.

In-Game: The commands in this plugin are available to any ship with the x0ne TCS Interface MK2 installed, and at least one turret (obviously). The x0ne TCS Interface MK2 is available from both Argon and Split Equipment Docks.


==============================
3. OVERVIEW
==============================


The x0ne Turret Control System (TCS) is a collection of advanced turret/ship commands and hotkeys, allowing for very precise control of your ships turrets. Features include:

5 x turret commands: Including Attack Enemies, Protect Ship, Missile Defence (just missiles!) and a couple of non-weapons-switching versions. These commands can be used in any combination on the same ship, and in conjunction with other turret commands not part of this plugin.

6 x hotkeys: Including Capture Mode(!), Missile Defence Only, Re-Scan Targets and Master on/off Switch.

Target prioritisation: Each class of ship will search for targets in a particular order, this order is based on what that ship was designed to attack/defend against. For example, fly an M2 into a group of fighters protecting an M1, and any turret that can hit the M1 will fire at the M1, all remaining turrets will deal with the fighters. Turn the other side of your M2 to face the M1, and the turrets that were dealing with fighters will start on the M1 if they can, and vice-versa. Full 'priority listings' are provided in the readme if you're curious.

Weapon switching: Turret weapons will be automatically selected using my own weapon switching routine. This means only your biggest 'anti-capital' weapons will be used against slow/non-moving targets, 'anti-fighter' weapons only against smaller ships, and a mixture of both against M6s/M7s. The routine can also recognise 'anti-missile' and area-effect weapons. OOS detection ensures a ships turrets are maxed out with the biggest weapons when you leave a sector, giving it the best chance of survival until you return.

Friendly-Fire Reduction System (FFRS): Allows the commands that switch weapons to safely make use of area-effect weapons (ID, PSG) by scanning for in-range 'friendlies'. This is configurable - if you don't care about neutral ships or that pilot who just bailed, stop the FFRS from scanning for ships. If you want to collect all those missiles after a dogfight, make the FFRS scan for floating wares. The FFRS also scans for gates and friendly ships/stations, but these are permanently enabled.

Accurate weapons refire delay: Your turret mounted weapons will now fire as fast as they do when used as your ships main guns - put those PBEs to good use for a change! :twisted:

Advanced missile defence and alerting: Tired of your turrets taking down a Firestorm Torpedo and killing you? Well not any more - blast-radius damage calculations ensure missiles will only be engaged if it is safe to do so. If a missile is unsafe to shoot down, you will be alerted and given the chance to take evasive action, plus some other useful features (see the readme).

Main guns energy reserve: Priority can be given to a ships main guns (i.e. you'll always be able to fire them) by setting a percentage of weapon energy that the plugin will not (in most cases) use.

Turret loadout checks: The commands that don't perform weapon switching will alert you to turret problems such as mismatched weapons mounted, no weapon mounted, or no available ammunition.

Special user-editable 'config scripts': Allows you to configure targeting priorities, weapon data and the blast-radius of missiles for use of this plugin with various mods, or for your own personal preference (see section 8 below).

Plus a few 'community friendly' features such as checking for missing script files, automatic command restarting on version changes and checking for in-use task IDs, etc.


==============================
4. INSTALLATION/REMOVAL
==============================


Installation: Extract the file x0ne_TCS_<version>_<date>.spk file from the archive, and install as per the instructions provided with the X3 Script Manager software.

Version changes: If you are upgrading to a new version of the plugin, then any ship running a command from the plugin will automatically restart that command using the new version (this also works when going back to a previous version).

Removal: This is handled by the X Plugin Manager, please follow the steps below:

1. Save your game (in a new slot is probably best) and shut down X3.
2. Uninstall the x0ne Turret Control System (TCS) plugin using the X Plugin Manager Installer program. Special plugin uninstall scripts will be automatically installed for you.
3. Shut down the X Plugin Manager Installer program, start X3 and load your saved game.
4. Wait for a confirmation message that the x0ne TCS plugin has been completely removed from your game.
5. Save your game and shut down X3.
6. You will be prompted to remove the special uninstall scripts when you next load the X Plugin Manager Installer program.


==============================
5. TURRET COMMANDS
==============================


Listed below are the commands available to each turret, with a brief description. The features available to each command are also listed, these features are explained in detail in section 3.3 of the readme.

Attack Enemies [Tur.A.E.x]: Turret will engage enemies wether they are attacking you or not.
Target Prioritisation
Weapon Switching
Accurate Refire Delay
Advanced Missile Defence
Energy Management
Friendly-Fire Reduction System (FFRS)

Protect Ship [Tur.P.S.x]: Turret will only engage ships that are attacking you.
Target Prioritisation
Weapon Switching
Accurate Refire Delay
Advanced Missile Defence
Energy Management
Friendly-Fire Reduction System (FFRS)

Attack Enemies, No Swap [Tur.A.E.nS.x]: Same as the Attack Enemies command, but without weapon switching.
Target Prioritisation
Accurate Refire Delay
Advanced Missile Defence
Energy Management
Turret Loadout Checks

Protect Ship, No Swap [Tur.P.S.nS.x]: Same as the Protect Ship command, but without weapon switching.
Target Prioritisation
Accurate Refire Delay
Advanced Missile Defence
Energy Management
Turret Loadout Checks

Missile Defence [Tur.M.D.x]: Turret will engage incoming missiles only.
Accurate Refire Delay
Advanced Missile Defence
Turret Loadout Checks


==============================
6. ADDITIONAL SHIP COMMANDS
==============================


x0ne FFRS: Protect Ships [x.FFRS.P.S]: Toggles scanning for neutral ships by the Friendly-Fire Reduction System (FFRS) on or off (on is the default setting). Also available as a hotkey for ease of use.

x0ne FFRS: Protect Wares [x.FFRS.P.W]: As above, but for floating wares. Off is the default setting.

x0ne TCS: Set Energy Reserve [x.TCS.E.R]: Allows you to set a percentage of your total weapon energy to be reserved for your ships main guns, meaning you'll always be able to fire them. This is set to 0% by default.


==============================
7. HOTKEYS
==============================


x0ne TCS: Master Switch*: This hotkey acts as an on/off switch for all turrets controlled by the TCS. The target acquisition and firing sequences are bypassed, leaving the system to run in a standby state. For use on those occasions where you're in friendly space and accidentally shunt someone... ;)

x0ne TCS: Re-Scan Targets: When the TCS is active, this hotkey forces all turrets to abandon their current target (ex. missiles and 'primary' targets), and start the targeting process again from scratch. Use this when there's something more important or closer for a turret to shoot at.

x0ne TCS: Capture Mode*: When Capture Mode is active, the TCS will not fire on any ship you have targeted, and FFRS scanning for neutral ships and floating wares will be enforced. If any turrets are firing at your current target when the mode is activated, they will be forced to stop. Surely I don't need to explain this one...?

x0ne TCS: Missile Defence Only*: This hotkey forces all turret commands (ex. Missile Defence) to stop firing on ships/stations, leaving them to deal with incoming missiles only. Useful for when a fight takes you close to a friendly station/big ship, but you still want a basic level of protection without risking loss of race rank.

x0ne FFRS: Protect Ships*: This is the hotkey for the x0ne FFRS: Protect Ships [x.FFRS.P.S] command.

x0ne FFRS: Protect Wares*: This is the hotkey for the x0ne FFRS: Protect Wares [x.FFRS.P.W] command.

* on/off toggle.


==============================
8. TUNING INFO
==============================


To make it as accurate as possible, specific targeting, weapon and missile data has been written into the plugin scripts. For this reason, I've designed the plugin in such a way that certain scripts can be edited to ensure it works perfectly with a wide variety of mods (or simply for your own personal preference).

This general release has been tuned for the vanilla version of the game (i.e. not modded), so this means it won't work as well as it could do 'out of the box' with any mod that has altered, or includes any of the following (it will still run though):

* Weapons data (i.e. refire delay, energy used, turret speed, etc.).
* New weapons.
* The blast radius of any missile.
* New missiles.
* Any new or altered ship that is no longer in line with its assigned class. Some kind of armoured transport for instance - a ship recognised by the script editor as TS class, but with the firepower and defensive capabilities of an M6.

Full, detailed instructions are provided in section 4 of the readme, but editing this plugin to work with a particular mod might not be everyone's cup of tea. In order to make it easily available to those people, I'd love to release and host different ‘official' versions of the plugin for those mods (it is designed for this after all!). If you're the owner of a publicly available mod for X3 that this plugin needs editing to work with properly, and you're interested in a collaboration of sorts (I'll just need answers to some questions really), then please get in touch and we can see if what I'm proposing is possible.


==============================
9. KNOWN ISSUES/LIMITATIONS
==============================


Mass Driver: Sadly, I couldn't get turret mounted Mass Drivers to work well at their maximum rate of fire. The game cannot handle processing their bullets in the huge quantities that this plugin can churn out, and I experienced some VERY weird behaviour as a result. For this reason, Mass Drivers will operate in much the same way as with the standard turret commands.

Concussion Impulse Generator: Due to their poor power-to-range ratio, the CIG is not supported by default for this vanilla release of the plugin (there's a more detailed explanation of why in section 5.2 of the readme).

Intended use in-sector: This plugin was never intended to be used on a lot of in-sector ships at the same time. Due to its exacting nature and the resultant amount of processing it has to do when in-sector, it's best suited for use on your personal ship (for which it was primarily designed), a handful of critical 'fleet leaders', or a particular wing of fighters for instance.

You'll find that beyond a certain number of active turrets (in-sector of course, I can't stress that enough!), your game will start to get slower. There's only so much script processing the game can handle, so this number will vary from person to person as it's very dependant on what other scripts you're running. In my own experience, 12-18 active turrets wasn't a problem at all, and even up to 36 was ok (just ok though). I've spent a lot of time trying to get the right balance of turret performance vs. game lag... I hope it's been worthwhile!


==============================
10. COMPATIBILITY
==============================


No compatibility issues reported.


==============================
11. DEV INFO
==============================


Command slots used:

COMMAND_TYPE_TURRET_40 (940)
COMMAND_TYPE_TURRET_41 (941)
COMMAND_TYPE_TURRET_42 (942)
COMMAND_TYPE_TURRET_43 (943)
COMMAND_TYPE_TURRET_44 (944)
COMMAND_TYPE_SHIP_57 (1257)
COMMAND_TYPE_SHIP_58 (1258)
COMMAND_TYPE_SHIP_59 (1259)

Text file(s) used: 7400


==============================
12. VERSION HISTORY.
==============================


12/08/2007 version 1.02
EMP used instead of Custom Wares.
Ware distribution and stock levels improved.
Price of ware lowered to reflect greater availability.
Task error handling improved.
Missing script files checking introduced.
Infinite loop caused by OOS faulty turrets fixed.
Plugin Manager used for un-installation.

16/06/2007 version 1.01
Changed ship command slots for XTM compatibility.

11/06/2007 version 1.00
First release.


...and finally, apologies to mrcann for using the 'TCS' acronym on a similar turret plugin, I assure you it wasn't intentional! ;)


Cheers,

x0ne (rhymes with 'zone').
Last edited by x0ne on Fri, 31. Dec 10, 17:32, edited 15 times in total.

Boris_The_Blade
Posts: 346
Joined: Tue, 1. May 07, 03:42

Post by Boris_The_Blade » Tue, 12. Jun 07, 02:26

Is it ready yet? :D

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Tue, 12. Jun 07, 08:41

Boris_The_Blade wrote:Is it ready yet? :D
In a word, yes ;)

Sorry for the delay folks, I decided to get some sleep instead...

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 13. Jun 07, 03:05

Hi, just wondering if anyone's downloaded this and if you're getting along ok with it? I'd love to hear from you!

I've updated the above descriptions as well, just read them since posting and they seemed a little dry - my sales skills are clearly not the best :oops:

User avatar
surferx
Posts: 1000
Joined: Wed, 6. Nov 02, 21:31
x4

Post by surferx » Wed, 13. Jun 07, 04:49

I'm going to try this using the XTM mod. I will let you know if I have any compatibility issues; but it looks good. :)
If you want to go fast, go alone.
If you want to go far, go together.

crackenspank
Posts: 17
Joined: Thu, 5. Oct 06, 21:18

Post by crackenspank » Wed, 13. Jun 07, 08:27

I just downloaded it, but am having some issues. Dunno if I did something wrong, but the ware doesn't appear anywhere. I've checked multiple equipment docks with no luck(Argon and Split). I also tried to add the ware via the cheats script, but it wasn't anywhere on the list.

When I ran the in-game script editor, I could see all its scripts were there, there's just no ware for me to install. If it helps any, I am using the latest XTM version.

EDIT: Looks like I made a little progress. I at least now get the error alarm and message upon loading up, but still no ware available. At first I thought it was because I had been missing plugin.scriptmanager.getware.xml from the scripts folder, but upon reloading, I'm still getting the error. All other files specified in the readme are there. I'm stumped.

Though this has brought to light something else for me...apparently, NONE of my custom wares are appearing in-game. I've been using the Capital Ship Crews plugin, but just noticed that there's no Ship Repair Components or Equipment Repair Components, so I have a feeling the problem is not the mod, but something on my end.

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 13. Jun 07, 08:56

surferx wrote:I'm going to try this using the XTM mod. I will let you know if I have any compatibility issues; but it looks good. :)
Thanks! I had big mods like XTM in mind when I was designing this to be 'tuned' for them (FYI there's a whole section in the readme on how to do this). Now XTM 0.7 is out, I'll be looking at releasing a version of the TCS specifically for it, but it'll be a while - real life getting in the way, etc.
Last edited by x0ne on Wed, 13. Jun 07, 11:17, edited 1 time in total.

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 13. Jun 07, 09:06

crackenspank wrote:Though this has brought to light something else for me...apparently, NONE of my custom wares are appearing in-game. I've been using the Capital Ship Crews plugin, but just noticed that there's no Ship Repair Components or Equipment Repair Components, so I have a feeling the problem is not the mod, but something on my end.
My first thought would be that Custom Wares have been switched off for some reason in Cycrow's XScript Installer? But that seems unlikely if plugin.scriptmanager.getware.xml is present - worth checking though.

Hmm, you've not installed the plugin and uninstaller at the same time have you? ;)

crackenspank
Posts: 17
Joined: Thu, 5. Oct 06, 21:18

Post by crackenspank » Wed, 13. Jun 07, 09:09

Heh, nope. Just got the plugin installed right now and Custom Wares is checked. This has gotta be something on my end though considering my other custom wares aren't showing up either, I just can't figure it out.

In the meantime though, I have a question. Since in your readme, you included the terran weapons, would that mean that with this script running, any Terran ship I have will weapon swap to any terran weapons I have aboard?

crackenspank
Posts: 17
Joined: Thu, 5. Oct 06, 21:18

Post by crackenspank » Wed, 13. Jun 07, 10:06

Well, good and bad news now. I uninstalled all mods/plugins as well as teh X Script Installer and reinstalled it all one by one.

NOW I'm seeing all my custom wares, but there's a new problem. After about 10 seconds, the game locks up and I have to force quit the application. Ugh.

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 13. Jun 07, 10:32

crackenspank wrote:Well, good and bad news now. I uninstalled all mods/plugins as well as teh X Script Installer and reinstalled it all one by one.

NOW I'm seeing all my custom wares, but there's a new problem. After about 10 seconds, the game locks up and I have to force quit the application. Ugh.
:o sorry to hear that man, I guess the only course of action is to uninstall again, then apply each mod/plugin one by one and see which is causing the problem. Might be an idea doing this from a new game as well perhaps?

Something was def. very wrong before you uninstalled though. If all Cycrow's ware scripts and my plugin files were present, and custom wares were enabled, then plugin.scriptmanager.getware.xml shouldn't have been returning null values (this is what causes my setup script to throw the initialisation error and stop everything).

Hmm, have a word with Cycrow perhaps?

crackenspank
Posts: 17
Joined: Thu, 5. Oct 06, 21:18

Post by crackenspank » Wed, 13. Jun 07, 10:49

Looks as though it was just a corrupt save. Unfortunately though, NONE of the saves from my current game were working so I had to start all over. Not a huge deal. But it does appear to be working.

Now, another question for ya. Will this work at all with new ships? I tried running it on a few of the XTM ships and with weapon swapping, it would only equip 1 weapon per turret bank...even if there were 8 turrets on that bank, only one would be equipped. Not sure if this is a script problem, or the fact that it's a ship added to the game.

Other than that, it seems to be working perfectly. Been looking for a really good turret plugin since RS stopped working on his.
Last edited by crackenspank on Wed, 13. Jun 07, 10:59, edited 1 time in total.

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 13. Jun 07, 10:49

crackenspank wrote:Since in your readme, you included the terran weapons, would that mean that with this script running, any Terran ship I have will weapon swap to any terran weapons I have aboard?
Yes, Terran ships and weapons are no different to *available* ships/weapons are they (or am I missing something)?

I'll freely admit this isn't something I've actually done with the plugin (yet) - I included the Terran weapons because they're in the game, and even though they're not available, you never know how others may be using them...;)

x0ne
Posts: 173
Joined: Sun, 9. Apr 06, 21:49
x3tc

Post by x0ne » Wed, 13. Jun 07, 10:59

crackenspank wrote:Looks as though it was just a corrupt save. Unfortunately though, NONE of the saves from my current game were working so I had to start all over. Not a huge deal. But it does appear to be working.
Well that some good news at least, glad to hear it!

crackenspank wrote:Now, another question for ya. Will this work at all with new ships? I tried running it on a few of the XTM ships and with weapon swapping, it would only equip 1 weapon per turret bank...even if there were 8 turrets on that bank, only one would be equipped. Not sure if this is a script problem, or the fact that it's a ship added to the game.
I think we've just hit the first operational issue (maybe). Turret 'banks'?! I'm just familiar with a ship having say 6 turrets, and multiple weapon slots in each turret (8 in vanilla X3). The plugin is not limited to a certain number of turrets and slots thouhg. Can you have banks of turrets in XTM made up of multiple turrets (or something like that?).

Hmm, hang on, when the commands initialise they dont fill the turrets, only 1 weapon with the longest range is loaded. The turrets are filled when they start to fire (or the ship goes OOS)- hopefully this is it?
Last edited by x0ne on Wed, 13. Jun 07, 11:13, edited 1 time in total.

crackenspank
Posts: 17
Joined: Thu, 5. Oct 06, 21:18

Post by crackenspank » Wed, 13. Jun 07, 11:08

Yeah, I meant turrets with multiple slots. I just like to call them turret banks.

So that's how it works then? It just fills the first slot with the best weapon and once it starts engaging a target, then it fills the others? If that's the case, then awesome...haven't seen anythign wrong with the plugin then yet.

Haven't had a whole lot of time to really test it out, but I'll mess around with it some more tomorrow...for now though, I need some sleep. Oh, and thanks for the plugin, been dying to have another good turret plugin like this. I'm a huge cap ship fan, so this is a must have in my opinion.

Post Reply

Return to “X³: Reunion - Scripts and Modding”