[MOD] Better piracy

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

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

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

Re: [MOD] Better piracy

Post by Scoob » Sat, 4. Jul 20, 03:12

Hi Alberto,

I hope you're well and still around, love this mod.

I think I might have found a slight bug. Scenario:

I started a Harass operation to capture a target, I got to the "Board" stage so did exactly that. I have several ships in my boarding fleet but some simply refused to launch their Marines. I tried time and time again and the same culprits would not launch Marines. It was eventually that I noticed that both the "Board target " AND "Harass" missions were still active. The ships that did not launch Marines were still "Harassing". The second I cancelled the "Harass" Mission - the "Board" Mission remained active of course - those ship also Launched their Marines.

So, when multiple ship are used in a boarding operation - I had 11 - the "Harass" part of the mission doesn't cancel when the "Board Target" stage occurs.

Now I know how to work around this - manually cancelling the stuck "Harass" mission, this does not cause me any trouble, but I imagine you'd like to look into this.

Cheers,

Scoob.

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

Re: [MOD] Better piracy

Post by Scoob » Thu, 26. Nov 20, 23:20

Hi,

I'm testing this Mod with the 4.0 Beta and while I've not spent much time with it so far, there is one issue:

When I claim a ship (right-click > Claim from within cockpit) said ship takes damage when the pod arrives.

Egosoft introduced a new way to claim ships in 4.0, where the player can select one of their ships then right-click > Claim on a target derelict. This causes damage in vanilla of course, though I expected it not to cause damage with BP installed.

I know it's the intent that claiming using a Marine aboard a pod (for S and M-Class ships) does NOT cause any damage, yet it does.

Note: I'm unsure whether it's related, however I do have all that "Damage Hull / Destroy Components" set to OFF in the settings.

Hopefully you plan to support this excellent mod into 4.0 and beyond, but thanks for all your work regardless :)

Scoob.

Polofix
Posts: 179
Joined: Thu, 6. Dec 18, 18:05

Re: [MOD] Better piracy

Post by Polofix » Sat, 28. Nov 20, 07:02

Hello,
I wanted to report here about a small bug.
Someone wrote, that the audio files in the MOD are not played.
This is because the path in the sound_library.xml does not match the path in the extension folder.

I downloaded my version from Github. There the Mod folder is called 'x4-Better-piracy-0.13.0'. In the sound_library.xml
but the path is called 'better_piracy'. Of course this has to be adapted. I don't know if this is also true for Steam and Nexus versions.

sound_library.xml:

Code: Select all

<sample start="extensions\better_piracy\voice\61538\normal" />

Must be changed to :

Code: Select all

<sample start="extensions\x4-Better-piracy-0.13.0\voice\61538\normal" />
Attention! The entry exists twice. Of course both entries have to be changed.

Bug:
When I shoot down the shield of a M-ship it can happen that the progress bar does not reach the end, although the shield already has 0 %. I cannot reach the next stage of the capture mission (get the hull down). My conclusion is that the weapons are bringing the target's shield down too fast. It works better with much weaker weapons. But the progress bar should be oriented to the percentage of the shield, which it does not do. (My Pilot has 5 Stars)
For me this is a bug.

Question:
The standard Corsair behaviour does not work for me. I have read that own NPC-AI ships only try to capture other ships when they are hostile. Don't Green Scale Pact ships with Faction rep of -5 count as hostile enough? These ships are ignored by the standard Corsair behaviour. At which rep ships are attacked by my NPC-AI ships ? from -20 ? Unfortunately, I am in good standing with all factions and therefore cannot test this.

OT:
The mod creator seems to have stopped the project.The last entry here in the forum is from 31.5.2020. I think it is a pity that often projects are finished without leaving a short message in the forum. Many questions remain open. To write a short message that the project is finished and there is no further support should be possible.
Then you don't have to spend further energy and attention in this matter.
Unfortunately I experience this more and more often. In my opinion you also have a certain responsibility towards the community, if you transfer such a project from the private to the public.
But that is only my personal opinion.

DaMuncha
Posts: 1394
Joined: Mon, 1. Nov 10, 10:00
x4

Re: [MOD] Better piracy

Post by DaMuncha » Sun, 21. Mar 21, 03:17

Where are the settings menu for this?
Just... another... bug.

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

Re: [MOD] Better piracy

Post by Scoob » Mon, 22. Mar 21, 01:09

DaMuncha wrote:
Sun, 21. Mar 21, 03:17
Where are the settings menu for this?
Press "Esc" to bring up the Main Menu, then select "Extension Options" they're all in there.

Scoob.

DaMuncha
Posts: 1394
Joined: Mon, 1. Nov 10, 10:00
x4

Re: [MOD] Better piracy

Post by DaMuncha » Mon, 22. Mar 21, 02:15

THen its not working with the DLC. I have the APIs mod installed, and its turned on in the extensions but there is no options and I see nothing in the game.
Just... another... bug.

Leo and Friends
Posts: 4
Joined: Thu, 10. Oct 19, 09:40

Re: [MOD] Better piracy

Post by Leo and Friends » Mon, 22. Mar 21, 08:07

It works just fine for me. Download it from steam. Harass, you select it from the context menu and it will give you a list of instructions to follow, which ultimately leads to some crewmen abandoning ship.

DaMuncha
Posts: 1394
Joined: Mon, 1. Nov 10, 10:00
x4

Re: [MOD] Better piracy

Post by DaMuncha » Mon, 22. Mar 21, 23:48

I restarted the game again and now its working.
Just... another... bug.

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [MOD] Better piracy

Post by dantebelmondo » Mon, 22. Nov 21, 01:59

Love this mod. I tested with v4.1 and 2 DLCs. The result is surprisingly good. I fixed a few issues mentioned by other players.

1. 12/01/21 updated: Fixed the invalid patch that "Removed extra damage done when claiming with marines". Properly removed the damage done when claiming with marines in vanilla in favor of toggleable damage from the mod.

2. Scoob
I started a Harass operation to capture a target, I got to the "Board" stage so did exactly that. I have several ships in my boarding fleet but some simply refused to launch their Marines. I tried time and time again and the same culprits would not launch Marines. It was eventually that I noticed that both the "Board target " AND "Harass" missions were still active. The ships that did not launch Marines were still "Harassing". The second I cancelled the "Harass" Mission - the "Board" Mission remained active of course - those ship also Launched their Marines.

So, when multiple ship are used in a boarding operation - I had 11 - the "Harass" part of the mission doesn't cancel when the "Board Target" stage occurs.

Now I know how to work around this - manually cancelling the stuck "Harass" mission, this does not cause me any trouble, but I imagine you'd like to look into this.
12/01/21 updated: Need more information.

3. Polofix
When I shoot down the shield of a M-ship it can happen that the progress bar does not reach the end, although the shield already has 0 %. I cannot reach the next stage of the capture mission (get the hull down). My conclusion is that the weapons are bringing the target's shield down too fast. It works better with much weaker weapons. But the progress bar should be oriented to the percentage of the shield, which it does not do. (My Pilot has 5 Stars)
For me this is a bug.
The original script did check if the target's shield percentage < the threshold - 10 (i.e., if you set the threshold to be 30, the phase will change to damageHull if the shield is lower than 20). However, the check will fail if users set the threshold < 10. And it will stuck at the damageShiled phase forever. I changed the min to 11.

4. Polofix
The standard Corsair behaviour does not work for me. I have read that own NPC-AI ships only try to capture other ships when they are hostile. Don't Green Scale Pact ships with Faction rep of -5 count as hostile enough? These ships are ignored by the standard Corsair behaviour. At which rep ships are attacked by my NPC-AI ships ? from -20 ? Unfortunately, I am in good standing with all factions and therefore cannot test this.
-5 is neutral. So the corsair command will never capture SCA ships. I added another condition that if the ship's paintmod is SCA's default (makes more sense than knowing the true owner), corsair will start. SCA is the only pirate faction that has static reputation anyway.

Only modified files are included. Required the original file. Make sure to change the folder name from "x4-Better-piracy-0.13.0" to "better_piracy" for the sound files to work.

12/03/21: check the update post
Last edited by dantebelmondo on Sat, 4. Dec 21, 04:30, edited 4 times in total.

User avatar
Lord Dakier
Posts: 3243
Joined: Fri, 8. Dec 06, 13:45
x4

Re: [MOD] Better piracy

Post by Lord Dakier » Thu, 25. Nov 21, 19:26

dantebelmondo wrote:
Mon, 22. Nov 21, 01:59
Love this mod. I tested with v4.1 and 2 DLCs. The result is surprisingly good. I fixed a few issues mentioned by other players
Nice job, will give it a go with your patch!

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

Re: [MOD] Better piracy

Post by Scoob » Fri, 26. Nov 21, 15:05

Thanks for the update dantebelmondo, it's nice to have the mod maintained again after Alberto's departure.

Thought: With Corsairs, while they'll not target SCA ship due to them being neutral at -5 - something I reported previously - does the relatively new "mark hostile" command allow them to be targetted? They become -30 (enemy) but just for that ship, not for the entire faction of course. I *think* IIRC, that this mod using the Faction standing, not the individual ship standing for Corsair. Perhaps this could be adjusted.

Note: after a prior game update broke it, I use "True Piracy" to fix the Marine claiming damage - that setting no longer works for this mod, but perhaps you've addressed that?

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

Re: [MOD] Better piracy

Post by Scoob » Wed, 1. Dec 21, 22:54

Hi,

I've been using this updated version and have encountered an issue that I've never seen before.

I'm trying to capture a Split Destroyer, it's already neutered - no engines, no turrets - and I started the Harass process. However, it broke. I had the initial "bring down their shields" stage, then the "Damage their hull" stage. However, after I hit the first hull-damage milestone of 75%, I go the message "harass operation complete", which isn't right. Trying to harass again, sees it complete instantly, it never advances through the various stages.

This might not be linked to your changes, however, I've never had this behaviour before and I've been using better piracy for ages. Any ideas?

Note: I run other mods, but better piracy has always played nice with them previously.

Note 2: If I allow the ship's shields to go above 20% I can re-initiate the Harass operation. However, once the shields are down, it immediately aborts again.

Update: as a test I delete better piracy with your changes and copied over the vanilla 0.13.0 version and everything is now working just fine. It looks like something in your changes is causing the harass operation vs. L-Class ships to abort early. I've not done much boarding lately though, but I have been forcing lots of S and M-Class ships to bail with harass, and those have worked perfectly.

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [MOD] Better piracy

Post by dantebelmondo » Thu, 2. Dec 21, 07:04

Scoob wrote:
Wed, 1. Dec 21, 22:54
Hi,

I've been using this updated version and have encountered an issue that I've never seen before.

I'm trying to capture a Split Destroyer, it's already neutered - no engines, no turrets - and I started the Harass process. However, it broke. I had the initial "bring down their shields" stage, then the "Damage their hull" stage. However, after I hit the first hull-damage milestone of 75%, I go the message "harass operation complete", which isn't right. Trying to harass again, sees it complete instantly, it never advances through the various stages.
I made a mistake and terminated the whole mission when shield hits the first threshold. I will modified the original download link.

Just wondering is there any chance you can share a save file that has similar scenario
I started a Harass operation to capture a target, I got to the "Board" stage so did exactly that. I have several ships in my boarding fleet but some simply refused to launch their Marines. I tried time and time again and the same culprits would not launch Marines. It was eventually that I noticed that both the "Board target " AND "Harass" missions were still active. The ships that did not launch Marines were still "Harassing". The second I cancelled the "Harass" Mission - the "Board" Mission remained active of course - those ship also Launched their Marines.

So, when multiple ship are used in a boarding operation - I had 11 - the "Harass" part of the mission doesn't cancel when the "Board Target" stage occurs.

Now I know how to work around this - manually cancelling the stuck "Harass" mission, this does not cause me any trouble, but I imagine you'd like to look into this.

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

Re: [MOD] Better piracy

Post by Scoob » Thu, 2. Dec 21, 17:44

dantebelmondo wrote:
Thu, 2. Dec 21, 07:04
I made a mistake and terminated the whole mission when shield hits the first threshold. I will modified the original download link.

Just wondering is there any chance you can share a save file that has similar scenario
Cool, glad you've spotted the issue and fixed it. Will download the new version before I next play.

I've actually overwritten the save I mentioned, had a longer play-session than I original anticipated.

Regarding the other issue, I did experience that from time to time in the vanilla (not updated by you) version of Better Piracy, not had it since though.

Note: I do run a lot of other mods, which might make replicating things from a save of mine tricky potentially, I can of course provide my full mod list (.zipped up if that's of use) in the future.

dantebelmondo
Posts: 17
Joined: Sun, 22. Mar 15, 22:32
x4

Re: [MOD] Better piracy

Post by dantebelmondo » Sat, 4. Dec 21, 04:41

Scoob wrote:
Thu, 2. Dec 21, 17:44
Regarding the other issue, I did experience that from time to time in the vanilla (not updated by you) version of Better Piracy, not had it since though.
I finally fixed this issue. The harass orders for subordinates should be correctly terminated when the mission reaches final stage. The new approach also fixed another potential issue: If the target's hull is already lower than some threshold before starting the operation, the harass orders will still be the default one (attack target). Now, your subordinates will perfectly follow the harass operation mission.

12/03/21 Update
  • Fixed the harass orders for subordinates. The orders will be correctly synchronized with the harass operation mission.
  • The harass option will not be available if the mission is active (to avoid duplicates). You can still start another one if you set the prev. to inactive.

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

Re: [MOD] Better piracy

Post by Scoob » Sun, 5. Dec 21, 20:28

Thanks dantebelmondo, much appreciated.

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

Re: [MOD] Better piracy

Post by Scoob » Fri, 31. Dec 21, 17:10

Hi,

I've noticed another slight issue with Better Piracy, though I'm unsure if it relates to original code, your changes or just something with the v4.2 update.

Basically, quite often, the harass operation simply isn't present in the menu for certain ships. I know that specific plot-related ships are protected, so intentionally do not have the harass option enabled. I'm not talking about those ships however, rather just random, normal S and M-Class ships I'm encountering in space.

For example, I'm currently harassing a Pirate Nemesis, and it's working well. However, the Nemesis was attacking a "High-Tech Trader Demeter Vanguard" which does not have the "Harass" option present when bringing up the left-click menu on the ship. I've seen this with various other ships too often pirate ones as they're the ones I target to force-bail.

So far, it looks like L-Class ships can be harassed consistently, it's only some (seemingly random) S and M-Class ships that have this issue. I started a new game recently, and this occurs there too. My mod list remains the same - albeit with some updated versions - as it was prior to v4.2. I've not added anything new, just applied updates as they became available.

Really appreciate you supporting this mod, it's a particular favourite of mine.

Cheers.

Post Reply

Return to “X4: Foundations - Scripts and Modding”