-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

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

Post by Kailric » Thu, 6. May 04, 14:58

http://webpages.charter.net/kailric/Xai ... 20Beta.rar

Newest version is here...see first post for notes.
"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
XU Vagabond
Posts: 800
Joined: Fri, 6. Feb 04, 21:22
x3tc

Post by XU Vagabond » Thu, 6. May 04, 16:18

man it just keep getting better

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

Post by Kailric » Thu, 6. May 04, 22:17

nabeshin wrote:man it just keep getting better
Thank you, makes the hard work feel worth it :)


I posted a link in the first post to a WinZip version as some may not have WinRaR
"Try not. Do or do not, there is no try."-Yoda

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

SieurNewT
Posts: 662
Joined: Tue, 13. Apr 04, 18:45
x4

Post by SieurNewT » Sat, 8. May 04, 16:18

Excuse a newbie question with this probably need to have script but i am looking how to change this level 1 - 4 difficulty in the files you write and i cannot see the good line to change for this level can you shom me it thanks ;)

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

Post by Kailric » Sat, 8. May 04, 17:41

SieurNewT wrote:Excuse a newbie question with this probably need to have script but i am looking how to change this level 1 - 4 difficulty in the files you write and i cannot see the good line to change for this level can you shom me it thanks ;)
Not sure what your really asking for, but in testing I add the line 005 in the code below and set what the $RansomSkill will be if you want to have it set the skills at a permanent level.
Like this:
For level 1 : $RandomSkill = 10
For level 2 : $RandomSkill = 40
For level 3 : $RandomSkill = 70
For level 4 : $RandomSkill = 100

But if you want to change the skill population ratios you have to edit 4 lines...lines 006,013,020,027. These lines adjust the random chance of a ships skills. Example: To change it so that there are only 10% skill level 4 ships in the population, you would have to change these lines as follows:
006 if $RandomSkill <= 40
013 else if $RandomSkill > 40 AND $RandomSkill <= 70
020 else if $RandomSkill > 70 AND $RandomSkill <= 90
027 else if $RandomSkill > 90
This will give you:
40% skill level 1
30% skill level 2
20% skill level 3
10% skill level 4

Does this answer your question?...if you need more help let me know.

Code: Select all

001   
002   if not $hasSkill == 1
003    $RandomSkill = random value from 1 to 101 - 1
004    $hasSkill = 1
005    $RandomSkill = 90 (delete to have random population skill)
006    if $RandomSkill <= 30
007     $Attackruntimeout = 6000
008     $Defencemoveintensity = 100
009     $Defencemovetimeout = 10000
010     $MissileSkill = 50
011     $DefenceDistance = 400
012     $EngineUpgrade = 5
013    else if $RandomSkill > 30 AND $RandomSkill <= 60
014     $Attackruntimeout = 3500
015     $Defencemoveintensity = 150
016     $Defencemovetimeout = 6000
017     $MissileSkill = 60
018     $DefenceDistance = 600
019     $EngineUpgrade = 4
020    else if $RandomSkill > 60 AND $RandomSkill <= 80
021     $Attackruntimeout = 2000
022     $Defencemoveintensity = 300
023     $Defencemovetimeout = 3500
024     $MissileSkill = 80
025     $DefenceDistance = 800
026     $EngineUpgrade = 2
027    else if $RandomSkill > 80
028     $Attackruntimeout = 750
029     $Defencemoveintensity = 500
030     $Defencemovetimeout = 2000
031     $MissileSkill = 100
032     $DefenceDistance = 1000
033     $EngineUpgrade = 1
034     if $Elite >= 1
035      $Elite = random value from 0 to 100 - 1
036      skip if $Elite < 80
037       $Elite = [THIS] -> get amount of ware Ion Disruptor in cargo bay
038      skip if $Elite >= 1
039       $dumy = [THIS] -> install 1 units of Ion Disruptor
040     end
041    end
"Try not. Do or do not, there is no try."-Yoda

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

Brent Rivienne
Posts: 162
Joined: Thu, 18. Mar 04, 19:52
x3tc

Post by Brent Rivienne » Sat, 8. May 04, 21:10

Really looking forward to the improved player owned ship AI... Just set my disco to 'attack all enemies, land' and watched it repeatedly fly headfirst into a pirate ship 4 times and explode :|

SieurNewT
Posts: 662
Joined: Tue, 13. Apr 04, 18:45
x4

Post by SieurNewT » Sat, 8. May 04, 22:36

Thanks a lot :)

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

Post by Kailric » Sun, 9. May 04, 00:37

Brent Rivienne wrote:Really looking forward to the improved player owned ship AI... Just set my disco to 'attack all enemies, land' and watched it repeatedly fly headfirst into a pirate ship 4 times and explode :|
The new AI will still ram from time to time, thats just the dangers of fast paced outspace combat, but if its still a big annoyance let me know.
SieurNewT wrote:Thanks a lot :)
Your welcome!


Update:

A proto type for the new player ship AI is almost ready, hopefully :)

I have also tweaked and debugged the enemy AI and will upload that new version as well.

It is advisable to use both the Player ship AI and the Enemy AI as the player ships will get so skill as to make the default AI completely useless.
As I stated already somewhere that a fully Equiped Nova running under the New AI can take out a whole pirate base's defences all by itself if the pirate base is running under default AI.

............ :wink:
"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
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Tue, 11. May 04, 04:02

Update


I will release a raw beta for the Player AI ships in a day or so. Everything is working fine, just got to get the commands set so the player can get reports back for his/her ships.

Sneak Peak:

THere are 8 levels for your ships to advance and gain skills.

They will still need player assistance up until they hit about 4th or 5th level.

I am also gonna release a new type of Scanner that goes along with the new enemy AI, that will allow you to scan enemy ships and see thier actuall upgrades as (according to the story) Freight scanners often times miss hidden subspace compartments. So you will be able to "size up" ships before you attack. You will get a read out of its actuall max speed, if it has Ions (some are well hidden ) and the pilots recorded skill level.
"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
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Wed, 12. May 04, 01:50

The New Advanced AI project is here...

Check it out TOP POST
"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
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Wed, 12. May 04, 04:06

Here is a quick rundown of whats new:

Player Ship AI:

The is the new AI for the the Player Ships.
It requires the Xai Corp. Advanced Combat AI Software that can be purchused at several locations:

Argon, Boron, Territorys and the Goner Temple.

The software requires Flight Commands MrkI or MrkII
Once all software is install when ever the AI engages in combat it will begin to learn, gain skill, in several areas.
With the new Xai Corp. Advanced Combat AI Software there are three new commands, these commands are use to recieve reports back from your ships, and also to advance its level if it has aquired enough XP or when ever it reenters combat.

Xai Report Select: This command will let you manually choose which ship to run the report on.
Xai Report Target: This will cause a report to be sent back from the targeted ship..if its not one of your ships, or not a ship at all, it will send back a report from the ship you are in if the Xai Corp.
Advanced Combat AI Software installed. And yes, you can freely move from ship to ship and the AI will still retain all the levels and skills it has aquired.
Xai Report Sector: This will return a report from all ships in the chosen sector with the new Sofware installed. Excluding the ship you are in.

Warning: As this is a beta flight controls my be interrupted, and autopilots cancel so becareful.



The Levels:
There are 8 levels in all. The Reports will give you Exactly how much more XP is required to advance to next level. XP is gained by attacking and surviving battles and makeing kills. If the ship is destroyed so is the AI. Here is a run down of the ranks and skills.

Ranks: Skill
ALL : Advanced Combat: Ships will fire longer, and more aggressively and gain skill as they gain levels.
1 Space Rookie: Advanced Protect (this will be in a future version as its not in 1.0)
2.Space Ensign: Advanced Missile skill: Ship AI will start to fire missiles with better judgement, i.e. when shields are low, and will get better as they increase in level.
3.Space Cadet 2nd Grade Missile Defence: AI will attempt to detect and target and destory any threating in coming missiles. Either with laser fire or moquitos. This will get better will higher levels.
4.Space Cadet 1st Grade
5. Space Pilot 2nd Grade Hornet Blast: AI will attempt to launch a hornet missile at close range (this is a work in progress)
6. Space Pilot 1st Grade Advanced Missile Defence Move: AI will perform Defence moves when threaten and fire missiles to get tailers off their backs
7. Ace
8. Elite Ace Ion Laser SKill : AI will Use Ions until shields are low then will swap back to normal lasers..very deadly. WARNING: As of now there is no way to turn this off, except to uninstalled the Ion Disruptors. This will be changed in future versions.

With the new Enemy AI there is also a new scanner available to be purchsed in Argon, Teladi, and Pirate territorys. There is a readme in the scanner folders That explains its function, its basicly a means to "size up" your opponents before you attack. It returns the skill level, and any "hidden" wares aboard. And I will explain its commands here:

This Scanner has two commands as follows:
Subspace Scan Range: This will scan up to five non player ships in a 1000m radius and return the results to log. Will not detect anything over 1000m.
Subspace Scan Target: This will scan your current target only.


This readme is a work in progress......
"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
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Wed, 12. May 04, 05:32

Found one bug already in the enemy AI, new version already uploaded!
"Try not. Do or do not, there is no try."-Yoda

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

D_Zorro
Posts: 2027
Joined: Wed, 6. Nov 02, 20:31
x3tc

Post by D_Zorro » Wed, 12. May 04, 09:22

Great work, can't wait to try your new, Combat AI for player ships.




DZorro,

Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

bug!

Post by Shanjaq » Wed, 12. May 04, 09:55

Uhhr, I can't start a new game anymore. the screen is completely black after all the loading screens, and there's a red "Disconnected" message that stays up on the lower right of my screen. I hear some NASA transmission about "the eagle has landed" mixed with some Teladi battle taunts and explosions. I copied *all* xml files(except for the two in the "t" subdirectory) into the X2\scripts directory, should I have left your subdirectory structure intact or what? This mod package zip is unlike any I've ever seen before =\


btw i'm using this in conjunction with Massive War Mod(latest version) and Marks Marks_Patrol_And_Wingman_Commands_V3.1

Shanjaq
Posts: 353
Joined: Sat, 3. Apr 04, 09:47
x3

isolated bug!

Post by Shanjaq » Wed, 12. May 04, 10:16

err, nope. wasn't a conflict. I loaded just this mod by itself. all the .xml files from all subdirectories of the zip(except for the "t" subdirectory.) same problem! but now my screen is yellow instead of black.

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

Re: bug!

Post by Kailric » Wed, 12. May 04, 12:49

Shanjaq wrote:Uhhr, I can't start a new game anymore. the screen is completely black after all the loading screens, and there's a red "Disconnected" message that stays up on the lower right of my screen. I hear some NASA transmission about "the eagle has landed" mixed with some Teladi battle taunts and explosions. I copied *all* xml files(except for the two in the "t" subdirectory) into the X2\scripts directory, should I have left your subdirectory structure intact or what? This mod package zip is unlike any I've ever seen before =\


btw i'm using this in conjunction with Massive War Mod(latest version) and Marks Marks_Patrol_And_Wingman_Commands_V3.1

You need the two in the t directory installed also...I'll update the readme. On how to install.

Are you really picking up on NASA transmissions? WOW!
"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
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Post by Kailric » Wed, 12. May 04, 13:06

Edit: no longer needed
Last edited by Kailric on Wed, 12. May 04, 15:14, edited 2 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
Kailric
Posts: 985
Joined: Sun, 7. Dec 03, 05:15
x3

Re: isolated bug!

Post by Kailric » Wed, 12. May 04, 13:44

Shanjaq wrote:err, nope. wasn't a conflict. I loaded just this mod by itself. all the .xml files from all subdirectories of the zip(except for the "t" subdirectory.) same problem! but now my screen is yellow instead of black.
Hmmm, I just loaded a saved game with no new scripts: No problems
Loaded a game with new scripts back in: No Promblems

Loaded a game with new scripts back in minus the /t folder ones: No Problmes sept there are no names where the new commands go just Readtext dodads which is expected

Started a new game: NO Problems

Started a new Game and started Script Editor and loaded new scripts: NO Problems

Have no idea what your problem could be as these files don't deal with graphics.


To turn this on and off simple rename these files below by pulling any letter in front of their names: Note you must Reinit Scripts each time you do this.

New AI Turned ON:

init.TK.subspace
init.Xai.ACAI
init.TK.upgrades
init.ship.globalscriptmap.pl
init.ship.globalscriptmap.std

New AI turned off:
a.init.TK.subspace
a.init.Xai.ACAI
a.init.TK.upgrades
a.init.ship.globalscriptmap.pl
a.init.ship.globalscriptmap.std
"Try not. Do or do not, there is no try."-Yoda

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

D_Zorro
Posts: 2027
Joined: Wed, 6. Nov 02, 20:31
x3tc

Re: isolated bug!

Post by D_Zorro » Wed, 12. May 04, 14:06

Kailric wrote:
Shanjaq wrote:err, nope. wasn't a conflict. I loaded just this mod by itself. all the .xml files from all subdirectories of the zip(except for the "t" subdirectory.) same problem! but now my screen is yellow instead of black.
Hmmm, I just loaded a saved game with no new scripts: No problems
Loaded a game with new scripts back in: No Promblems

Loaded a game with new scripts back in minus the /t folder ones: No Problmes sept there are no names where the new commands go just Readtext dodads which is expected

Started a new game: NO Problems

Started a new Game and started Script Editor and loaded new scripts: NO Problems

Have no idea what your problem could be as these files don't deal with graphics.


To turn this on and off simple rename these files below by pulling any letter in front of their names: Note you must Reinit Scripts each time you do this.

New AI Turned ON:

init.TK.subspace
init.Xai.ACAI
init.TK.upgrades
init.ship.globalscriptmap.pl
init.ship.globalscriptmap.std

New AI turned off:
a.init.TK.subspace
a.init.Xai.ACAI
a.init.TK.upgrades
a.init.ship.globalscriptmap.pl
a.init.ship.globalscriptmap.std

I tried installing your new combat Ai for player ships, but the only command i can use for my wingmen is Attack My Target command, all my other commands are gone. And if i try to run a new game, the command AI you can buy in the equepmentdocks, are not there, you can't buy it , it only appears in the equipment docks, if i load a savegame.

Am i missing something here, i tried installing esactly like you said and can't get it to work.

DZorro,

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

Post by Kailric » Wed, 12. May 04, 14:13

I just got done redoing the readme.

I seperate the files into different folders but thats not the way it should be:

ALL files except the /t ones should be taken out of the folders and placed into your /script folders.

The /t ones should be placed into your X2/t folder.

Edit: don't try seperate installs for the Enemy AI and Player AI as I would need to adjust somefiles to make that work properly. I'll make them seperate sometime later.
Last edited by Kailric on Wed, 12. May 04, 14:20, edited 1 time 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

Post Reply

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