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

The place to discuss scripting and game modifications for X²: The Threat.

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

Post Reply
User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

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

Post by Kailric » Tue, 30. Mar 04, 06:42

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
Last edited by Kailric on Thu, 7. Oct 04, 19:13, edited 161 times in total.
"Try not. Do or do not, there is no try."-Yoda

"[Its] time for the human race to enter the solar system"-Dan Quayle

User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse » Tue, 30. Mar 04, 06:44

Increased laser range would do the trick.

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Tue, 30. Mar 04, 06:49

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?

hrett
Posts: 200
Joined: Tue, 9. Dec 03, 16:28
x3

Post by hrett » Tue, 30. Mar 04, 08:58

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? :?
Blindly going where no man has gone before...
AMD64 3500+, ATI Radeon PCI Express 850XT 256, 2gig Corsair Ram. My hard drive is crap though. ;)

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Tue, 30. Mar 04, 13:15

Grrrr, I want 1.2 back

User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse » Tue, 30. Mar 04, 13:20

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.

NeverSnake
Posts: 5159
Joined: Thu, 9. Oct 03, 20:44
x3tc

Post by NeverSnake » Tue, 30. Mar 04, 21:20

This was in 1.2 for stationary things like pirate bases too.
"There's an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone" — Bjarne Stroustrup

User avatar
Storm_Front
Posts: 1021
Joined: Mon, 15. Dec 03, 05:27
x2

Post by Storm_Front » Tue, 30. Mar 04, 21:34

Just a reminder, collision avoidance distance has been increased in 1.3. This is probably why they are veering off sooner.

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Tue, 30. Mar 04, 22:00

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?

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

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

Post by Kailric » Wed, 31. Mar 04, 00:17

didnt mean to post this one
Last edited by Kailric on Wed, 31. Mar 04, 00:28, edited 1 time in total.

User avatar
Storm_Front
Posts: 1021
Joined: Mon, 15. Dec 03, 05:27
x2

Post by Storm_Front » Wed, 31. Mar 04, 00:22

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.

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Wed, 31. Mar 04, 04:18

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?

User avatar
moggy2
Posts: 5505
Joined: Wed, 6. Nov 02, 20:31
x3ap

Post by moggy2 » Wed, 31. Mar 04, 04:53

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

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Wed, 31. Mar 04, 06:03

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

hrett
Posts: 200
Joined: Tue, 9. Dec 03, 16:28
x3

Post by hrett » Wed, 31. Mar 04, 07:47

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)
Blindly going where no man has gone before...
AMD64 3500+, ATI Radeon PCI Express 850XT 256, 2gig Corsair Ram. My hard drive is crap though. ;)

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Thu, 1. Apr 04, 00:24

Yeah,hmmm, do you believe in miracles?

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Thu, 1. Apr 04, 00:40

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.

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Thu, 1. Apr 04, 22:20

I have worked some more on the code. Things are going well as can be expected. Anyone else tamper with the combat AI?

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Fri, 2. Apr 04, 15:31

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.

User avatar
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Tue, 6. Apr 04, 02:07

update
"Try not. Do or do not, there is no try."-Yoda

"[Its] time for the human race to enter the solar system"-Dan Quayle

Post Reply

Return to “X²: The Threat - Scripts and Modding”