Need a rule for multiple junctions

sniper297

Coconut God
Got a situation;

85891677.jpg


Parallel main lines (red) joined by a branch line (green). AI traffic in both directions (black arrows) and an AI coming in from the branch line (small brown arrows) every 20 minutes. Going from right to left and diverging onto the branch line is no trouble, but coming FROM the branchline the AI has to travel in the wrong direction on the upper track for a short distance, then cross over to the bottom track for the correct direction of travel. Standard signal setup so no collisions, the problem is when the branch AI is approaching switch S1, throws that switch, and at the same time an AI going left to right on the bottom track locks S3. When that happens, the branch AI sets S3 straight and continues on the upper track, even tho he can't get to the next track mark (just to the right of S3, I tried putting it on the crossover itself but that's worse) that way.

What I'd like is some kind of command or trigger that will throw all three switches curved at the same time, if possible. I looked at;

Set Junctions,<kuid:-18:1237>
and Set Cleared Junctions,<kuid:131986:157661> but near as I can figure out (usual lack of documentation) those are designed to set the junctions once at the beginning of the session, which is not what I want. What I need is for the switches to default to the mainline (which they do) but flip all three when the branchline AI approaches.
 
Hi Sniper - Have you tried Switch Junctions - built-in rule?

It can be triggered by Trigger check or Check Trackside rule

Trevor
 
Last edited:
oops!

That works, with one flaw;

71141613.jpg


Got an AI passing by on the far switch at the moment the other AI entering the main throws the near switch, there's nothing to stop the far switch from being thrown under the through train. Unless there's some undocumented way to have it lock both switches it will need to be used with some kind of signal trigger.
 
Nope. Problem is even with trigger multiple signals, the wee beastie stops at the triggered red signal, but throws the switches anyway. It's like the junction link overrides the 20 meter radius lock for the second switch or something. This is in TS2010 BTW.
 
You could try Junction Controller v3 (kuid:439337:100957) which allows multiple switches to be controlled by a single one. It is a bit long winded to work out all the combinations you want to allow and enter in the table but it certainly works. Whether it would work as you want under AI I am not sure, but it is worth a try. Another possibility is to have a look at some of the rules by atilabarut (on the DLS) which may offer a possibility with trigger control on the branch.
 
Hi

This looks like an ideal candidate for one of the Path Control rules. I use the rules by brummfondel, jsTRF- Path Control rule and the Path Control Setpath and Autodrive driver commands. Using these rules the AI just drives along the path that you have set for it and doesn't try to think for itself. I have paths set up for the whole of the ECML using these rules and trains go where they should when they should (essential when running to a timetable). The only thing is that the start signal for a path must have a unique name.

Regards

Brian
 
One at a time, no pushing or shoving, everyone will get a turn! :hehe:

"Track direction marker to the right of S2 could be the easiest."

That works, provided I put the trackmark beyond all 3 switches, altho I'm using AI routing marker instead of the older track direction one. A bit clumsy since the AI stops, throws the first and second switch, creeps into the crossover before throwing the third one, but regardless of the timing it causes no problems.

"Would "Signal Link" be of use?"

Dunno, I'll look into it, I'll also look into junction controller and path rules. I'll be back in about 15 years, since it takes an average of 5 years for each rule/script to figure out what it's for, what it's supposed to do, and how to configure it to make it do whatever it's supposed to do before deciding if I can use it or not. :sleep:
 
Dont know what signals you are using, but if you use a scripted signal that uses feathers, this would stop the train from creeping forward. Place the scripted signal on the branch, place a no entry feather on the right of S2 and place a straight feather on the right of S3. The signal will stay red until it can see the straight feather.
Linked junctions dont have complete control and lock them.
 
The simplest solution is: Make the incoming line (green) double, the second track short and invisible. Use Boats ASB turnout to connect the two lines, works perfectly. It is payware but low price for such a fine piece of work.
 
Hi Corvanel,

Thanks for the kind words!

Hi Coconut God. I think ASB Turnout would have trouble doing the layout exactly as you show but if you don’t mind turning the side track into double track at least for the first few yards then it will switch perfectly for you. Plus of course it will switch automatically for both AI trains and manually driven ones.

There is some discussion on merging to single track with ASBTurnout here http://forums.auran.com/trainz/showthread.php?84281-Boat-goes-Payware-ASB-Turnout!&p=930427&#26

And here http://forums.auran.com/trainz/showthread.php?84281-Boat-goes-Payware-ASB-Turnout!/page6&#78

Click the signature below for Tutorials etc.

All the best,

Boat, (Mike)
 
Last edited:
Using payware assets in a freeware route gets complicated, plus it makes the route unusable for TS12 multiplayer. In any case I suspect the same problem as junction links would result if you tested with various timings - since the second switch is being thrown by the first switch, the subroutine that locks switches from being thrown under another train is bypassed. That's what's wrong with junction link, the first switch is locked if another train is withing the 20 meter trigger radius, the second switch is locked against player or AI trains throwing it when another train is within that 20 meter trigger radius, but there's nothing to prevent the first switch from throwing the second in that situation. Workaround for now that seems to work for any timing is trackmark on and beyond the crossover with drive via, and a trackmark before the trailing points for all three trains with a drive to trackmark / wait 5 seconds command insuring a full stop before the junction for all three. That gives them time to sort out who goes first regardless of timing or arrival order.
 
Using payware assets in a freeware route gets complicated, plus it makes the route unusable for TS12 multiplayer.

Agreed. If you are intending to release the route then I can see why you would hesitate with a payware asset.

As for problems with various timings however, I can assure you that ASB Turnout is pretty robust. It's been designed to run and run without the usual AI hang-ups. I'm not saying its impossible to break.... but I haven't as yet!

Boat
 
I'll bite, what's a "right hand branch signal"? All the junctions are signaled the usual way with 04s on the trailing points, 02 where there's a right diverge and 02L with a left diverge. I know there are linkable signals for Trainz so you can do actual interlockings, but again I can't use stuff available only on 3rd party websites, the whole smash needs to be built in or on the DLS.
 
Oh that. Dunno what the actual technical name is, but most Yankee Doodle rebel colonists call them "home signals", or interlocking (which they're not unless they actually interlock a junction), or diverge signals, or simply double heads. I use them at all facing points, with single heads on trailing points.

68927139.jpg


Might be confusing because of the mix of dwarf signals on the "wrong way" tracks, but the dwarf facing this way between the merging branch (far left with the red RS11s) and the crossover is a double head absolute dwarf, right hand diverge. From the other side looks like this;

31755567.jpg


Ignoring the train coming down from the bridge for the moment, that track wasn't in the original design. Got another double head absolute right diverge dwarf on this side, and a USA2 02 (absolute right diverge) before the branch line.

As I say, all this works fine if the player is the only one using the branch line, the AI will work 39 times out of 40 and get lost 1 time out of 40. Using the junction link for that 1 time out of 40 doesn't help because there's nothing to stop the link from throwing the second switch under the train currently occupying that switch. Workaround I'm using for now, getting back to the C&NW coal drag on the bridge;

30360976.jpg


A "flyover" (think that's a British term, but Yanks use it too) to get the AI over to the right side track without having to drive the wrong way. Even for short distances AI running the wrong way on parallel tracks seem to get easily confused, regardless of how many micromanagement track marks I use to guide them inch by inch - in fact too many too close together seems to be counterproductive, the little beasties blow past trackmark 06east then run off on the scenic route with the "Drive to 06east" instruction still showing in the F6 window, apparently looking for it in an alternate dimension.
 
Last edited:
Back
Top