Page 3 of 6 FirstFirst 12345 ... LastLast
Results 21 to 30 of 51

Thread: Report any RW3/TS2013 signalling errors here please.

  1. #21

    Default

    Quote Originally Posted by Hack View Post
    Thanks Mike. So those need to be "for head = 2, numHeads do"? Let me adjust and see if it works.
    I think there's a bit more to it than that. The for loop is meant to initialise both heads on a 2-head signal to some valid state. It's just that it happens to pick Green for them both. I'll have to look again, but I'm not sure if Off is treated as a valid state, and a head certainly can't be left in a totally uninitialised state.

    In the script, the valid states are:

    ANIMSTATE_GREEN = 0
    ANIMSTATE_YELLOW = 1
    ANIMSTATE_LUNAR = 2
    ANIMSTATE_RED = 3

    and they can be flashing or steady ... but there's no Off state.
    Last edited by mrennie; 09-15-2012 at 07:08 PM.

  2. #22
    Join Date
    Nov 1999
    Location
    Another Planet
    Posts
    8,613

    Default

    Thanks Mike. I wish I understood more about these scripts - all default US scripts appear to have the line you mention.
    Cheers!
    Marc - 3DTrains - Home of the Feather River and Sherman Hill routes for MSTS

    Signature

  3. #23
    Join Date
    May 2010
    Location
    God's Country
    Posts
    849

    Default

    Hi Mike,

    have a look at page 6 of this link please.

    http://www.uktrainsim.com/rstutorial...t1%20v2-00.PDF

    There is a pic showing how the multi link signals are used.

    In the UK any trailing junctions coming in from either the left or right and joining the ML would have a signal placed before each such junction.

    There would not be the situation of a single Home (Stop) signal protecting entry into the ML from 7 different junctions, ahead of that signal.

    regards,
    Mike.

  4. #24

    Default

    Quote Originally Posted by Hack View Post
    Thanks Mike. I wish I understood more about these scripts - all default US scripts appear to have the line you mention.
    It's because they initialise numHeads further up, so the same line works for any number of heads, and initialises them all to green.

    In fact, I'm wondering now whether there exists an animation in the model to show the head with its light switched off. If there isn't, then we either live with the head being set to green by default, or we make a new model that includes off.

  5. #25

    Default

    Quote Originally Posted by neyland View Post
    Hi Mike,

    have a look at page 6 of this link please.

    http://www.uktrainsim.com/rstutorial...t1%20v2-00.PDF

    There is a pic showing how the multi link signals are used.

    In the UK any trailing junctions coming in from either the left or right and joining the ML would have a signal placed before each such junction.

    There would not be the situation of a single Home (Stop) signal protecting entry into the ML from 7 different junctions, ahead of that signal.

    regards,
    Mike.
    Hi Mike,

    I did say it's difficult to explain

    Clearly the entrance to the mainline from those trailing points would each have their own signals to hold trains there if the the path is set in favour of our own home. What I'm talking about is a case like that shown in figure 3, but where there isn't just one trailing point ahead (like in the figure 3) but several, close together. For that case, you can't just put one link where he's shown Link 0 and then one more link (Route Link 1) up beyond the last of the trailing points, instead you have to put a link in between each of them. I've seen examples of this in the default routes, where there are several trailing points leading from yards into a section of track on the mainline between a home and a starter. The links are needed so that the home is aware of the state of each and every one of those switches that could be set against the train approaching the home.

    It is also possible to do what he's shown in figure 6 on page 6, but it's like you said, it's crazy, because there's nothing on the signal post to tell the poor driver which route ahead is actually clear! I think it's simply a mis-use of the signal and its links, to make up for the fact that there aren't any models of signals with more than two home/starters on the posts.

    cheers,

    Mike

    P.S. I'll see if I can get a chance to take a screenshot to show what I mean.

  6. #26
    Join Date
    Nov 1999
    Location
    Stevens Point, Wisconsin, USA.
    Posts
    14,705

    Default Moving day!

    Okay, moved and stickied, May The Force Be With You in your quest.

    Couple observations;

    "The "train motion program" doesn't receive anything from the signals, but the signals do get sent information about trains by the dispatcher."

    Like I said, the AI trains and signals don't even know about each other - the AI train follows the PATH, and the PATH is what the signals are responding to. With MSTS (again, same programmers, KUJU made both games originally) each route had signal scripts and data files which controlled all that in the route folder. In the absence of signals or scripts the AI path went all the way from start to finish, and if another AI path crossed that path whichever one got a lower priority stopped and would not cross the other one's path. Since the path is "erased" behind the AI train, the second path would advance after the first AI crossed it, since there is no longer a path blocking the advancement of the second path.

    With signals it was a different story, the SignalNumClearAhead value in the sigcfg.dat file limited how far ahead the path projected.

    https://www.trainsim.com/vbts/showth...99#post1166299

    For some reason they elected to leave the SignalNumClearAhead subroutine out of railsim/railworks, which means the path is the entire path from the very start of the scenario regardless of when it's scheduled to run. Only way to assign who goes first at junctions is by setting the priority, I never did figure out which was 1 2 3 4 5 out of that.

    "I seem to remember that the multiple forward links thing was to protect a path where there are mutliple *converging* (not diverging) tracks ahead, so you put one link just behind each of the converging junctions until you get to the point where there are no more such junctions between that link and the next signal. The point of that is so that the home doesn't clear unless all the switches are set to give a clear run through all the way to the final link."

    Over here we call that "Interlocking";

    https://www.trainsim.com/vbts/showth...!!!!!!!!!!!!!-!!!!!!!!!!!

    Simplest way to set that up is to stretch the second (and third if there's a diverge at the far end) track trip all the way beyond all the trailing points. That way unless every trailing point is set for the route, the signal's 0 link won't be able to trace an unbroken path to the 1 (or 2) link since any one switch with the points set the wrong way will interrupt the trace.

  7. #27

    Default

    The tests I did were with a player-controlled train, and the debug statements I added in the scripts certainly showed the calls to OnConsistPass (function OnConsistPass ( prevFrontDist, prevBackDist, frontDist, backDist, linkIndex )). Here's an example of what the script does with the information a link receives via that call:

    -- if the consist is crossing the signal now
    if ( frontDist > 0 and backDist < 0 ) or ( frontDist < 0 and backDist > 0 ) then
    -- if the consist was previously before/after siganl then the crossing has just started
    if ( prevFrontDist < 0 and prevBackDist < 0 ) or ( prevFrontDist > 0 and prevBackDist > 0 ) then
    crossingStart = 1

    ...

    if (crossingStart == 1) then

    --------------------------------------------------------------------------------------
    -- if a train has just started crossing in the normal direction...
    if (prevFrontDist > 0 and prevBackDist > 0) then

    -- if the train just started crossing link 0 in the normal direction, increment occupation table slot 0
    if (linkIndex == 0) then

    -- Check for SPADs first
    if gSignalState == SIGNAL_BLOCKED then

    etc.

    But as you say, it's probably only when a player train crosses the link (since the game doesn't know beforehand what the player train is going to do, especially if it's a crazy driver/engineer).

    Thanks for pointing out interlocking ... I'm still trying to get to grips with how you chaps (sorry, guys) talk ... I've managed to get my head around trucks and cars (which aren't the same as lorries and automobiles, I discovered), and I do like caboose, it sounds so much nicer than brake van (which sounds more like something the local garage uses to delivers parts to repair a motor car).

    Cheers!
    Mike
    Last edited by mrennie; 09-15-2012 at 08:04 PM.

  8. #28
    Join Date
    Nov 1999
    Location
    Stevens Point, Wisconsin, USA.
    Posts
    14,705

    Default

    I've often said google translate needs an English to American translator. When talking about signals most things are the same, except for Yankee Doodles a "loop" is a track that goes in a circle or a "reverse loop" intended to turn the train around. Passing Loop = Passing Siding, Triangle = Wye.

    Quick search for some of my old threads;

    https://www.trainsim.com/vbts/showth...Christmas-Tree

    I assumed that first one wasn't working, but those signals are red by default unless there's an active path through them, so to test;

    https://www.trainsim.com/vbts/showth...ble-crossovers!

    You do need a train approaching the signals to see what the actual behavior is when switches are thrown various ways. Also note that signals will go red when they detect a path even with no actual train anywhere in the same county, that's why the "collision" with the invisible AI train in the original Hagen-Siegen shunting scenario, you're actually colliding with the path of an AI train that hasn't started yet.

  9. #29
    Join Date
    Nov 1999
    Location
    Stevens Point, Wisconsin, USA.
    Posts
    14,705

    Default

    Another one I found when looking for something else;

    https://www.trainsim.com/vbts/showth...89#post1487789

    Link 2 dragged all the way across 5 switches so no green unless 4 trailing and one facing point are set for the through path. These days it's mostly electronic circuitry, but in the olden days they used big hairy iron levers with notches in the control rod linkage, IE when switch A is thrown curved and C is also curved, the lever for switch B is locked against changing until either A or C is returned to the straight position.

  10. #30
    Join Date
    May 2010
    Location
    God's Country
    Posts
    849

    Default

    Quote Originally Posted by mrennie View Post
    Hi Mike,

    I did say it's difficult to explain

    Clearly the entrance to the mainline from those trailing points would each have their own signals to hold trains there if the the path is set in favour of our own home. What I'm talking about is a case like that shown in figure 3, but where there isn't just one trailing point ahead (like in the figure 3) but several, close together. For that case, you can't just put one link where he's shown Link 0 and then one more link (Route Link 1) up beyond the last of the trailing points, instead you have to put a link in between each of them. I've seen examples of this in the default routes, where there are several trailing points leading from yards into a section of track on the mainline between a home and a starter. The links are needed so that the home is aware of the state of each and every one of those switches that could be set against the train approaching the home.

    It is also possible to do what he's shown in figure 6 on page 6, but it's like you said, it's crazy, because there's nothing on the signal post to tell the poor driver which route ahead is actually clear! I think it's simply a mis-use of the signal and its links, to make up for the fact that there aren't any models of signals with more than two home/starters on the posts.

    cheers,

    Mike

    P.S. I'll see if I can get a chance to take a screenshot to show what I mean.
    Hi Mike,

    it's difficult for this mushed up brain mate.

    I understand why Kuju - RSC do it this way. As you rightly say it is because they couldn't be bothered to supply a decent range of the correct signals.

    I suppose what i am trying to explain (not very good at it). Is that i get why they have done it, but also that it is not correct.

    Plus could it be done properly. Could we have bracket signals with 3 or 4 semaphore arms for up to 4 diverging routes ?

    I have seen UK colour light signals in the editor with 3 way feathers (direction indicators), so i guess it must be possible.

    Or is it just a waste of time Mike and we are stuck with the many limitations of the signal system in RW ?

    regards,
    Mike.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •