JGR's Patch Pack

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

maxucao
Engineer
Engineer
Posts: 18
Joined: 18 Mar 2014 03:57

Re: JGR's Patch Pack

Post by maxucao »

Walter Novotny wrote: 14 Feb 2025 22:51
maxucao wrote: 14 Feb 2025 19:05 hi!!! anyone can guide or help me how do a more realistic simulation time?
i got Calendar timekeeping for default...so..i dont understand how slowing down the time...
thanks
Setting the number of ticks to 592 makes the train travel time realistic. Assuming 20 squares per kilometer, we get the travel time as in the real timetable. (I personally currently play on 296 ticks)
I have chosen the remaining settings experimentally, they allow for realistic acceleration of trains. This is necessary to obtain train travel times depending on the number of stops (expresses, suburban trains, etc.)

Image
Image
Thanks a lot!!!!!!!
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7417
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

I can't readily tell if this is related to the patch pack or not, but I will post it here in case there's any pathfinding differences, even minor ones, that may cause this. Then if its not PP related it can be reported to OTTD team if its not intentional for some reason.

I am having an issue where an irrelevant path being blocked, is not treated as being irrelevant, even though there's other routes that do not cross that reservation to start with.

Here, a train is partially blocking the entry to far left platform, but not to worry. There's lots of spare platforms that its ignoring.
1.png
(351.17 KiB) Not downloaded yet
If we delete the piece of track that connects the not-moving train to that platform, it suddenly remembers the other platforms exist.
2.png
(334.47 KiB) Not downloaded yet
Also, if the train is fully in platform 1, and not reserving the track piece in/out of it. It also remembers there is other platforms and uses them.
3.png
(1.7 MiB) Not downloaded yet
All platforms are of the same same length, and all are electrified, but for some reason the pathfinding appears to be giving up at the first blocked path, instead of going "...or we can test if we can go to the other places too".
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 18 Feb 2025 18:25 I can't readily tell if this is related to the patch pack or not, but I will post it here in case there's any pathfinding differences, even minor ones, that may cause this. Then if its not PP related it can be reported to OTTD team if its not intentional for some reason.

I am having an issue where an irrelevant path being blocked, is not treated as being irrelevant, even though there's other routes that do not cross that reservation to start with.

Here, a train is partially blocking the entry to far left platform, but not to worry. There's lots of spare platforms that its ignoring.
1.png
If we delete the piece of track that connects the not-moving train to that platform, it suddenly remembers the other platforms exist.
2.png
Also, if the train is fully in platform 1, and not reserving the track piece in/out of it. It also remembers there is other platforms and uses them.
3.png

All platforms are of the same same length, and all are electrified, but for some reason the pathfinding appears to be giving up at the first blocked path, instead of going "...or we can test if we can go to the other places too".
It's because the pathfinder cost for the single reserved track piece it has to cross is less than the extra pathfinder cost to get to the platforms further away.
Probably your best bet is to move the signal that the train at the top is waiting at 1 tile further away.
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7417
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

JGR wrote: 18 Feb 2025 18:37 Probably your best bet is to move the signal that the train at the top is waiting at 1 tile further away.
I've moved the signal to behind the road, hopefully this will resolve it without adding too much extra dead time from signal to any platforms as my network is already pretty jammed (yay 5000 trains).
I kind of presumed the pathfinder would always notice there were more platforms at the same station available even if an extra but not massive amount of squares away, or after a certain amount of ticks would give up and go "...yeah that reservation is not happening, lets try something else" similar to how trains will eventually turn around at a signal if you have "automatic reversing at signals" enabled. With that pathfinder setup, I guess it massively limits how big you can even make platforms (or station spread) to begin with, regardless of how big the setting for station spread is, if it doesn't affect the logic of the pathfinder too.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Redirect Left wrote: 18 Feb 2025 18:44
JGR wrote: 18 Feb 2025 18:37 Probably your best bet is to move the signal that the train at the top is waiting at 1 tile further away.
I've moved the signal to behind the road, hopefully this will resolve it without adding too much extra dead time from signal to any platforms as my network is already pretty jammed (yay 5000 trains).
I kind of presumed the pathfinder would always notice there were more platforms at the same station available even if an extra but not massive amount of squares away, or after a certain amount of ticks would give up and go "...yeah that reservation is not happening, lets try something else" similar to how trains will eventually turn around at a signal if you have "automatic reversing at signals" enabled. With that pathfinder setup, I guess it massively limits how big you can even make platforms (or station spread) to begin with, regardless of how big the setting for station spread is, if it doesn't affect the logic of the pathfinder too.
To clarify, I mean moving this signal by one tile, not the one by the level crossing.
Attachments
1.png
(497.05 KiB) Not downloaded yet
Ex TTDPatch Coder
Patch Pack, Github
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7417
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: JGR's Patch Pack

Post by Redirect Left »

JGR wrote: 18 Feb 2025 18:48 To clarify, I mean moving this signal by one tile, not the one by the level crossing.
Oh, moved that one now too. thank you for the advice!
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
maxucao
Engineer
Engineer
Posts: 18
Joined: 18 Mar 2014 03:57

Re: JGR's Patch Pack

Post by maxucao »

hi!!! i still doesnt know how to program the signals..i read the manual but i dont understand..maybe produced by the diferent language
can someone give me a hand with this
https://ibb.co/ksCTk0Lw
i try to do the next

if the Signal in yellow circle activate o reserve the perpendicular railway next the signal 2 in black must be red

explain myself? i hope
Attachments
Pelayos & Co., 1915-07-30.png
(1.65 MiB) Not downloaded yet
SparkyMarkyR33
Engineer
Engineer
Posts: 11
Joined: 16 Feb 2020 17:18

Re: JGR's Patch Pack

Post by SparkyMarkyR33 »

maxucao wrote: 01 Mar 2025 03:42 hi!!! i still doesnt know how to program the signals..i read the manual but i dont understand..maybe produced by the diferent language
can someone give me a hand with this
https://ibb.co/ksCTk0Lw
i try to do the next

if the Signal in yellow circle activate o reserve the perpendicular railway next the signal 2 in black must be red

explain myself? i hope
The only option I would know, is to select the next signal AFTER the yellow circle signal (the one between the 2 depots) and put in routing restrictions - not program signals. Click the 'End' text in the box, it should highlight. On the bottom left of the window click INSERT, Select 'if' and then hit UNDIFINED, specify that if 'current order' is going to a station/waypoint down the single line (over the red bridge), click 'Select Target' and choose the station/waypoint. Once you do that you need to give it an action to take. Click 'End if' just below that line, click INSERT again, then 'reserve through' which will cause the black signal to not allow a train through if a train gets to the yellow signal first.

What this will do is treat the yellow signal as the only signal between the train and the junction if the train diverges to the single line. you can do this for numerous signals before a junction to allow a faster train have higher priority.
Alternatively select 'Long reserve' will do the same if no other train is blocking the junction before the yellow signal is triggered, but if there is, the train will pull up to the signal between the depots without stopping at the yellow signal beforehand. Hope that makes sense?
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 314
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: JGR's Patch Pack

Post by ColdIce »

Hi JGR,

Is there a possibility to get town names on a topography screenshot? It's useful for large maps when I edit topography screenshots in Photoshop.
The rest is confetti!
Guy from Wildesford
Engineer
Engineer
Posts: 10
Joined: 10 Jul 2019 09:40
Location: Wildesford, on some TTO map

Re: JGR's Patch Pack

Post by Guy from Wildesford »

Bug in 0.65 RC#1 and current development versions: New departure times cannot be added.

If you try to add a departure time where there is none yet, nothing happens.

If you try to add a departure time where there already is at least one, one of them is set to the new departure time instead, and no new one is created.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Guy from Wildesford wrote: 01 Apr 2025 10:18 Bug in 0.65 RC#1 and current development versions: New departure times cannot be added.

If you try to add a departure time where there is none yet, nothing happens.

If you try to add a departure time where there already is at least one, one of them is set to the new departure time instead, and no new one is created.
I had some trouble reproducing this, until I found that this occurs only when timetabling in days, which is not a configuration that is used very much.
I'll fix this later on.
Ex TTDPatch Coder
Patch Pack, Github
Guy from Wildesford
Engineer
Engineer
Posts: 10
Joined: 10 Jul 2019 09:40
Location: Wildesford, on some TTO map

Re: JGR's Patch Pack

Post by Guy from Wildesford »

Strange, it happens to me in several games with timetables in hours and minutes.

But if you've found a way to fix it...
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

Guy from Wildesford wrote: 01 Apr 2025 15:19 Strange, it happens to me in several games with timetables in hours and minutes.

But if you've found a way to fix it...
It is fixed now, and yes I found it also occurred when entering times as text was turned off.
Ex TTDPatch Coder
Patch Pack, Github
mak
Traffic Manager
Traffic Manager
Posts: 209
Joined: 30 Sep 2015 13:16

Re: JGR's Patch Pack

Post by mak »

Hi JGR Thanks for all your work
Trying 65 RC1 came across a problem, cannot change trains via template replacement.
Sludstone Transport, 1952-03-08.sav
(917.4 KiB) Downloaded 33 times
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

mak wrote: 01 Apr 2025 16:51 Hi JGR Thanks for all your work
Trying 65 RC1 came across a problem, cannot change trains via template replacement.

Sludstone Transport, 1952-03-08.sav
Thanks, creating/editing templates using the build vehicle window should be fixed now.
Ex TTDPatch Coder
Patch Pack, Github
0n3!r0!
Engineer
Engineer
Posts: 4
Joined: 05 Apr 2025 23:27

Re: JGR's Patch Pack

Post by 0n3!r0! »

Would it be reasonable to integrate viewtopic.php?t=92077 into the patch pack? I apologize if you don't take requests.
User avatar
JGR
Tycoon
Tycoon
Posts: 2603
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

0n3!r0! wrote: 05 Apr 2025 23:57 Would it be reasonable to integrate viewtopic.php?t=92077 into the patch pack? I apologize if you don't take requests.
This is effectively an experimental proof of concept, and fairly out of date with respect to the current codebase now. It's not really something that can be integrated without a very large amount of additional work.
Ex TTDPatch Coder
Patch Pack, Github
AdmiralEllis
Engineer
Engineer
Posts: 21
Joined: 22 Jan 2023 23:17

Re: JGR's Patch Pack

Post by AdmiralEllis »

Apologies if this has been suggested before, but I find it to potentially be a relatively elegant (and realistic, even) solution to a frustrating problem.

My passenger trains are set to Automate their timetables. Some of them are using it for Auto-Separation purposes, others are simply using it so that my generally irregular system might stabilize. It's a pretty spindly one with a lot of single track sections (low traffic and high maintenance costs) and mixed traffic, so my trains often fall woefully behind even their Automated schedule with little opportunity to catch up, even if I add some buffer time at stations. I don't really want trains lingering in stations if I can help it because extra platforms are expensive. I know that I could add that buffer time and set "Leave Early" at stations to some effect, but I came across another idea: speeding!

Currently the Timetable window lets one set a maximum speed over a segment... what if a train would exceed that preset maximum if it was behind schedule (if it were able to)? What if it was an option in the "Extras" for a Travel duration, a dropdown that currently has no use in this context. Late trains exceeding timetable speed is practically commonplace as long as they're not exceeding the track or equipment maximums (which is not what I am proposing, for clarity--the speed limits of track and equipment should not be exceeded in any case). I would like to be able to set my Timetable Speed Limit, say, 5 mph below the train's top speed, and then it would use that uppermost range only when late.

It would be a nice additional use of the Timetable Speed Limit feature that would help poor saps like me who struggle to get the trains to keep schedule.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests