[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: 34
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

d0mi3l wrote:
06 Jul 2020 15:33
When I build new city on map, GS stop work.
Thank you for the feedback. I missed to modify one function call when I changed function declaration of GoalTown(). I will fix it in the future release. For a quick fix if you want it to work, change in main.nut line 239 to this:

Code: Select all

this.towns.append(GoalTown(town_id, false, this.limit_growth));
d0mi3l wrote:
06 Jul 2020 15:33
What about industry spawn? Could you adds it to your script. Like in Villages is Villages.
8)
It is an interesting feature and I think it is possible to add it. When I will get some time to work on next release, I can look into it, but no promises.

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

New update for Renewed Village Growth 4.1 is available
Renewed_Village_Growth-4.1.tar
(110 KiB) Downloaded 27 times
Significant changes
- Randomization. In settings, there are several options to specify randomization of cargos per town. Each town will select random cargos per category and only those cargos are counted towards progress.
- Added support for FIRS 1.4, FIRS 4 and Improved Town Industries 1.3
- Reworked town texts
- Reworked cargo categories for every industry
- Modified default values of settings to have easy/medium/hard value - please adjust them based on your preferences
More information in changelog.txt or on first post of this thread.

RVG development is now on github: https://github.com/F1rrel/RenewedVillageGrowth

Hope you enjoy it and please let me know about any issues. These were significant changes to the code.

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

New update for Renewed Village Growth 4.2 is available in BaNaNaS
Renewed_Village_Growth-4.2.tar
(110.5 KiB) Downloaded 3 times
Changes
- 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

If you want to use this version, please delete previous version so that this version is selected. Will look into it.

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

New update for Renewed Village Growth 4.3 is available in BaNaNaS
Renewed_Village_Growth-4.3.tar
(110 KiB) Downloaded 3 times
Changes
- fix: reworked GS versioning system, now the latest savegame compatible version should be correctly selected

ilhamou13
Engineer
Engineer
Posts: 1
Joined: 19 Sep 2020 18:10

Re: [GS] Renewed Village Growth (RVG)

Post by ilhamou13 »

speeder wrote:
30 May 2020 23:11
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.
Having the goals just be what you can deliver to the town or at least having options to configure the cargos would be nice.

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

Firrel wrote:
30 May 2020 10:03
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
Configuration of custom cargo categories was already aswered on this forum. I think you saw it as you used the exact same wording. If you have problem with one of the steps, please let me know.
ilhamou13 wrote:
19 Sep 2020 18:18
Having the goals just be what you can deliver to the town or at least having options to configure the cargos would be nice.
The cargos that the city can accept can vary greatly: climates, newGRF towns (ITL), newGRF industries (FIRS). They can also change during the gameplay, like the town no longer accepting goods due to dissapearing of offices. So if you want a game with only accepted cargos, you need to create that cargo list based on what you are going to use.

As a side note, this is a snippet from OpenTTD wiki:
Sub Tropical
If the centre square of the town is in the desert, at least 1t of food and 1,000L of water per month must be delivered for the town to grow. The town information window will show whether food and water was delivered recently.
The towns will grow very slowly on their own, so in the case of small towns not large enough to accept food, it is simply a case of waiting for them to grow. As with any other cargo a station needs at least 8/8 of food acceptance in its coverage area before it accepts food.
Water must be delivered to a Water Tower industry. Water Towers may be generated automatically in towns, or a player may choose to fund one using the "Fund new industry" menu.
The way I play this game script is that I have industries at funding only or at very low (with ITI only primary industries spawn), which makes funding of industries mandatory. I use base cost mod to lower the cost of funding, so it is available sooner. This makes the game interesting in a way that you have to establish a functional passanger and mail network before the towns will start to require cargos accepted by funded industries.

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5212
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: [GS] Renewed Village Growth (RVG)

Post by andythenorth »

Hi Firrel,

Wanted to let you know there's a FIRS 4 Alpha 3 https://grf.farm/firs/4.0.0-alpha-3/html/economies.html

Contains the final Steeltown cargos that will be in the v4 release, these won't change again before v4. :D

I've put the 'In A Hot Country' economy back into FIRS v4 also, but that's not in Alpha 3.

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

andythenorth wrote:
20 Sep 2020 11:01
Hi Firrel,

Wanted to let you know there's a FIRS 4 Alpha 3 https://grf.farm/firs/4.0.0-alpha-3/html/economies.html

Contains the final Steeltown cargos that will be in the v4 release, these won't change again before v4. :D

I've put the 'In A Hot Country' economy back into FIRS v4 also, but that's not in Alpha 3.
Thank you for the info. I already included FIRS v4 alpha 3 in RVG 4. I see it as mutually beneficial to include industry sets in development (FIRS4, XIS, ITI) so it can draw more people to test it. :)

I had to do special categories for the v4 Steeltown, because it did not fit with the current ones. I guess it was your goal to make it different :D I would like to extend the economies that use almost 64 cargos to more categories, but it is not possible right now. Also glad to hear "In a hot country" is getting back.

Screenshot from 2020-09-21 16-50-12.png
Screenshot from 2020-09-21 16-50-12.png (15.12 KiB) Viewed 93 times

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5212
Joined: 31 Mar 2007 14:23
Location: Lost in Music

Re: [GS] Renewed Village Growth (RVG)

Post by andythenorth »

Firrel wrote:
21 Sep 2020 15:46
Thank you for the info. I already included FIRS v4 alpha 3 in RVG 4. I see it as mutually beneficial to include industry sets in development (FIRS4, XIS, ITI) so it can draw more people to test it. :)
Thanks :) I am always using a local dev build of FIRS, which RVG doesn't know about. Is there a way to force it? Happy to edit the GS directly... :)
I had to do special categories for the v4 Steeltown, because it did not fit with the current ones.
This is cool, and lines up with FIRS intended design :) Rebar is also a final products cargo in my opinion - goes to Builders Yards for town construction. :)

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

andythenorth wrote:
21 Sep 2020 19:40
Firrel wrote:
21 Sep 2020 15:46
Thank you for the info. I already included FIRS v4 alpha 3 in RVG 4. I see it as mutually beneficial to include industry sets in development (FIRS4, XIS, ITI) so it can draw more people to test it. :)
Thanks :) I am always using a local dev build of FIRS, which RVG doesn't know about. Is there a way to force it? Happy to edit the GS directly... :)
You can change the cargo list and categories, it is straightforward. The source code can be found in github. The cargo list is used to check if the cargos used for creating categories and in game match to ensure compatibility. Categories are defined as shown down. As side note, the number of categories and category names for an economy are now hardcoded, so should not be modified. To make it compatible, the cargo list must match and the correct cargo indexes must be used in the ::CargoCat list. I would gladly accept push request with updates to economies. :)

::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
andythenorth wrote:
21 Sep 2020 19:40
Rebar is also a final products cargo in my opinion - goes to Builders Yards for town construction. :)
I agree with you, I have missed it. Thank you for pointing it out. :)

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 2 guests