BVEStation

Author Topic: Switching (BVE coding)  (Read 14340 times)

Offline BeeRyDavis

  • New Recruit
  • *
  • Posts: 89
  • Gender: Male
  • BVEStation Member
    • View Profile
Switching (BVE coding)
« on: August 28, 2012, 05:12:13 pm »
I'm coding two different routes and need help with switching the train onto another track. Like how the A switches to the right track
at 207th st.

Offline ipac

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 646
    • View Profile
Re: Switching (BVE coding)
« Reply #1 on: August 28, 2012, 08:51:59 pm »
Usually to switch tracks, you use the .turn command.  Turn takes a ratio (of something I cant quite recall).  Typically I've seen stuff like .turn 0.16, If I remember correctly this will switch it one track length to the right.  Negating it (.turn -0.16,) will switch it to the left.

So if you have 2 parallel tracks A and B (A is on the left and B is on the right) and they are smacked right next to each other (which should simply be 4m), and you are on track A, .turn 0.16 should switch you onto track B.  Then you would use the .rail command to readjust/add the other tracks accordingly.

I'm pretty sure thats a vague answer, and somebody else can probably offer a better explanation, but see if that helps.  :P

There is a entry on turn on the wiki, though I dont really like it very much since it explains little to nothing, but it may be good for reference.
http://wiki.bvestation.com/index.php?title=CSV_Routes (Scroll down to where it says Track.turn)
BVEStation.

Offline nightmare403

  • Conductor
  • **
  • Posts: 164
  • Gender: Male
    • View Profile
Re: Switching (BVE coding) & signals
« Reply #2 on: August 29, 2012, 12:10:05 am »
how do u make a signal display green over yellow


Uploaded with ImageShack.us

Offline peacemak3r

  • Dispatcher
  • ****
  • Posts: 536
  • Gender: Male
  • NYCTF
    • View Profile
Re: Switching (BVE coding)
« Reply #3 on: August 29, 2012, 01:59:57 am »
There should be a signal that comes with TJ's pack that displays a Yellow over Green signal or vice versa.

Offline BeeRyDavis

  • New Recruit
  • *
  • Posts: 89
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Switching (BVE coding)
« Reply #4 on: August 29, 2012, 09:12:18 am »
Usually to switch tracks, you use the .turn command.  Turn takes a ratio (of something I cant quite recall).  Typically I've seen stuff like .turn 0.16, If I remember correctly this will switch it one track length to the right.  Negating it (.turn -0.16,) will switch it to the left.

So if you have 2 parallel tracks A and B (A is on the left and B is on the right) and they are smacked right next to each other (which should simply be 4m), and you are on track A, .turn 0.16 should switch you onto track B.  Then you would use the .rail command to readjust/add the other tracks accordingly.

I'm pretty sure thats a vague answer, and somebody else can probably offer a better explanation, but see if that helps.  :P

There is a entry on turn on the wiki, though I dont really like it very much since it explains little to nothing, but it may be good for reference.
http://wiki.bvestation.com/index.php?title=CSV_Routes (Scroll down to where it says Track.turn)
I tried using the rail command before and after the switch but it's only correct after the switch. Before the switch I have the other tracks crossing in front of me with the pillars

Offline ipac

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 646
    • View Profile
Re: Switching (BVE coding)
« Reply #5 on: August 29, 2012, 10:56:18 am »
You have to remove the columns when your doing them.  If your using the wall command, you have to change the wall index on the rail  so that one side uses the wall and the other side uses nothing.
BVEStation.

Offline nightmare403

  • Conductor
  • **
  • Posts: 164
  • Gender: Male
    • View Profile
Re: Switching (BVE coding)
« Reply #6 on: August 29, 2012, 11:13:44 am »
where is the switch track located in the route files?


Uploaded with ImageShack.us

Offline Mr Railfan

  • Head Admin
  • Dispatcher
  • ******
  • Posts: 621
  • Gender: Male
  • Train Developer and Route Developer
    • View Profile
Re: Switching (BVE coding)
« Reply #7 on: August 29, 2012, 11:47:33 am »
Before attempting any of this , you have to at least know the basics to route coding. If you have absolutely no idea what the hell you are doing and just putting in random code in trying to make the train turn you will end up with stuff like this :





and your train will turn out like this:


 

Offline nightmare403

  • Conductor
  • **
  • Posts: 164
  • Gender: Male
    • View Profile
Re: Switching (BVE coding)
« Reply #8 on: August 29, 2012, 02:12:44 pm »
Before attempting any of this , you have to at least know the basics to route coding. If you have absolutely no idea what the hell you are doing and just putting in random code in trying to make the train turn you will end up with stuff like this :





and your train will turn out like this:


 

          ^
what train is that


Uploaded with ImageShack.us

Offline Pacific385

  • Dispatcher
  • ****
  • Posts: 749
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Switching (BVE coding)
« Reply #9 on: August 29, 2012, 02:15:30 pm »
I assume the R143 that overshot the bumper in the ENYCanarsie Yard in '06

« Last Edit: August 29, 2012, 04:32:19 pm by Pacific385 »

Offline bve

  • Dispatcher
  • ****
  • Posts: 726
  • Gender: Male
  • OMSI anyone?
    • View Profile
Re: Switching (BVE coding)
« Reply #10 on: August 29, 2012, 03:21:33 pm »
I assume the R143 that overshot the bumper in the ENY Yard in '06

Canarsie Yard.
Favorite LFS Powertrain: Cummins ISL 9 EPA10
                                        Allison WB-400R Gen IV
Favorite CNG/Diesel Engine: Detroit Diesel Series 50

Favorite Transmission Make: Allison Transmission

Offline BeeRyDavis

  • New Recruit
  • *
  • Posts: 89
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Switching (BVE coding)
« Reply #11 on: August 29, 2012, 05:56:02 pm »
Before attempting any of this , you have to at least know the basics to route coding. If you have absolutely no idea what the hell you are doing and just putting in random code in trying to make the train turn you will end up with stuff like this :





and your train will turn out like this:


 
Lol, I fixed the problem. I forgot the mid section where I have to subtract the distances of track on both sides by two. It looks fine now.

Offline nightmare403

  • Conductor
  • **
  • Posts: 164
  • Gender: Male
    • View Profile
Re: Switching (BVE coding)
« Reply #12 on: August 29, 2012, 06:20:18 pm »
can someone teach me to code can some tell me tell me what i have to do to make the switch code look right?
« Last Edit: August 31, 2012, 12:22:10 am by nightmare403 »


Uploaded with ImageShack.us

Offline BeeRyDavis

  • New Recruit
  • *
  • Posts: 89
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Switching (BVE coding)
« Reply #13 on: September 01, 2012, 04:06:47 pm »
can someone teach me to code can some tell me tell me what i have to do to make the switch code look right?
The switch objects are to be a distance of 50 away from each other. You'll need a few more rails to make it work. so say rail 1 is on
your right and u want to switch to the right. type railstart 2;0;0;1, if 1 is the same railtype as your running rail 0. now from the start of the switch
your rails are where they should be so just type the turn command (turn 0.08). at 25 ft you would type in .rail 1;2;0,.rail 2;-2;0, and then at 50 ft
you would type in .turn -0.08,.rail 1;0;0,.rail 1;-4;0,. You shouldn't see the tracks or walls cutting in front of you

Offline BeeRyDavis

  • New Recruit
  • *
  • Posts: 89
  • Gender: Male
  • BVEStation Member
    • View Profile
Re: Switching (BVE coding)
« Reply #14 on: September 01, 2012, 04:09:48 pm »
I meant .rail 2;-4;0,