Especially when flying a fighter it is not uncommon that missiles that you launch are immediately destroyed by enemy fire - or by your own cockpit guns / turrets.
This script provides a missile safety so the warheads are armed after the missile is at least 200m clear of your ship.
Note that this is not foolproof. A lucky shot can still detonate a missile even if the warhead isn't armed.
(Firing at warheads is neither safe nor recommended by the manufacturer)
This only affects missiles that
are launched by the playership
have a target
are of the type that is selected as current missile in the cockpit
The missiles do not have to be launched manually as long as they meet the aforementioned conditions and are launched at the current cockpit target.
Scripts like Missile Barrage or MEDUSA could make use of this.
This ignores missiles fired by huge ships (M1, M7M...) because these simply do not have the problem of missiles instantly being destroyed on launch.
It is a fighter issue.
And I wanted to exclude massive missile barrages. =)
This is an AL plugin. It can be turned on/off under Gameplay / AL Plugins.
In X3:AP, this script can be enabled for the AI as well.
Copy the contents of the scripts\X3AP_Missile_Safety_AI folder into \scripts\.
In the long run this is only going to work with Steam in Offline mode (or with updates disabled for AP) because it is necessary to overwrite vanilla files... which Steam would "fix" again.
For scripters:
To use Missile Safety for any AI ship, insert one script call before the actual launch instruction.
Installation
Copy the contents of the zip into the X3_TC folder
or in the case of X3:AP, into ... \Steam\SteamApps\common\x3 terran conflict\addon
Deinstallation
Turn off the AL plugin under Gameplay / AL Plugins.
Save.
Delete TC\scripts\al.plugin.gz.missile.safety.xml
Resources used:
Task ID 47050 and 57050 on the playership.
Last edited by Gazz on Tue, 27. Dec 11, 04:44, edited 14 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
its an AL plugin...
I was under the impression those are only run every 1 minute at most, yet i assume it works on missiles as soon as they launch
So erm how does it actually work?
I tried to take a look at the file but it makes no sense in notepad2 or the ms xml editor...
(whats a good out of game editor type thing for x3tc files?)
Lancefighter wrote:its an AL plugin...
I was under the impression those are only run every 1 minute at most, yet i assume it works on missiles as soon as they launch
So erm how does it actually work?
Hahaha!
Since AL plugins already have a library structure this single script runs in 3 different ways in 3 different places/tasks.
Up to 2 of them run on the playership...
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Lancefighter wrote:(whats a good out of game editor type thing for x3tc files?)
to view the best thing is firefox or ie as long as the script is in the same folder as the x2script.xsl found in your scripts folder ( i have a temp folder with that file in to view scripts while keeping them away from the game directory)
to edit, the script editor, unless i've missed something seriously major there is no stable standalone editor, alterations via the script editor are the only way i know of
Just follow the tasks...
At the Work: part it starts spawning into different places and it eventually runs on 3 different timers simultaneously.
Sure, I could have split it into 3 scripts but since AL plugins are already perfectly suited to act as their own library I just wrapped it all in one.
Since it's a very small project (1-2 pages of script per task) there was no danger of losing track of things. In fact I wrote it, turned it on, and it worked...
It's really very simple once you acquire the proper multiple schizophrenia.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
They will not actually make use of it until the script call is tied into the fight scripts.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Gazz excellent job as usual,only realised how much I needed this when I fired a hurricane and it blew up right next to me and forced change of underwear
I'm not going to rename it to Underwear Safety, though.
aka1nas wrote:Woohooo! Can't wait until it's ready! Is that going to be a part of your OOS redux?
There is no direct connection but for the OOS Rebalance I had to rewrite the stock ES scripts anyway so I placed the hooks for this one while I was there.
If MS is installed as well, AI ships (including yours) should then make use of it.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
If AI ships don't spontaneously combust for no apparent reason then it's probably working.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Gazz wrote:If AI ships don't spontaneously combust for no apparent reason then it's probably working.
A good point. I've been running CODEA pretty heavily as well, which takes over the missile launching for it's fighters, so my ships tend not to even fire missiles when enemies are very close.