[GS] Renewed Village Growth 12.0 (RVG)

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

How would you rate this game script?

5★ Lev4 'Chimaera'
36
84%
4★ "AsiaStar"
5
12%
3★ Floss "47"
2
5%
2★ Ploddyphut Choo-Choo
0
No votes
1★ Kirby Paul Tank
0
No votes
 
Total votes: 43

DiscoRoo
Engineer
Engineer
Posts: 2
Joined: 30 Aug 2024 16:36

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by DiscoRoo »

Hi there, I've loved playing with this GS but recently my friends and I have noticed some odd behaviour in our multiplayer games (and indeed, replicated during experiments in single player, so I'm not suggesting this is unique to multiplayer), that it can be very easy indeed to cause towns and cities to dramatically shrink very quickly despite all listed requirements on the town's information screen being met in each category. I am no GS whizz so I'm sure this is likely either a conflict or something that I have set up incorrectly or something to that effect, so please don't think that I am pointing fingers at your work. Are there any less obvious factors/parameters to look at when encountering this issue? I have replicated a town and a large city being served correctly, and it took significant excess over the required amounts before they would actually grow. Continually meeting the amounts and the towns showing that they were growing did not actually result in growth but dramatic shrinkage. I can understand where towns remove high population buildings and replace them with lower population ones, or even a fountain, pond etc which obviously does not hold any population at all, but I'm not talking about a little dip. In a matter of a few in game years, a town that has its requirements met reasonably above the minimum can halve in size.

Do you have any advice regarding this? We are using the latest version 10.1 from BaNaNas and the latest version of FIRS 5 as well.

Many thanks in advance for your kind help.

Roo
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Firrel »

DiscoRoo wrote: 30 Aug 2024 17:03 I have replicated a town and a large city being served correctly, and it took significant excess over the required amounts before they would actually grow. Continually meeting the amounts and the towns showing that they were growing did not actually result in growth but dramatic shrinkage. I can understand where towns remove high population buildings and replace them with lower population ones, or even a fountain, pond etc which obviously does not hold any population at all, but I'm not talking about a little dip. In a matter of a few in game years, a town that has its requirements met reasonably above the minimum can halve in size.
Hi Roo,

The growth does not change instantly, it moves slightly every month towards a value that represent the requirement fulfillment, so it can take a while till it really starts to grow.

I had this issue with Road NewGRF with a road that disallows to have buildings next to it (for example highway). Therefore there were no places where new buildings can appear and the towns started to dissapear.

The game script only changes how often the buildings can be built, there is no way of specifying when and where it should be built.
Master Trams
Engineer
Engineer
Posts: 44
Joined: 09 Sep 2019 15:37
Contact:

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Master Trams »

Been playing around with this GameScript, and it's really fun and (to an extent) self-explanatory. However, I do have one question relating to a message that appears in the town window: "Insufficient Infrastructure of Transportation" for a specific cargo. What on earth does this mean, and how do you resolve it?
I love distracting myself from my day job by doing my day job thanks to OpenTTD JGR!
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Firrel »

Master Trams wrote: 16 Sep 2024 14:05 Been playing around with this GameScript, and it's really fun and (to an extent) self-explanatory. However, I do have one question relating to a message that appears in the town window: "Insufficient Infrastructure of Transportation" for a specific cargo. What on earth does this mean, and how do you resolve it?
It is the town growth limiter, which stops the growth when the infractructure is lacking. That means that new houses were built, that produce pax and mail, but are not covered by transportation. You need to build inter/intracity transportation for those cargo types to have good enough coverage of the town buildings and not too many cargo at stops. Basicly build more pax and mail routes around the town to get rid of the message.
Master Trams
Engineer
Engineer
Posts: 44
Joined: 09 Sep 2019 15:37
Contact:

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Master Trams »

Firrel wrote: 16 Sep 2024 19:02
Master Trams wrote: 16 Sep 2024 14:05 Been playing around with this GameScript, and it's really fun and (to an extent) self-explanatory. However, I do have one question relating to a message that appears in the town window: "Insufficient Infrastructure of Transportation" for a specific cargo. What on earth does this mean, and how do you resolve it?
It is the town growth limiter, which stops the growth when the infractructure is lacking. That means that new houses were built, that produce pax and mail, but are not covered by transportation. You need to build inter/intracity transportation for those cargo types to have good enough coverage of the town buildings and not too many cargo at stops. Basicly build more pax and mail routes around the town to get rid of the message.
Ahhh, ok... Welp, I guess my towns won't grow for the next 180 years until busses unlock! (I'm currently in 1705)
I love distracting myself from my day job by doing my day job thanks to OpenTTD JGR!
Atroskelis
Engineer
Engineer
Posts: 8
Joined: 19 Aug 2021 13:03

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Atroskelis »

This may be a stupid question, but i never understood the cat2+ game mechanics.

Most towns do not have any industries that can accept anything from the cat2+ categories

In this case i have a town that requires raw food items but it cannot accept any in the list nor it has industries around which could. And thus am i forced to fund the industry? Do i have to fund an industry for each requirement in the future?

This city only has a Bay Farm which produces corn and livestock and in the city it only accepts food,goods and building materials


Image
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Firrel »

Atroskelis wrote: 21 Sep 2024 14:43 This may be a stupid question, but i never understood the cat2+ game mechanics.

Most towns do not have any industries that can accept anything from the cat2+ categories
Q: Where do I have to deliver the required cargo?
A: Some of the cargo types are accepted by the towns, so they can be
directly delivered there. Other cargo types need to be delivered
to an industry which accepts it. The station accepting the cargo
needs to be near the town. The best indicator is that if the name
of the station is same as the town, the cargo will be counted
towards that town.

Q: What to do when no industry accepts that cargo near the town?
A: If no industry accepts the cargo, the industry has to be funded
near the town. The best way to place the industry is to firstly
place down a few stations and if the stations have the same name
as the town, the industry placed there will be near enough the town.
Atroskelis
Engineer
Engineer
Posts: 8
Joined: 19 Aug 2021 13:03

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Atroskelis »

Firrel wrote: 21 Sep 2024 16:18
Atroskelis wrote: 21 Sep 2024 14:43 This may be a stupid question, but i never understood the cat2+ game mechanics.

Most towns do not have any industries that can accept anything from the cat2+ categories
Q: Where do I have to deliver the required cargo?
A: Some of the cargo types are accepted by the towns, so they can be
directly delivered there. Other cargo types need to be delivered
to an industry which accepts it. The station accepting the cargo
needs to be near the town. The best indicator is that if the name
of the station is same as the town, the cargo will be counted
towards that town.

Q: What to do when no industry accepts that cargo near the town?
A: If no industry accepts the cargo, the industry has to be funded
near the town. The best way to place the industry is to firstly
place down a few stations and if the stations have the same name
as the town, the industry placed there will be near enough the town.

Many thanks for the answer. So my assumption is correct, you have to thus invest in a town both logistically and by funding factories. As such you wouldnt be inclined to jump to the biggest city at start of the game. Nice!

I have one last question, how does this NewGRF handle CargoDist?
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Firrel »

Atroskelis wrote: 21 Sep 2024 17:48 I have one last question, how does this NewGRF handle CargoDist?
It make it slightly harder to fulfill the pax and mail transported, because it may take longer to take it to the destination, but makes it more interesting. I always play with cargo dist enabled for pax and mail.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Firrel »

pristine3 wrote: 11 Aug 2024 01:52 Hi,

I am new to Openttd and started to make a scenario to the following playthrough, https://www.youtube.com/watch?v=ZqKRaY55GZQ&t=17131s but I wanted to use AXIS and a larger map. When I go to play the scenario however I am given a Renewed Village Growth error, "the index '23' does not exist. I narrowed down that 23 is the number of towns I have on the map. I also started the process of making a new map, and testing it incrementally. The only difference between the two files is the placement of one new city.

Any help on this matter is greatly appreciated.
Sorry for a late reply, but had to find some time to test it out. I managed to reproduce it by creating a scenario with a few towns, starting the scenario, saving it, converting the save game to scenario, adding new towns and again starting the scenario. When the game was first saved, the current towns were saved to the save data. After adding new towns in the scenario, the GS tried to load them from the load data where they did not exist. Will be solved in 11.0 by initializing towns that are not stored in the save data.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by Firrel »

New update for Renewed Village Growth 11.0 is available in BaNaNaS
- new: AXIS 2.2 Steel City support with 6 categories (rhoun)
- new: 6 categories support for FIRS 4 and 5 Steeltown
- fix: Adding towns to a savegame via scenario editor
- fix: Updated GSToyLib
DiscoRoo
Engineer
Engineer
Posts: 2
Joined: 30 Aug 2024 16:36

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by DiscoRoo »

Firrel wrote: 04 Sep 2024 17:20
DiscoRoo wrote: 30 Aug 2024 17:03 I have replicated a town and a large city being served correctly, and it took significant excess over the required amounts before they would actually grow. Continually meeting the amounts and the towns showing that they were growing did not actually result in growth but dramatic shrinkage. I can understand where towns remove high population buildings and replace them with lower population ones, or even a fountain, pond etc which obviously does not hold any population at all, but I'm not talking about a little dip. In a matter of a few in game years, a town that has its requirements met reasonably above the minimum can halve in size.
Hi Roo,

The growth does not change instantly, it moves slightly every month towards a value that represent the requirement fulfillment, so it can take a while till it really starts to grow.

I had this issue with Road NewGRF with a road that disallows to have buildings next to it (for example highway). Therefore there were no places where new buildings can appear and the towns started to dissapear.

The game script only changes how often the buildings can be built, there is no way of specifying when and where it should be built.
Hi,

Thanks for the reply; unfortunately this doesn't explain our problem.

As an example, I started a new game with straightforward GRFs which do not affect anything related to this (including with and without AXIS 2.2 or FIRS 5), and RVG activated; I connected two small towns which required only passengers and mail to be transported, no freight. I set up plenty of trains running between the two towns which had many times higher capacity than the towns required for their growth. I specifically built the stations to encompass as much of each town as possible within their catchment areas, and because the towns were small (hence only passengers and mail required), virtually the whole town was covered by each station. The journey wasn't long and the trains quickly became busy and profitable. I let this simulate on fast speed for many years, and both towns consistently lost population every year. More and more buildings were replaced with non-population buildings, or were knocked down and not replaced. Minimal new roads were built and few new buildings were built. Overall there were continuous, dramatic population losses in both towns. Over several years the towns lost a large proportion of their population each year (a fifth or quarter kind of proportion, not a small amount at all), the trains struggled more and more to have any passengers due to the declining populations, etc. I've repeated this example several times on new maps/saves and this has consistently been the result. If I disable the game script and do the same thing, the result is growth in both towns. As I said before, the UI claims the towns are growing, but the actual numbers shrink rapidly. Providing a train service should not suddenly cause a town's population to dramatically decrease over several years with no sign of regrowth! I don't understand why if the growth conditions are met, this behaviour is seen so consistently. I think in the many, many games we have played with this script, we have failed to see any meaningful growth in the size of any town, village or city, regardless of the requirements being met, and almost always seen population shrinkage, regardless of the excess meeting of the requirements for them. This isn't a criticism of you or your work at all, I much prefer the idea of the way your script is designed compared to the default behaviour and we would love to continue using it, but if we can't have anything but rapid shrinkage of every town we serve it makes life a little difficult! Unfortunately I am no GS expert whatsoever, far from it, so I bow to your superior knowledge in the technical aspect, but if there's any way I can help you figure out this strange behaviour please let me know and I will happily do so.

As a final note, we have tried this on version 11.0 as well, and the problem remains the same.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by Firrel »

DiscoRoo wrote: 01 Nov 2024 20:04 Thanks for the reply; unfortunately this doesn't explain our problem.
As I said, the GS cannot change the population, it only changes how often a building/road can be built. Another thing that can affect the town growth is town buildings NewGRF.

The citymania client provides a lot of useful information about town growth and is vanilla compatible.

On a vanilla game without any NewGRF, so only RVG, all towns were growing in population. There were some drops when a big building was replaced by a statue and so on. But overall in 10 years, every town grew in population.
OpenTTD-town-growth.PNG
OpenTTD-town-growth.PNG (18.65 KiB) Viewed 4436 times
You can send me the setup that you used during the games. Best way is to setup the game as you would start playing it, close the game and send "Documents/OpenTTD/openttd.cfg". Based on it I should be able to recreate the exact same game. Are you playing on vanilla or any patchpack?
User avatar
S_V_Berezin
Engineer
Engineer
Posts: 2
Joined: 24 Nov 2024 19:44

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by S_V_Berezin »

Hello!

I play with an economy NewGRF called "Age of Industry Replacement Set" (AIRS). It uses some, but not all of the industries and cargoes of FIRS; arranged in three different economies.

I find it impossible to play without this script, but this choice of mine causes a small issue. While the script does work correctly, some of the cargoes in categories are out of order – steel often being a category above its product steel parts, or timber above construction materials. I am completely lost as to whether there is something I can do to fix this myself, which is why I turn to the forum.

Either way, excellent work and I am very grateful!
chrisstiann94
Engineer
Engineer
Posts: 1
Joined: 04 Dec 2024 12:56

Re: [GS] Renewed Village Growth 10.1 (RVG)

Post by chrisstiann94 »

Firrel wrote: 03 Nov 2024 15:11
DiscoRoo wrote: 01 Nov 2024 20:04 Thanks for the reply; unfortunately this doesn't explain our problem.
As I said, the GS cannot change the population, it only changes how often a building/road can be built. Another thing that can affect the town growth is town buildings NewGRF.

The citymania client provides a lot of useful information about town growth and is vanilla compatible.

On a vanilla game without any NewGRF, so only RVG, all towns were growing in population. There were some drops when a big building was replaced by a statue and so on. But overall in 10 years, every town grew in population.



You can send me the setup that you used during the games. Best way is to setup the game as you would start playing it, close the game and send "Documents/OpenTTD/openttd.cfg". Based on it I should be able to recreate the exact same game. Are you playing on vanilla or any patchpack?

Hi i am having a similar problem with cities losing population, as soon as I transport too many passengers and luggage.

Is it possible that I need to keep a balance of people going in and out of the city?


I've attached two cities as example, both have lost about 2000 population since they startet "growing".

I've also attached my openttd.cfg

Thank you in advance! Beside that problem i really enjoy playing with your script!
Attachments
City1.PNG
City1.PNG (134.53 KiB) Viewed 3760 times
City2.PNG
City2.PNG (121.36 KiB) Viewed 3760 times
openttd.cfg
(14.54 KiB) Downloaded 32 times
Malcolm
Engineer
Engineer
Posts: 14
Joined: 26 Feb 2011 14:25

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by Malcolm »

hello! Thanks for this script, it's much more interesting to play with it than with vanilla urban growth.

I have a question:
[+] Spoiler
does subsidizing the construction of buildings affect the growth of the city with this script? It seems that when I pay for Building in the administration, the growth time of the city does not change.

By the way, the growth of cities in my region has also almost stopped.
But perhaps this is due to the fact that my cities are very small and NewGRF was used, which replaces houses with low-population versions when starting the game in early years.

I'm attaching a save file. Maybe this will help to understand the problem.
UPD: I have read several previous pages of this topic and I think I have found answers to my questions. As I understand it, everything is working correctly.
Attachments
Приволжск-трейл, 1784-11-27.sav
(688.59 KiB) Downloaded 36 times
Last edited by Malcolm on 07 Dec 2024 22:16, edited 4 times in total.
speeder
Engineer
Engineer
Posts: 33
Joined: 16 Jul 2014 05:57

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by speeder »

I came to ask for a solution to AIRS only to find someone else asking the same thing :S
Malcolm
Engineer
Engineer
Posts: 14
Joined: 26 Feb 2011 14:25

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by Malcolm »

Probably a bug:

For some reason, the script does not run in the city of Myski (Мыски). The city does not require Cargoes from the categories and grows every 26 days, while the city of Seversk (Северск) that I serve grows every 97 days.

Maybe it's because he's being served by an AI opponent?
Attachments
Снимок.PNG
Снимок.PNG (501.23 KiB) Viewed 3609 times
Приволжск-трейл, 1803-07-08.sav
(703.33 KiB) Downloaded 33 times
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by Firrel »

S_V_Berezin wrote: 24 Nov 2024 20:00 Hello!

I play with an economy NewGRF called "Age of Industry Replacement Set" (AIRS). It uses some, but not all of the industries and cargoes of FIRS; arranged in three different economies.

I find it impossible to play without this script, but this choice of mine causes a small issue. While the script does work correctly, some of the cargoes in categories are out of order – steel often being a category above its product steel parts, or timber above construction materials. I am completely lost as to whether there is something I can do to fix this myself, which is why I turn to the forum.

Either way, excellent work and I am very grateful!
speeder wrote: 07 Dec 2024 01:24 I came to ask for a solution to AIRS only to find someone else asking the same thing :S
The game script has custom made cargo categories for many economies, but there are always some new ones. Those that are not directly supported use procedurally created categories, so the game script should work for almost all past and future economies, but there are some caviats like some cargo types being "misplaced". If you want to make the AIRS specificly supported, you can check for example this PR. You should change the logging level (last parameter) to Cargo, which will print out into GS console all cargo types with their indices. Then the categories are made by creating arrays with the cargo indices. Feel free to open a PR with your suggested categories.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 143
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth 11.0 (RVG)

Post by Firrel »

Malcolm wrote: 07 Dec 2024 22:12 Probably a bug:

For some reason, the script does not run in the city of Myski (Мыски). The city does not require Cargoes from the categories and grows every 26 days, while the city of Seversk (Северск) that I serve grows every 97 days.

Maybe it's because he's being served by an AI opponent?
Yes, this looks like a bug. There has been something that triggered the growth of that town, but failed to complete it. It may have been a savegame just interrupting the process of starting the monitoring of the town or something done in the scenario editor. It is not possible to continue running a savegame with GS in the exact state at which it was saved on another PC (for some reason), so when I checked the save you provided, it loaded the GS from start. There except the initial fast growth, when triggering the town monitoring, the town started to behave as usual. So unfortunately, there is no way to debug it. So until it will happen more often, there is nothing I can do about it.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 0 guests