[GS] Renewed Village Growth 11.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

Post Reply

How would you rate this game script?

5★ Lev4 'Chimaera'
31
82%
4★ "AsiaStar"
5
13%
3★ Floss "47"
2
5%
2★ Ploddyphut Choo-Choo
0
No votes
1★ Kirby Paul Tank
0
No votes
 
Total votes: 38

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

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

Post by Firrel »

robiz wrote: 30 Aug 2021 18:37 If I've correctly investigated the game, I've found some missing materials.
Hey robiz. I checked it and you are right, there are missing cargos, because the first 12 cargo types are the same as basic tropical economy, so that it was used instead of generated categories. In the OpenTTD 12.0, there is a way for the GS to get the list of active newGRFs, which would solve this issue. But this could be done with a hotfix.
abloke wrote: 31 Aug 2021 02:26 Does within range mean just a tile owned by the local authority (as I understand it every tile in the map is owned by some town, even ones very far away from the town, which is why making airports with the noise limit on can be a pain) or does it just mean within the zone you can see by going to Local Authority -> View Zone?
Does the industry have to be within the range or does it just have to be the station accepting the given cargo that's within the zone?
Hey abloke. The best way to find out if it is fine is to put down a station and if the station has the same name as the town, it will be counted towards that town. So you can have a hub quite far from the town based on the nearby towns areas. If you plan to fund an industry, it is also good to test the spots with a few stations. This way you can also find the edges of the catchment area and put it as far as possible. I would try to keep the industry and station with the same name, it might work with different names, but you cant be sure. I dont know the exact rules how it works, it is only a GS function that I call.
abloke wrote: 31 Aug 2021 02:26 Why does population sometimes decrease even when a town shows 'growing within ~300 days' or similar? It seems to dip down then come back up a lot.
The regular town growing rules apply. A house can be demolished, rebuilt, added or a road can be added. A fountain can be built instead of a big house reducing the population.
abloke wrote: 31 Aug 2021 02:26 Perhaps a better explanation on how industry descending and ascending sort things into tiers would be helpful and maybe a look at making sure the highest tier (cat II in descending, cat IV in ascending) is definitely end products also.
The industry randomization is proceduraly generated, there are no economy templates, so anything can happen. It is meant to reduce the number of different industries you need per town and to incentivize providing all cargo types to those industries. As you know FIRS industries increase production when all cargos are provided, so it makes most sense to use it there. Here is exactly how the categories are generated:

1. Create 5 lists of industries: raw, 1 cargo accepting, 2, 3, and more or equal to 4. The passangers and mails are ignored here.
2. From these lists, the individual categories are created.
3. Cat I. PASS and MAIL
4. Cat II. Pick one of the 1 cargo accepting industries. If there is none, pick from raw industries. This should produce 1 cargo, mostly 2 (from raw industry like farm)
5. Cat III. Pick one of the 2 cargo accepting industries if there are more than 2 (enought variance) or there are not enough 1 cargo and raw industries to form this category. Otherwise form the category from 1 cargo and raw industries. This should produce 2 cargos, at most 3 (again raw industry).
6. Cat IV. Same as Cat III, but uses 3 cargo industries with fallback to 2 cargo industries + 1 cargo industries / raw industries.
7. Cat V. Same as Cat III, but uses 4+ cargo industries with fallback to 3 cargo industries + 1 cargo industries / raw industries. This category can be not created if there are not enought industries, so it is a possibility of only 4 categories.
8. If descending, swap the order of categories.
9. Profit by failing to create sensible categories for most of the economies (and sometimes fail completely).

Below is the code if you want to peek into it. As you can see, there is no way of specifying luxury cargos. For that purpose, there are the other randomization options, which have hand picked categories.
[+] Spoiler

Code: Select all

    local industry_type_list = GSIndustryTypeList();

    local list_raw = [];
    local list_1 = [];
    local list_2 = [];
    local list_3 = [];
    local list_4 = [];
    foreach (industry, _ in industry_type_list) {
        local cargo_list = GSIndustryType.GetAcceptedCargo(industry);
        cargo_list.RemoveItem(0); // exclude PASS
        cargo_list.RemoveItem(2); // exclude MAIL

        switch (cargo_list.Count())
        {
            case 0:
                break;
            case 1:
                if (GSIndustryType.IsRawIndustry(industry))
                    list_raw.append(industry);
                else
                    list_1.append(industry);
                break;
            case 2:
                if (GSIndustryType.IsRawIndustry(industry))
                    list_raw.append(industry);
                else
                    list_2.append(industry);
                break;
            case 3:
                list_3.append(industry);
                break;
            default:
                list_4.append(industry);
        }
    }
    
        // 1. Category (PASS, MAIL)

    // 2. Category
    {
        if (list_1.len() == 0) {
            local rand = GSBase.RandRange(list_raw.len());
            categories.append([list_raw[rand]]);
            list_raw.remove(rand);
        }
        else {
            local rand = GSBase.RandRange(list_1.len());
            categories.append([list_1[rand]]);
            list_1.remove(rand);
        }
    }

    // 3. Category
    if (list_2.len() > 2 || (list_1.len() < 2 && list_2.len() > 0)) {
        local rand = GSBase.RandRange(list_2.len());
        categories.append([list_2[rand]]);
        list_2.remove(rand);
    }
    else {
        local rand = GSBase.RandRange(3);
        if (rand < list_2.len()) {
            categories.append([list_2[rand]]);
            list_2.remove(rand);
        }
        else {
            if (list_raw.len() > 0) {
                local rand_1 = GSBase.RandRange(list_1.len());
                local rand_raw = GSBase.RandRange(list_raw.len());
                categories.append([list_1[rand_1], list_raw[rand_raw]]);
                list_1.remove(rand_1);
                list_raw.remove(rand_raw);
            }
            else {
                local rand_1 = GSBase.RandRange(list_1.len());
                local rand_2 = GSBase.RandRange(list_1.len() - 1);
                categories.append([list_1[rand_1], list_1[rand_2 >= rand_1 ? rand_2 + 1 : rand_2]]);
                list_1.remove(rand_1);
                list_1.remove(rand_2);
            }
        }
    }

    // 4. Category
    if (list_3.len() > 2 || ((list_2.len() == 0 || (list_1.len() + list_raw.len() == 0)) && list_3.len() > 0)) {
        local rand = GSBase.RandRange(list_3.len());
        categories.append([list_3[rand]]);
        list_3.remove(rand);
    }
    else {
        local rand = GSBase.RandRange(3);
        if (rand < list_3.len()) {
            categories.append([list_3[rand]]);
            list_3.remove(rand);
        }
        else {
            local list = clone list_1;
            list.extend(list_raw);

            local rand_1 = GSBase.RandRange(list.len());
            local rand_2 = GSBase.RandRange(list_2.len());

            categories.append([list[rand_1], list_2[rand_2]]);
            if (rand_1 < list_1.len())
                list_1.remove(rand_1);
            else
                list_raw.remove(rand_1 - list_1.len());
            list_2.remove(rand_2);
        }
    }

    // 5. Category
    if (list_4.len() > 2 || ((list_3.len() < 5 || (list_1.len() + list_raw.len() < 5)) && list_4.len() > 0)) {
        local rand = GSBase.RandRange(list_4.len());
        categories.append([list_4[rand]]);
        list_4.remove(rand);
    }
    else if (list_4.len() > 0) {
        local rand = GSBase.RandRange(3);
        if (rand < list_4.len()) {
            categories.append([list_4[rand]]);
            list_4.remove(rand);
        }
        else {
            local list = clone list_1;
            list.extend(list_raw);

            local rand_1 = GSBase.RandRange(list.len());
            local rand_3 = GSBase.RandRange(list_3.len());

            categories.append([list[rand_1], list_3[rand_3]]);
            if (rand_1 < list_1.len())
                list_1.remove(rand_1);
            else
                list_raw.remove(rand_1 - list_1.len());
            list_3.remove(rand_3);
        }
    }
    else if (list_3.len() > 4 && (list_1.len() + list_raw.len() > 4)) {
        local list = clone list_1;
        list.extend(list_raw);

        local rand_1 = GSBase.RandRange(list.len());
        local rand_3 = GSBase.RandRange(list_3.len());

        categories.append([list[rand_1], list_3[rand_3]]);
        if (rand_1 < list_1.len())
            list_1.remove(rand_1);
        else
            list_raw.remove(rand_1 - list_1.len());
        list_3.remove(rand_3);
    }

    if (!ascending) {
        local category_reverse = [];
        for (local i = categories.len() - 1; i >= 0; --i) {
            category_reverse.append(categories[i]);
        }
        return category_reverse;
    }
robiz
Engineer
Engineer
Posts: 2
Joined: 26 Aug 2021 07:22

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

Post by robiz »

Firrel wrote: 31 Aug 2021 18:39 Hey robiz. I checked it and you are right, there are missing cargos, because the first 12 cargo types are the same as basic tropical economy, so that it was used instead of generated categories. In the OpenTTD 12.0, there is a way for the GS to get the list of active newGRFs, which would solve this issue.
But this could be done with a hotfix.
Thanks for confirming.
I see that you keep the script updated and that you have just released one hotfix,
so take your time without stress :wink:
I'm following the topic.
--
RZ
abloke
Engineer
Engineer
Posts: 3
Joined: 31 Aug 2021 01:33

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

Post by abloke »

Firrel wrote: 31 Aug 2021 18:39 Hey abloke. The best way to find out if it is fine is to put down a station and if the station has the same name as the town, it will be counted towards that town. So you can have a hub quite far from the town based on the nearby towns areas. If you plan to fund an industry, it is also good to test the spots with a few stations. This way you can also find the edges of the catchment area and put it as far as possible. I would try to keep the industry and station with the same name, it might work with different names, but you cant be sure. I dont know the exact rules how it works, it is only a GS function that I call.
Got it, sounds like it's based on which local authority owns the tile then like you can see with the ? toolbar icon. That's good news since it's further out.
Firrel wrote: 31 Aug 2021 18:39 The regular town growing rules apply. A house can be demolished, rebuilt, added or a road can be added. A fountain can be built instead of a big house reducing the population.
Right so it will eventually trend upwards presumably. I've probably just never noticed that before since I don't spend so long looking at a city and the slower growth from this grf + starting with much smaller settlements due to the other grf make it more obvious.

Firrel wrote: 31 Aug 2021 18:39 The industry randomization is proceduraly generated, there are no economy templates, so anything can happen. It is meant to reduce the number of different industries you need per town and to incentivize providing all cargo types to those industries. As you know FIRS industries increase production when all cargos are provided, so it makes most sense to use it there. Here is exactly how the categories are generated:

...
Thanks, this helped a lot. I was thinking it was probably working along something like this method which explains why the steel mill input industries acted weird. I'll have to try the same 10 settelement experiment with FIRS' extreme industry and an early start since I think that also cuts out some industries until later time periods which again might throw some industries into lower categories than expected. That's not a huge issue anyway.

Firrel wrote: 31 Aug 2021 18:39 Below is the code if you want to peek into it. As you can see, there is no way of specifying luxury cargos. For that purpose, there are the other randomization options, which have hand picked categories.

...
Is that code in NML? Never really dug into making or editing grfs. It looks pretty clear though. From what I can see and what you said for each industry you list all cargos, remove mail and passenger then sort them into the lists you gave: it looks like raw industries are specified (by you by hand maybe?) in a function elsewhere and always count as raw regardless of if they accept 1,2, 3 or 4+ cargos. Would it be possible, if not too much work, to do the same thing for a specified list of town/finished product industries but favouring them instead of falling back to them? That is, w/regards to FIRS at least, to specify by hand that anything listed in a flowchart as a finished goods town industry (general store, builders yards, vehicle dealership and the like but not hotel as it needs passengers and that'd be too easy) should always go into a list_products and that list should always populate a given category first? If that category was always II or IV/V then ascending/descending would allow it to be picked manually as the first to show up. If this was a grf parameter that could also work, something like 'town industries always populate category II' or 'favour finished products for early categories' maybe.

The motive for this is that you can be pretty sure towns will have a general store or similar and if not they are small, cheap to fund and don't look out of place inside a town so you'd have an easy time adding one without making every small settlement an industrial looking area and also thematically it makes sense to me for smaller places to only want finished goods not be involved in the manufacturing process. I can't speak for how it might work for other industry mods though.

For that to work I think you'd need to put the conditional directly before the switch. Technically the raw industry check should probably be there too as right now it's hypothetically possible for a raw industry with either 3 or 4 cargo inputs to not be sorted into list_raw, unless that was intentional.

Also it looks like passengers can still show up as an acceptable input for later categories because while you remove PASS and MAIL from the cargo_list you append the industry itself to a given category once it's sorted. So a FIRS hotel that accepts passengers, alcohol and food has PASS stripped out before the switch leaving it with 2 input cargos, is sorted into list_2 then is appended by name rather than by cargos then when it's picked for a settlement's category it loads the industry and checks what inputs it wants readding passengers. Not sure if that's a concern at all, if you wanted to ensure passengers and mail were always excluded you'd need to append the cargo_list the switch case is running on (possibly explicitly as a tuple or whatever NML is using) instead of appending the industry itself and then modify whatever code elsewhere looks at categories to expect cargo instead of industries. Honestly I don't think that's necessary personally.
Firrel wrote: 31 Aug 2021 18:39 4. Cat II. Pick one of the 1 cargo accepting industries. If there is none, pick from raw industries. This should produce 1 cargo, mostly 2 (from raw industry like farm)
That and the code explains another thing I was puzzled by: why farming and engineering supplies never showed up for temperate basic cargos. It's because the industries that accept them are classified as raw industries and will never be picked if there's a sufficient amount of 1-input industries. Again, not an issue, I was just confused about it.
Wahazar
Tycoon
Tycoon
Posts: 1452
Joined: 18 Jan 2014 18:10

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

Post by Wahazar »

Both RCG and RVG have max_town_growth_rate variable reciprocal to city population (old version: dvided by curpop+offset, new version: exponential decay - both curves are similar).

So smaller city means larger max_town_growth_rate, but despite of its name, larger growth = slower growth (larger period between growth bursts).
Not sure if it is bug or intended?

I'm asking because I found particulary hard on even impossible to trigger small cities growing - even if their goal are small.
While large cities are growing very fast (and pass/mail cargodist exaggerate such effect).
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 137
Joined: 13 Aug 2019 17:06

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

Post by Firrel »

abloke wrote: 02 Sep 2021 05:01 Is that code in NML?
No, it is written in Squirrel programming language. It is similar to C, C++ and javascript. It is really easy to pick up when you are familiar with these languages.
abloke wrote: 02 Sep 2021 05:01 From what I can see and what you said for each industry you list all cargos, remove mail and passenger then sort them into the lists you gave: it looks like raw industries are specified (by you by hand maybe?) in a function elsewhere and always count as raw regardless of if they accept 1,2, 3 or 4+ cargos. Would it be possible, if not too much work, to do the same thing for a specified list of town/finished product industries but favouring them instead of falling back to them?
The raw industry specifier is defined by the newGRF author. It is also used for in game industry funding and maybe other things. At some point I was thinking about creating economies by industries as it is done by cargo types, but maintaining it is not easy, so I tried to create a generated way of doing it. That way it supports more economies and their former/future versions. There are already 30+ defined economies. So if someone did the job, I would happily accept the PR :D
McZapkie wrote: 06 Sep 2021 12:23 Both RCG and RVG have max_town_growth_rate variable reciprocal to city population (old version: dvided by curpop+offset, new version: exponential decay - both curves are similar).

So smaller city means larger max_town_growth_rate, but despite of its name, larger growth = slower growth (larger period between growth bursts).
Not sure if it is bug or intended?

I'm asking because I found particulary hard on even impossible to trigger small cities growing - even if their goal are small.
While large cities are growing very fast (and pass/mail cargodist exaggerate such effect).
Well, I was mixing the terms small, large, fast and slow grow rate quite a lot in the readme, tried to fix it in the latest version :D So larger/faster/bigger growth rate means there are less days between town building.

It is intentional that smaller towns grow slower, because they are less lucrative to new people and they require less cargos to grow at max speed. The previous calculations were done at a time when towns could grow in thousands of days, so it increased the rate faster. Because of a min growth rate changed to be 880 days, the small towns were growing really slow and 5k+ towns had growth in days.

In the new calculation, there is fixed max growth rate for number of population defined by g_factor at 0 population and exponentially decreasing. With g_factor being 100, at 5000 population you get ~60 days, at ~23k population you get 10 days. That is the growth rate you get when all categories are fully satisfied. However the bigger the city, the more cargoes it requires, the harder it is to achieve this growth rate.

Second part of the equation is affected by the provided cargo. It calculates the missing percentage of the cargo categories. If a town has 3 categories unlocked, each can satisfy 33% of the demand. Then the rest of the growth rate from min to max is spread across these missing percentages in exponential curve and added to the growth time. If you have max growth rate 80, you provide 50% of cargo to that town, that is 80 + 0.2 * (880 - 80) = 240 days/building.

As I can see, the really small towns grow in similar speed as the big towns when the resources are scarce. You can find example graphs here: https://github.com/F1rrel/RenewedVillageGrowth/pull/59

Image
Attachments
RVG_towns.PNG
RVG_towns.PNG (130.05 KiB) Viewed 11140 times
baronjutter
Engineer
Engineer
Posts: 8
Joined: 28 Aug 2014 06:49

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

Post by baronjutter »

Hello!
I really like this mod, we used it on our big server we recently played and it was a nice addition. I had a bunch of questions though as we try to balance the mod's settings for the next game.

Our main problem with the mod is that it felt very binary. Towns were either growing at 1 day or 365 days and very little in between. We want the settings to be a challenge, but the actual amount of cargo didn't really scale with the towns as they got bigger, it was trivial to over-supply them in every possible cargo category and lock them in at turbo 1 day growth speed. Smaller towns with fewer demands were harder to grow, as it seemed each demand category was simply a new bonus to unlock rather than a gate to further growth. meaning bigger towns got bigger so much faster than smaller towns that it was impossible for smaller towns to ever catch up no matter how many goods were supplied.

Is there any combo of settings we can change so that the numerical demands for town cargos increases more as the town grows? Something where a town of 100k doesn't need double the cargo of a town of 50k, but closer to 4x or 8x or some much larger amount? Something that actually makes it much harder to lock in permanent 1-day maximum growth?

is there any way to make it so towns with all demands met grow at generally equivalent speeds regardless of their size? So the little village of 500 people that only wants some passengers and raw food is growing at the same speed as the 100k town so long as all listed amounts are met?

Does "fund new buildings" have any effect when running this script? (signs point to no)

More of an idea rather than a question, but it would be cool to have a local authority interaction that lets you "re-roll" the cargo demands, perhaps have it actually look at its associated local processors. So if a town has a dairy processor, it would be likely to want milk. If a town has a nuclear power plant it would more likely want uranium and so on.

Do goods from industries associated with the town count for delivered cargo? For example if a town demands grain and there is a farm associated with that town, will grain moved from that farm to a processor near the town still count? Or does it have to come from a resource outside of the town's range?

We play with a very long day length, where a year is about a real life day. The 365 being the minimum setting for maximum growth time is... very long for us. Any chance this could be lowered?

Here is a small town that has all listed needs met, by meeting all its needs its growth speed only went from 365 to 321, both essentially "no growth". Meanwhile on the same test server a bigger town with all its needs met is growing at 1 day. Is there any way to balance this out? Image
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 137
Joined: 13 Aug 2019 17:06

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

Post by Firrel »

baronjutter wrote: 21 Oct 2021 04:29 Our main problem with the mod is that it felt very binary. Towns were either growing at 1 day or 365 days and very little in between. We want the settings to be a challenge, but the actual amount of cargo didn't really scale with the towns as they got bigger, it was trivial to over-supply them in every possible cargo category and lock them in at turbo 1 day growth speed. Smaller towns with fewer demands were harder to grow, as it seemed each demand category was simply a new bonus to unlock rather than a gate to further growth. meaning bigger towns got bigger so much faster than smaller towns that it was impossible for smaller towns to ever catch up no matter how many goods were supplied.
I would guess you are using an older version of this script. This was changed from version 7.0. I wrote some more info about it here.

Part of 7.0 changelog:
modified: New growth rate calculation with slower growth and bigger impact of missing cargo goals
modified: Equalization of impact of each cargo category on missing percentage
baronjutter wrote: 21 Oct 2021 04:29 Is there any combo of settings we can change so that the numerical demands for town cargos increases more as the town grows? Something where a town of 100k doesn't need double the cargo of a town of 50k, but closer to 4x or 8x or some much larger amount? Something that actually makes it much harder to lock in permanent 1-day maximum growth?

We play with a very long day length, where a year is about a real life day. The 365 being the minimum setting for maximum growth time is... very long for us. Any chance this could be lowered?
You need to play with the parameter "Difficulty level (easy = 60, normal = 100, hard = 140)" to find your value. It scales up or down the amount of cargo the towns require per 1000 population. But it is a linear, not exponential growth of the required cargo, so still from 50k to 100k it will double the value. Also check "Expert: town growth factor" and "Expert: slowest TGR if requirements are not met" parameters, it changes the growth scaling.
baronjutter wrote: 21 Oct 2021 04:29 Does "fund new buildings" have any effect when running this script? (signs point to no)
"fund new buildings" normally doubles the growth rate. However the script overwrites the growth rate, so it has no effect.
baronjutter wrote: 21 Oct 2021 04:29 More of an idea rather than a question, but it would be cool to have a local authority interaction that lets you "re-roll" the cargo demands, perhaps have it actually look at its associated local processors. So if a town has a dairy processor, it would be likely to want milk. If a town has a nuclear power plant it would more likely want uranium and so on.

Do goods from industries associated with the town count for delivered cargo? For example if a town demands grain and there is a farm associated with that town, will grain moved from that farm to a processor near the town still count? Or does it have to come from a resource outside of the town's range?
I already thought about it and it should be possible to prioritize (not 100%) cargos from nearby industries when randomization chooses the cargo types. The re-roll mechanic could be also interesting, allowing rerolling the cargo categories when there are multiple towns with similar cargo types. Dont know if it can be done.
baronjutter
Engineer
Engineer
Posts: 8
Joined: 28 Aug 2014 06:49

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

Post by baronjutter »

I'm on the latest version, just got it yesterday.

Here's my current problem with the mod feeling very binary rather than a gradient of growth.

Image
This town has its 1st category and 2nd category well supplied, it is only missing its 3rd category yet it is growing at the absolute minimum setting of 100 days. A town with absolutely nothing but a few passengers is also growing at 100 days, meaning the first town is gaining absolutely nothing from having its needs mostly met.

These are the settings I'm using, but nothing I do seems to change this very binary nature. Towns are either growing at what ever the absolute maximum is for their size, or the absolute minimum speed based on the max growth time with nothing in between.
Image

What I was really hoping to see is something like this for example:
Max Growth Time is set to 100 days so a town with absolutely no cargo needs met grows at 100 days. That same town with every single category met would grow at perhaps 10 days. If that town had only 50% of its cargo categories met it would grow at around 50-60 days. Even a small village that only demands passengers/mail if 50% of that need it met, it would grow at a rate relative to 50% of its maximum.

What I get in practise is something like this:
A town demands 500 passengers, 200 raw food, and 100 resources. If nothing is provided it grows at 100 days, the maximum time. If 250 passengers, 100 raw food, and 50 resources are provided it grows still at 100 days. If 500 passengers, 200 raw food, and 50 resources are provided... still at 100 days. Only finally when exactly all resources are perfectly supplied does a flip switch and it starts to grow at 50 days.

I'm also a little confused as to what version I'm on since you were saying the binary vs gradient effect was fixed recently.
When selecting the script it says version 11
Image

When I open the readme it says version 7
Image

When I check out the changelog it says 7.1
Image
baronjutter
Engineer
Engineer
Posts: 8
Joined: 28 Aug 2014 06:49

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

Post by baronjutter »

Did a little more testing and think I'm figuring out a few things.
-When maximum growth time is set to something relatively low for what the script is used to, like 100, a town with 90% filled demands and 0% filled demands both grow at 100 days which makes it seem like the cargo is having no effect at all and its entirely binary. But when I increase the maximum growth time to something like 300 I can see the effect start to appear. Now the town with 0% is growing at 300 days of course, the town with 100% filled demands is growing at 30 days, and the town at 90% demand is growing at 160 days. So I think the problem is that the script doesn't quite scale down when the maximum growth time is low.

-The other thing I discovered is that most of the problems and balance issues we've been grappling with are mostly down to the way the mod scales growth with town size. The whole reason we are looking for growth scripts is to make run-away town growth harder. On our last server nearly every town with basic cargo moving through it ballooned up to 100k or even 300k because they were all growing every 1 day. We certainly want it possible to grow big towns and keep them growing fast, but we want that to be hard.

What I think would solve all our problems:
-A script option to alter the mechanic that makes towns grow faster as they get bigger. A setting of 0 would turn this effect off entirely with linear growth regardless of population, positive values would speed up growth as the town grows as is the current default.
-A script option to define the population that new cargo categories are unlocked. 500 would mean a new category unlocked every 500 population, 5000 would make it every 5000 people and so on.
-A script option for non-linear cargo demand scale per 1000 people (or whatever number). A setting of 1 would be default, linear based on population size. A setting of 1.1 would add 10% extra cargo demand per 1000 people and so on so cargo amounts could get quite large for bigger cities.
-The script taking maximum growth days into account more when it comes to town growth. So if maximum time is set to only 100, a town with 50% of cargo supplied would grow at a speed faster than 100 days still.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 137
Joined: 13 Aug 2019 17:06

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

Post by Firrel »

New update for Renewed Village Growth 7.2 is available in BaNaNaS
- new: Lumberjack Industries 0.1.0 predefined cargo categories (2TallTyler)
- new: Polish translation (qamil95)
- fix: cargo hash overflow affecting economies with a lot of cargo types (XIS, FIRS 4 Steeltown)
kaosfere
Engineer
Engineer
Posts: 1
Joined: 02 Jan 2022 02:45

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

Post by kaosfere »

abloke wrote: 02 Sep 2021 05:01
Firrel wrote: 31 Aug 2021 18:39 Hey abloke. The best way to find out if it is fine is to put down a station and if the station has the same name as the town, it will be counted towards that town. So you can have a hub quite far from the town based on the nearby towns areas. If you plan to fund an industry, it is also good to test the spots with a few stations. This way you can also find the edges of the catchment area and put it as far as possible. I would try to keep the industry and station with the same name, it might work with different names, but you cant be sure. I dont know the exact rules how it works, it is only a GS function that I call.
Got it, sounds like it's based on which local authority owns the tile then like you can see with the ? toolbar icon. That's good news since it's further out.
There's a disparity between what the two of you are saying. If you look at the picture below, I'm showing the zoning area for Larbrough in the top right. I've also built a station (which got named Larbrough Valley) near the Larbrough Stockyard in the bottom left. The local authority ownership shown by the ? toolbar buttin is "None", not "Larbrough".

So, going by what Firrel's saying, livestock delivered to Larbrough Stockyard would count towards Larbrough's needs. But if it's what abloke is saying, it wouldn't count since it's not land owned by the local authority, in spite of the name.

Does anyone know which of the two cases is accurate here? I think I'll do some experimenting when I have a little time this evening to provide an answer if no one has it. :)

EDIT: Since I'm a new user my post got stuck into a queue pending approval, and I decided that while I was waiting I may as well go and do the test myself. If anyone else is curious about this situation in the future, livestock delivered to that remote stockyard does satisfy Larbrough's needs, so the displayed "zone" for the local authority doesn't seem to matter. There's a larger catchment area based on name that's what's relevant here -- which matches Firrel's original assertion. :D



Image
Last edited by kaosfere on 03 Jan 2022 00:46, edited 2 times in total.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 137
Joined: 13 Aug 2019 17:06

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

Post by Firrel »

New update for Renewed Village Growth 8.0 is available in BaNaNaS
* Not compatible with previous versions
- new: Welcome page with description of how the GS works and where to find information
- new: Options to change minimum population for unlocking categories. Sorts categories based on selected values
- new: Option to allow zero days growth rate
- new: Randomization ascending and descending
- new: WRBI 1200 predefined cargo categories
- new: Custom story page usefull for server rules and other. See this PR to find out more about how to use it.
- new: Better handling of warnings that cause GS to stop by showing story page with the warning
- modified: OTIS 03 support (audunmaroey)
- modified: Minimum supply percentage option is now minimum fulfilled percentage (lower is easier)
- fix: FIRS4 Steeltown cargo categories (qamil95)
- fix: Global goal list not removing bankrupt/merged company growth points
- fix: Consider cargo list length to determine correct economy

Welcome story page:
WelcomeStoryPage.PNG
WelcomeStoryPage.PNG (19.21 KiB) Viewed 13210 times
User avatar
Jim Starluck
Traffic Manager
Traffic Manager
Posts: 135
Joined: 26 Jun 2005 20:12
Location: Cincinnati, OH
Contact:

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

Post by Jim Starluck »

kaosfere wrote: 03 Jan 2022 00:25
abloke wrote: 02 Sep 2021 05:01
Firrel wrote: 31 Aug 2021 18:39 Hey abloke. The best way to find out if it is fine is to put down a station and if the station has the same name as the town, it will be counted towards that town. So you can have a hub quite far from the town based on the nearby towns areas. If you plan to fund an industry, it is also good to test the spots with a few stations. This way you can also find the edges of the catchment area and put it as far as possible. I would try to keep the industry and station with the same name, it might work with different names, but you cant be sure. I dont know the exact rules how it works, it is only a GS function that I call.
Got it, sounds like it's based on which local authority owns the tile then like you can see with the ? toolbar icon. That's good news since it's further out.
There's a disparity between what the two of you are saying. If you look at the picture below, I'm showing the zoning area for Larbrough in the top right. I've also built a station (which got named Larbrough Valley) near the Larbrough Stockyard in the bottom left. The local authority ownership shown by the ? toolbar buttin is "None", not "Larbrough".

So, going by what Firrel's saying, livestock delivered to Larbrough Stockyard would count towards Larbrough's needs. But if it's what abloke is saying, it wouldn't count since it's not land owned by the local authority, in spite of the name.

Does anyone know which of the two cases is accurate here? I think I'll do some experimenting when I have a little time this evening to provide an answer if no one has it. :)

EDIT: Since I'm a new user my post got stuck into a queue pending approval, and I decided that while I was waiting I may as well go and do the test myself. If anyone else is curious about this situation in the future, livestock delivered to that remote stockyard does satisfy Larbrough's needs, so the displayed "zone" for the local authority doesn't seem to matter. There's a larger catchment area based on name that's what's relevant here -- which matches Firrel's original assertion. :D



Image
I believe the game uses a "nearest town" check of some kind to determine what name to give a station, which means it can affect stations and industries waaaay outside of the Authority zone. If the script is using the same logic, then so long as you're closer to the desired town than any other one, it should count.
If at first you don't succeed, get a bigger locomotive and try again.
MyNameIsEdwin
Engineer
Engineer
Posts: 1
Joined: 11 Apr 2022 03:44

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

Post by MyNameIsEdwin »

LoSboccacc wrote: 16 Aug 2021 10:28
ah, bummer, you'd end up with industries everywhere instead of stressing logistics. I'll search a grf that adds a store to every city then

edit: found one that add a general store with high likelyhood, so back to the mod:

is there a way to use baseset rules with the firs chain? (i.e. only passenger&mail, food and goods each in their 3 tiers)
Hello! Can you tell me the name of the grf you found and used? I'm also having trouble funding new industries and think that adding general stores would be a better option :mrgreen:
Frin
Engineer
Engineer
Posts: 3
Joined: 12 Apr 2022 16:46

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

Post by Frin »

Hi, thank you very much for this mod, I love it, even if I have been using it for 10 hours only so far. I'm building my rail network trying to make the town to grow as much as possible and having a blast in process :bow:

One thing I wanted to ask is: it doesn't appear that there is any difference anymore between towns and cities (i.e. cities are now growing at double town rate), is this correct? I also had a look at your script and openttd sourcecode and my findings seems to confirm it, just wanted to be sure.
User avatar
Firrel
Traffic Manager
Traffic Manager
Posts: 137
Joined: 13 Aug 2019 17:06

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

Post by Firrel »

MyNameIsEdwin wrote: 11 Apr 2022 04:07 Hello! Can you tell me the name of the grf you found and used? I'm also having trouble funding new industries and think that adding general stores would be a better option :mrgreen:
You can find General store, Hardware store and Petrol station town industries in FIRS 3 In a Hot Country and FIRS 3 Extreme, I think he/she meant those.
Frin wrote: 12 Apr 2022 16:54 Hi, thank you very much for this mod, I love it, even if I have been using it for 10 hours only so far. I'm building my rail network trying to make the town to grow as much as possible and having a blast in process :bow:

One thing I wanted to ask is: it doesn't appear that there is any difference anymore between towns and cities (i.e. cities are now growing at double town rate), is this correct? I also had a look at your script and openttd sourcecode and my findings seems to confirm it, just wanted to be sure.
Glad you like it! You are correct, towns and cities grow at the same pace, there is no difference. Only that the cities can start with higher population.
Frin
Engineer
Engineer
Posts: 3
Joined: 12 Apr 2022 16:46

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

Post by Frin »

I had a problem with my laptop and I had to make a full reinstall of everything. I'm now having problems when creating a new game using this script.

The scripts gets disables with the following error: "The cargo list initialization has failed. It was caused by the industry randomization option for which the procedural industry categories could not be created.". The cause is clear, but I have no idea what to do to fix it. Any help?

I'm not using any NewGRF.

I tried changing the value of Industry Density setting in the game options, with no results. What am I missing?
Frin
Engineer
Engineer
Posts: 3
Joined: 12 Apr 2022 16:46

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

Post by Frin »

I had a peek at the code. It seems the problem is there only when selecting ascending/descending as industry setting. I switched to manually specifying categories numbers and everything works great.
Lt_Joker
Engineer
Engineer
Posts: 23
Joined: 12 Jun 2021 11:13

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

Post by Lt_Joker »

Hi, the game failed to initialize for me, using StockpiledIndustries (SPIv1.3) as an industry set. The script says it cannot procedurally create a cargo list for it.
User avatar
Jim Starluck
Traffic Manager
Traffic Manager
Posts: 135
Joined: 26 Jun 2005 20:12
Location: Cincinnati, OH
Contact:

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

Post by Jim Starluck »

Frin wrote: 22 Apr 2022 09:05 I had a problem with my laptop and I had to make a full reinstall of everything. I'm now having problems when creating a new game using this script.

The scripts gets disables with the following error: "The cargo list initialization has failed. It was caused by the industry randomization option for which the procedural industry categories could not be created.". The cause is clear, but I have no idea what to do to fix it. Any help?

I'm not using any NewGRF.

I tried changing the value of Industry Density setting in the game options, with no results. What am I missing?
Frin wrote: 22 Apr 2022 12:34 I had a peek at the code. It seems the problem is there only when selecting ascending/descending as industry setting. I switched to manually specifying categories numbers and everything works great.
I'm having a similar problem.

I've been using the script just fine for a while now, but I tried switching from "Industry Descending" to "Industry Ascending." Using this method, the script initializes on a new map just fine, but crashes every time I load a saved game. Swapping back to Descending works fine.

Mildly annoying, because Ascending would produce towns that start with a single-input industry, but grow to ask for more complex ones, which appeals to me.
If at first you don't succeed, get a bigger locomotive and try again.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest