I will look into the variation algorithm and see if there's a zero off somewhere or a rounding issue, that seems to be the case. I normally don't use it so some new feature might have broken it down the line.
I also have a question: I just build a moneyline between 2 city's of 12K. If I at roads to a city, it growns enormously at this moment. 1,5 year later one of the city's is already above the 30K. How can a reduce the growrate of the city's? At time moment, i can't transport more than 50% of the population, so the grow will stuck at 30K. But i can easiely expand my network, so I can transport more passagiers and meet the requirements, and the city will be bigger. Which settings have i to adjust?
There are two variables that govern the growth rate of cities.
From the readme:
Code: Select all
Setting Name: City growth Multiplier promillage:
Setting Range: 1-65535
Comments: Set to 1,000 for no change. 2,000 is the default game value (cities
grow twice as fast). Has no effect when you set cities to grow 'normally'.\
Setting Name: Slowing factor
Setting Range: 1-65,535
Comments: This is a factor in growth speed. Set it twice as high to make towns
grow twice as slow as normally. The recommended factor is 40. For a faster-paced
game, set this higher, and for a slower-paced game set it slower. This is a very
powerful setting, fine-tuning it for your setup is recommended. A setting of 40
means a town of 4,000 has a max growth speed of one house per ten days.
So setting the multiplier lower will cause cities to build less houses. Setting the slowing factor higher will do so for all cities and towns on the map. As there is an actual three-month delay between the house starting to build and the increase in population, cities tend to grow for three more months after you start failing the transport requirement. So setting these settings somewhat lower/higher respectively would do the trick.
Both are linear by the way, so twice as much slowing factor => cities and towns grow twice as slowly. Twice as much multiplier -> Cities grow twice as fast.
EDIT: Here's something interesting.
The old algorithm used this:
Code: Select all
while(GSBase.Chance(367879, 1000000) == false)
as a critierion for doing another pass.
That meant it had a 62.3% chance of doing only a single pass (value in range 0.9-1.1 flat distribution), and a 36.7% of a double pass (0.8-1.2) in a triangle curve distribution, and so on. Turns out this is not a good thing because the actual sigma of the distribution increases with sqrt(n) for n passes.
Code: Select all
\sum _{n=1}^{\infty } (.623{}^{\wedge}(n-1) - .623{}^{\wedge}n)*\frac{\sum _{k=1}^n \sqrt{k}}{\sqrt{3}}
This is a LaTeX formula for the limit. Using approximation techniques or by solving you can find that the answer is about sigma = 2.34233 in the limit towards infinity. So the range was about 2.3 times too large. The reason for this rather complicated scheme was that it would effectively net you a very close approximation of the classic normal distribution. I didn't count the compounding variations though which is what caused the fact that it was off.
I've replaced it with a 25 (fixed number) passes with 1/5'th size. That means you get a near-bell-shaped curve. (if the flat distribution with sigma = 1, mu = 0 is F, then lim n->inf of F^n/sqrt(n) is the normal distribution N(0,1).)
Attached file shows some sample towns with the new algorithm at 10%.
EDIT 2: Also, I found a bug with GSBase.Chance(). It doesn't work correctly, so the above point about it being 2.34x off is a bit moot

. It was off by lots, anyway.