[Script] Ship Hijacker v1.1 by Nividium 05/01/09

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
Hieronymos
Posts: 829
Joined: Fri, 30. Dec 05, 23:14

Post by Hieronymos » Thu, 7. May 09, 07:01

It beats me why the Devs didn't include TS's at least within the category of boardable ships...I used to love using LV's HAT v1.2 to prey upon Paranid superfreighters in 3R.
Image

SinisterDeath
Posts: 228
Joined: Sun, 26. Apr 09, 04:32

Post by SinisterDeath » Thu, 7. May 09, 07:42

Is it possible to get this script to work with a station?
I ask because on a plot mission, an NPC will not enter my ship, and I believe the only way I can get it to work, is to have him bail from the station...

mikthescot
Posts: 84
Joined: Sun, 11. Jan 09, 14:50

Post by mikthescot » Wed, 13. May 09, 15:35

can it be done without the plugin manager
??

GFHuber
Posts: 51
Joined: Fri, 29. Oct 04, 18:15

Post by GFHuber » Wed, 20. May 09, 23:31

First.

I bow to you Nividium i love having a second game for Piracy only your mods mean a lot of fun.

Second.

If you think the Mod is to easy or to much like a cheat... don't use it ;)

Third.

@SinisterDeath

Check for Livesupport... an read the Mission description again sometimes they demand an TP instead of a crumpy smely rusty cargohold with an half death Livesupport.

jimhsu77479
Posts: 168
Joined: Sun, 25. Nov 07, 23:39

Post by jimhsu77479 » Thu, 21. May 09, 00:57

Just for reference here's a summary of how I plan to modify this mod:

* Use microchips instead of computer components
* Reduce shield threshold from 500 to 4000 and enable capture of all ship types
* Consume microchips when transferred over
* Have a system where e.g. one microchip is needed for every 5m in ship value (so a fighter would need one and a M2 would need a few dozen)

Deadaim
Posts: 60
Joined: Sun, 12. Jun 05, 05:22

Post by Deadaim » Thu, 21. May 09, 07:03

If someone could tell me how to mod the script to allow for big ship capping that would be cool...or if you have a modified version of the script that would be even better.

User avatar
Nividium
Posts: 695
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium » Thu, 21. May 09, 08:47

Deadaim wrote:If someone could tell me how to mod the script to allow for big ship capping that would be cool...or if you have a modified version of the script that would be even better.
The script isn't really designed for huge ships. Their shield regeneration rate is too fast and large chunks of regen amounts per cycle. You would need to increase the "buffer" amount of shield remaining in order to jack a huge ship. You need to find in the script the part that compares shield values, it is currently set to 500. You need to increase that to maybe 4000 or something for huge ships. Ie; in reality the shields wouldn't need to be 0 but because they regenerate so fast and in big chunks this 4000 or so increase would give you some time for the script to begin processing before the ship has a chance to regenerate to much.

Here are the lines of code and there line numbers to help you find the values to change.

049
050 if $shields > 500
051 goto label error
052 end
053
054 if $shields <= 500

Deadaim
Posts: 60
Joined: Sun, 12. Jun 05, 05:22

Post by Deadaim » Thu, 21. May 09, 10:30

Thanks...sorry for being such a noob about this but how exactly do I edit the script to make the changes?

User avatar
Nividium
Posts: 695
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium » Thu, 21. May 09, 12:37

Deadaim wrote:Thanks...sorry for being such a noob about this but how exactly do I edit the script to make the changes?
You already have the script installed, right. You have also enabled the Script Editor by doing the "Thereshallbewings" bit as well, right. So, now activate the Script Editor [shift][c][s]. Now highlight the script "ship.hijacker.main" and click on it, this will open the script into the Script Editor. Now remove code lines 028-037 (by pressing the [delete] key, to enable hijacking of M1,M2 ships. Now go to line 050 and change the 500 to 4000. Now go to line 054 and change that 500 to 4000. Save the script by clicking the top/right button that looks like this [<<<] a pop up will appear asking if you want to save the script, answer yes.

SinisterDeath
Posts: 228
Joined: Sun, 26. Apr 09, 04:32

Post by SinisterDeath » Sat, 23. May 09, 00:57

GFHuber wrote:
@SinisterDeath

Check for Livesupport... an read the Mission description again sometimes they demand an TP instead of a crumpy smely rusty cargohold with an half death Livesupport.
I got a TP. :(

k8d0s
Posts: 2
Joined: Thu, 28. May 09, 16:07

Post by k8d0s » Thu, 28. May 09, 16:19

I have a problem with this script: I captured a Xenon P without problems. After the capture the P keeps getting an autopilot order to "Fly to Xenon sector 472" (or another Xenon sector, I don't remember exactly). Even if I pilot that ship the autopilot interrupt what I'm doing to go to Xenon sector 472, where it is destroyed (obviously). Are there task or jobs that aren't erased by this script (so they keep coming)? The P I captured isn't in a mission, it spawned in Black Hole Sun (as part of a Xenon attack I think).

User avatar
Nividium
Posts: 695
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium » Thu, 28. May 09, 19:50

Yes, there is a flaw in the script as it stands now. It is missing a "null" script. This null script should be called in order to erase the previous orders the ship has. Did you try issuing a navigation "standby" order to the ship? That might help. Like I say the script has this flaw and I don't think I'll be updating the script package with additional scripts including a "null" or changing the code any time soon. Try issueing dif orders to the ship or sell the ship I guess.

k8d0s
Posts: 2
Joined: Thu, 28. May 09, 16:07

Post by k8d0s » Fri, 29. May 09, 19:46

I tried a "idle" order and a "null" order; I also modified your script to include commands like "exclude from any patrol" etc... but nothing changed.

Oh well, I'll wait for your update (take your time of course)... in the meantime I'll try to capture only "unbound" ships!

Thank you for the assistance.

Meltdown
Posts: 303
Joined: Wed, 6. Nov 02, 21:31

Post by Meltdown » Mon, 1. Jun 09, 06:23

I like the premise of this script a lot. I used BSE in X3R, and while the results were fun, the universe quickly filled up with TONS of abandoned ships, especially after the 'nids got mad and started blasting everything that came in their sectors.

A quick trip through pirate or 'nid sectors with the Starburst equipped with the capping extension would net me a whole new fleet, which was fun for a while, but then it became a tad bit ludicrous to find dozens upon dozens of empty ships all over the place.

With this script I should be able to cap what I want, when I want it, and the rest of the universe should be none the wiser.

I have a question though. I'd like to improve the script by replacing compcomps (hehe, "compcomp" reminds me of Hardwar :) ) with microchips, or possibly a whole new ware if I manage to figure out how to implement it in the game; I'd also like to have the ware in question destroyed after the ship is capped (IMO the process should have SOME cost), and I'd like to increase the shield threshold, since it seems it's giving people trouble. (note: I haven't yet actually tried the script, but I will soon)

My question is: after these mods are done, can I upload the revamped script somewhere and link it in this thread? I will, obviously, not take credit where credit isn't mine. :p
Eat, drink and be merry, for tomorrow you may die.

Meltdown
Posts: 303
Joined: Wed, 6. Nov 02, 21:31

Post by Meltdown » Thu, 4. Jun 09, 07:27

Ok, I've been playing around with it for a while, and I've found the stock version completely useless. This is not meant as an insult, mind you; it's just that ALL captured ships engage their autopilot continuously, and always go to an "idle" order seconds after you've told them to do anything. This makes it impossible to even order them to a shipyard to be sold.

I've conducted further testing with Cycrow's cheat menu, using the "take ownership" command. It appears that (at least in 2.0a) the AI routines are tied to the ship, and changing ownership will not reset everything; giving the ships orders via scripts won't work either. As a result, capping this way becomes pretty much impossible.

I haven't tested if this keeps being the case even if you, or the ship, change sector, but even if it was it'd still be a problem.

I might have an idea for reworking the script into a functional version, with several radical changes. I'll try to do this tomorrow, since now it's late and I'm off to bed. :p
Eat, drink and be merry, for tomorrow you may die.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”