Possible to DISABLE or limit Station cargo theft?

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

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

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Thu, 8. Jun 23, 13:48

Hey all,

I was wondering if, via a mod, it's possible to totally DISABLE the theft of station cargo. For whatever reason, perhaps some combination of mods, or that I store a LOT of supplies on "Warehouse" type stations, Piracy becomes a MASSIVE issue for me. I have fleets protecting stations, but Pirates still just wander past them and cause my stations to eject MILLIONS of credits worth of cargo in seconds. Cargo that then despawns moments later so is lost. There's also currently a minor bug with Station Turrets so, even when set to "Attack All Enemies" they WON'T fire on a hostile ship until it shoots and hits the station first - basically, it's acting like turrets are sent to "Defend". This means I have to rely on ships exclusively to shoot down marked pirates. The ones I don't see however, just fly on in.

Basically, I get to a point where I find myself CONSTANTLY monitoring stations for any sign of a disguised Pirate - alerts don't help if they're disguised of course - manually marking them as hostile and, often, manually ordering ships to attack if they don't respond on their own. It's tiresome in the extreme. Add to that the fact that Pirates just spawn in, so I can be in a dead-end sector with a blockaded Gate, yet Pirates just pop into existence inside the sector anyway.

Failing disabling it totally, which would protect ALL stations of course, is there any way to limit how much gets ejected? When a Pirate spawns in out of view, then immediately travel drives to a station and robs it, there's no time to react. When a ship with a small cargo capacity then ejects HUNDREDS of times the amount of cargo it can carry, that's crazy too. It appears that the amount of cargo ejected is some percentage rather than absolute value, so having a Warehouse full of supplies - or any station that's well-stocked - is a liability.

Note: I've read that others DON'T get hassled by Pirates if they have ships defending their Stations - I assume assigned in the Defence role - but this is not the case for me.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by BlackRain » Thu, 8. Jun 23, 16:16

Scoob wrote:
Thu, 8. Jun 23, 13:48
Hey all,

I was wondering if, via a mod, it's possible to totally DISABLE the theft of station cargo. For whatever reason, perhaps some combination of mods, or that I store a LOT of supplies on "Warehouse" type stations, Piracy becomes a MASSIVE issue for me. I have fleets protecting stations, but Pirates still just wander past them and cause my stations to eject MILLIONS of credits worth of cargo in seconds. Cargo that then despawns moments later so is lost. There's also currently a minor bug with Station Turrets so, even when set to "Attack All Enemies" they WON'T fire on a hostile ship until it shoots and hits the station first - basically, it's acting like turrets are sent to "Defend". This means I have to rely on ships exclusively to shoot down marked pirates. The ones I don't see however, just fly on in.

Basically, I get to a point where I find myself CONSTANTLY monitoring stations for any sign of a disguised Pirate - alerts don't help if they're disguised of course - manually marking them as hostile and, often, manually ordering ships to attack if they don't respond on their own. It's tiresome in the extreme. Add to that the fact that Pirates just spawn in, so I can be in a dead-end sector with a blockaded Gate, yet Pirates just pop into existence inside the sector anyway.

Failing disabling it totally, which would protect ALL stations of course, is there any way to limit how much gets ejected? When a Pirate spawns in out of view, then immediately travel drives to a station and robs it, there's no time to react. When a ship with a small cargo capacity then ejects HUNDREDS of times the amount of cargo it can carry, that's crazy too. It appears that the amount of cargo ejected is some percentage rather than absolute value, so having a Warehouse full of supplies - or any station that's well-stocked - is a liability.

Note: I've read that others DON'T get hassled by Pirates if they have ships defending their Stations - I assume assigned in the Defence role - but this is not the case for me.
Sure, if you edit the scripts involved it is possible.

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Thu, 8. Jun 23, 20:50

BlackRain wrote:
Thu, 8. Jun 23, 16:16
Sure, if you edit the scripts involved it is possible.
Glad to hear it's something that possible, I wasn't sure if this particular behaviour was exposed to the player for modding or not. That said, I'd not have a clue where to even start looking, let alone how to change it.

I wonder if others have such problems with Pirates as I do. It really is game-breaking - in that I'll simply stop playing - when you have to constantly check on Stations and manually look for Pirates spawning in. My current game was fine for the first couple of game days, then the pirates went nuts all of a sudden - right at a time when I'm busy elsewhere.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by BlackRain » Fri, 9. Jun 23, 14:44

Scoob wrote:
Thu, 8. Jun 23, 20:50
BlackRain wrote:
Thu, 8. Jun 23, 16:16
Sure, if you edit the scripts involved it is possible.
Glad to hear it's something that possible, I wasn't sure if this particular behaviour was exposed to the player for modding or not. That said, I'd not have a clue where to even start looking, let alone how to change it.

I wonder if others have such problems with Pirates as I do. It really is game-breaking - in that I'll simply stop playing - when you have to constantly check on Stations and manually look for Pirates spawning in. My current game was fine for the first couple of game days, then the pirates went nuts all of a sudden - right at a time when I'm busy elsewhere.
Try this, it is just a simple change to make it so that SCA ships do not target player stations when trying to hack. They should only go after other faction stations. Drop the folder into the FOCW folder or something. Let me know if it works, I haven't really tested. I am trying it out myself now, hopefully there are no issues.

https://www.dropbox.com/scl/fi/ydswg4rt ... wohn3g2zk5

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Fri, 9. Jun 23, 15:09

BlackRain wrote:
Fri, 9. Jun 23, 14:44
Try this, it is just a simple change to make it so that SCA ships do not target player stations when trying to hack. They should only go after other faction stations. Drop the folder into the FOCW folder or something. Let me know if it works, I haven't really tested. I am trying it out myself now, hopefully there are no issues.

https://www.dropbox.com/scl/fi/ydswg4rt ... wohn3g2zk5
Wow, thank you BlackRain, much appreciated! I'll hopefully get some time to try it out this evening or over the weekend.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by BlackRain » Fri, 9. Jun 23, 16:45

Scoob wrote:
Fri, 9. Jun 23, 15:09
BlackRain wrote:
Fri, 9. Jun 23, 14:44
Try this, it is just a simple change to make it so that SCA ships do not target player stations when trying to hack. They should only go after other faction stations. Drop the folder into the FOCW folder or something. Let me know if it works, I haven't really tested. I am trying it out myself now, hopefully there are no issues.

https://www.dropbox.com/scl/fi/ydswg4rt ... wohn3g2zk5
Wow, thank you BlackRain, much appreciated! I'll hopefully get some time to try it out this evening or over the weekend.
If you already downloaded, please redownload and replace the file. That original wasn't working. I will try this new way now and see if it works. Sorry, I am just kind of rushing this so it may or may not work until I can test enough.

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Fri, 9. Jun 23, 17:00

BlackRain wrote:
Fri, 9. Jun 23, 16:45
If you already downloaded, please redownload and replace the file. That original wasn't working. I will try this new way now and see if it works. Sorry, I am just kind of rushing this so it may or may not work until I can test enough.
Ok, I've snagged another copy, overwriting the original downloaded earlier.

No apology needed, you're doing me a huge favour to counteract some weird "pirate apocalypse" behaviour I've been seeing. I hope to get some time later this evening to install and test this. Pirating usually happens very quickly, so hopefully I'll be able to tell if it's working equally quickly.

Quick query: I assume I'll not see Pirates heading towards my station to rob it, rather than their attempt to Pirate yielding nothing? Just wanted to check the intent here, and what is and is not expected from the changed behaviour.

Cheers.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by BlackRain » Fri, 9. Jun 23, 17:39

Scoob wrote:
Fri, 9. Jun 23, 17:00
BlackRain wrote:
Fri, 9. Jun 23, 16:45
If you already downloaded, please redownload and replace the file. That original wasn't working. I will try this new way now and see if it works. Sorry, I am just kind of rushing this so it may or may not work until I can test enough.
Ok, I've snagged another copy, overwriting the original downloaded earlier.

No apology needed, you're doing me a huge favour to counteract some weird "pirate apocalypse" behaviour I've been seeing. I hope to get some time later this evening to install and test this. Pirating usually happens very quickly, so hopefully I'll be able to tell if it's working equally quickly.

Quick query: I assume I'll not see Pirates heading towards my station to rob it, rather than their attempt to Pirate yielding nothing? Just wanted to check the intent here, and what is and is not expected from the changed behaviour.

Cheers.
They should act the way they normally do, just not target your stations for hacking. They will still target your ships though. Basically, you shouldn't see any of them coming to hack your stations (unless one was already doing it before this script is put in).

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Fri, 9. Jun 23, 17:59

BlackRain wrote:
Fri, 9. Jun 23, 17:39

They should act the way they normally do, just not target your stations for hacking. They will still target your ships though. Basically, you shouldn't see any of them coming to hack your stations (unless one was already doing it before this script is put in).
Nice. What I tended to find is, upon loading a game, it'd be some sort of Catalyst for Pirate activity, triggering new ship spawns which then made a bee-line for one of my stations. The first few minutes of loading any save was spent looking for disguised pirates near / heading towards my Stations.

As it happened a lot it was generally quite clear when a Pirate was heading directly towards one of my stations to hack it. Except when they managed to use their Travel Drive the entire approach of course.

I'll see how things go, thanks again.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by BlackRain » Fri, 9. Jun 23, 18:09

Scoob wrote:
Fri, 9. Jun 23, 17:59
BlackRain wrote:
Fri, 9. Jun 23, 17:39

They should act the way they normally do, just not target your stations for hacking. They will still target your ships though. Basically, you shouldn't see any of them coming to hack your stations (unless one was already doing it before this script is put in).
Nice. What I tended to find is, upon loading a game, it'd be some sort of Catalyst for Pirate activity, triggering new ship spawns which then made a bee-line for one of my stations. The first few minutes of loading any save was spent looking for disguised pirates near / heading towards my Stations.

As it happened a lot it was generally quite clear when a Pirate was heading directly towards one of my stations to hack it. Except when they managed to use their Travel Drive the entire approach of course.

I'll see how things go, thanks again.
They might still be near your station because they are going after one of your trade ships but they shouldn't hack the station, let me know though.

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Fri, 9. Jun 23, 18:19

BlackRain wrote:
Fri, 9. Jun 23, 18:09
They might still be near your station because they are going after one of your trade ships but they shouldn't hack the station, let me know though.
Will do.

Edit: I've been testing for about 30 minutes and, while I do see Pirates actively pirating other stations, they're yet to bother mine. It's rare I'd go this long without having to take action, so it's looking good so far!

Edit 2: It's been a couple of hours or so now and things are still looking good. Lots of Pirate activity, but none have targetted my Stations yet. It's nice to be able to concentrate on other tasks and not constantly worry about losing masses of resources from my Stations. Egosoft REALLY need better options for the player to decisively counter Station Piracy. Pirates in Corvettes should FEAR the Fleets protecting my Stations, but they don't!

docwho83
Posts: 168
Joined: Mon, 15. Jun 09, 23:10
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by docwho83 » Sat, 10. Jun 23, 16:29

Other answer is to have the SCA factions unlocked and get friendly with them.

I am using a version that unlocked everything but the Xenon. Below is the link to the mod but this one unlocks even Xenon.

https://www.nexusmods.com/x4foundations/mods/933?
My Mods
RepairLasers Player controlled drone Also on steam
[Minefield] fell affliction minefield removed Also on steam
[Buildmodule] add research for buildmodule leak steals

Scoob
Posts: 10159
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Possible to DISABLE or limit Station cargo theft?

Post by Scoob » Mon, 19. Jun 23, 14:38

docwho83 wrote:
Sat, 10. Jun 23, 16:29
Other answer is to have the SCA factions unlocked and get friendly with them.

I am using a version that unlocked everything but the Xenon. Below is the link to the mod but this one unlocks even Xenon.

https://www.nexusmods.com/x4foundations/mods/933?
Thanks. I have used a Mod that did something similar in the past. I'm not sure at what threshold Pirates stop Pirating the player though. I had 20+ standing with BUC at one point, and they still regularly Pirated my Ships and Stations. I've never gotten to the point of doing the stuff to become friendlier with SCA.

With this mod, kindly created by Blackrain, while my stations are safe, I'd suggest my ships likely get targetted a bit more as there are less targets for the Pirates to pick. Still, at least with ships you get a warning, and can counter it. With Station theft there is often NO counter, other than constantly watching for disguised Pirates. So very glad I don't have to worry about that carp any more. If there were a genuine counter to this, I'd be fine with it. There is not.

Return to “X4: Foundations - Scripts and Modding”