Page 1 of 2

[script] Turret Missile Defense Mk2 v1.01 [link updated]

Posted: Thu, 21. Dec 06, 13:46
by fud
This is a "simple" edit to the egosoft turret missile defense. If you've ever been annoyed that the missle defense setting reverts to shooting at enemies when no missles are flying, this is for you.

Turret command is titled "Advanced Missile Defense" when you're selecting it. Works the same as the regular, requires fight command mk2 to be an option.


Thanks goes to Red Spot and Eladan for their input on this. :)


Missile Def Mk2.spk

Posted: Thu, 21. Dec 06, 14:15
by nNemethon
Cheers heaps Fud, I'll be looking forward to running it! :D Free M1 for you. Gotta go snooze now, Christmas waits for no tradesman, or do the clients. :(

Posted: Thu, 21. Dec 06, 16:01
by Cisor
No special Wares required?

In any event, I'm looking forward to this. It'll make capturing a bit easier.

Posted: Thu, 21. Dec 06, 16:07
by fud
Cisor wrote:No special Wares required?

Just fight command mk2, like the other turret commands. :)

Posted: Thu, 21. Dec 06, 16:12
by JMCorp
while you're at it make an "attack enemies" that shoots at enemy ships but targets missiles first? the default attack enemies ignores missiles completely. the default missile defense will not attack an enemy until it has shot at you and HIT first. really annoying.

Posted: Thu, 21. Dec 06, 17:41
by fud
That's sort of how the ego missle defense works. I know what you're getting at, but the ego version does about the same thing. If there are no missles to shoot at, it'll shoot at nearby enemies.

Posted: Fri, 22. Dec 06, 20:24
by JMCorp
the stock missile defense will not target an enemy ship unless they've scored a successful hit. while it's "about" the same thing, it's not the same thing. i could fly around for hours waiting on some of these idiot AI ships to hit my titan a few times so the turrets will attack them. so i just leave it on attack enemy and absorb the missiles. luckily i've never had anyone firestorm me.

Posted: Fri, 22. Dec 06, 20:47
by fud
This script was more suited towards the people that were fed up with their turrets shooting up ships that were potential bail outs. *My* reasoning for pursuing it, was having your own missles shot down by them, as they were shooting at enemy ships when no missles were there.

Posted: Fri, 22. Dec 06, 21:20
by WarmMachineME
fud wrote:This script was more suited towards the people that were fed up with their turrets shooting up ships that were potential bail outs. *My* reasoning for pursuing it, was having your own missles shot down by them, as they were shooting at enemy ships when no missles were there.
As well as those of us who also don't want their MD turrets wasting ammo on anything that isn't a missile. I've got 4 streams of searing, radioactive plasma washing over them, I don't need any help from my li'l turret buddies...

Thanks much, fud. :thumb_up: Now I can carry half the ammo crates and save that much cargo space, among other benefits.

Posted: Wed, 27. Dec 06, 04:10
by arcana75
I'm not being an ass... but it's spelt missile :D

Is the word spelt missle in the entire script?

Posted: Wed, 27. Dec 06, 04:35
by Computertech
JMCorp wrote:while you're at it make an "attack enemies" that shoots at enemy ships but targets missiles first? the default attack enemies ignores missiles completely. the default missile defense will not attack an enemy until it has shot at you and HIT first. really annoying.
I would like to have a script like that as well. shoots ememies but also shoots missiles as well. Not just wait until i'm hit. Would be nice having a nice amount of turrent scripts...

Posted: Wed, 27. Dec 06, 14:01
by fud
arcana75 wrote:I'm not being an ass... but it's spelt missile :D

Is the word spelt missle in the entire script?

:shrug:


I was in a hurry, and was more concerned with getting it functioning.

Posted: Thu, 28. Dec 06, 05:03
by arcana75
LOL no worries fud... a small edit in the t file fixed it up!

BTW fud is it possible to change the missile script NOT to shoot Hammerhead missiles? Otherwise it's an awesome script, 100% of the time enemy-fired missiles blow up in their face!

Posted: Thu, 28. Dec 06, 05:43
by fud
I'm not sure there's any way to discriminate missile types. It just looks for a missile object.

Posted: Fri, 29. Dec 06, 00:19
by Red Spot
fud wrote:I'm not sure there's any way to discriminate missile types. It just looks for a missile object.

*out of the naked brain coding ....*

at the top of the script where it looks for a missile ..
add something under it like this;

if $missile exists
$type get type of ware; $missile
skip if $type != [not to shoot at type]
$missile == null
end



G

Posted: Fri, 29. Dec 06, 03:25
by fud
Well, there ya go. :P

This is why I'm a student, and you're the professor. :)

Posted: Fri, 29. Dec 06, 03:37
by arcana75
Excellent thanks RS! I'll give that a shot... shooting an ass-slow Hammerhead to close range is ... auto-suicide!

Posted: Fri, 29. Dec 06, 06:24
by arcana75
Would this be about right...

Code: Select all

$victim = [THIS] -> find nearest missile aiming to me
010     if $victim -> exists
011      
012      if $victim == Hammerhead Missile
013       break
014      end
015      
016      set script command target: $victim

Posted: Sat, 30. Dec 06, 03:20
by Red Spot
arcana75 wrote:Would this be about right...
Does it look remotly as what I showed ... :roll:

Also note the word "add" in my previous post .. its there cause of a reason ..;)

(there are much better ways of implementing it than that I showed, but the way I showed should be a good "start" .. Once you have it working without causing infinite loops you may want to try and optimize the script, altho it would have little use, besides being a good experiance, as I already stipped all mumbo-jumbo from the from the script when I cut the lines to stop it targeting ships)



G

Posted: Sat, 30. Dec 06, 04:18
by arcana75
Red Spot wrote:
arcana75 wrote:Would this be about right...
Does it look remotly as what I showed ... :roll:

Also note the word "add" in my previous post .. its there cause of a reason ..;)

(there are much better ways of implementing it than that I showed, but the way I showed should be a good "start" .. Once you have it working without causing infinite loops you may want to try and optimize the script, altho it would have little use, besides being a good experiance, as I already stipped all mumbo-jumbo from the from the script when I cut the lines to stop it targeting ships)
Actually I have no clue what you typed, I'm not a scripter :cry: