I have a few questions regarding the routefinding restriction in the 0.18 release. I find that there are 'Advanced' routefinding restriction features. However, I am unable to find any detail regarding to this.
I have figure out the "Slot" feature, which I believe you ought to advertise more.
I haven't advertised it as it's not in the most recent release, I merged it just after the 0.18.0 release, so that I could do some more testing/development.
Maybe I am missing other obvious way to do this, but this has finally enable a proper single-track branch line where multiple train are allow in one direction at a time! (https://i.imgur.com/Bs3LdNm.png
This isn't quite possible yet, as it would need the slot occupancy conditional which you've mentioned below.
Without having actually implemented/tried it yet, I'll expect that you'd need to use a different slot for each of the two directions, and require that the slot for the opposite direction is empty at each entrance before passing the signal or acquiring the slot in the forward direction.
The main uses cases which I had in mind were preventing deadlocks or poor train regulation around: flat junctions with reverse at waypoint movements, adjacent flat junctions, and siding/bay-type stations with more trains than platforms.
Feature request for slot: Can we have conditions for checking number of train in specified slots? A use case I can think of for this include: Single-track main line where multiple trains may enter in same direction at the same time (line signaled with bi-directional block signal). Or for single-track station with passing loop, only divert train into the loop if there is an express train following, otherwise stays on main line etc. (Even though passing loop in OpenTTD doesn't slow train down, this is for realism).
This is something that I'm planning to implement, I've not got round to it yet.
A collapsible group for slots would also be nice, but not required. Sorry for lengthy list of feature requests for a feature that is very new. I appreciate this feature a lot.
I'm not anticipating that a player will have that many slots to need that? I can look into it, but it's not really top priority for me. No need to apologise, and thanks
On the other hand, I am unable to figure out how we should use the "Wait at PBS signal" other than to make train wait forever (?). Do you have some example use cases?
It's not very useful at the moment, as it's been effectively superseded by the slot acquire and wait instruction, which is implemented using the same mechanism.
The conditional for current slot occupancy will make it useful again, as there are cases where you'd want to hold a train at a signal depending on the occupancy of a slot without trying to acquire it.
I am unable to figure out how the condition "Entry PBS" works. An explanation would be appreciated.
When inside a PBS block, the entry PBS conditional can be used to test the tile of the signal which the reservation started (or would start) from, i.e. a PBS signal facing into the block.
I mostly use this to conditionally enable reserve through on exit signals depending on which entrance signal was used, for things like preventing junction overhangs on some types of flat junctions.