[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

Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

hourheroyes wrote:Anyone have anecdotal evidence from using this script? I'm excited to download it tonight but didn't see a ton of feedback of how ti actually worked for people in combat situations.

thanks :)
Well I just got killed by a standard squad of 1 Nova, 2 Busters, 2 Discoverers upon testing the broke Assassin start. I was only flying the Mamba Raider you get with that start, but in my experience I would still usually win these fights.
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

Nicoman35 wrote:
Cronos988 wrote:Hello!

So, I am back, kinda.
I moved into a new town, a new flat and a new job. Consequently, other things tool priority. Adding to that was the fact that I had run into kind of a wall with development, so I stopped completely.

Recently, I have remembered this project, and wanted to play X3 again, so I'll start trying again to make fighters even more effective ;)
Welcome back!
As thou might remember, oh dear lord of fight, I expressed my humble plea for making this compatible to TC. By this, we bring forth our wish once more..
So, I have a TC Version done, mostly. It's not going to function as smoothly, because I don't have as much information available (bullet flags!), and so can't get quite as many scenarios covered. But barring any very unusual weapon modifications, it should still work.

What I still need to do is create tweaked turret scripts to tell ships they are being attacked. Should I bother with the vanilla scripts or is everyone using MARS anyway?
User avatar
hourheroyes
Posts: 346
Joined: Mon, 9. Apr 12, 05:14
x4

Post by hourheroyes »

Does this script do anything for capital ships, Cronos?
User avatar
anachron13
Posts: 144
Joined: Tue, 2. Nov 10, 23:41
x3tc

Post by anachron13 »

Cronos988 wrote:What I still need to do is create tweaked turret scripts to tell ships they are being attacked. Should I bother with the vanilla scripts or is everyone using MARS anyway?
It seems unlikely that everyone use MARS on every ships. And there is also Smart (http://forum.egosoft.com/viewtopic.php? ... sc&start=0).
Nicoman35
Posts: 681
Joined: Thu, 17. Nov 05, 13:12
x3tc

Post by Nicoman35 »

Cronos988 wrote:So, I have a TC Version done, mostly. It's not going to function as smoothly, because I don't have as much information available (bullet flags!), and so can't get quite as many scenarios covered. But barring any very unusual weapon modifications, it should still work.

What I still need to do is create tweaked turret scripts to tell ships they are being attacked. Should I bother with the vanilla scripts or is everyone using MARS anyway?
Many thanks, Cronos! :)
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

Version 2.0:
Added: TC-Version
I have rewritten some scripts to add a TC version. This version should work with Vanilla turret scripts as well as MARS fire control. Since TC lacks a couple of weapon info commands, the scripts are less accurate in this version, but should work.

TC Version has only been tested for basic functionality! I unfortunately don't have the time to thoroughly test both script versions, so bugs may occur more frequently here. Use with caution!

Added: M7/M8/M3B Support
Upon realizing that M3B ships don't behave properly in Vanilla, I have added them to my advanced Fight software. Bombers behave like other fighters, but treat their range as 10.000, thereby staying far away from trouble.

Added: Rudimentary Capital Ship AI
This isn't much of an AI, actually. In Short, Capital Ships move in Range and then stop. Defensive moves are completely useless for slow moving ships, so these basically just attack. I am looking into usefull defensive measures and may add those later.

Changes:
- Completely rewrote the targeting portion: Ships now calculate the best range for their equipped weapon and try to reach that range. Extensive testing with different battle scenarios has revealed that in a dogfight, being at the right range to hit - that is a bullet flight time of 2 seconds or less - is key. Ships now seek to achieve that. Version 2.0 Fighters appear superior to v. 1.1 Fighters in testing.

- fixed a possible bug with ships not attacking stations when using "attack all enemies" type commands
- fixed various small bugs and inconsistencies
- The Scripts are now delivered in one package, with subfolders corresponding to different verisons (enemy only/player only).

Installation:
Inside the rar file, there are several folders, each with 2 sub folders. Select either: "All ships" - enable scripts for all ships, regardless of race; "Player only" - enables improved behavior only for player ships or "Enemy only" - enables improved behavior only for enemy ships.
Within these folders, you can choose between a "Cap AI ON" and a "Cap AI OFF" version. If you don't want the stripped down capital ship behavior, select the "Cap AI OFF" folder.
Copy all scripts from your folder of choice into the /scripts directory of your X3 TC/ X3 AP folder. Overwrite existing files. Make backups of existing files before overwriting!

As always, please report any bugs you find, and also please report the general performance in combat!
Viliae
Posts: 140
Joined: Tue, 12. Apr 11, 22:12
x3tc

Post by Viliae »

Hello

First: I've just started testing yours 2.0 version of this script (I'm happy user of this script from the beginning - on all ships) and and got some questions/suggestions:
:arrow: remove subtitle when bomber ship are closing to enemy,
:arrow: M7M have enough shield power to wait when other capital ship attack him, but others don't, so I think they should, at least try, reach outer ring, let's say 15 km away from target,
:arrow: maybe in future versions capital ships will check their targets, and only targets, so they will stop only if attacking M2's M1's and stations

Second: Someone in this topic ask you about Gazz's Missile safety script - so did you look at them, or planning to?
Last edited by Viliae on Mon, 25. Nov 13, 12:22, edited 1 time in total.
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

Thanks for using my scripts, Viliae.
Viliae wrote: :arrow: remove subtitle when bomber ship are closing to enemy,
That's a debug feature that I was pretty sure I disabled before I packaged the scripts. But I can remove that ASAP. What version are you using exactly?
Viliae wrote: :arrow: M7M have enough shield power to wait when other capital ship attack him, but I think they should, at least try, reach outer ring, let's say 15 km from target,
Yes, I have some ideas for that. Basically, this would be 2 step: One, Capital ships try to stay at slightly below their maximum range from the target in oder to use their range to their advantage;
and two: Fly away from the most powerful attacker when shields get critical.
Viliae wrote: :arrow: maybe in future versions capital ships will check their targets, and only targets, so they will stop only if attacking M2's M1's and stations
Technically, they already do that. That is, the range at which they stop depends on what they are attacking. When attacking a fighter, it's very unlikely that the capital ship will stop, because it tries to get so close that the fighter will always evade away before the cap ship is at range.
Viliae wrote: Second: Someone in this topic ask you about Gazz's Missile safety script - so did you look at them, or planning to?
I did look at them. Combining the scripts isn't a problem, But the missile safety script changes a lot of scripts that I also modified, so it would be a quite a bit of work. I decided to finish my version 2.0 first, but I will merge them when I have time.
Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein »

weird i never noticed this nice script. i got over 50 mods/scripts running on my installation and this one is not on it! gotta change that asap :)

/edit im using xrm and AP and it asked me too to overwrite the missile safety script from gazz. i agreed (since i have backups) but what exactly does that change now? i hope it didnt broke my xrm missile safety function.
Last edited by Zaknafein on Mon, 25. Nov 13, 12:41, edited 1 time in total.
Ofc ***modified***, modders doing what Egosoft cant.
Viliae
Posts: 140
Joined: Tue, 12. Apr 11, 22:12
x3tc

Post by Viliae »

Hi

I'm using basic version (for ALL ships) but I haven't decided which one Cap OFF or ON.

I have another question, maybe not related to your script (I'm also user of XRM):
I am doing some test with M7M's and I'm seeing that for example Cracen are using only one missile turret (4 missiles per shot).
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

Zaknafein wrote:weird i never noticed this nice script. i got over 50 mods/scripts running on my installation and this one is not on it! gotta change that asap :)

/edit im using xrm and AP and it asked me too to overwrite the missile safety script from gazz. i agreed (since i have backups) but what exactly does that change now? i hope it didnt broke my xrm missile safety function.
It's quite possible that you broke it. The scripts are currently not compatible, and I have no idea how Gazz' missile safety works, but since it seems rather popular I will look into it.
I am doing some test with M7M's and I'm seeing that for example Cracen are using only one missile turret (4 missiles per shot).
I am not sure how exactly the missile boats work. I had assumed that, since the missile tubes are turrets, they are handled by turret scripts and therefor unaffected. It's possible that the vanilla scripts (which is just the standard OOS/Capital ship fight script) have a method for firing missiles that is different from the IS-Fighter scripts. I'll take a look later today.
Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein »

Cronos988 wrote: ...but since it seems rather popular I will look into it.
it is in the xrm-ap version included, i havent installed it seperatly.

@Viliae i tested it with xrm-missile boats too and the missile turrets worked without any problems.
Ofc ***modified***, modders doing what Egosoft cant.
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

Zaknafein wrote:
Cronos988 wrote: ...but since it seems rather popular I will look into it.
it is in the xrm-ap version included, i havent installed it seperatly.

@Viliae i tested it with xrm-missile boats too and the missile turrets worked without any problems.
Wait, do you mean "!plugin.gz.missile.def.mk3"?

Because that is a vanilla script.
Zaknafein
Posts: 384
Joined: Thu, 31. Mar 11, 20:48
xr

Post by Zaknafein »

yes i do. well, my bad then :)
Ofc ***modified***, modders doing what Egosoft cant.
Echofinder
Posts: 250
Joined: Mon, 18. Jun 12, 06:05
x3tc

Post by Echofinder »

Wow, as someone who swears by fighter/carrier combat how did I not notice this?

You have yourself another tester.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

Welcome back Cronos, looking forward to having some deadlier fights again :twisted:
I fly an OWP. What about you?
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

I am currently testing some evasive moves, or to be precise, the evasive move of getting the **** away from whatever is trying to kill you.

It's pretty efficient. It also completely changes the balance of the game: larger numbers are significantly better than bigger ships. I got 5 Centaurs to beat a Titan. But add in 10 M4s as escort for the Titan, and the Centaurs get ripped to shreds with only 1 or 2 M4s lost.

But I really like how the fights turn out now. Ships actually seem somewhat intelligent. A fast M5 will actually use it's speed by immediately flying away when targeted by a large foe.
Mad_CatMk2
Posts: 518
Joined: Sun, 22. Feb 09, 20:13
x4

Post by Mad_CatMk2 »

Cronos988 wrote:I am currently testing some evasive moves, or to be precise, the evasive move of getting the **** away from whatever is trying to kill you.

It's pretty efficient. It also completely changes the balance of the game: larger numbers are significantly better than bigger ships. I got 5 Centaurs to beat a Titan. But add in 10 M4s as escort for the Titan, and the Centaurs get ripped to shreds with only 1 or 2 M4s lost.

But I really like how the fights turn out now. Ships actually seem somewhat intelligent. A fast M5 will actually use it's speed by immediately flying away when targeted by a large foe.
Amazing!

Really good rock-paper-scissors action going on here.
Can't wait for more releases
I fly an OWP. What about you?
Cronos988
Posts: 691
Joined: Mon, 27. Aug 07, 12:34
x3tc

Post by Cronos988 »

I need to optimize the moves a bit, and apparently there is a part of the script that never gets called because of a typo in the variables.

Which apparently was a good thing, because now that I have fixed that portion, fighters show some undesirable behavior. So I'll need to go over that portion again. But the 2.1 version should come relatively soon.
Phier
Posts: 254
Joined: Sat, 23. Feb 08, 22:23
x3tc

Post by Phier »

As someone who "discovered" Fight cmd MK3 for reunion and how it completely changed the game for awesome, and was heartbroken when the modder told me he wasn't going to do the same in TC, let me say one thing here.

I love you.

The AI in these X games is just horrific. You are my new hero. I'm going to name a child after you.

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