X4: Foundations

X4: Foundations

Sector Patrol
Meme Turtle 2022 年 7 月 13 日 下午 4:41
Temp fix for attacks on trade ships
Patrol scripts will issue attacks on enemy traders which can cause reputation loss in non-player sectors. Ideally, the script should respect reputation AND fire control authorization overrides. But as a quick fix you can add extra option to only attack enemy combat ships.

Assuming you've added this new option $fs_ignore_trade this is how you can use it to filter ships to combat only(in sectorpatrol.xml L:115):
<do_if value="$fs_ignore_trade"> <find_ship name="$ships" space="this.ship.sector" class="$classes" recursive="true" multiple="true" primarypurpose="purpose.fight"/> </do_if> <do_else> <find_ship name="$ships" space="this.ship.sector" class="$classes" recursive="true" multiple="true"/> </do_else>
< >
正在显示第 1 - 12 条,共 12 条留言
aweagle 2022 年 8 月 15 日 下午 1:09 
Could you just post your ext 01 dat? I added the parameter but it still doesn't load.
aweagle 2022 年 8 月 15 日 下午 1:46 
Thanks. Loads and also seems to be working properly with ships still aiming for SCA but not starting any wars
kananesgi 2022 年 10 月 14 日 上午 9:51 
How do I use this? I tried downloading a tool from egosoft for X:R that was said to work in X4, but when I try to extract the .cat file, it throws an error, and the .dat file doesn't do anything in it. I'm far from a mod maker myself, no idea what I'm doing, but I really want this to work.
Meme Turtle 2022 年 10 月 14 日 上午 10:00 
cat/dat are just archives, you can use unpacked versions of a mod without issues. Download the archive with link I provided, place it into the extensions folder and remove the original sector patrol mod from extensions.
kananesgi 2022 年 10 月 14 日 上午 10:04 
ah, ok, I thought I needed to replace the sectorpatrol.xml file within the original mod, so I needed to extract it first. I finally figured out how to do that (bonehead mistake, needed both the cat and dat in the same directory :facepalm). Now I see what I need to do. Thanks.
anaris 2023 年 4 月 6 日 上午 6:31 
wait so delete original fs_pat folder and replace ti with this f_pat folder? doesn't seem to show up in orders if i do that, am I misunderstanding?
Meme Turtle 2023 年 4 月 6 日 上午 10:13 
引用自 anaris
wait so delete original fs_pat folder and replace ti with this f_pat folder? doesn't seem to show up in orders if i do that, am I misunderstanding?

If you simply copy it over it's possible you have both cat/dat achives of the original mod and the updated version.

Unsubscribe from the original mod, remove fs_pat folder in extensions, copy fs_pat folder from the archive to extensions, check the mod is enabled in extensions. In the game the mod should have the same version and description as the original, the only difference is this new option to not attack trade ships.

Alternatively, you can ditch this mod as it's no longer maintained and use reaction force instead. Or try to make use of position defence from 6.0(when it's released).
Mortlock 2024 年 1 月 23 日 上午 1:36 
Is this fixed in the most up to date version on steam?
Nesh 2024 年 6 月 1 日 上午 10:44 
引用自 Meme Turtle
No, but I can share the extracted archive:
https://drive.google.com/file/d/1oOAVBDn4Yca6e-9y52d55W5tC-tEWexr/view?usp=sharing

(sort of necro) Applied patch to the latest (1.11?) version I got from nexus will see if it still works.

If anyone is interested here's the patch:

diff --git a/aiscripts/sectorpatrol.xml b/aiscripts/sectorpatrol.xml index 4024502..b2c026a 100644 --- a/aiscripts/sectorpatrol.xml +++ b/aiscripts/sectorpatrol.xml @@ -8,6 +8,7 @@ <param name="fs_attack_l" type="bool" default="false" text="{314155, 11}"/> <param name="fs_attack_m" type="bool" default="true" text="{314155, 12}"/> <param name="fs_attack_s" type="bool" default="true" text="{314155, 13}"/> + <param name="fs_ignore_trade" type="bool" default="true" text="{314155, 17}" /> <param name="fs_pirates" type="bool" default="true" text="{314155, 8}"/> <param name="fs_pursue" type="bool" default="false" text="{314155, 9}"/> <param name="fs_noboost" type="bool" default="false" text="{314155, 7}"/> @@ -111,7 +112,13 @@ <debug_to_file directory="'fs_pat'" name="'debug'" text="'%s'.[$classes]" output="false" append="true"/> + <do_if value="$fs_ignore_trade"> + <find_ship name="$ships" space="this.ship.sector" class="$classes" recursive="true" multiple="true" primarypurpose="purpose.fight"/> + </do_if> + <do_else> <find_ship name="$ships" space="this.ship.sector" class="$classes" recursive="true" multiple="true"/> + </do_else> + <do_all exact="$ships.count" counter="$si"> <set_value name="$ship" exact="$ships.{$si}"/>
Nesh 2024 年 6 月 1 日 上午 11:10 
Just saw it, missed line in t\0001.xml:

<t id="18">Ignore trade ships</t>

Also needs updating in aiscripts\sectorpatrol.xml as id 17 is already taken in 1.11

<param name="fs_ignore_trade" type="bool" default="true" text="{314155, 18}" />
dubius 2024 年 6 月 21 日 下午 11:53 
Much appreciated! Not sure why this fix hasn't been integrated into the mod yet by the author but this will save me a lot of frustration. I've been reloading my save every time this patrol scrip plunges me into war for attacking friendly traders
< >
正在显示第 1 - 12 条,共 12 条留言
每页显示数: 1530 50