[Request] Kill NPC Ships?

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

[Request] Kill NPC Ships?

Post by Simoom »

Is it possible to make a script that clears the universe of NPC ships? (basically a "reset")

My game currently has hundreds upon hundreds of "stuck" freighters parked on top of one another in Wrecksville. There's no way I can kill them all (because I get about 1 frame every 5 seconds in this zone), and I don't see any cheat script that will allow players to insta-kill or delete NPC ships.

Also, where exactly are NPC ships listed in the Save files? I cannot find any reference to these hundreds of freighters in my Save at all.
docwho83
Posts: 168
Joined: Mon, 15. Jun 09, 23:10
x4

Post by docwho83 »

Use at your on risk. As I am not sure what will happen.

in my quicksave there are 1417 entry that match this key.

Code: Select all

<connection connection="ships">
use notepad++ and hit the - next to the connection node

then highlight the line and backspace it or delete and you should see your line numbers on the side go down.
My Mods
RepairLasers Player controlled drone Also on steam
[Minefield] fell affliction minefield removed Also on steam
[Buildmodule] add research for buildmodule leak steals
User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom »

Am I deleting only that line? Or all the contents regarding ship details following it?

I just spent like two hours deleting all the AES ships from my save file, and it broke the save (game crashed halfway into loading)

I backed up the original of course... but I am not sure what I did wrong.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

everything inside then node. thats why you should click [-] before - it reduces the node to one line.

alternatively here a patch file for savegames, if you should know how to apply it to saves (i doubt it though):

Code: Select all

<diff>
<remove msel="//connection[@connection='ships']" />
</diff>
although there may be some exception necesary for that since it does not exclude the playership..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Return to “X Rebirth - Scripts and Modding”