[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

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: 36
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 29 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: 36
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 5 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: 36
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 5 times
Changes
- fix: reworked GS versioning system, now the latest savegame compatible version should be correctly selected

Firrel
Engineer
Engineer
Posts: 36
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: 5233
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: 36
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 503 times

User avatar
andythenorth
Tycoon
Tycoon
Posts: 5233
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: 36
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. :)

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

Re: [GS] Renewed Village Growth (RVG)

Post by andythenorth »

Thanks :)

I don't know if it's of use, but I've considered publishing a manifest of economies and cargos.

I could do this automatically in the FIRS docs. It could be JSON, YAML, or similar formats.

I could also try and provide hint information about the role of the cargo, e.g. public service, processed etc? That might need more discussion.

This might be of use generally for GS (I am thinking of writing a cargo goals challenge that would use it).

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

andythenorth wrote:
22 Sep 2020 20:27
I don't know if it's of use, but I've considered publishing a manifest of economies and cargos.
The information I am missing when adding new economy is assignment of cargo labels with cargos. Sometimes it is hard to guess them. This would be useful to have in docs or manifest. Being able to parse it from the manifest could speed it up.
andythenorth wrote:
22 Sep 2020 20:27
I could also try and provide hint information about the role of the cargo, e.g. public service, processed etc? That might need more discussion.
I would like to create a table of all so far existing cargo labels and their categorization in general categories (public service, raw goods, raw food, processed, final) so it will handle all economy grfs. This would be less precise, but it would make space for more specified economies, like FIRS4 Steeltown.

Also I did a playtest of FIRS4 Steeltown and RVG and found out that another categorization could be based on industries. Most of the industries accept 4 cargo types, so it would be better if the category was constructed from these 4 cargos. It would also prevent from having two towns next to each other with the same constructed industry and receiving just one specific cargo, because the town requires it. So basically instead of having cargo categories, the individual industries would be categorized.

So if you provide hint information on the cargo I would most probably use it. But as it only moves work from me to you, I will not ask it from you. :D

User avatar
2TallTyler
Traffic Manager
Traffic Manager
Posts: 180
Joined: 11 Aug 2019 18:15
Contact:

Re: [GS] Renewed Village Growth (RVG)

Post by 2TallTyler »

You may have found it already, but here is the cargo list for Improved Town Industries. I have some major changes coming in mid-October but the new cargos (Lumber, Uranium, Nuclear Fuel, and Nuclear Waste) would all be classified as Raw Materials, keeping only Food and Goods as Products delivered to houses.

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

Thank you for the heads up on new version.

I am usually getting the cargo list using GSCargoList, but from the github it will be faster. As I looked through it, I found the planned industries. This is how I categorize it: the raw is from a factory that does not require input to create output, processed is from factories that need input. This way I would categorize Uranium as raw, Nuclear Fuel and Nuclear Waste as processed and most probably timber is also processed. I also need to move food to the raw category as it comes from farms. I would also like to include waste in the public services and limiter (maybe combined with mail). Also it would be interesting to be able to distinguish passengers from workers that go to industries to promote serving them. But I would keep it as PASS cargo so cargo dist can do its thing. :D

I still have many ideas on how to improve this script, but I need to check if they are doable and find the time to work on it.

User avatar
2TallTyler
Traffic Manager
Traffic Manager
Posts: 180
Joined: 11 Aug 2019 18:15
Contact:

Re: [GS] Renewed Village Growth (RVG)

Post by 2TallTyler »

I will be adding a cargo flowchart, list of industries, and list of cargos to the documentation before release time. Enough things have changed from the vanilla industries that it would be helpful to have a visualization of the whole picture. I hope that will make your next update easier (and be a good reference for players in any case).

Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 7 guests