[Script] Turrets: selective attack V.1.3
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 50
- Joined: Sat, 17. Jan 09, 09:49
[Script] Turrets: selective attack V.1.3
Turrets: selective attack V.1.3
Description:
This script will add four new turret commands:
-Defend from fighters (turret will respond only on fighter's and missile's attacks)
-Defend from big ships (turret will respond only on big ship's and missile's attacks)
-Attack fighters (turret will attack only enemy fighters)
-Attack big ships (turret will attack only enemy big ships)
Setup:
Unpack and copy all files to game folder.
Compatibility:
1.4 or higher
Language supplements:
-english
-russian
Used resources:
Commands:
-COMMAND_TYPE_TURRET_25
-COMMAND_TYPE_TURRET_26
-COMMAND_TYPE_TURRET_27
-COMMAND_TYPE_TURRET_28
Lang. files:
-4224-L007
-4224-L044
History:
V.1.3:
-english supplement
V.1.2:
-modified to X3: Terran Conflict
V.1.1:
-Attack fighters (turret will attack only enemy fighters)
-Attack big ships (turret will attack only enemy big ships)
Author: Yevgeniy Tumanov a.k.a Armankessilon
Download Link
Description:
This script will add four new turret commands:
-Defend from fighters (turret will respond only on fighter's and missile's attacks)
-Defend from big ships (turret will respond only on big ship's and missile's attacks)
-Attack fighters (turret will attack only enemy fighters)
-Attack big ships (turret will attack only enemy big ships)
Setup:
Unpack and copy all files to game folder.
Compatibility:
1.4 or higher
Language supplements:
-english
-russian
Used resources:
Commands:
-COMMAND_TYPE_TURRET_25
-COMMAND_TYPE_TURRET_26
-COMMAND_TYPE_TURRET_27
-COMMAND_TYPE_TURRET_28
Lang. files:
-4224-L007
-4224-L044
History:
V.1.3:
-english supplement
V.1.2:
-modified to X3: Terran Conflict
V.1.1:
-Attack fighters (turret will attack only enemy fighters)
-Attack big ships (turret will attack only enemy big ships)
Author: Yevgeniy Tumanov a.k.a Armankessilon
Download Link
So, allowing to use separate turrets for anti-capital and anti-fighter work?
Simple(ish) and more conservative option for the beast that is MARS.
I like it.
One suggestion, though I'm not even sure if it's in already: Make the "attack capital ships" command always prioritize the current target of the ship, if that target is a capital ship. You don't want your ship(s) to spread their fire among targets, if there's to choose from.
Simple(ish) and more conservative option for the beast that is MARS.
I like it.
One suggestion, though I'm not even sure if it's in already: Make the "attack capital ships" command always prioritize the current target of the ship, if that target is a capital ship. You don't want your ship(s) to spread their fire among targets, if there's to choose from.
I haven't looked at your script yet, but just a quick suggestions.
For anti fighter, the problem with fighters is the stock scripts don't target the best ship. (Eg like Gazz's example says, they shoot at that m5 flying wildly at 2k range, instead of the m3 at point blank)
You could improve anti-fighter turret scripts if you incrementally search for enemy fighters
(Search m3, enenmy nearest, then m4, same flags, etc m5, oh wait.. m8 first.. right new tc classes )
Also to prevent it firing at a target to far away, just make it re-search for a target after firing like 10 shots or so. (Where it uses the same search patterns as above)
For anti fighter, the problem with fighters is the stock scripts don't target the best ship. (Eg like Gazz's example says, they shoot at that m5 flying wildly at 2k range, instead of the m3 at point blank)
You could improve anti-fighter turret scripts if you incrementally search for enemy fighters
(Search m3, enenmy nearest, then m4, same flags, etc m5, oh wait.. m8 first.. right new tc classes )
Also to prevent it firing at a target to far away, just make it re-search for a target after firing like 10 shots or so. (Where it uses the same search patterns as above)
-
- Posts: 50
- Joined: Sat, 17. Jan 09, 09:49
This script is all about simplicity and not being a resource hog. So alas, you can't spoil it with complicated schemes, evaluating targets, checking a gazillion conditions.s9ilent wrote:You could improve anti-fighter turret scripts if you incrementally search for enemy fighters
(Search m3, enenmy nearest, then m4, same flags, etc m5, oh wait.. m8 first.. right new tc classes :S)
Also to prevent it firing at a target to far away, just make it re-search for a target after firing like 10 shots or so. (Where it uses the same search patterns as above)
Something simple would be the target's speed.
On an attack run fighters usually slow down well below top speed but while evading, they go full throttle.
So the simplest way to find out if fighter X is a good target is to compare current and top speed.
Or at least - keep firing at this fighter (as a stock script would) until it speeds up and does it's sommersaults.
It may not be ideal but it would be a simple and quick way to make a good/bad target decision. Just 2 numbers to judge the general intention of a fighter. And it's not cheating like trying to peek at what scripts/actions it is running or the likes. MARS wouldn't do that, either. =P
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.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Looking good, very good... but instead of "Attack only fighters/capital ships" couldn't you also add "Priorize fighters/capital ships voer other objectives, but still attack the opposite if there's no other best target"? And can't you add the missile defense to the "attack target" ones or is it already included? Is an M6 considered a fighter or a capital?
I've been hopeing for someone to do a simplified MARS script, less resource intensive and complicated, just with some good and valid turret commands like the ones mentioned. ALthough it was great, the MARS system of keeping all your weapons in the cargo and distributeing them automaticlly felt a bit forced, I'd like them to stay all the time in place and be just abit mroe selective (for example, PPC/PSPs not trying to hit a buzzing M5 when there's a frigate and a carrier in range...).
I've been hopeing for someone to do a simplified MARS script, less resource intensive and complicated, just with some good and valid turret commands like the ones mentioned. ALthough it was great, the MARS system of keeping all your weapons in the cargo and distributeing them automaticlly felt a bit forced, I'd like them to stay all the time in place and be just abit mroe selective (for example, PPC/PSPs not trying to hit a buzzing M5 when there's a frigate and a carrier in range...).
That wasn't my idea, really. It's what all AI ships have been doing ever since Reunion, possibly longer.Seathal wrote:ALthough it was great, the MARS system of keeping all your weapons in the cargo and distributeing them automaticlly felt a bit forced, I'd like them to stay all the time in place and be just abit mroe selective
It's just... the X3 way.
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.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Yes I understand that, but I can't imagine the way MARS works in a "real" situation, where those _huge_ cannons switch ina second and adapt to the enemy moves. If MARS didn't have that feature I'd be using it all the time!Gazz wrote:That wasn't my idea, really. It's what all AI ships have been doing ever since Reunion, possibly longer.Seathal wrote:ALthough it was great, the MARS system of keeping all your weapons in the cargo and distributeing them automaticlly felt a bit forced, I'd like them to stay all the time in place and be just abit mroe selective
It's just... the X3 way.
Don't get me wrong, the selection of targets, missile interception, priorities of blanks and the increased speed and aiming are great and I had so much fun with MARS in earlier saves.
-
- Posts: 50
- Joined: Sat, 17. Jan 09, 09:49
Well, actually there was the point - to ignore wrong targets, and stay off the trouble.Seathal wrote:couldn't you also add "Priorize fighters/capital ships voer other objectives, but still attack the opposite if there's no other best target"
Maybe i will do what you're asking, but it will be separate script.
Got in my to do listSeathal wrote: And can't you add the missile defense to the "attack target" ones or is it already included?
As capital. You think it should be considered as fighter?Seathal wrote: Is an M6 considered a fighter or a capital?
- MegaJohnny
- Posts: 2195
- Joined: Wed, 4. Jun 08, 22:30
I wouldn't say so personally but on the other hand if an anti-capital turret starts shooting at a corvette, esp. a fact one, you'll probably still miss a lot.Armankessilon wrote: As capital. You think it should be considered as fighter?
Oh by the way I love you.
These commands should have been in TC to begin with.
As capital. You think it should be considered as fighter?[/quote]Seathal wrote: Is an M6 considered a fighter or a capital?
That's the thing, it's inbetween, in TC it cannot be considered a true capital ship anymore but neither a fighter... For example. The Terran SSC can finish up a corvette easly, but other flak guns have more trouble, also as MegaJohnny commented, some anti-cap weapons miss a lot with corvettes (When ina Terran capital ship you actually kill more corvettes with your flaks than with your anti-cap lasers)... that's why I asked.
Still an excellent script
The Xenon P has more of a fighter. Trying to hit it with PPC at close range is quite futile.Armankessilon wrote:As capital. You think it should be considered as fighter?
You could try using Huge Ship instead of Big Ship for "capital" target selection, which would only be TL + M1/2/7.
The M6 would then be lumped in with the fighters and targeted with all the mid range weaponry like ISR, MAM and whatnot.
Or something like:
Cap ship: if no closest Huge Ship found, look for closest Big Ship
Fighter: closest (not huge) ship
Object class is the only thing that is usable in quick searches so you'll have to work with that.
But no matter how you do it, some will complain.
Luckily it's your script so it's either your way or... your way. =P
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.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
-
- Posts: 830
- Joined: Fri, 30. Dec 05, 22:14
Can you add another line in the script that force the turret to reselect a target every 3 seconds? I find that once a turret is "locked" on a target, until the target is destoryed, it will not fire at others, even the first target is out of range, and there's another one within range. The turret just ingnore the closest enemy, and waiting for its first target get in its range again.
Not only that, it is also the smartest way to use them, because we wont always have the hostile M2 right in front of us, right?Gazz wrote:That wasn't my idea, really. It's what all AI ships have been doing ever since Reunion, possibly longer.Seathal wrote:ALthough it was great, the MARS system of keeping all your weapons in the cargo and distributeing them automaticlly felt a bit forced, I'd like them to stay all the time in place and be just abit mroe selective
It's just... the X3 way.
I cant comprehend why Seathal wants that but.. oh well, he'll see when he has a fleet to command and his ships shoot ppc's at m5's and PACS to M2's..
-
- Posts: 50
- Joined: Sat, 17. Jan 09, 09:49
If first target is out of range, it will switch target automatically. At least it shouldSpectre01 wrote:Can you add another line in the script that force the turret to reselect a target every 3 seconds? I find that once a turret is "locked" on a target, until the target is destoryed, it will not fire at others, even the first target is out of range, and there's another one within range. The turret just ingnore the closest enemy, and waiting for its first target get in its range again.
Cannon fires only when target is in the firing range. Then it seek another target.
P.S. Just found one bad thing - M7M wouldn't filter targets. Ooops Wait for update