[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: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

[Script] Kill All Ships (but mine)

Post by JMCorp » Fri, 12. Dec 08, 21: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: 376
Joined: Fri, 30. Jan 04, 14:26
x4

Post by Ikaruga » Fri, 12. Dec 08, 22: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: 1422
Joined: Thu, 21. Apr 05, 21:48
x4

Post by JMCorp » Fri, 12. Dec 08, 22: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: 376
Joined: Fri, 30. Jan 04, 14:26
x4

Post by Ikaruga » Mon, 15. Dec 08, 08: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, 03:32
x4

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

Can you do this with stations too?

CanadianBrit
Posts: 1406
Joined: Wed, 6. Nov 02, 20:31
x4

Post by CanadianBrit » Wed, 17. Dec 08, 04: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: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan » Wed, 17. Dec 08, 04: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: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Thu, 18. Dec 08, 02: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, 03:32
x4

Post by slickdrac » Thu, 18. Dec 08, 21: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, 13:47
x3tc

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

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

UnderLord
Posts: 379
Joined: Sat, 18. Feb 06, 22: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, 22: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, 12:52
x4

Post by mace24de » Sun, 14. Mar 10, 00: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, 09:28

Sweet! Thanks!

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

Post by jimhsu77479 » Sun, 14. Mar 10, 09: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).

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

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

Modified this alittle to now sterilise the universe of both ships and stations :P

Currently running scrips: 14

Before: Quazillions


Edit: Hm.. interesting, even after purging the universe my fps is still horrid.

No increase in performance at all.

Very strange since its perfectly fluid when starting a new game.

What could possibly kill my cpu when there are no ships or stations? >.<

User avatar
Dirk-Jan
Posts: 470
Joined: Tue, 13. Apr 04, 12:38
x4

Post by Dirk-Jan » Wed, 26. May 10, 14:12

Very interresting.
I'm looking for a script that removes all ships in one (and only one) sector (Antigone Memorial, if you want to know).
Can you enhance the script in that way??

Besides: does the script also add (or better substract) from your reputation, or does the script remove rather than kill the ships??
X4: Let's do this!
(ASUS Sabertooth X99S; i7 5930@3.5; 24GB RAM; RX 580; playing latest vanilla steam version with Split Vendetta on Win10/64, "the young gun''; mogul/captain)
{playing since X-BTF}

Otterbear
Posts: 46
Joined: Wed, 30. Jun 10, 02:34
x3tc

Post by Otterbear » Thu, 5. Aug 10, 23:09

Just wondering,

After playing for a few hours and finally getting my ST's to UT's and beginning to make some money...my game is getting very laggy due to all of the extraneous ships the AI is producing.

Q. If I run this script...will all my traders/fleets and such be destroyed? (as seems the case).

Q. Does this script kill docked ships as well? ( I was hoping to dock my ST's / UT's to keep them alive).

Q. If this script does indeed kill ALL ships but the one the player is currently in...What's the point? (Your back to game start...only with a little more money but no traders or fleets or anything.) Your basically restarting the game every few hours.

dragonblue14
Posts: 48
Joined: Fri, 1. Jan 10, 23:16
x4

Post by dragonblue14 » Fri, 6. Aug 10, 01:13

The script kills all npc ships. It does not kill any of the ships owned by you.

User avatar
Jaga_Telesin
Posts: 435
Joined: Sat, 16. Sep 06, 22:48
x4

Post by Jaga_Telesin » Fri, 6. Aug 10, 01:16

While it might be nice to do cleanup on ships with either no purpose, or which are running CPU-hogging processes, I have to wonder at what it does to the economy in the game, long-term. The jobs file creates ships in a *new* game almost immediately. I have no idea how quickly it re-consults the Jobs.txt file when the game has been running for a while and ships are magically deleted.

Might want to use it with caution - you'll have stations left without Docktraders, and a lot of station's product will get deleted along with the ships.

Post Reply

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