In the classic German “Hp/Vr” signalling system, there are the usual “Stop” and “Clear” aspects (Hp0 and Hp1 for main signals, Vr0 and Vr1 for distants) but there is also a third aspect, Hp2/Vr2, which allows trains to pass the main signal at a reduced speed (normally 40km/hr). This corresponds to the “J” state in Rail3D.
One way that you can model this is to make sure that the track over which the routes corresponding to the “J” state run is provided with a speed limit. However, it would be nicer if the automatic driver recognised the Vr2 aspect as a warning to reduce speed.
It is possible to implement this by adding a simple script to the distant signals.
When a train passes the distant signal, the script tests whether the next signal (the corresponding main signal) is in the J state. If it is, and the train’s existing speed limit is greater than 40km/hr, it changes the train’s speed limit to 40km/hr.
Notice that nextsig is only assigned in the OnTrain() function, not Init() , because the function Signal.NextSignal() only works when a route has been set from the signal. Of course, a distant signal can only have one corresponding main signal, but Rail3D doesn’t know that.
Note that, if you use signals incorporating this script, you will have to place speed limits in the appropriate places to restore the train’s speed to normal when it has passed the pointwork protected by the Hp2 aspect.
|