The advtrains core provides the ATC rail as a basic facility to perform automatic train operation. The combination of the Interlocking System system and the Station/Stop Rail, it is sufficient for basic automatic railway lines. However, sometimes the need arises to perform advanced actions, such as controlling a passenger information monitor, handle complex train moves or develop a departure timing system. The advtrains_luaautomation module provides a very powerful tool to achieve such tasks, at the drawback that some programming skill is required.
LuaATC is a Lua programming interface to advtrains, programmable using an in-game editor.
Using LuaATC rails, player-provided Lua code reacts to certain events, such as a train driving over the rail, and perform custom, freely-programmable actions, such as issuing ATC commands, sending digiline messages, and setting switches or signals. It can also time a so-called “interrupt” event after a certain time, e.g. for stopping a train and making it depart a few seconds later.
LuaATC was developed back in 2017, when the advtrains core was mainly working, in order to handle complex train automation tasks. At that time, the interlocking system did not exist yet. LuaATC was used to build custom interlocking-like operation setups, and, in fact, still can be used to do this. The Spawn Subway on Linuxworks Minetest Server is such an example of LuaATC-based interlocking. During its development, the main focus was on providing a working system as fast as possible, to be able to play around with it, and not considering security and extensibility.
Being so historic, the LuaATC system has included some poor design choices, namely: