[SCRIPT] EMP Missile Protection System (EMPS) v25

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
xprotocol
Posts: 6
Joined: Fri, 10. Feb 12, 21:01

[SCRIPT] EMP Missile Protection System (EMPS) v25

Post by xprotocol » Thu, 16. Feb 12, 05:21

EMP Missile Protection System

What is it?

A script that destructs missiles within specific range from your ship. Activation of this system requires specified amount of Energy Cells in your ship inventory. Upon activation Energy Cells are consumed by the system. System is only available on player's ship of classes M1/M2/M3, TS/TP/TM/TL, M6/M8.

What it does exactly?

Cause explosions of missiles within specific range from your ship. All missiles that have a target and fall under radius of this system will be exploded. Missiles that have lost their target are safely locked to avoid accidental explotions, and thus EMP will not work on them.

Why?

Boron Navy researched for a new way of avoiding massive damage caused by hostile missile frigates used by Xenon, Pirates and Split (and now Terrans). They decided that the best way to deal with missiles is to explode them (and hopefuly explode the one who would send them). After experimenting with ECM devices, Kamikaze droids, and ultimately missile-to-missile systems an old forgotten EMP blast was brought to life once again.

Any configuration options?

Script uses Plugin Configuration by Cycrow to configure options. Each class of ship that can use the system can be configured with specified range of EMP ranging from 1km to 10k in increments of 1km. Also, energy cell usage is configurable as well per capital (M1/M2/TL), corvette (M6/M8 ), transport (TS/TP/TM) and fighter (M3) categories.

How to use it?

Script installs a hotkey. Once hotkey is pressed system would check ship's inventory for required amout of energy cells and activate EMP blast. System will notify player of how many energy cells were used or is needed to activate system.
That's right, no required software or equipment item is needed for this system. Press button, enjoy little 'puff' sound and watch fireworks....

Outstanding Issues?

So far system has not failed to perform. Of course it may be a bit slow to react for fast missiles within short range, however any future problems are expected to be improved upon.

M5 or M4 classes?

System employs powerful blast that is not easily generated by smaller ships. While theoretically possible to install such a system, small cargo of M4/M5 ships would not provide performance needed to swart attack in combat situation. Thus, Boron Navy declined use of such system for smaller ships, preferring to keep cargo full of light missiles for pin-point attacks.

What to improve?

Currently EMPS can only be used by player. This can change. The goal in future to make this system available to average AI craft. That means additional command. The question would be 'can AI use it'? For now, no affirmative answer.
Also, M4/M5 limitation can be taken out. For those users that prefer more 'immersive' way of playing a new software/equipment can be created to represent existance of system on their ships.

How to install?

Download and install using Plugin Manager by Cycrow.

X3:TC or AP?

Script has been tested to work on X3:AP. However, it should work with X3:TC without problem.

Download Link

http://www.mediafire.com/?hx2tcbf7b0a0ns1

Changelog:

v25:
- Cleanup of hard-coded value for required EC check.

v24:
- Script will no longer output debug information into player's logbook.

v23
- Initial release.


Please leave your feedback.
Last edited by xprotocol on Thu, 16. Feb 12, 17:19, edited 9 times in total.

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Thu, 16. Feb 12, 06:10

Great idea. Ill give it a go.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Re: [SCRIPT] EMP Missile Protection System (EMPS) v24

Post by Gazz » Thu, 16. Feb 12, 08:52

xprotocol wrote:The goal in future to make this system available to average AI craft. That means additional command. The question would be 'can AI use it'?
Of course they can - but how are you going to get AI ships to keep a supply of EC?
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.

xprotocol
Posts: 6
Joined: Fri, 10. Feb 12, 21:01

Re: [SCRIPT] EMP Missile Protection System (EMPS) v24

Post by xprotocol » Thu, 16. Feb 12, 16:48

Gazz wrote:
xprotocol wrote:The goal in future to make this system available to average AI craft. That means additional command. The question would be 'can AI use it'?
Of course they can - but how are you going to get AI ships to keep a supply of EC?
I think I should have clarified it more about AI ships. I'm not familiar yet with scripts that provide combat logic, therefore I mentioned my question whether they will be using such script or not in combat situation by 'themselves' (AI vs AI blowing missiles up)

As for EC supply, I have not come to that part in thinking about it. Once I start I'll see what options I will have. Very basic idea would be to limit amount of charges per ship. Configure this amount via Plugin Configurations. And re-supply when ship is getting its EC for jumpdrive.

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Thu, 16. Feb 12, 16:54

You could just do a cooldown instead.
The ship starts with 5 invisible charges. Everytime it wants to use one, it checks the "last used" timer to see how many may have been regenerated since then.
That way you only need to manage 2 numbers per ship.
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.

xprotocol
Posts: 6
Joined: Fri, 10. Feb 12, 21:01

Post by xprotocol » Thu, 16. Feb 12, 17:01

Gazz wrote:You could just do a cooldown instead.
The ship starts with 5 invisible charges. Everytime it wants to use one, it checks the "last used" timer to see how many may have been regenerated since then.
That way you only need to manage 2 numbers per ship.
I see. Can you provide an example of code where charges are checked so that I can see how it is done?

User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz » Thu, 16. Feb 12, 17:13

There is no example. I made it up on the spot.

Charges and the recorded playtime would probably be local variables but the actual calculation is simple beancounter math.
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.

xprotocol
Posts: 6
Joined: Fri, 10. Feb 12, 21:01

Post by xprotocol » Thu, 16. Feb 12, 17:24

Gazz wrote:There is no example. I made it up on the spot.

Charges and the recorded playtime would probably be local variables but the actual calculation is simple beancounter math.
I see. This way there would be no need to supply EC to run the script. Interesting idea. I'll keep it.

garrry34
Posts: 911
Joined: Sun, 17. Jul 05, 14:43
x3tc

Post by garrry34 » Wed, 4. Apr 12, 23:13

hi I love this little beauty, the only problem I have is that in the settings for the energy cell figures revert back to default after loading a saved game, distance setting work as the should...
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit

LordGaara
Posts: 140
Joined: Tue, 9. Feb 10, 13:23

Post by LordGaara » Thu, 5. Apr 12, 11:08

Great idea and script xprotocol! I would love using it.

One question tho:
How about M7's? Why not? If a M6, TS and even M3 can use it, how come M7's cant?

Cheers

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”