Page 1 of 23

-new Script: Xai Corp Advanced Combat Project:V1.57a

Posted: Tue, 30. Mar 04, 06:42
by Kailric
Link to the newest version after Egosoft update 1.4, as this version is outdated


Advanced AI Project Beta

This is the new Xai Corp AI for the the Player Ships and New AI for Enemy ships as well.


Warning: Before upgradeing to this version from another version. Load your saved game make sure to cancel all of your Xai AI ships actions, and destroy or recover al AI NavSats and then make sure you delete the old file init.Xai.upgrades script, infact just delete everyfile that had to do with the older versioins then install this version. You should be fine.
This vesion is still in Testing, if you use this please send any feedback, thanks!
DOWNLOAD:Xai Corp Advanced AI Project V. 1.58d

The is the current working Version.
DOWNLOAD:Xai Corp Advanced AI Project V. 1.57a


This will work with 1.57a.
Patch for MWM users:
Just copy the files in this patch into their respected folders. MWM patch
Burainek's Laser Rebalance mod
Here is the thread link to Burainek's Laser Rebalance mod. It works really great with the New AI and helps balance out the changes I have made in the attack scripts. Its still in testing and your feedback is most welcome!

Short cut to the Jump.Start.TS plugin thread

New Things and BUG Fixes:
Updates for 1.57a

-I have made a step back to give time to correct any and all problems with 1.58. This version does away with the new Scanning technology but still adds the other features.



A word of advice...when 1.4 gets here I would advice uninstalling the Xai Advanced Combat Project, then patch your game, and then wait for the X2 1.4 version of the Xai ACP. Thats what I am gonna do :)

Here is a list of init files you should have from me, these start the scripts:
init.ship.globalscriptmap.khaak
init.ship.globlalscriptmap.pl
init.ship.globlalscriptmap.std
init.TK.subspace
init.Xai.ACP.commands

delete all others

And this is the only setup file you should have, all others delete
setup.TK.prod.loc

The setup extension tells this script to load after all other scripts have loaded and the world is created, that way it want be loading products into stations that don't exit yet :) .

Hopefully this update will fix some of the problems people where haveing with conflicts.
........End Patch Report.

Thanks to these fine fellows for their help in finding bugs, and playtesting:

The Last Prince
D_ zorro
matthewfarmery
Kralion
And thanks to Burianek for all his input and modding skills and to Dr.Xavia for all the his help.
The_Last_Prince wrote: If you're upgradeing from an earlier version of the script it is best to delete all the files from the previous version, right? But what if you don't delete all of the files? Here's an easy way to do that: you just need to copy the files of the Xai Ai scripts (version you currently have installed) to the X2/script folder again from another location (you can unzip the old version to "another location" first)... this way all the files from the previous version will get selected so you can just hit delete and the old files are gone! Now all you have to do is copy the new version files to the folder without having to wonder if you deleted all the old files!

It works great for me, but I don't know if people know or do this, so I thought I'd let you know. Hope it helps. :D


Link To Read.Me file and Instructions

Posted: Tue, 30. Mar 04, 06:44
by Sandalpocalypse
Increased laser range would do the trick.

Posted: Tue, 30. Mar 04, 06:49
by Kailric
They are well with in laser range when they attack the first time, they just fire once or twice then head off for another attack run. They should at least fire several times before makeing a turn. And Thats with me just sitting still. If I fight back ..as long as i keep behind them they want fire at all. Is this how it is for every once else?

Posted: Tue, 30. Mar 04, 08:58
by hrett
Kailric wrote:They are well with in laser range when they attack the first time, they just fire once or twice then head off for another attack run. They should at least fire several times before makeing a turn. And Thats with me just sitting still. If I fight back ..as long as i keep behind them they want fire at all. Is this how it is for every once else?
I noticed this lately. It seems to have shown up with 1.3. They will turn, get off 2-3 shots at most, and then veer off. Not challenging at all.

This might be related to the anti-ramming code they put in 1.3. Now they veer off so they dont ram you, but they cant shoot for very long either.

Heh. Be careful what you wish for, eh? :?

Posted: Tue, 30. Mar 04, 13:15
by Kailric
Grrrr, I want 1.2 back

Posted: Tue, 30. Mar 04, 13:20
by Sandalpocalypse
I dunno, I saw a Centaur and 3 Novas do a number on a Xenon J with a (pure luck, it was the AI)coordinated strafing run, taking out about half the shields, and letting the big boy (Titan) finish it off. It was cuz i have the MassiveWar init scripts in my directory, tho the mod isnt active so that reflects stock ship statistics.

Posted: Tue, 30. Mar 04, 21:20
by NeverSnake
This was in 1.2 for stationary things like pirate bases too.

Posted: Tue, 30. Mar 04, 21:34
by Storm_Front
Just a reminder, collision avoidance distance has been increased in 1.3. This is probably why they are veering off sooner.

Posted: Tue, 30. Mar 04, 22:00
by Kailric
Storm_Front wrote:Just a reminder, collision avoidance distance has been increased in 1.3. This is probably why they are veering off sooner.
Can we adjust the collision advoidance distance ourself?

Re: Working on a better attack script...help wanted..

Posted: Wed, 31. Mar 04, 00:17
by Kailric
didnt mean to post this one

Posted: Wed, 31. Mar 04, 00:22
by Storm_Front
Kailric wrote:
Storm_Front wrote:Just a reminder, collision avoidance distance has been increased in 1.3. This is probably why they are veering off sooner.
Can we adjust the collision advoidance distance ourself?
Not as far as I know, but I haven't looked.

Posted: Wed, 31. Mar 04, 04:18
by Kailric
here is one part of my code I just done, but it locks the game up..take a look at it.....I am trying to get the AI to avoid missles and/or take them out if they pose a threat.

Code:

Code: Select all

073 $incmissle = [THIS] -> find nearest missile aiming to me 
074       $missleiamafraidof =  best missile type for target [THIS] 
075        
076       while 1 
077        if $incmissle == $missleiamafraidof AND ( $shieldpercent < 65 ) 
078 @       = [THIS] -> defensive move: type=null, intensity=100, timeout=60000ms, avoid object=$incmissle 
079         [THIS] -> set attack target to $incmissle 
080         $ETA = get distance between [THIS] and $incmissle 
081         if $ETA >= 1000 
082 @        $killmissle = [THIS] -> attack run on target $incmissle : timeout=10000 ms 
083          
084          skip if $incmissle -> exists 
085           break 
086          
087          if $killmissle == FLRET_FIREFREE 
088           = [THIS] -> fire lasers on target $incmissle using turret null 
089            
090           skip if $incmissle -> exists 
091            break 
092          end 
093         end 
094        end 
095       end 

See anything missing or wrong? Can AI target missles?

Posted: Wed, 31. Mar 04, 04:53
by moggy2
same problem giskard's having in his if/while loop not working thread

while:nothingtodo:while:stillnothing:while:nopenotyet:while:maybenextime:while:againnothing:while:nope:while:nada:while:nowt:while:notalot:while:tryagain:while:hasyourcomputerhungyet:while:Illstopitnexttime:while...fizz

:roll:

Code: Select all

infinite loop detection enabled=[TRUE]
is a good line to remember

as is

Code: Select all

while
  @  = wait 10 ms
...

Posted: Wed, 31. Mar 04, 06:03
by Kailric
HAR har har! Yeah Dr Xavia helped me out. Said the same thing over at Xia Corporation. Just wondering what does the wait 10ms do exactly to break out of the infinite loop? Anyway, that codes works now. The AI will defence move around as long as there is a threating missle heading at it :)

Posted: Wed, 31. Mar 04, 07:47
by hrett
Kailric wrote:HAR har har! Yeah Dr Xavia helped me out. Said the same thing over at Xia Corporation. Just wondering what does the wait 10ms do exactly to break out of the infinite loop? Anyway, that codes works now. The AI will defence move around as long as there is a threating missle heading at it :)
Good work!

Now jsut get them to be challenging on the attack, and you will be promoted to supreme ruler! 8)

Posted: Thu, 1. Apr 04, 00:24
by Kailric
Yeah,hmmm, do you believe in miracles?

Posted: Thu, 1. Apr 04, 00:40
by Kailric
Anyone know why the "get current missle" command doesn't seem to work on the AI? They just ignore any variables what go along with this command and when I tell it to log the result and the log book it just reads "null" when it should say the missle type that is loaded? All the other missle commands return what they are when I ask it to write it to message log.

Posted: Thu, 1. Apr 04, 22:20
by Kailric
I have worked some more on the code. Things are going well as can be expected. Anyone else tamper with the combat AI?

Posted: Fri, 2. Apr 04, 15:31
by Kailric
I am haveing fun watching split scorpions trying to dog fight wasp missles.

They will flee from threating missles now and launch mosquitos at them to try and detroy them also, or even turn and take a shot. I'll get a demo version up loaded somewhere maybe by tonight if anyone would like to check it out.

Posted: Tue, 6. Apr 04, 02:07
by Kailric
update