Economy Calculator and Guide to max population, revenue, support costs, and corruption

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

OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »


Note: This is still accurate as of 1.3.5 Beta. Nothing has changed.
I've been working on this for at least the past week in collecting data and estimating the equations at play in producing all this.

I've consolidated all of this into a calculator, which is given in the video description
of the accompanying YouTube video https://youtu.be/gia-idxfZhs


Image

Max Population

As Erik has said on the forums, the max population of any planet is only based upon its suitability and size. The population the game quotes as the maximum is instead showing quality and size, which won't match up.

The formula for calculating the true max pop is roughly:

(9.429 * 10^-6 * Suitability) * Diameter^2

Image

I have the extra tiny decimal just because it made the numbers pop out a bit better in some cases, but can probably be dropped.

Revenue

The true formula for calculating your current revenue depends upon how filled up your planet is, in terms of current pop vs max pop (percentage filled).
Past 50% full, revenue gain slows down considerably, and the revenue gain further slows down once you get past 75% of max pop. This max pop figure is based upon the suitability curves above, not what the game says is the max pop in the colony details.

Here's a direct example of a revenue curve, with a formula for calculating revenue at max pop.

Image

But as stated, the direct formula will depend on where your current population is at in percentage terms. The maximum revenue gain (up to 50% max pop) is shown below, and also demonstrates that suitability has a proportional effect on revenue, i.e. suitability 60 will earn around three times as much as suitability 20. The same goes for development, a world with 150% development will earn three times as much as a development 50% world.

Image

Support Costs

Starts at a fixed cost of 1000 credits. This seems to increase at a fixed rate for every suitability point below 20. So at 19 suitability, the support cost is 1447 credits. This may differ across difficulties, but my game seems bugged at the moment and isn't adjusting things based upon difficulty.

Fixed cost further increases once you get to 50% of max pop, with each additional 1M population increasing support costs by 2 credits.

So if a world has a max capacity of 10000M (10billion), the halfway point is 5000M, and a population of 7500M would cost you 6000 credits (1000 + [2500*2]).

Corruption

Starts at a fixed number depending upon difficulty.

Normal

Starts at 5%. The current population is divided by the max population to give you a percentage filled number. That portion is then multiplied by 0.4 and added to the base of 5%, e.g. 50% filled is 50*0.4 = 20

20+5 = 25% corruption at planet half filled.

Hard

Starts at 10% base rate instead. The population percentage is similarly multiplied but at double the rate, so it's multiplied by 0.8 and added to the base of 10.

50% filled planet therefore gives 50*0.8 = 40

40+10 = 50% corruption at planet half filled.

Tax Rate

Tax Rate contributes to overall corruption only if you go over 20% tax rate. Each additional percentage adds another 0.5% to corruption.

E.g.

25% tax rate - 20% tax = 5% tax over 20.

5 * 0.5 = 2.5% additional corruption

Corruption Reduction

Doesn't really apply as a true percentage multiplier or anything. So having +50% colony corruption reduction won't suddenly halve the corruption present. Instead, corruption after applying colony corruption reduction is calculated as follows, with reductions in decimal form (50% is 0.5)

Image


Bringing it all together

Net tax revenue tends to drop after a certain point, and requires adding more development and colony corruption reduction just to keep up. But if you have the option, deliberately killing your own population can get you more tax, as long as you retain the same development %, which from population caps at 50% from 5000M population.

Here's an example of that in action. Note that the falloff point where you're actually earning LESS tax with more population depends upon what difficulty you're playing at. Below is a normal difficulty, and a hard difficulty net tax revenue result.

Image

Image

Now, I understand diminishing returns, but the current system promotes deliberately killing your own population to be either at 75% full, or at 50% full for normal or hard difficulty respectively. Different difficulties I can't currently comment on, as again my game isn't applying difficulty settings correctly.
Last edited by OloroMemez on Tue Apr 19, 2022 12:13 pm, edited 2 times in total.
User avatar
SamuraiProgrmmr
Posts: 416
Joined: Sun Oct 17, 2004 3:15 am
Location: NW Tennessee

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by SamuraiProgrmmr »

AWESOME WORK!

Thank you for your time, effort, and skill!
Bridge is the best wargame going .. Where else can you find a tournament every weekend?
WiZz
Posts: 542
Joined: Wed Sep 28, 2011 1:28 pm
Location: Ukraine

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by WiZz »

Thanks, but why we can't see results of all these calculations in the game directly?
OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »

WiZz wrote: Fri Mar 25, 2022 6:15 pm Thanks, but why we can't see results of all these calculations in the game directly?
I'm not entirely sure what you mean - do you mean why bother with the calculator if the game directly tells you? If that's what you're asking, the tool can let you know far ahead of time what the likely revenue is going to be on any planet you colonise.
WiZz
Posts: 542
Joined: Wed Sep 28, 2011 1:28 pm
Location: Ukraine

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by WiZz »

OloroMemez wrote: Fri Mar 25, 2022 7:35 pm I'm not entirely sure what you mean - do you mean why bother with the calculator if the game directly tells you? If that's what you're asking, the tool can let you know far ahead of time what the likely revenue is going to be on any planet you colonise.
No, I meant that game should show max possible population directly in UI.
User avatar
Emperor0Akim
Posts: 295
Joined: Tue Apr 19, 2016 2:12 pm
Location: Germany

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by Emperor0Akim »

WiZz wrote: Fri Mar 25, 2022 7:46 pm
OloroMemez wrote: Fri Mar 25, 2022 7:35 pm I'm not entirely sure what you mean - do you mean why bother with the calculator if the game directly tells you? If that's what you're asking, the tool can let you know far ahead of time what the likely revenue is going to be on any planet you colonise.
No, I meant that game should show max possible population directly in UI.
Yeah it should,

OloroMemez just proved that the game uses the wrong calculation to display MaxPop.
Also Suitability is variable, so first shown MaxPop can differ to actual MaxPop


Thank you OloroMemez for this brilliant work of reverse statistics :)

A question though,

If my Empire may have some Government Type that is not represented in your list,
and my Race might slightly differ in their potential to reduce corruption.
Constant DW2 Wishlist :
Sort build locations by Solar System
Cycle Idle Ships
ETA for Ships and Fleets
Messages for finished Ship Missions
Messages for Character Promotion ( Skills / Traits )
OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »

Emperor0Akim wrote: Sun Mar 23, 1975 4:30 pm If my Empire may have some Government Type that is not represented in your list,
and my Race might slightly differ in their potential to reduce corruption.
Hehe you using modified values? Under sheets, go to View and unhide the support costs one. Forgive the formatting, but there will be a list of governments and the species that have an effect on corruption, and you can quickly tweak the values of a species and government type to match what your modified values are in game.
baldamundo
Posts: 85
Joined: Sun Mar 13, 2022 4:58 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by baldamundo »

Thanks - really helpful! Definitely needs adjusting though - the high population drop-off of income on higher difficulty looks ridiculous, and is not made clear anywhere in-game, and the game gives you essentially no tools for dealing with it - other than committing periodic genocides against your own population. Which presumably isn't the intended behaviour.
ClassicAz
Posts: 42
Joined: Sat Sep 18, 2021 11:15 pm

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by ClassicAz »

baldamundo wrote: Sat Mar 26, 2022 12:15 am Thanks - really helpful! Definitely needs adjusting though - the high population drop-off of income on higher difficulty looks ridiculous, and is not made clear anywhere in-game, and the game gives you essentially no tools for dealing with it - other than committing periodic genocides against your own population. Which presumably isn't the intended behaviour.
Another factor that needs to be considered is that if luxury resource consumption scales with population it becomes harder to boost development (either due to the various logistical issues at the moment, or because luxury extraction rates are too low) and therefore is a double-whammy. Really really silly behaviour....
OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »

ClassicAz wrote: Sat Mar 26, 2022 2:40 am
Another factor that needs to be considered is that if luxury resource consumption scales with population it becomes harder to boost development (either due to the various logistical issues at the moment, or because luxury extraction rates are too low) and therefore is a double-whammy. Really really silly behaviour....
I haven't formally tested this, but other players on the discord have mentioned that higher pop does result in more luxury resource gain.

So really, there's lots of motivation to deliberately kill population, or at the very least to send them to another planet so they're actually earning income and not being a net drain.
User avatar
Emperor0Akim
Posts: 295
Joined: Tue Apr 19, 2016 2:12 pm
Location: Germany

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by Emperor0Akim »

OloroMemez wrote: Fri Mar 25, 2022 9:11 pm
Emperor0Akim wrote: Sun Mar 23, 1975 4:30 pm If my Empire may have some Government Type that is not represented in your list,
and my Race might slightly differ in their potential to reduce corruption.
Hehe you using modified values? Under sheets, go to View and unhide the support costs one. Forgive the formatting, but there will be a list of governments and the species that have an effect on corruption, and you can quickly tweak the values of a species and government type to match what your modified values are in game.
Thank you :)
I modified just a smidge. The Imperium of Man has to reign supreme.
Constant DW2 Wishlist :
Sort build locations by Solar System
Cycle Idle Ships
ETA for Ships and Fleets
Messages for finished Ship Missions
Messages for Character Promotion ( Skills / Traits )
OrnluWolfjarl
Posts: 304
Joined: Fri Oct 20, 2017 8:36 pm

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OrnluWolfjarl »

Thanks for this! Very useful tool and great to know how things work under the hood!
User avatar
Erik Rutins
Posts: 39561
Joined: Tue Mar 28, 2000 4:00 pm
Location: Vermont, USA
Contact:

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by Erik Rutins »

This is a remarkable job of reverse engineering, testing and analysis, OloroMemez.

I see what you were talking about now and it's clear that especially with regard to Difficulty, we didn't factor in the effect of the additional corruption on high end colonies. We tightened up the economy a bit more shortly before release and thought we hadn't gone too far, but clearly we had. We'll fix that and rebalance the curve as soon as we can.
Erik Rutins
CEO, Matrix Games LLC


Image

For official support, please use our Help Desk: http://www.matrixgames.com/helpdesk/

Freedom is not Free.
OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »

Thank you for the kind words, Erik. I certainly appreciated the complexity that was going on in the code, with all those non-lineae curves ;)

I've written a rough python script used to produce those two figures at the bottom, so if you like I can clean it up and send it to you, so you can tweak any value you like and observe the effect. All I ask is you please provide any new coefficients in future patch notes or something, so I don't have to test it for another week :lol:
ClassicAz
Posts: 42
Joined: Sat Sep 18, 2021 11:15 pm

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by ClassicAz »

Erik Rutins wrote: Sat Mar 26, 2022 3:53 pm This is a remarkable job of reverse engineering, testing and analysis, OloroMemez.

I see what you were talking about now and it's clear that especially with regard to Difficulty, we didn't factor in the effect of the additional corruption on high end colonies. We tightened up the economy a bit more shortly before release and thought we hadn't gone too far, but clearly we had. We'll fix that and rebalance the curve as soon as we can.
Thanks Erik. On any sort of greater than Hard difficulty setting, Republic, Hive Mind, Democracy or Way/Path of the Ancients feels kinda mandatory.
OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »

Calculator updated to version 1.05, so please make a new copy of your sheet from the following link: https://docs.google.com/spreadsheets/d/ ... sp=sharing

Other options to specify colony income bonuses are now included. Income bonus can still be manually accounted for, such as if you have a number of leaders that all provide income bonuses, you can just write the total bonus in a whole number. Note that the manual amount entered does not replace bonuses from other sources, so if you enter 10 and select a government such as Way of Ancients, it will apply the 10% bonus twice, so only manually enter income bonuses that are not already due to artifact, government, or buildings.

*Government list now includes Path of the Ancients
*Selected government type now applies the appropriate colony income bonus to expected revenue and resultant base revenue and net tax revenue
*Included selection of colony income bonuses - one artifact, and all five buildings that either increase or reduce colony income.
User avatar
Scott2933
Posts: 634
Joined: Sat Jul 19, 2014 10:32 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by Scott2933 »

Great work! Super helpful!
zgrssd
Posts: 5064
Joined: Tue Jun 09, 2020 1:02 pm

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by zgrssd »

I am a bit confused about the formula in this part:
Max Population

As Erik has said on the forums, the max population of any planet is only based upon its suitability and size. The population the game quotes as the maximum is instead showing quality and size, which won't match up.

The formula for calculating the true max pop is roughly:

(9.429 × 10-6 * Suitability) * Diameter^2
My issues are:
You use two different markers for Multiplication - x and *

Also I am uncertain if it is supposed to the parsed like this:
"(9.429 × 10) - (6 * Suitability)"
At wich point the x 10 would be pointless and it should just be "94.29 - (6 * Suitability)"
Or if it is
"9.429 × (10-6 * Suitability)"
which realy would need the bracket.
OloroMemez
Posts: 50
Joined: Sun Mar 13, 2022 1:47 am

Re: Economy Calculator and Guide to max population, revenue, support costs, and corruption

Post by OloroMemez »

Have re-expressed the formula. The way I wrote it was even less clear than I realised. The 10 is taken to the negative sixth power for scientific notation.
Last edited by OloroMemez on Tue Apr 12, 2022 10:26 pm, edited 1 time in total.
Post Reply

Return to “Distant Worlds 2”