How does allied supply work?

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: 5713
Joined: Mon Apr 10, 2017 4:25 pm

How does allied supply work?

#1 Post by Oberlus »

Playing test build 2019-12-08 (v0.4.9 preRC)

I'm playtesting PR #2674 for allied repairs and I need help understanding how allied supply works, both the mechanics and the exact meanings of the colors reach on the starlanes.

We have two allied empires: green (Oberlus) and yellow (Oberlus2). Both are Chato, with roughly the same tech queue.

See AlliedSupplyExampleEarly.png.
At the turn the first yellow colony arrived to Garriot, green had colonised small Stràla, with supply 2, and Garriot was already coloured green, up to half the starlane towards the empty space between Garriot and Hadar alpha.
The supply at Crystous was also 2. The supply at large Garriot once colonised was 0.
After colonisation, the yellow Garriot colony couldn't reach Crystous supply group, half the starlane towards there was green and half grey:

First doubts:
1. Why green Stràla's 2 supply does not reach the empty space between Garriot and Hadar alpha, that is at 2 hops from Stràla, and Crystous' 2 supply does reach?
2. Is supply value at that empty space for both empires zero, and one gets supply domination (at random, by whoever got there first, etc.) and the other doesn't?
3. What's the exact meaning of those half-coloured starlanes?
4. Why the two empires supply group does not connect if both of them could reach that empty space? Maybe because it is zero-supply although being coloured?


Getting back to the newly created yellow Garriot colony, when yellow small Hadar beta is colonised in turn 19, the colours change (see attachment AlliedSupplyExampleMid.png):
From yellow empire perspective, Garriot is surrounded in green, the starlane to the empty space is half green (garriot end) and half yellow (empty space end), and the outer (thick) colour is yellow.
From green empire perspective (the one in the attachment) the only change with respect yellow perspective is that the outer (thick) lines are green.
Since that moment yellow Garriot colony can draw PP's from Crystous supply group because of single-empire supply mechanics.

More doubts:
1. The inner, thin colour of the starlanes/systems does express the supply dominance over that space, isn't it?
2. The outer, thick colour does express supply groups, right?
3. Green has dominance over Garriot but, since both empires are allied, yellow can supply that system because:
a) Allied supply allows a single-empire supply group to not be splitted by their allies' colonies supply even when they dominate the supplied systems.
b) Allied supply allows that several single-empire supply groups disconnected among them become connected through their allies supply groups.
c) Although the colours seems to show that green dominates that system and only him can supply it, it is actually yellow empire who is supplying that system by simple single-empire supply mechanics and not related to allied supply.
4. Check out the empty space with six starlanes next to Beylix alpha and gamma (call it 6s): why the starlane that connects this 6s space to the one west of Beylix gamma (call it Wg)? Verbena has supply 2 and is at two hops from Wg and from 6s, Beylix gamma has supply 1 as is at 1 hop of Wg and of 6s. I don't understand why one of this 6s space has outgoing starlanes half coloured towards systems out of supply while Wg space doesn't.


Current state (see attachment AlliedSupplyExampleLate.png):
Yellow has
  • HW at Crystous.
  • 1st colony: large at Garriot.
  • 2nd colony: small at Hadar beta.
  • 3rd colony: medium at Beylix gamma.
Green has
  • HW at Verbena.
  • 1st colony: small at Stràla.
  • 2nd colony: medium at Beylix gamma.
If empire green wasn't there, yellow would have enough supply on its own to connect all yellow colonies on a single supply group.
By making yellow gift Garriot to green I confirmed (did I?) that PPs are transferred between disconnected supply groups through allied supply: after two turns yellow Beylix gamma is still able to draw from Crystous supply group.

So, is the rule of this mechanic something like "if two supply groups A1 and A2 of empire A do overlap with the same supply group B1 of allied empire B, then supply groups A1 and A2 are can share PP supply but are not considered as a single supply group"?

I attach the images in following posts because of problems when editing (some disapear after resubmitting).

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

Re: How does allied supply work?

#2 Post by Oberlus »

The attached screenshots:
Attachments
AlliedSupplyExampleEarly.png
AlliedSupplyExampleEarly.png (449.51 KiB) Viewed 3381 times
AlliedSupplyExampleMid.png
AlliedSupplyExampleMid.png (693.7 KiB) Viewed 3381 times
AlliedSupplyExampleLate.png
AlliedSupplyExampleLate.png (665.3 KiB) Viewed 3381 times

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

Re: How does allied supply work?

#3 Post by Ophiuchus »

Oberlus wrote: Tue Dec 17, 2019 12:01 pmSo, is the rule of this mechanic something like "if two supply groups A1 and A2 of empire A do overlap with the same supply group B1 of allied empire B, then supply groups A1 and A2 are can share PP supply but are not considered as a single supply group"?
Uhm. Maybe my knowledge is outdated, but AFAIK A1 and A2 cant share PP supply as those are not in the same supply-group. Also there is no such thing as overlapping supply groups. Each system is supplied at max by a single empire and if that supply is at least one, it is in the same supply group as neighboring systems which are supplied by the same empire.

Supply groups and normal supply-connectedness are calculated by your own supply-lines. There is currently no concept of allied-supply-connectedness.

You can also see the way O01eg implements the allied repair features in FOCS: it checks if the building/ship is connected to an ally, not if it is allied-supply-connected to own of your planets.
So what is considered allied-supply connected might differ for different effects/features.
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!

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

Re: How does allied supply work?

#4 Post by Oberlus »

Ophiuchus wrote: Tue Dec 17, 2019 1:24 pmSupply groups and normal supply-connectedness are calculated by your own supply-lines. There is currently no concept of allied-supply-connectedness.
So current behaviour of PP sharing through allied supply is an unintended effect? I mean, that yellow empire after gifting away Garriot is able to spend all his PPs at Beylix gamma. If there is no overlapping and no allied connection, it should not happen.

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

Re: How does allied supply work?

#5 Post by Ophiuchus »

Oberlus wrote: Tue Dec 17, 2019 1:46 pm
Ophiuchus wrote: Tue Dec 17, 2019 1:24 pmSupply groups and normal supply-connectedness are calculated by your own supply-lines. There is currently no concept of allied-supply-connectedness.
So current behaviour of PP sharing through allied supply is an unintended effect? I mean, that yellow empire after gifting away Garriot is able to spend all his PPs at Beylix gamma. If there is no overlapping and no allied connection, it should not happen.
Very unlikely. Rather supply connectedness for the PP sharing changed and my info is outdated.
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!

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

Re: How does allied supply work?

#6 Post by Oberlus »

Yes, it must be that. I've just check the Pedia for more insight:
Pedia wrote: Alliance
Alliance Diplomacy

Alliance is the closest diplomatic state between empires. Allied empires share visibility and Supply lines. Allied empires may share victory when the relevant Game Rule is set accordingly.
Pedia wrote: Supply
Meter Type

The supply meter on a planet represents the number of star-lanes supply can extend through. Smaller planets can supply greater distances, large planets reduced distances.

Supply lines are shown by coloring star-lanes with an empire's color. Planets connected by supply lines form a 'Resource Group' and can share physical resources. Production Points created on one planet can be used on any connected planet to build ships or structures.

A set of core supply starlanes for an empire (the set of least-jump starlanes connecting the resource-producing systems of each Resource Group) will have greater thickness than the non-core starlanes. If PP is currently being wasted within a Resource Group, the outer bands of the core starlanes will be a contrasting color.

Supply lines can also be used to refill the Fuel supply of ships.

Supply lines will be obstructed by armed enemy ships belonging to empires with which an empire is at War. At the opposite end of the spectrum, empires in an Alliance will share supply lines and all their associated benefits.
This definitions make sense with the behaviour I see in the game from the attached screenshots above: if two supply groups of different but allied empires "touch" (overlap) each other, both empires can use the starlanes/systems of both supply groups for their supply-connectedness calculations, so that further away supply groups of one empire can become connected by sharing the supply of the allied empire in between.

Currently this works for fuel and for PPs, but not for species or repair (that last one being sorted out now).

Please note that almost all my doubts in the OP are still there for me.

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

Re: How does allied supply work?

#7 Post by Ophiuchus »

Oberlus wrote: Tue Dec 17, 2019 3:07 pm if two supply groups of different but allied empires "touch" (overlap) each other, both empires can use the starlanes/systems of both supply groups for their supply-connectedness calculations, so that further away supply groups of one empire can become connected by sharing the supply of the allied empire in between.
The UI artifact for "touch" (overlap) means half-half colored starlanes (between systems) and overlapping colors (in-system). Not sure if these cases actually differ in code.
Oberlus wrote: Tue Dec 17, 2019 3:07 pm Currently this works for fuel and for PPs, but not for species or repair (that last one being sorted out now).
Just note that this not based on an single implementation of "supply-connectedness". So case on case base and the entries and the pedia might be an oversimplification.

I am also not sure how far the FOCS concepts support allied supply - especially ResupplyableBy and ResourceSupplyConnected

On another note I am also not sure what PropagatedSupplyDistance and PropagatedSupplyRange properties do.
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!

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

Re: How does allied supply work?

#8 Post by Geoff the Medio »

Ophiuchus wrote: Wed Dec 18, 2019 2:04 pmOn another note I am also not sure what PropagatedSupplyDistance and PropagatedSupplyRange properties do.
The max supply range of each system is calculated for each empire. The highest empire gets to supply that system. Then, in single-jump steps, the supply range is expanded to nearby systems, deducting 1 from the range at each step. Any system now supplied by two or more empires checks the ranges of each empire, and the highest wins. That process repeats until ranges are extended out to zero.

The propagated supply range in each system is, for the empire that supplies that system, how many jumps away from the system can be supplied. If a system is 2 jumps from a 5-range system, its range will be 5 - 2 = 3. In the 5-range system, it would be 5.

The propagated supply distance in each system is, for the empire that supplies the system, how far in terms of starlane length distance from the system to the nearest source of supply. I'm not sure if this is to the dominant source or the any source... ie. If there was a row of systems next to system A, with (non-propagated) supply ranges: A-0-1-0-5 The 5 range system would propagate out to reach A, but the distance might be just the distance of the lanes between the A and 1 system, or it might be the distance from A to the 5 system. Could check in the Objects window with a suitable test game, as the range and distance are available as info columns, I think.

Post Reply