# Terraforming Calculator

I had mentioned this in the thread ‘New Features Desired’ before as well. A price calculator.
It helps to get an idea of how much terraforming will be worth and how much building on a star will cost when it switches hands. It would be like the battle calculator. Players could enter their terraforming level, the natural resources of a star, and how much infrastructure already exists on the star.

4 Likes

I put this table together some time ago. Hope it helps.

3 Likes

Holy shit Brian! WOW!

In short, the formula is

``````(base_price / resources on a star) * n-th infrastructure
``````

Base prices are

``````Warpgate = 10000 (cheap)
Science  = 4000 (normal, cheap = 0.5x, expensive = 2x)
Industry = 1000
Economy  = 500
``````

Actually there is a rounding flaw with the numbers. We discovered it quite a while ago, but since there are better tools out there, I never updated it. Christopher Sharman has a great spreadsheet that does almost exactly what Worldsocold was probably looking for. I’ve quoted his old post here:

I made a little something a while ago along this same idea. Just plug in your EIS levels along with a star name and it’ll show you how much money you will save if you bought before or after a terraforming upgrade.

Feel free to copy the sheet to your own account. Only edit the green boxes, the other data will show when that’s done.

Neptune's Pride Calculations - Google Sheets

I haven’t checked to see if he has updated it, but it did suffer from the same rounding issue. I’m not sure how Jay has the game do the calculation, but Chris Lee determined that we had to add a RoundDown into the formula at some point to get the same prices as the game.

I have since made a Excel spreadsheet that works really well for me. I gave up on Google because the calculation lag times were getting pretty bad. I use the Galaxy view data export and the import it into my spreadsheet. Currently, I have it calculate the next 9 levels of Econ, 4 Ind and 3 Sci. I can then sort and determine what to buy within my price range.

Chris has been getting some help from Christopher to make an even better version, I just haven’t played with it yet.

1 Like

The exact formula from the code looks like this…

``````  return Math.floor((2.5 * NeptunesPride.gameConfig.developmentCostEconomy * (star.e + 1)) / (star.r / 100));
``````

Is a bit weird because It kind of evolved.

1 Like

I believe that `NeptunesPride.gameConfig.developmentCostEconomy` is the price modifier and assumes values of `2` for normal, `4` for expensive and `1` for cheap, right?

then it can be expressed as (for 0 economy built)

``````(2.5 * m * (e + 1)) / (r / 100)
(2.5 * m * (0 + 1)) * (100 / r)
(2.5 * m * 1) * (100 / r)
2.5m * 100 / r
250m / r
``````

and for

``````cheap, m=1:
250 / r
normal, m=2:
500 / r
expensive, m=4:
1000 / r
``````

Which is essentially what I found out `:)`, cool

edit: And for other infrastructure, for nth infrastructure’s price, the formula is

``````(kind * modifier * 100) / resources * nth
modifier:
cheap = 1
normal = 2
expensive = 4
kind:
economy = 2.5
industry = 5
science = 20
warpgate = 50

the modifier for warpgate is actually
cheap = 2
expensive = 4``````
1 Like