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

ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Reserve through means that rather than ending path reservation for PBS signal here, continue to reserve path until next signal.

Slots works a lot like actual railway token. (If you don't know what railway token is, ask again and I will explain in detail.) You get a token at the right station that control access to the only available platform at the left station, and no other train can enter the section without token, therefore limiting the number of train in this section to 1.
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

ino wrote:Reserve through means that rather than ending path reservation for PBS signal here, continue to reserve path until next signal.

Slots works a lot like actual railway token. (If you don't know what railway token is, ask again and I will explain in detail.) You get a token at the right station that control access to the only available platform at the left station, and no other train can enter the section without token, therefore limiting the number of train in this section to 1.
Yes please, explain about railway token :D

So... how do I create slots for this thing?
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

AkipTsaqif wrote:
ino wrote:Reserve through means that rather than ending path reservation for PBS signal here, continue to reserve path until next signal.

Slots works a lot like actual railway token. (If you don't know what railway token is, ask again and I will explain in detail.) You get a token at the right station that control access to the only available platform at the left station, and no other train can enter the section without token, therefore limiting the number of train in this section to 1.
Yes please, explain about railway token :D

So... how do I create slots for this thing?
You said you aim for realism so I thought you already know about railway token XD

Railway token are a form of signalling that only allow single train to exist in any section of railway at a time. It is represent physically by an object -- without possession of said object the driver cannot enter the section. Though if you have programming/electronic background, you can simply consider the SLOT as a counter.

The manage slots can be accessed by the drop-down on the bottom-right of the Train list menu. You can create/delete/edit slots from this menu.

Routefinding restriction can stop train at PBS on some condition of slots, and can acquire or release a slot.

But with anything, just play with it. You will get hang of it in no time.
AkipTsaqif
Engineer
Engineer
Posts: 21
Joined: 28 Apr 2016 11:11

Re: JGR's Patch Pack

Post by AkipTsaqif »

ino wrote: You said you aim for realism so I thought you already know about railway token XD

Railway token are a form of signalling that only allow single train to exist in any section of railway at a time. It is represent physically by an object -- without possession of said object the driver cannot enter the section. Though if you have programming/electronic background, you can simply consider the SLOT as a counter.

The manage slots can be accessed by the drop-down on the bottom-right of the Train list menu. You can create/delete/edit slots from this menu.

Routefinding restriction can stop train at PBS on some condition of slots, and can acquire or release a slot.

But with anything, just play with it. You will get hang of it in no time.
Hahaha.

Alright, thanks.
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: JGR's Patch Pack

Post by JGR »

yellyFish wrote:Hi. I have been trying to play in a server that uses your patch version 0.27.0. But everytime the map gets loaded the game gets super slow, my CPU usage goes to 100% and the only clue i get about this is using debug mode. i get this error spammed in console.

Code: Select all

dbg: [grf] Unhandled vehicle variable 0x61, type 0x0
I have digged in the code trying to find the newgrf responsible or if it is something with the patch or openttd itself but i can't seem to find it.
I'll attach the server savefile so you can test if it happens to you too and if you have any clue on what is causing this.

UPDATE: i found the newgrf responsible for the errors. now i am asking the creator what he knows. It was 2cc Trains In NML version 3.0-alpha2.
It may be an issue of the CPU requirements to play the game at full speed.
On my machine your savegame once loaded runs at about 0.7 of normal speed, and uses 100% of one of my CPU cores.
This is mostly due to the large number of trains in the game.
You can see these sorts of stats in the "Show frame rate" window, in the question mark menu.
I don't think that the GRF error is that important, though the GRF author may be able to better answer you on that one.
Ex TTDPatch Coder
Patch Pack, Github
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Not sure if this has been asked before (or maybe it's me who asked it before), but is it possible to add starting signal feature?

If there are signal within 2-3 tiles in from of each station platform, without any branch before the signal, that signal acted as a starting signal for the platform in question. If the starting signal isn't cleared (or cannot reserve path, for PBS), then the train should not depart the station (i.e. still loading cargo at station).

Of course, this should be added as a option in setting.

Thank you in advance for consideration.
User avatar
Gliptal
Engineer
Engineer
Posts: 82
Joined: 01 Dec 2013 01:11

Re: JGR's Patch Pack

Post by Gliptal »

ino wrote:Not sure if this has been asked before (or maybe it's me who asked it before), but is it possible to add starting signal feature?

If there are signal within 2-3 tiles in from of each station platform, without any branch before the signal, that signal acted as a starting signal for the platform in question. If the starting signal isn't cleared (or cannot reserve path, for PBS), then the train should not depart the station (i.e. still loading cargo at station).

Of course, this should be added as a option in setting.

Thank you in advance for consideration.
I fail to see a use case for this. There's already such a signal at the end of the platform.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Gliptal wrote:
ino wrote:Not sure if this has been asked before (or maybe it's me who asked it before), but is it possible to add starting signal feature?

If there are signal within 2-3 tiles in from of each station platform, without any branch before the signal, that signal acted as a starting signal for the platform in question. If the starting signal isn't cleared (or cannot reserve path, for PBS), then the train should not depart the station (i.e. still loading cargo at station).

Of course, this should be added as a option in setting.

Thank you in advance for consideration.
I fail to see a use case for this. There's already such a signal at the end of the platform.
??? Can you elaborate?
User avatar
Gliptal
Engineer
Engineer
Posts: 82
Joined: 01 Dec 2013 01:11

Re: JGR's Patch Pack

Post by Gliptal »

ino wrote:
Gliptal wrote:
ino wrote:Not sure if this has been asked before (or maybe it's me who asked it before), but is it possible to add starting signal feature?

If there are signal within 2-3 tiles in from of each station platform, without any branch before the signal, that signal acted as a starting signal for the platform in question. If the starting signal isn't cleared (or cannot reserve path, for PBS), then the train should not depart the station (i.e. still loading cargo at station).

Of course, this should be added as a option in setting.

Thank you in advance for consideration.
I fail to see a use case for this. There's already such a signal at the end of the platform.
??? Can you elaborate?
It's hidden, but the game automatically places a signal at the end of the platform, that acts like a PBS. You can see this when connecting two multiple-track stations with a single track, and having two trains run the route: they'll patiently wait at the end of the platform for the track to be cleared.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Gliptal wrote:
ino wrote:
Gliptal wrote:I fail to see a use case for this. There's already such a signal at the end of the platform.
??? Can you elaborate?
It's hidden, but the game automatically places a signal at the end of the platform, that acts like a PBS.
That only work on terminus station, and even then, the train would already have stop loading/uploading and just waiting for signal. Otherwise, the train would still reserve path through station to next available signal.

Are you confused with Transport Fever?
User avatar
Gliptal
Engineer
Engineer
Posts: 82
Joined: 01 Dec 2013 01:11

Re: JGR's Patch Pack

Post by Gliptal »

ino wrote:
Gliptal wrote:
ino wrote:
??? Can you elaborate?
It's hidden, but the game automatically places a signal at the end of the platform, that acts like a PBS.
That only work on terminus station, and even then, the train would already have stop loading/uploading and just waiting for signal. Otherwise, the train would still reserve path through station to next available signal.

Are you confused with Transport Fever?
I'm pretty sure it works on all stations, not only terminus. But yes, the train finishes the load/unload process, starts (if it isn't set to stop at the platform's end) and stops if it's unable to reserve a valid path to the next signal.

I still don't get what you're looking for, but that's probably me. Even if a valid path exists, the train won't depart until the load/unload process is done. Are you looking for a signal that forces the train to depart as soon as a path is available? Or one that forces the train to stay put after the load/unload is done? You can have the latter by setting the train to stop at the platform's end (although it won't work for terminus stations).
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

Gliptal wrote:
ino wrote:
Gliptal wrote:It's hidden, but the game automatically places a signal at the end of the platform, that acts like a PBS.
That only work on terminus station, and even then, the train would already have stop loading/uploading and just waiting for signal. Otherwise, the train would still reserve path through station to next available signal.

Are you confused with Transport Fever?
I'm pretty sure it works on all stations, not only terminus. But yes, the train finishes the load/unload process, starts (if it isn't set to stop at the platform's end) and stops if it's unable to reserve a valid path to the next signal.

I still don't get what you're looking for, but that's probably me. Even if a valid path exists, the train won't depart until the load/unload process is done. Are you looking for a signal that forces the train to depart as soon as a path is available? Or one that forces the train to stay put after the load/unload is done? You can have the latter by setting the train to stop at the platform's end (although it won't work for terminus stations).
No it doesn't.

And what I want, is for the train to continue to load/unload passengers until the path is available, just like in real life. The way I am doing now is for rigid timetabling, but that takes a lot of work. And train can spent a lot of time waiting in station for passing train on a large single-track line.
User avatar
cp1900
Engineer
Engineer
Posts: 56
Joined: 30 Sep 2007 17:59
Location: Czech Republic

Re: JGR's Patch Pack

Post by cp1900 »

ino wrote: And what I want, is for the train to continue to load/unload passengers until the path is available, just like in real life. The way I am doing now is for rigid timetabling, but that takes a lot of work. And train can spent a lot of time waiting in station for passing train on a large single-track line.
This is something I would love to achieve as well. I believe what we would need to help with this would be to assign "priorities" to trains. However, I believe this would require work related to how the train reserve paths on the tracks they are running on.

For instance it would be great if we could have a freight train waiting at some point and even though the passenger train would be arriving to the station while there's an available path for the freight train already, the freight train would not leave until the passenger / faster train would pass first. Then again, this would have to do something with path reserving and I believe this is not any easy to achieve.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

cp1900 wrote:
ino wrote: And what I want, is for the train to continue to load/unload passengers until the path is available, just like in real life. The way I am doing now is for rigid timetabling, but that takes a lot of work. And train can spent a lot of time waiting in station for passing train on a large single-track line.
This is something I would love to achieve as well. I believe what we would need to help with this would be to assign "priorities" to trains. However, I believe this would require work related to how the train reserve paths on the tracks they are running on.

For instance it would be great if we could have a freight train waiting at some point and even though the passenger train would be arriving to the station while there's an available path for the freight train already, the freight train would not leave until the passenger / faster train would pass first. Then again, this would have to do something with path reserving and I believe this is not any easy to achieve.

That can be accomplished using routefinding restriction and slot though. Or proper use of pre-signal system (look up priorities on openttdcoop)

My problem is that, even if priority is used, the train would have already stop loading/unloading and just wait at signal. I just wanted it to continue loading passenger. (This probably applies to passenger train only though)
User avatar
cp1900
Engineer
Engineer
Posts: 56
Joined: 30 Sep 2007 17:59
Location: Czech Republic

Re: JGR's Patch Pack

Post by cp1900 »

ino wrote:
That can be accomplished using routefinding restriction and slot though. Or proper use of pre-signal system (look up priorities on openttdcoop)

My problem is that, even if priority is used, the train would have already stop loading/unloading and just wait at signal. I just wanted it to continue loading passenger. (This probably applies to passenger train only though)
Hmm, thanks for the suggestion. I will try to look that up! EDIT: I did look it up but I don't want to build unrealistic track and signalling setups to achieve priorities. I would like to have a normal-looking, realistic track layout. I have yet to try to understand how to achieve the routefinding restriction and slots...

Meanwhile, I also agree with you about the load/unload for the passenger trains while not having an available path to depart and wait at the signal. I think there's a way to achieve that, but it requires that you do not use any signalling for exiting the station platforms, which can be a problem...
Last edited by cp1900 on 07 Oct 2018 11:47, edited 1 time in total.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

cp1900 wrote: Meanwhile, I also agree with you about the load/unload for the passenger trains while not having an available path to depart and wait at the signal. I think there's a way to achieve that, but it requires that you do not use any signalling for exiting the station platforms, which can be a problem...
Argh.... Here we go in circle. See above.

Or otherwise please elaborate.
User avatar
cp1900
Engineer
Engineer
Posts: 56
Joined: 30 Sep 2007 17:59
Location: Czech Republic

Re: JGR's Patch Pack

Post by cp1900 »

ino wrote:
cp1900 wrote: Meanwhile, I also agree with you about the load/unload for the passenger trains while not having an available path to depart and wait at the signal. I think there's a way to achieve that, but it requires that you do not use any signalling for exiting the station platforms, which can be a problem...
Argh.... Here we go in circle. See above.

Or otherwise please elaborate.
My apologies. I tested it again just to be sure, the train stops loading/unloading and goes to "waiting for available path" with the setup I was talking about. Sorry.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

Current options are:
- Load if available (load condition ends when platform is empty)
- Full load all cargo (load condition ends when all wagons are full)
- Full load any cargo (load condition ends when wagons for any one cargo are full)
- No loading (load condition ends when unload conditions are met)
The train is considered to be at the station until the selected condition is met, even if the signal is green.
Once the selected condition is met, the train is no longer considered to be at the station, even if the signal is red.

I think what ino wants is a fifth option:
- Load if available (until platform is empty) then continue loading until signal is green (clear path available).

Am I correct?
Last edited by wallyweb on 07 Oct 2018 12:16, edited 1 time in total.
ino
Traffic Manager
Traffic Manager
Posts: 152
Joined: 09 Apr 2017 14:58

Re: JGR's Patch Pack

Post by ino »

wallyweb wrote:Current options are:
- Load if available (load condition ends when platform is empty)
- Full load all cargo (load condition ends when all wagons are full)
- Full load any cargo (load condition ends when wagons for a specified cargo are full)
- No loading (load condition ends when unload conditions are met)
The train is considered to be at the station until the selected condition is met, even if the signal is green.
Once the selected condition is met, the train is no longer considered to be at the station, even if the signal is red.

I think what ino wants is a fifth option:
- Load if available (until platform is empty) then continue loading until signal is green (clear path available).

Am I correct?
This is correct. Thank you for clarifying.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: JGR's Patch Pack

Post by wallyweb »

ino wrote:This is correct. Thank you for clarifying.
:bow:
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: peter1138 and 44 guests