[SCRIPT] Kha'ak Cluster Commands v1.50 - 29 Dec 2007

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

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

Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10

[SCRIPT] Kha'ak Cluster Commands v1.50 - 29 Dec 2007

Post by Kortako » Sun, 10. Dec 06, 14:26

Kha'ak Cluster Commands
This script will add 2 new commands under the "Custom" menu:

1. Decouple/Recouple cluster: Allows a player-owned cluster to be broken up into its fighter+scouts. Or, if already decoupled, reforms the cluster from the ships, as long as they are all in formation with the fighter. Look in the readme for more information on how to use this properly.

2. Activate Cluster Software Scrambler: Developed by a rogue scientist working for the Pirates, this shady piece of software was developed in an attempt to aid the guild with their raids on the strange purple ships that appeared on the borders of their sectors. It disrupts a cluster's ship computer, thereby disabling its ability to break up for a small amount of time. It requires the Software Signature Scrambler to function.

Previous field tests of the CSS software revealed that clusters have an emergency manual decouple that activates when the structural integrity of the cluster's hull has weakened too much. Therefore, when the hull drops below a certain level, rather than blowing up, the cluster naturally breaks apart. Furthermore, if the Kha'ak are able to bring their jumpdrives back online, they may use it in an act of desperation to jump a safe distance away until control of the ship is regained. After about 2 to 3 minutes, the Kha'ak are usually able to regain control of their ship.

Why is the CSS useful? Currently, it is the only known way to surprise the Kha'ak and attempt to capture a cluster before it breaks up.* Using LV's HAT script, the player can, with a little skill, capture a cluster before it has time to react to the unusual breach of their ship controls. Just target the cluster and activate it. Unfortunately, it has very little use for destroying clusters.

*Capturing clusters themselves isn't the only way to obtain one. With my recouple command, if you can capture a Fighter and the right amount of scouts (5, 13, or 21), then you can use the Recouple command on the Fighter's command console and create your own clusters.


Change Log:

v1.50 (See latest post for details)
-Fixed crucial cargo transfer bug
-New recoupling system
-Ship names are transferred between cluster and ships

v1.41
-Added in some missing files that caused the entire cargo transfer to not function properly
-Reduced the command slots to only 2 instead of 3, following Gazz's suggestion.

v1.40
-Shield and Hull damage now transfer from cluster to ships, and vice versa. However, upon recoupling, a cluster will regain its shield power if the ships' shields were low.
-All "Attack" commands under the Combat menu now function using my decouple script with cargo transfer.
-When a cluster is attacked, it now reacts and attacks back, even if it's just sitting there. Any other clusters in the same sector will decouple and help.
-Fixed a bug with my capture algorithm. Still not sure how effective it is.
-Fixed the player autopilot activating upon using the Decouple/Recouple commands.

v1.30
-New cargo transfer - you no longer lose your onboard wares!
-No more free weapons/shields when a cluster is decoupled.
-[Beta] New attempt to be able to capture clusters. Just shoot! No HAT required. Please leave feedback on difficulty of this/if it works, as I haven't tested it yet.

v1.20
-Added Cluster Software Scrambler (Requires SSS)
-Slightly tweaked Decouple and Recouple commands

v1.10
-Added ability to reform a cluster.

v1.00
-Ability to break up a Kha'ak cluster.

Many thanks to B-O'F for his help and allowing me to implement his awesome Freight exchange scripts.

Please report any bugs to me immediately. As this is my first script, please leave me some feedback! Thanks!

Kortako
Last edited by Kortako on Sat, 29. Dec 07, 14:31, edited 35 times in total.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20534
Joined: Mon, 15. Nov 04, 00:26

Re: [Script] Break Up Kha'ak Clusters v1.0

Post by Cycrow » Sun, 10. Dec 06, 20:18

Kortako wrote:Also, I realize that someone like Cycrow or any of those other wonderful scripters could have done this in 5 seconds flat, but it was a good learning experience for me. :D
everyone has to start somewhere ;)

User avatar
Matt Armada
Posts: 203
Joined: Mon, 21. Mar 05, 14:46

Post by Matt Armada » Sun, 10. Dec 06, 20:25

Personaly, i think this is a HELL of a starting point. If i even manage to use like, HAT to get my hands on a cluster, this will be the best damn script in the world for me. Good job man

Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10

Post by Kortako » Mon, 11. Dec 06, 08:42

New version 1.10 adds ability to reform clusters.

User avatar
nirwin
Posts: 1185
Joined: Wed, 2. Nov 05, 00:07

Post by nirwin » Mon, 11. Dec 06, 16:16

Good job there, like you say a bit of an odd script to make given the limitations that you stated, but it just makes me more eager to see what weird and wonderful script you will come up with next.

Keep it up!
Nirwin
------
Sector Takeover | Unlimited Resources (x2/x3)

Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10

Post by Kortako » Mon, 18. Dec 06, 03:11

After a couple days of messing around, I tried to make this script a little more useful/practical. Refer to the first post for the update details. Special thanks to eladan, Cycrow, and Red Spot for their help!

Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10

Post by Kortako » Mon, 25. Dec 06, 04:36

I don't think anyone has actually tried my script, but if anyone is interested, I found a slight bug in my recouple script. It has been fixed, so download the 1.21 version if you downloaded it before.

Kortako

Lochen
Posts: 29
Joined: Mon, 24. Jul 06, 11:40

Post by Lochen » Mon, 25. Dec 06, 06:34

I have been using it quite a bit actualy, decide to have a bit of fun, script in 50 clusters in a random teladi sector, let them all loose and watch the teladi (and framerate) drop like flies. When all the teladi ships are gone, recouple clusters, blow clusters up. Quite fun.

Anyway, very nice script, would be more useful if khaak clusters were easier to get, but I'm sure that anyone who wants one bad enough will either capture one or script one in.

User avatar
Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44

Post by Red Spot » Mon, 25. Dec 06, 13:44

if you are interested ...

not that I'm requesting (I already have such functionality in my game) but it may be good practise ...

make Clusters act as formations, meaning making Clusters work as if they are regular ships ... if one breaks all (in sector) clusters break up ...
(the 1 first targeted by such wing of Kha'ak ships will likelly not forget about it ... :twisted: )

to implement it fully will most likelly introduce you to a few SE-features that may prove usefull when you intent going into the direction of combat/wingman-scripts ..



G

Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10

Post by Kortako » Thu, 28. Dec 06, 10:06

Hey Red Spot,

Your idea sounds like a good one, except, do you mean for player-clusters? To me, if a player cluster functioned like that, it wouldn't seem all that logical. I mean, it's still the player's ship, and isn't controlled by the Kha'ak anymore; therefore, the player should have to break them up unless that specific cluster is attacked.

I'll think about the idea, though. It seems intriguing. :D

User avatar
Red Spot
Posts: 3224
Joined: Fri, 4. Feb 05, 14:44

Post by Red Spot » Fri, 29. Dec 06, 01:12

The way I did this is by objectclass, meaning it doesnt matter wich race a cluster is from (altho in my game only Kha'ak use them ...)

How I have it working (in basics)
If lets say I make 3 clusters jump in a sector than they all 3 will try and hook up with any other nearby Cluster (making sure that 1 takes the lead)
now only the lead-cluster can give the command to break up but the wingmen (and leader) will all break up together if you attack 1 of them ..

The lead-cluster keeps finding a nearest target with a regular interval wich means they generally track the nearest enemy ship, will follow it up to a distance well beyond the range of one of the largest weapons in X3 (GPPC) and break up as 1 when the leader gives the command.

Than when broken up the M3 that came from the lead-cluster will take lead (and attack) and all other M3 will follow it, the M5 will simply stay wingmen of the M3 they came with .. The effect is a somewhat more agressive behaviour by clusters and kha'ak M3/M5s that previously formed the cluster ..



G

Jakesnake5
Posts: 2874
Joined: Fri, 17. Feb 06, 05:55

Post by Jakesnake5 » Sun, 31. Dec 06, 16:17

I see a slight exploit here. Let me explain.

I play Kha'ak Invader starts. I have my Fighter and the 5 Scouts (supprisingly), that could be used to form a cluster.

The exploit comes from your adding wares to the ships after decouple.

If the player is like me, and is playing Kha'ak Invader start, or has managed to capture any ships (not clusters with your script, but really cap them) and they reverse engineer them and build new Kha'ak ships, they'd be able to arm them even though they'd normally not be able to.

Or, if their a KI start, they could strip down the ships, cluster them up, and decouple with full equipment for free.

I think you need to do a check on the ships. First, find out if their hulls are 100% (this script could cheat repairs for free). Next, check they have the decoupled wares they'd be given on board already (Prevents getting freebies).

this would help quite abit to prevent exploiting.
Perfection is in the hands of God, we bags of dirt can only do the best we can©
Image
Modders are a source of ideas to help the Game Makers improve what they have made. Cherrish them, for they are the fruit of thy labors.©

dostillevi
Posts: 182
Joined: Thu, 9. Mar 06, 03:32

Post by dostillevi » Sun, 31. Dec 06, 17:41

perhaps the Khaak are able to generate their own weapons in ship... who knows what they can do? Maybe have a timer instead of the regeneration being instant.. would give a little reward to those able to complete the difficult task of capturing a cluster, especially since you can't normally come across their weapons. Sort of a repair mode, even.... if a cluster forms up and one of the scouts is missing weaponry, the cluster could lock up and prevent de-coupling for an hour or so while it generates a new weapon for the ship. Make it an hour per weapon generated, or even longer to keep things fair.

User avatar
Freols
Posts: 94
Joined: Wed, 21. Dec 05, 19:18

Post by Freols » Sun, 31. Dec 06, 20:15

I really like the sound of this script.
It makes the Kha'ak start far more feasable. In other games you pretty much had to rely on buying other race's ships, now with the added functionality the clusters provide... it makes it easer parhaps.
Image

Kortako
Posts: 230
Joined: Sat, 22. Jul 06, 05:10

Post by Kortako » Sun, 31. Dec 06, 21:46

Jakesnake5 wrote:I see a slight exploit here. Let me explain.

I play Kha'ak Invader starts. I have my Fighter and the 5 Scouts (supprisingly), that could be used to form a cluster.

The exploit comes from your adding wares to the ships after decouple.

If the player is like me, and is playing Kha'ak Invader start, or has managed to capture any ships (not clusters with your script, but really cap them) and they reverse engineer them and build new Kha'ak ships, they'd be able to arm them even though they'd normally not be able to.

Or, if their a KI start, they could strip down the ships, cluster them up, and decouple with full equipment for free.

I think you need to do a check on the ships. First, find out if their hulls are 100% (this script could cheat repairs for free). Next, check they have the decoupled wares they'd be given on board already (Prevents getting freebies).

this would help quite abit to prevent exploiting.
Jakesnake5, you have a very good point. The stock egosoft decouple script that I use to break up a Kha'ak ship creates ships with full hull, regardless of the hull of the cluster before. So if you attack a cluster to 1% hull, and it breaks up, they'll all come out with 100% hull. I could probably pass on the cluster's hull before it breaks up and set all the ships to that hull. Would that be better? Edit: But then what would happen when only say, a scout is damaged and it recouples? It'd be at full health again.

As for the weapons, as a quickfix you can go to the kortako.khaakSplit script and comment out the line that calls the Install script. That'll still install some weapons when they decouple (I think), but it won't be maxed out (Fighters only with 1 alpha Kyon and all with variable shields). I only did that because every time you recouple/decouple, you lose everything and start over. It's random, so you'd lose a shield here and there, or a Kyon emitter. Of course, I could just set it so they come completely stripped, and make it that much harder. Any ideas?

dostillevi, I really like your idea, but that sounds a bit complicated for me. :lol:

@Freols, if you were under the impression that you could pilot the cluster while recoupling/decoupling, I hate to tell you that this script won't do that. You have to do it remotely, because if you're in it while it decouples, the game doesn't know what to do with you when the cluster is destroyed to make the fighters and scouts. I tried it once, you suddenly just appear next to the fighter and everything starts flashing crazy-like and the game freaks out. Not pretty. That's why there is a check to make sure you don't put yourself in that situation. If only there was a way to access the transporter like it does in the 1st Bonus Scenario.

Any other feedback is much appreciated.

Post Reply

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