Elvas Tower: Signal Scripts - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Signal Scripts Rate Topic: -----

#1 User is offline   JBM37156 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 8
  • Joined: 19-February 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 19 February 2020 - 03:37 PM

Hi all,

Been an open rails user on and off for a few years now, have rekindled my interest by attempting a timetable for Scottish Capitals Express route.

This is my second timetable as 5 years ago I wrote one for North Wales Coast.

I can't for the life of me figure out how to get the signal Scripts to be able to allow a loco to pass a signal and attach to a train in a platform.

Every amendment to the sigscr file has caused the signals to cease working. Usually holding the train so it won't pass them or in one case running all trains pass them at danger although this happening did prove my pickup command had worked!

Has anyone successfully amended the SCE sigscr file or similar? The making tracks produced files appear to be written differently to the original style MSTS scr files hence why maybe I am going wrong.

Thanks for reading anyhow.


J

#2 User is offline   rickloader 

  • Conductor
  • Group: Status: First Class
  • Posts: 493
  • Joined: 05-February 13
  • Gender:Male
  • Location:Southampton uk
  • Simulator:Open Rails
  • Country:

Posted 20 February 2020 - 04:56 AM

Hi J ! There are 2 ways to get a loco to couple in timetable mode .
Enter auto_node mode by reversing through switches outside of signal control. You may also be able to enter auto_node by terminating a path and starting a new one with a new train column ie splitting the train.
If you must use auto_signal mode because a signal guards the approach, you will need to enable Callon in the signal scripts. Here is mine:


SCRIPT SRGrdSig

// Callon Shunt
extern float block_state();
extern float route_set();
extern float def_draw_state();
extern float state;
extern float draw_state;
extern float enabled;
extern float TrainHasCallOn_Restricted();

if (!enabled ||
// Not enabled/cleared to show natural state?
block_state() != BLOCK_CLEAR ||
// Block ahead not clear?
!route_set())
// Switch not set as per link?
{
state = SIGASP_STOP;
}
if (enabled && route_set() && TrainHasCallOn_Restricted() && block_state() == BLOCK_OCCUPIED )

// clear on CallOn
{
state = SIGASP_RESTRICTING;
}
else if (block_state == BLOCK_CLEAR)
// normal clear
{
state = SIGASP_CLEAR_2;

}

// Get draw state
draw_state = def_draw_state(state);
//////////////////////////////////////////////////////////////////////////////////

SignalType ( "SRGrdSig"

SignalFnType ( NORMAL )
SignalLightTex ( "ltex" )
SemaphoreInfo ( 0.5 )
SignalFlags ( SEMAPHORE )

SignalLights ( 3
SignalLight ( 0 "Red Light"
Position ( 0 0.19 0.04 )
Radius ( 0.03 )
SignalFlags ( SEMAPHORE_CHANGE )
)
SignalLight ( 1 "Green Light"
Position ( 0 0.19 0.04 )
Radius ( 0.03 )
SignalFlags ( SEMAPHORE_CHANGE )
)
SignalLight ( 2 "Amber Light"
Position ( 0 0.19 0.04 )
Radius ( 0.03 )
SignalFlags ( SEMAPHORE_CHANGE )
)

)
SignalDrawStates ( 3
SignalDrawState ( 0
"Red"
DrawLights ( 1
DrawLight ( 0 )
)
SemaphorePos ( 0 )
)
SignalDrawState ( 1
"Green"
DrawLights ( 1
DrawLight ( 1 )
)
SemaphorePos ( 1 )
)
SignalDrawState ( 2
"purple"
DrawLights ( 1
DrawLight ( 2 )
)
SemaphorePos ( 1 )
)
)
SignalAspects ( 3
SignalAspect ( STOP "Red" )
SignalAspect ( CLEAR_2 "Green" )
SignalAspect ( RESTRICTING "Purple" )

)
SignalNumClearAhead ( 2 )
)
The sigcfg above displays a yellow restricting state with call on in addition to the normal red and green. (yellow= purple=amber so it is a bit muddled)
There are also 2 callon modes. This is for TrainHasCallOn_Restricted.
A flaw with my script is that if combined with a multi head signal all aspects will clear, so I use it with a single head only .
i`m not too hot on signal scripts. But this should get you started
Rick

#3 User is offline   JBM37156 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 8
  • Joined: 19-February 20
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 20 February 2020 - 06:38 AM

Cheers all help welcome. I had some ground signals in the North Wales route allowing callon but was 5 years ago. The signal type I'm struggling with is a two aspect colour light.

#4 User is offline   rickloader 

  • Conductor
  • Group: Status: First Class
  • Posts: 493
  • Joined: 05-February 13
  • Gender:Male
  • Location:Southampton uk
  • Simulator:Open Rails
  • Country:

Posted 20 February 2020 - 07:05 AM

You have to adapt the 2 aspect colour light script to include callon by adding /substituting the lines referring to callon, given in my example script above. it doesn`t matter that mine is a ground signal and yours a colour light, the syntax of the script is much the same.
You don`t need the extra yellow / restricting aspect ; you could just have red and green. But i find the extra aspect very useful because seeing when a train has callon is a check that the timetable is working correctly.
Please read the section 10.15.3 /4 from the manual.
Rick

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users