Scripting Signalling events scenarios?

Scripting Signalling events scenarios?

Postby RobertM » Fri Apr 03, 2020 9:49 pm

So I have heard a rumor somewhere that it is possible to script an event via a scenario script that will effect signalling, can anyone confirm or deny this?

Specifically what I am trying to emulate is a train with a banker getting to a location and being held at a location via a signal being held at Danger via the script, and until a Stop at Destination & a Drop off instructions have been complete, then after 30 seconds the signal that was at danger changes to proceed and away we go.

Is this possible?

User avatar
Full Time Fireman
Posts: 52
Images: 1
Joined: Sun Jan 25, 2015 10:12 pm
Has thanked: 2 times
Been thanked: 64 times

Re: Scripting Signalling events scenarios?

Postby AndiS » Sun May 03, 2020 12:27 pm

As far as I am concerned, I filed it under rumor.

After the initial euphoria it showed with some clarity that scenario scripts are good for scenery effects of all kind. But both AI and signals are complex subsystems that follow their own rules.

Matt at one point said he would not try to work against the AI driver. In theory, you could get the ID of an AI engine and set controllers there. But it was always clear that you would fight against the system still influencing the AI engine in parallel with your scenario script.

For signals, I never heard of a way to get their ID and without that, scenario scripts can do nothing.

However, it has always been possible to script special signal behaviour, like clearing X seconds after the train stopped. Coupling is also detected by signal because the game core sends 1 "train gone" message and 2 "train entered block" messages when you uncouple. Likewise for coupling.

Level crossings can do the same.

But it is all about observing the train. No central control or script or plan.

Since you cannot swap signals on a per scenario basis, I devised a bunch of "modifier objects" that observe the train and talk to the signals (being signals themselves, in terms of game asset type). But I fully agree that this is complex stuff and they only talk to my own signals (more precisely, all the other signals are not listening).
Top Link Driver!
Posts: 665
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 267 times
Been thanked: 306 times

Return to Scenario Creation

Who is online

Users browsing this forum: No registered users and 1 guest