Page 1 of 1

Why are certain towns in my game refusing to grow?

Posted: 19 Apr 2021 23:16
by mrjack2
Pilkington & Co., 9th Apr 2076.sav
(5.72 MiB) Downloaded 64 times
Savegame attached here. JGR 40.4 required, but it's not neccesarily a problem from that?

A couple of towns on my map just aren't growing, even though they are well-served they have not gained any new buildings since the 19th century. Clearest examples are Moningdore on the south-east coast, and Feabourne in the southern corner. Also maybe Meberg, part of the big metropolis on the south-east coast, although that must have grown at some point as it's well past its starting population.

I'm using the "Villages is Villages" gamescript which sets a maximum population for towns, which can be increased by delivering town cargos, and also prevents growth until a certain percentage of PAX are transported. But these towns fulfill all the requirements for growth.

Can anyone point out what I'm missing? And if you can't find the problem, feel free to look at my savegame cos it's absurd :!: :!: :!:

Let me know any NewGRF files that are unavailable.

Edit: attachments below. Bizarely, one of the towns has just decided to grow after I messed around with the tram routes (I funded growth only after it decided to start growing, to speed it up; normally, funding growth makes no difference).

Re: Why are certain towns in my game refusing to grow?

Posted: 21 Apr 2021 02:40
by mrjack2
Two further images. I had thought that perhaps there were no stations close enough to the central tile, but I put a station right by the centre of Meningdore for years and that town only just started growing. Anyway, this didn't explain Meberg's failure to grow past 5000.


(Edit: for further explanation of the sequence of events that led to Meningdore starting to grow: as seen in the savegame, it wasn't growing. I then rearranged the tram services to connect it to the neighbouring city by tram, but inadvertendly forgot to add a stop at the Meningdore Central station, right by the town centre. When I restored service to that stop, the town grew.)

Re: Why are certain towns in my game refusing to grow?

Posted: 22 Apr 2021 01:56
by mrjack2
To keep a record of things for anyone looking, I've also raised the issue with the gamescript creator at viewtopic.php?p=1244066#p1244066

And on reddit: https://www.reddit.com/r/openttd/commen ... wn_in_200/

And on JGR's thread viewtopic.php?f=33&p=1244076#p1244076

Re: Why are certain towns in my game refusing to grow?

Posted: 22 Apr 2021 10:54
by andreasaspenberg
did you by any chance use the highway roads? houses can not built near them. if that is not the case they are likely out of space in some cases. it could also be a bug in the script.

Re: Why are certain towns in my game refusing to grow?

Posted: 22 Apr 2021 20:02
by mrjack2
I created this game before NRT.

Re: Why are certain towns in my game refusing to grow?

Posted: 23 Apr 2021 07:22
by Auge
Hello
mrjack2 wrote: 19 Apr 2021 23:16 Pilkington & Co., 9th Apr 2076.sav



Let me know any NewGRF files that are unavailable.
I would like to take a look into your savegame but I can't find one of the NewGRFs. It's "Ratings".

Tschö, Auge

Re: Why are certain towns in my game refusing to grow?

Posted: 23 Apr 2021 07:46
by mrjack2
Auge wrote: 23 Apr 2021 07:22 I would like to take a look into your savegame but I can't find one of the NewGRFs. It's "Ratings".

Tschö, Auge
Ah, here you go. Thanks for the interest.

Re: Why are certain towns in my game refusing to grow?

Posted: 23 Apr 2021 21:09
by JGR
It looks to me like the script is broken.

The script save/load and init process are both incomplete. In the script, class town -> last_growth_state is never correctly initialised or saved/loaded.
If the game is ever saved/loaded, or if the script is reloaded, the script can subsequently fail to ever set the growth rate if the desired growth rate is the same the same as the default value, and this does not match the actual value.

Re: Why are certain towns in my game refusing to grow?

Posted: 23 Apr 2021 21:16
by mrjack2
Thank you so much.

Re: Why are certain towns in my game refusing to grow?

Posted: 24 Apr 2021 11:35
by Timberwolf
Thanks JGR - that was an interesting corner case I'd not thought about. Version 23 of Villages Is Villages fixes this, along with some tweaks to saveload and support for upgrading versions of the script in a running game.

Re: Why are certain towns in my game refusing to grow?

Posted: 24 Apr 2021 23:58
by mrjack2
Problem solved, all towns now growing. Thanks team!