EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[Script] Turrets: selective attack V.1.3
Post new topic Reply to topic Goto page 1, 2  Next
View previous topic :: View next topic
Author Message
Armankessilon





Joined: 17 Jan 2009
Posts: 28 on topic
Location: Stavropol, Russia
Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 19:33    Post subject: [Script] Turrets: selective attack V.1.3 Reply with quote Print

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

Back to top
View user's profile Send private message
fud





Joined: 25 Jan 2006
Posts: 6990 on topic
Location: IN, USA
Thank you for registering your game
PostPosted: Mon, 9. Feb 09, 19:48    Post subject: Reply with quote Print

Nice.

I've always thought there should be more flexibility with the turret commands.

Definitely going to check this one out.

Back to top
View user's profile Send private message
ttl





Joined: 06 Feb 2005
Posts: 537 on topic
Location: Helsinki, Finland
Thank you for registering your game
PostPosted: Tue, 10. Feb 09, 01:35    Post subject: Reply with quote Print

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. Smile

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.

Back to top
View user's profile Send private message
s9ilent





Joined: 29 Jun 2005
Posts: 2008 on topic
Location: Galactic Sector ZZ9-Plural Z alpha +10 GMT
Thank you for registering your game
PostPosted: Tue, 10. Feb 09, 01:41    Post subject: Reply with quote Print

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 Oops)

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)

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Armankessilon





Joined: 17 Jan 2009
Posts: 28 on topic
Location: Stavropol, Russia
Thank you for registering your game
PostPosted: Tue, 10. Feb 09, 11:27    Post subject: Reply with quote Print

All commands based on standart turret commands. If turret see big ship, it will attack him (if Attack Big Ship). No target selection.
Maybe, later i will add another commands Wink

Back to top
View user's profile Send private message
Gazz





Joined: 13 Jan 2006
Posts: 12407 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Mon, 23. Mar 09, 20:47    Post subject: Reply with quote Print

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)

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.

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. . . . . . Xai-Corp MSCI List is scripter's friend. I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message Visit poster's website
Seathal



MEDALMEDALMEDAL

Joined: 05 Jun 2008
Posts: 843 on topic

Thank you for registering your game
PostPosted: Mon, 23. Mar 09, 21:46    Post subject: Reply with quote Print

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...).

Back to top
View user's profile Send private message
Gazz





Joined: 13 Jan 2006
Posts: 12407 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Mon, 23. Mar 09, 23:18    Post subject: Reply with quote Print

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

That wasn't my idea, really. It's what all AI ships have been doing ever since Reunion, possibly longer.
It's just... the X3 way.


_________________
My complete script download page. . . . . . Xai-Corp MSCI List is scripter's friend. I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message Visit poster's website
Seathal



MEDALMEDALMEDAL

Joined: 05 Jun 2008
Posts: 843 on topic

Thank you for registering your game
PostPosted: Tue, 24. Mar 09, 16:34    Post subject: Reply with quote Print

Gazz wrote:
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

That wasn't my idea, really. It's what all AI ships have been doing ever since Reunion, possibly longer.
It's just... the X3 way.


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!

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.

Back to top
View user's profile Send private message
Armankessilon





Joined: 17 Jan 2009
Posts: 28 on topic
Location: Stavropol, Russia
Thank you for registering your game
PostPosted: Thu, 26. Mar 09, 20:33    Post subject: Reply with quote Print

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"

Well, actually there was the point - to ignore wrong targets, and stay off the trouble.
Maybe i will do what you're asking, but it will be separate script.
Seathal wrote:

And can't you add the missile defense to the "attack target" ones or is it already included?

Got in my to do list Wink
Seathal wrote:

Is an M6 considered a fighter or a capital?

As capital. You think it should be considered as fighter?

Back to top
View user's profile Send private message
MegaJohnny





Joined: 04 Jun 2008
Posts: 1754 on topic
Location: Manchester, UK
Thank you for registering your game
PostPosted: Thu, 26. Mar 09, 20:59    Post subject: Reply with quote Print

Armankessilon wrote:

As capital. You think it should be considered as fighter?

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.

Oh by the way I love you.

These commands should have been in TC to begin with.


_________________
My Steam profile
Back to top
View user's profile Send private message
Seathal



MEDALMEDALMEDAL

Joined: 05 Jun 2008
Posts: 843 on topic

Thank you for registering your game
PostPosted: Fri, 27. Mar 09, 17:50    Post subject: Reply with quote Print

Seathal wrote:

Is an M6 considered a fighter or a capital?

As capital. You think it should be considered as fighter?[/quote]

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 Razz

Back to top
View user's profile Send private message
Gazz





Joined: 13 Jan 2006
Posts: 12407 on topic
Location: Bavaria
Thank you for registering your game
PostPosted: Fri, 27. Mar 09, 18:03    Post subject: Reply with quote Print

Armankessilon wrote:
As capital. You think it should be considered as fighter?

The Xenon P has more of a fighter. Trying to hit it with PPC at close range is quite futile.

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. . . . . . Xai-Corp MSCI List is scripter's friend. I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Back to top
View user's profile Send private message Visit poster's website
Hieronymos





Joined: 30 Dec 2005
Posts: 829 on topic
Location: California--A State of Mind
Thank you for registering your game
PostPosted: Thu, 16. Apr 09, 03:40    Post subject: Reply with quote Print

Another interesting and useful turret script.

Perhaps the next logical development would be a "Point Defense" script for corvette and smaller frigate turrets, that would just target missles and fighters using best weapon available.


_________________
Back to top
View user's profile Send private message
Spectre01





Joined: 23 Dec 2008
Posts: 440 on topic
Location: Toronto
Thank you for registering your game
PostPosted: Mon, 20. Apr 09, 21:18    Post subject: Reply with quote Print

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.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2  Next
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Sat, 21. Oct 17, 17:43

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.53686 seconds, sql queries = 29