[GS] Renewed Village Growth (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'
0
No votes
4★ "AsiaStar"
0
No votes
3★ Floss "47"
0
No votes
2★ Ploddyphut Choo-Choo
0
No votes
1★ Kirby Paul Tank
0
No votes
 
Total votes: 0

Firrel
Engineer
Engineer
Posts: 36
Joined: 13 Aug 2019 17:06

[GS] Renewed Village Growth (RVG)

Post by Firrel »

Renewed Village Growth (RVG)

RVG is a Game Script that manages towns growth in a new and balanced way, making growth depend on varied cargo delivery (passengers, food, goods, ...) and sustained transportation of passangers and mails. The script supports Baseset, FIRS, ECS, YETI, NAIS, Improved Town Industries. It is born as a combination of keoz's Renewed City Growth GS and Sylf's City Growth Limiter GS.

Image

How this works:
The script only triggers growth in the towns which are already exchanging passengers. Its growth rate is calculated (non linearly) on the basis of the degree of achievement for cargo requirements. If there is more cargo than necessary, it is stockpiled for later use.

The growth will be completely stopped when insufficient amount of passangers and mails are transported from the city, limiting its growth when the infrastructure is not maintained.

Cargo requirements are not defined for individual cargo types, but for cargo categories. Depending on the used industry set, there are 3 or 5 categories. It doesn't matter which type of cargo you deliver to achieve category goals. The cargo categories are described in StoryBook, for example FIRS 3 Extreme is defined as below:

Image

For more information, read the readme file:
readme.txt
(10.86 KiB) Downloaded 145 times

Requirements:
- OpenTTD, v. 1.10.x or newer.
- GS SuperLib, v. 40 (you can find it on BaNaNaS, also accessible through OTTD's "Online Content").
- Industry sets: you can use Baseset (all climates), FIRS 1.4, 3, 4 (all economies), ECS 1.2 (any combination), YETI 0.1.6 (all except Simplified), NAIS 1.0.6, ITI 1.5, XIS 0.6. Using RVG with any other unsupported industry set may result in odd - or unstable - behaviours.

Download:
The latest stable version (v4.3) can be downloaded from BaNaNaS.
The development with source codes can be found on github: https://github.com/F1rrel/RenewedVillageGrowth.
Renewed_Village_Growth-4.3.tar
(110 KiB) Downloaded 20 times

Changelog:
Version 4.3 (2020/09/14)
[+] Spoiler
- fix: reworked GS versioning system
Version 4.2 (2020/08/30)
[+] Spoiler
- new: added support for XIS 0.6: The Lot
- modified: updated ITI to 1.5 to allow recycling chain
- modified: all YETI game styles working except Simplified
- fix: randomization giving too few cargos when not all ECS vectors are enabled
Version 4.1 (2020/08/04)
[+] Spoiler
- fix: received cargo for first category is now working properly
Version 4.0 (2020/08/04)
[+] Spoiler
* Not compatible with other versions
- new: added randomization of cargos to fixed number or variable number per category
- new: added parameter to display all required cargo by towns from start - "Display immediately
cargos per town"
- new: added displaying of full cargo list in "Town info display mode" parameter
- new: added support for Improved Town Industries 1.3
- new: added support for FIRS 1.4 and FIRS 4 alpha
- new: added support for 64 cargo types
- new: added setting to delay limiter stopping town growth by set amount of months - "Limit
Growth: Stop growth after set amount of months"
- modified: added easy, medium and hard values to some parameters
- modified: completely reworked town texts
- modified: any supplied cargo from first category will start town monitoring
- modified: changed category names to better represent the cargo
- modified: town texts are redrawn when new month kicks in
- fix: funding towns is now working
- fix: the growth is now enabled properly for towns that were not growing when limiter got
disabled mid game
- fix: starting monitoring should be more reliable
- removed: options to merge categories
- removed: FIRS 1.3 no longer supported
Version 3 (2020/05/17)
[+] Spoiler
- modified: support for any combination of ECS 1.2 vectors
- modified: added parameter to game script settings "Town info display mode" to change the mode of
displaying town information (Automatic, Cargo information, Limiter information)
- modified: automatic town info mode is now switching pages every 3 seconds instead of scrolling
- modified: updated YETI to version 0.1.6
- fix: towns will now properly stop to be monitored after one year without passanger service
Version 2 (2020/05/13)
[+] Spoiler
- modified: "Expert: slowest TGR if requirements are not met" changed to max 880 as it is maximum
possible TGR
- modified: changed "Eternal love" default value to off
- modified: updated ECS vector to version 1.2
- fix: issue with scrambled story book text after loading game
- fix: display town growth is not limited by the script message when pax and mail requirements changed to
0 mid game
- fix: town categories in town info screen now scroll when there are more than can fit
- fix: removed duplicite cargo printing
- removed: french translation
Version 1 (2020/03/08)
[+] Spoiler
- combination of Renewed City Growth by Keoz, City Growth Limiter by Sylf
- new: added support for FIRS 3.0.12 economies
- new: added support for NAIS: North America economy
- new: eternal love from towns
- fix: towns under 100 population will always grow as normal
Last edited by Firrel on 15 Sep 2020 09:38, edited 8 times in total.

Firrel
Engineer
Engineer
Posts: 36
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

Korenn wrote:
14 May 2020 14:39
Hi Firrel, I have a feature request. ... I would love to see an option where for each town it picks a random *specific* cargo from each cargo category to request.
I like the idea, it is a bit like TF2 works. I wanted to do something similar. It can be done by storing a uint32 number with one bit per cargo type, so it is not too demanding for saving and it is easily reconstructed. The cargo types selected for specific town can be displayed as third page of town info. There can be 1-3 cargos per category (limited by displayed parameters).
Will try to work on it for the next release, but don't expect it to be very soon.

User avatar
Boukev
Engineer
Engineer
Posts: 18
Joined: 13 May 2009 13:47
Location: Hengelo, Netherlands

Re: [GS] Renewed Village Growth (RVG)

Post by Boukev »

Sounds like great changes! Thanks a lot. Will try it out when I can.
It takes either 1 train with 8 carriages or 500 cars to move 1000 people. Simple math.

djsider
Engineer
Engineer
Posts: 14
Joined: 09 Jan 2009 03:27

Re: [GS] Renewed Village Growth (RVG)

Post by djsider »

I tried out the script with FIRS and food is not included in cat 2. I have no idea how to get the town to accept Fish, Fruit, Livestock, or Milk.

Should food be included in cat 2? and goods into cat 3?

User avatar
Boukev
Engineer
Engineer
Posts: 18
Joined: 13 May 2009 13:47
Location: Hengelo, Netherlands

Re: [GS] Renewed Village Growth (RVG)

Post by Boukev »

djsider wrote:
21 May 2020 06:32
I tried out the script with FIRS and food is not included in cat 2. I have no idea how to get the town to accept Fish, Fruit, Livestock, or Milk.

Should food be included in cat 2? and goods into cat 3?
I think the current setup is nice with food being a second level as a processed form of a pure stock like fish, fruit, livestock or milk.

You need to have a factory (brewery, dairy or stovkyard etcetera) in or near the town (the factory starts with the towns name) that you can supply to make it count towards the growth goal. You do not need to bring the raw ingredients to the town buildings themselves.
It takes either 1 train with 8 carriages or 500 cars to move 1000 people. Simple math.

djsider
Engineer
Engineer
Posts: 14
Joined: 09 Jan 2009 03:27

Re: [GS] Renewed Village Growth (RVG)

Post by djsider »

I eventually did figure out it’s not just about the town buildings but it can be industry as well. I’m used to other city builders where you need to supply the town to count.

Having a raw material go into an industry that produces food in the same town area means I do not need to build a big network. I.e. a plantation to cider mill will provide two categories. Having the goals just be what you can deliver to the town or at least having options to configure the cargos would be nice.

Btw, the readme states food in cat 2, not in the later category.

Additional q: why are the requirements so low? I’m at 800 ppl and it says for general food 5/100/120 for the required/supplied/stocked. This means it only requires 5 units of general food per month? And it’s storing way more than 10x that amount

djsider
Engineer
Engineer
Posts: 14
Joined: 09 Jan 2009 03:27

Re: [GS] Renewed Village Growth (RVG)

Post by djsider »

Just went through the old RCG posts and I see screenshots there indicating food is in cat 2. Just wondering if the change was intended for it to be not included in general food and being allowed later on. Also, does anyone know what the requirements per 1000 population are?

LaChupacabra
Traffic Manager
Traffic Manager
Posts: 130
Joined: 08 Nov 2019 23:54

Re: [GS] Renewed Village Growth (RVG)

Post by LaChupacabra »

Boukev wrote:
21 May 2020 08:07
You need to have a factory (brewery, dairy or stovkyard etcetera) in or near the town (the factory starts with the towns name) that you can supply to make it count towards the growth goal. You do not need to bring the raw ingredients to the town buildings themselves.
It works a bit differently - in this script (similar to the base RCG), counted are delivery to stations assigned to a specific city, not to enterprises with the city's name.
Changing the station name will not change the city to which it is assigned. If the factory is located near two cities, you need note attention to which city the station will be assigned during construction.
I am sorry for may English. I know is bed.

SHADOW-XIII
Tycoon
Tycoon
Posts: 14278
Joined: 09 Jan 2003 08:37

Re: [GS] Renewed Village Growth (RVG)

Post by SHADOW-XIII »

I wanted to start a scenario with the script but it seems "Which industry set is being used" option is greyed out in the scenario editor and cannot be changed from "Baseset: Temperate" (even though the map is subarctic) and wanted to change to NAIS

and fix/help with that?

EDIT: I edited the script, changed option to CONFIG_INGAME, seems to have worked, started scenario, saved, restored the script from bananas and it looks ok
what are you looking at? it's a signature!

Firrel
Engineer
Engineer
Posts: 36
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

djsider wrote:
21 May 2020 06:32
Should food be included in cat 2? and goods into cat 3?
As Boukev said, I considered the food and goods as processed and I wanted to have enought diversity in each category.
djsider wrote:
21 May 2020 14:53
Having the goals just be what you can deliver to the town or at least having options to configure the cargos would be nice.
You can change the categories yourself, it is easy:
1. Start game with the industry you want to modify and Debug log: Cargo. This will print you into AI/GS Debug all cargo types and their indexes.
2. Go to (on Windows) /Documents/OpenTTD\content_download\game and uzip the RVG game script.
3. Open cargo.nut, find the industry you want to modify in function DefineCargosBySettings().
::CargoCat - each array represents one cargo category and numbers represent cargo indexes.
::CargoCatList - names associated with the category
::CargoMinPopDemand - at which population a category will be enabled
::CargoPermille - cargo demand per thousand population
::CargoDecay - percentage of cargo to be decayed per month
4. Save file and create new game with these settings
djsider wrote:
21 May 2020 14:53
Additional q: why are the requirements so low? I’m at 800 ppl and it says for general food 5/100/120 for the required/supplied/stocked. This means it only requires 5 units of general food per month? And it’s storing way more than 10x that amount
I will need to look into it. I changed the minimum TGR to 880 and as it seems it broke some calculations. You can adjust the required amount by adjusting the difficulty level. With the stockpiling, it seems that sometimes it will limit it to 10x and sometimes not.
SHADOW-XIII wrote:
29 May 2020 23:29
I wanted to start a scenario with the script but it seems "Which industry set is being used" option is greyed out in the scenario editor and cannot be changed from "Baseset: Temperate" (even though the map is subarctic) and wanted to change to NAIS
Before creating scenario, you want to have game script active and setup correctly, because all game script parameters are saved with the scenario as well as information about the game script.

The parameter "Which industry set is being used" is supposed to be grayed out. As well as you cant change FIRS for NAIS GRF mid game, because it would break the game, you cant do it in a GS. The industry information is used during game script initialization. You may see correct categories in the story book, because that is rewritten on game load, but towns are not reinitialized, so might happen the categories inside the script are still of the old format or something is broken.

SHADOW-XIII
Tycoon
Tycoon
Posts: 14278
Joined: 09 Jan 2003 08:37

Re: [GS] Renewed Village Growth (RVG)

Post by SHADOW-XIII »

I loaded scenario that supports NAIS (NA Industry Set) from bananas.
The script showed "Baseline: Temperate" and it couldn't been changed there
and when starting the game script was complaining that industry set does not match Temperate when starting the game but it was not possible to change at any time.

Forcing it (through script editing) to "NARS 1.0.6: North America" in the Scenario Editor seems to have worked though,
playing the scenario now and so far not having any issues
what are you looking at? it's a signature!

speeder
Engineer
Engineer
Posts: 25
Joined: 16 Jul 2014 05:57

Re: [GS] Renewed Village Growth (RVG)

Post by speeder »

Had to do same thing with my FIRS-based scenario.

Also I am heavily editing the script, for example make the passengers transported limiter to be a rolling average, instead of the last month, because my cities stopped growing because my transportation was mostly ship based, so a ship would come, carry off 100% of passengers, next month would be 0, then another arrive... the way the script worked was resulting in city never growing, because it would start growing some days before month end, but then stop because transported last month was 0 again.

Firrel
Engineer
Engineer
Posts: 36
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

I am glad changing the industry type in scenario editor works fine. As I understand it, when the scenario is created in scenario editor without GS and then the GS is added in the scenario editor, the GS is not started yet. This means the parameters can be changed, like the industry type. When the scenario is started as a game, the GS is then initialized. But changing the parameter already in game would lead to unpredictable results. So I cant enable changing the parameter in game. It is possible to change the industry, although it is not straightforward. I am fine with that.
speeder wrote:
30 May 2020 23:11
Also I am heavily editing the script, for example make the passengers transported limiter to be a rolling average, instead of the last month, because my cities stopped growing because my transportation was mostly ship based, so a ship would come, carry off 100% of passengers, next month would be 0, then another arrive... the way the script worked was resulting in city never growing, because it would start growing some days before month end, but then stop because transported last month was 0 again.
I understand what you did there and you are free to modify the script. I gave it a thought and I will not change it to moving average or to have a grace period, because it would almost remove its meaning. If you want to have the city growing, you have to provide regular service. If you achieve at least 1 ship per month, which should not be that difficult, the citizens will be happy with your service and the city will grow.

If you feel like the town is too small for that many ships, you can always increase the number for "Minimum size of town before the limit rules kicks in" parameter.

speeder
Engineer
Engineer
Posts: 25
Joined: 16 Jul 2014 05:57

Re: [GS] Renewed Village Growth (RVG)

Post by speeder »

I did it that way because map is huge. If you add vehicles to transport everyone regularly, you hit the vehicle limits... (for example: one part of my map there was a route that took a year on each direction, thus only way to ensure 1 transportation per month would be build 24 vehicles... if you have 20 routes like that, you would need 480 vehicles, only 20 short of the 500 vehicle limit)

a7m2
Engineer
Engineer
Posts: 2
Joined: 19 Jun 2020 15:12

Re: [GS] Renewed Village Growth (RVG)

Post by a7m2 »

Hi, I'm really loving the GS so far. Making sure the coverage is good and everything is smooth to transport enough mail and passengers to make a place grow is really fun!
I'm not sure how the cargo distribution works, though.
Image
I've been supplying food to this city but for some reason it's always saying 43/0/0. Is there a specific place within the city I need to supply? I'm just dropping it off at the train station in the city - which accepts it.
Here's the other view in case it matters:
Image
(I decreased the passenger and mail requirements to 55% while I learn how to play with this GS).

Edit:
It seems like the town nearby is stealing the food... I think.
Image
I'm not supplying food to this town.

Image
It's also quite far and it's not receiving the passengers from the same train station.

Firrel
Engineer
Engineer
Posts: 36
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

Hi a7m2, I am glad you like the script.
a7m2 wrote:
19 Jun 2020 15:21
I've been supplying food to this city but for some reason it's always saying 43/0/0. Is there a specific place within the city I need to supply? I'm just dropping it off at the train station in the city - which accepts it.
For FIRS 3, I put food and goods in Transformed industrial goods category to make it more interesting. So supplying food will not make it grow but for example livestock will. You can find the required cargo types for each category in the Story Book. Here is FIRS 3 Extreme as an example.
img4.PNG
img4.PNG (22.01 KiB) Viewed 2186 times
For the town to receive the cargo that the town houses do not accept, like the livestock, you need to supply a factory that is close to that town and accepts the cargo type. That is why the other town receives some cargo in food category, it is supplied by a cargo from that category.

For more information on how the script works please read the supplied README file. You can find it on first post of this thread or in game where you select game scripts.

a7m2
Engineer
Engineer
Posts: 2
Joined: 19 Jun 2020 15:12

Re: [GS] Renewed Village Growth (RVG)

Post by a7m2 »

Thanks that explains it! I did read the README but I must have missed it. My bad

DrCplKlinger
Engineer
Engineer
Posts: 9
Joined: 28 Dec 2018 19:29

Re: [GS] Renewed Village Growth (RVG)

Post by DrCplKlinger »

This is really good! I like the changes from older city growth scripts and am happy new forks of city growth are being maintained.

The only thing that's missing is the competitive mode that City Builder script had. With that, this would be perfect. :mrgreen:

Firrel
Engineer
Engineer
Posts: 36
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

DrCplKlinger wrote:
25 Jun 2020 23:25
This is really good! I like the changes from older city growth scripts and am happy new forks of city growth are being maintained.

The only thing that's missing is the competitive mode that City Builder script had. With that, this would be perfect. :mrgreen:
This script is about building all cities on the map, not only one selected city as the city builders work. So the competitive style of city builder is not suitable for this script. This script is more suited for cooperative gameplay, you can set a goal for example to reach million population on a map and try to achieve it together.

If you have an idea on how to implement the competitive aspect, you are free to suggest it or fork it.

d0mi3l
Engineer
Engineer
Posts: 23
Joined: 16 Aug 2013 18:04
Location: Poland

Re: [GS] Renewed Village Growth (RVG)

Post by d0mi3l »

When I build new city on map, GS stop work.

What about industry spawn? Could you adds it to your script. Like in Villages is Villages.
8)
Attachments
Adams & Co., 1700-01-27.png
(648.26 KiB) Not downloaded yet

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 5 guests