question on guiding trains onto alternating tracks

dstelley

Member
I'm trying to develop a method to "force" alternating A1 trains to use both tracks of an oncoming 2T tunnel.

I have a single track run but there are several 2T tunnels boring through a large mountain chain. What I would like to do is have it setup so that the first train takes the right side, the second takes the left the 3rd takes the right ect..

This is a single direction line so there is no danger of a head on collision.

At present the A1 chooses the shortest line, wether there is a train on the line or not. If the block is occupied he will wait. I would prefer he uses the alternate line.

That make sense? Is there such a way?

trying to program each train to use "via" markers would be almost impossible as each train has way different destinations so the logic would only work briefly.
 
Hi

You could try giving each track a different priority using a purple priority marker to set a priority for each line. Set the priority for each train according to the track that you want it to use. The default value for priority is 2 and you can set it to a different value by clicking on the consist in surveyor. If the trains are coming out of a portal there is a driver command called Priorityz which can be used as the first command to set the priority for each train. It can also be used at any time in the list so for example if there is a single line section between each tunnel you could have a train going through the first tunnel on the right hand track and then change priority so it goes through the second tunnel on the left hand track.

Note that the priority is set between 2 junctions so if you have a junction half way along one of the tracks you may have to set up a priority marker each side of that junction.

Regards

Brian
 
I'm not very familiar with the scripting used in this game, but what about some sort of trigger that sets off a look ahead route setting mechanism?

Example as a train passes over a trigger it does a look ahaed to see if a block ahaed is occupied, if not it continues on with the shortest route, if its occupied it shunts to the other tunnel track. All with out stopping to think about it.

Is that possible?

The problem with using routes is there is no knowing when a specific train will be approaching this segment of the line.

I put in a double track through the mountain chain to alleviate bottle necks but the trainz try very hard to take the shortest route, if there is traffic ahead they wait, even when they could shift to the next lane and continue on.

In the real world they would be routed around so I'd think that could be done in the AI world yes?
 
Hi again

There is a rule brought out for TRS2006 called the SCS2006 rule (it's on the DLS) which replaced all the other rules and driver commands in a session/scenario. Amongst many commands it contains it has conditional commands (If, If Else and End If) which can be combined with variables to allow decision making to be made. Unfortunately when TRS2010 was updated to multiplayer the rule was broken beyond repair and it does not work in TS12 either. I built a number of automated routes with it with such things as freight trains checking to see if there was a passenger train following them. If there was, the freight would turn itself into a passing loop and wait for the passenger train to pass. Unfortunately I'm not aware of any conditional commands amongst the normal driver commands but hopefully someone out there knows differently.

If you can get hold of a cheap copy of 2009 or 2010 and don't patch it up to the multiplayer version the SCS2006 rule is still usable. It does have quite a steep learning curve though.

Regards

Brian
 
The only sim I know that allows for dynamic routing is Zusi 2 (possibly Zusi 3) which allows the user during scenario creation to specify which routes are valid for a particular train at a junction and can also roll a % based dice for random routing.

Unfortunately as Trainz is driven by rigid commands for AI trains and DIY route setting for player trains, I'm not sure whether there is any easy way to do this (with a nod to the potential previously offered by SCS2006 in this regard). Until/if N3V can program in something similar to Zusi we are left with the rather simplistic system currently available.
 
You could try navigate by tracklist. Place a track marker in each tunnel named say tunnel (1) and tunnel (2). The brackets are important as this links the tunnels together. The driver command nav to/through tracklist will show your tunnel and then select random. It should then use a random tunnel.
 
Would the "Call at" command work? Instead of stopping at the station, the drivers can just drive through it by not using the load command. I think with the call at, the train will pick a track based on availability rather than expecting to take the shortest route. I maybe mistaken, but that's what I recall when I used it ages and ages ago.

John
 
It bears more testing but in initial testing, the navigate via tracklist (I used the V2 one) works splendidly. I setup the tracklist as you specified and told the trains to use the first available trackmark. This way they seem to take the shortest path and progress to the other if the line is occupied.

I will test the "Call at" as well when I next get the chance.

Thanks all!
 
On my route i used Trigger Check & Switch Junction rules to get my passenger trains to go to difference station by using difference engines. With engine 1 the switch is set default to the right to the station now engine 2 is to bypass the station so when he hits the trigger it will change the switch to the left and after he passing the switch will change back. The triggers will work with AI or You driving.
My main line is set this way both north & south and i can drive at X amount of speed without changing a switch, this is nice for multiplayer routes.
 
Back
Top