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

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

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

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

Post by crackenspank » Tue, 19. Jun 07, 22:58

Would any of that debug code cause me to continually target the nearest enemy ship within weapons range over and over? After I installed the older 1.01, I was having that problem, will have to check out this updated one. :wink:

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

Post by x0ne » Wed, 20. Jun 07, 00:33

crackenspank wrote:Would any of that debug code cause me to continually target the nearest enemy ship within weapons range over and over? After I installed the older 1.01, I was having that problem, will have to check out this updated one. :wink:
Ahem, er, yes... :D

This is what I was using during the debug of the Tyr and Valhalla :roll:

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

Post by crackenspank » Wed, 20. Jun 07, 01:00

Heh, awesome. I'd been using version 1.0 again, but now I can go back to 1.01.

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

Post by x0ne » Thu, 21. Jun 07, 16:32

Quick update on how the special XTM version of this plugin is progressing...

Completed:

All weapon + missile data files have been brought in-line with XTM specs.

Plugin is now fully 'EMPC aware' - EMPCs are used by the plugin like any other weapon (incl. with weapon switching commands). This will eventually make its way into the standard version too.


Still to do:

Totally re-work targeting priority routines so that the plugin can recognise XTM ship classes like M0, M8, MTS, OWP, T0, etc. (FYI these classes do not actually exist in such a way that they're available to the script editor - most XTM M7s/M8s are in fact recognised as M1/M2 class ships!).


This last stage will take a while to complete. I already know how it will work, it's just making it efficient, and then all the testing... please be patient! :)

LUBEggA
Posts: 54
Joined: Sun, 1. Jan 06, 12:17

Post by LUBEggA » Sat, 23. Jun 07, 08:47

I have a problem installing your script: I get the error message that the software was not recognized (same as mentoined above). Checked everything you posted already but it didn't help :( .
After that I did a fresh reinstall installing only your script and it worked... but after installing XTM.7 I got the same message again, no other scripts installed...
Is there a compatibility issue?

BTW your scripts sounds fantastic, we all have long been waiting for something like this!

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

Post by x0ne » Sat, 23. Jun 07, 17:36

LUBEggA wrote:...After that I did a fresh reinstall installing only your script and it worked... but after installing XTM.7 I got the same message again, no other scripts installed...
Sorry to hear you're having problems. What I'd recommend doing is installing this plugin (and any other scripts you want to use with XTM) after you've installed the mod. I think this problem could be caused by installing the custom ware that this plugin uses, before installing the EMP (which is built into XTM and adds wares to the game).

To make absolutely sure everything's done in the *right* order, unpack the XTM .rar file and copy everything to the proper directories, install the XTM .spk file, then close the XScript Installer. Now install this plugin and other scripts, but only after performing this last step. You see, the XScript Installer makes most of it's changes when you close it, so this makes sure XTM is completely installed before you do anything else.

LUBEggA wrote:Is there a compatibility issue?
No, not with XTM and version 1.01 of this plugin. There may be definite issue with the EMP and Custom Wares, but you can certainly work around it - i.e. myself and others are running this plugin with XTM successfully.

LUBEggA wrote:BTW your scripts sounds fantastic, we all have long been waiting for something like this!
Thanks, I hope you get it working!

LUBEggA
Posts: 54
Joined: Sun, 1. Jan 06, 12:17

Post by LUBEggA » Sat, 23. Jun 07, 21:02

Thanks alot for your help... the trick was to close the script installer after installation! I was never aware, that it has to be closed to do all necessary settings for mods and scripts to work!
Now let's have some fun with your script :twisted: :twisted: :twisted:

Annex
Posts: 39
Joined: Sun, 18. Jul 04, 21:11

Post by Annex » Thu, 28. Jun 07, 22:47

Do I understand correctly that if I equip a battleship with this addon, and give it both heavy guns (PPCs) and lighter guns (HEPTs), it will switch between them automatically based on which targets its engaging? Or do the turrets need to be preconfigured with my selected weapons and this addon just fires the correct turrets against the correct targets?

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

Post by x0ne » Fri, 29. Jun 07, 00:01

Annex wrote:Do I understand correctly that if I equip a battleship with this addon, and give it both heavy guns (PPCs) and lighter guns (HEPTs), it will switch between them automatically based on which targets its engaging? Or do the turrets need to be preconfigured with my selected weapons and this addon just fires the correct turrets against the correct targets?
Yep, you've got it, but only if you use the commands that switch weapons - they're the one's that choose the best weapon available for their target.

There's also the "No Swap" commands - they only use what's mounted in the turret (and they'll fire that weapon at any target).

The targets themselves are chosen based on their importance - if there's an M2 3km away from you and a bunch of fighters inbetween, the turrets that can hit the M2 will fire at it before they engage the fighters. All commands (excluding Missile Defence) do this.

Can I make a tiny suggestion about your weapon choice? Mount more anti-fighter weapons than just HEPTS. The addition of some PACs, FAAs or PBEs etc. will ensure you kill more fighters quickly (plus PBEs are absolutely devestating with this plugin) - experiment, see what selection works best.

Hope that helps!

LUBEggA
Posts: 54
Joined: Sun, 1. Jan 06, 12:17

Post by LUBEggA » Sat, 30. Jun 07, 14:17

First of all: great script, have been long waiting for something like this!

There is an issue with turret-tracking I think. The turret fires when a target is within its firing-arc but does no actual tracking, meaning the turrets do not move! This looks quite wierd because the shots leave the turret at any possible angle without the barrels facing in that direction. And in my opinion this feels like cheating, because the turret-tracking (so moving to face into the right direction) takes some time depending on the weapon mounted. If the turret does not have to move to hit targets in its firing-arc then its overall efficiency is significantly increased! I think this is not what you intended with your script. Perhaps you can have a look into this?

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

Post by x0ne » Sun, 1. Jul 07, 15:35

LUBEggA wrote:First of all: great script, have been long waiting for something like this!
Thank you!
LUBEggA wrote:There is an issue with turret-tracking I think. The turret fires when a target is within its firing-arc but does no actual tracking, meaning the turrets do not move! This looks quite wierd because the shots leave the turret at any possible angle without the barrels facing in that direction. And in my opinion this feels like cheating, because the turret-tracking (so moving to face into the right direction) takes some time depending on the weapon mounted. If the turret does not have to move to hit targets in its firing-arc then its overall efficiency is significantly increased! I think this is not what you intended with your script. Perhaps you can have a look into this?
Yes you're right, but it's intentional I'm afraid. I wanted the plugin to be able to use all weapons at their maximum rate of fire, but moving the turret to face its target between shots makes this impossible, so to do what I wanted I had to choose one of the following:

1. Completely ignore moving the turrets.
2. Change the mounted weapon to something that can track quickly (or no weapon), move the turret, change back to the previous weapon, fire, repeat.
3. Ignore moving the turrets for certain weapons only.

Option one wasn't an option at all really, as PPCs for example would be able to track fighters at close range, etc. (I don't think I need to explain further, right?). Option two seems to be the best choice, but it too would make PPCs and other slow weapons track too quickly (and the code needed for the continual swapping would put more strain on the game). Three is therefore the option I went with...

When turning a turret to face it's target, the minimum time between shots you can achieve is around 200-250ms, so this means that turret mounted IREs, PBEs and PACs won't fire as fast as they're able to. With this plugin, any weapon that has a refire delay of < 200-250ms and can also track targets quickly, will not be turned to face its target - everything else will be though.

Unfortunately, none of these options are perfect - if you want accurate refire delay then there has to be a tradeoff between believability and performance. You have to ask yourself what would you rather have; The odd occasion where a turret tracked a fast moving target at very close range that it shouldn't have been able to, or no option of mounting PBEs as turret weapons because they don't fire quickly enough? :wink:

The cool thing is about this plugin though, is that with basic knowledge of the script editor you can make this choice yourself! If you edit x0ne.TCS.dat.weapons.xml, you'll see a 'move turret' flag for each weapon type. Setting this flag with the following code will force the plugin to move the turret when that weapon is in use:

Code: Select all

$move.turret[$n] = [TRUE]
More info on this can be found in section 4.1 of the readme, but if you'd like to set this flag to true for every weapon and are not confident of making the changes yourself, drop me a PM and I'll happily provide you an edited version of the script. In fact, if enough people request this I'll make a specific version available for general download.

One more thing - I'm not sure if you're aware of this but not all turret guns are animated, so even if the turret is being turned, you'll not actually see it all of the time.

Anyway thanks for the feedback, I hope this satisfies your concerns.

LUBEggA
Posts: 54
Joined: Sun, 1. Jan 06, 12:17

Post by LUBEggA » Sun, 1. Jul 07, 17:07

Thanks for your reply...
I see the problem. Nevertheless I will give it a try and do the change via script-editor, no need for a seperate version, thanks a lot.

IIRC the old AEGIS from X2 switched back to smallest available weapons for tracking and then switched back again. Don't know about the performance hit though, perhaps it wouldn't be that bad?

Whether you will change it or not this script is worth every penny... err credit :wink:

Can't wait to get my hands on the XTM-version of your plugin, although it does a good job already in my XTM-game! :twisted:

Annex
Posts: 39
Joined: Sun, 18. Jul 04, 21:11

Post by Annex » Mon, 2. Jul 07, 01:49

Just wanted to say that this script works very well and I applaud you for your efforts. I used to need gobs of fighters to protect my capital ships as they couldnt hit anything with their PPCs except for other slow movers. Now they hold their own just fine against swarms of pirates and xenon and what not. Love it.

misioooo
Posts: 115
Joined: Sun, 17. Jun 07, 14:17
x3tc

Post by misioooo » Mon, 2. Jul 07, 14:28

Thanks for grat script. I think it will replace RS turrets for me ;)
Annex wrote:Just wanted to say that this script works very well and I applaud you for your efforts. I used to need gobs of fighters to protect my capital ships as they couldnt hit anything with their PPCs except for other slow movers. Now they hold their own just fine against swarms of pirates and xenon and what not. Love it.
PPCs were never meant to be anti-fighter weapons! If you are using this script to hit fighters with them - you may as well use LVs cheats and kill all fighters using hotkey kill ;)

Anti-fighter weapons are all fast weapons with low to moderate damage (IREs, PBEs, HEPTs, PACs). PPCs are anti-capital weapons and IDs, CIGs are special weapons with their own purpose.

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

Post by x0ne » Mon, 2. Jul 07, 15:22

Thanks for all the kind words ppl, really appreciate it! :thumb_up:

LUBEggA wrote:IIRC the old AEGIS from X2 switched back to smallest available weapons for tracking and then switched back again. Don't know about the performance hit though, perhaps it wouldn't be that bad?
Yeah that's how AEGIS worked, but IMO PPCs that are able to track quickly are too unrealistic. I could make this plugin work in a similar way to AEGIS, but it already unbalances the game enough as it is :wink:

LUBEggA wrote:Can't wait to get my hands on the XTM-version of your plugin, although it does a good job already in my XTM-game!
The biggest changes to the XTM version are going to be in terms of performance and the fact that it's tuned exactly to the weapon, missile and ship specs. I'd say that with XTM it's currently about 80% effective, but the new version will rectify that and you'll be able to run it on way more in-sector turrets than before (most of these changes will also make it into the vanilla version).

misioooo wrote:PPCs were never meant to be anti-fighter weapons! If you are using this script to hit fighters with them...
I think what Annex is saying is that prior to using this plugin, a static loadout of PPCs was sometimes the only option for a capital ship (especially if AI piloted), but not any more as the PPCs will only be used when they're needed (i.e. against other large ships or when OOS).

Lidza
Posts: 403
Joined: Wed, 12. Oct 05, 23:23
x3

Post by Lidza » Sat, 7. Jul 07, 00:03

:oops:

I seem unable to make this script (101) to work on my X3 with XTended.

On startup it fails saying malfunction... SS ware missing. The manual mentions in two files, I got both.

I've uninstalled and it says "sorry didn't work"... I removed both, the install and unnistall and tried again and same SS ware thing! ARGHHH! :rant:

I need help!!!! :roll: Thanks

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

Post by x0ne » Sat, 7. Jul 07, 00:56

Sorry to hear it Lidza, but don't panic, I'm sure we can sort this out.
Lidza wrote:On startup it fails saying malfunction... SS ware missing. The manual mentions in two files, I got both.
Ok, the other thing to check at this stage is if you've got Custom Wares enabled in the XScript Installer. They have to be enabled for the plugin to work.

You'll also need to install this plugin (and any other scripts for that matter) after you've installed XTM - i.e. install XTM and its script pack, shut down the XScript Installer, then start it up again and install everything else.

Lidza wrote:I've uninstalled and it says "sorry didn't work"... I removed both, the install and unnistall and tried again and same SS ware thing! ARGHHH! :rant:
If all you've ever got is the SS_WARE error, then you don't need to run the uninstaller. When you get that error it means the script hasn't done anything at all (it hasn't initialised). The uninstaller is there for people who've had the script working and want to completely remove it from a game they've saved.


I think the best thing to do at this stage would be:

1. Remove the plugin with the XScript Installer (the Remove Script Files option/button).
2. Close the XScript Installer (this is when it makes its changes).
3. Start the XScript Installer up again and install the plugin.
4. Make sure Custom Wares are enabled and close the XScript Installer.
5. Run X3.
6. Let me know how you get on with this ;)

x3hydrino
Posts: 25
Joined: Tue, 12. Dec 06, 21:41
x3

Thanks for your unpaid work on this script.

Post by x3hydrino » Sat, 7. Jul 07, 10:16

Is this software useful for oos combat or are the normal eg turret commands fine?

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

Re: Thanks for your unpaid work on this script.

Post by x0ne » Sat, 7. Jul 07, 10:43

x3hydrino wrote:Is this software useful for oos combat or are the normal eg turret commands fine?
Any command you run on a turret will not run OOS, and that really is anything, not just the commands in this plugin.

FYI, OOS combat is just a numbers game, so having a fixed loadout of the biggest weapons available gives you a better chance of winning - weapons switching is completely pointless OOS.

This plugin has a seperate task that monitors all of a ships turrets, and because this task isn't attached to any particular turret, it does run while OOS, but only to check the ship is OOS and load the biggest possible weapons if this is true. Weapons switching starts up again if that ship returns in-sector.

One final thing, weapon switching is only performed by the Attack Enemies and Protect Ship commands in this plugin. The others with 'No Swap' in the title and Missile Defence just use what you've mounted.

LUBEggA
Posts: 54
Joined: Sun, 1. Jan 06, 12:17

Post by LUBEggA » Sat, 7. Jul 07, 17:16

While testing the turret-commands I have some strange behavior in weapon-switching: in my Argon Ceberus everything was fine, but the new Reaver the pirates were so friendly to give me (actually it took me some force to get it :twisted: :twisted: :twisted: ) always uses pbe when firing on m6!? or let's say it uses them as soon as they are in range. but there is no sense using pbe's on m6, is there? I don't know whether this is a problem with the Reaver itself, maybe because you actually don't have main weapons, just a front turret, or a general problem with the script.
Due to this it takes ages to take down M6 and as soon as there is more than one M6 and perhaps M3(+) escorts (Cycrow's Assassins Guild) I have big problems even with 4GJ of shielding!

Btw... for ships with front turrets and no main guns (so basically all capital ships) a special command for the front turret would be nice to have like... Attack my target. By this I could influence target selection at least for a few turrets.

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