[MOD] Better piracy

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

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

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Fri, 15. May 20, 16:46

Scoob wrote:
Thu, 14. May 20, 00:21
After forcing a ship to bail, the ships in my wing sometimes stop moving, never to move again unless either removed / re-added to my Fleet.
Next version (With a bit of luck this weekend) will have a lot of fixes and technical improvements in that regard, thank you for reporting.
Scoob wrote:
Thu, 14. May 20, 01:01
When I'm attacking a target during a Harass operation, they might Drop Laser Towers or Drones, ships in my Wing seem to ignore these.
They purposely ignore them for the moment.
It is not a problem when targetting SCA/FAF, but if you kill "Laser towers" or "Drones" of a real faction, it will lower your reputation, you can easily go from +30 to -30 if during a harass operation you kill 15~20 Laser towers (Some ships haul literally HUNDREDS of them), 10~15 Defence drones (Reasonable amount for any XL ship) and 5 repair drones (Even if they fall to stray fire)... in a single operation!!!

Again, this is not meant to be this way in the future, once I focus on L/XL piracy systems/mechanics this will change, but for the moment, the best option is to put that decision on player hands rather than on AI hands.

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

Re: [MOD] Better piracy

Post by Scoob » Fri, 15. May 20, 17:27

Thanks.

One other observation if I may. As I started a fresh game recently (also with VRO, XR Ship Mod and Economy/War) I've been building up small fleet of fighters and other ships. I've been particular enjoying buzzing around in my Fighter group with a few fighter escorts. My first few acquisitions were really helpful for forcing ships to bail. However, as I've gotten other Fighters to bail I've added them to my Wing, which can actually cause a problem...I'll give an example...

I was trying to get an M-Class ship to bail. His shields were down and his hull damaged, but guidance was still asking for MORE hull damage. He was at about 50% hull - I'd just done some damage moments earlier - and the progress bar was still going up from this. Then, several of my Wingmen decided to fire at once, destroying the target. It would have been ok for any one of them to fire, maybe two, but not several of them at once lol.

For the record, I don't know if you use VRO currently, my ships are using the PAC Gun - basically a low-leve, but pretty good, anti-fighter fixed gun. Not much damage, but a long-ish burst and it doesn't heat up too quickly. However, when there ware likely 8-10 Guns all on target at once, pretty damaging.

Are the ships in the group that help with a Harass operation aware of their wing mate's damage? Or do they just think "will MY attack kill the target?".

I think, during the initial dropping of the shields, a larger group of relatively weak ships (like I have) are good - VRO makes M-Class ships a LOT tougher - but there's a risk involved once you're attacking the hull and several wing members fire at the same time. If you mod were aware of how many of the team had a firing solution at any one time and perhaps stopped some of them from firing once the hull gets low, that'd really help. Not sure how complex that might be though. Just thought I'd feed back on my experiences though. Really like this mod.

Scoob.

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Sat, 16. May 20, 06:32

I've just updated the mod
  • Created new default order `Corsair`, ships/fleets with this behavior will smartly harass selected enemy targets
  • Improved Harass operation logic
  • Improved debug logging
  • Disabled `combat_reputation_hit` and `harass_reputation_hit`, I need to find a better way of handling it
  • Stations will not allow a fleeing ship to dock if the attacker is allied to them
  • Separated changes into `Major changes` and `Minor changes` to increase readability
Create your own pirate imperium.
You will be able to instruct your most experienced pilots (3 stars or more) to do harass operations on their own, just assemble a small fleet and assing the `Corsair` default order to their leader.

Tip: The _Argon trading station_ in _Hatikvah's Choice I_ is usually full of HOP and ZIA traders (ARG/HAT will not protect nor care about them), that's a good spot to start.

As always, feedback and bug reports are welcome!

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Sat, 16. May 20, 11:18

Scoob wrote:
Fri, 15. May 20, 17:27
One other observation if I may.
Every feedback is welcome, then I might be able/willing to improve/change/do/fix it or not, but seriously, every single piece of feedback is welcome (Especially constructive feedback based on facts and real usage of the mod like the one you provide)
Scoob wrote:
Fri, 15. May 20, 17:27
...
Then, several of my Wingmen decided to fire at once, destroying the target.
...
Are the ships in the group that help with a Harass operation aware of their wing mate's damage? Or do they just think "will MY attack kill the target?".
...
That's exactly why "Tip: Use ships with a lot of shields and prefer high-shield/low-hull damage weapons for maximum effectiveness." is there, to avoid over-kill situations. :wink:

Let's check the possible solutions:
  1. You can down-size/re-arm your wing with more "Piracy-oriented" weapons. (Not really funny, but an option)
  2. With the latest update, you can split your wing into a "kill-wing" (High number of very damaging ships) and a "pirate-wing". (It will pay by itself in a very short time)
  3. I can increase the frequency of "Fire control" checks, especially in the "Damage hull" phase, now is done every sec, can be done every half sec. (The problem is still there, a big amount of high damage weapons such as "Plasma" or "Heavy torpedos" can still over-kill almost any small/medium target in just one volley.)
  4. I can improve the "Fire control" checks logic, make it self aware (Can I instantly kill the target?) and fleet aware (Can we instantly kill the target?)... but that's not realistic at the moment, the complexity of the code required to coordinate in real-time the fire control of a possible huge fleet vs a most likely impeded, damaged and almost dead target is not worth the gains (Not at this point at least, I prefer to invest that time into polishing other aspects and begin with the "Boarding" part)
  5. I can make it so that only members of the fleet assigned to a specific role (Intercept maybe?) join the "Harass operation" while letting the other part of the fleet to freely engage any OTHER target.
Options 1 and 2 are things that you can do right now, but not a real solution to the problem.
Options 3 and 4 will not really fix the problem or are too hard to implement to be worth it.
Option 5 looks right... it seems doable, it fixes the problem, it gives you control, and at the same time, some of your ships will protect you from "Unwanted security forces"... I will look onto it, but I see no major/hard arguments against it. :gruebel:

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

Re: [MOD] Better piracy

Post by Scoob » Sat, 16. May 20, 20:37

Thanks, I'll try out the new version :)

Edit: I'm using the updated version and have made several M-Class ships Bail. However, I'm currently Harassing a Pelican Sentinel and it's been under 25% hull for ages, yet not one single crew member has bailed. Captain Morale is just one star. I've done a number of L-Class ship operations this game, and this isn't what normally happens. Note that I am still at the "Maintain Pressure: Do not kill the target!" stage. Ship has been neutered, so is going nowhere and shooting no one, yet the crew count remains unchanged.

Might just be RNG poor luck on my part, but thought I'd check with you in case there's an error.

Btw: for ships in my Wing, how do I I set them as a "Kill Squad"? Add as an Attack group? My Defence Group is working to help me currently, and not blowing up the target, but it'd be nice to have some guys defending me - I assume they WON'T try to kill the marked Harass Target though, right?

Edit 2: I'm wondering if this is perhaps some sort of Plot ship? I have a mission "HAT: Going Offensive" to Deploy Bombs at a location - that location being a certain SCA Station. The Pelican seems to be heading to that station... so perhaps that's the issue, this ship will NEVER bail? I've got Marine on the way, so perhaps I'll not be able to board it either.

Edit 3: Ha, it WAS indeed a Plot ship. Pure coincidence though. I mean, I saw an SCA Ship on my travels, I Harassed an SCA ship, it's just how things are. I suspect I may break this mission if I board it?

Edit 4: I made the ship mine after that bit of the plot was done :)

Scoob.

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Wed, 20. May 20, 06:09

Scoob wrote:
Sat, 16. May 20, 20:37
Btw: for ships in my Wing, how do I set them as a "Kill Squad"? Add as an Attack group? My Defence Group is working to help me currently, and not blowing up the target, but it'd be nice to have some guys defending me - I assume they WON'T try to kill the marked Harass Target though, right?
The only way of doing it now is to split your fleet into two, one commanded by a 3* pilot with the "Corsair" default order (That will be your pirate fleet) and other commanded by you (The "Kill squad").

That way, your "Corsair" will start harass operations on its own, using its wing, while you are free with your own wing to kill any other target or roam the universe searching other adventures.

"Smart" target management is not easy to do, I plan to add it at some point so that you can have in the same wing ships that help with the harass and ships that will engage other things (Option 5 of my last post), but will not be in the near future.

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Wed, 20. May 20, 06:16

If someone is willing to share his/her experiences, It will be quite helpful for me to hear how are your "Corsairs" doing:
  • Do they work as expected?
  • Any bug/miss-behavior so far?
  • Are they too smart/dumb?
  • Do you feel that they break the game balance?
I plan to add and tweak some things about them, but it's being a pretty busy week IRL and I've not been able to toy with them as much as I wanted.
Let me know what do you think about them!

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

Re: [MOD] Better piracy

Post by Scoob » Wed, 20. May 20, 12:17

Alberto.Rota wrote:
Wed, 20. May 20, 06:16
If someone is willing to share his/her experiences, It will be quite helpful for me to hear how are your "Corsairs" doing:
  • Do they work as expected?
  • Any bug/miss-behavior so far?
  • Are they too smart/dumb?
  • Do you feel that they break the game balance?
I plan to add and tweak some things about them, but it's being a pretty busy week IRL and I've not been able to toy with them as much as I wanted.
Let me know what do you think about them!
Not got a three Star Pilot to try it out yet, but I will do as soon as I can. Would you consider changing the Corsair requirement to say One Star during testing? This means anyone trying the mod, even those just starting afresh, will be able to test it as basic seminars are plentiful.

Scoob.

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

Re: [MOD] Better piracy

Post by Scoob » Fri, 22. May 20, 01:13

Hi,

I think I may have found a minor bug. If you're on a ship with subordinates set to DOCKED, they should never launch. However, I just initiated a Harass operation while piloting my Behemoth, which had Alpha Group set to "Defend" but also "Docked". Better Piracy appears to override the "Docked" setting as the moment I clicked "Harass" Alpha Group launched against orders.

Is this something that can be checked for?

Note: I was attempting to pirate an SCA Destroyer, I'd used the Behemoths main guns to take out the Engines at ranged and had moved in closer to start the Harass operation, using one of the Behemoths Turret Groups set to "Attack my Current Enemy" while targetting the remaining turrets.

I've not had chance to test the Corsair feature yet.

Scoob.

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Fri, 22. May 20, 16:21

I've just updated the mod
  • Updated to use the latest `SirNukes Mod Support APIs` features.
  • Updated German texts. (Thank you @LeLeon)
  • Ships that participate in a successful harass operation will gain experience.
Ships gaining experience from "Harass operations" should ease the task of obtaining a 3* pilot to assign as "Corsair".
If any of you have used "Corsairs", I'm eager to know what you think about them :wink:

I'm planning to add an "Advanced" version of the "Corsair" behavior for 4* pilots, but first I want to know how they feel right now before changing anything.

As always, feedback and bug reports are welcome!

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

Re: [MOD] Better piracy

Post by Scoob » Sat, 23. May 20, 00:53

Cool, thanks for the update.

I'll try to get some old-school bails with a couple of Wingmen helping me out and test their levelling speed. I can then progress to setting up a Corsair or two.

I'm at the point in the game where I'm not personally attacking S and M-Class ships so much. However, if my prior "bailing team" of wingmen had levelled up more - as the would now - it'd be a natural progression to let the AI (Corsair) take over. So, I'm keen to see it in action.

This really is a very good Mod you've created here, really fits in with my early and later-game play style.

Scoob.

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [MOD] Better piracy

Post by XTC0R » Sat, 23. May 20, 16:31

Hi,

thanks for the mod. Really like it!
I tried the Corsair behavior with a 5 star Captain on a Behemoth + 4 Subordinates which have also one subordinate. All set to defend and the Behemoth has the Corsair behavior. So far they always killed the ship.

What would be a nice addition is the possibilty to set which factions you want to use the corsair behavior on.

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Sat, 23. May 20, 18:01

XTC0R wrote:
Sat, 23. May 20, 16:31
...
Behemoth + 4 Subordinates which have also one subordinate.
...
So far they always killed the ship.
...
That's an absolute overkill! No doubt they will obliterate absolutely everything they engage!

Try downgrading it to one M ship with 2 or 3 S ships as subordinates
Also avoid plasma, shotgun, missiles, torpedos or any other high damage weapons, prefer Ion and mk1 weaponry in general.

Remember, you want to scare a merchant, not to take over a sector!

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [MOD] Better piracy

Post by XTC0R » Sat, 23. May 20, 20:44

Alberto.Rota wrote:
Sat, 23. May 20, 18:01
XTC0R wrote:
Sat, 23. May 20, 16:31
...
Behemoth + 4 Subordinates which have also one subordinate.
...
So far they always killed the ship.
...
That's an absolute overkill! No doubt they will obliterate absolutely everything they engage!

Try downgrading it to one M ship with 2 or 3 S ships as subordinates
Also avoid plasma, shotgun, missiles, torpedos or any other high damage weapons, prefer Ion and mk1 weaponry in general.

Remember, you want to scare a merchant, not to take over a sector!
I wanted to capture some Buffalos, they are quite strong IS. So I trought it would be OK. Will btry with a smaller fleet :)

xWolfzx
Posts: 181
Joined: Fri, 14. Aug 09, 07:46
x4

Re: [MOD] Better piracy

Post by xWolfzx » Sun, 24. May 20, 17:52

This is a nice mod, question, would it be possible for NPC to cause other NPC to bail (I.e. an Argon ship forcing a HOP ship to bail in battle?)

shovelmonkey
Posts: 152
Joined: Wed, 29. Feb 12, 17:34
x4

Re: [MOD] Better piracy

Post by shovelmonkey » Mon, 25. May 20, 17:14

So after having used this the past few days, my observations:


Would be nice to designate who I want the corsair to prey on. Right now it seems standings based with them going after anyone -15 or below. Just for example though, maybe I'm trying to improve relations with an enemy but I'd like them to target Teladi who are positive or neutral. Maybe that's what you are thinking of adding into your 4 star behaviour?


Currently it seem difficult for them to catch anything. I stick them in a traffic lane by a station and generally ships will travel drive right by them. By the time the AI starts to attack the target is out of range, but my corsair continues to pursue unless manually cancelled. Make sure you cancel any subordinates as well as simply cancelling the commander doesn't reset all ships in the fleet. In one instance I wasn't paying close attention and found my little corsair fleet of 1 m and 3 s' clear across the map chasing a target they were never going to catch.

I'm unsure what to do with subordinates in general. If I am flying and select the harass options my subordinates will invariably destroy the target regardless of whether they are set to defend, attack, or intercept. If I set the AI to corsair and let it do it's thing the fighters I have attached as escorts won't kill the target but generally just derp around and make a nuisance of themselves by chasing target for many sectors for nothing unless manually told otherwise.

So all in all I really like the concept of the corsair but currently it requires so much micromanagement that I might as well just do harass operations myself solo in an M or heavy fighter.

Your harass command works really well, however, love it!
“Not even once has life or the weather complained about a human being.”
― Mokokoma Mokhonoana

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Mon, 25. May 20, 17:46

xWolfzx wrote:
Sun, 24. May 20, 17:52
This is a nice mod, question, would it be possible for NPC to cause other NPC to bail (I.e. an Argon ship forcing a HOP ship to bail in battle?)
It is possible from a technical perspective to do it but it is not part of this mod.
Given the size of the universe, and the number of engagements that take place, even a 1% NPC to NPC bail rate will end up with the full universe full of empty ships, witch not rewarding nor funny :gruebel:

XTC0R
Posts: 401
Joined: Sat, 1. Dec 18, 19:58
x4

Re: [MOD] Better piracy

Post by XTC0R » Mon, 25. May 20, 18:19

Alberto.Rota wrote:
Mon, 25. May 20, 17:46
xWolfzx wrote:
Sun, 24. May 20, 17:52
This is a nice mod, question, would it be possible for NPC to cause other NPC to bail (I.e. an Argon ship forcing a HOP ship to bail in battle?)
It is possible from a technical perspective to do it but it is not part of this mod.
Given the size of the universe, and the number of engagements that take place, even a 1% NPC to NPC bail rate will end up with the full universe full of empty ships, witch not rewarding nor funny :gruebel:
Why not led the attacking faction take over the ship and if not possible some pirates will take it as soon as they fly close to it.

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Mon, 25. May 20, 18:29

Wow, a lot of good feedback there, let me go point by point:
shovelmonkey wrote:
Mon, 25. May 20, 17:14
Would be nice to designate who I want the corsair to prey on. Right now it seems standings based with them going after anyone -15 or below.
It's doable, but no vanilla command at all allows it (Patrol, Police, Protect position/station, etc.), because while nice in concept, it will add a lot of complexity to how to use the order, both conceptual and UX complexity, just for a very few gain.

Not on my roadmap.
shovelmonkey wrote:
Mon, 25. May 20, 17:14
Currently, it seems difficult for them to catch anything.
That's a vanilla issue indeed... If you set your traders to "Flee from pirates", how many of them will you lose? (Spoiler: less than 5% of them.)
Combat AI doesn't know how to handle fleeing/moving targets and will fail to engage them almost every single time unless both of them are actively attacking each other.

I can "fix" this by making your Corsair (Wing leader) to "taunt" his target so that it forcefully engage in combat against your Corsair (Adding an attack order to the top of their list), but then we have the other situation, no-one will never ever be able to scape...
Maybe I can make it work only sometimes, depending on pilot skill (30% for 3*, 60% for 4*, 90% for 5*)?

I will try to add something like this for the next update if it makes sense, feedback and opinions are welcome.
shovelmonkey wrote:
Mon, 25. May 20, 17:14
I stick them in a traffic lane by a station and generally, ships will travel drive right by them.
If you were going to hijack a car, you for sure will do it while it's parked, not in the middle of the highway at full speed. :wink:
Position your corsairs near areas where your target stops, not where they pass at full speed, that will dramatically improve their success rate.
shovelmonkey wrote:
Mon, 25. May 20, 17:14
... but my corsair continues to pursue unless manually cancelled. Make sure you cancel any subordinates as well as simply cancelling the commander doesn't reset all ships in the fleet. In one instance I wasn't paying close attention and found my little corsair fleet of 1 m and 3 s' clear across the map chasing a target they were never going to catch.
They will only pursue it within the same sector, they will never pursue it further, make sure that you have the latest version.
They will also stop if the target docks somewhere, so don't worry, you don't need to manually cancel them, they will desist and go back to the starting point.
shovelmonkey wrote:
Mon, 25. May 20, 17:14
If I am flying and select the harass options my subordinates will invariably destroy the target regardless of whether they are set to defend, attack, or intercept.
That's a symptom of you having your subordinates equipped to KILL, not to SCARE.
Try reducing the number of subordinates to 2 or 3 S ships.
Also avoid plasma, shotgun, missiles, torpedos or any other high damage weapons, prefer Ion and mk1 weaponry in general.

Remember, you want to scare a merchant, not to take over a sector!
shovelmonkey wrote:
Mon, 25. May 20, 17:14
If I set the AI to Corsair and let it do its thing, the fighters I have attached as escorts won't kill the target but generally, just derp around and make a nuisance of themselves by chasing target for many sectors for nothing unless manually told otherwise.
Make sure again that you are in the latest version, they should never ever left their sector under any circumstances.
shovelmonkey wrote:
Mon, 25. May 20, 17:14
So, all in all, I really like the concept of the corsair but currently, it requires so much micromanagement that I might as well just do harass operations myself solo in an M or heavy fighter.
Quite funny, I have exactly the opposite experience, I have 2 corsairs harassing:
  • One in HC1, in the "Argon trading station" where you start the HAT plot, 1M + 3S ships, he "Acquires" more than 20 M trading ships per hour (ZIA and HOP)
  • Other in a Telady mining sector where ZIA send his Minners/Gas ships, 1M + 2S ships, it "Acquires" around 10 M miners per hour.
That makes around 30 ships per hour without any intervention/micromanaging at all (Only going there from time to time with a ship full of marines to claim everything)
shovelmonkey wrote:
Mon, 25. May 20, 17:14
Your harass command works really well, however, love it!
Glad to hear that!

Alberto.Rota
Posts: 78
Joined: Fri, 22. Feb 13, 17:34
x4

Re: [MOD] Better piracy

Post by Alberto.Rota » Mon, 25. May 20, 18:35

XTC0R wrote:
Mon, 25. May 20, 18:19
Alberto.Rota wrote:
Mon, 25. May 20, 17:46
xWolfzx wrote:
Sun, 24. May 20, 17:52
This is a nice mod, question, would it be possible for NPC to cause other NPC to bail (I.e. an Argon ship forcing a HOP ship to bail in battle?)
It is possible from a technical perspective to do it but it is not part of this mod.
Given the size of the universe, and the number of engagements that take place, even a 1% NPC to NPC bail rate will end up with the full universe full of empty ships, witch not rewarding nor funny :gruebel:
Why not led the attacking faction take over the ship and if not possible some pirates will take it as soon as they fly close to it.
Because in the end, after coding all the things, from the NPC to NPC bailing, the attacking faction claiming, the pirate claiming and all the little involved details, you will end up where we started:
They bail, they claim, you don't notice.

You literally get nothing (Or almost nothing), because, for the player's point of view, it will be as if I haven't change anything.

Post Reply

Return to “X4: Foundations - Scripts and Modding”