For context, I would like to build a mod that queries all trains that are currently running in the world and make adjustments to their routes based on my own logic - the mod in question would be a "random failures and problems" mod. The logic would be at every set interval (say, 1 minute) the system would: Get all AI trains that are running/following a timetable within the current active session. Decide whether or not to trigger an event - this could be a random slow down of the service, or a breakdown of the service, etc. If an event is triggered - randomly select a train that gets this modification and either slow it down, command it to stop, etc. After some time has elapsed - the train resumes as normal. Internal state can be tracked by the mod, but the idea is that by using these APIs/commands the environment is more realistic - sometimes trains break down, sometimes trains have to run slower due to weather or disruption and can cause issues to the timetable. Rather than modifying the timetable system directly.