Spaceports and Resource Demand - the Hub and Spoke

The Galaxy Lives On! Distant Worlds, the critically acclaimed 4X space strategy game is back with a brand new 64-bit engine, 3D graphics and a polished interface to begin an epic new Distant Worlds series with Distant Worlds 2. Distant Worlds 2 is a vast, pausable real-time 4X space strategy game. Experience the full depth and detail of turn-based strategy, but with the simplicity and ease of real-time, and on the scale of a massively-multiplayer online game.

Moderator: MOD_DW2

Post Reply
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

When a colony builds a spaceport, its Strategic Resource demands increase by roughly 50%, and Caslon demands increase by somewhere in the ballpark of 400-800%.

Normally, it only takes 2-3k Caslon to satisfy a young colony. That's two modest, little shipments, more than enough to top up visiting freighters. It calls for 18k with a spaceport. An early empire couldn't stock more than a few colonies like that. And that's exactly what the default AI does. Just a few. This is how a Hub and Spoke is supposed to function.

Under default automation settings, AI does not prioritize starports very much. If one were to change only the minimum population and distance for starports to 0 and increase the priority to Very High, this cripples the AI as it tries to run the empire shortly after going to war. What happens is that every colony will be requesting large amounts of Caslon, which the freighters will try to facilitate. Then, some attack fleet that went offensive returns in need of fuel. Chances are, the nearest location doesn't have enough. It takes what it can, then moves to another location, repeating this while its needs only grow due to the size of the fleet. If it eventually finds a source with enough, it promptly uses it up in a second offensive bout. This can happen with multiple large fleets simultaneously, accelerating the process.

With the trail(s) of empty locations, smaller fleets go to refuel from the small sources nearby, doing the same thing as the larger fleet. Progressively faster, sources start to dry up. Depending on how aggressive the empire was before the war, the cascade into a crippled state may be swift or take some years, but this only happens to the AI that builds spaceports everywhere.

The most abundant fuel source for an empire suffering the above.
That's not much.png
That's not much.png (86.69 KiB) Viewed 1987 times
I ran a test about spaceports regarding the effects of increased demands, and the above occurred. I had run a Boskara empire on full automatic with default settings, saving right at the beginning, then ran it again with only the change to spaceport's priority. I had I ran my earlier nearly-full-auto Zenox SpyMaster under default settings regarding spaceports (I thought I had done so otherwise), and subsequently did the same thing with them. The Boskara, under normal settings, was doing a good bit of dominating by 2800 (started @ tech 1 with a young empire, same with other AI). Its Caslon logistics were strained, being in constant war, but it provided its needs. The Zenox similarly had no fuel issues under default settings. With spaceports everywhere, the Boskara quickly dried up all the caslon mines, with fleets using what little fuel they could get to go looking to fill up their fuel tanks unsuccessfully. The Zenox, not at war, almost depleted their fuel sources to the same extent, but were at least able to stock up a few thousand here and there. Until I forced them into war, for which they soon found themselves without a location that could top up their only attack fleet, and thanks to only having one large fleet, they could at least fill up defense fleets at mining bases from time to time. This was less than I anticipated needing to do to have something to show for it. The shared results from the empires that operated differently under default settings were convincing enough for me.
MustHaveEnergy.png
MustHaveEnergy.png (134.93 KiB) Viewed 1987 times
It's not a problem with the game. It's the player's fault that causes this. If allowed to persist, it's their fault for not identifying the problem and creating a solution, such as idling fleets at defensive locations to restrict fuel-costly offensive action and employing fuel ships. This is besides the point, though.

The point is too many spaceports, too early, will disrupt Caslon logistics to the point that the empire seizes up when it goes to war under default AI operation. None the less, building spaceports at every colony is a good idea, but the player has to take measures to ensure they do not seize up in this manner- and if they do anyway- they take steps to solve the problem. Most players do that successfully, I think, or at least well enough to prevent an empire-wide seizure.

Spaceports turn colonies into hubs, and too many hubs disrupt logistics.
AKicebear
Posts: 665
Joined: Sat Jul 26, 2014 2:11 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by AKicebear »

Excellent post, good to have more solid research behind this intuition that spaceports everywhere could be problematic at times.

I think its worth flagging that it is not strictly a good idea to build a SPACEPORT at every colony. Rather, a BASE with a medical and recreation facility - which can be added to other types like defensive, research, etc. It's a shame there isn't a far more threadbare defensive base that the player can get earlier to alleviate this compulsion to build something everywhere.
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

Much agreed. When not using a spaceport, a cheaper base for the happiness bonus is always a good idea.
Jorgen_CAB
Posts: 866
Joined: Wed Mar 17, 2010 7:53 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Jorgen_CAB »

To be fair the happiness boost of recreation and medical facilities to colonies below 500 million is a negligible bonus anyway as the main source of growth is migration anyway. Factual growth on the planets will be low no matter what.

The main bonus of spaceports is actually the lab, more science is always important... especially in the early to mid game. Later on when you have ALLOT of new colonies it is less so and the logistics issue become more pronounced.

In the first few colonies that an empire build you should build the spaceport as soon as you can, just to get the science. When an empire have 1000 science income or more then an additional lab and early station can probably be more of a strain than help.

So.. the AI should be taught to quickly build spaceports even on new colonies up until they have a certain amount of space ports and then ease up on building them early. The AI could also look at their resource distribution and see if the economy can handle it.

The game probably also would be better of if there was an outpost station option that will not require as much resources as a full fledged space port. This one would have no lab and no shipyards and would not increase the demand as much as a regular space port.
Luzario
Posts: 16
Joined: Wed Mar 15, 2023 3:45 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Luzario »

If you ask me, the easy fix for this automation would be to just take the number for Caslon request now and add a multiplier corresponding the size of the colony. If the colony has just 10% max pop, it should just increase the demand by 80% instead of max 800% for instance. That would make the stock-up more smooth trough time and also it would be logical.

It would probably interfere with refueling in fleet operations, but then the question is which situation is worse.
AKicebear
Posts: 665
Joined: Sat Jul 26, 2014 2:11 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by AKicebear »

Luzario wrote: Thu Mar 23, 2023 1:03 pm If you ask me, the easy fix for this automation would be to just take the number for Caslon request now and add a multiplier corresponding the size of the colony. If the colony has just 10% max pop, it should just increase the demand by 80% instead of max 800% for instance. That would make the stock-up more smooth trough time and also it would be logical.

It would probably interfere with refueling in fleet operations, but then the question is which situation is worse.
I think this makes sense, and could be further weighted by spaceport level. Eg if I am deliberately building a large spaceport at a very small/young colony, I probably have an idea that it's supposed to become a major hub quickly, faster than population growth might dictate.
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

If you want to see the Boskara empire for whatever reason, here's the 100% normal automation setting game. ...and the point where the OP was for stations for every colony. I intended to go to 2800 in both runs and compare, so I don't have a save from around 2777 for route A. Both times, the Boskara readily went to war on its own.
Great Boskara Hive - Boskara - 2777 Route B.7z
(3.81 MiB) Downloaded 13 times

Oh, a really, really simple thing the player could do to prevent all this...?

Just set control of the small colony's resources to manual, then build the spaceport. Done~ then later set it back to auto, one or two at a time.
GHerr
Posts: 235
Joined: Thu Dec 21, 2017 9:52 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by GHerr »

Are spaceports really that significant for science production? Maybe I misunderstood it but I thought when I looked at it that it produced less science than a research station did and I usually have tons of those out there compared to the number of colonies I have.?

I wish they had the old generic station Hull like they did in dwu. I used to put one of those on all my new colonies that just had the recreation and medical facilities. Super cheap.
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

It is true, a research station gives twice as much research as a spaceport, and at first, it's easier to get more research locations than colonies running.

Nonetheless, consider what a colony is worth, especially a fresh one. It is a drain on the empire for quite a while. A cheap spaceport provides 8+ research points and raises the research funding cap by an equal amount (40 credits/point). For the empire, this is very much worth having in terms of credit cost, if the spaceport is designed affordably. All the other features of the spaceport are just icing on the cake.

Whether or not it's worth it depends on how much the player relies on automation.
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by frankycl »

Nightskies wrote: Fri Mar 24, 2023 9:01 pm It is true, a research station gives twice as much research as a spaceport, and at first, it's easier to get more research locations than colonies running.

Nonetheless, consider what a colony is worth, especially a fresh one. It is a drain on the empire for quite a while. A cheap spaceport provides 8+ research points and raises the research funding cap by an equal amount (40 credits/point). For the empire, this is very much worth having in terms of credit cost, if the spaceport is designed affordably. All the other features of the spaceport are just icing on the cake.

Whether or not it's worth it depends on how much the player relies on automation.
Hm - it all sounds/reads interesting and well thought out/tested... so why don't you make another of those well-received guides - here and/or on Steam ? ;)
(only posting it in the forum is nice for forum-readers (at this time :roll: ), but it would be even better if all others would be able to benefit from it, too, I think 8-) )
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

This is related to it. I wanted to get some comments - I think it's best to discuss as many parts as possible before posting it. With the Fleet guide, I think the part about Attack Points might be misleading - thanks to AKicebear for pointing out having trouble getting his fleets to engage the assigned Attack Points. Another noted how it is supposed to be about using automation, but it suggests putting Fleet Postures to manual. So, I'm trying harder to get more input before publishing this one.

Here's a snip of it, though~
Snip.gif
Snip.gif (131.87 KiB) Viewed 1776 times
User avatar
frankycl
Posts: 402
Joined: Mon Mar 01, 2021 5:16 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by frankycl »

Nightskies wrote: Fri Mar 24, 2023 11:10 pm This is related to it. I wanted to get some comments - (...) So, I'm trying harder to get more input before publishing this one.
(...)
Well, of course - I'm certain that you put all of the necessary thought and thoroughness in it, but I'd guess you could also get your feedback/improvement suggestions AFTER releasing it to a greater audience - and you could always improve/update it, nevertheless... ;)

(Just my 2 cents, Nightsk, but I think that you always are much more thoughful and competent than others would be in such cases - so that you dont need much more backup in order to present your findings and conclusions to the public. ;) )
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

Job's done! I pushed it out without thorough editing; please comment. Thanks, frankycl, for the positive reinforcement.

https://steamcommunity.com/sharedfiles/ ... 2948376176
tankacealpha
Posts: 18
Joined: Wed Mar 29, 2023 3:42 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by tankacealpha »

Hi could you explain what you mean by maintenance always gets payed? This is a counter intuitive statement. I can set tax to zero and it still gets payed?

I have the option to change funding to ships and facilities etc, what does this achieve? Nothing?

I dont really understand what you mean in a broader sense.

Thanks.
AKicebear
Posts: 665
Joined: Sat Jul 26, 2014 2:11 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by AKicebear »

It's more, there is no direct penalty related to lack of funds to pay state maintenance. In other games there are concepts like attrition, efficacy, etc worsen in this situation. Here, your ships perform exactly the same if your economy is in surplus or death spiral.

There is still a different penalty for a death spiral economy - you can't buy anything new without a positive cash balance.

I do think they should add a neg for chronic deficits below the servicing cost of your ships. Eg you get 6-12 months grace, but then ship attack values start to decline by 1% per month, up to -50%. So, you can run a deficit briefly, but will eventually suffer efficacy losses.
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

To be clear, even if you have a negative income (including bonus income) and negative cash, maintenance costs are still paid, meaning your negative cash becomes even more negative.

So, allocating your money in the Funding panel only affects how the AI tries to budget the automatic construction of ships, bases, facilities, and troops. Under manual control of construction and troops, the percentages have zero impact. You can leave it at 100% for facilities, which would change nothing.

As I see it, since maintenance costs are paid no matter what, there should be no negative penalties for insufficient funds aside from being unable to buy state assets. It balances itself out. Only if maintenance is NOT paid should there be a penalty. The state has an infinite credit limit, practically speaking, regarding maintenance costs and the specific purchase that puts reserves in the negative.

And since the empire is doomed if it can't buy state assets for long, this is enough penalty, IMO.
Jorgen_CAB
Posts: 866
Joined: Wed Mar 17, 2010 7:53 pm

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Jorgen_CAB »

The only thing I could see is that the state would have to pay a small interest on their deficit. Likely the deficit are like bonds taken out or simply loans in some other form from the civilian sector.

The devs could also tie it into the civilian budget, so any deficit is taken out of their pile of cash and the state would have to pay them interest. If you run that dry as well the empire would go into some form of economic crisis which could have different sort of effect.

You could then expand on this mechanic and allow the player to issue war bonds during war and use the money in the civilian treasury for a cost once those bonds mature. In peace time you might also be able to borrow funds from the civilian sector as well but for a slightly higher price. The price at which you can reach into the funds of the civilian economy should depend on the government type and the stability of the empire as a whole.

In any way... I think there are opportunities for future expansion materials at least to some degree here.
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

I love that idea, Jorgen_CAB! It reflects an absolute limit to what an empire could do, money be damned.
StormingKiwi
Posts: 309
Joined: Thu Feb 11, 2021 6:35 am

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by StormingKiwi »

I have been off the scene for a while, what's the context of this discussion? Is this the same conversation ongoing since January?


Regarding the topic

In the hub and spoke model, stuff moves from point to hub (distribution centre), then along the spoke to the point (fulfilment centre). It's a model of transshipment.

In DW2 in February 2023, there was no transshipment, it was a point to point network. Has this been altered?
I'd be incredibly surprised if so, there is nothing mentioned in patch notes for such a significant change.


If Distant Worlds did have Hub and Spoke:
The supply point would be the mine.
The spoke would be the route freighters travel from supply point to hub, or from hub to demand point.
The hub would be an intermediate station - in many cases, a spaceport or colony.
The demand point would be the colony, which fulfils demand from population, the orbiting spaceport and visiting ships.


Based on the evidence you've presented, the problem is not that the automation built too many demand points, but that it did not balance building demand points with supply points, building more demand than it had the ability to supply, and caused an imbalance.

Yeah sure, a shortage caused by insufficient supply is to be expected... but how is this your fault?

In your test, you, the player, had no involvement. Everything was done by the automation, so the claim of player fault is not credible.

Of course, it is reasonable to expect "intelligent" automation not to be so dismally stupid.

While the automation setting was changed from normal to very high, both of these are in the designed range and were implemented by the developer. Neither setting should break the game.

The developer programmed the automation and the developer reduced the caslon mining rate. I doubt the rate reduction propagated through to suitably adjust the construction automation.

In any case, an automated test using developer designed variations proves there is no player factor.


As a postscript, it is claimed that freighters take excess resources to the capital as a destination of last resort. Again, this is an undocumented change and I would be surprised if it turned out to be true.

In previous versions, mining stations filled up until full, then stopped producing, and freighters never seemed to visit them to empty after that occurred. Their excess remained on station. I believe they dropped off the list of valid sources because they had zero production rate.
The Ghost Fleet Base kept its excess luxury resources too.
Zero record of this behaviour changing.

If a freighter had excess resource, it carried that around forever or until it retrofitted, then storage at the retrofitting yard received the resource.

Salvage did get transported to a spaceport on next visit by the ship, whether that was always the capital, the nearest, or simply fortuitous for the next one visited during normal missions, I don't recall.
User avatar
Nightskies
Posts: 271
Joined: Tue Aug 09, 2016 3:00 am
Location: Colorado

Re: Spaceports and Resource Demand - the Hub and Spoke

Post by Nightskies »

"Based on the evidence you've presented, the problem is not that the automation built too many demand points, but that it did not balance building demand points with supply points, building more demand than it had the ability to supply, and caused an imbalance."
Half-full, half-empty. Same thing, just a twist of how you look at it. There are only so many supply points available, and normally, around that time in the game, the automation would build 3 spaceports- hubs- while grabbing most or all of the high-priority supply points. That is the standard to which AI handles logistics. 9 or more is "built too many demand points".
"Yeah sure, a shortage caused by insufficient supply is to be expected... but how is this your fault?

In your test, you, the player, had no involvement. Everything was done by the automation, so the claim of player fault is not credible.

Of course, it is reasonable to expect "intelligent" automation not to be so dismally stupid.

While the automation setting was changed from normal to very high, both of these are in the designed range and were implemented by the developer. Neither setting should break the game."
Player action: Direct building spaceports at every possible location
Result: The point of the OP. The action of the player is the cause of the problem. The AI does not build spaceports prolifically.

As I understand what you're saying, another way of putting it (to convey understanding) is that the AI should adjust itself to compensate for the player's error. Or, perhaps, you're expecting the logistic system to work harder to cover increased demand. Or that the AI takes the further steps required to handle the demand. For the player's action. The player's error.

You identify AI as intelligent, but it is not. Having artificial intelligence does not mean it possesses intelligence. It is merely intelligently made. It is not made to babysit the player but to run an empire. If the player tampers with the process, the results of those actions are on the player. Their ignorance of the AI's process is no excuse.

It is a game, but as said in the OP, the AI's handling of the empire should be understood enough by the player that when problems arise, they should be able to identify and remedy the problem.

You propose that AI should be made stronger to compensate for player ignorance, but I think the option should be taken away if you believe the player shouldn't have options that break the game.

Ultimately this argument has very little to do with the discussion, so I'll speak no more on it. I am not saying "your ignorance" or anything along those lines; these are general statements about player action. Further, I do not believe players who do such things are stupid, but the erroneous action and inability to identify and remedy problems that arise from the actions are stupid. We all do dumb things.
If Distant Worlds did have Hub and Spoke:
The supply point would be the mine.
The spoke would be the route freighters travel from supply point to hub, or from hub to demand point.
The hub would be an intermediate station - in many cases, a spaceport or colony.
The demand point would be the colony, which fulfils demand from population, the orbiting spaceport and visiting ships.

...

As a postscript, it is claimed that freighters take excess resources to the capital as a destination of last resort. Again, this is an undocumented change and I would be surprised if it turned out to be true.
Image

I have independently studied the freighter's behavior before this was posted by Erik, and knew this to be the case already.
In previous versions, mining stations filled up until full, then stopped producing, and freighters never seemed to visit them to empty after that occurred. Their excess remained on station. I believe they dropped off the list of valid sources because they had zero production rate.
The Ghost Fleet Base kept its excess luxury resources too.
Zero record of this behaviour changing.
That's because the Ghost Fleet Base is a small source. I have seen stations get emptied if demand is sufficiently higher than supply when I set stock level to 0 across the board. Under normal circumstances, freighters will not bother with what the Ghost Fleet Base has, especially if the target stock is left on automatic- it'll never be emptied but rather be supplied with more.

There is a maximum stock limit. Once colonies and stations have reached that limit, freighters will not pick up more until some is used up.
Post Reply

Return to “Distant Worlds 2”