Evac-ing to enemy planets

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Evac-ing to enemy planets

#1 Post by wobbly »

So I was recently very surprised to see my evacuated colonists settling on an enemy colony instead of my own. This only happens under unusual circumstances where your supply is strong enough to reach an enemy colony of the same race and supply is not blockaded. Whilst there are some arguments to keep it this way I don't think I like this. My preference is for evacees to only settle on friendly worlds.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Evac-ing to enemy planets

#2 Post by Oberlus »

+1

I'd like it to only be able to evacuate to supply-connected worlds:
If owner of supply is evacuation's owner or an ally, destination is an owned world if any, also through allied supply, and an allied world as second option.
If owner of supply is at peace, evacuees settle at one world of that empire.
If owner is enemy, also get the evacuees, makes more sense than killing them.

That would make evacuation not a viable late-minute scorched earth tactic.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Evac-ing to enemy planets

#3 Post by Oberlus »

Maybe simpler than what I said above:

- The evacuation can go to an owned or allied colony.
- If the system's supply is controlled by some other empire (not allied) then evacuation fails that turn (no population removal).


But I don't know how to ensure that. There is something I don't understand in the code:

Code: Select all

        EffectsGroup            // add population to connected plants with room and suitable species
            scope = NumberOf number = 1 condition = And [
                PopulationCenter
                Species name = Source.Planet.Species
                Not Object id = Source.PlanetID
                ResourceSupplyConnected empire = Source.Owner condition = Source
                Population low = 1 high = LocalCandidate.TargetPopulation - 1
                Not Contains Building name = "BLD_EVACUATION"
                Not Contains Building name = "BLD_CONC_CAMP"
            ]
            activation = Number low = 1 condition = And [
                PopulationCenter
                Species name = Source.Planet.Species
                Not Object id = Source.PlanetID
                ResourceSupplyConnected empire = Source.Owner condition = Source
                Population low = 1 high = LocalCandidate.TargetPopulation - 1
            ]
I still don't understand many things in FOCS.

Source is the evacuation building, not the planet where it is built, right?

The scope selects the objects that could be affected by the effects, the Targets. In this case, the candidate objects must meet all these (among others):
1. Species name = Source.Planet.Species: Target is inhabited by the same species than the Source's planet.
2. Not Object id = Source.PlanetID: Target is not the same planet than Source's planet.
3. ResourceSupplyConnected empire = Source.Owner condition = Source: Target is supply-connected to Source through supply owned by Source's owner.

The activation is evaluated only against the source, and decides if the effects will apply or not to the Targets. In this case, if all these are met (among others):
1. Species name = Source.Planet.Species: Source is inhabited by the same species that inhabit Source's planet ???
2. Not Object id = Source.PlanetID: Source is not Source's planet ???
3. ResourceSupplyConnected empire = Source.Owner condition = Source: Source is supply connected to itself through supply owned by Source's owner ???

Since the above code works (on its way), I understand that you can query for the species of a building (activation.1).
Then, could scope.1 be also "Species name = Source.Species" instead of "Species name = Source.Planet.Species" ?

I don't understand the point of activation.2 (Evacuation building could never be a planet, right?), and activation.3 (Source is always supply-connected to itself, right?).
Are they right or a lingering copy-paste from scope?

And the main doubt, the one related to the OP:

The evacuees can end up in an enemy planet if that planet is supply-connected to Source, and for that to be true Source's owner must control supply over one enemy planet.
Imagine this scenario:
- Empire A blockades system X, that has two Replicon worlds X1 and X2 of empire B.
- A invades X1 and builds evacuation to extract Replicon from X to some other Replicon colonies elsewhere.
- Some evacuees go from A-owned X1 to B-owned X2 and A gets WTF.

So I'll try adding

Code: Select all

OwnedBy affiliation = AllyOf empire = Source.Owner
to the scope condition and see what happens.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Evac-ing to enemy planets

#4 Post by Geoff the Medio »

Oberlus wrote: Tue Jun 08, 2021 10:26 amSource is the evacuation building, not the planet where it is built, right?
Yes, assuming this script is in the building type definition.
1. Species name = Source.Planet.Species: Source is inhabited by the same species that inhabit Source's planet ???
The Species condition will match buildings if their planet has the specified species, so I think this just ensures that that the building's planet has a species... Which would be reasonable to require for evacuating that species.
2. Not Object id = Source.PlanetID: Source is not Source's planet ???
I don't think this does anything, as a planet's ID is never going to equal a building's ID.
3. ResourceSupplyConnected empire = Source.Owner condition = Source: Source is supply connected to itself through supply owned by Source's owner ???
Yes.
Since the above code works (on its way), I understand that you can query for the species of a building (activation.1).
Then, could scope.1 be also "Species name = Source.Species" instead of "Species name = Source.Planet.Species" ?
There's a difference between something like a condition Species name = "SP_HUMAN which will match buildings that are on planets with the specified species, and querying Source.Species which will return nothing for buildings, regardless of their planet's species. Quirk of the implementation as of now.
(Source is always supply-connected to itself, right?).
Possibly not, if another empire's supply controls a system.
Are they right or a lingering copy-paste from scope?
Possibly partly.

Post Reply