Signal Scripting Information

Discussion in 'PC Editor Discussion' started by eldomtom2, Dec 16, 2023.

  1. eldomtom2

    eldomtom2 Well-Known Member

    Joined:
    Jul 31, 2022
    Messages:
    2,341
    Likes Received:
    2,506
    I'm interested in learning about signal scripting, in particular what sort of information signals have access to. Does anyone know anything on this topic?
     
  2. hp1+vr2

    hp1+vr2 Member

    Joined:
    Dec 11, 2023
    Messages:
    121
    Likes Received:
    31
    maybe fceschmidt could help u :)
     
  3. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    312
    Likes Received:
    414
    Hi, to start with, you can check out https://forums.dovetailgames.com/threads/danish-signalling-system.76888/, I recently published an entire signal system (see last post) including blueprints which you can also open and inspect :)

    For a second step, you can drop me a dm & we can align via discord or so.

    I also want to make a tutorial video sometime but that will probably be in the new year.
     
    Last edited: Dec 19, 2023
  4. fceschmidt

    fceschmidt Well-Known Member

    Joined:
    Oct 22, 2020
    Messages:
    312
    Likes Received:
    414
    Basically a signal has access to 2 events: On Route Assigned, On Signal Ahead Aspect Change.
    On Route Assigned fires when the dispatcher decides that a train can go via this signal to another one. This event comes with a route index.
    On Signal Ahead Aspect Change fires when the signal at the end of the route changes its aspect. This event comes with a reference to the signal ahead, and a class reference to the aspect that the signal is now showing.

    In these events you have access to the route data, e.g. speed restriction, route letter, all that you can set in the network property tab basically. Additionally you can find out the signal aspect of the next signal, all intermediate signals, and the indications on them. You can also find out if they have a route set and can check one signal further. There are basically no limitations, except that all states of the signal have to be reflected in the form of aspects and indications, afaik.
     
  5. eldomtom2

    eldomtom2 Well-Known Member

    Joined:
    Jul 31, 2022
    Messages:
    2,341
    Likes Received:
    2,506
    That's some great basic information, thanks. I think my main question is is there any information on a train signals can access beyond what routes they are assigned, such as e.g. their precise location?
     

Share This Page