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?
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.
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.
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?