[SCR] Missile Defense Mk2 (v2.28 - 17.12.11)

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
User avatar
robalexhall
Posts: 566
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by robalexhall » Sat, 26. Feb 11, 17:33

Just a quick question.

Is there any advantage in using protect ship over missile defence with this improved script?

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

Post by Gazz » Sun, 27. Feb 11, 11:24

Sure. Different priorities.

"Protect" fires only at attacking ships or the attack target of it's own ship.
It's a 50 line script. =)

If that's what you want done...
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.

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

Post by garrry34 » Tue, 17. May 11, 22:42

you my friend are a god, I'm using you adv version along with lightcubes missile boat addon, my nagoya Is a death machine, mwahahaha...

...thank you :D
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit

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

Post by garrry34 » Sat, 21. May 11, 02:46

gazz is there any conflict between your scripts and litcubes missile boat addon, I'm finding in battle I'm having to reset the turrets as the have a tendancy to stop firing...
PhenomII X4 940 black edition
8GB DDR2
ATI HD4890
Windows 7 64bit

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

Post by Gazz » Sat, 21. May 11, 08:24

At high overall script load, X3 temporarily freezes the "turn turret to target" instruction on random ships, effectively freezing the entire script.
Same happens to the "attack run" instruction, usually freezing fighters in their tracks.

Typically happens in big battles or if an M7M launches hundreds of missiles, driving CPU load through the roof.

AFAIK, MARS is the only turret script that is immune to this.
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.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 12:51

I have done some testing and the msl_def_mk2_reg version is swapping out weapons. I thought that version was not supposed to do weapon swapping?

As a result, I am seeing ships running around with only 1 or 2 of the available guns installed when I am expecting them all to be fitted. :o
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 14:28

You mean it's changing lasers on player owned ships?
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.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 14:31

Gazz wrote:You mean it's changing lasers on player owned ships?
I mean, I use EES/CWP to equip AI ships and they wonder around with say 1 PBC in a given turret rather than the 4 I am expecting.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 14:33

Automatic laser changing is a feature of all vanilla turret scripts in X3.

Affects all AI "big" ships except transports.

It's listed in the first post.

Mk2 fixed the bugs. It did not change the rules.
(unless you install the version that specifically does)
Last edited by Gazz on Sun, 22. May 11, 14:37, edited 1 time 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.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 14:36

Gazz wrote:Automatic laser changing is a feature of all vanilla turret scripts in X3.

Mk2 fixed the bugs. It did not change the rules.
(unless you install the version the specifically does)
I have disabled the "default" weapon switching you are talking about so I know it is this script at fault.

To re-inforce the point - with MD Mk2 (reg) installed the problem occurs, without it installed the problem does not.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 14:38

It is no fault.
It's the vanilla behaviour and described in the first post.

Works as intended.

If you edited the old vanilla scripts to not do so you have to edit this one as well if you want the effect.
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.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 14:41

Gazz wrote:It is no fault.
It's the vanilla behaviour and described in the first post.

Works as intended.

If you edited the old vanilla scripts to not do so you have to edit this one as well if you want the effect.
So are you calling the MCSI weapon switching commands directly? If so, I will need to provide an EES/CWP patch to disable this behaviour.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 14:53

Yes.
If you look at the automatic switching script, you'll see that it's rather inefficient.
Given the actual skill values of combat ships it only means lot of overhead for no gain since it adjusts weapons every 1-2 seconds.

I don't know what EES/CWP is but if it's a listed feature of this script to disable any and all weapon switching then you will indeed need a patch for all turret scripts like MARS, MEFOS, AEGIS, MD Mk2... and whatever else is out there.
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.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 14:54

Gazz wrote:Yes.
If you look at the automatic switching script, you'll see that it's rather inefficient.
Given the actual skill values of combat ships it only means lot of overhead for no gain since it adjusts weapons every 1-2 seconds.
What script is that... for EES I patched the default turret scripts that call the MCSI command so they no longer use the command (or any weapon switching at all - they effictively become NOPs wrt switching).

EDIT: Anyone else getting SMTP errors while posting??
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 14:55

Just look into any ".adv" vanilla turret script. They all reference it.

Breaking this functionality for MARS would amount to setting the flag in it's global config array.
You should find the location in the setup and/or the read config/laser data script.
As long as EES/CWP clearly states that it does that, I don't care.
Would be the player's decision.

For other scripts like MEFOS - I dunno.

The clean solution to disable this for Mk2 would be to provide your own launcher scripts and attach them to the in-game commands - the same way I did it for Mk2.
That way nothing is overwritten and scripts can be installed / uninstalled separately.


Roger L.S. Griffiths wrote:EDIT: Anyone else getting SMTP errors while posting??
Yes. Known bug atm.
Last edited by Gazz on Sun, 22. May 11, 15:12, edited 1 time 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.

A5PECT
Posts: 6078
Joined: Sun, 3. Sep 06, 02:31
x4

Post by A5PECT » Sun, 22. May 11, 15:01

Roger L.S. Griffiths wrote:EDIT: Anyone else getting SMTP errors while posting??
Yes.
Admitting you have a problem is the first step in figuring out how to make it worse.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 15:08

Gazz wrote:Just look into any ".adv" vanilla turret script. They all reference it.
I have already done that for the problematic Vanilla scripts.
Gazz wrote:Breaking this functionality for MARS would amount to setting the flag in it's global config array.
You should find the location in the setup and/or the read config/laser data script.
Are you saying that MD Mk2 is basically a limited version of (or add-on for) MARS? Or shares configuration with MARS?

EDIT: From an early post this does not appear to be the case, so I go back to my original question... which script in MD Mk2 needs to be edited to disable weapon switching.
Gazz wrote:For other scripts like MEFOS - I dunno.
MEFOS is extremely simplified - it switches between user configured sets as far as I can tell.
Last edited by Sam L.R. Griffiths on Sun, 22. May 11, 15:16, edited 1 time in total.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 15:15

Roger L.S. Griffiths wrote:Are you saying that MD Mk2 is basically a limited version of (or add-on for) MARS? Or shares configuration with MARS?
No. Not even close. I'm talking about MARS.
Since you want to disable weapon switching for your EES/CWP thing, you'll have to do this for more than one turret script.
I was just telling you how.
(edited the last post, too)

As long as this is a clearly labeled feature of EES/CWP, I don't care.
It's the player's choice in the end and I never made any attempt to make my scripts unaccessible by packing them or deleting any comments. Much to the contrary...

I think there's about half a dozen turret scripts that switch weapons.
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.

User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths » Sun, 22. May 11, 15:48

Gazz wrote:Just look into any ".adv" vanilla turret script. They all reference it.
...
The clean solution to disable this for Mk2 would be to provide your own launcher scripts and attach them to the in-game commands - the same way I did it for Mk2.
That way nothing is overwritten and scripts can be installed / uninstalled separately.
Ok, problem solved (I think - further testing necessary)...

From the looks of things the "vanilla" turret behaviour is to set turret commands to "Attack Target" by default (with EES 2.4 I fixed the switching for this command - which appears to be only used by the AI).

With MD Mk2 it looks like the other ADV commands come into play and so they needed to be patched as per already done for the "Attack Target" command.

Thanks for the help :)
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams

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

Post by Gazz » Sun, 22. May 11, 16:04

Roger L.S. Griffiths wrote:From the looks of things the "vanilla" turret behaviour is to set turret commands to "Attack Target" by default
No.
Vanilla ships run a mix of Attack Target and Missile Defense.
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.

Post Reply

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