News:

Want to praise Simutrans?
Your feedback is important for us ;D.

Per City Growth Control

Started by colonyan, October 24, 2008, 04:29:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

colonyan


   This is to control different cities growth. Some sand box play style game user may find useful to be able to restrict the
   growth of cities of their choice. Those they want to keep it as rural area.

   Only one control.
   A simple window with one line list of cities and check mark box at the right of the city name.
   At default, they are checked to allow growth.
   Player may turn off the check box for cities they want to halt the growth.

   I know this is against the idea of simutrans of all growth should be affected by player's work on transportation.
   But some of player like me play it as a personal garden or that kind of sort. I wished some places stays rural forever.

   [Game allow to halt the growth intentionally providing very few service. But this seems not "right thing" to do....]

Combuijs

Alternatively, there have been suggestions in the recent past to influence city growth with a parameter for each city. In this way you can not only simulate rural areas, but also boom towns etc. This parameter could be hidden for normal players but visible and editable by the public player.

I don't think this is very difficult to program for a novice to Simutrans source. I might even try it during the Christmas holidays.
Bob Marley: No woman, no cry

Programmer: No user, no bugs



colonyan

That's good to hear! Hope it will see the light of day sometime in the future.

[ADD]
Maybe attractor city and population distributing cities might add more flavor.

Distributors gives some of its growth to attractor. This will simulate the migration to the largest cities which had
on beginning of 20th century.

prissi

The growth rates of cites are already different, until 100 the will growth a 1/4th speed, and from 10000 on they will grow with 4x speed.

z9999

#4
Quote from: prissi on October 25, 2008, 07:06:48 PM
The growth rates of cites are already different, until 100 the will growth a 1/4th speed, and from 10000 on they will grow with 4x speed.

But why growing city of recent version is too fast ?

In old versions, if bev is less than 1000, max growth was 1.
(yes, 1 not 2, because of +1)
But in current version, max growth is (80<<6)/400=12.8

So, if city have only 1 factory and is full of goods.
It always keep growing 3. It's too fast.


} else if (bev < 1000) {
wachstum = (pax_transport * 2) / (pax_erzeugt + 1);



sint32 pas = (city_history_month[0][HIST_PAS_TRANSPORTED] * (40<<6)) / (city_history_month[0][HIST_PAS_GENERATED] + 1);
sint32 mail = (city_history_month[0][HIST_MAIL_TRANSPORTED] * (20<<6)) / (city_history_month[0][HIST_MAIL_GENERATED] + 1);
sint32 electricity = 0;
sint32 goods = city_history_month[0][HIST_GOODS_NEEDED]==0 ? 0 : (city_history_month[0][HIST_GOODS_RECIEVED] * (20<<6)) / (city_history_month[0][HIST_GOODS_NEEDED]);

// smaller towns should growth slower to have villages for a longer time
sint32 weight_factor = 100;
if(bev<1000) {
weight_factor = 400;
}
else if(bev<10000) {
weight_factor = 200;
}

// now give the growth for this step
wachstum += (pas+mail+electricity+goods) / weight_factor;

prissi

The old factor 1 is not directly related to the new factors (see for instance 88.10.5 source). The old factor had a 1:1 relation, while the new factor had 1:16th relation to take care also for very low growth rates. In fact the growth rates are similar, even a little sloer for the new ones.

z9999

Quote from: prissi on October 26, 2008, 08:41:55 PM
while the new factor had 1:16th relation

Thank you. Okay, I found the code, and I had wrong idea about that.
But still it feels faster than old versions.

In the case that I wrote in last post, city growth every 44 seconds.

Passenger transport is the same. In old versions, it was 1 or nothing.
Keeping 50% transport is very difficult for small town. Usually it only happens at the beginning of the month. So, small town growth slowly.

But in current version, if we made 20% passenger transport, city growth every 128 seconds, isn't it ?

In recently, I often hear many people asking how to reduce city growth.
I don't think old version is best, but ...

Okay, someone may feel current version is better than old one, so I will stop to talking about this.  :)

prissi

Well, city growth is faster, since:

- pasenger and mail are not add seperately (thus 50% of passngers and no mail ended up with 40%,
- not rounding to zero but rounding to 1/16th ouccurs (many small growth steps accumulate)
- goods are also included