Piracy Deterent exact requirements

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

X-Tie
Posts: 730
Joined: Wed, 16. May 07, 20:53
x4

Re: Piracy Deterent exact requirements

Post by X-Tie »

Koizuki wrote: Mon, 8. Jul 24, 07:49
Correct, this goes for any ships that can plunder you, meaning all pirate factions.

In practice though, SCA, BUC, and YAK, will not be able to be pacified by bringing their reputation up for a long time, because YAK are difficult to secure docking rights to early in the game, not to mention even getting to them to begin with, and SCA/BUC reputations are locked until fairly late-game things happen.
Those later-game things are:
Show
the start of a very expensive Terraforming mission for SCA, the ability to progress partway through the Paranid plotline for BUC, and the ability to reach the YAK base deep inside Xenon territory during the latter part of the Terran's Yaki Investigation plotline. At that point, the Yaki must grant you docking access to speak with their representative, and you can initiate trades from there to raise them to +10 pre-emptively.
However, the others are definitely possible to be pacified with varying amounts of effort because their reputations are not locked.
HAT will very quickly get to at least +10 (the point where the faction switches from 'neutral' to 'friendly') just by progressing the HAT plotline, but otherwise can be raised by doing missions and trading with them, and will stop plundering you as a result.
VIG, as far as I'm aware, start at -5 with every (or almost every) start scenario, which means you still have docking permissions with them, making it very simple to trade with them until +10 so they stop plundering you. Just avoid Food and Water.
FAF is also unlocked, but unfortunately do not own any stations, making them the most difficult to pacify, relatively speaking. However, it is still possible if you scan signal leaks at FRF stations looking for FAF criminal missions. The simplest ones are the Passenger Transport and Station Hacking missions, as they will not piss anyone else off, and Boarding missions may be attempted a little later in the game as they should theoretically not involve permanent reputation loss if done properly (albeit mildly exploity.)

In all cases they will stop plundering you once you reach at least +10 with them. It also says as much in the faction reputation levels screen if you click on each of the above factions' names.
I don't even remember BUC ever attacking me :lol: ... As for the others, I'm done with all of that so actually now all that remains are the pesky SCA. I thought that just by doing missions for them, you could up your rep and get them friendly? Or do you need to do that "project" for them first? I'm stuck doing the hardest one for ANT to try and help them against the Terran right now. Question though: when I did check that "project" for SCA, it mentioned that piracy gets reduced - so does this mean only for you? I understood it as reduced piracy altogether in the universe, which isn't what I want and why I haven't done it.
TheDeliveryMan wrote: Mon, 8. Jul 24, 07:16 Yes, pirate factions like VIG or FAF stop pirating you if you have +10 rep. Unfortunately SCA rep is locked at -5 until a certain late game project.
EDIT: just read your reply - I guess that answers my above question, no point in doing missions for them then unless you've done it already. I also forgot about the FAF :P ... Seems like I've made too many friends along the way, but as a Lord of War that's how I like it - if I can be friends with everyone and sell everyone my guns, I'm a happy bunny.
Koizuki
Posts: 367
Joined: Sat, 17. Feb 24, 01:29

Re: Piracy Deterent exact requirements

Post by Koizuki »

X-Tie wrote: Sun, 14. Jul 24, 21:44 I don't even remember BUC ever attacking me :lol: ...
BUC should only attack if you either place a satellite in their specific sectors where a Lost Property Office resides (in which chase, they spawn fighters whose only task is to destroy said satellite, and they turn around and retreat immediately if you remove the satellite before they reach it,) or if you have a station with non-mining wares, and/or non-miraged transports/freighters operating in those sectors, in which case they operate basically like the SCA -- plundering transports and hacking the stations from time to time, except with their S/M ships since I don't think BUC ever fields any Destroyers of their own. They're mostly a non-issue otherwise because they rarely ever leave their own sectors to plunder anything else.
X-Tie wrote: Sun, 14. Jul 24, 21:44 Question though: when I did check that "project" for SCA, it mentioned that piracy gets reduced - so does this mean only for you? I understood it as reduced piracy altogether in the universe, which isn't what I want and why I haven't done it.
You've found the answer for the other question already, so I'll focus on this one.

I should preface with the fact that I have not actually done that project myself yet, either, so I'm not entirely sure of the specifics of the changes it brings about.
However, I was also curious as to what the purported changes actually mean, so I took a quick look through the md/terraforming.xml file to see what I could figure out.
I suppose these specifics might technically be spoilers, so I'll put everything into a spoiler block; Those looking for a basic answer can skip this block entirely and go to the end, as there won't be any more nesting of details. Again, this is as of v7.00 Public Release:
SCA Terraforming Details
Show
Once again, I should stress that I have not done this project yet, so I'm not 100% certain how precise this will be, and I do invite anyone who has done it and remember the exact details to point out if I've made any mistakes in the next section.

That said, looking at the code of this project, it appears that there exists 3 "trigger steps" throughout the SCA Terraforming process where things happen.

Part A:

Code: Select all

            <!--Objective cues-->
            <cue name="Terraforming_ScalePlateGreen_Milestone_1" version="1">
              <conditions>
                <event_terraforming_project_succeeded cluster="$Cluster_ScalePlateGreen"/>
              </conditions>
The first trigger, which I'll call Part A here for spoiler reasons in case followup posters want to reference this section, but is internally known as "Milestone 1," appears to trigger when the first subproject is completed for Scale Plate Green. This aligns with other comments I've read that say you do not actually need to finish the whole terraforming, but that merely completing a single "objective" within it is enough to trigger a change. What does the first trigger do? Well:

Code: Select all

              <actions>
                <set_faction_relation_locked faction="faction.scaleplate" locked="false"/>
                <!-- HACK. factions with relations at exactly the friend threshold are not always friendly. -->
                <set_faction_relation faction="faction.scaleplate" otherfaction="faction.player" reason="relationchangereason.missioncompleted" value="faction.scaleplate.relation.friend.min + 0.01"/>
                <set_faction_relation_locked faction="faction.scaleplate" locked="true"/>
              </actions>
              <patch sinceversion="1">
                <set_faction_relation_locked faction="faction.scaleplate" locked="false"/>
                <set_faction_relation faction="faction.scaleplate" otherfaction="faction.player" reason="relationchangereason.missioncompleted" value="faction.scaleplate.relation.friend.min + 0.01"/>
                <do_if value="Terraforming_ScalePlateGreen_Milestone_1_UnlockRelation.state != cuestate.complete">
                  <set_faction_relation_locked faction="faction.scaleplate" locked="true"/>
                </do_if>
              </patch>
              <cues>
                <cue name="Terraforming_ScalePlateGreen_Contact_1_Ref" ref="md.LIB_Dialog.Speak_Actor">
                  <param name="Actor"             value="$ScalePlate_Contact"/>
                  <param name="CutsceneKey"       value="table[ $key = 'ShowCharacter']"/>
                  <param name="Lines"             value="[[30503001]]"/>
                </cue>

                <cue name="Terraforming_ScalePlateGreen_Milestone_1_UnlockRelation">
                  <delay exact="5min"/>
                  <actions>
                    <set_faction_relation_locked faction="faction.scaleplate" locked="false"/>
                  </actions>
                </cue>
              </cues>
Basically, this first trigger will be where your player relations with SCA gets set to friendly / +10 (slightly more, thanks to that amusing dev note about a funny bug they have.) As noted in a previous post, once you are at +10 or higher, the pirates stop plundering you, so in effect this step will cause them to stop going after you, but they should continue going after everyone else. Player relations with SCA also get unlocked 5 minutes after what I assume is an SCA-voicecomm happens.

Part B:

Code: Select all

            <cue name="Terraforming_ScalePlateGreen_Milestone_2">
              <conditions>
                <event_terraforming_stat_changed cluster="$Cluster_ScalePlateGreen"/>
                <check_value value="$Cluster_ScalePlateGreen.terraforming.habitable"/>
              </conditions>
The next trigger, which I'm calling Part B for spoiler reasons, appears to trigger once enough projects are completed to render Scale Plate Green as "Habitable," probably the point where you can start building the many Arcologies you need for the requisite population. What it does, though, is a tad more nebulous to me, but is probably clearer to those who have done this part of the terraforming before:

Code: Select all

              <actions>
                <add_faction_relation faction="faction.scaleplate" otherfaction="faction.player" reason="relationchangereason.missioncompleted" value="0.1"/>
                <create_group groupname="$CommandeeredLPlunderers"/>
              </actions>
              <cues>
                <cue name="Terraforming_ScalePlateGreen_Contact_2_Ref" ref="md.LIB_Dialog.Speak_Actor">
                  <param name="Actor"             value="$ScalePlate_Contact"/>
                  <param name="CutsceneKey"       value="table[ $key = 'ShowCharacter']"/>
                  <param name="Lines"             value="[[30503002]]"/>
                </cue>

                <library name="Terraforming_ScalePlateGreen_Commandeer_Plunderer" purpose="run_actions">
                  <params>
                    <param name="Station"/>
                    <param name="ShipGroup"/>
                    <param name="DeepDebugChance"/>
                  </params>
                  <actions>
                    <find_ship name="$Ship" space="player.galaxy" job="'scaleplate_plunderer_l_cluster'" commandeerable="true"/>
                    <do_if value="$Ship.exists">
                      <commandeer_object object="$Ship"/>
                      <create_order object="$Ship" id="'ProtectStation'">
                        <param name="station" value="$Station"/>
                        <param name="debugchance" value="$DeepDebugChance"/>
                      </create_order>
                      <add_to_group groupname="$ShipGroup" object="$Ship"/>
                    </do_if>
                  </actions>
                </library>

                <cue name="Terraforming_ScalePlateGreen_Commandeer_Plunderers">
                  <actions>
                    <do_all exact="5">
                      <run_actions ref="Terraforming_ScalePlateGreen_Commandeer_Plunderer">
                        <param name="Station" value="$HQ"/>
                        <param name="ShipGroup" value="$CommandeeredLPlunderers"/>
                        <param name="DeepDebugChance" value="$DeepDebugChance"/>
                      </run_actions>
                    </do_all>
                  </actions>
                  <cues>
                    <cue name="Terraforming_ScalePlateGreen_Commandeered_Ship_Destroyed" instantiate="true">
                      <conditions>
                        <event_object_destroyed group="$CommandeeredLPlunderers"/>
                      </conditions>
                      <actions>
                        <run_actions ref="Terraforming_ScalePlateGreen_Commandeer_Plunderer">
                          <param name="Station" value="$HQ"/>
                          <param name="ShipGroup" value="$CommandeeredLPlunderers"/>
                          <param name="DeepDebugChance" value="$DeepDebugChance"/>
                        </run_actions>
                      </actions>
                    </cue>
                  </cues>
                </cue>
              </cues>
Basically, it looks like after another SCA-voicecomm, the game "commandeers" a bunch of existing SCA Destroyers and appears to reassign them to protect an HQ station, which in effect, should reduce average pirate activity across the galaxy, because there are only so many of those that can be fielded at a time, and some of them are now diverted to this new task. I'm not entirely sure about the 'Ship_Destroyed' cue, though. My guess is that if any of those now-defensive Destroyers get destroyed, the game will go and commandeer another one from elsewhere in the galaxy to replace them, in effect making sure that there are always a couple SCA Destroyers protecting that station. I'm not sure if this is the player HQ, or if it's an SCA HQ (perhaps the main SCA Pirate Base over in Hewa's Twin IV?)

Part C:

Code: Select all

            <cue name="Terraforming_ScalePlateGreen_MissionComplete" version="6">
              <conditions>
                <check_any>
                  <event_terraforming_stat_changed cluster="$Cluster_ScalePlateGreen" stat="'population'"/>
                  <event_terraforming_project_succeeded cluster="$Cluster_ScalePlateGreen" project="'res_housing_luxury'"/>
                  <event_terraforming_project_succeeded cluster="$Cluster_ScalePlateGreen" project="'agr_fields_sunrise'"/>
                </check_any>
                <check_value value="$Cluster_ScalePlateGreen.terraforming.stat.population.value ge $Terraforming_ScalePlateGreen_HousingTargetAmount"/>
                <check_value value="$Cluster_ScalePlateGreen.terraforming.project.res_housing_luxury.complete"/>
                <check_value value="$Cluster_ScalePlateGreen.terraforming.project.agr_fields_sunrise.complete"/>
              </conditions>
The final trigger, which I'm calling Part C again for spoiler reasons, looks like it triggers at the successful conclusion of the entire SCA Terraforming project. There is a lot that happens here, including the part where SCA transfers control of a whole bunch of highly-skilled, well-equipped, and highly-modded L and M ships over to the player, so I'll reduce the code snippet to the specific portion relating to the main question:

Code: Select all

                    <set_job_active job="'scaleplate_plunderer_l_cluster'" activate="false" successor="'scaleplate_plunderer_l_cluster_reduced'"/>
                    <set_job_active job="'scaleplate_plunderer_m_cluster'" activate="false"/>
                    <set_job_active job="'scaleplate_plunderer_l_cluster_reduced'" activate="true"/>
                    <!--disabling 7.0 aggressive/anarchy pirates-->
                    <set_job_active job="'scaleplate_patrol_s_cluster_anarchy_aggresive'" activate="false"/>
                    <set_job_active job="'scaleplate_patrol_m_cluster_anarchy_aggresive'" activate="false"/>
                    <set_job_active job="'scaleplate_patrol_l_cluster_anarchy_aggresive'" activate="false"/>
So, this is the part that confirms that galaxy-wide SCA piracy will be reduced (but not totally eliminated) at the conclusion of the whole SCA Terraforming project. The original M and L plunderer jobs get disabled, alongside the "aggressive" SCA patrols in the ownerless "Anarchy" sectors added in the 7.00 patch to the base game (the group defending the "Anarchy Base" is unaffected.)

What does this actually mean, and how much is it reduced by? For that, we need to check libraries/jobs.xml for the actual job definitions:

Code: Select all

  <job id="scaleplate_plunderer_l_cluster_reduced" name="{20204,4101}" startactive="false">
    <modifiers commandeerable="true"/>
    <orders>
      <order order="Plunder" default="true">
        <param name="range_internal" value="'cluster'"/>
        <param name="plundermode" value="1"/>
      </order>
    </orders>
    <category faction="scaleplate" tags="[plunderer]" size="ship_l"/>
    <quota galaxy="1" sector="1"/>
    <location class="galaxy" macro="xu_ep2_universe_macro" faction="xenon" relation="self" comparison="lt" excludedtags="anarchy"/>
    <environment buildatshipyard="false" gate="true"/>
    <basket basket="pirate_container"/>
    <ship>
      <select faction="scaleplate" tags="[plunderer]" size="ship_l"/>
      <loadout>
        <level min="0.3" max="1.0"/>
      </loadout>
      <owner exact="scaleplate" overridenpc="true"/>
    </ship>
  </job>
The "reduced" job appears to limit it to only a single SCA Destroyer, based on a galaxy quota of 1. Plunder Mode of 1 should mean this will still continue to both plunder ships and hack stations (as defined in aiscripts/order.plunder) which is the same mode as the job it replaced.

Code: Select all

  <job id="scaleplate_plunderer_l_cluster" name="{20204,4101}">
    <modifiers commandeerable="true"/>
    <orders>
      <order order="Plunder" default="true">
        <param name="range_internal" value="'cluster'"/>
        <param name="plundermode" value="1"/>
      </order>
    </orders>
    <category faction="scaleplate" tags="[plunderer]" size="ship_l"/>
    <quota galaxy="10" sector="1"/>
    
    ...
    
  <job id="scaleplate_plunderer_m_cluster" name="{20204,4301}">
    <modifiers commandeerable="true"/>
    <orders>
      <order order="Plunder" default="true">
        <param name="range_internal" value="'cluster'"/>
        <param name="plundermode" value="1"/>
      </order>
    </orders>
    <category faction="scaleplate" tags="[plunderer]" size="ship_m"/>
    <quota galaxy="9" sector="1"/>
I've truncated the two snippets here since we're mainly interested in the quota numbers, but the two "normal" jobs that get disabled and replaced by the "reduced" one here originally had quotas of 10 L-size and 9 M-size pirates (both with a Plunder Mode of 1, allowing station hacks.) That is 19 SCA Pirate jobs reduced down to 1 here. However, note that there are other SCA jobs that remain; in particular:

Code: Select all

  <job id="scaleplate_scavenger_m_cluster" name="{20204,4301}">
    <modifiers commandeerable="true"/>
    <orders>
      <order order="Plunder" default="true">
        <param name="range_internal" value="'cluster'"/>
        <param name="plundermode" value="0"/>
      </order>
    </orders>
    <category faction="scaleplate" tags="[plunderer]" size="ship_m"/>
    <quota galaxy="17" sector="1"/>
This job remains, and will still spawn up to 17 M-size SCA pirates that will continue to plunder ships. However, its Plunder Mode is 0, which means it should only target ships. I can't see any other SCA job that has a plunder mode of 1 or 2, meaning after the conclusion of the SCA Terraforming project, that single L-size plunderer is the only SCA ship that will potentially hack stations. Everything remaining should only target ships for plundering. All other jobs related to SCA trading, smuggling, escorts, deep-space encounters/spawns, etc. remain unaffected as far as I can tell.
That got fairly long, but hopefully it helps for anyone else curious in the future.

For those looking for a quick answer/summary without spoilers: Yes, piracy from the SCA will be reduced, but not eliminated, across the galaxy once the whole SCA Terraforming project is completed, and station hacking (ejecting wares into space) in particular becomes incredibly rare. However, prior to completion, and after at least one sub-project has been completed, SCA should remain at full strength, or partial strength depending on how far along the overall Terraforming process is, without bothering the player's assets.
X-Tie
Posts: 730
Joined: Wed, 16. May 07, 20:53
x4

Re: Piracy Deterent exact requirements

Post by X-Tie »

Koizuki wrote: Mon, 15. Jul 24, 01:14 That got fairly long, but hopefully it helps for anyone else curious in the future.

For those looking for a quick answer/summary without spoilers: Yes, piracy from the SCA will be reduced, but not eliminated, across the galaxy once the whole SCA Terraforming project is completed, and station hacking (ejecting wares into space) in particular becomes incredibly rare. However, prior to completion, and after at least one sub-project has been completed, SCA should remain at full strength, or partial strength depending on how far along the overall Terraforming process is, without bothering the player's assets.
Thanks for looking into it - according to those code snippets, that would make sense. However, I believe the SCA destroyers being assigned to defend the HQ is probably the player HQ, as I don't think any other station can have that tag? In any case, it looks like I now have my answer to reduce piracy towards my own ships and stations, but keep it the same for the rest of the universe :P

Regarding the BUC, I was not aware of the satellite thing - what a weird behaviour lol.

Return to “X4: Foundations”