straypacket

straypacket provides information on Signal Scripting in Train Simulator Classic (formerly Kuju Railworks)


The topic is somewhat "magical", in that there are basically 2 implementations available in source code form: Kuju's original signal implementation and SMM Digital's excellent signal library

Both implementations are fine and very usable, however they come with only a fixed number of pathing options


straypacket aims to provide a more flexible solution, allowing for custom pathing options, giving route and scenario creators more control over consist behavior

For example, if you'd like a switch to branch into 4 tracks, with tracks 2 and 4 being exit links (the dispatcher ignores consists going into tracks 2 and 4), this is possible with a generic 5 link signal. Just place the signal links as usual, and then edit the properties for paths 2 and 4


A secondary aim is to reduce duplication of code in the above libraries. The source for both libraries contain lots of duplicate code for various signal configurations. Lua has the ability to include another lua file. This eliminates the need for duplication, thus making code exploration and maintenance easier

It is a work in progress, and will be updated as new features are added and tested