.section command
3 posters
Page 1 of 1
.section command
Hello everyone,
well, everybody has his thing and this seems to be mine. I am considering adding train-dependent signalling into my route, but in fact, I have never worked with these commands. So, if I assume right - the section can have three states (go / stop / next is stop) and this can be train-dependent, based on the ".pretrain" command?
D.
well, everybody has his thing and this seems to be mine. I am considering adding train-dependent signalling into my route, but in fact, I have never worked with these commands. So, if I assume right - the section can have three states (go / stop / next is stop) and this can be train-dependent, based on the ".pretrain" command?
D.
Re: .section command
There's a LOT of 'official' documentation, here's a part of it:
This command starts a section, the functional part of signalling, to be
used in conjunction with Track.SigF, which creates a visual
representation of a section (a signal). The ai
parameters specify the aspects the section can bear. An aspect of 0
corresponds to a red section which must not be passed by a train. The a0 term is mandatory.
Default behavior:
The ai terms specify
the aspect the section should bear depending on how many sections ahead
are clear until a red one is encountered. The order of the terms is
relevant. The same aspect may occur multiple times.
In the case more sections ahead are clear than indicated by the ai terms, the section will bear the aspect of an.
Simplified behavior:
The ai terms specify the repertoire of aspects the section can have. A section will bear the smallest of the ai which is greater than the current aspect of the upcoming section. If no such ai exists, the section will bear the aspect of an. The order of the ai is irrelevant. If the same aspect occurs multiple times, this has no effect.
Don't forget the effect of the 'interval' instruction at the beginning of the route.csv file. The value chosen acts on the time needed for section to clear. I think 'pretrain' over-rides 'interval' but it's not something I understand in great depth.
Track.Section a0; a1; a2; ...; an |
ai: A non-negative number specifying one of the section's aspects. |
used in conjunction with Track.SigF, which creates a visual
representation of a section (a signal). The ai
parameters specify the aspects the section can bear. An aspect of 0
corresponds to a red section which must not be passed by a train. The a0 term is mandatory.
ⓘ Default versus simplified section behavior |
There are two different modes of behavior on how to interpret the ai parameters. The mode can be set via Options.SectionBehavior. The following are separate descriptions for default and simplified behavior. |
Default behavior:
The ai terms specify
the aspect the section should bear depending on how many sections ahead
are clear until a red one is encountered. The order of the terms is
relevant. The same aspect may occur multiple times.
▸ Meanings of the ai terms: |
a0: The aspect to show when this section is occupied by a train or otherwise hold at red. a1: The aspect to show when this section is clear, but the immediately following section is red. a2: The aspect to show when this section and the following section are clear, but the one immediately following the latter one is red. an: The aspect to show when n sections are clear before a red one is encountered. |
Simplified behavior:
The ai terms specify the repertoire of aspects the section can have. A section will bear the smallest of the ai which is greater than the current aspect of the upcoming section. If no such ai exists, the section will bear the aspect of an. The order of the ai is irrelevant. If the same aspect occurs multiple times, this has no effect.
Example of a Track.Section command in conjunction with a Track.SigF command: | |
▶ | With Track 1000, .Section 0;2;4, .SigF 3;0;-3;-1 |
Don't forget the effect of the 'interval' instruction at the beginning of the route.csv file. The value chosen acts on the time needed for section to clear. I think 'pretrain' over-rides 'interval' but it's not something I understand in great depth.
Re: .section command
Thank you for the explanation, Gray. I think I get the point, the only thing I am confused with is WHERE exactly is that signal you are talking about shown. I have a feeling it might be similar to the "marker" system...? In the route itself (like physically on the pole), I was thinking about implementing animated signal, which would reflect the section states described above. I think it should be possible to put ".section" commands into the condition of animation as well...?
Re: .section command
In the section example:
1000 is location; .Section 0;2;4 is the signal aspect states for this section (0=red) - next section (2=amber) - section after (4=green). That's a three aspect signal, right? OK, the actual signal OBJECT, located at 1000, is whatever is listed in the Signals listing as signal item 3.
I think the example in the official documentation might refer to program generated signal objects (default??) which configure like this:
Track.Signal is similar to using Track.Section and Track.SigF in one command.
I never used this method, tending to go for BRSigsOpen / graysigs animated or modified NWM items.
▶ | With Track 1000, .Section 0;2;4, .SigF 3;0;-3;-1 |
1000 is location; .Section 0;2;4 is the signal aspect states for this section (0=red) - next section (2=amber) - section after (4=green). That's a three aspect signal, right? OK, the actual signal OBJECT, located at 1000, is whatever is listed in the Signals listing as signal item 3.
I think the example in the official documentation might refer to program generated signal objects (default??) which configure like this:
▸ Options for Type: |
Example of a four-aspect type B signal without a post at x=-3 and y=5: | |
▶ | 1000, Track.Signal -4;;-3;5 |
Example of a four-aspect type B signal including a post at x=-3 and y=4.8: | |
▶ | 1000, Track.Signal -4;;-3;-1 |
I never used this method, tending to go for BRSigsOpen / graysigs animated or modified NWM items.
Re: .section command
Yes, I get the point.
Well, I would like to use my modified signal as well, I have found it would be possible. But obviously I don't want any crappy default objects loaded... I will have to figure that out.
Well, I would like to use my modified signal as well, I have found it would be possible. But obviously I don't want any crappy default objects loaded... I will have to figure that out.
Re: .section command
Well, you simply load your signal file in the beginning (below the "Structure" section) like this:
Signal(3).Load BlockSignal
for BlockSignal.ANIMATED. Inside the .animated you need to define formulae for all aspect values (variable is called "section") which can occur in the route file, which would e.g. be 1, 2, 3 and 5 if you insert the signal like this:
1000
.Section 1,2,3,5
.SigF 3,0,x,y,yaw,pitch,roll
Signal(3).Load BlockSignal
for BlockSignal.ANIMATED. Inside the .animated you need to define formulae for all aspect values (variable is called "section") which can occur in the route file, which would e.g. be 1, 2, 3 and 5 if you insert the signal like this:
1000
.Section 1,2,3,5
.SigF 3,0,x,y,yaw,pitch,roll
Quork- Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: .section command
Yes. I was thinking about something like that.
If I am not mistaking the "section" thing can be directly influenced by the "pretrain" command, right? Someone was mentioning it in another discussion here...
If I am not mistaking the "section" thing can be directly influenced by the "pretrain" command, right? Someone was mentioning it in another discussion here...
Re: .section command
The OpenBVE sections work just like real life blocks. It either is free or it isn't. If it is free, the signal is showing a permission aspect; if it isn't, the signal is at danger. Now that's perfectly enough for simple two aspect block signals, but not for signals with more aspects; that's why you can specify an aspect number for the case that the section is free. This way, you can have one .animated signal object (let's have it the index "1") and yet use it in different positions, so that it e.g. shows "proceed (40km/h)" if placed before a short switch, "proceed (80km/h)" if placed before a longer one or simply "proceed" if there's no speed limit applying; just by using (e.g.)
.section 2
.signal(1) 0,...
or
.section 3
.signal(1) 0,...
or
.section 1
.signal(1) 0,...
with "1" being the aspect number for "proceed free", "2" "proceed (40km/h)" and "3" "proceed (80km/h)".
However, while that's enough for classical one-section-signals, modern signalling systems often provide the possibility of gradual speed reduction by multisectional signalling, which increases the capacity of a route, both by giving the driver more data for a provident driving style and by decreasing minimum section length (that's why early appliences of that system also were called "half block signalling"). This would mean e.g. that you let the driver proceed freely when the route is free for at least three sections, decrease his speed to 80km/h if there's a train two sections ahead and decrease his speed to 40km/h if there's a train one section ahead (and, of course, stop, if there's a train in the next section). This would look like this:
.section 2,3,1
.signal(1) 0,...
It is, afaik, of no relevance whether you use .RunInterval or .PreTrain; however .RunInterval has far more options for you as the route dev, allows for much more realistic timetables, and also it is visible, while .PreTrain is invisible and doesn't follow a realistic physical model.
.section 2
.signal(1) 0,...
or
.section 3
.signal(1) 0,...
or
.section 1
.signal(1) 0,...
with "1" being the aspect number for "proceed free", "2" "proceed (40km/h)" and "3" "proceed (80km/h)".
However, while that's enough for classical one-section-signals, modern signalling systems often provide the possibility of gradual speed reduction by multisectional signalling, which increases the capacity of a route, both by giving the driver more data for a provident driving style and by decreasing minimum section length (that's why early appliences of that system also were called "half block signalling"). This would mean e.g. that you let the driver proceed freely when the route is free for at least three sections, decrease his speed to 80km/h if there's a train two sections ahead and decrease his speed to 40km/h if there's a train one section ahead (and, of course, stop, if there's a train in the next section). This would look like this:
.section 2,3,1
.signal(1) 0,...
It is, afaik, of no relevance whether you use .RunInterval or .PreTrain; however .RunInterval has far more options for you as the route dev, allows for much more realistic timetables, and also it is visible, while .PreTrain is invisible and doesn't follow a realistic physical model.
Quork- Posts : 1438
Join date : 2012-05-05
Age : 33
Location : Hofheim a.T., Hessen (Hesse), European Union
Re: .section command
Hello everyone,
done a bit of experimenting and I have one more question - is there any way how to get rid of the default signal post?
done a bit of experimenting and I have one more question - is there any way how to get rid of the default signal post?
Re: .section command
I am furious.
I put this:
And all I get is a standalone pole without the signal on its top. I don't want the crappy pole anyway, so probably there is any way to get rid of it, but why is nothing being shown? I do not get any errors / warnings. I have also tried with extensions - *.csv and *.animated
I put this:
- Code:
With Structure
Signal(0).Load FirstBrnoTrack\Signals\Navestidlo_cervene;
Signal(2).Load FirstBrnoTrack\Signals\Navestidlo_Oranzove;
Signal(4).Load FirstBrnoTrack\Signals\Navestidlo_Zelene;
- Code:
20
.Section 0;2;4, .SigF 2;0;3;-1
And all I get is a standalone pole without the signal on its top. I don't want the crappy pole anyway, so probably there is any way to get rid of it, but why is nothing being shown? I do not get any errors / warnings. I have also tried with extensions - *.csv and *.animated
Last edited by Dexter on Wed May 01, 2013 9:55 pm; edited 1 time in total
Re: .section command
Signal(2).Load FirstBrnoTrack\Signals\Navestidlo_Oranzove;
try a plain , instead of ;
I don't know where the pole is coming from, that object is a plain signal lamp unit when I opened it in object viewer. Signal poles are usually a separate freeobj inserted at the same distance as the sig
try a plain , instead of ;
I don't know where the pole is coming from, that object is a plain signal lamp unit when I opened it in object viewer. Signal poles are usually a separate freeobj inserted at the same distance as the sig
Re: .section command
I know, that is what confuses me. I think it is defined in the source code to add a pole whenever a "SigF" command is used. However, it is alredy working... I have no idea what was wrong, I only changed the index of the custom loaded signal to 1. apparently 0 is not allowed or something.
I now have a working 3-aspect autoblock. :-)
I now have a working 3-aspect autoblock. :-)
Last edited by Dexter on Wed May 01, 2013 9:56 pm; edited 1 time in total
Re: .section command
Perhaps there is some difference between your signal object and the type of sig I'm using, maybe a difference which means that you signal object isn't recognised as such, resulting in a bve default object appearing, i.e. the post.
Have you looked at the brsigs or the BrSigs_open as used in NWM / Ballyfeckin routes?? Maybe try one and see if it shows in your route, then maybe work out what that difference is.
Have you looked at the brsigs or the BrSigs_open as used in NWM / Ballyfeckin routes?? Maybe try one and see if it shows in your route, then maybe work out what that difference is.
Re: .section command
I was able to follow it in the Welsh route; this is your only work I have here at work. I have to be careful.
I figured it out, it is displaying my custom signal now.:-) I am thinking about the glow now, I could make that quite easily. :-) It will be awesome.
I figured it out, it is displaying my custom signal now.:-) I am thinking about the glow now, I could make that quite easily. :-) It will be awesome.
Last edited by Dexter on Wed May 01, 2013 9:56 pm; edited 1 time in total
Re: .section command
Happy you got that sorted. Yes, a glow is fairly easy to add.
The Welsh route is split files and not easy to follow the code, even for experienced users. For any beginners who might want to experiment on some route code it would be as well to start with the simpler IWR route from celtictrainsim. It's a single .csv route file and not complicated at all. I would love to see more players getting involved in creating new work for all to enjoy.
The Welsh route is split files and not easy to follow the code, even for experienced users. For any beginners who might want to experiment on some route code it would be as well to start with the simpler IWR route from celtictrainsim. It's a single .csv route file and not complicated at all. I would love to see more players getting involved in creating new work for all to enjoy.
Similar topics
» Shear Command
» EmissiveColor command
» rotating an object via a key command
» Issues with TrackFollowerFunction in [Sound] Section
» Height command in OpenBVE
» EmissiveColor command
» rotating an object via a key command
» Issues with TrackFollowerFunction in [Sound] Section
» Height command in OpenBVE
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum