Minor Race Advancement
Posted: Sat Apr 26, 2008 12:27 am
Credit for this post topic; Gowron
Every minor race has 10 evolution levels (you can set the tech levels for each evolution level by using the Ultimate Editor). At the start of each turn, a minor race can either stay at its current EL (evolution level) or advance to the next EL.
There are 3 values in race.rst that influence minor race advancement:
[growth rate]
relative offset (in relation to the start of the minor race's entry): 0x44
type: floating-point
length: 4 bytes
The [growth rate] is also used for the planets' growth values. (use the search function for details)
[speed 1]
relative offset: 0x58
type: integer
signed: yes
length: 2 bytes
[speed 2]
relative offset: 0x5A
type: integer
signed: unknown
length: 2 bytes
1. Orbitals
At the start of a game, every minor race home system has 1 orbital battery per 50 population points (rounded down). So the Ullians with their starting pop of 100 have 2 orbitals. If their starting pop was 99, then they'd only have 1 orbital.
=> Initial Number of Orbitals for Minor Races
Every time a minor race advances, it gets a random number of additional orbitals (min. 1, max. 6, if anyone has seen greater increases, please tell me).
2. Ships (spacefaring races)
If the starting EL is high enough to fulfil the tech requirements for the ship(s) that this race can build, then the race starts with a random number of ships (min. 1, max. 4).
Every time the minor race advances, it gets a random number of additional ships (min. 1, max. 4), but only if both of the following conditions are fulfilled:
a) The new EL is high enough to fulfil the tech requirements for the ship(s).
b) The new population is 61 or more.
3. Population
Each minor race has an internal population number (IPN). At the start of a game, this is identical to the real population number.
At the beginning of every new turn, starting at turn 3, the IPN is updated as follows:
[new IPN] = [old IPN] * ( 1 + 0.1 * [growth rate] )
The result is then cut at the decimal point.
Every time the minor race advances, its real population number is set to its IPN or to the system's max. population space, whichever value is lower. Sometimes they fail to terraform enough planets, but most of the time they will make it.
The IPN is unaffected by bombardments, and the population update takes place after the losses by bombardment are applied. So if a minor race is bombarded during the turn that it advances, its population will be set to its IPN and not be reduced (except if it's completely wiped out, then it won't advance).
4. Advancement Speed
The advancement speed is controlled by the values [speed 1], [speed 2] and by the starting seed. The influence of the starting seed is so strong and erratic that I can't give an exact formula, but I can give you this rule of thumb that will be very accurate in the long-term average:
[turns needed to advance to next EL] ~= 0.306 * ( [number of next EL] + 2 ) * ( 18 - [speed 1] ) / [speed 2]
=> modding hints wrt the EL related delay factor 1/3
The value [speed 1] is between -70 and -15 by default, and it should be kept between -1000 and -15 if you want to use the above rule of thumb. Any further increase (positive values are possible) will result in rapid and very erratic growth.
The value [speed 2] is between 1 and 3 by dafault. Setting it to zero will completely stop this minor race from advancing.
I recommend setting this value to something between 0 (stagnation) and 1000 (instant advancement).
If you increase [speed 2], you should also decrease [speed 1] a bit (i.e. increase its absolute, since it's negative). This makes the advancement somewhat smoother (less erratic).
[speed 2] shows strange behaviour if further increased. At around 40.000, advancement starts to slow down again slowly but steadily as [speed 2] increases, and if it reaches 65535 (FFFF), then there's no advancement, just like if it was set to 0.
One thing that you should keep in mind is that a race that advances very fast will end up with a relatively low population because the IPN does not increase any faster just because the race advances faster.
If you want fast advancement AND high population, you must increase [growth rate] as well.
To get a better overview:
1. Make a backup of race.rst
2. Open race.rst with your Hex Editor and set the "bytes per row" to 108.
3. Delete the first 2 bytes in race.rst (don't just set them to zero, *delete* them).
Then race.rst will just look like a table, and you can use the offset row to quickly navigate to the positions 0x44, 0x58 and 0x5A
Once you see race.rst this way, it'll be much easier to find the values even under the default settings (i.e. 16 or 24 bytes per row and w/out deleting the first 2 bytes).
Starting Level of Minor Races
The starting EL depends on the difficulty level.
The difficulty level is a number between 1 and 5, with 1 being "simple" difficulty and 5 being "impossible" difficulty.
At difficulty level 1, for each minor race there's a 67% chance to start at EL 1 and a 33% chance to start at EL 2.
At the other difficulty levels, there's
a 33% chance to start at EL = [difficulty level] - 1
a 33% chance to start at EL = [difficulty level]
a 33% chance to start at EL = [difficulty level] + 1
Silent Advancement
A minor race that joins an empire will still have its own advancement level. It will also advance further "silently", i.e. its EL will increase normally, but its population and its ground combat value will be determined by the controlling empire.
If the minor race leaves the empire later, then it will continue to advance normally, as if it had never been a member of an empire.
Getting stuck
During the advancement tests, a minor race sometimes got stuck at EL 8 on "simple" difficulty. Maybe it was a bug, maybe purpose (to prevent them from getting too advanced with respect to the major empires). On the other hand, I've also seen minor races advance all the way to EL 10 on "simple" difficulty, and this seemed to be the normal case.
Every minor race has 10 evolution levels (you can set the tech levels for each evolution level by using the Ultimate Editor). At the start of each turn, a minor race can either stay at its current EL (evolution level) or advance to the next EL.
There are 3 values in race.rst that influence minor race advancement:
[growth rate]
relative offset (in relation to the start of the minor race's entry): 0x44
type: floating-point
length: 4 bytes
The [growth rate] is also used for the planets' growth values. (use the search function for details)
[speed 1]
relative offset: 0x58
type: integer
signed: yes
length: 2 bytes
[speed 2]
relative offset: 0x5A
type: integer
signed: unknown
length: 2 bytes
1. Orbitals
At the start of a game, every minor race home system has 1 orbital battery per 50 population points (rounded down). So the Ullians with their starting pop of 100 have 2 orbitals. If their starting pop was 99, then they'd only have 1 orbital.
=> Initial Number of Orbitals for Minor Races
Every time a minor race advances, it gets a random number of additional orbitals (min. 1, max. 6, if anyone has seen greater increases, please tell me).
2. Ships (spacefaring races)
If the starting EL is high enough to fulfil the tech requirements for the ship(s) that this race can build, then the race starts with a random number of ships (min. 1, max. 4).
Every time the minor race advances, it gets a random number of additional ships (min. 1, max. 4), but only if both of the following conditions are fulfilled:
a) The new EL is high enough to fulfil the tech requirements for the ship(s).
b) The new population is 61 or more.
3. Population
Each minor race has an internal population number (IPN). At the start of a game, this is identical to the real population number.
At the beginning of every new turn, starting at turn 3, the IPN is updated as follows:
[new IPN] = [old IPN] * ( 1 + 0.1 * [growth rate] )
The result is then cut at the decimal point.
Every time the minor race advances, its real population number is set to its IPN or to the system's max. population space, whichever value is lower. Sometimes they fail to terraform enough planets, but most of the time they will make it.
The IPN is unaffected by bombardments, and the population update takes place after the losses by bombardment are applied. So if a minor race is bombarded during the turn that it advances, its population will be set to its IPN and not be reduced (except if it's completely wiped out, then it won't advance).
4. Advancement Speed
The advancement speed is controlled by the values [speed 1], [speed 2] and by the starting seed. The influence of the starting seed is so strong and erratic that I can't give an exact formula, but I can give you this rule of thumb that will be very accurate in the long-term average:
[turns needed to advance to next EL] ~= 0.306 * ( [number of next EL] + 2 ) * ( 18 - [speed 1] ) / [speed 2]
=> modding hints wrt the EL related delay factor 1/3
The value [speed 1] is between -70 and -15 by default, and it should be kept between -1000 and -15 if you want to use the above rule of thumb. Any further increase (positive values are possible) will result in rapid and very erratic growth.
The value [speed 2] is between 1 and 3 by dafault. Setting it to zero will completely stop this minor race from advancing.
I recommend setting this value to something between 0 (stagnation) and 1000 (instant advancement).
If you increase [speed 2], you should also decrease [speed 1] a bit (i.e. increase its absolute, since it's negative). This makes the advancement somewhat smoother (less erratic).
[speed 2] shows strange behaviour if further increased. At around 40.000, advancement starts to slow down again slowly but steadily as [speed 2] increases, and if it reaches 65535 (FFFF), then there's no advancement, just like if it was set to 0.
One thing that you should keep in mind is that a race that advances very fast will end up with a relatively low population because the IPN does not increase any faster just because the race advances faster.
If you want fast advancement AND high population, you must increase [growth rate] as well.
To get a better overview:
1. Make a backup of race.rst
2. Open race.rst with your Hex Editor and set the "bytes per row" to 108.
3. Delete the first 2 bytes in race.rst (don't just set them to zero, *delete* them).
Then race.rst will just look like a table, and you can use the offset row to quickly navigate to the positions 0x44, 0x58 and 0x5A
Once you see race.rst this way, it'll be much easier to find the values even under the default settings (i.e. 16 or 24 bytes per row and w/out deleting the first 2 bytes).
Starting Level of Minor Races
The starting EL depends on the difficulty level.
The difficulty level is a number between 1 and 5, with 1 being "simple" difficulty and 5 being "impossible" difficulty.
At difficulty level 1, for each minor race there's a 67% chance to start at EL 1 and a 33% chance to start at EL 2.
At the other difficulty levels, there's
a 33% chance to start at EL = [difficulty level] - 1
a 33% chance to start at EL = [difficulty level]
a 33% chance to start at EL = [difficulty level] + 1
Silent Advancement
A minor race that joins an empire will still have its own advancement level. It will also advance further "silently", i.e. its EL will increase normally, but its population and its ground combat value will be determined by the controlling empire.
If the minor race leaves the empire later, then it will continue to advance normally, as if it had never been a member of an empire.
Getting stuck
During the advancement tests, a minor race sometimes got stuck at EL 8 on "simple" difficulty. Maybe it was a bug, maybe purpose (to prevent them from getting too advanced with respect to the major empires). On the other hand, I've also seen minor races advance all the way to EL 10 on "simple" difficulty, and this seemed to be the normal case.