JGR's Patch Pack
Moderator: OpenTTD Developers
Re: JGR's Patch Pack
I had this problem with this Savegame (no GRFs only AIs)
When I load this the game crashes on 27 Dec 1951.
When I load this the game crashes on 27 Dec 1951.
- Attachments
-
- Pitäjänharju Transport, 27. Dez 1950.sav
- (4.82 MiB) Downloaded 80 times
Re: JGR's Patch Pack
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.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
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.
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
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.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
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.
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.
Last edited by agentw4b on 15 Apr 2020 18:27, edited 1 time in total.
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: JGR's Patch Pack
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;
}
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.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
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.
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: JGR's Patch Pack
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.agentw4b wrote: ↑15 Apr 2020 18:37If 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.
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: JGR's Patch Pack
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.
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.
- Attachments
-
- load_cargo.png (946.99 KiB) Viewed 573 times
Re: JGR's Patch Pack
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.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.
A savegame which shows the problem would be useful.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.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
here u are:
- Attachments
-
- TTT, May 22nd, 1941.sav
- (256.34 KiB) Downloaded 77 times
Re: JGR's Patch Pack
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
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
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
your a star mate, cheers
- Redirect Left
- Tycoon
- Posts: 7238
- Joined: 22 Jan 2005 19:31
- Location: Wakefield, West Yorkshire
Re: JGR's Patch Pack
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
I've not noticed an increase in rendering issues outside of bridges, demonstrated above, this is v0.34.1
Re: JGR's Patch Pack
Thanks for reporting this.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
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).
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
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.
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
I've made another change to remove another edge case.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
With that done I haven't been able to reproduce further issues with that setup.
Thanks, this is fixed and will be in the next release.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.
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.
Ex TTDPatch Coder
Patch Pack, Github
Patch Pack, Github
Re: JGR's Patch Pack
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.
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.
- Attachments
-
- 1.jpg
- (586.07 KiB) Not downloaded yet
-
- 2.jpg (186.33 KiB) Viewed 573 times
-
- YOGI & CO., Sep 5th, 1918.sav
- (3.03 MiB) Downloaded 62 times
Last edited by ColdIce on 19 Apr 2020 18:52, edited 1 time in total.
The rest is confetti!
Who is online
Users browsing this forum: No registered users and 6 guests