Exobots, outposts and nearly defeated empires

Describe your experience with the latest version of FreeOrion to help us improve it.

Moderator: Oberlus

Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Exobots, outposts and nearly defeated empires

#1 Post by MatGB »

If an empire only has Outposts left then shields, defense and troops are reduced to zero. If an empire only has Exobots left then all exobot colonies and outposts have zero troops but still have other defences.

I can understand why outposts only has that effect, but is it intended Exobots behave that way? If so, why/how does it work? The only thing I can see in the scripts for them (and I may be missing something) is that they don't have a Troops characteristic at all, AFAICS everything else has Good/Bad/Average troops.

But I really don't get why outposts revert to zero troops but keep other defences if only exobots are left.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

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

Re: Exobots, outposts and nearly defeated empires

#2 Post by Geoff the Medio »

For reasons I don't know, planetary shield, defense, and troop effects are written into species definitions. The effects are scripted so they will act on any empire-owned planet, as long as a species with the effect is on a planet the empire owns. Duplicate effects are avoided by using stacking groups.

The exobot species definition has the standard defense and shield macros in it, so exobot populated planets can provide shield and defense effects for any empire owned planets (including colonies). Exobots don't have a troops effect, so having only exobot populated planets is the same as having only outposts for the troop numbers.

Presumably it was intended that exobot planets not have ground troops. It probably wasn't considered that colonies can have ground troops as well, even with no species present. A plausible explanation could probably be made about why it could work as it does, but it's a bit odd.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Exobots, outposts and nearly defeated empires

#3 Post by Dilvish »

Geoff the Medio wrote:For reasons I don't know, planetary shield, defense, and troop effects are written into species definitions.
I expect it's the same reason as all the growth tech effects getting coded into species definitions also. Because species effects are processed first, if a species is going to have an effect on something it minimizes risk of unintended interference to deal with all effects for that something altogether in the species file.

I'm hoping cami will have time to come back and help sort through the prioritization/ordering scheme he proposed so that we could have more flexibility with this.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Exobots, outposts and nearly defeated empires

#4 Post by MatGB »

That would make sense, and yeah, if the prioritisation thing can be done it'd solve a whole chunk of other issues as well.

For Exobots and that swamp species with zero ground troops (Setinon?), would it be worth rescripting things a bit to see if no ground troops can work a bit better and as intended? I think I grasp what'd need doing, and can always put up works in progress if I get stuck—wouldn't be an immediate project but it's something I think I can do, unlike the bigger issues I sometimes find.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

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

Re: Exobots, outposts and nearly defeated empires

#5 Post by Geoff the Medio »

If the goal is to just make it so empires with only Exobots have the (normal) presence of ground troops on outposts, an effectsgroup to do just that could probably be added to them fairly easily.

Post Reply