Allied supply doesn't work through two consecutive allies?

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
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Allied supply doesn't work through two consecutive allies?

#1 Post by Oberlus »

Suppose we have three empires Red, Green and Blue, allied together.
And three systems:
Crystous <-> Adhara b <-> Lystena

Red's Crystous 1 has supply 2.
Blue's Crystous 2 has supply 2.
Green's Adhara b 1 has supply 3.
Red's Lystena 1 has supply 5.

Red doesn't have supply on Crystous 1 (i.e. doesn't get PPs from Lystena supply group, and can't build colony buildings of species that are available to build at Lystena's).
It is not related to supply levels, because Lystena 1 has enough supply to overcome Green and Blue supplies.
I guess supply won't jump over two consecutive allies?

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

Re: Allied supply doesn't work through two consecutive allies?

#2 Post by Geoff the Medio »

The code adds supply connections between an empire and its ally when they both have an obstructed connection from either side of the same starlane, and it adds all supply connections between systems of an ally to an empire, but it doesn't add connections between the networks of two of the allies of an empire. If it were to do so, it might need to consider whether those two allies of the empire are themselves allied.

https://github.com/freeorion/freeorion/ ... y.cpp#L777

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Allied supply doesn't work through two consecutive allies?

#3 Post by Daybreak »

Geoff the Medio wrote: Thu Mar 03, 2022 3:57 pm The code adds supply connections between an empire and its ally when they both have an obstructed connection from either side of the same starlane, and it adds all supply connections between systems of an ally to an empire, but it doesn't add connections between the networks of two of the allies of an empire. If it were to do so, it might need to consider whether those two allies of the empire are themselves allied.

https://github.com/freeorion/freeorion/ ... y.cpp#L777
+1 to the idea that the code should - consider whether those two allies of the empire are themselves allied, and if so extend all benefits.

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

Re: Allied supply doesn't work through two consecutive allies?

#4 Post by Grummel7 »

Geoff the Medio wrote: Thu Mar 03, 2022 3:57 pm ...If it were to do so, it might need to consider whether those two allies of the empire are themselves allied.
I don't think we have to.

Let's consider the following situation: 3 empires, aligned like pearls on a string, A is allied to everyone, the other two are not.

Code: Select all

A - B - C
So A's ship can pass through B to get to C's region, C however cannot pass through B. So it makes sense to say that for A, the whole galaxy is one supply group, while C gets two separate groups. So while determining A's supply group, all we have to do is checking whether next one is allied to A.

More important: where does is matter?

A could found an outpost in C's region and settle it with species from its own region, C cannot do the same. This sounds logical to me.

Specials: Checking the code I found that exporting growth specials (and home world support) only works within an empire, while luxury specials may work for allies, as long as the exporting empire has capital markets adopted. Perhaps this should be aligned. Regarding supply, the luxury resource checks the source supply connection. This really matters. Given the above example, if A supply connection spans the whole galaxy, everyone would profit from specials exported by A, but A would not profit from specials exported by C. Perhaps we should change the script to use the targets supply chain.

Note that if we stick to the exporting specials over empire boarders, there is a good reason to switch to target supply: With source supply, even enemy planets may profit, just because they happen to be placed in a system supplied by the source empire.

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Allied supply doesn't work through two consecutive allies?

#5 Post by Daybreak »

Grummel7 wrote: Sat Aug 06, 2022 6:41 am I don't think we have to.
Consider this scenario - which is a situation we had in the MP20

3 empires, aligned like pearls on a string, All 3 are allied to each other.

Code: Select all

X - Y - Z
X wishes to give a species to Z, being Kobunture, which as we know extremely dislikes Shipyards, etc.

So Z builds an outpost and gifts it to X (who has scout in system)
X builds Kobuntura colony and gifts it to Z

However that cant happen at the moment.

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

Re: Allied supply doesn't work through two consecutive allies?

#6 Post by Grummel7 »

Daybreak wrote: Sat Aug 06, 2022 9:08 am However that cant happen at the moment.
That's true, although in fact you could achieve the same by sending a colony ship. Well, it would take a bit longer, I guess.

But more important: Do you think it should be possible or not?

wobbly
Cosmic Dragon
Posts: 1874
Joined: Thu Oct 10, 2013 6:48 pm

Re: Allied supply doesn't work through two consecutive allies?

#7 Post by wobbly »

Consider the case:

A(capital) - B(ally) - C(other ally) - A(rest of empire)

Rip A's empire

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

Re: Allied supply doesn't work through two consecutive allies?

#8 Post by Geoff the Medio »

Consider the case:

A - B - C - B - A

A allies B but not C
B allies C and A
C allies B but not A

After one round of merging supply groups, B can access everywhere, C can access all of B's space, and A can access all of B's space.

If another round of merging is done without considering the original owner of the spaces, then A would gain access to all of B's supply group, which would include C's space, even though C wouldn't have otherwise let A access its space.

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Allied supply doesn't work through two consecutive allies?

#9 Post by Daybreak »

Geoff the Medio wrote: Sat Aug 06, 2022 1:24 pm Consider the case:

A - B - C - B - A

A allies B but not C
B allies C and A
C allies B but not A

After one round of merging supply groups, B can access everywhere, C can access all of B's space, and A can access all of B's space.

If another round of merging is done without considering the original owner of the spaces, then A would gain access to all of B's supply group, which would include C's space, even though C wouldn't have otherwise let A access its space.
The owner of the space would have to be considered.

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Allied supply doesn't work through two consecutive allies?

#10 Post by Daybreak »

Grummel7 wrote: Sat Aug 06, 2022 1:02 pm
Daybreak wrote: Sat Aug 06, 2022 9:08 am However that cant happen at the moment.
That's true, although in fact you could achieve the same by sending a colony ship. Well, it would take a bit longer, I guess.
In this case it was way longer, about triple the time, and although not impossible, building shipyards on a Kobuntura planet is an exercise in itself.
But more important: Do you think it should be possible or not?
Good question.
If it is possible for an ally one step away, should it not be possible for all allies. Should we cut out being able to build colonies outside our own supply lines (not allies), and only be able to send colony ships.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Allied supply doesn't work through two consecutive allies?

#11 Post by Oberlus »

Current implementation of supply groups makes some very byzarre and annoying situations.

Consider an alliance of 4 empires. It could be nice for all 4 of them to have colonies interweaved, but they can't without incurring into supply disconnections and IP losses.

I don't know what should be done when the ally states are complex/asymmetrical (A with B, B also with C, C not with A...), but I am sure supply should work just fine when all affected empires are allied.


Would it make sense to force that two allied empires to be also allied to any empire ally of the other?

Daybreak
Vacuum Dragon
Posts: 641
Joined: Mon Aug 13, 2018 10:14 pm

Re: Allied supply doesn't work through two consecutive allies?

#12 Post by Daybreak »

Oberlus wrote: Sat Aug 06, 2022 11:15 pm Would it make sense to force that two allied empires to be also allied to any empire ally of the other?
I will answer that with a question, if I was allied to you, and on the other side of my empire I was allied to Lienrag - would you want to be forced into an alliance?

Jokes aside, I would not want to be forced into an alliance, and by not being force, it probably creates more tricky diplomatic situations.

User avatar
Oberlus
Cosmic Dragon
Posts: 5714
Joined: Mon Apr 10, 2017 4:25 pm

Re: Allied supply doesn't work through two consecutive allies?

#13 Post by Oberlus »

Daybreak wrote: Sat Aug 06, 2022 11:39 pm I will answer that with a question, if I was allied to you, and on the other side of my empire I was allied to Lienrag - would you want to be forced into an alliance?

Jokes aside, I would not want to be forced into an alliance, and by not being force, it probably creates more tricky diplomatic situations.
I will answer to that with a perhaps better wording.
What I am talking about is to set rules to enforce that when A and B are allied, C can ally both of them or none (or can convince A to drop alliance with B and ally C instead, etc.).

I would prefer that over complex alliances + messed up supply lines. Wouldn't you?
I'm not saying simpler and more restrictive alliance rules are better for the sake of themselves, I am talking in the context of the issue described in this thread.

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

Re: Allied supply doesn't work through two consecutive allies?

#14 Post by Grummel7 »

Geoff the Medio wrote: Sat Aug 06, 2022 1:24 pm Consider the case:

A - B - C - B - A

A allies B but not C
B allies C and A
C allies B but not A

After one round of merging supply groups, B can access everywhere, C can access all of B's space, and A can access all of B's space.

If another round of merging is done without considering the original owner of the spaces, then A would gain access to all of B's supply group, which would include C's space, even though C wouldn't have otherwise let A access its space.
Ah, this was a misunderstanding: I thought you wanted to check whether (in this case) B is allied to C, before extending A's supply into C's area. Of course we do have to check whether A and C are allied.

But following the discussion, it seems that players want to do that, so that when a set of empires are mutually allied, they should all have the same supply groups.

Ophiuchus
Programmer
Posts: 3433
Joined: Tue Sep 30, 2014 10:01 am
Location: Wall IV

Re: Allied supply doesn't work through two consecutive allies?

#15 Post by Ophiuchus »

i also think we could do wobblys suggestion: when a set of empires are mutually allied, they should all have the same supply groups.

if I understand correctly, some corner cases could be surprising to players like:

B - A - C - B

A allies B but not C
B allies C and A
C allies B but not A

Although B has full access to all of A and C, there are two distinct supply groups for B as long as A and C are not allied.

I think that is mostly a documentation issue. The situation also might pressure B into trying to establish an alliance between A and C, which is probably a good thing.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Look, ma... four combat bouts!

Post Reply