So I'm trying to figure out what would it be like:
I guess it needs to modify the stargate foci effects (in file default/scripting/species/common/focus.macros), which I think just controls if a focus type can be used or not on a given planet, and the advanced stargate foci effects (in file default/scripting/species/common/advanced_focus.macros), which seems to control the actual sending/receiving of fleets, to require a minimum value for the Construction meter?
An attempt assuming Construction is the right meter and minimum value is 10:
In focus.macros:
Code: Select all
Focus
name = "FOCUS_STARGATE_SEND"
description = "FOCUS_STARGATE_SEND_DESC"
location = And [
Or [
Contains Building name = "BLD_STARGATE"
And [
Contains Building name = "BLD_TRANSFORMER"
OwnerHasTech name = "CON_STARGATE"
]
]
Construction low = 10 // ADDITION
]
graphic = "icons/focus/stargate_send.png"
Focus
name = "FOCUS_STARGATE_RECEIVE"
description = "FOCUS_STARGATE_RECEIVE_DESC"
location = And [
Or [
Contains Building name = "BLD_STARGATE"
And [
Contains Building name = "BLD_TRANSFORMER"
OwnerHasTech name = "CON_STARGATE"
]
]
Construction low = 10 // ADDITION
]
graphic = "icons/focus/stargate_receive.png"
Code: Select all
EffectsGroup
scope = And [
Fleet
OwnedBy empire = Source.Owner
ContainedBy And [
System
Contains And [
Planet
OwnedBy empire = Source.Owner
Focus type = "FOCUS_STARGATE_SEND"
Construction low = 10
]
]
]
activation = And [
Planet
Focus type = "FOCUS_STARGATE_RECEIVE"
Construction low = 10
]
stackinggroup = "STARGATE_STACK"
effects = [
GenerateSitrepMessage
message = "EFFECT_STARGATE"
label = "EFFECT_STARGATE_LABEL"
icon = "icons/focus/stargate_receive.png"
parameters = [
tag = "fleet" data = Target.ID
tag = "system" data = Source.SystemID
]
empire = Source.Owner
MoveTo destination = And [
Contains Source
System
]
]
But what would happen when a planet has the stargate focus set (to receive or send) before the Contruction meter goes belows the chosen minimum? The modification in advanced_focus.macros should make sure that the fleet sending won't occur, but I wonder if the focus should also be forced to change to (maybe) preferred focus of the planet species?
Note: untested until I advance a game to build stargates