[Script] Kill All Ships (but mine)

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

JMCorp
Posts: 1337
Joined: Thu, 21. Apr 05, 21:48
x3tc

[Script] Kill All Ships (but mine)

Post by JMCorp » Fri, 12. Dec 08, 22:28

this script when run will kill all the ships in the universe.

everyones.

even the hidden ships.

*it will leave yours though, which i find handy*

you do have to know where to put it, you have to know how to enable the script editor, and how to run a script. but because i have seen more than one person ask for it, here it is!

this script also happens to be very handy when your system boggs down really bad and gets to like 2-3 fps for no apparrent reason... run this script and you'll be back in business... till the next time some random ship somewhere decides to soak up all your cpu with a runaway script.

killships.zip

run the script named a.jmc.kill.all.ships

*disclaimer* this script comes with no warranty implied or otherwise, use at your own risk. i will also most likely not change the script so dont ask.

User avatar
Ikaruga
Posts: 372
Joined: Fri, 30. Jan 04, 15:26
x3tc

Post by Ikaruga » Fri, 12. Dec 08, 23:16

Thanks a lot, this is exactly what I needed :D

I'll try it as soon as I can.

Of course, new ships should be created soon after thanks to the jobs, right ?

Oh, by the way, will plot ships respawn too ? (Goner Ozias, Exterminator...)[/spoiler]
If brute force doesn't solve your problems, then you aren't using enough

JMCorp
Posts: 1337
Joined: Thu, 21. Apr 05, 21:48
x3tc

Post by JMCorp » Fri, 12. Dec 08, 23:28

i know the exterminator is still there so either he's invulnerable or he respawns. most plot devices are invuln tho.

User avatar
Ikaruga
Posts: 372
Joined: Fri, 30. Jan 04, 15:26
x3tc

Post by Ikaruga » Mon, 15. Dec 08, 09:10

Hi, thanks for your script, I tried it and it worked perfectly.

It solved the problem I had (some ships "carrying" old code from another script, which was freezing my game)

However,
Spoiler
Show
I'm at the Goner Mission where I have to follow a piarte ship to its base :
when I ran your script, I got a message telling me "Oh no, you let it get away !"

And a few minutes after, I received another message saying "I found another ship, its name is "L0xxx@Mxxxx" , and instantly after another message sayiing "Oh no, you let it get away !"

So, I can't continue the mission. Neither can I abort it since it's a plot mission.

What can I do ?

Thanks in advance
If brute force doesn't solve your problems, then you aren't using enough

slickdrac
Posts: 26
Joined: Thu, 11. Dec 08, 04:32
x4

Post by slickdrac » Wed, 17. Dec 08, 03:13

Can you do this with stations too?

CanadianBrit
Posts: 1226
Joined: Wed, 6. Nov 02, 21:31
x4

Post by CanadianBrit » Wed, 17. Dec 08, 05:02

slickdrac wrote:Can you do this with stations too?
So you want no ships and no stations eh?

So you'll have a completely empty universe:

Nothing to kill
Nothing to trade with
Nothing to buy your products
Nothing to buy resources from
Nothing to kill to increase your fighting status
No workable plots
No where to renew your ships

So how about buying a new game! Cos clearly this one isn't for you!!

eladan
Posts: 5331
Joined: Sat, 7. Jan 06, 17:01
x4

Post by eladan » Wed, 17. Dec 08, 05:12

Tone it down... I can see that there would be potential uses for something like that, although if you simply want to remove a hostile station or three you'd be best using the cheat scripts.
CanadianBrit wrote:So you'll have a completely empty universe
Initially, yes, but it wouldn't take all that long to come back to life. It would be considerably emptier than usual for longer than that though.

User avatar
apricotslice
Posts: 13734
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Thu, 18. Dec 08, 03:02

Using this in the middle of running the plot would be a very bad idea.

The plot creates its own ships in places, and if you kill these, the plot scripts will still be running, but the ships wont be there. Its unlikely the ships would respawn either, since the scripts already running would assume they are still there.

Personally, I think a mechanism to identify and terminate running scripts that are causing problems would be a lot more useful.

slickdrac
Posts: 26
Joined: Thu, 11. Dec 08, 04:32
x4

Post by slickdrac » Thu, 18. Dec 08, 22:17

CanadianBrit wrote: So you want no ships and no stations eh?

So you'll have a completely empty universe:

Nothing to kill
Nothing to trade with
Nothing to buy your products
Nothing to buy resources from
Nothing to kill to increase your fighting status
No workable plots
No where to renew your ships

So how about buying a new game! Cos clearly this one isn't for you!!
Or, you know, I could just want to create my own custom battles and such and want as much free resources as possible. But go right ahead

Spitfire396
Posts: 13
Joined: Fri, 23. Jan 09, 14:47
x3tc

Post by Spitfire396 » Mon, 9. Feb 09, 17:18

will all ships in the entire x-universe been destroyd, or only the ships in one sector?

UnderLord
Posts: 323
Joined: Sat, 18. Feb 06, 23:53
x3tc

Re: [Script] Kill All Ships (but mine)

Post by UnderLord » Thu, 4. Jun 09, 01:57

JMCorp wrote:this script when run will kill all the ships in the universe.

everyones.

even the hidden ships.

*it will leave yours though, which i find handy*
Yes all ships and i'd assume the ships you bought too only the ship your currently in will be saved.
Asus M4A785TD-V EVO
AMD Phenom II X2 550 @ 3100 MHz
4 x 2048 DDR3-SDRAM
NVIDIA GeForce GTX 460 SE

Gripen
Posts: 88
Joined: Fri, 12. Jun 09, 12:10
x4

Post by Gripen » Sat, 13. Mar 10, 23:31

Was trying to download this, but the filesize is 0byte?

Anyone care to reupload this, would be appreciated :)

mace24de
Posts: 229
Joined: Sun, 15. Jan 06, 13:52
x4

Post by mace24de » Sun, 14. Mar 10, 01:46

Gripen wrote:Was trying to download this, but the filesize is 0byte?

Anyone care to reupload this, would be appreciated :)
Here you go :)

http://depositfiles.com/files/zr3exrqz6

Gripen
Posts: 88
Joined: Fri, 12. Jun 09, 12:10
x4

Post by Gripen » Sun, 14. Mar 10, 10:28

Sweet! Thanks!

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

Post by jimhsu77479 » Sun, 14. Mar 10, 10:43

apricotslice wrote:Using this in the middle of running the plot would be a very bad idea.

The plot creates its own ships in places, and if you kill these, the plot scripts will still be running, but the ships wont be there. Its unlikely the ships would respawn either, since the scripts already running would assume they are still there.

Personally, I think a mechanism to identify and terminate running scripts that are causing problems would be a lot more useful.
This is sorely needed. Is there any sort of script profiler or performance monitor for the thousands of scripts that are running simultaneously?

Also, the script could be tuned by restricting destruction to 1 sector, 1 race, 1 ship type, etc... Maybe you could use the handy menu system to help. For example, I spent hours with the script editor destroying ships until I narrowed my performance hog down to particular TLs in particular systems deploying jump gates (script).

Post Reply

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