Town growth rules are changed as follows:
- Cities are limited in growth solely by the provision of transport service (although limits may be imposed by newGRF sets).
- All other towns have a maximum population to which they may grow. The town information window will show the growth potential of a town so you can decide what kind of transport service to provide.
- Towns can be grown beyond their initial limit by transporting goods, building materials, food and alcohol (some cargoes may require FIRS or a similar industry NewGRF) or by directly funding expansion using the "Fund New Buildings" option.
There is also an experimental feature to manage industries, which will prevent new industries from opening unless a (configurable) proportion of those already on the map have service. As this currently relies on manipulating a game setting this is marked as experimental, although it has worked in all my testing so far.
The script behaves fairly well on large and densely-populated maps; it handles 20,000 industries on the map with no problem, but more than about 2000 towns mean it can take over a month of game time for all of the towns to be updated on first load. (The script employs some caching and smarter decisions on when to update towns on subsequent runs).
This is the first time I've written a game script - or anything in Squirrel for that matter - so no promises that the code is good, idiomatic Squirrel or that there won't be unexpected bugs. I haven't encountered any problems in testing (even for situations which crash several AIs) but of course that just means I haven't encountered them, not that they don't exist
Comments, suggestions and bug reports welcome.
The script is on BaNaNaS, or you can download version 1 from the attachment. Tested with OpenTTD 1.6.0.
You will need SuperLib for NoGo version 39 (note there are two versions of SuperLib, one for AIs and one for game scripts) installed - this is listed as a dependency in BaNaNaS, but outside of that you'll need to install it manually.