It looks to me like the Japanese set does not have a setting that will get around this issue. You will have to allow the disabling of goods entirely or just avoid the Japanese buildings.Zuu wrote:If you figure out good settings to use with the japan set and post them back here, I could include them in the readme (which is available in-game using the readme-button). Or possible an on/off switch in the settings window that reduce only the goods cargo, but let passengers/mail/food/water/etc. remain at the usual level.
[NoGo] Neighbours are important
Moderator: OpenTTD Developers
Re: [NoGo] Neighbours are important
Re: [NoGo] Neighbours are important
Zuu,function GoalTown::GetNeighborhoodFactor(self_population)
{
local factor = 100;
foreach(n in this.neighbors)
{
local diff = GSTown.GetPopulation(n.id) - self_population;
factor -= diff * 3;
}
factor = max(factor, 70);
factor = min(factor, 500);
Once towns (that are neighbors of one another) reach a size of about 9 to 10 thousand or so the cargo requirements start to oscillate between min and max. The largest town will be set at maximum requirement while the two smallest will be set to minimum. A month later, one of the smaller towns will grow and become the largest, it will then have the maximum requirement while the other two will be at minimum. This repeats forever.
I took a look at your code and I see that your NeighborhoodFactor is based on absolute numbers rather than percentages. At town sizes near 12,000 your factor resolves to numbers in the 25,000 range, which then gets 'min'ed to 500.
Example:
Month 1: Town A requires 6500 passengers, Town B requires 800, Town C requires 800
Month 2: Town A requires 800 passengers, Town B requires 6500, Town C requires 800
Month 3: Town A requires 800 passengers, Town B requires 800, Town C requires 6500
repeat
.
.
.
.
Guvnor
Re: [NoGo] Neighbours are important
I believe this happens either before 9-10k since I am experiencing this with smaller cities as well, or it just happens regardless of the city size.Guvnor wrote:
Once towns (that are neighbors of one another) reach a size of about 9 to 10 thousand or so the cargo requirements start to oscillate between min and max. The largest town will be set at maximum requirement while the two smallest will be set to minimum. A month later, one of the smaller towns will grow and become the largest, it will then have the maximum requirement while the other two will be at minimum. This repeats forever.
Re: [NoGo] Neighbours are important
Thanks for your report. I'll have to think on a solution that fix the problem while not modifying the behaviour of existing games in unwanted ways.
One option is to mark the next version unable to load older games than its own version. Then OpenTTD will search for an older version of the GS that can load it.
Another option is to have a setting. However Im unsure if it is possible to introduce a new setting that is on by default for new games but not for old games.
One option is to mark the next version unable to load older games than its own version. Then OpenTTD will search for an older version of the GS that can load it.
Another option is to have a setting. However Im unsure if it is possible to introduce a new setting that is on by default for new games but not for old games.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [NoGo] Neighbours are important
I know this post may make people quite angry, but is there a way to disable this script in a running game? It's just, with such stringent requirements, I don't see any town growth happening in this game. Help much appreciated!
Wasila
Wasila
Re: [NoGo] Neighbours are important
make your savegame become a scenario file, load it in the scenario editor then...u should be able to modificate the parameter for the script (and make requirement easier) and maybe to take it away... but make a copy of your savegame... cause i have no clue if it's bugsafe...
Re: [NoGo] Neighbours are important
Well, removing the script altogether kept crashing my scenario editor, so I settled with making it easier. This doesn't, however, seem to have actually affected the amount of cargo needed? I reduced it to 30%, but I'm getting the same requirements, and no growth...
EDIT: Forget that, it did actually change. Thank you! There's no way of circumventing the goods requirement, is there?
EDIT: Forget that, it did actually change. Thank you! There's no way of circumventing the goods requirement, is there?
Re: [NoGo] Neighbours are important
If you found a way to crash OpenTTD, please report it to the bug tracker.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [NoGo] Neighbours are important
Well, I reported it, but the problem still stands that removing the script just breaks the mechanism (as the 'Cargo needed for town growth' info remains and the towns still don't grow). I assume there's nothing I can do?
Re: [NoGo] Neighbours are important
You can edit the script locally on your computer. Just untar and edit the nut files. In town.nut there is a method that updates the cargo requirements. I think you can alter it to set zero as cargo requirement for all cargo types. This will however affect all your games that use this script.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [NoGo] Neighbours are important
Ah, I managed to set the requirements to 0. How about the number of days it takes a town to grow? Suddenly, all my towns are growing really quickly, despite the growth speed setting under 'Economy' being set to 'Normal'.
Thanks,
Wasila
Thanks,
Wasila
Re: [NoGo] Neighbours are important
Wasila wrote:Ah, I managed to set the requirements to 0. How about the number of days it takes a town to grow? Suddenly, all my towns are growing really quickly, despite the growth speed setting under 'Economy' being set to 'Normal'.
Thanks,
Wasila
- Remove this.ManageTowns(); from main.nut (should be in the main loop located in the Start() method)
- Change "Allow funding buildings" to On
The second step should according to the GS API documentation cause OpenTTD to regulate the town growth rate actively:
Hopefully this is enough to return town growth to normal.API doc wrote:Note:
- If 'Fund Building' and 'economy.town_growth_rate' is active, the game will often set a new GrowthRate.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [NoGo] Neighbours are important
Can any of you who had problems with oscillate post a save game that demonstrate this behaviour? (please use either an official stable or nightly version of OpenTTD)
I have implemented a different method to compare town sizes that I hope should be less prone to extreme oscillation, however it would be useful to verify that the new method is working better. Some oscillation can probably still occur if three towns are of about equal size, but hopefully at an acceptable rate.
I have implemented a different method to compare town sizes that I hope should be less prone to extreme oscillation, however it would be useful to verify that the new method is working better. Some oscillation can probably still occur if three towns are of about equal size, but hopefully at an acceptable rate.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
-
- Engineer
- Posts: 3
- Joined: 18 Jan 2013 10:22
Re: [NoGo] Neighbours are important
hi all.
I don`t want to be offtopic too much,but since it is about town growth, i just want to ask,where can i find the script wich tells me what a town needs to grow. i seen it on multiplayer and I would like to have it.
Many 10x
I don`t want to be offtopic too much,but since it is about town growth, i just want to ask,where can i find the script wich tells me what a town needs to grow. i seen it on multiplayer and I would like to have it.
Many 10x
Re: [NoGo] Neighbours are important
You have to be more specific. This script do add requirements for town growth. However, the server that you were playing might have used this script or some other script that add town growth requirements. On BaNaNaS there are several scripts that deal with town growth which authors have published. In addition to that, there are people who keep their script to themself to have their cool and exclusive server.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
-
- Engineer
- Posts: 3
- Joined: 18 Jan 2013 10:22
Re: [NoGo] Neighbours are important
to be more specific: when i was playing on the server, if I clicked on a town,near the "town is not growin" it was written that "this town requires - water -food to grow. i feel bad now that i didn`t made screenshot to have it, but that time
i wasn`t thinking about wanting such a thing. now honestly i am curios.. many 10x
i wasn`t thinking about wanting such a thing. now honestly i am curios.. many 10x
Re: [NoGo] Neighbours are important
without any GS a town from desert do that:
Water: need
Food: need
Town doesn't grow
Are you sure you haven't just play a server in desert without any GS ?
Water: need
Food: need
Town doesn't grow
Are you sure you haven't just play a server in desert without any GS ?
-
- Engineer
- Posts: 3
- Joined: 18 Jan 2013 10:22
Re: [NoGo] Neighbours are important
yes,i think so. it was somethink like that. i recall that where some palmtrees,and yes i think it was desert ground.
for some reason i don`t know the meaning of GS,maybe you can tell me.
many 10x
for some reason i don`t know the meaning of GS,maybe you can tell me.
many 10x
Re: [NoGo] Neighbours are important
GS means Game Script (like "Neighbors are important") in this context I assumenightfire_ball wrote:yes,i think so. it was somethink like that. i recall that where some palmtrees,and yes i think it was desert ground.
for some reason i don`t know the meaning of GS,maybe you can tell me.
many 10x

On Topic:
Thanks Zuu for fixing the problem regarding water requirements for non-desert towns. When I have my new PC I will certainly try a subtropical map with your script.
Re: [NoGo] Neighbours are important
Determining if a town needs water to grow seems to go pretty well in the standard game (without GS). How does the original game determine this?Yexo wrote:GSTile.IsDesertTile checks if the tile is empty and desert. This is most likely an oversight.
Who is online
Users browsing this forum: No registered users and 8 guests