Page 137 of 243
Re: JGR's Patch Pack
Posted: 15 Apr 2020 06:52
by BW89
I had this problem with this Savegame (no GRFs only AIs)
When I load this the game crashes on 27 Dec 1951.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 08:23
by JGR
BW89 wrote: 15 Apr 2020 06:52
I had this problem with this Savegame (no GRFs only AIs)
When I load this the game crashes on 27 Dec 1951.
The game does not crash.
The game script (City Founder GS v2) is wasting CPU time.
It is repeatedly trying to found a new town but failing to do so. It appears to be because the town names set does not have enough available names for a new town.
As the opcode limit is set very high, and attempting to found a town is quite expensive, the game becomes unplayable.
Probably attempting to found a town should be heavily rate limited to stop game scripts from doing this.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 10:10
by BW89
Sorry I didn't say it correctly.
On my System (i7-4770, 12GB RAM) the game freezes on 27 Dec 1951 for at least 10 min ( I never waited longer)
I forgot about that Skript because I use it for years, sorry. I will try it without it.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 16:31
by JGR
BW89 wrote: 15 Apr 2020 10:10
Sorry I didn't say it correctly.
On my System (i7-4770, 12GB RAM) the game freezes on 27 Dec 1951 for at least 10 min ( I never waited longer)
I forgot about that Skript because I use it for years, sorry. I will try it without it.
The mitigation for this is done and will be in the next release.
In the meantime you could remove/disable the script somehow, or rename a few towns so that the script can successfully create new ones.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 17:28
by agentw4b
I am the author of "City Founder GS v2". But I have no idea what is wrong there, so far there were no problems with the script. Should I edit it? And how? You can set how many cities to start in the script, but I didn't know it had any limits. What is the limit of the maximum number of cities to establish? How can the game script determine the maximum number of city names?
The game script only tests whether a city can be established, but does not address the reasons why it was not possible to start a city and then only looks for another suitable place.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 18:26
by JGR
agentw4b wrote: 15 Apr 2020 17:28
I am the author of "City Founder GS v2". But I have no idea what is wrong there, so far there were no problems with the script. Should I edit it? And how? You can set how many cities to start in the script, but I didn't know it had any limits. What is the limit of the maximum number of cities to establish?
The game script only tests whether a city can be established, but does not address the reasons why it was not possible to start a city and then only looks for another suitable place.
Code: Select all
while (notfounded) {
x = GSBase.RandRange(GSMap.GetMapSizeX());
y = GSBase.RandRange(GSMap.GetMapSizeY());
tileindex = GSMap.GetTileIndex(x,y);
notfounded = GSTown.FoundTown (tileindex, c , bool, r , name);
notfounded = !notfounded;
}
If the user has selected a town names set with a limited number of names, once all of the names in the town set have been used it is not possible to create any more towns.
GSTown.FoundTown will always fail and the loop above will not terminate.
GSTown.FoundTown is very expensive to execute as it tries many town names, however the GS was not charged for calling it.
Therefore the loop above would consume all available CPU and prevent the user from interacting with the game.
This was resolved by charging a GS a reasonable amount for each call to GSTown.FoundTown which more closely reflects how much CPU time it actually costs. This prevents the GS from consuming excessive CPU time.
In terms of modifying the script, limiting the maximum number of loop iterations, checking for the ERR_NAME_IS_NOT_UNIQUE error, or inserting some sleeps could work.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 18:37
by agentw4b
If the user has selected a town names set with a limited number of names, once all of the names in the town set have been used it is not possible to create any more towns.
GSTown.FoundTown will always fail and the loop above will not terminate.
GSTown.FoundTown is very expensive to execute as it tries many town names, however the GS was not charged for calling it.
Therefore the loop above would consume all available CPU and prevent the user from interacting with the game.
This was resolved by charging a GS a reasonable amount for each call to GSTown.FoundTown which more closely reflects how much CPU time it actually costs. This prevents the GS from consuming excessive CPU time.
In terms of modifying the script, limiting the maximum number of loop iterations, checking for the ERR_NAME_IS_NOT_UNIQUE error, or inserting some sleeps could work.
OK thanks. I will try to improve it.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 20:04
by agentw4b
agentw4b wrote: 15 Apr 2020 18:37
If the user has selected a town names set with a limited number of names, once all of the names in the town set have been used it is not possible to create any more towns.
GSTown.FoundTown will always fail and the loop above will not terminate.
GSTown.FoundTown is very expensive to execute as it tries many town names, however the GS was not charged for calling it.
Therefore the loop above would consume all available CPU and prevent the user from interacting with the game.
This was resolved by charging a GS a reasonable amount for each call to GSTown.FoundTown which more closely reflects how much CPU time it actually costs. This prevents the GS from consuming excessive CPU time.
In terms of modifying the script, limiting the maximum number of loop iterations, checking for the ERR_NAME_IS_NOT_UNIQUE error, or inserting some sleeps could work.
OK thanks. I will try to improve it.
But I do not understand why so few cities can be found in the file "Pitäjänharju Transport, 27. Dez 1950.sav". Are there so few existing Finnish cities? Normally my script can create thousands of new cities without problems, but it has failed here after 328 cities. That seems strange to me.
Re: JGR's Patch Pack
Posted: 15 Apr 2020 21:51
by stb
It seems Load by Cargo Type not working properly.
In the below scenario, the trains should leave the country station
as soon as livestocks fully collected. Goods are optional. But the trains
act like Full Load all Cargo.
P.S. The trains from Iron Horse.
On this picture, they left the station already because I changed the order to Full Load Any
and reversed before taking the screenshot.

Re: JGR's Patch Pack
Posted: 15 Apr 2020 22:33
by JGR
agentw4b wrote: 15 Apr 2020 20:04
But I do not understand why so few cities can be found in the file "Pitäjänharju Transport, 27. Dez 1950.sav". Are there so few existing Finnish cities? Normally my script can create thousands of new cities without problems, but it has failed here after 328 cities. That seems strange to me.
This could well be a bug in the Finnish town name generator. The code looks dubious and some of the available town name parts are never used.
stb wrote: 15 Apr 2020 21:51
It seems Load by Cargo Type not working properly.
In the below scenario, the trains should leave the country station
as soon as livestocks fully collected. Goods are optional. But the trains
act like Full Load all Cargo.
P.S. The trains from Iron Horse.
On this picture, they left the station already because I changed the order to Full Load Any
and reversed before taking the screenshot.
A savegame which shows the problem would be useful.
Re: JGR's Patch Pack
Posted: 16 Apr 2020 01:06
by stb
here u are:
Re: JGR's Patch Pack
Posted: 16 Apr 2020 16:09
by JGR
stb wrote: 16 Apr 2020 01:06here u are:
Thanks, this is fixed and will be in the next release.
Re: JGR's Patch Pack
Posted: 17 Apr 2020 15:43
by ItzChaza
on the new 0.34.1 version i cant place stations under bridges... any reason why or have i missed something?
Re: JGR's Patch Pack
Posted: 17 Apr 2020 15:49
by BW89
Check if the Setting, that allows placing stations under bridges is off. I had it one time already that some PatchPack Settings resetted themself after updates
Re: JGR's Patch Pack
Posted: 17 Apr 2020 16:47
by ItzChaza
your a star mate, cheers
Re: JGR's Patch Pack
Posted: 18 Apr 2020 19:08
by Redirect Left
Has there been any changes to rendering? I am noticing a lot more graphic glitches currently. I know these are GRFs, but the issue was not this obvious in the past.
I've not noticed an increase in rendering issues outside of bridges, demonstrated above, this is v0.34.1
Re: JGR's Patch Pack
Posted: 18 Apr 2020 22:13
by JGR
Redirect Left wrote: 18 Apr 2020 19:08
Has there been any changes to rendering? I am noticing a lot more graphic glitches currently. I know these are GRFs, but the issue was not this obvious in the past.
Taylors Transport, 32217-05-30.png
I've not noticed an increase in rendering issues outside of bridges, demonstrated above, this is v0.34.1
Thanks for reporting this.
There were several changes between 0.33.2 and 0.34-rc1, mostly performance focused.
I've reproduced the issue above, which I hadn't noticed previously. I've reverted the change in question, which was only a minor one.
Edit:
I've been able to get level crossings under bridges like in the picture to glitch in 0.33.2 as well.
That issue is still partially here for now, in that it can be made to show up if the conditions are just right.
(The joys of the sprite sorter are never-ending, it seems).
Re: JGR's Patch Pack
Posted: 19 Apr 2020 05:31
by LiiNaRuu
Got a minor glinch:
There is a filter problem only on liquids for conditional order jump "waiting cargo amount". Enter more than four digits it not possible.
However there is an workarround to enter an appropriate amount on an non liquid cargo e.g. Food and then change it to Oil afterwards.
Re: JGR's Patch Pack
Posted: 19 Apr 2020 10:48
by JGR
Redirect Left wrote: 18 Apr 2020 19:08
Has there been any changes to rendering? I am noticing a lot more graphic glitches currently. I know these are GRFs, but the issue was not this obvious in the past.
Taylors Transport, 32217-05-30.png
I've not noticed an increase in rendering issues outside of bridges, demonstrated above, this is v0.34.1
I've made another change to remove another edge case.
With that done I haven't been able to reproduce further issues with that setup.
LiiNaRuu wrote: 19 Apr 2020 05:31
Got a minor glinch:
There is a filter problem only on liquids for conditional order jump "waiting cargo amount". Enter more than four digits it not possible.
FilterProblem_WaitingCargoAmount.PNG
However there is an workarround to enter an appropriate amount on an non liquid cargo e.g. Food and then change it to Oil afterwards.
Thanks, this is fixed and will be in the next release.
Re: JGR's Patch Pack
Posted: 19 Apr 2020 12:40
by ColdIce
Hy, I have an issue with cargo distribution.
Passengers from Bucuresti Grand Station to Comarnic West are plenty, but there is none from Comarnic West to Bucuresti Grand Station. The cities are fully served and all stations linked. I have 4 long trains from Bucuresti to Comarnic. I have give them full load option for Comarnic to see what happens. In two months, only 19% of a train was loaded with passengers from Comarnic to Bucuresti. I use day lenght factor 125 and 4.6 town cargo generation.
LE: I changed the settings from asymmetric (equal distribution) to symmetric and now i have passengers from Comarnic to Bucuresti. Before this, I changed the settings to day lenght factor to 1 and the cargo generation to 8 with no results in asymmetric (equal distribution) cargo distribution.
LLE: Changed from asymmetric (equal distribution) to asymmetric (simple). Got positive results.
LLLE: Changed in Settings/Cargo Distribution/per cargo overrides to Asymmetric (equal distribution). No results. So it seems to be an issue (if there is one) in assymetric (equal distribution) cargo distribution. Also, when i change to other setting (symmetric or simple asymmetric), the passengers pile up waiting in stations. The best passenger flow I got with asymmetric (equal distribution) and small tweaks on town cargo generation.