[SCRIPT][AP][TC] Advanced Fight Scripts - v. 3.1, 19.01.2014

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

nap_rz
Posts: 1383
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by nap_rz »

Cronos988 wrote:
Kadatherion wrote: The issue is the opposite, and I've seen it myself a couple of times. A vanilla moving M6 can be a nightmare for capital ships not equipped with fast weapons: they'll never hit it. In this case the M6 stands still: as such it's an easy target even for PPC/PSP, even when the firing ship (as in the example reported) is far away from it.
Ah, ok. This might be an issue with the M6 being treated as a big ship, and thereby having a much slower reaction. I'll lower the values for M6s a bit, making them evade quicker. I am currently working on an XRM modification anyways, especially M6 ships are way to weak with the improved fighters.
yep, m6 is one of the biggest design trouble for XRM (but not exclusive to it), even without your script, SMART/MARS equipped capitals could just blast them away easily with PSP/beam guns, you will need to tinker with paul to adjust m6 class.

when it balanced right, I'll be interested to come back to XRM AP :P



I don't understand one thing though, what do you mean with support for SMART/MARS in the new version? I used them with you script just fine almost a year ago?
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

nap_rz wrote: I don't understand one thing though, what do you mean with support for SMART/MARS in the new version? I used them with you script just fine almost a year ago?
Well, they didn't conflict directly, but my fighters use a specific local variable on turrets to tell who is shooting at them, so they would not have reacted to the SMART/MARS turrets properly.
User avatar
RoverTX
Posts: 1466
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX »

Cronos988 wrote:Ah, ok. This might be an issue with the M6 being treated as a big ship, and thereby having a much slower reaction. I'll lower the values for M6s a bit, making them evade quicker. I am currently working on an XRM modification anyways, especially M6 ships are way to weak with the improved fighters.
Have you tried linking ships to a ratio of the ships speed/shields/hull/hard points/and current weapons, instead of class?

My main concern is the Springblossom with its M3 like speed acting like any other M6, or modded games with Hybrid ships.
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Noticed when updating to 2.2 that about half of the scripts were newer versions and the rest were older than what I had installed from 2.1.

Do you normally use older files when updating?
Still life in the old dog yet...
Phier
Posts: 254
Joined: Sat, 23. Feb 08, 22:23
x3tc

Post by Phier »

Cronos988 wrote:
nap_rz wrote: I don't understand one thing though, what do you mean with support for SMART/MARS in the new version? I used them with you script just fine almost a year ago?
Well, they didn't conflict directly, but my fighters use a specific local variable on turrets to tell who is shooting at them, so they would not have reacted to the SMART/MARS turrets properly.
Just for the record I only use MARS on my ship, so the issue with M6's isn't MARS related.

Personally I think XRM if anything makes M6's too powerful. They are fast and super shielded, the one I use has 1g of shield. If they are having a problem with new fighters, I say good, fighters seem to have taken an hit in XRM with the weapon selections being so limited. I used to just get as many M3's as I could, stuff with with HEPT's and go to town on cap ships. The damage output on XRM fighters just seems a lot less (I'm sure if you pick and choose wisely you can do just as well, but I have that ragtag style fleet for now).
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

RoverTX wrote: Have you tried linking ships to a ratio of the ships speed/shields/hull/hard points/and current weapons, instead of class?

My main concern is the Springblossom with its M3 like speed acting like any other M6, or modded games with Hybrid ships.
Well, the script bases the reaction on current hull and shield strengths, so those are taken into account.
But I haven't tried determining the ship class via stats like speed/weapons (I wish I had access to acceleration and turn rate...). I like the idea, though the problem would be that these stats are just as arbitrary unless, again, I have access to acceleration and turn rate. All I could do right now is assume that slower ships are also worse at evading, which is probably true in most cases.
Vayde wrote:Noticed when updating to 2.2 that about half of the scripts were newer versions and the rest were older than what I had installed from 2.1.

Do you normally use older files when updating?
Well, not older versions, but all scripts I did not change will still be the old ones. Unless I made a mistake when packaging, no scripts should be "older".
Phier wrote:Personally I think XRM if anything makes M6's too powerful. They are fast and super shielded, the one I use has 1g of shield. If they are having a problem with new fighters, I say good, fighters seem to have taken an hit in XRM with the weapon selections being so limited. I used to just get as many M3's as I could, stuff with with HEPT's and go to town on cap ships. The damage output on XRM fighters just seems a lot less (I'm sure if you pick and choose wisely you can do just as well, but I have that ragtag style fleet for now).
Well, I always though that all ships larger than M3 in the X series are ridiculously underpowered (and cheap), when you compare them to their actual sizes. This was necessary, gameplay wise, in order to give fighters in general, and the player specifically, a chance against larger opponents. Realistically, an M3 is about the size of a fly smacking against your windshield compared to an M2.

What I would do is give the M6 ships a lot of shields, for example, to make them effective at fighting capital ships, but then give some fighters shield-piercing weapons in order to hit the weaker hull. I am playing around with this system (and a script that repairs hulls just like shields regenerate), and there are a lot more options once you can actually use hull strength as a real balancing tool rather than just prolonging a lost fight.
Phier
Posts: 254
Joined: Sat, 23. Feb 08, 22:23
x3tc

Post by Phier »

Cronos988 wrote: Well, I always though that all ships larger than M3 in the X series are ridiculously underpowered (and cheap), when you compare them to their actual sizes. This was necessary, gameplay wise, in order to give fighters in general, and the player specifically, a chance against larger opponents. Realistically, an M3 is about the size of a fly smacking against your windshield compared to an M2.

What I would do is give the M6 ships a lot of shields, for example, to make them effective at fighting capital ships, but then give some fighters shield-piercing weapons in order to hit the weaker hull. I am playing around with this system (and a script that repairs hulls just like shields regenerate), and there are a lot more options once you can actually use hull strength as a real balancing tool rather than just prolonging a lost fight.
I've always sort of likened X3 combat to WWII style combat only with shorter rangers relatively speaking. I like fighters to be a threat to cap ships, but they rarely are because the AI tends to not launch enough to be effective and they can be taken down so easily by missiles in any cap ship. I wish combat was more like Wing Commander where you had specialized anti-capship weapons with the long lock on times. Again it doesn't make logical sense but for game play it worked very well as you had to stay on target for X amount of time or you lost lock.

Ideally M6's should be more like destroyers, with anti-M3 ability protecting the capships, but ah well.
Goncyn
Posts: 98
Joined: Fri, 17. Jan 03, 02:51
x4

Post by Goncyn »

Cronos988 wrote:I am playing around with this system (and a script that repairs hulls just like shields regenerate), and there are a lot more options once you can actually use hull strength as a real balancing tool rather than just prolonging a lost fight.
I always thought the problem with making hull damage a routine part of the game was the hard-coded chance for equipment destruction when the hull is damaged. If you give fighters shield-piercing weapons, won't you end up with every ship that takes some combat damage randomly missing essential software?
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

Goncyn wrote:
Cronos988 wrote:I am playing around with this system (and a script that repairs hulls just like shields regenerate), and there are a lot more options once you can actually use hull strength as a real balancing tool rather than just prolonging a lost fight.
I always thought the problem with making hull damage a routine part of the game was the hard-coded chance for equipment destruction when the hull is damaged. If you give fighters shield-piercing weapons, won't you end up with every ship that takes some combat damage randomly missing essential software?
I really hate that hardcoded thing of 'losing equipment'...even for my own ships when I'm not in control :evil:
I fly an OWP. What about you?
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe »

Me too. Isn't there a script out there that avoid losing equipment ? Ok it's hardcoded but maybe it's possible to start a loop that analyze the player's equipment every X seconds, and as soon as he loses something, the script adds the equipment back ? Or add it to a "future repair" list ?
Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein »

there is this argon weapon that makes only hull dmg and goes through the shields. when u get shot down with it even to 1% hull u dont loose any equipment. mby looking at how this works could help with that problem.
i personally dont like the idea about balancing through hull. its just realistic that you loose equipment when yoir hull gets shot at.
Ofc ***modified***, modders doing what Egosoft cant.
Phier
Posts: 254
Joined: Sat, 23. Feb 08, 22:23
x3tc

Post by Phier »

Since I started using this script right when I got back into AP after a good year+break I can't say exactly how much it effected but here is my story.

I jumped in a Blastclaw prototype, and decided to take out a lone pirate falcon for giggles.

Well as I get there it turns out its 3M5's 2M'4s and 1M3. Now normally in vanilla that still wouldn't matter.

After my shield was about spent I knew I was probably going to die, and I start spamming missiles. I managed to live but only at about 10% hull.

That wouldn't have gone that way in vanilla.
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

With regards to npc ai or the lack of it. When groups of npc ships attack me they work very well, however when I'm able to turn the tables and break a few of them they revert to normal pathetic dying swan act, and just wallow in front of my guns, limply twisting and turning with no attempt to shoot me or flee. This is normal vanilla behavior.

I read in your thread that you have given them 2 versions of self preservation. I see this in M5's, they get a few shots, hull drops and it's light the afterburner and away. M4's and above just don't seem to do this. Have not tested on anything above an M3 so far. The Evasive Attack option seems to work but once they stop their attack, and go full defensive, I think the vanilla ai might be taking control.


Vayde
Still life in the old dog yet...
User avatar
RoverTX
Posts: 1466
Joined: Wed, 16. Nov 11, 18:37
x4

Post by RoverTX »

@Vayde Just from what I have seen from this script I have seen an M3 turn and run from an M6. So I think they only turn and run away if they are faster than the ship they are fighting.
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Were you flying the M6 or was it an NPC? I only see this issue when I'm piloting the attacking ship.
Still life in the old dog yet...
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

RoverTX wrote:@Vayde Just from what I have seen from this script I have seen an M3 turn and run from an M6. So I think they only turn and run away if they are faster than the ship they are fighting.
Speed is a factor, yes. There are a number of different triggers. For fixed front guns, they only fly away if they can get out of range within 3,5 seconds.

@Vayde: The reason you are seeing "Vanilla" behavior is that if no condition for a "special move" is met, ships will respond with their vanilla "evasive moves". Those are reasonably efficient against enemy AI ships, less so against the player. However, there isn't really any good way to make AI ships evade from the player. The most I could do is write completely custom moves (which is difficult due to a lack of good "move to position" commands), but the question is: What should AI ships do to evade?

The best I could do is probably make AI ships just more aggressive against the player ship and have them attack instead of evade. However, my philosophy when designing this was to make a script that behaves consistently against both AI and the player.

All in all, my scripts don't meaningfully enhance 1 on 1 dogfight behavior. I think this is what Egosoft originally optimized their AI for and I don't think there is much that could be done differently with the script commands available.
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

That's a fair point Cronos988, I've put up with dying swans for 10 years now so another 10 won't matter too much :)

Overall these make the game just a little less predictable and combat is fun again.


Vayde
Still life in the old dog yet...
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

A short progress report on my part:

Apart from modding ships and lasers to better fit with the new balance these scripts create, I have mostly been tackling bugs and improving behaviors.

I rewrote the defensive move logic, which should lead to a lot more aggresive maneuvers, especially against smaller attackers. Standard defensive moves should be a lot rarer.

I also tried to improve the relative speed calculation and speed setting to get ships into range faster and keep them there longer. Due to not having access to any actual acceleration values, though, it's not easy.

Lastly, there will be a number of changes to the pick script. It was originally written for fights that were still mostly vanilla, and with the new behaviors the target picking is off.
Viliae
Posts: 140
Joined: Tue, 12. Apr 11, 22:12
x3tc

Post by Viliae »

Hello

First I wanna thank you for this script it makes games much better, but I have two buts (yes there are always some buts :) ):
:arrow: missile frigates - their missile turrets never shot all at once, example: Paranid Ares (missile turrets Front: 8 missiles, Front: 8 missile, Up: 2 and down: 2 missile = 20 missiles total) if ships is far aways from target (I used M2's as targets) he shot only 8 missiles at once. When he reach distance about 10km shot from all missile turret.
:arrow: it's rather exploit - fighters are start shooting at their max range but if you stop your ship (for example heavy M6) they will stop at their max range and shoot to you - but the bullet never reach your ship. If you wanna see it spawn some ships with flame throwers and you will see what I mean.

And I am using XRM.
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

Viliae wrote:Hello

First I wanna thank you for this script it makes games much better, but I have two buts (yes there are always some buts :) ):
:arrow: missile frigates - their missile turrets never shot all at once, example: Paranid Ares (missile turrets Front: 8 missiles, Front: 8 missile, Up: 2 and down: 2 missile = 20 missiles total) if ships is far aways from target (I used M2's as targets) he shot only 8 missiles at once. When he reach distance about 10km shot from all missile turret.
:arrow: it's rather exploit - fighters are start shooting at their max range but if you stop your ship (for example heavy M6) they will stop at their max range and shoot to you - but the bullet never reach your ship. If you wanna see it spawn some ships with flame throwers and you will see what I mean.

And I am using XRM.
Well, I am glad you like the script :)

As for the Missile frigates, it's hard to tell what exactly is happening. I think it's confirmed that missile turrets use turret scripts, and are not directly controlled by my fight scripts. What I suspect is that the hardcoded target acquisition range is 10KM. At higher range, turrets just won't fire properly - it doesn't matter whether it's lasers or missiles.

As for the fighters not hitting the ship: Is it possible that the fighters were at less than 25% shields? If so, they might just have stopped slightly out of range to regenerate, and since the vanilla range acquisition is sometimes faulty, just continued to fire. If that wasn't the case, then there would be an in the range calculation (which is odd, because it includes a 10% buffer).

For the record, I do see the problem with fighters sometimes being just out of range when attacking capital ships sometimes, but I assumed this was just due to ships moving around. It shouldn't happen when the target is motionless.

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