Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Signal problem
Hi all, as the openBVE website has down, I encountered difficulty on how to create a signal.

There have been extensive use of green go ahead signal such as:

.signal -2; PSR1; -1.5;1.5

which means a green / red 2 aspect signal named as "PSR1" is positioned on leftwards 1.5m away from track and 1.5m above the main track.

But, how to do the red light and forced stop before a position?
(14 August 2012, 11:54 PM)Samuel Lee Wrote:   Show/Hide

You need to edit the .STA command, but i forgot which value
Joey Foo
The web design/development guy.
"Have you tried the '404' page on" @joeyfjj 

Useful links: Download openBVE / C751A
Do refer to
Teo Ren Jie
Lead Developer at RRTS Studios
Also develops OMSI 2 maps!
[-] The following 1 user Likes boylush's post:
  • Samuel Lee
I guess you meant this?
.sta Name; ArrivalTime; DepartureTime; PassAlarm; Doors; ForcedRedSignal; System; ArrivalSound; StopDuration; PassengerRatio; DepartureSound; TimetableIndex
Quote:Available options for ForcedRedSignal:
0: Signals are unaffected by this station.
1: The signal immediately following the last station stop is hold at red until the train reaches the stopping area and the departure time.
Hi there! I am a railway technology enthusiast, currently studying at a polytechnic in Singapore.

North South Line for openBVE [NB: MSP - BSH]
[-] The following 1 user Likes Mark4211's post:
  • Samuel Lee
Thanks for the reply, but the codes shown still make the signal light as green. I dunno where did I did wrong

.sta UPD Sidings;12.4645;12.4825;1;0;1;0;;0;0;;0
.signal -2; UPD1; -1.5; 1;
.stop 0;10;10
I hope this can make sticky by admins.

How to create red signals using DEFAULT BVE's signals:

Step 1: Code a station in desired position with stopping position.
;.sta [i]Station Name[/i];[i]Arrival Time[/i];[i]Departure Time[/i];0;N;[b]1[/b];[i]Safety System[/i]; [i]Arrival Sound[/i];[i]Stop duration[/i] ;[i]Passenger Ratio[/i];[i]Departure Sound[/i] ;[i]Timetable Index[/i]
.stop 0;10;10
The underlined X and Y are positive integers denotes the position of the track. The stop command shall not be further explained. (Allows 10m margin and does not show the CSP sign)

The normal 0 is passed alarm and I don't SG MRT uses that. Hence I disabled it.

Safety System should be "1" as all SG (BVE & real life) trains are equipped with ATC. Unless it is in depot where ATC is unavailable, that's when 0 is used.

"N" means no doors should open. Other parameters include:
openBVE wiki Wrote: Show/Hide

You should change the bolded to "1" as it means Forced Red Signal.

Step 2: Put the official .signal code
.signal -2; <Unused for OpenBVE>; -1.5;1.5,

Notice that the position Z MUST be after the station stop point.
For details on how to use .signal, please refer to:

Track & Signalling Guide from OpenBVE Developer Guide

For in this instance, it is used the 2 light (Red & Green) signal positioned 1.5m leftwards and 1.5m above the track (Signal post cannot be in the middle of track and get hit by trains).

Further learning:

Q1Smile What if I have "Bukit Brown problem" (Crossover over a closed station)?

For closed stations, you should:

;.sta Bukit Brown;P;[s]Departure Time[/s];0;N;[b]1[/b];1; [s]Arrival Sound[/s];0;[i]Passenger Ratio[/i];[s]Departure Sound[/s] ;[s]Timetable Index[/s]
.stop 0;10;10
.signal -2; <Unused for OpenBVE>; -1.5;1.5,

For further reading of .sta code:

Further reading on .sta code

Note: The striked off ones are one's that can be left empty. We BVESG so far does not use Departure Sound (Maybe unless one day SMRT plays "Please hold on the grab poles" or another reminder of no eating & drinking before departure, then we may do adjustment accordingly) and Timetable Index (IDK). A closed station does not require precise arrival & departure time but we must use "P" or "L" to indicate this station is meant to be passed. I estimate CCL's carriage is about 70m. Change accordingly please.

Unlike BVE4 where .stop command can be forget for various lines that skip stations, openBVE still demand a stop position for every station. This is how "P" and "L" options come into handy.

Hence, even for "Tanah Merah" / "Jurong East" situation, whereby there are more than 1 crossover point to meet between stations, you can have code like

;.sta EW4 Tanah Merah;12.2312;12.2533;0;1;[b]1[/b];1; ewl\ew4.wav;15;65;[s]Departure Sound[/s] ;[s]Timetable Index[/s]
.stop 0;10;10
.signal -2; <Unused for OpenBVE>; -1.5;1.5,
The 15 denotes minimum of 15 secs stay in the station. I presume a 65% load in EB.

This part is the immediate signal light for train to go / or halt for middle platform train to go towards PSR bound. Notice I allowed the slight delay in departure time (Instead of usual 15 sec ~ 30 sec, I put more than 2 minutes)? This is to cite a case of a peak hour fresh train from CHD is departing TNM for Simei to embark their journey which lead to delay in our time. But then, the signal light will auto change when the departure time comes close.


;.sta E42;[b]P[/b];12.2555;0;[b]N[/b];[b]1[/b];1;;[b]0[/b];65;[s]Departure Sound[/s] ;[s]Timetable Index[/s]
.stop 0;10;10
.signal -2; <Unused for OpenBVE>; -1.5;1.5,
This is skipped station of E42 in the EB > CGL crossover (I does not know the exact signal code for that and anyhow named it in the best guess.)

The departure time is up to one to play around. You may create a stop there (Delay the departure time longer) as the train is coming too close to the peak hour fresh train or you can make a smooth journey of not stopping at all by putting the departure time much closer to Tanah Merah's departure time.

A demo picture for default red signal:

[Image: Default.png]

How to create CUSTOM signals?

Heck! openBVE's signals does not looked like one used in Singapore MRT. What if I want to code signals for Crystal Movers based LRT lines?

Here's how:

Similar concept, but with differences and their advantages / disadvantages.

Step 1:

Code your custom signals. (Later to be elaborated)

Step 2:
Load the signals as you do for objects (.freeobj)
With Structure
Signal(33).Load ewl\signals\Test.animated
All the rails, walls, viaducts, PSDs and etc are omitted. The signals files are placed on EWL's object file. In future, I may create a shared library for each particular type of trains (1 signal folder for SG/PG LRT & CGA Skytrain & 1 signal folder for EWL / NSL etc.)

Step 3: Code the signal point straight
[i].Section 0,[/i] .sigf 33;0; -1.5; 1

For reference:

[Image: Stop.png]

The advantage is the removal of need to create each mini stations (The points whereby trains are most likely needed to stop other than actual stations), but the disadvantage is by using .Section code, it freeze the
signal light indefinitely which makes it only useful at sidings or a point where the game prematurely ended due "signalling fault" (Lightning strikes on the signal? Tongue).

[Image: Lightning_Strikes.png]

Hence, the best way to solve "Bukit Brown" / "Tanah Merah" problem is to combine the both:

;.sta E42;[b]P[/b];12.2555;0;[b]N[/b];[b]1[/b];1;;[b]0[/b];65;[s]Departure Sound[/s] ;[s]Timetable Index[/s]
.stop 0;10;10
[s].Section 0,[/s] .sigf 33;0; -1.5; 1

We can strike out the Section code, otherwise it will override the bolded "1", forced red signal until departure time.

[Image: Proceed.png]

Regarding the signal file, you need to create an animated file.

Basically you need to get the texture and lighting colour. And you code a box as "base" with 2 more files as lighting colour files (Depending on the number of aspect lights. Other system have yellow light and you need more files then).

Last, you create the animated file by:

Position = 0, -2.65, 0
States = Test_SignalSingle_Pole.csv
;Position the base signal box as required

Position = 0, 0, 0
States = SignalSG_0.csv, SignalSG_X.csv, SignalSG_2.csv
StateFunction = if[section == 0,0,(if[section==2,1,2])]
;Position the lighting as required. Then we got 3 states for SG signals. SignalSG_0.csv is the red colour file, SignalSG_X.csv is the lightning striked colour file (Or a major power outage) and SignalSG_2.csv is the white colour file.

;We will use this function to decide which light to appear:
;If section is 0, it means red light in openBVE codebase and we must treat it as red light. Hence, if section is 0, State in 0th index which is the red colour file base is used. However, if section is not 0, whereby ForcedRedSignal parameter in .sta command is 0 or .Section provided is anything other than 0, then another check will be done such that if section is 2 (Yellow light), then the power outage / lightning striked file will be used. In other cases, it will be using white light file which is located at 2nd index.

That's all I have.

Hope it helps.
[-] The following 3 users Like Samuel Lee's post:
  • JerichoChua, SBS6057Z, SMB157S

Possibly Related Threads...
Thread Author Replies Views Last Post
  C830v2 Problem Chester190 2 8,178 06 March 2016, 02:08 AM
Last Post: joeyfjj
  RouteBuilder Exporting Problem Seangwong 6 4,033 14 October 2012, 01:00 PM
Last Post: boylush
  Edited C751A gangway problem Seangwong 8 5,706 09 October 2012, 03:50 AM
Last Post: joeyfjj
  Door Closing Sound Problem Seangwong 24 16,310 28 September 2012, 08:31 PM
Last Post: Seangwong
Exclamation .csv problem. Mark4211 3 2,542 24 July 2011, 03:42 PM
Last Post: SMB142J
  Problem Downloading Habourvale Routes mddanial 28 17,554 15 June 2011, 01:17 PM
Last Post: Liang25

Forum Jump:

Users browsing this thread: 1 Guest(s)