[script] Improved Kha'ak 1.1: Updated June 10, 2008

The place to discuss scripting and game modifications for X³: Reunion.

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

Post Reply

How do you rate this script?

Unnecessarily evil...I fear the fear.
An optional evil...only for the brave.
A necessary evil...the universe should be dangerous.
I now know fear...and want it from other races!
Nothing to say...just want to see the poll results.
Total votes: 191

Posts: 810
Joined: Sat, 12. Nov 05, 00:18

[script] Improved Kha'ak 1.1: Updated June 10, 2008

Post by 7ate9tin11s » Mon, 7. Apr 08, 08:40

Improved Kha'ak 1.1

No updates, just re-uploaded for those looking to download it...but there may be updates in the future.

Posting by Anonymous Argon
"You know, it almost makes you feel sad for them. Between the Terrans, Xenon, and new ships by Otas corporation and others the Kha'ak are just not much of a threat. True, some of their ships can be a bit of a pest, but their sparseness and predictability make them a minor threat at most."

"It makes me wonder though, what will be their response to our rapid technological jumps? Will they be a threat again?"
:!: Version 1.1
ZIP (Includes SPK): http://www.mediafire.com/?sharekey=4264 ... 49b5870170

  • Swarming Behavior - Kha'ak ships now prefer to target the same things as their neighbors. This leads to massive focus fire like is often used by players to reduce enemy numbers quickly.
  • Swarm Communication - As a swarm of Kha'ak grows in a sector they will begin to call in Kha'ak from nearby sectors. The bigger the swarm, the further the call travels.
  • Swarm Targeting - The swarm will intelligently choose targets depending on the makeup of the swarm. If there are no Kha'ak capital ships present the swarm will focus on taking out smaller ships to do the maximum amount of damage possible. If there are Kha'ak capital ships then they will focus on capital ships first. Once all the ships are gone the Kha'ak will move on to the stations in the sector.
  • Gateless Jumpdrives - As we all know from the plot, the Kha'ak have gateless jumpdrive technology. Now they will use it to not only jump in and increase the swarm size, but also to jump into range of their target when it is far away. However, their gateless jumpdrive technology is dependent upon the unique crystalline structure of their vessels, just a tiny amount of hull damage (~2%) has been shown to disable their jumpdrives.
    Options: There are a variety of options that you can use to customize Kha'ak p2p jumping to suite your playing style and needs. This includes changing the minimum distance that can be jumped and which types of ships can jump.
  • Optional: Sector Takeover - If the Kha'ak successfully clear a sector of all enemy ships and stations they will begin building their own station in the sector. The Kha'ak will slowly donate their ships to the station construction effort amassing a large amount of Nvidium, Silicon Wafers and Quantum Tubes. Once enough materials are available they will become the station. Stealing of these materials by friends or enemies will be harshly dealt with! Sector takeover will prevent the sector from being jumped into directly (You may still use connected gates) or viewed unless you have Kha'ak sector coordinates. They will also begin receiving defense forces like normal Kha'ak sectors. If the station is destroyed the sector will revert back to the original owners. While they are shielded, new Kha'ak stations take time to reach full shield strength so they are extremely vulnerable after first being built.
  • Optional: Revenge - There is a small chance that when a sector is cleared of Kha'ak that an assault force will be sent from a Kha'ak home sector.
  • Optional: Automatic Upgrades - While in combat Kha'ak ships slowly tune themselves to be faster and more maneuverable up to a 50% overtuning. While dangerous for those being attacked, these highly tuned ships are quite an asset to collectors and cappers alike.
  • Optional: Missile Resupply - The Kha'ak home sectors will slowly transport missiles directly to swarm participants during battle. This will also increase the probability of Kha'ak using missiles during combat.
  • :!: Optional: Suicidal Scouts - The tiny scout ships have refined their capabilities at annoyance and have been seen to seek out and self-destruct against enemies dealing heavy damage to a small area. Furthermore, they have been known to explode into small missiles to clean out heavy concentrations of light units. It seems that the Kha'ak are making it so no part of the swarm can be ignored without the potential for big problems.
  • Difficulty Settings - There are four difficulty settings that can now be used:
    --Easy: Small swarms, slow overmind, still a threat
    --Normal: Tuned to be a threat to the universe with RRF. Not as bad as 0.7.1 though
    --Hard: The closest setting to 0.7.1, but with half the maximum swarm size
    --Insane: Practically guaranteed to take over the universe. Giant swarms, fast overmind, and capabilities beyond 0.7.1.
  • Point to Point Jump Options - The point to point(p2p) jumping of the Kha'ak while in-sector can be adjusted. While the minimum jump range defaults to 10k you can also choose 40k, 80k, or entirely disabled. While it may seem to be a good idea to use a higher jump range, the Kha'ak like to jump and it just means they will find a target further away and jump to it instead of something close.
  • BBS Notifications - By popular demand GalNet has began providing public notices of Kha'ak swarm activity around the universe. These notices can be found on the BBS of any station and will strive to give you the most important details about the engagement happening in the sector. Please be aware that the notices from pirate sectors are provided by rumor and may be inaccurate.
  • Extra Kha'ak - Depending on difficulty level the script will now generate and activate extra clusters around the universe randomly. Only normal vanilla clusters are used and no capital ships will be spawned by this script. Any capital ships were spawned by the game.
  • Optional: Kha'ak Invader Mode - Need a hand with the Kha'ak Invader start? In this mode you become the favored creation of the overmind. The overmind will create a starting swarm to help take your first sector and will then instigate swarming in the sectors you visit. By taking sectors you will be awarded with Salvage Insurance and more ships. Can you take out the whole universe? Great fun against RRF and Improved Xenon. Invasions will not be started by the player if the sector belongs to a race marked as friend, but if other Kha'ak stumble upon the sector an invasion could very well begin.
  • :!: Optional: Carrier Production - While the effects of 50 fighters launching from a heavily armed Xenon carrier are huge and debilitating, the Kha'ak carriers is a bit...lacking. With this option enabled carriers will produce ships as the overmind manages the battle. While usually just scouts there are diminishing chances of interceptors and fighters being produced as well. The carrier will no longer be the minor threat to leave for later!

A Warning From The Author
This set of scripts make the Kha'ak a force to be reckoned with again. If you are using RRF please do not use anything above 'Balanced' or the extra Kha'ak it adds will probably take over your universe. This script has been tested with XTM and the southeastern corner of the universe is a very dangerous place due to the connected Kha'ak sector near Kao's Mistake. Usually Kao's Mistake is taken over within the first few hours of the game if RRF is enabled, much less otherwise. This slowly spreads from there making it a very dangerous quarter of the universe.

:!: Current Difficulty Setting Effects

Code: Select all

                                                Easy    Normal      Hard    Insane
Revenge chance                                10.00%    12.50%    16.67%    25.00%
Hull% needed for jtp                         100.00%    98.00%    90.00%    75.00%
J2P minimum charge time                            5         3         1         0
J2P maximum charge time                            9         7         3         0
Proactive assault sectors scanned per minute       5        15        30        60
Max ships gathered from a remote sector            5        10        15        20
Engine/Rudder tuning chance                   16.67%    33.33%    50.00%   100.00%
Engine/Rudder tuning max                     125.00%   133.33%   150.00%   200.00%
Extra missile chance                           5.56%    11.11%    14.29%    20.00%
Max missile fire probability                  45.00%    65.00%    80.00%    95.00%
Suicide divisor # (1 in hull% / #)                 1         2         3         4
Emergency escape shields %                     1.00%    10.00%    15.00%    20.00%
Maximum controllable swarm size                   13        25        50       100
Maximum overmind sleep cycle                      60        30        20        10
Nvidium needed to make station                    30        25        20        15
10 GJ shields on stations                          1         2         3         4
Starting shield charge on stations             0.00%    12.50%    33.33%    50.00%
Minimum delay until next station built (hours)     3         2         1         0
Maximum delay until next station built (hours)     4         3         2         1
Chance of Spawning a Cluster per minute        5.00%    10.00%    20.00%    33.33%
Missile Swarm Participation Chance            20.00%    25.00%    33.33%    50.00%

Note: carrier production speed is dependent upon swarm size
To completely uninstall this script:
1. Set all the AL options to 'NO' and wait until they all say they are disabled (Core and Sector Takeover take a little time to shut down). This is all you have to do to disable it, the rest of the steps are for complete uninstallation.
2. Save your game
3. Remove the script files.

Tested and works with both vanilla and XTM X3. Also tested with Universe Explorers, RRF, and BSE with no problems. This script uses SIGNAL_KILLED and SIGNAL_ATTACKED for Kha'ak ships and may be incompatible with other scripts that use SIGNAL_KILLED and SIGNAL_ATTACKED on Kha'ak ships (Though I don't know of any that do). The stock '!ship.signal.killed.khaak' is still called after the custom routine and can be replaced by other scripts with no problem :D .

1. Currently there are no known bugs, please tell me when you find them! :D

Future Plans
1. Payouts for taking sectors back?

Text File: 8972

Version History
First public release!
1. Turned off a debug message I forgot about
2. Creating a station for the sector takeover is no longer time based. The Kha'ak will slowly donate their ships to the station construction effort amassing a large amount of Nvidium, Silicon Wafers and Quantum Tubes. Once enough materials are available they will become the station. Stealing of these materials by friends or enemies will be harshly dealt with! Sector takeover takes about 33% longer now, but is somewhat random due to the nature of the ship -> resources routine (Large ships provide more).
3. Fixed a bug where a weaponless scout would suicide even if suicide is turned off.
4. Fixed a few other small bugs that are not worth describing.
1. Completely rewrote overmind system
2. Added in a delay between claiming sectors
3. Added in difficulty modes
4. Fixed suicide scouts bug
5. Fixed revenge bug
6. Merged into ap AL framework
7. Game-generated Kha'ak will now start attacking things in their sectors
8. Kha'ak will now begin to take over Unknown Sectors if they are alone there
9. Reduced minimum station building defense force to 5 ships, it is easier to deal with them and get all the Nvidium if you interrupt them now :)
10. Simplified alot of code and fixed other various bugs
1. Minor bug fixes and compatibility improved with Improved Xenon
1. Added missile swarming capability. If not fighting the swarm target, but close enough to fire a missile at it then a ship will.
2. Added p2p jump options
3. Added BBS messages
4. Fixed a rather large bug with SIGNAL_KILLED calling the wrong script ><
5. Swarming job scripts now fall out into standard vanilla scripts when combat is over and the sector is cleared. Reduced the cpu cost considerably.
6. Other various bug fixes that I don't recall right now.
1. Added Kha'ak invader mode
2. Fixed a BBS bug and a few other minor bugs
3. Station building/sector takeover has been slightly tweaked to decrease building times by not stopping station creation if an enemy ship wanders into the sector (high-traffic sectors prevented all station building since transports kept entering the sector).
1. More p2p Options! wheee!
2. Tweaked the sector takeover and holding routines. Sector defense during takeover will be much nastier causing stations to be built faster.
3. Added carrier production capabilities
4. Added another option for suicide scouts to deal with exploiting fighter drones, mines, and m5 floods...yes, I am evil.
5. A few bug fixes
Last edited by 7ate9tin11s on Wed, 20. May 09, 18:21, edited 19 times in total.

Posts: 1242
Joined: Sun, 8. Feb 04, 17:28

Post by Legionnaire » Mon, 7. Apr 08, 08:46

Kha'ak have a gateless jumpdrive as we all know, now they will use it to assist other Kha'ak.
makes sense
As a Kha'ak swarm grows in a sector they will call other vessels from more distant sectors to assist them. Up to 10 sectors away when the swarm reaches 100 ships or more!
The overmind is watching...and will cause the swarm to work as one
could be nasty
Kha'ak ships are faster and carry more missiles...and they are not afraid to use them!
more combat yippee
I have had the Kha'ak chase off an RRF fleet
this is a little worrying, can the game and player cope without RRF? as unfortunately if your playing a plotgame you cant really use RRF as it has a nasty habit of Hijacking and renaming Argon One --> Bye Bye Plot.. Ive had this happen 3 times now. so tend not to use RRF


Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Mon, 7. Apr 08, 08:59

Well the fleet they chased off was the Split RRF fleet in the XTM Kao's Mistake sector (which borders a Kha'ak sector). So the Kha'ak got a couple carriers and destroyers to help. In normal sectors you will prolly only get several clusters and the occasional destroyer. Currently the script does not make any new ships and just uses existing ships that have been placed in the universe randomly.

Of course I also saw the Kao's Mistake Kha'ak crew take out the Unknown M6 once too (before turning on the less dangerous split) which was quite fun.

In the future I may slowly fill the bays of carriers, have a low chance of help jumping in from the unknown enemy sectors, and perhaps even let the Kha'ak take over cleared sectors :twisted: .

Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Mon, 7. Apr 08, 15:00

Testing has been interesting :lol:

I did not realize how many Kha'ak were just spawned far from the stations and stuff. Without adding any ships I found a level 8 swarm (64 to 80 ships) in Interworlds causing problems. One downside though is that Kha'ak sectors are just about impossible to survive now due to the way I made the kha'ak in-sector gateless jumpdrive work: Jumping ships will end forming a 5km sphere around their target, so they all basically get to you at the same time. I lasted just about exactly the 10 seconds it takes for them to jump, after getting the overminds attention, before seeing the game over screen in my trusty pirate reaver. I must admit that a hundred ships in the sector all suddenly jumping in around was quite terrifying to see though :D

I also forced a level 10 swarm (100+ ships) in Argon Prime and found out that Argon One cannot take hull damage :shock: .

Overall testing has been entertaining, but I do need to drop a few more waits in certain routines to lessen the processing load a little more. When the overmind was managing 10+ large swarms across the universe I started to see some jitters (with RRF enabled, which did not help matters). I think the overmind will cap out at 10 sectors and place small engagements out of mind. It will also limit itself to managing a maximum of 100 ships in a sector. Only the ships it manages can jump and use the swarm ai.

Speaking of the swarm ai, it is developing quite well. If they do not have a target they will assist a nearby kha'ak with their target. They also now prioritize property destruction and will ignore Big ships unless they have a big ship in the sector or there is nothing else to destroy :twisted: . Of course, they are alot harder to outrun when they can just jump to 5km of you too. They will also jump to 5km from their target when shields are low. Fortunately, the gateless jumpdrive depends on the crystaline matrix of kha'ak ships to be intact to work so a bit of hull damage (~2%) prevents jumps. This makes mass drivers rather important when fighting capital ships, especially since kha'ak outrange many weapons.

and before anyone asks...no I don't plan to make the gateless jumps work for your captured vessels. :p

Next steps are extra missiles and rudder/engine tunings. Then I'll release the beta for everyone else to test.

Posts: 2029
Joined: Tue, 20. Jun 06, 19:43

Post by silenced » Mon, 7. Apr 08, 15:20

sounds ultra hostile ... and nasty ... and frustrating ... and of course: challenging =)
... what is a drop of rain, compared to the storm? ... what is a thought, compared to the mind? ... our unity is full of wonder which your tiny individualism cannot even conceive ...

< Ich werde ab sofort auf eine korrekte Deutsche Rechtschreibung achten ! =) >

Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Thu, 10. Apr 08, 06:05

Version 0.7 Released!

Yay! finished with a releasable version...it may be a little too difficult though. I look forward to everyones feedback. :D

Posts: 254
Joined: Sat, 23. Feb 08, 23:23

Post by Phier » Thu, 10. Apr 08, 06:36

I'm scared :(

I'll give it a shot this weekend.

Mmm you know if you have Xenon Migration and this Script, will the Khaak fight the Xenon? That would be amusing to stumble into.

Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Thu, 10. Apr 08, 06:42

Yes they fight, in fact the Kha'ak will sometimes spawn in Xenon sectors. If the swarm got large enough I bet they could take over the Xenon sector too...never happened in testing though (I usually restarted testing after Kao's Mistake or President's End were taken)

Posts: 1242
Joined: Sun, 8. Feb 04, 17:28

Post by Legionnaire » Thu, 10. Apr 08, 07:52

well i've grabbed this, think i might wait for my next game to try this though, as i'm currently playing a KI start, then again maybe i should try running this just now :twisted:


Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Thu, 10. Apr 08, 08:04

Well, KI start could be fun just to watch the destruction and pick up the dropped stuff. Free ships if you have Bail System Extensions too :D

Posts: 1242
Joined: Sun, 8. Feb 04, 17:28

Post by Legionnaire » Thu, 10. Apr 08, 08:29

hehe im playing with more than BSE i use Salvage Network as well, and a whole load of other scripts but having the comp kill everything for me isnt my idea of fun and if your saying that even with using RRF the khaak will take over a sector eventually, then there isnt any point to it in my eyes , it would be one very quick game :P however i think i will use it the next time i start again, as im thinking terran flight leader for that one :)


Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Thu, 10. Apr 08, 09:05

Yeah I could use some help with ideas for tuning down the effectiveness of this script. One change I am thinking of is that the takeover of a sector will cost the Kha'ak some number of ships, ie:

Every minute one ship heads to the place where they plan to build the station to start forming the 'cluster' which is the Kha'ak station. Basically they would self-destruct and be replaced with box(es) of nividium floating there (looks a little like the squares that make up the station, I guess :p ). After they have enough Nividium they will turn it into a station, it may take ~50 boxes or so and each ship has a chance of turning into 1 or more boxes depending on size. This has 3 advantages:
1. It lessens the swarm in the sector so it is easier to defeat. This also prevents rapid expansion throughout the universe since it decreases the number of Kha'ak in the universe.
2. Defeating the swarm (or sneaking in and stealing) has a fairly large monetary incentive with there being up to 50 crates of random amounts of Nvidium for the taking.
3. It is quite easy to delay the sector takeover with a volley of mosquito missiles to the crates (or a single PSG shot!)

There is at least one problem though:
1. By just leaving the crates floating a KI start player has infinite money. Perhaps I'll make it 'illegal' to carry Nvidium during station building and you will be destroyed if caught :twisted:

User avatar
Tenlar Scarflame
Posts: 3343
Joined: Mon, 30. May 05, 04:51

Post by Tenlar Scarflame » Thu, 10. Apr 08, 15:59

Goodness, this certainly looks fun. :twisted:

Already downloaded, to be tested this weekend.
My music - Von Neumann's Children - Lasers and Tactics

I'm on Twitch! 21:15 EST Sundays. Come watch me die a lot.

Deleted User

Post by Deleted User » Thu, 10. Apr 08, 23:28

Nice Plug-in, This along with Xenon Border Conflicts, and RRF makes for a very interesting universe. Have already watched as the Xenon and Kha'ak have obliterated a couple systems. can't wait to see how it bad it effects the economy, and navigation. Poor RRF fleets don't stand a chance with out some extremely serious help.

Ouch after 3 hours game time Kha'ak have completely ransacked Argon Prime. Argon One didn't last long (I turned off it's invinciblity long ago), Now to see how hard it is for me to take it from the Kha'ak once they build up some. :twisted:
Last edited by Deleted User on Fri, 11. Apr 08, 08:42, edited 1 time in total.

Posts: 810
Joined: Sat, 12. Nov 05, 00:18

Post by 7ate9tin11s » Fri, 11. Apr 08, 04:43

... :headbang:

As is usual with my 0.7 versions I left a debug message on...you may notice Kha'ak ships changing their names to something like "KM5CD3 vs Police Buster" in certain situations. I will be putting up a patched version in a bit once I make sure the new code is stable.

The mini release will also contain:
1. Slightly decreased reenforcement rate
2. The aforementioned station building method that uses ships as raw materials. Station building will not happen unless there were 30 ships in the sector to start it.
3. A fix to make sure suicide scouts are not used when the switch is off. Before they could still be used if the scout had no weapons, now the scout will be given a weapon instead of suiciding if the switch is off.

Post Reply

Return to “X³: Reunion - Scripts and Modding”