[SCRIPT] Combat Tractor v1.30 [Updated 29/09/06] (M6 in sector survival kit)

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

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

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

[SCRIPT] Combat Tractor v1.30 [Updated 29/09/06] (M6 in sector survival kit)

Post by Bunny » Sun, 3. Sep 06, 19:35

Combat Tractor v1.30

What it does:
Give an M6, M2, M1 or TL a tractor beam and it will be able to disrupt the flight controls of up to 12 enemy ships within its 4km range.
As the pilots fight for control of their ships they are less able to aim laser weapons or missiles at your ship.

General Features:
- The turbulence effect gets stronger with decreasing range.

- Hotkey enabled with audio confirmation of combat tractor status "Weapon systems working / Weapon systems not working".
If you activate the combat tractor on a ship you are not in then a message is sent to your player log.

- All ship types can be snared with the exception of TL, M2, M1 & M6 (M6 is a special case where it can be snared by a larger ship)

- Since ships are much smaller than stations there is no need to mount the tractor beam in a weapon slot. You just need one in the cargo bay.

- Script goes into sleep mode when OOS or when no enemies are in range

- Script adapts to SETA use/frame rate changes to remain effective in combat


Required Equipment
Tractor Beam (in the cargo hold)

Zip and Cycrow installer spk file bundle
Hosted by Xai Corporation - Download

Version History
1.30 Performance optimised / audio message bug fix
1.20 Performance optimised/Hotkey and audio messages added
1.12 Original release

Notes
This script makes the M6 an effective in sector combat ship again. This is especially the case when fighting Khaak clusters.

**** Before uninstalling this script you should run combat.tractor.removekey from the script editor to unregister the hot key. There will be a confirmation message in your log when this is successful.

text page 8954
command slot - general commands 54

Thanks to Vampirecosmonaut for suggesting the audio codes/hotkey activation
Last edited by Bunny on Fri, 29. Sep 06, 17:05, edited 14 times in total.

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

Post by D_Zorro » Sun, 3. Sep 06, 20:58

sounds good, how can we test ?? :twisted:
System spec: Pentium (R) D 2.66 Ghz, Ram : 2048 DDR, HD : 250 GIG 7200 RPM intern 8 MB cash
Videocard : Nvidia Geforce 8800 GTS 320mb : Realtek
Laptop : AMD athlon 64 3200 + 1024 DDR 80 gig HD Conexant AMC Audio, Ati mobility Radeon Express 200

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Tue, 5. Sep 06, 14:58

Here we go, first slightly nerfed version with a 4km range ( I am still balancing it)

The following is worth trying out
1. Find a medium sized khaak cluster 13 M5s and a M3
2. Switch on the combat tractor
3. Take out the M3 and one M5
4. Stop you engines
5. Turn off the combat tractor for a couple of seconds...then quickly switch it back on :)

fud
Posts: 9837
Joined: Wed, 25. Jan 06, 14:26
x3

Post by fud » Tue, 5. Sep 06, 15:04

Interesting... Very cool idea.

Now if it were possible to "snare" a small ship, and slam it into another ship, I'd personally wet myself. :D

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Tue, 5. Sep 06, 15:41

Ship conkers :D

Augustini
Posts: 1604
Joined: Tue, 13. Dec 05, 21:55
x4

Post by Augustini » Tue, 5. Sep 06, 15:44

fud wrote:Interesting... Very cool idea.

Now if it were possible to "snare" a small ship, and slam it into another ship, I'd personally wet myself. :D
Could be funny :D Turn the ship and throw the unlucky b***ard cought in the tractor beam to kingdom come !!!!

User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Thu, 7. Sep 06, 05:48

I really like this mod.
I always wondered why the tractor beam wasn't used for combat. :)
MY question is this though: How can you tell if it's on or not?
I just have a command to enable it. I doesn't change to disable and there's no way I can tell if it's on or not. In other words, is it my system lagging or is it the tractor beam thingie. :oops:

[EDIT] Nevermind, I noticed it writes to your player log. You should, and probably will , :wink: change it to say if it's on or not in a release version.

[EDIT]
I changed "combat.tractor.toggle" to this. It's more gooder.
Ok, I shut up now. :oops:

Code: Select all

001   
002   if not [THIS] -> is script 'combat.tractor.mainscript' on stack of task=315
003    [THIS] -> start task 315 with script 'combat.tractor.mainscript' and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
004    = speak text: page=13 id=131 priority=0
005    = speak text: page=13 id=1359 priority=0
006    = speak text: page=13 id=1352 priority=0
007   else
008    [THIS] -> set local variable: name='CombatTractorState' value=0
009    = speak text: page=13 id=131 priority=0
010    = speak text: page=13 id=1359 priority=0
011    = speak text: page=13 id=1354 priority=0
012   end
013   return null
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Thu, 7. Sep 06, 10:29

@vampirecosmonaut
I was using just one command slot to toggle the tractor on or off (my Teladi nature :)). There should be a message in the log that says if it is on or off. Anyway your code is a better solution so I'll weld it in.

Cheers

I think the tractor settings at the moment are fine for Khaak but a bit of overkill for pirates.

Anyone got comments about game balance of combat with this script?

User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Thu, 7. Sep 06, 17:55

I was thinking also that this should be a hotkeyed command, so that when it's activated it doesn't say anything about the autopilot being activated. I got tired, so I didn't do it for my copy. But I must say, I really like this script idea. :D

As far as balance is concerned, I think the 4 km range is fine. That makes it easier to catch faster ships. But I did have quite a few pirate harriers hopelessly twitching in front of me. There really wasn't anything that they could do while I shot them up with BHEPTs. I probably could have hit them with PPCs. :lol:

[EDIT] Made it a hotkey, and been using script with my Paranid M2.
Makes life alot easier for the larger ships and makes flak guns much more useful. The 4 km range allows ships to escape from the beam, so I think the range is good. I suppose if you wanted to be a stickler for balance you could halve the effect on ships and lessen the range by about 1 km. :roll:
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Thu, 14. Sep 06, 16:02

Updated 1.20 Beta-
- Hotkey and audio added
- Remains effective when SETA is on or if the framerate is low.
- script sleeps OOS or when no enemy is about

User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Fri, 15. Sep 06, 01:26

I downloaded the new version and it's looking pretty good.
My only suggestion would be that on the hotkey activation put a conditional that checks to see if the playership has a tractor beam in the cargo bay. If you use the hotkey without a tractor beam in the cargo bay, your ship still says "weapon systems working". Maybe just put a quick check with a goto to the "off" toggle.

P.S. Thanks for the credit in the Readme, that was very thoughtful. :)
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

aka1nas
Posts: 1414
Joined: Thu, 7. Jul 05, 05:17
x4

Post by aka1nas » Fri, 15. Sep 06, 01:31

Does this script only work for the player ship or can I equip other ships in my fleet with tractor beams and use them as interdictors? :twisted:

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Fri, 15. Sep 06, 10:56

@vampirecosmonaut
Well spotted, I'll fix that :).

@aka1nas
Yes you can use this on any big ship you have. Ths script was designed to reinstate the M6 as a useful in sector ship.
When you switch on the tractor in a ship you are not in then a message gets sent to your player log. The audio messages are only used for the ship you are in.

Note on performance:
At the moment the framerate drops a bit while a snared ship is being hit with laser fire. Drawing sparks on a shaking ship seems to be the reason why. So, this can be improved by increasing the snare script wait time while the ships shields are down or dropping. I'll add this in the next version.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Fri, 29. Sep 06, 14:07

Something for the weekend

User avatar
R.Styles
Posts: 261
Joined: Sun, 6. Aug 06, 22:19
x3tc

Post by R.Styles » Fri, 29. Sep 06, 16:59

any chance, this script could be used to drag a ship into your docking bay? to get yourself a new ship & a new slave?
if the ship fits of course, otherwise it'll just ram into yours.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Fri, 29. Sep 06, 17:09

Nope, the collision avoidance kicks in. Getting a ship to the docking bay probably would not help because it would need to be cleared to land.

In anycase, capping with this script is less of a headache (capped ships are automatically released from tractor snare).

User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Fri, 29. Sep 06, 23:08

Nice work, bunny.
I'm glad to see a release version of this script. :)
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

User avatar
Mobuj
Posts: 293
Joined: Wed, 23. Nov 05, 00:30
x3tc

Post by Mobuj » Sat, 30. Sep 06, 01:37

Balance Idea:

A powerful weapon like this should require power to be used. EC as a power source is cheap, but Crystals would make it more of a 'use only when absoulutely necessary'.

I havn't actually tried this yet. Seems like a bit of a cheat if it can be used anytime for any length of time.

Also, does it affect eveything in its range or just hostiles? If anything then an auto cut off for when friendlies or a cap happens would be nice.
---------------------------
I am Popeye of Borg
You will be askimilated!

User avatar
vampirecosmonaut
Posts: 329
Joined: Thu, 17. Aug 06, 21:23
x4

Post by vampirecosmonaut » Sat, 30. Sep 06, 04:53

Making it so you need energy cells to run this is silly. Do you need energy cells to run a gun you have mounted? Heck, let's make everything run by energy cells! I just felt like saying that with how insanely rich you become in this game, by the time you need this mod, money won't balance it.

Also, another little suggestion, try the mod before you suggest a balance. :wink: It doesn't cripple the enemy ships very much, and it only effects enemy ships.
The first documented attempt in human history to use a rocket for spaceflight
was made in the 16th century by a Chinese Ming dynasty official named Wan Hu.
The resultant explosion presumably killed him.

Bunny
Posts: 2014
Joined: Mon, 1. Dec 03, 19:44
x3ap

Post by Bunny » Sat, 30. Sep 06, 17:37

Since M3s were upgraded the role of the M6 in sector has become a bit unclear. OOS it does fine, but in sector small groups of fighters just take it apart. Now it could be argued that it just needs bigger shields. But that just is another step in the weapon vs shield arms race. This idea side steps that and it creates a market for tractor beams :) .

The ships that are caught be the tractor are not dead in the water and do require effort to bring down.

Post Reply

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