FreeOrion

Forums for the FreeOrion project
It is currently Sat Dec 16, 2017 5:21 am

All times are UTC




Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: Supply Reworking
PostPosted: Sun Feb 21, 2016 11:18 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
As mentioned here, I've created a pull request that reworks supply propegation mechanics so that different empires' supply ranges no longer overlap, but instead push up against eachother, and each system is / should be supplyable by just a single empire.

The circle around a system on the map now indicates which empire has fleet supply there, and which empire's planets can share supply within and in/out of the system to other planets in connected systems.

The actual mechanics for determining which empire supplies where are a bit quirky, but the idea is that supply ranges spread out to adjacent systems up to the range of the source. So, a system with a planet with supply range 5 can spread supply up to 5 jumps away, as long as all the systems / starlanes along the route have been detected, there are no armed enemy ships in the systems supply is passing through, and as long as another empire doesn't have equal or more supply range propegated into the same system.

In the case of a tie, ie. two empire have supply-range 1 systems on either side of an empty system (or one empire has a supply-range 1 system 1 jump away, and another has a supply-range 2 system 2 jumps away) neither empire will propegate into the system, unless it can break ties based on only one empire having current vision of the system, or the presence of ships (that haven't already obstructed opposing empires supply propegation into the system by being armed and at war) or planets owned by one of the empires.

If a tie occurs where a supply 3 source system is next to another empires supply 2 source system, the supply 2 system should block the supply 3 source system from propegating into it. (If they were both trying to propegate into a mutual neighbour in which neither had a supply source planet, then they'd block eachothers propegation due to a tie, unless tie-broken.)

If an empire has a supply-range 3 system next to another empire's supply range 1 system, the supply-range 3 will overpower the range 1, and the range 1 empire won't be able to supply fleets / share resources in that system. On the map, the supply range 1 empire would have the system's name its colour, as that is the empire with an owned planet there, but the circle around the system would be the colour of the range 3 empire, as that is the empire that has supply in that system.

It attempts to track which lane traversals are used / blocked while calculating things, although there are still a couple quirks with that, as can be seen in somewhat illogical lane traversals marked in the screenshot...
Attachment:
File comment: supply distribution
reworked_supply_propegation_map.png
reworked_supply_propegation_map.png [ 122.04 KiB | Viewed 785 times ]

It can be a bit complicated to do this propegation in situations where empires have different sets of starlanes and systems explored. For example, an empire could block another empire's propegation into a system by having larger range there, but not have explored any of the further systems so that it can't propegate further. The second empire could have all the lanes explored, so could have propeated into later systems that the first empire can't, but was blocked at the disputed system, so propegates into nothing. (Probably hard to follow that...)

Given that this changes how supply propegates, I've removed the existing code from some AI interface functions that were previously propegating supply into negative ranges, in order to use that as a calculation of how far a system was away from a supplied system for an empire. This function will need reworking for the AI to use it.

Future plans include recording and being able to reference the supply range propegated into a system, and effects on happiness or other meters for planets of one empire within the supply of another.

Effectively this makes supply range into a form of exclusive control territory for each empire, similar to cultural borders in Civ games. It also makes it possible to coherently display who supplies where on the map, now that there is not need to deal with multiple empires supplying a given system and using arbitrarily complicated combinations of traversals and blocked traversals between systems.


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 11:39 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
Compiled to test now, definitely in favour of the basic idea but obviously tweaks might be needed. Hopefully if this works properly we can then rework and balance ship fuel and parts as upt to now they're basically pointless whereas if supply is disputed they might become vital.

_________________
Mat Bowles

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


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 11:45 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
One tweak I plan to implement is to not bother tracking which supply line traversals are used / blocked while propegating the supply out from sources, but instead to have a post-processing step where it determines which traversals could have been used based on who ends up with or without supply where and which systems are obstructed for which empires...


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 4:05 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4303
Location: Sol III
All in all, the ruleset you laid out here for the new supply propagation sounds reasonable and intuitive. There is only one point where I'd like to suggest a bit different resolution:
Geoff the Medio wrote:
If an empire has a supply-range 3 system next to another empire's supply range 1 system, the supply-range 3 will overpower the range 1, and the range 1 empire won't be able to supply fleets / share resources in that system.
Wouldn't it be simpler/clearer/more intuitive for the player if having any outposts or colonies in a system will always overpower any supply propagation of other empires into that system, regardless of how much supply range those empires have? The reason behind this is what if the empires next to each other in such a scenario aren't exactly best buddies, but want to leave each other alone for the time being (because both are engaged in wars on other fronts)? That's actually a quite common scenario in 4X games. With the mechanic as described above, they couldn't avoid interference with each others supply connections, other than having an armed ship in each border system. I wonder if that might turn out to be somewhat annoying.

As a player, I'd naturally expect to be able to supply connect to a system which is in my supply range, where I have outposts or colonies and no enemy ships present.
Quote:
It can be a bit complicated to do this propegation in situations where empires have different sets of starlanes and systems explored. For example, an empire could block another empire's propegation into a system by having larger range there, but not have explored any of the further systems so that it can't propegate further. The second empire could have all the lanes explored, so could have propeated into later systems that the first empire can't, but was blocked at the disputed system, so propegates into nothing. (Probably hard to follow that...)
Without having seen that situation in a game yet, that actually sounds quite logically and intuitive. It's the behavior I'd expect (I guess).

Edge cases that come immediately to my mind:

  • What if there are outposts/colonies of more than only one empire present in a system?
  • What if there are armed ships of different empires present in a system?

Quote:
Future plans include recording and being able to reference the supply range propegated into a system, and effects on happiness or other meters for planets of one empire within the supply of another.
Sounds good!


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 4:27 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
I would expect to always be able to resupply in a system I have an outpost or planet in unless there are enemy armed ships there blocking supply (worked out in the same way that blockading is worked out in terms of who is/isn't blockaded, for consistency if nothing else).

Good change: gas giants with supply 0 (or less) can now refuel ships that turn up, that they couldn't before had been bugging me for ages.

An exception to the above: if you put an outpost into someone else's system they should control it unless you also take control militarily.

_________________
Mat Bowles

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


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 4:37 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
MatGB wrote:
I would expect to always be able to resupply in a system I have an outpost or planet in unless there are enemy armed ships there blocking supply [...]
An exception to the above: if you put an outpost into someone else's system they should control it unless you also take control militarily.
The idea is that now, who "owns" a system is determined by supply propegation. If you put an outpost somewhere, and someone else's supply overpowers that outpost, then you have an outpost in someone else's system.
Vezzra wrote:
Wouldn't it be simpler/clearer/more intuitive for the player if having any outposts or colonies in a system will always overpower any supply propagation of other empires into that system, regardless of how much supply range those empires have? The reason behind this is what if the empires next to each other in such a scenario aren't exactly best buddies, but want to leave each other alone for the time being (because both are engaged in wars on other fronts)?
Part of the idea of this is to have a non-military way to take over other empires' territory... by pushing back their zone of influence / control of systems. In particular, doing influence stuff to a planet would be a lot easier if you control the system it is in. Conversely, if you have an outpost / colony in someone else's system, perhaps you can do espionage stuff or offensive influence stuff to that empire more easily.


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 5:18 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4303
Location: Sol III
Geoff the Medio wrote:
The idea is that now, who "owns" a system is determined by supply propegation...Part of the idea of this is to have a non-military way to take over other empires' territory... by pushing back their zone of influence / control of systems.
The basic idea/concept is certainly interesting, my concern is, how can I "switch" that "off" in situations where I don't want to extend my zone of influence (like in my example above, two empires which want to maintain a state of truce)? That's not an edge case, that's a very common scenario.

An idea would be to tie that dynamic (overpowering of supply propagation in a contested system even if another empire has outposts or colonies there) to an influence project. This influence project has to be active for a colony to enable the supply propagating from this colony to have this "overpowering strength".


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sun Feb 21, 2016 5:57 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
Vezzra wrote:
...how can I "switch" that "off" in situations where I don't want to extend my zone of influence...
Don't have planets with huge supply ranges near enemy empires.
Quote:
This influence project has to be active for a colony to enable the supply propagating from this colony to have this "overpowering strength".
Then one would need to keep track of multiple kinds of supply, some "overpowering" and some not...


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Tue Feb 23, 2016 5:36 pm 
Offline
Creative Contributor
User avatar

Joined: Sat Sep 13, 2003 6:52 pm
Posts: 1396
Vezzra wrote:
Geoff the Medio wrote:
The idea is that now, who "owns" a system is determined by supply propegation...Part of the idea of this is to have a non-military way to take over other empires' territory... by pushing back their zone of influence / control of systems.
The basic idea/concept is certainly interesting, my concern is, how can I "switch" that "off" in situations where I don't want to extend my zone of influence (like in my example above, two empires which want to maintain a state of truce)? That's not an edge case, that's a very common scenario.

An idea would be to tie that dynamic (overpowering of supply propagation in a contested system even if another empire has outposts or colonies there) to an influence project. This influence project has to be active for a colony to enable the supply propagating from this colony to have this "overpowering strength".



Well I think it might be easier to have some sharing supply range (some type of "freedom of the star lanes") diplo agreement if you want to have that truce. (sort of a low level agreement for allowing supply through, it might exclude moving actual ships through unless it was a higher level)

So you still own the system, but they get to use it (or vice versa).
Of course if you are letting someone use it and suddenly yank the agreement away, their ships may be stranded and vulnerable.. so Empire A shouldn't fight Empire C if Empire B (in between them) isn't a reliable friend (they don't need to declare war on A just discontinue the 'open borders' agreement.)

So basically its
Greatest distance (remaining jumps) wins
in case of ties, greatest number of the highest distance connections wins
in case of a 'number of connections' tie no one wins.


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Fri Feb 26, 2016 12:49 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4303
Location: Sol III
Geoff the Medio wrote:
Vezzra wrote:
...how can I "switch" that "off" in situations where I don't want to extend my zone of influence...
Don't have planets with huge supply ranges near enemy empires.
Oh pls, come on, seriously? ;)

What happens if that tiny planet with that Computronium Moon special is right in this border system which has three starlanes going into systems of my neighbor who will be very annoyed if I disrupt his supply lines just because I happen to be more advanced in supply techs, or because I have a space elevator nearby? We really need some mechanic that allows us to supress "overpowering" supply propagation in situations like that. Against human opponents you'd want to do this to have more flexibility when it comes to how and where to draw your borders, against AI opponents you'd want to do this to be able to avoid pissing the AI off.
Quote:
Quote:
This influence project has to be active for a colony to enable the supply propagating from this colony to have this "overpowering strength".
Then one would need to keep track of multiple kinds of supply, some "overpowering" and some not...
Do you expect this to become a problem? As it's bound to an influence project you can keep track of, and the rules are simple enough to be still intuitive, I don't expect that to become an issue. To make things even simpler, the influence project can be made so it applies to a specific empire, meaning all supply propagation into systems of this empire are "overpowering".

Another alternative would be to do it the other way round: provide a mechanic that lets you supress "overpowering" supply propagation where you don't want it.


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Fri Feb 26, 2016 1:02 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4303
Location: Sol III
Krikkitone wrote:
Well I think it might be easier to have some sharing supply range (some type of "freedom of the star lanes") diplo agreement if you want to have that truce. (sort of a low level agreement for allowing supply through, it might exclude moving actual ships through unless it was a higher level)
That this mechanic will become subject to diplomatic agreements is quite obvious I think, however, diplomacy isn't in place yet. So the supply propagation mechanic needs to be able to work without becoming too annoying without having diplomacy available to deal with it.

But even once diplomacy is available, what you suggest might not be enough. As a player I'd definitely want to be able to not interfere with a neighboring empire's supply lines, without having to engage in some sort of treaty or agreement that allows this empire to use my supply lines, even if it's a low level agreement that only extends to unarmed ships.

I'd prefer to be able to keep my supply lines from propagating into systems where certain other empires have outposts or planets, even if I have no agreement whatsoever with them. But I could also live with the option of having a type of treaty/agreement that only stops this kind of "overpowering" supply propagation, without granting the other empire to use my supply lines in whatever limited ways.


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Fri Feb 26, 2016 1:08 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
I don't think this is as big of an issue as you're envisioning. Consider cultural borders in Civ games, which can expand to take over part of the map previously owned by other empires, during peace time, including taking away important strategic resources from other empires. The fact that this can and does happen during peace time is part of what makes it interesting.

Granted, those fluctuations happen a lot more slowly during peace-time than the supply mechanics being discussed here, with the exception of things like culture bombs from a great artist.


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Fri Feb 26, 2016 1:38 pm 
Offline
Release Manager, Design
User avatar

Joined: Wed Nov 16, 2011 12:56 pm
Posts: 4303
Location: Sol III
Geoff the Medio wrote:
I don't think this is as big of an issue as you're envisioning. Consider cultural borders in Civ games, which can expand to take over part of the map previously owned by other empires, during peace time, including taking away important strategic resources from other empires. The fact that this can and does happen during peace time is part of what makes it interesting.
I certainly do not object against being able to do this, and to employ a respective strategy. I too think this offers very interesting options for the player to pursue, and, when tying that with future diplomacy and espionage/sabotage mechanics, will provide some very different approaches on how to take on your enemies.

What I want is just the choice to not do this if I don't want to. To be able to leave a neighbor alone if I think that this could be a viable strategy in a certain situation. As I mentioned in other, earlier discussions on various topics, I've played some 4X games in the past, and one thing that I found really annoying were those game mechanic that just deprived you of choices/options which (IMO) would have been perfectly viable and interesting, but you just couldn't do it. These options wouldn't even had required some complicated rules or implementations. One very frustrating example was this game where combat was always "to the death" - the option of withdrawing forces simply wasn't provided. Even colony ships would happily throw themselves against armadas of battleships. Ugh... :roll:
Quote:
Granted, those fluctuations happen a lot more slowly during peace-time than the supply mechanics being discussed here, with the exception of things like culture bombs from a great artist.
Sure, that probably isn't exactly realistic (actually it's probably very unrealistic ;)), but this is a case where that doesn't bother me at all, because I don't feel like it's breaking immersion. After all, if you have superior logistic infrastructure in place to support your presence in a certain system, you'll probably overwhelm any other presences there (unless someone sends armed forces in, but that case is accounted for).


Top
 Profile  
 
 Post subject: Re: Supply Reworking
PostPosted: Sat Feb 27, 2016 11:52 am 
Offline
Space Floater

Joined: Tue Dec 15, 2015 6:20 pm
Posts: 47
Location: Solaria
MatGB wrote:
Compiled to test now, definitely in favour of the basic idea but obviously tweaks might be needed.

I like that idea too. :)
MatGB wrote:
Hopefully if this works properly we can then rework and balance ship fuel and parts as upt to now they're basically pointless whereas if supply is disputed they might become vital.

I'm currently working on a buoy ship_hull class with no slots available that could be useful for the fuel problem. The basic idea is to provide some support during exploration with fuel station or scouting. The buoys can only be moved once after creation.

_________________
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group