When you say habs so you mean ideal habitable worlds (0 colony cost)?
Ruins are checked first (20% chance) and if the planet has ruins then it won't have an alien race. That is probably skewing the numbers. I have checked through the code I can't find any problems but I will step it through on the next few system generations and see if I can spot anything weird. What is supposed to happen is the following:
A check is made for ruins if the planet is terrestrial, the gravity is greater than 0.4G and the temperature is between 200 and 360 Kelvin
A check is made for an alien race if the planet is terrestrial and there are no ruins and the oxygen level is between 0.07 and 0.4 atm and there are no dangerous gases and temperature is between 233 and 333 Kelvin and the gravity is between 0.4 and 2.5G.
Steve
No by Habs I meant Oxy-Nitro worlds - I will check to see of they fell within the other params you mention above.
OK have now done checks.
In 77 Systems there were 49 oxy/nitro T worlds.
Putting in the Physical restrictions (G & Temp) brings that down to 19 candidates.
The Oxy level restriction brings that down to 8 of which 3 were terraformed to reach acceptable levels (and therefore probably lay outside the requirements at the point of generation), and 1 had a Ruin in place. I checked and the other 3 ruins i'd found were on planets that either had very low levels of oxygen or temps that were between 200 and 233 or 334 and 360, and therefore wouldn't have qualified as potential race-bearing planets.
This gives 4 potential candidates, 3 of which were found after the race chance increased (the one that was found before the chance increased was actually set as the racial homeworld), and 1 actually had a race.
So the actual percentage found was 33% compared to the parameter setting of 50% which at that low a population is more than acceptable.
It seems that the chance of good real estate is much lower than I thought, not that the race generation code is faulty.