ResourceSupplyGroups and Allies

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
Grummel7
Space Dragon
Posts: 335
Joined: Mon Oct 09, 2017 3:44 pm

ResourceSupplyGroups and Allies

#1 Post by Grummel7 »

I've recently added a new AI interface function, calling GetSupplyManager().ResourceSupplyGroups(empire.EmpireID()).

Since allies share vision and supply, I would have expected that all allied AIs get the same groups. But that is not the case:
supplyGroups.png
supplyGroups.png (148.44 KiB) Viewed 752 times
AI_1 sees exactly two groups, which is what I would expect, since one AI is still isolated in a corner.
The others however see smaller groups.
Additionally, system 2345 is not in any of the groups of AI_3, which caused an assertion failure in the AI.

Is this a bug?
How should I interpret these groups?

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

Re: ResourceSupplyGroups and Allies

#2 Post by Geoff the Medio »

Could be partly due to supply sharing only working to immediately adjacent allied networks, and there being no successive iteration of that sharing: viewtopic.php?p=110636&sid=eea08597d2d6 ... b1#p110636

Two allies could also have different relations with a third empire, which could also differently affect what systems they can supply into.

Post Reply