Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

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

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

Post Reply
random_x4_player
Posts: 8
Joined: Sat, 15. Apr 23, 17:46

Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by random_x4_player » Sat, 15. Apr 23, 18:01

I was shaking my head on AI faction civilian ships walking to the slaughterhouse just because it's a shortcut to their destination, so I investigated what to do.

Basically I wanted viewtopic.php?t=428311 "Blacklist Xenon sectors for AI-owned civilian ships" as a feature.

I edited my save xml file as follows:

created a new blacklist element to the universe blacklists element like:

Code: Select all

<blacklist id="4" owner="player" type="sectortravel" name="Special AI Faction Default Civilian">
<owner factions="khaak xenon" relation="enemy"/>
</blacklist>
added this blacklists element which makes the blacklist default for civilian ships for each faction element that is at perma-war with khaak and xenon:

Code: Select all

<blacklists>
<blacklist type="sectortravel" civilian="4"/>
</blacklists>
Then I spent 10 minutes staring at a shortcut gate and it seems to work.

Can anyone else confirm this has just made the AI factions smarter and a little bit more independent? This would mean AI factions could also be made to obey other global order categories like trade rules.

Is there a way to edit blacklists and assign them to factions as a mod somehow?

Next I'm considering just giving the blacklist to everyone without the factions filter and just the "avoid enemy sectors when traveling" attribute. Not sure if it's good or bad for a splintered xenocidal faction like xenon. Currently I'm commonly seeing xenon riding the ring highway eagerly but haven't really investigated why.

magitsu
Posts: 399
Joined: Wed, 12. Dec 18, 21:59
x4

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by magitsu » Sun, 16. Apr 23, 10:43

I think the opposite should also be investigated / thought: should Xenon miners wander as much outside as they currently do? For example Getsu Fune and The Void is a slaughterhouse for their miners, when they could realistically get many of their needs at Savage Spur / Frontier End. Since the amount of jobs is capped, if they didn't wander and spend time dying their faction performance could improve.

In any case this kind of changes require significant testing. Some things probably don't get affected too much (for example ships forcefully teleported by the Encounters mechanic might still know what to do even if they end up in a blacklisted sector), but there might be surprises.

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

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by Scoob » Sun, 16. Apr 23, 12:26

This could be quite revolutionary for X-Games as civilian ships have ALWAYS freely wandered into sectors where they have literally zero hope of survival, purely because it's the shortest route. First mods, then actual game features were introduced to help prevent player assets doing such silly things - like Blacklists we have in X4 now - but the vessels of other factions still regularly get themselves killed. That said, with X4, the addition of the travel drive can sometimes make passing through a hostile sector a practical option. IF the ship can enter the sector already in travel mode and zoom by any gate-camping ships...always a risk though, one I never let my own AI-controlled ships take, unless it's an invasion fleet.

As an aside, I have games in progress in both X2 and X3FL, the ships of other factions are dying at an alarming rate trying to pass through certain Xenon and Pirate sectors.

magitsu
Posts: 399
Joined: Wed, 12. Dec 18, 21:59
x4

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by magitsu » Sun, 16. Apr 23, 16:56

Scoob wrote:
Sun, 16. Apr 23, 12:26
This could be quite revolutionary for X-Games as civilian ships have ALWAYS freely wandered into sectors where they have literally zero hope of survival
Not just travel, which is mostly trading related. Also potential activities: scrap ships (Teuta & Manticore) and builders, not just miners.

In certain ways it's great that they are reckless. Activity increases immersion, something to do for the player and plentiful ship losses are needed for the economy. The AI ships are also very interested in serving your stations provided there's a buy order and money. They would probably lose some of those benefits if more strict risk calculation would be introduced. But some losses probably should be prevented compared to the time it takes for the game to replace them.

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

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by Scoob » Sun, 16. Apr 23, 18:08

Perhaps the lower-level the Captain / Crew of a Faction-owned vessel, the more likely they are to "think they know best" and attempt to travel where they should not. Or, conversely, a particularly high-level Captain / Crew might be smart enough to route through such sectors. There are options here and seeing streams of civilian traffic being obliterated is a little silly. Game should dynamically flag an area as off-limits if lots of ships have died there.

While it'd be good to see smarter behaviour from the various Factions, I'm happy I can (generally, bugs aside) ensure my ships don't do anything too silly.

Buzz2005
Posts: 2184
Joined: Sat, 26. Feb 05, 01:47
x4

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by Buzz2005 » Sun, 16. Apr 23, 19:58

this could most likely kill the economy,all.of a sudden very little ships are lost and yards are getting full then again those full yards could build military very fast and have great fighting going on :gruebel:

xenons could get boosted as well
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

random_x4_player
Posts: 8
Joined: Sat, 15. Apr 23, 17:46

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by random_x4_player » Sun, 16. Apr 23, 20:21

Started a new game in which I instantly saved and edited in

Code: Select all

<blacklist id="1" owner="player" type="sectortravel" name="Special AI Faction Default Civilian">
<owner relation="enemy"/>
</blacklist>
as the blacklist, and then added it to each faction in the savefile

Code: Select all

<blacklists>
<blacklist type="sectortravel" civilian="1"/>
</blacklists>
In the first few hours I've posted scouts on 5 xenon entry gates and atleast there's no mountain of wrecks seen. I assume xenon might actually need some help considering the
Spoiler
Show
resource situation in emperors pride. Other pockets should be adequately stocked with resources.
There also has not been the usual hull parts global shortage and I've been able to build my initial ships immediately.

magitsu
Posts: 399
Joined: Wed, 12. Dec 18, 21:59
x4

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by magitsu » Sun, 16. Apr 23, 22:20

Buzz2005 wrote:
Sun, 16. Apr 23, 19:58
this could most likely kill the economy,all.of a sudden very little ships are lost and yards are getting full then again those full yards could build military very fast and have great fighting going on :gruebel:
xenons could get boosted as well
It would probably require transitioning towards Intervention fleet mechanisms, which TER already has (that 1 allowed fleet at a time). But it could be interesting to see pooling of ships and then getting sent as an armada. Maybe with Faction Enhancer type mod functionality. But this is probably a bit too streamlined / too strictly wargame focus for X4 in general. For mod users still very intesting.

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by Mysterial » Mon, 17. Apr 23, 20:30

FWIW, I don't know if they've since fixed this, but as of 4.something when I implemented this for FE, blacklists that use relation checks (blacklist all enemies, etc) are always relative to the player, not the faction of the ship that has the blacklist. So you can't make a generic "don't travel to hostile territory" for the AI, you have to explicitly specify the factions.

random_x4_player
Posts: 8
Joined: Sat, 15. Apr 23, 17:46

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by random_x4_player » Tue, 18. Apr 23, 00:51

Mysterial wrote:
Mon, 17. Apr 23, 20:30
FWIW, I don't know if they've since fixed this, but as of 4.something when I implemented this for FE, blacklists that use relation checks (blacklist all enemies, etc) are always relative to the player, not the faction of the ship that has the blacklist. So you can't make a generic "don't travel to hostile territory" for the AI, you have to explicitly specify the factions.
That's pretty important for correct functionality. I'll try another game with specific systems disabled for specific factions. Is that controlled by the owner attribute or just hardcoded regardless?

random_x4_player
Posts: 8
Joined: Sat, 15. Apr 23, 17:46

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by random_x4_player » Tue, 18. Apr 23, 15:00

I installed FE (all 4 modules) and am seeing this blacklist in my save:

Code: Select all

<blacklist id="1" owner="player" type="sectortravel" name="Internal NPC Blacklist">
<owner factions="xenon"/>
</blacklist>
but no faction has this blacklist as default. According to mod description "Miners really won't enter enemy sectors for resources unless there is no other option" you assign it to only mining ships specifically?

Are there any other rules to help trader travel as they were most of the wrecks I was seeing in my initial game? Or reasons why only mining ships should be affected?

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by Mysterial » Tue, 18. Apr 23, 15:53

I set it individually to trade ships when their destination isn't explicitly a Xenon sector (i.e. building or supplying the war stations)

It's possible I don't have to be that conservative anymore but at the time there were issues if ships were ordered to go someplace only reachable through blacklisted sectors. Also, I thought some cases of military ships were arguable - for example Argon and Split sometimes send warships to each other through Xenon territory, but that can help suppress the Xenon in Tharka's Cascade so is it really a problem?

random_x4_player
Posts: 8
Joined: Sat, 15. Apr 23, 17:46

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by random_x4_player » Tue, 18. Apr 23, 20:28

Mysterial wrote:
Tue, 18. Apr 23, 15:53
I set it individually to trade ships when their destination isn't explicitly a Xenon sector (i.e. building or supplying the war stations)

It's possible I don't have to be that conservative anymore but at the time there were issues if ships were ordered to go someplace only reachable through blacklisted sectors.
I'm not really experienced in the details of X4 features, but to my understanding if civilian destination is in a blacklisted sector it should be governed by the activity blacklist instead. With travel blacklist affecting only the sectors in the middle of the journey.

Could be I've totally misunderstood the activity blacklist feature. Also as you mentioned earlier we're hacking here and things might only work correctly for the player faction. Also with a travel blacklist you would disallow activities deeper inside enemy territory and require factions to be active in border sectors only.

In any case now that I've discovered your mod and I clearly haven't discovered anything new to the community I can leave the balancing act to your mod. Thank you for contributing into making this game playable for us perfectionists.

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

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by docwho83 » Sat, 20. May 23, 15:44

Ok I would like to try this myself but would prefer a mod to load it in as it would make is I could just play.

Trying to figure it out myself but not seaming to get it to que up and run.
My Mods
RepairLasers Player controlled drone Also on steam
[Minefield] fell affliction minefield removed Also on steam
[Buildmodule] add research for buildmodule leak steals

user1679
Posts: 761
Joined: Fri, 20. Jul 18, 23:20

Re: Did I just figure out how to "Blacklist Xenon sectors for AI-owned civilian ships"?

Post by user1679 » Thu, 1. Jun 23, 22:28

The problem with simply blacklisting Xenon from the AI is when you have sectors that only have one gate. For example, Silent Witness XII could be completely cut off if the Xenon take over Silent Witness XI and XI could be cut off if they take over Silent Witness. There's also Memory of Profit X, Sacred Relic and others.

I think the AI should be able to blacklist Xenon sectors but they should also be sending their traders and miners with armed escorts. Too often I see traders skimming across space and miners poking asteroids with no military escort. It would be more immersive if the AI could make decisions based on their military power wether to blacklist or escort their own ships.

Post Reply

Return to “X4: Foundations - Scripts and Modding”