[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'
4
80%
4★ "AsiaStar"
0
No votes
3★ Floss "47"
1
20%
2★ Ploddyphut Choo-Choo
0
No votes
1★ Kirby Paul Tank
0
No votes
 
Total votes: 5

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

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

If you have a game without any other game script, it might be possible, but I haven't tried it, so can't tell for sure. It is possible to do in the scenario editor.

You can try to do it this way: viewtopic.php?p=1240195#p1240195

Also I am working on a new version, which should be ready soon™ and would not be compatible with previous version. It will also make it easier to add to the game.
User avatar
pr0saic
Engineer
Engineer
Posts: 5
Joined: 27 Jan 2021 12:33
Location: England
Contact:

Re: [GS] Renewed Village Growth (RVG)

Post by pr0saic »

Firrel wrote: 27 Jan 2021 17:49 You can try to do it this way: viewtopic.php?p=1240195#p1240195
So I managed to add it this way, as well as by modifying info.nut to allow me to set the industry set to FIRS, however, I'm using FIRS 2 and the script only supports FIRS 1 & 3, so when I set it to FIRS 3 - Extreme (I'm using FIRS 2 - Extreme), I got an error saying "the industry set defined in the GS settings doesn't match with the game's initial cargo list". I'm not sure if this is because I added the script part way through the save, or if it's because FIRS 2 isn't supported.

Hope to hear back from you!
Cheers
Ayy Lmao
Firrel
Engineer
Engineer
Posts: 51
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

pr0saic wrote: 28 Jan 2021 12:43 I'm using FIRS 2 and the script only supports FIRS 1 & 3, so when I set it to FIRS 3 - Extreme (I'm using FIRS 2 - Extreme), I got an error saying "the industry set defined in the GS settings doesn't match with the game's initial cargo list".
FIRS 2 is not supported in this version, but will be in the next one. In the next version, the economies, which are not predefined, will be automatically generated based on the cargo list and cargo type. Hopefully I will get to finish it this weekend, but no promises.

Or you can define the FIRS 2 economy as described here.
User avatar
pr0saic
Engineer
Engineer
Posts: 5
Joined: 27 Jan 2021 12:33
Location: England
Contact:

Re: [GS] Renewed Village Growth (RVG)

Post by pr0saic »

Firrel wrote: 28 Jan 2021 14:19
pr0saic wrote: 28 Jan 2021 12:43 I'm using FIRS 2 and the script only supports FIRS 1 & 3, so when I set it to FIRS 3 - Extreme (I'm using FIRS 2 - Extreme), I got an error saying "the industry set defined in the GS settings doesn't match with the game's initial cargo list".
FIRS 2 is not supported in this version, but will be in the next one. In the next version, the economies, which are not predefined, will be automatically generated based on the cargo list and cargo type. Hopefully I will get to finish it this weekend, but no promises.

Or you can define the FIRS 2 economy as described here.
Perfect! Thank you! :bow:
Ayy Lmao
Argus
Traffic Manager
Traffic Manager
Posts: 208
Joined: 16 Oct 2018 08:31

Re: [GS] Renewed Village Growth (RVG)

Post by Argus »

I have some games saved with an old version of the script. My cities are not developing now. Is there anything you can do about it? It's not just this script, but also others. The game did not replace the script with a new version, but at the same time it behaves as if it were there. Is it possible to restart it or stop this behavior?
Firrel
Engineer
Engineer
Posts: 51
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

Argus wrote: 29 Jan 2021 15:18 I have some games saved with an old version of the script. My cities are not developing now. Is there anything you can do about it? It's not just this script, but also others. The game did not replace the script with a new version, but at the same time it behaves as if it were there. Is it possible to restart it or stop this behavior?
You will need to specify the problem. Which version are you using? Which version are you trying to upgrade to? What other scripts? How to reproduce it? You can send me your save game and more info to PM.

The versioning system works the way that the major versions are savegame incompatible and minor version should be compatible, so you can upgrade from 4.2 to 4.3, but not to 5.0 without breaking it. Keeping all versions savegame compatible would be too much work for what its worth.

It might be possible to restart and upgrade it with a small code change, but it might also break in so many ways, so you can do it at your risk. Here is how:
[+] Spoiler
1. Untar the game script (when upgrading, untar the new version) located in /path/to/OpenTTD/content_download/game
2. Open info.nut and change this line: (so that it can load previous versions)

Code: Select all

function MinVersionToLoad()	{ return 1; }
3. Open main.nut and comment out the content of the loading function

Code: Select all

function MainClass::Load(version, saved_data)
{
  /* ... */
}
4. Start the game and wait for the initialization to be complete. The game script should restart itself. Then save it (to a different save) that will contain saved data of the new version.
5. Revert the code changes
Argus
Traffic Manager
Traffic Manager
Posts: 208
Joined: 16 Oct 2018 08:31

Re: [GS] Renewed Village Growth (RVG)

Post by Argus »

Now I don't have time for that, but it's a pity that the game doesn't behave like in the case of newgrf, when it simply turns off the missing graphics. As for the script version, I have downloaded the current one, and unfortunately I have no idea what version was originally in the saved game - I transferred the games and everything else to a new computer and some are even two years old ... I didn't think of transferring scripts, I had no idea there was such a problem. I do not want to change anything in the script, I'm sorry that the game does not have a more elegant solution for these cases ... Unfortunately, I will not describe the problem with my level of English better, simply if I give the ai / game settings, the script is not listed at all. However, the game behaves as if it has been loaded.
User avatar
pr0saic
Engineer
Engineer
Posts: 5
Joined: 27 Jan 2021 12:33
Location: England
Contact:

Re: [GS] Renewed Village Growth (RVG)

Post by pr0saic »

Argus wrote: 29 Jan 2021 18:28 Now I don't have time for that, but it's a pity that the game doesn't behave like in the case of newgrf, when it simply turns off the missing graphics. As for the script version, I have downloaded the current one, and unfortunately I have no idea what version was originally in the saved game - I transferred the games and everything else to a new computer and some are even two years old ... I didn't think of transferring scripts, I had no idea there was such a problem. I do not want to change anything in the script, I'm sorry that the game does not have a more elegant solution for these cases ... Unfortunately, I will not describe the problem with my level of English better, simply if I give the ai / game settings, the script is not listed at all. However, the game behaves as if it has been loaded.
I had the same issue when I was messing around with some of the files, if the GS is not in a folder or a .tar in the Documents/OpenTTD/content_download/game folder, OpenTTD doesn't detect it
Probably not the problem, but might be worth checking? :|
Ayy Lmao
Argus
Traffic Manager
Traffic Manager
Posts: 208
Joined: 16 Oct 2018 08:31

Re: [GS] Renewed Village Growth (RVG)

Post by Argus »

No, that's not it. In short, the saved game has an older version than the one currently downloaded. I expect the new games to behave the same when I update this script. Now I find that, for example, GS Think globally act locally, with which the problem is the most, I have it in several versions, in the given folder. Except for the current versions 12, 16 and 17. This script is only in version 5. I'll try to see if something has wandered somewhere, but I doubt it.
Argus
Traffic Manager
Traffic Manager
Posts: 208
Joined: 16 Oct 2018 08:31

Re: [GS] Renewed Village Growth (RVG)

Post by Argus »

I have all the scripts where they should be. However, I additionally found out that there are scripts in the backup from the old computer in the end, so maybe the problem was solved.
Edit: Problem solved only partially, some versions probably still missing. But if it can't be solved other than by intervening in the script code and possibly breaking the saved game, I probably won't solve it anymore. It is a pity that it is not possible to find out which version was in that particular game.
Firrel
Engineer
Engineer
Posts: 51
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

Argus wrote: 29 Jan 2021 21:27
Added link to every RVG version to the first post under changelog spoilers. You can download and try them. Hopefully this will solve your problem.
Argus
Traffic Manager
Traffic Manager
Posts: 208
Joined: 16 Oct 2018 08:31

Re: [GS] Renewed Village Growth (RVG)

Post by Argus »

Thanks :)
Firrel
Engineer
Engineer
Posts: 51
Joined: 13 Aug 2019 17:06

Re: [GS] Renewed Village Growth (RVG)

Post by Firrel »

New update for Renewed Village Growth 6.0 is available in BaNaNaS

This version received another rework of the town info box to allow few more parameters, that are already used up by a new feature. The feature adds a best contributor for each town, which is decided on how much each player contributed to the town in the previous month concerning fulfilling categories. Each player now receives points for increasing the population of towns over its maximum for each most contributed towns. The points are displayed in the Goals UI along with some more statistics.

Image

Another requested feature is added, the industry stabilizer. When enabled, it will fund raw industries on the map and maintain that number of industries. As a bonus, it can be used to create a map with only raw industries, which suits well with the randomization gameplay.

Removed the need to select industry NewGRF, now the correct economy is choses from the list of explicitely supported economies. Now also featuring FIRS 2 thanks to pr0saic. If the industry is not explicitely supported, the categories will be proceduraly generated to support any Industry NewGRF now or in the future.

Added several more randomization options also with a new type: industry. This randomization type will create categories based on industry types in the game. Each category then represents one (or more if needed) industry type by their input cargo types. This is most useful for big economies like FIRS Steeltown or XIS.

The limiter is also reworked to show only underperforming cargo types. This also allows to define different limited cargo types, like ITI now has pax, mail and waste and YETI has pax, mail, yeti and tired yeti. The percentage is now the average of all limited cargo types.

These were big changes to the code, so if you encounter any problem, please post it here. You can download the update from the first post of this thread or from BaNaNaS.

Complete changelog
[+] Spoiler
* Not compatible with previous versions
- new: Growth statistics for each player based on most contributed towns
- new: Added FIRS 2.1.5 predefined cargo categories (pr0saic)
- new: Updated texts in story book to include randomization cases
- new: The supported economy is automatically detected from the cargo list
- new: Added industry randomization option based on number of inputs of an industry
- new: Added more cargo randomization options
- new: Raw industry stabilizer that prospects raw industries based on a setting
- new: Added warning for too many towns to save
- modified: Removed cargo stockpiled number from town info box
- modified: Reworked showing of limiter information to show only underperforming cargos with color indication
- modified: Reworked limiter, now limits growth based on average value of all limited cargos (supports more cargos than passangers and mails)
- modified: Changed all parameters to be changeable and handled edge cases
- modified: Added Waste for ITI and Yeti, Tired Yeti for YETI as additional limited cargos
- fix: Prevent showing all cargos when the randomization is none
- fix: Growth rate is limited to 1 day minimum
- fix: Ignore CZTR cargo LVPT when randomizing cargo categories
Attachments
statistics.png
(48.07 KiB) Not downloaded yet
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 4 guests