This 'project' I actually started for 2 reasons;
-wanted to see if I could improve to NPCs turrets
-get some 'knowhow' on how to make someting similair for the player
well I found out the use of turrets is something really balanced ..
a few shots to many and your out of energy ..
a couple to few and you die with energy at max level ......
anyway to not bother you with boring details ...
I believe I made a rather good and balanced ..
but above all *fast* turret command ...
expect my scripts to make use of this .....
the end result is that it isnt *better* ..
it just does it different ... and fast ..
and to my taste its much fun ....
to install just copy or move the files found in the 'scripts' folder to your 'X3 scripts' folder ...-RS.Turret Defence-
This script combines energy managment, target tracking and weapon switching.
And makes a turret have a bit more of a bite than it now does.
This will not improve the turrets ability to hit something.
This script tries to keep the ships energy level up,
but as shields and/or hull might go down energy becomes less of a priority.
When the ships energy is low it will start firing in 'pulses',
meaning it will fire a few shots at a time making sure the energy level isnt going 'critical'.
There are 2 ways of using this command on your turrets.
Set the missile fire probability over 80% and the turret doesnt care about 'friendly fire',
set it at 80% or lower and it will keep an eye on what weapon to use.
Do note; the turret finds itself more important than any 'friendly',
if it has the choice of no weapon or an aera-effect weapon, than it will pick the area-effect weapon.
Mass Drivers are a 'special' among 'the specials'.
If a ships energy is low, or the target is a missile, M4, M5 or Drone,
the turret will *always* try switching to Mass Drivers.
If it has energy or the target is a missile it will fire with or without Mass Drivers.
If energy is low and the target is in Mass Driver fire-range, you can watch the ships hull go down ...
It will NOT try swiching to Mass Drivers when fighting larger ships if it still has energy,
it would simply waste ammo wich could be needed an other time.
The turret will first of all give priority to an incoming missile,
than to a possible enemy the player has targeted,
after that it will look for a 'targeted enemy'.
This means it will see if any other turret is tracking a target and will check if it can 'combine fire'.
After that it will see if the ship has an attacker, attack target or if there is any other enemy near the ship.
If an enemy has been found the turret will always start tracking it,
but when the target gets in firingrange the turret will have a very small 'delay'.
This delay will make sure less energy is wasted on 'long range fire' where it could be more effective in closer range.
The overall result of this command is that a turret will fire sooner (yep .. even with a delay its firing before others),
it will fire with the *best* weapon it has to use (it will switch weapons between shots if needed),
it will drain energy at a pretty good pass, but will never let it go 'critical' while shields and hull are up.
When equipping a ship equip it like the following to get maximum result;
when you equip a ship that has lets say 8 guns in each turret than dont give it 12 of a weapon.
Give it 8, 16, 24 or 32, anything with steps of 8 will have the *best* result.
For a ship like an M2, designed for heavy duty combat,
I'd advise to equip about 16 units of each weapontype it can install.
(I'd forget the Flak as it simply drains a lot of energy)
And give it maximum weapons for each turret.
A couple of weapons no ships should leave home without are;
the PBE's and Mass Drivers, make sure your ship has them, they are life-savers ..
This script will replace the "Turret attack enemies" command.
When you install this than when you use the "Turret attack enemies" command you will use this script.
NO new command will show .. it will replace the 'current' turret attack enemies command ...
get it here;
http://www.geocities.com/g5_11/X3/RS.Tu ... ev3.15.zip