Page 2 of 3

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Sun Dec 28, 2014 8:09 pm
by AndiS
If you got the AI script working, it will be easy to swap in this version of OnConsistPass.

It sends a message termed REQUEST_TO_PASS_DANGER forward when the train front end passes the link in the normal direction.

Code: Select all
function OnConsistPass ( prevFrontDist, prevBackDist, frontDist, backDist, linkIndex )
      if frontDist <= 0 and prevFrontDist > 0 then   -- front passed link 0 proper
         Call( "SendSignalMessage", 4, "", 1, 1, 0)
      end
end


I have no idea about TS2015, and they changed these things several times in the past, but as of TS2013, this is what happens:
The user presses TAB.
The system calls GetSignalState for the next stopping signal (i.e., Stopping is eTrue in the .bin file).
If GetSignalState returns 2 which stands for BLOCKED, then the game checks the path ahead. If there are no switches set against the train, then this not-so-immersive pop-up is shown. It looks twice as stupid if the signal clears more or less at the same time.
The system sends message REQUEST_TO_PASS_DANGER (i.e., 4) to the signal concerned, and does not expect an answer to the request.

You cannot clear the call-on on a signal when GetSignalState is called because that is called all the time when a player train approaches, gathering information for in-cab signalling.

If a signal does not return 2 in GetSignalState, then exactly nothing happens as you press TAB.

Clearly it depends on the script of the signal with the call-on whether that will be shown now on receipt of that message.

In short, if the above works, it was a lucky stab in the dark.


On a second thought, I wonder why (or if) you see this pop-up at all, after you placed the AI Only signal in the middle of the platform. Does the signal protecting the platform have a numbered link in the far half of the platform? If its numbered link would be on the near side of the near end of the platform and the track would be clear from there to the AI Only signal, then the game should not see any occupied block at all when you are admitted to the near half of the platform.

Edit: Added an "end" in the code. I was too busy stripping all the other lines from the original - sorry.

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Sun Dec 28, 2014 9:02 pm
by Widewanderer
Thanks Andi!

Much to try out here... I'll implement this snippet of script and see what happens in my little test rig route. Regarding your AI Only signal and the JTMS set, I think I had the link 1 of the (calling on) signal protecting the platform at the near end, then the AI signal in the middle. This way the dispatcher allowed a second train to enter the already occupied platform, whereas without the AI signal, "Request to pass signal at danger denied" was returned on pressing TAB - unless the scenario was calling for the second train to couple up to the first. I also had a second AI train successfully entering the occupied platform and stopping short of the first (using the standard scenario stopping point) when using the AI Only signal. Without it, the scenario simply failed in the editor. Of course, without the TAB Trigger, the second (AI) train did not get the calling on lights when entering the occupied section.

I'll do some more experimenting over the next few days, and report back to you via PM.

Best wishes,

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Mon Dec 29, 2014 4:31 am
by Widewanderer
I've tried Andi's suggestion - and early indications are that IT WORKS!

I'll do some more testing, but it looks like we now have something usable as a TAB Trigger. Both AI and player trains now get calling on lights - no more trains apparently blissfully passing signals at danger. Hopefully, further testing will not reveal any flaws in that.

Thanks a million Andi! The only additional feature, apparently, in the JT version is that their's allows for some trains to get the auto TAB trigger, others not - exactly which trains get the trigger is defined by entering a comma separated list in the TAB Trigger's properties flyout in the Editor. Andi's little snippet of code above gives every train the trigger. But a significant start for which Andi deserves much kudos.

Best wishes for now,

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Tue Dec 30, 2014 3:59 pm
by AndiS
I posted the final version in the Bits and pieces about signals and AI thread.

The code shown above caused the call-on lights to show even if the main signal was clear. I really cannot blame JT for this as the signal would never receive this message when clear. So I added another "if" and that was all that was needed.

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Wed May 20, 2015 3:07 am
by Widewanderer
Excellent - I see that Just Trains have finally published the JTMS TAB Trigger, AI Signal, and their own version of the Stopping Point, in today's update of their Newcastle-Edinburgh route. Three tiny, but immensely powerful, little devices which, in my humble opinion, add hugely to the detail, depth and completeness possible in modern-day-setting scenarios. I, for one, will be taking full advantage of them, and I very much hope other scenario developers will too.

Well done, Just Trains!

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Wed May 20, 2015 4:26 pm
by Nobkins
Thanks for the heads up.

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Tue Jul 28, 2015 12:29 am
by Widewanderer
Greetings One & All,

I feel everso guilty about making so much noise about those three little scenario assets in the Just Trains Modern Signal Set... :oops:

Now that they have been published, I thought I would put together a video showing their use in an applied scenario setting, in the hope that a few scenario writers might be inspired enough to use them, indeed in the hope that anyone at all might be interested...! Lol!

I've uploaded the following to YouTube, to complement Jim's excellent tutorial videos on the subject of JTMS:

http://www.youtube.com/v/d0QS_VSjLbA

Do please feel free to PM me if you have any questions or comments. In the meantime, happy scenario writing!

Best wishes,

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Tue Jul 28, 2015 1:27 am
by Nobkins
Fantastic video Rob. Lovely to see it in action. Well done.

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Sun Nov 29, 2015 10:22 pm
by callum112233
Hi all. Does anyone know if this set of signals works alongside either the Kuju semaphores or the Semaphores found in the Settle-Carlisle Line?

Thanks.
Callum.

Re: Just Trains UK Modern Signals Guide (Unofficial)

PostPosted: Mon Nov 30, 2015 2:54 pm
by Nobkins
I believe it *should* work the kuju default signals but I can not be sure as it was a long time since I worked with them. Best thing would be to set up new route, stick down some track / junction and combine the signals. It does not take long and then you know for sure.