[SCRIPT][AP][TC] Advanced Fight Scripts - v. 3.1, 19.01.2014
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
I agree with above..
Watched a heavy centaur + 2 nova escorts yesterday duke it out with some Xenon's (spawned from a sector patrol mission). Its finally awesome to see fighters actually making noticeable shots impact (and kills)!
@Cronos: Another question, does your script have any effect on wing formations? The Hcentaur + 2 novas I mentioned above flew really well in formation and didn't do the ole 'loop around my wing leader' thing...
Watched a heavy centaur + 2 nova escorts yesterday duke it out with some Xenon's (spawned from a sector patrol mission). Its finally awesome to see fighters actually making noticeable shots impact (and kills)!
@Cronos: Another question, does your script have any effect on wing formations? The Hcentaur + 2 novas I mentioned above flew really well in formation and didn't do the ole 'loop around my wing leader' thing...
I fly an OWP. What about you?
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Well, for one, I changed the attack response of fighters so that ships select and engage targets upon their formation being targeted. They generally shouldn't wait until the enemy has actually shot at them. Which means that faster ships should detach from the formation to intercept attackers (within a certain max range, of course).Mad_CatMk2 wrote: @Cronos: Another question, does your script have any effect on wing formations? The Hcentaur + 2 novas I mentioned above flew really well in formation and didn't do the ole 'loop around my wing leader' thing...
And since the fighters don't randomly evade until targeted, they keep their flightpath longer, which makes the formations look more crisp. I made a test with 9 Jaguars vs. 3 novas. Looks like a swarm of angry bees: All Jaguars will attack a single nova, forming a cloud behind it and firing all at once.
Edit: Everything is running smoothly for now, except sometimes ships decide they really want to go and rethink their life and fly away. Really, really far away. It's obvious that this is the evasion portion of the script giving them faulty coordinates, but I have to figure out why.
-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
Lets just say they're fleeing for good...Cronos988 wrote:Edit: Everything is running smoothly for now, except sometimes ships decide they really want to go and rethink their life and fly away. Really, really far away. It's obvious that this is the evasion portion of the script giving them faulty coordinates, but I have to figure out why.

I fly an OWP. What about you?
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Well, only like 30 km, then they'll actually turn around and rejoin the fight. It's a really annoying bug - every 8th or so evasive move, I get an arbitrarily high number for the Z coordinate. And even then my failsafe should catch it. But it doesn't. I am staring at these like 50 lines of code and can't figure out what is happening.Mad_CatMk2 wrote:Lets just say they're fleeing for good...Cronos988 wrote:Edit: Everything is running smoothly for now, except sometimes ships decide they really want to go and rethink their life and fly away. Really, really far away. It's obvious that this is the evasion portion of the script giving them faulty coordinates, but I have to figure out why.
Edit: Bug is squashed! Going to do some more testing and fine tuning tomorrow, and then I can probably release it.
-
- Posts: 254
- Joined: Sat, 23. Feb 08, 22:23
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Unfortunately, CODEA uses it's own target acquisition logic and, more importantly, it's own fightscripts. CODEA also cheats in fights - it disables enemy fighters.Phier wrote:I'm still getting my AP game back up to par on my new computer, so I don't have CODEA working yet. Has anyone tried this with with CODEA?
The reason I started working on this script because I wanted all fighters to be as efficient as CODEA fighters, and I was dismayed when I found out that CODEA achieves it's results by force of numbers and disabling enemy ships via script.
Consequently, the two scripts aren't really compatible, which is to say CODEA fighters won't use my scripts. It might be possible to change CODEA to actually use my logic, but you could always just use another carrier command software - Anarkis Defense System comes to mind.
-
- Posts: 681
- Joined: Thu, 17. Nov 05, 13:12
Never played CODEA, but it cheats?Cronos988 wrote: CODEA also cheats in fights - it disables enemy fighters.
The reason I started working on this script because I wanted all fighters to be as efficient as CODEA fighters, and I was dismayed when I found out that CODEA achieves it's results by force of numbers and disabling enemy ships via script

-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
-
- Posts: 254
- Joined: Sat, 23. Feb 08, 22:23
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
Version 2.1 released!
Added: Additional defensive moves:
Ships now have 2 defensive moves:
- Evasive attack: When attacked by the main guns of a smaller ship, ships will sometimes turn to attack - and thereby dislodge - their attacker instead of trying to dodge. This triggers against close enemies against which evading is less efficient
- Moving out of range: When attacked by turrets, ships will try to move out of range of the turret. This is especially efficient against flak.
Changes:
- increased target acquisition range when in protect mode from 8000 to 16000m
- adjusted values to make fighters more aggressive in dogfights
- enabled some evasive moves for capital ships
Bugfixes:
- added failsafe to prevent null returns by missile turrets
- disabled standard missile firing for bombers.
Added: Additional defensive moves:
Ships now have 2 defensive moves:
- Evasive attack: When attacked by the main guns of a smaller ship, ships will sometimes turn to attack - and thereby dislodge - their attacker instead of trying to dodge. This triggers against close enemies against which evading is less efficient
- Moving out of range: When attacked by turrets, ships will try to move out of range of the turret. This is especially efficient against flak.
Changes:
- increased target acquisition range when in protect mode from 8000 to 16000m
- adjusted values to make fighters more aggressive in dogfights
- enabled some evasive moves for capital ships
Bugfixes:
- added failsafe to prevent null returns by missile turrets
- disabled standard missile firing for bombers.
Ships with a high enough pilot rank will call an interrupt on the target, which causes the target to wait or idle for to two seconds.If you have time, care to share how CODEA 'cheats'?
-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
Really can't wait to outfit some fighters and have some fun now
I've witnessed this back in my older saves seeing enemy fighters @ 0m/s. I thought it was just my CPU being overburdened and thus stopping some ships

Wow that's really lame...Ships with a high enough pilot rank will call an interrupt on the target, which causes the target to wait or idle for to two seconds.
I've witnessed this back in my older saves seeing enemy fighters @ 0m/s. I thought it was just my CPU being overburdened and thus stopping some ships
I fly an OWP. What about you?
-
- Posts: 691
- Joined: Mon, 27. Aug 07, 12:34
I created a compatibility patch for Gazz' Missile safety script.
This is only necessary if you use the AI-enabled version of said script, which is AP only (consequently, so is the compatibility patch).
To install both scripts, do the following:
Install the advanced fight scipts
Install Gazz' Missile Safety, AI version,
Copy the files from the compatibility patch to your scripts folder, overwrite existing files.
[ external image ]
This is only necessary if you use the AI-enabled version of said script, which is AP only (consequently, so is the compatibility patch).
To install both scripts, do the following:
Install the advanced fight scipts
Install Gazz' Missile Safety, AI version,
Copy the files from the compatibility patch to your scripts folder, overwrite existing files.
[ external image ]
-
- Posts: 114
- Joined: Tue, 29. Dec 09, 14:01
-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
-
- Posts: 11165
- Joined: Sun, 6. Jul 08, 10:29
-
- Posts: 1021
- Joined: Fri, 25. Nov 05, 16:05
Found a major(ly funny) bug, at least with the player only version
I was sitting in a sector in my Cheetah (how the Acinonyx is called in XRM), doing nothing as I was about to do a couple tests about which stations would be recognized by STO and which not before buying.
Anyway, in the same sector there happens to be also an M7 of mine with patrol duties, with a docked and homebased M6 set at protect the aforementioned M7. Suddenly, my playership begins running at max speed: no matter what I try to do to stop it, it goes full ahead, though it's otherwise fully maneuverable: she just won't stop.
I eject from the ship, and watch in awe as she goes to intercept a Khaak corvette that happened to be at the far edge of my scanner range.
Some rogue script stuck to it, I thought: I'll just reload, cheat-clone my ship, destroy the original and be done with it... But nope! Even the clone does the same.
Then, as I see my patrolling M7 ignoring everything that's happening and happily go towards the next sector to continue its patrol, I realize the issue comes from this script; and indeed, placing back the backup fight scripts and reloading fixes everything: my playership isn't affected in the least, and the M7 flies to intercept the Khaak corvette once she comes in scanner range.
The bug is repeatable and happens right when the alien corvette comes in range and the kill command (thus follow and attack) gets issued by the patrol: for some reason, I guess a typo somewhere, it gets applied to the playership instead than on the supposed autopiloted M7.
That was... weird, but quite entertaining

I was sitting in a sector in my Cheetah (how the Acinonyx is called in XRM), doing nothing as I was about to do a couple tests about which stations would be recognized by STO and which not before buying.
Anyway, in the same sector there happens to be also an M7 of mine with patrol duties, with a docked and homebased M6 set at protect the aforementioned M7. Suddenly, my playership begins running at max speed: no matter what I try to do to stop it, it goes full ahead, though it's otherwise fully maneuverable: she just won't stop.
I eject from the ship, and watch in awe as she goes to intercept a Khaak corvette that happened to be at the far edge of my scanner range.
Some rogue script stuck to it, I thought: I'll just reload, cheat-clone my ship, destroy the original and be done with it... But nope! Even the clone does the same.

Then, as I see my patrolling M7 ignoring everything that's happening and happily go towards the next sector to continue its patrol, I realize the issue comes from this script; and indeed, placing back the backup fight scripts and reloading fixes everything: my playership isn't affected in the least, and the M7 flies to intercept the Khaak corvette once she comes in scanner range.
The bug is repeatable and happens right when the alien corvette comes in range and the kill command (thus follow and attack) gets issued by the patrol: for some reason, I guess a typo somewhere, it gets applied to the playership instead than on the supposed autopiloted M7.
That was... weird, but quite entertaining

-
- Posts: 518
- Joined: Sun, 22. Feb 09, 20:13
'Field' Test report:
(AP XRM + All ships and CAP ON)
Flew my Astraeus into Farnham's Legend yesterday, switched into my Heavy Osprey and let the Astraeus run on 'Protect me'.
First fight was against a pirate centaur and around 2 escorts...didn't get to witness much cause I destroyed them.
The next fight though, was tough but spectacular...I was up against a pirate cerberus, its own m6 + fighter escort, and then a caravel with 4 blastclaws. I was chasing down the M3's in my Heavy Osprey and destroying them as fast as I can. But my poor Astraeus was just getting hammered!
I saw the fighters stay at their respective ranges and unleash hell with lasers. Even saw one fighter launch volley after volley of wasps at the Astraeus. Luckily I won the fight with ~5% hull on my Astraeus and ~95% on my Heavy Osprey...
Needless to say your script really makes a swarm of fighters (or pack of corvettes) a real threat
(AP XRM + All ships and CAP ON)
Flew my Astraeus into Farnham's Legend yesterday, switched into my Heavy Osprey and let the Astraeus run on 'Protect me'.
First fight was against a pirate centaur and around 2 escorts...didn't get to witness much cause I destroyed them.
The next fight though, was tough but spectacular...I was up against a pirate cerberus, its own m6 + fighter escort, and then a caravel with 4 blastclaws. I was chasing down the M3's in my Heavy Osprey and destroying them as fast as I can. But my poor Astraeus was just getting hammered!
I saw the fighters stay at their respective ranges and unleash hell with lasers. Even saw one fighter launch volley after volley of wasps at the Astraeus. Luckily I won the fight with ~5% hull on my Astraeus and ~95% on my Heavy Osprey...
Needless to say your script really makes a swarm of fighters (or pack of corvettes) a real threat

I fly an OWP. What about you?
-
- Posts: 1466
- Joined: Wed, 16. Nov 11, 18:37
I started up a new game and went to some of the war sectors, and the M3 and M6s where acting just like you said they would.
Actually saw one Argon M3 hold back just beyond flak range of a Terran M2, then when a Terran M6 came up behind it and attack it, it turned around, attacked it, until its shields got hit a little bit, and then it turn and ran.
This script seems to fixes all the balancing issues other mods try to fix with out having to mod a single ship! Bravo!
Actually saw one Argon M3 hold back just beyond flak range of a Terran M2, then when a Terran M6 came up behind it and attack it, it turned around, attacked it, until its shields got hit a little bit, and then it turn and ran.
This script seems to fixes all the balancing issues other mods try to fix with out having to mod a single ship! Bravo!
-
- Posts: 254
- Joined: Sat, 23. Feb 08, 22:23
Been having fun with this script so far with my wing of M3's. About the only thing that doesn't seem to matter is vrs beam weapons, but thats to be expected I'd guess.
The only issue and it might not be an issue with this script is that the Kha'ak clusters are not separating or attacking, they just fly and I blow them up as a cluster. (XRM mod). The problem is that I'm not sure if they were working BEFORE setting up the mod, so it could be something else breaking it.
The only issue and it might not be an issue with this script is that the Kha'ak clusters are not separating or attacking, they just fly and I blow them up as a cluster. (XRM mod). The problem is that I'm not sure if they were working BEFORE setting up the mod, so it could be something else breaking it.