[Question/DIY] Former Mission Ship still protected/indestructible

The place to discuss scripting and game modifications for X4: Foundations.

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

NilusBavarius
Posts: 278
Joined: Sun, 27. Nov 05, 18:52
x4

[Question/DIY] Former Mission Ship still protected/indestructible

Post by NilusBavarius »

Greetings everyone,

I have an issue with some former mission relevant ship of the Free Families (Slave Trader # / A Split Buffalo) which apparently didn't get the memo of the finished Split Plot and stays indestructible. :cry:
While checking the save, I've seen an entry with "min hull = #" which is exactly the number of hull points the ship maintains, even when under fire of I's, K's, and the typical swarms of smaller critters.

The savegame I experience this issue was started with 4.2 and was carried over to 5.x and now 6.0HF5.
The plot was started in 4.2 up to "deliver Fleet to Curbs (either sabotaged or not)" and completed with 5.1 with the sabotage and destruction of the Curb's Raptor, followed by the extra payment to ZYA to cut the piracy down.

All CUB/CAB installations and vessels are destroyed and the former Systems and Sectors where repopulated with Xenon.
Due to a missing game mechanic to set a faction destroyed for good if "insert arbitrary variable here", the Curbs place a new Build Site for the Trade Station/HQ as soon as the last one is destroyed.
The Xenon took hold of all of the territory but a bunch of pesky stubborn Buffalo's still roam freely without any order, indestructible, aggravating all Xenon around and even eliminating whole fleets in "self defense".

I don't know if this was already patched within the last years for new game starts or if it's just bad luck and/or a script hickup on my end, so I don't consider this post a bug report per se and ask for technical help to alter the vessel's entry directly in the save.

Anyway, I would be very, very (insert another superlative here) happy if someone could tell me, what I can alter in the entry of the Save to get rid of this Gallic Settlement... I mean... Slave Trader # Buffalo without rendering it corrupted.

Screenshots for clarification:

https://imgur.com/a/xy41edd

And @Alan: Before you tell me to rtfs:

No, I don't care about "modified" flag.
Yes, the game runs some small mods.
Yes, the save can still be loaded in vanilla.
:P

Thanks and have a great time,
Nilus
BitByte
Posts: 620
Joined: Tue, 14. Sep 21, 15:57
x4

Re: [Question/DIY] Former Mission Ship still protected/indestructible

Post by BitByte »

I don't see the real issue here? Ships fly there in the space and as them aren't really rendered while player is not in sector (yes their state is calculated) so resource consumption is more or less irrelevant.
I also have vanilla game assets from time before unite HOP & PAR in my game and also CUB ships.
Game is started 3.10.
Alan Phipps
Moderator (English)
Moderator (English)
Posts: 31679
Joined: Fri, 16. Apr 04, 19:21
x4

Re: [Question/DIY] Former Mission Ship still protected/indestructible

Post by Alan Phipps »

Heh, thanks for the heads-up in the opening post. :D

Still, since you list several different gameplay aspects and are effectively asking for hacks/edits rather than a technical fix to the vanilla game, over we go to the S&M forum.
A dog has a master; a cat has domestic staff.
BitByte
Posts: 620
Joined: Tue, 14. Sep 21, 15:57
x4

Re: [Question/DIY] Former Mission Ship still protected/indestructible

Post by BitByte »

As you know ship id (register number from game side), you can open uncompressed save file in text editor (for example Notepad++).
Search with ship id and go to begining of previous line which opens tag for the ship. Then scroll down as far as next ship ID appears. Go few lines higher where previous ship tag is closed.
Then remove lines between so you get ship removed.
Compress the file again and test.

For safety make backup copy from save before you start modify it in case something goes wrong you have orignal file to return.
NilusBavarius
Posts: 278
Joined: Sun, 27. Nov 05, 18:52
x4

Re: [Question/DIY] Former Mission Ship still protected/indestructible

Post by NilusBavarius »

Greetings,
BitByte wrote: Mon, 19. Jun 23, 11:01 I don't see the real issue here?... so resource consumption is more or less irrelevant.
I see where you are coming from and I admit, if it would be about background resources I couldn't care less.
The "issue" I have in this specific case is the fact, that this vessel is demolishing complete Xenon fleets and also mining ships in this Sector.
This already has severe consequences for the Xenon Supply Chain, especially after deactivation of a "helping hand" in form of a diff-patch for the Xenon mining jobs to prevent them from starving.
Alan Phipps wrote: Mon, 19. Jun 23, 13:04 ... asking for hacks/edits rather than a technical fix to the vanilla game, over we go to the S&M forum.
Thanks Alan!
I must admit I wasn't sure where it would fit the most and chose TechSupport as it might have been a topic/bug from the past which I might have missed in the patch notes over the last years.
BitByte wrote: Mon, 19. Jun 23, 18:55 As you know ship id (register number from game side), you can open uncompressed save file in text editor (for example Notepad++).
Search with ship id and go to begining of previous line which opens tag for the ship. Then scroll down as far as next ship ID appears. Go few lines higher where previous ship tag is closed.
Then remove lines between so you get ship removed.
Compress the file again and test.

For safety make backup copy from save before you start modify it in case something goes wrong you have orignal file to return.
Thank you BitByte for the detailed description and I'll try it as soon as possible.
Tbh, I was hoping for a more "surgical" solution beside deleting the whole vessel out of existence, but this will definitely do the job.
Just wondering about the possible side effects that solution might have towards the currently attacking Xenon vessels, as they have it set as target (even in the save file).
Do they just fall back towards their standard order or do I have to edit the critters too?

Cheers,
Nilus
BitByte
Posts: 620
Joined: Tue, 14. Sep 21, 15:57
x4

Re: [Question/DIY] Former Mission Ship still protected/indestructible

Post by BitByte »

You shouldn't need care about Xenon ships in this case as they will return back to original state as their current task should fail when ship does not exist anymore.

Return to “X4: Foundations - Scripts and Modding”