Few questions about junctions and train priorities

anand99

New member
Hi,

I am just getting back into trainz after a really long time (TRS2004 was my last) and I had a few questions.

1. I was wondering if there is a way to create a crossover in Trainz that will be recognized by AI trains. Can I accomplish this using the track splines by simply dragging a spline over another? Can I set a signal over that location to control the junction? If two AI trains met at the crossover will they pass the junction one at a time?

2. Is there a way to set a priority for two AI trains such that if a lower priority train is ahead of a higher priority train and holding it up it will automatically pull into a siding to allow the higher priority train to pass?

3. If two AI trains of different priority met at a converging junction will the higher priority train be allowed to go first even if it got to the junction a little later?
 
To signal the junction correctly, I believe you need boat's Active Signal Box (ASB) system. Just do a search on the DLS under his user name and you'll find what you need. I think.
 
1. You might like to look here http://trains.0catch.com/tutorial.html (Part 12) for some info about crossings. Boat's ASB will work OK but it does not work with (some?) scripted signals.

2. and 3. Priority in Trainz is not a hierarchy (e.g. 1 does not have preference over 2 etc.). I am not aware of any rule(s) that will do what you want, but there could well be ways of achieving the required result in specific circumstances.
 
Hi

You will need some form of decision making to achieve your objectives and as far as I am aware the only rule that will allow this level of decision making is the SCS2006 rule. I have an automated route using this rule which only allows one train on a crossover at any one time and it will automatically put a slow train into a passing loop when an express is due. While I haven't tried anything to do with priority I can't see any reason why it can't be done using a combination of variables and the If....If Else....If End commands in the rule.

Regards

Brian
 
Hi

You will need some form of decision making to achieve your objectives and as far as I am aware the only rule that will allow this level of decision making is the SCS2006 rule. I have an automated route using this rule which only allows one train on a crossover at any one time and it will automatically put a slow train into a passing loop when an express is due. While I haven't tried anything to do with priority I can't see any reason why it can't be done using a combination of variables and the If....If Else....If End commands in the rule.

Regards

Brian

Thanks for all the responses. I am primarily interested in Sessions and not Scenarios. I want to have a neverending session where AI trains continue to operate their schedules in a loop with minimal interference from me once I have setup everything. Under such circumstances I envision a situation where a freight train is going along a line and is being tailed by an express. I would like the freight to pull into the first siding available to allow the express to pass. I took a look at SCS2006 rule. All references in the documentation seem to be about scenarios. Will this work for a session like the one I am describing?
 
Hi again

If you are wanting to run a fully automatic session then yes this rule will allow you to do that. The route that I refered to has express trains travelling end to end every 20 minutes or so in each direction. The freight trains are merry go rounds running between a power station and coal mine.

When an express starts its run it sets a variable to indicate that it is on line. When a MGR approaches a passing loop it checks to see if the variable is set to Yes and if it is it will put itself into the loop and wait until the express has passed before pulling back onto the main line. If the variable is set to No then it will run straight through the passing loop. There is a random element built into the running of all trains so the scenario or session is different each time it runs.

I have run this session for up to 3 hours without any problems but I have to say that it does involve quite a bit of programming to get it all working correctly. SCS2006 does take a lot of getting to grips with but it is ideal for producing sessions that require a lot of decision making. I only build fully automatic sessions including programming the Carlisle area of the SnC route to a working timetable for the late 1950s.

As I mentioned above this is the only rule that I have found that allows decision making in the way that you would need to get your ideas into practice. Perhaps someone else knows differently and if so hopefully they will post with a different solution.

Regards

Brian
 
Conditional execution of driver commands

Hi,

I am just getting back into trainz after a really long time (TRS2004 was my last) and I had a few questions.

1. I was wondering if there is a way to create a crossover in Trainz that will be recognized by AI trains. Can I accomplish this using the track splines by simply dragging a spline over another? Can I set a signal over that location to control the junction? If two AI trains met at the crossover will they pass the junction one at a time?

2. Is there a way to set a priority for two AI trains such that if a lower priority train is ahead of a higher priority train and holding it up it will automatically pull into a siding to allow the higher priority train to pass?

3. If two AI trains of different priority met at a converging junction will the higher priority train be allowed to go first even if it got to the junction a little later?

Hi anand99

1. You can make a crossover as you say but the trains will pass through each other as if they each didn't exist. Signals are not effective since there is no lever and no junction.

2. Any method of controlling trains at crossovers using built-in rules tends to need a complicated setting up procedure. The ASB by boat is a way to overcome this problem, but doesn't take priority into account as far as I know.

3. No. At the request of Alan of Lots_trains I developed a driver command called Skip if S-variable which allows a block of driver commands to be ignored if a session variable is set to a certain value. It is used in conjunction with ChangeSVariable and WaitUntilSvariable by Atilabarut. Alan is currently beta testing the command and reports that it is working. He also states that the logic of setting it up can get mind-boggling if it is used heavily.

The way you would use this driver command is to nominate an arbitrary name to the crossover or passing loop e.g. X1 and set its svar value to 1 for Go or 2 for NoGo. The first train to approach the crossing would check the value of X1 and if it said Go, would set X1 to NoGo and proceed through the crossover. If X1 said NoGo, the train would have to wait until the another train had cleared the crossing and returned X1 to Go.

Alan uses different svar values to represent different levels of priority so a train would have to wait until the level of X1 was equal to or below it's own priority level before it could proceed. A train with higher priority could increase X1 and override another train's permission to use the crossing.

Using Skip if S-Variable is more flexible than ASB but gets very complicated with many driver commands needed to achieve the desired results. It is very rewarding when successfully accomplished.

Cheers - Trevor
 
Back
Top