This is a watered-down ECM-only antimissile system inspired by Ramirez's chaff launcher, Thargoid's Anti Missile System, Cmdr Wyvern's Automatic Chaff System (which was based on Thargoid's AMS and Ramirez's Chaff Dispenser), and Screet's Missile Countermeasures (which was based on Cmdr Wyvern's Automatic Chaff System).

It's not "intelligent" -- it just fires the ECM *ONCE* when a missile is fired at the player's ship. In a sense, you can assume many NPC ships already have this equipment. It will warn but not fire the ECM if the energy levels are really low. It can be enabled/disabled, via equipment activation...in case you'd prefer to manually use ECM or if you have other OXP equipment that has the same effect. Even when enabled, ECM can still be fired manually...but not more often than normal.

There may be a minor conflict with this and Cmdr Wyvern's Automatic Chaff System, Ramirez's Chaff Launcher, Thargoid's Anti Missile System, and/or Screet's Missile Countermeasures.
The ECM may fire multiple times consecutively per each incoming missile as a result, rapidly depleting your energy banks.
So it's best to have only 1 such system installed or activated. (Good thing Auto-ECM can be disabled!)
But even together, the OXPs will not cause the ECM to fire faster than you could manually.

I'll add your Automatic Chaff System to the readme for the next release (v0.3 assuming there is one) and also edit my first post to reflect this. I'd mixed up your ACS with Ramirez's chaff launcher -- thinking they were made by the same person.

I recognize that there are quite a few anti-missile systems out there, most of which use the ECM as well. But I saw none that used ONLY the ECM, including yours.

Pretty much all of them seem to utilize hammerspace (http://tvtropes.org/pmwiki/pmwiki.php/Main/Hammerspace) with equipment that I don't see as very small. They need their own special ammo bin and launcher either firing forwards, firing/dropping rearwards, or both. Chopping specialized holes in the exterior of the player's ship can't help the overall resale value, especially if those items are later removed. While fluff-wise the Cobra 3 does have some unused internal space, I didn't get the impression it was in a convenient location for external exits. On top of this, the antimissile systems serve to devalue the somewhat expensive ECM-resistant "hardhead" missiles as well as quite a few even more expensive (but typically more powerful) OXP missiles. NPC ships cannot use the OXP antimissile equipment, at least not without additional complex scripting. In short, they all have serious game balance issues.

Incidentally, my other frustrations with your OXP specifically was partly why I made Auto-ECM. The ACS seemed pretty buggy regarding how many chaff bundles it had left -- it could be negative and still firing. It also seemed to have "messy" logic concerning whether to fire the ECM and/or chaff. Nested IFs can be useful, but that's the "deepest" If-else-if-else tree I've ever seen in any OXP! I spotted a couple places with:
&& missile.name == "Missile" && missile.name != "Missile"
...which doesn't make sense to me. (Not to say there's no reason for that -- I've been at a loss about a few ways Oolite syntax and logic works before!)

OK, you got me there! Touche, Commander. And to think I made ACS because Thargoid's AMS tends to fail more often than it succeeds, and with only a six-round magazine at extortionist's pricing to boot.

Switeck wrote: The ACS seemed pretty buggy regarding how many chaff bundles it had left -- it could be negative and still firing.

I'll have to look into that. I haven't noticed that bug myself, as I tend to reload at every main station that carries the reloads; it's usually well before the chaff magazine is emptied.
I know, my scripting sucks. If I manage to get the gadget to work at all, it's a victory. At least ACS mostly does what it says on the tin, funny chaff count bug aside.

Getting NPCs to carry it would be a treat, but I don't think Oolite's js engine is up to that. In any case, the NPCs can and do hurl oxp missiles at you - including some that aren't available_to_all. WTF is Rocketeer missiles? Never heard of Rocketeer missiles till one was shot at me!

Can't say I don't agree there...Thargoid's AMS seems to be firing barely homing gold-plated struts rather than missiles. They're too slow and with a poor corner rate to catch missiles. The triple-pack of fast missiles in armory would probably be a better choice than what AMS uses. Rigging that up to work with auto-launching antimissile logic controls...I just don't know if a player's missile can be scripted to auto-launch. Maybe added/removed by script...and firing something similar though?

As for NPCs using anti-missile systems, I can at least say they try to shoot missiles sometimes. Thargoids with their omnidirectional laser even do an ok job of it. It's almost a waste of time to drop a stationary q-mine off near them because of it. My auto-ECM can almost be assumed to already be on many NPC ships, due to how quickly many ECM incoming missiles.

Your ACS logic tries to handle every possible contingency. I think that's what makes it so very complex script logic-wise. I even ran into a headache even with just the auto-ECM due to whether the player had intentionally disabled that or whether it was damaged -- I felt different messages were merited for each condition.

As for OXP missiles and bombs, I do have fuel tanks and military missiles installed...though I'm more likely to have a military missile fired at me than installed on my ship. Might as well call Military Missiles "boomerang" when fired by pirates + ECMed. I did make it rarer on NPC ships though in my hacked version.

Cmdr Wyvern wrote:In any case, the NPCs can and do hurl oxp missiles at you - including some that aren't available_to_all. WTF is Rocketeer missiles? Never heard of Rocketeer missiles till one was shot at me!

He, funny missile isn't it (Vector.oxp)? I'm already working on some more NPC only things as I feel that the player has enough toys.

So the "Marc X Rocketeer" and "Barkas Barrier" will get some brothers and sisters in the next version (maybe something like "The Hugh Dave", "Big A's Revenge", "Mic Ha's Sorrowbringer", "Get A Fix - Shieldtest", "Jameson's Shaker", "Rincewinstons Nullifier" or "The Walch Pulsator") .-)

Switeck wrote:I also added a test mode for Auto-ECM -- it will tell you if it's active, disabled or damaged when you press the Equipment Mode key with the Auto-ECM equipment selected.

Now that's a good idea.

Seconded.. very good idea indeed.

Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied