[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.
14
7%
An optional evil...only for the brave.
22
11%
A necessary evil...the universe should be dangerous.
78
40%
I now know fear...and want it from other races!
34
18%
Nothing to say...just want to see the poll results.
45
23%
 
Total votes: 193

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

[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?"
Downloads
:!: Version 1.1
ZIP (Includes SPK): http://www.mediafire.com/?sharekey=4264 ... 49b5870170

Overview
  • 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
Uninstalling
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.

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

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

Future Plans
1. Payouts for taking sectors back?

Resources
Text File: 8972

Version History
0.7
First public release!
0.7.1
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.
0.8
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
0.8.1
1. Minor bug fixes and compatibility improved with Improved Xenon
0.9
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.0
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.1
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.

Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

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!
ouch
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

Legionnaire

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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.

silenced
Posts: 4967
Joined: Tue, 20. Jun 06, 19:43
x4

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 ... I've heard it all before ... you're saying nothing new ... I thought I saw a rainbow ... but I guess it wasn't true ... you cannot make me listen ... I cannot make you hear ... you find your way to heaven ... I'll meet you when you're there ...

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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

Phier
Posts: 254
Joined: Sat, 23. Feb 08, 22:23
x3tc

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.

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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)

Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

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:

Legionnaire

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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

Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

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

Legionnaire

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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: 3359
Joined: Mon, 30. May 05, 04:51
xr

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.

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

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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.

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Post by 7ate9tin11s » Fri, 11. Apr 08, 07:48

Update released to turn off the debug messages and change the way sector takeovers work:

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

Legionnaire
Posts: 1368
Joined: Sun, 8. Feb 04, 16:28
x4

Post by Legionnaire » Fri, 11. Apr 08, 08:19

Just a small suggestion, when uploading new versions of this script and others, name them as per version, ie improved Khaak 0.7.1, as this is th first thing i do when i download one just so that i know it should be the newest version

Legionnaire

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

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

I'll remember that in the future...maybe! :roll:

and now, smileys for your entertainment...

:rant: :fg: :xenon: :teladi: :split: :pirat: :paranid: :goner: :boron:

Back to work... ><

Phier
Posts: 254
Joined: Sat, 23. Feb 08, 22:23
x3tc

Post by Phier » Fri, 11. Apr 08, 21:32

When it comes to balance, I'd try to balance it around RRF's as the vanilla AI is just to stupid to be expected to handle this.

Really what you have created is something like RRF but for the Khaak with sector take over so there is no way the AI will keep up without equal help.

Maybe if you limit the number of Khaak ships over all like RRF does so if you beat the snot out of them you get relative peace for a time until they make the next build up level and re-invade.

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

Post by Tenlar Scarflame » Sat, 12. Apr 08, 04:15

Awesome stuff... would there be any possibility for a Xenon take on this idea? Where if they obliterate a sector (perhaps they'd actually use their destroyers outside their home sectors...) they start building a station and make it their own until it's taken back.

Personally, I like the idea of a Khaak presence that the AI simply can't counter effectively. It lets me play the hero a bit. :D Perhaps there ought to be a mode, though, that limits the number of sectors the Khaak may conquer at once. But another that lets them expand indefinitely, unless they are beaten back.

I want to see the Khaak attempt to forcibly take a Xenon sector using this script... :twisted:
My music - Von Neumann's Children - Lasers and Tactics

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

Post Reply

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