You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running a quickdrive on that route with the MP36PH with you script (release) from '01. Washington Union' to '09. Baltimore Penn Station', a ghost signal is detected shortly before 'Landover Track 2'.
The track there permits 100mp/h according to your script (even though it should be 125mp/h according to TS [release/non-beta]!), and suddenly a 45mp/h signal is detected that is not existing for miles out. There is no signal post showing any such aspect and TS does not show anything either. Also the ghost signal seems very close since I am immediately, despite acknowledging the signal, in suppression likely for being below a brake curve. After some driving, the 45mp/h signal disappears again, and I can continue to go at 100mp/h.
I debugged this for a while and realized the cause of the bad behavior of both your script and the orginal DTG script. There is a single! sig4speed45 signal fired with a distance of 645m (read out with Call("GetNextRestrictiveSignal")) at the point captured by the video above which is of course immediately above the brake curve. However, all really restrictive signals send hundreds or thousands of messages via OnCustomSignalMessage. I believe such single signal messages are the result of a race condition between the train entering a signal block and a signal lua script firing a last restriction signal from the block ahead before being cleared by TS (dispatcher).
When I filter the signal messages with a Lua script like this and only accept those that are sent at least 5 times in a row:
require ("Assets/DTG/WashingtonBaltimore/RailVehicles/CommonScripts/orig_MP36PH_Engine_Script.out") -- Require the original renamed scriptorig_oncsig=OnCustomSignalMessagefunctionmyMessage(txt, duration)
SysCall("ScenarioManager:ShowAlertMessageExt", "MP36PH Debugscript", txt, duration, 1)
endlast_sigmsg=""sig_counter=0functionOnCustomSignalMessage(arg)
ifarg~=last_sigmsgthenmyMessage("OCSM: "..arg..", (last signal sent " ..sig_counter.." times)", 5)
last_sigmsg=argsig_counter=1elsesig_counter=sig_counter+1ifsig_counter==5then-- buffer the signal messages; only when one is sent 5 times --> send it to the DTG scriptorig_oncsig(arg)
endendend
then the problem goes away with the DTG script. I did not test this filtering with your script, but I would recommend to consider implementing this kind of filtering.
When running a quickdrive on that route with the MP36PH with you script (release) from '01. Washington Union' to '09. Baltimore Penn Station', a ghost signal is detected shortly before 'Landover Track 2'.
The track there permits 100mp/h according to your script (even though it should be 125mp/h according to TS [release/non-beta]!), and suddenly a 45mp/h signal is detected that is not existing for miles out. There is no signal post showing any such aspect and TS does not show anything either. Also the ghost signal seems very close since I am immediately, despite acknowledging the signal, in suppression likely for being below a brake curve. After some driving, the 45mp/h signal disappears again, and I can continue to go at 100mp/h.
https://www.youtube.com/watch?v=49Ck2UaHOXk
The text was updated successfully, but these errors were encountered: