Dead colonies still producing resources

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

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

Re: Dead colonies still producing resources

#16 Post by Geoff the Medio »

eleazar wrote:Does this seem to occur with anything besides industry and research?
Should happen for any meter with an associated target meter towards which it moves.
Actually i have some script in place added in species.txt when the evacuation building was, that is supposed to do this: (similar script for research) Why doesn't this do the trick? Is it failing because population might actually be 0.00000001?
Possibly, although if a colony has 0 population, it's converted into an outpost which has no species.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Dead colonies still producing resources

#17 Post by eleazar »

Geoff the Medio wrote:
eleazar wrote:Does this seem to occur with anything besides industry and research?
Should happen for any meter with an associated target meter towards which it moves.
What i meant to ask about is weather anybody thinks there is problem with any of the other meter on outposts.

The troop meter is theoretically set to 50% of what it otherwise would be on an outposts. It would probably be reasonable to do at least that much for shields and defenses,
Geoff the Medio wrote:
eleazar wrote:Actually i have some script in place added in species.txt when the evacuation building was, that is supposed to do this: (similar script for research) Why doesn't this do the trick? Is it failing because population might actually be 0.00000001?
Possibly, although if a colony has 0 population, it's converted into an outpost which has no species.
Now that you mention it, i don't understand why it works, but the garrison techs work on outposts, even though the bonuses are only provided in species.txt

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

Re: Dead colonies still producing resources

#18 Post by Geoff the Medio »

eleazar wrote:...i don't understand why it works, but the garrison techs work on outposts, even though the bonuses are only provided in species.txt

Code: Select all

scope = OwnedBy TheEmpire Source.Owner
This will target all the empire's owned objects, not just the source object (planet or ship with the species on it).

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: Dead colonies still producing resources

#19 Post by Bigjoe5 »

eleazar wrote:Actually i have some script in place added in species.txt when the evacuation building was, that is supposed to do this: (similar script for research) Why doesn't this do the trick? Is it failing because population might actually be 0.00000001?

Code: Select all

     EffectsGroup                    // removes residual production from a dead planet
            scope = Source
            activation = And [
                Planet
                TargetPopulation low = 0 high = 0
            ]
            effects = SetIndustry Value = 0
Either "high" or "low" works on a "strictly less than" or "strictly greater than" basis (I think it's high => strictly less than, but I don't really recall), so your script will never match any objects, as there are no planets with a TargetPopulation greater-than-or-equal-to 0, but also strictly-less-than 0.

Another issue may be that it's in species.txt - if Source refers to an object of that species, it may not match a planet with no population, since it would no longer have a species associated with it. Instead, it might be preferable to do it via "secret" tech.
Warning: Antarans in dimensional portal are closer than they appear.

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

Re: Dead colonies still producing resources

#20 Post by Geoff the Medio »

Bigjoe5 wrote:Either "high" or "low" works on a "strictly less than" or "strictly greater than" basis...
I think that changed so both will match values equal to the parameter.

Post Reply