Author Topic: Any terraforming calculator?  (Read 5830 times)

0 Members and 1 Guest are viewing this topic.

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Any terraforming calculator?
« Reply #15 on: August 14, 2020, 08:57:56 AM »
The query is limiting results to only show what one race knows.
And it chooses the most recently created player race.

At least, that's the intent, and it works in my games.
If you send me your db I'll dig into it.

Hmm, I see that Earth and Minerva have different ParentBodyIDs; Sol has 0 and Minerva has 3234.
 

Offline Zincat

  • Captain
  • **********
  • Z
  • Posts: 566
  • Thanked: 111 times
Re: Any terraforming calculator?
« Reply #16 on: August 14, 2020, 09:40:54 AM »
You should really post this in the utilies subforum skoormit XD

I will make use of this one, thank you.
 

Offline skoormit

  • Rear Admiral
  • **********
  • Posts: 812
  • Thanked: 327 times
Re: Any terraforming calculator?
« Reply #17 on: August 14, 2020, 09:45:27 AM »
The query is limiting results to only show what one race knows.
And it chooses the most recently created player race.

At least, that's the intent, and it works in my games.
If you send me your db I'll dig into it.

Hmm, I see that Earth and Minerva have different ParentBodyIDs; Sol has 0 and Minerva has 3234.

Ah-ha!
It appears that the default planets in Sol (i.e. not Minerva) are treated differently in the database.
They have a ParentBodyID of 0 rather than the ID of the star they orbit.

Since I don't start in Sol (I generate a random race in a random system), this hasn't affected me.

Give me a few minutes and I'll modify the SQL to account for Sol starts.
 

Offline skoormit

  • Rear Admiral
  • **********
  • Posts: 812
  • Thanked: 327 times
Re: Any terraforming calculator?
« Reply #18 on: August 14, 2020, 10:03:31 AM »
The query is limiting results to only show what one race knows.
And it chooses the most recently created player race.

At least, that's the intent, and it works in my games.
If you send me your db I'll dig into it.

Hmm, I see that Earth and Minerva have different ParentBodyIDs; Sol has 0 and Minerva has 3234.

Here's the fix:

Immediately after these lines:
Code: [Select]
inner JOIN
FCT_Star as str
on
str.StarID = ifnull(sb_parent.ParentBodyID,sb.ParentBodyID)

Insert these lines:
Code: [Select]
or
(
--special case for Sol
--default bodies in Sol (i.e. not Minerva) have a ParentBodyID of 0
--since we know that Sol is a single-star system, we can just take the star that matches the SystemID
ifnull(sb_parent.ParentBodyID,sb.ParentBodyID) = 0
AND
str.SystemID = sys.SystemID
)

Result should look like:
Code: [Select]
inner JOIN
FCT_Star as str
on
str.StarID = ifnull(sb_parent.ParentBodyID,sb.ParentBodyID)
or
(
--special case for Sol
--default bodies in Sol (i.e. not Minerva) have a ParentBodyID of 0
--since we know that Sol is a single-star system, we can just take the star that matches the SystemID
ifnull(sb_parent.ParentBodyID,sb.ParentBodyID) = 0
AND
str.SystemID = sys.SystemID
)

Let me know if anything still (or anything else) seems amiss.
 
The following users thanked this post: db48x

Offline skoormit

  • Rear Admiral
  • **********
  • Posts: 812
  • Thanked: 327 times
Re: Any terraforming calculator?
« Reply #19 on: August 14, 2020, 10:33:33 AM »
You should really post this in the utilies subforum skoormit XD

Good idea.
Done.
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Any terraforming calculator?
« Reply #20 on: August 14, 2020, 10:57:18 AM »
Hmm, I see that Earth and Minerva have different ParentBodyIDs; Sol has 0 and Minerva has 3234.

Here's the fix:

Immediately after these lines:

Let me know if anything still (or anything else) seems amiss.

Yea, that did the trick:

Code: [Select]
SOL|SOL-A1|4.88|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0.0|2|0.38|0.0|Y|409.853449623052|1.7|0|0|0|0|0
SOL|Sa Mines|12.104|0|0|0|0|11883.3558456979|13462.1937193773|0|0|22150.4044423818|0|32938.9783726841|0|0|0|0|0.1|1.0|0|0|0.8|0|0.7|2.6|2.6|2.6|2.6|0.25|68.5515765344433|2|0.
91|0.0||299.896247619238|1.0|0|0|0|89.745|3.255
SOL|Earth|12.756|11.2671006080972|12.5101746805206|18.9365619478989|0|0|80.728888913854|0|122.963028564712|0|0|0|0.21|0.21|0.24|0|0|0.51|0|0.62|0|0|0|0|0.62|1.79|1.79|0.0|0.2
03691917478566|2|1.0|0.697191653829571||255.0|1.02318|0.2|0|0|0|0.8
SOL|SOL-A3M1|3.474|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0.0|10|0.1654|0.0|M|255.0|1.0|0|0|0|0|0
SOL|Mars|6.8|12629.2748993437|11324.7498165573|1997.53453245819|0|0|0|249.080349015484|0|0|0|0|0.6|0.1|0.8|0|0|0|0.9|0|0|0|0|1.5|2.4|2.4|2.4|0.0|27.505164680161|2|0.38|0.3333
80233670666||206.560700121407|1.03499048288813|0.100283125441885|0.369781450755004|0|0.000343087138326176|0.000258

Thanks!

Also, I made one other tweak that I forgot to mention. Real Stars universes frequently have star names from catalogs like HH Andromedea, or NN 3849. Therefore I changed the query so that the system and body names are abbreviated using substr(replace(sys.Name,' ',''),1,5). This skips the spaces and makes them a little longer, but they don't take too much extra space.
 
The following users thanked this post: skoormit

Offline Froggiest1982

  • Gold Supporter
  • Vice Admiral
  • *****
  • F
  • Posts: 1335
  • Thanked: 594 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
    2022 Supporter 2022 Supporter : Donate for 2022
    2023 Supporter 2023 Supporter : Donate for 2023
Re: Any terraforming calculator?
« Reply #21 on: August 14, 2020, 03:22:10 PM »
Does anybody know how much water vapour we get into the atmosphere one the ice melts?

It should be the equalization pressure for the current total ATM and hydro extent.
From Steve's post:
Code: [Select]
Atmospheric Pressure * (Hydro Extent / 100) * 0.01 atm

Thanks, I'll run a couple of tests

Offline Froggiest1982

  • Gold Supporter
  • Vice Admiral
  • *****
  • F
  • Posts: 1335
  • Thanked: 594 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
    2022 Supporter 2022 Supporter : Donate for 2022
    2023 Supporter 2023 Supporter : Donate for 2023
Re: Any terraforming calculator?
« Reply #22 on: August 15, 2020, 09:29:22 PM »
Does anybody know how much water vapour we get into the atmosphere one the ice melts?

It should be the equalization pressure for the current total ATM and hydro extent.
From Steve's post:
Code: [Select]
Atmospheric Pressure * (Hydro Extent / 100) * 0.01 atm

Thanks, it does work, now I am trying to figure how much water evaporates once ice melts ;D

it should be the resulting atm *20 - current hydrosphere based on the post, however all simulation I am running have somehow returned different figures.
« Last Edit: August 15, 2020, 09:32:59 PM by froggiest1982 »
 

Offline skoormit

  • Rear Admiral
  • **********
  • Posts: 812
  • Thanked: 327 times
Re: Any terraforming calculator?
« Reply #23 on: August 15, 2020, 09:42:42 PM »
Does anybody know how much water vapour we get into the atmosphere one the ice melts?

It should be the equalization pressure for the current total ATM and hydro extent.
From Steve's post:
Code: [Select]
Atmospheric Pressure * (Hydro Extent / 100) * 0.01 atm

Thanks, it does work, now I am trying to figure how much water evaporates once ice melts ;D

it should be the resulting atm *20 - current hydrosphere based on the post, however all simulation I am running have somehow returned different figures.

We know that 0.5 atm of vapor = 20 hydro extent.
So the ratio of vapor atm to hydro is 1:40.
Multiply your equalization vapor atm by 40, and that should be how much hydro was turned into vapor.
 
The following users thanked this post: Froggiest1982

Offline Froggiest1982

  • Gold Supporter
  • Vice Admiral
  • *****
  • F
  • Posts: 1335
  • Thanked: 594 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
    2022 Supporter 2022 Supporter : Donate for 2022
    2023 Supporter 2023 Supporter : Donate for 2023
Re: Any terraforming calculator?
« Reply #24 on: August 16, 2020, 03:15:26 AM »
Does anybody know how much water vapour we get into the atmosphere one the ice melts?

It should be the equalization pressure for the current total ATM and hydro extent.
From Steve's post:
Code: [Select]
Atmospheric Pressure * (Hydro Extent / 100) * 0.01 atm

Thanks, it does work, now I am trying to figure how much water evaporates once ice melts ;D

it should be the resulting atm *20 - current hydrosphere based on the post, however all simulation I am running have somehow returned different figures.

We know that 0.5 atm of vapor = 20 hydro extent.
So the ratio of vapor atm to hydro is 1:40.
Multiply your equalization vapor atm by 40, and that should be how much hydro was turned into vapor.

Thanks, I still believe something is wrong . The general calc for temperature on surface (base*albedo*gh factor) does also return different values than the one that should be after terraforming a planet.

Offline skoormit

  • Rear Admiral
  • **********
  • Posts: 812
  • Thanked: 327 times
Re: Any terraforming calculator?
« Reply #25 on: August 16, 2020, 09:12:03 AM »
Does anybody know how much water vapour we get into the atmosphere one the ice melts?

It should be the equalization pressure for the current total ATM and hydro extent.
From Steve's post:
Code: [Select]
Atmospheric Pressure * (Hydro Extent / 100) * 0.01 atm

Thanks, it does work, now I am trying to figure how much water evaporates once ice melts ;D

it should be the resulting atm *20 - current hydrosphere based on the post, however all simulation I am running have somehow returned different figures.

We know that 0.5 atm of vapor = 20 hydro extent.
So the ratio of vapor atm to hydro is 1:40.
Multiply your equalization vapor atm by 40, and that should be how much hydro was turned into vapor.

Thanks, I still believe something is wrong . The general calc for temperature on surface (base*albedo*gh factor) does also return different values than the one that should be after terraforming a planet.

Post some specifics, if you can. I'll take a closer look.
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Any terraforming calculator?
« Reply #26 on: August 16, 2020, 04:31:18 PM »
Here's my version with my modifications, in case anyone wants to build on them. In addition to what I've mentioned before, I moved the race data to it's own sheet, and changed the mineral score to take quantity into account as well as accessibility. I also pasted all the formulas down to row 9999, just because a few thousand planets had fallen off the end of the spreadsheet when I first started and I didn't want to have to expand it too often. If I knew of a way to make _all_ rows on that sheet have the same formulas and formatting, I'd use that instead.

Also, I'm sure there's a way to hook a spreadsheet directly to an sql database. I've never done it before, but I'm thinking about looking in to it.
 

Offline Froggiest1982

  • Gold Supporter
  • Vice Admiral
  • *****
  • F
  • Posts: 1335
  • Thanked: 594 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
    2022 Supporter 2022 Supporter : Donate for 2022
    2023 Supporter 2023 Supporter : Donate for 2023
Re: Any terraforming calculator?
« Reply #27 on: August 16, 2020, 08:44:19 PM »
Does anybody know how much water vapour we get into the atmosphere one the ice melts?

It should be the equalization pressure for the current total ATM and hydro extent.
From Steve's post:
Code: [Select]
Atmospheric Pressure * (Hydro Extent / 100) * 0.01 atm

Thanks, it does work, now I am trying to figure how much water evaporates once ice melts ;D

it should be the resulting atm *20 - current hydrosphere based on the post, however all simulation I am running have somehow returned different figures.

We know that 0.5 atm of vapor = 20 hydro extent.
So the ratio of vapor atm to hydro is 1:40.
Multiply your equalization vapor atm by 40, and that should be how much hydro was turned into vapor.

Thanks, I still believe something is wrong . The general calc for temperature on surface (base*albedo*gh factor) does also return different values than the one that should be after terraforming a planet.

Post some specifics, if you can. I'll take a closer look.

without going too far, just start a new game and look at Earth, then we terraform Luna (it's perfect because all settings are standard and either 0 or 1) and look at Mars.

Earth:
starting
atm pressure 1.000
GH factor 1.100
Albedo factor 1.023
Base Temperature (Kelvin) 255.000
Surface Temperature (Kelvin) 287.002* displayed
This supposed to be 286.951

Luna:
starting
atm pressure 0.000
GH factor 1.000
Albedo factor 1.000
Base Temperature (Kelvin) 255.000
Surface Temperature (Kelvin) 255.000

Goal
atm pressure 0.335
GH factor 1.051
Albedo factor 1.000
Base Temperature (Kelvin) 255.000
Surface Temperature (Kelvin) 268.112* displayed
*This supposed to be 268.005
Added 0.1 Oxy, 0.0179 Aestusium, 0.2173 Nitrogen

Mars:
starting
atm pressure 0.010
GH factor 1.007
Albedo factor 1.020
Base Temperature (Kelvin) 206.561
Surface Temperature (Kelvin) 212.112* displayed
this already supposed to be  212.167

Goal
atm pressure 0.334
GH factor 1.233
Albedo factor 1.035
Base Temperature (Kelvin) 206.561
Surface Temperature (Kelvin) 263.684* displayed
*This supposed to be 263.604
Remove Carbon Dioxide, Added 0.1 Oxy, added 0.2 Aestusium, adjusted to 0.0336 Nitrogen, adjusted to 20 Hydro
« Last Edit: August 16, 2020, 08:54:05 PM by froggiest1982 »
 

Offline skoormit

  • Rear Admiral
  • **********
  • Posts: 812
  • Thanked: 327 times
Re: Any terraforming calculator?
« Reply #28 on: August 16, 2020, 09:32:59 PM »

Earth:
starting
atm pressure 1.000
GH factor 1.100
Albedo factor 1.023
Base Temperature (Kelvin) 255.000
Surface Temperature (Kelvin) 287.002* displayed
This supposed to be 286.951
...

The values you see in the UI are rounded from the actual values in the database.
Earth's albedo is 1.02318.
With that value, the expected surface temp is 287.00199, which rounds to 287.002.
 

Offline Froggiest1982

  • Gold Supporter
  • Vice Admiral
  • *****
  • F
  • Posts: 1335
  • Thanked: 594 times
  • Gold Supporter Gold Supporter : Support the forums with a Gold subscription
    2021 Supporter 2021 Supporter : Donate for 2021
    2022 Supporter 2022 Supporter : Donate for 2022
    2023 Supporter 2023 Supporter : Donate for 2023
Re: Any terraforming calculator?
« Reply #29 on: August 16, 2020, 09:57:16 PM »

Earth:
starting
atm pressure 1.000
GH factor 1.100
Albedo factor 1.023
Base Temperature (Kelvin) 255.000
Surface Temperature (Kelvin) 287.002* displayed
This supposed to be 286.951
...

The values you see in the UI are rounded from the actual values in the database.
Earth's albedo is 1.02318.
With that value, the expected surface temp is 287.00199, which rounds to 287.002.

I see the problem is that I guess you can see the real full Albedo only in the database then. Thanks