This is the in-depth information for terraforming costs, see
viewtopic.php?f=157&t=58
for the basics
-------------------------------------------------------------
-------------------------------------------------------------
First of all, I've found a very useful global multiplier for terraforming costs. It's located in trek.exe, starting position 0x0017d3c8, length 4 bytes. The default value is 0.1, and this leads to the expanded formula:
[terraforming cost] = 10 * [global multiplier] * [planet's population capacity] * ( [planet type coefficient] + [planet atmosphere coefficient] )
If the sum of the 2 coefficients is 0 or negative AND the planet's atmosphere is "oxygen rich" or "thin oxygen" (maybe also "none", but there's no way to test it yet), then the planet does not need to be terraformed at all, and it's class letter will appear green on the system screen.
In all other cases, the result of the expanded formula is cut at the decimal point and then taken modulo 65536 so that it's within the interval [0 ; 65535]. This can make the planet "green" by accident (if it hits 0), regardless of atmosphere.
I've found the coefficients for all atmosphere types except "none" in trek.exe:
coefficient for "thin oxygen" atmosphere
starting position: 0x0017d3a8
length: 8 bytes
default value: -1.0
coefficient for "sulfuric" atmosphere
starting position: 0x0017d3b0
length: 8 bytes
default value: +1.25
coefficient for "rich oxygen" atmosphere
starting position: 0x0017d3b8
length: 8 bytes
default value: -1.5
coefficient for "methane" atmosphere
starting position: 0x0017d3c0
length: 8 bytes
default value: +1.5
I haven't found the planet classes' coefficients yet, also the coefficient for atmosphere type "none" is missing. It's 1.0 by default, so maybe it's not stored at all.
Terraforming Costs (advanced)
Moderator: thunderchero
Terraforming Costs (advanced)
Last edited by Gowron on Sat Sep 27, 2008 8:03 pm, edited 1 time in total.
Update:
Indeed, the coefficient for atmosphere type "none" is not stored explicitly, but instead it's implemented this way (position 0xAF42C):It could still be changed, for example by sharing a coefficient with another atmosphere type.
The coefficients for the planet classes have not been able to hide
Indeed, the coefficient for atmosphere type "none" is not stored explicitly, but instead it's implemented this way (position 0xAF42C):
Code: Select all
D9E8 // fld1
DEC1 // faddp
The coefficients for the planet classes have not been able to hide
Here they come (all stored as 4-byte floats): Code: Select all
|
---|
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
If you only want to change the number of buildings (and/or the initial population), then you can do so directly, without the detour via terraforming costsDOT wrote:Result: terraforming lasts nearly as long as in plain vanilla, but when colonising a planet there are the increased numbers of buildings.
http://armadafleetcommand.com/onscreen/ ... topic&t=64
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
You don't need assembler knowledge for this, it's just basic hex editing. Open trek.exe and go to position 0x18E2B8, and you'll find this data table:DOT wrote:You know, maybe I understand some basic assembler codes, but 32bit register were introduces after i quit programming.
So, can you translate the information of your link to me and all the others? Would be great... :-)
Code: Select all
0A 00 00 00 01 00 00 00 00 00 00 00 // CS production = 0
0A 00 00 00 02 00 00 00 00 00 00 00 // CS production = 1
14 00 00 00 02 00 00 00 01 00 00 00 // CS production = 2
14 00 00 00 03 00 00 00 01 00 00 00 // CS production = 3
For example, with production=1 we have
Code: Select all
0A 00 00 00 02 00 00 00 00 00 00 00
The second value, 02000000, means 2(dec). It's the number of farms that the system gets for free. The third value, 00000000, is the number of "free" factories (none in this case).
All of these values can be edited directly with a hex editor
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.