This is a big multipart request on the horrible state of encounter spawning. Right now the only possibilities are lore-breaking sloppy spawns, or creating an absurd amount of scripts and stationTypes to try to cover all the possible cases, of which there are far too many.

Right now we can specify system criteria... for stations we add ourselves.
And those criteria are basically a series of AND statements
For example: +frontier, -solariteSpace = "frontier AND NOT solariteSpace"

We have no way of expressing more complex logic, or heck, even just OR or XOR statements. If a system like this were added, it would also be backwards compatible because they use totally different operators:
"frontier && (coalitionSpace | domainSpace) && ~capital"
This will have a station that spawns in the non-capital core systems of the coalition and domain's territories.

We also need a way of preventing stations that we didnt create with certain attributes spawning in certain systems.
For example, I might not want any ares stations popping up in the Frontier, and only a very rare chance of ventari, but a very high chance of TSB-specific stations vs. generic stations, so I'd set this in the system's node attributes.
stationAttributes="~ares; ---ventari; +++TSB"

johnbwatson 1 Oct 2016:

That'd be useful. The basic AND/OR logic should definitely be added for things like this.

To be honest, I don't think the encounter/guard logic is designed to be sufficient to do some of the really cool things I'd want them to do - if I were to design a new faction, I'd want to script in custom behavior for anything it spawns. That said, some steps in that direction that would help modders that don't want to do as much scripting would be:

* An ability to specify a maximum to the number of ships that can be destroyed for a given encounter or guard item(IE: A Ranx fortress can only lose 3 dreadnoughts before it stops calling for more).

* A max wander radius for wandering ships and, as I've requested before, an option for them to avoid enemy stations.

* A script run whenever an encounter is spawned, so that the station can do something with it if it wants(like keep track of its patrols and send some guards to avenge them if they get killed).

wolfy 2 Oct 2016:

Guard logic is separate from encounter logic. I actually plan to create a library that handles stuff like that.

johnbwatson 3 Oct 2016:

Sounds like something worth having. Best of luck!

george moromisato 9 Nov 2018:

Implemented in 1.8 Beta 4. See: Encounter Guidelines