Page 1 of 1

Where to anchor a global, empire-less effect?

Posted: Sat Jun 20, 2020 9:55 am
by Oberlus
AFAICT, most (or probably all) FOCS effects are triggered from techs or populated ships/planets owned by empires.

For example, the -50% troop malus for outposts is triggered from the species troop traits (NO/BAD/AVERAGE/GOOD/GREAT/ULTIMATE_DEFENSE_TROOPS), which in turn is triggered from the species themselves.

As Ophiuchus and Geoff explain, If an empire had no species (no ships, no populated planets), the malus would not be applied to its outposts. A possible solution would be to anchor that effect (AFTER_SPECIES_MULTIPLICATOR_TROOPS) to a tech instead of to species.

Another problematic case is about monsters producing resources: since they don't have a species, the STANDARD_METER_GROWTH effect (which is anchored at the species definitions) does not apply to them. The solution in that PR is a bit hacky: do not let monsters (owned and unowned) to produce resources. The STANDARD_METER_GROWTH could be attached to a tech instead of to species, and then owned monsters could do things like producing resources. However, would that work for unowned natives? AFAIK, techs are attached to empires, and natives (or rebelled colonies, when we get that) do not have an empire.

So, could we get some sort of universal/global macro that applies to everything in the universe regardless of empires, species, techs, etc.?

Re: Where to anchor a global, empire-less effect?

Posted: Sat Jun 20, 2020 4:50 pm
by Geoff the Medio
Similar effects are attached to hulls, occasionally set up to only use the hull as a source if the ship isn't owned by an empire.

Re: Where to anchor a global, empire-less effect?

Posted: Sat Jun 20, 2020 5:13 pm
by Oberlus
Geoff the Medio wrote: Sat Jun 20, 2020 4:50 pm Similar effects are attached to hulls, occasionally set up to only use the hull as a source if the ship isn't owned by an empire.
And what if we want an effect for an unowned outpost? Like a native planet bombarded to zero pop.

Re: Where to anchor a global, empire-less effect?

Posted: Tue Jun 23, 2020 2:27 pm
by Ophiuchus
Oberlus wrote: Sat Jun 20, 2020 5:13 pm
Geoff the Medio wrote: Sat Jun 20, 2020 4:50 pm Similar effects are attached to hulls, occasionally set up to only use the hull as a source if the ship isn't owned by an empire.?).
And what if we want an effect for an unowned outpost? Like a native planet bombarded to zero pop.
Yes, this is missing functionality. It can currently best be simulated by using a tech based effect because those are guaranteed to be checked as long as there is an empire in the galaxy. Using the right source/activation and stackinggroups you can prevent too much cpu overhead.

I guess you could put up a feature request for effects triggered exactly once per turn (?turn/galaxy/universal effects?). (But as there are workarounds, this wont be high priority)

Re: Where to anchor a global, empire-less effect?

Posted: Tue Jun 23, 2020 4:57 pm
by Geoff the Medio
Oberlus wrote: Sat Jun 20, 2020 5:13 pmAnd what if we want an effect for an unowned outpost? Like a native planet bombarded to zero pop.
An unowned outpost isn't a thing. If it had an owner, it would be an outpost for that empire. If it had population but was still unowned, it'd be a neutral native-populated planet. Unowned and no population is just a planet.

If you want to track that it used to be owned but now isn't, then there'd need to be some other way to keep track of that... perhaps a special?

If you want effects that act on unowned planets everywhere regardless of position and with no owner, and not as a result of any tech or building or similar, there there's no clean way to do that. Ophiuchus' suggestion to put it into a tech and apply suitable limits to prevent double-application could work. There's not presently much need for it, though. There used to be a few "inherent" meter contributions, not implemented as effects but rather a baseline when resetting an object, mainly to stealth I think, but it looks like most of those have been removed as well.